update by CODEX

This commit is contained in:
Fiqh Pratama
2025-10-23 17:21:46 +07:00
parent 4e0ab80520
commit 6f9f0d34a3
12 changed files with 457 additions and 326 deletions
@@ -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,
]);