update by CODEX
This commit is contained in:
@@ -37,6 +37,25 @@ class FormOtherController extends Controller
|
||||
{
|
||||
protected AttachmentService $attachmentService;
|
||||
|
||||
/**
|
||||
* Kategori yang tidak boleh dipilih pada Form Others.
|
||||
*
|
||||
* @var array<int,string>
|
||||
*/
|
||||
protected array $excludedKategoriNames = [
|
||||
'Up Country',
|
||||
'Vehicle Running Cost',
|
||||
'Entertainment',
|
||||
'Meeting / Seminar',
|
||||
'Presentation',
|
||||
'Sponsorship',
|
||||
'Cash in Bank BCA',
|
||||
'Donasi/Gift',
|
||||
'PPn Masukan',
|
||||
'Vehicle Maintenance',
|
||||
'Bahan Promosi',
|
||||
];
|
||||
|
||||
protected array $attachmentCategories = [
|
||||
'bukti_total',
|
||||
];
|
||||
@@ -155,7 +174,7 @@ class FormOtherController extends Controller
|
||||
|
||||
return view('backend.pages.forms.other.view', [
|
||||
'form' => $form,
|
||||
'kategori' => Kategori::whereNotIn('name', ['Up Country', 'Vehicle Running Cost', 'Entertainment', 'Meeting / Seminar'])->get(),
|
||||
'kategori' => Kategori::whereNotIn('name', $this->excludedKategoriNames)->get(),
|
||||
'attachments' => $attachments,
|
||||
]);
|
||||
}
|
||||
@@ -165,7 +184,7 @@ class FormOtherController extends Controller
|
||||
$this->checkAuthorization(auth()->user(), ['forms.other.create']);
|
||||
|
||||
return view('backend.pages.forms.other.create', [
|
||||
'kategori' => Kategori::whereNotIn('name', ['Up Country', 'Vehicle Running Cost', 'Entertainment','Presentation','Sponsorship', 'Meeting / Seminar'])->get(),
|
||||
'kategori' => Kategori::whereNotIn('name', $this->excludedKategoriNames)->get(),
|
||||
'attachmentCategories' => $this->attachmentCategories,
|
||||
]);
|
||||
}
|
||||
@@ -396,7 +415,7 @@ class FormOtherController extends Controller
|
||||
|
||||
return view('backend.pages.forms.other.edit', [
|
||||
'form' => $form,
|
||||
'kategori' => Kategori::whereNotIn('name', ['Up Country', 'Vehicle Running Cost', 'Entertainment','Presentation','Sponsorship', 'Meeting / Seminar'])->get(),
|
||||
'kategori' => Kategori::whereNotIn('name', $this->excludedKategoriNames)->get(),
|
||||
'attachments' => $this->formatAttachmentCollection($form),
|
||||
'attachmentCategories' => $this->attachmentCategories,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user