- Reorganisasi urutan menu, memindahkan "Laporan Penilaian Jaminan" ke posisi pertama & memperbaiki penamaan menu (SO, LPJ, Monitoring, Tender → Permohonan KJPP, dll.) - Ubah path "laporan-penilaian-jaminan" menjadi "laporan" untuk konsistensi URL - Pindahkan menu "Data Debitur" sebelum "Permohonan" & "Pembatalan" ke bawah dengan akses terbatas - Perbaikan role permissions: hapus `admin` & `senior-officer` dari menu tertentu, tambahkan `penilai` & `surveyor` ke menu Penilaian - Batasi akses menu "Pembatalan" hanya untuk `administrator` & `pemohon-ao` - Update ActivityController: tambah role `penilai` pada filter user - Update LaporanPermohonanController: filter status `done` agar hanya tampil permohonan selesai - Update PermohonanController: hapus kondisi `jenis_penilaian_id` pada logika pembuatan PersetujuanPenawaran, gunakan `Auth::id()` konsisten - Validasi DebitureRequest: ubah max karakter `nomor_rekening` dari 50 → 10, serta perbaikan indentasi & format JSON di `module.json`
52 lines
1.7 KiB
PHP
52 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace Modules\Lpj\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Modules\Lpj\Rules\UniqueCifExceptZero;
|
|
use Modules\Lpj\Rules\UniqueExcept;
|
|
|
|
class DebitureRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*/
|
|
public function rules()
|
|
: array
|
|
{
|
|
$rules = [
|
|
'branch_id' => 'required|exists:branches,id',
|
|
'province_code' => 'nullable|exists:provinces,code',
|
|
'city_code' => 'nullable|exists:cities,code',
|
|
'district_code' => 'nullable|exists:districts,code',
|
|
'village_code' => 'nullable|exists:villages,code',
|
|
'nomor_rekening' => 'nullable|string|max:10',
|
|
'name' => 'required',
|
|
'registered_at' => 'nullable|date',
|
|
'npwp' => 'nullable|string|min:15|max:16',
|
|
'email' => 'nullable|email',
|
|
'phone' => 'nullable|string|max:15',
|
|
'address' => 'nullable|string',
|
|
'postal_code' => 'nullable|string|max:10',
|
|
'status' => 'nullable|boolean'
|
|
];
|
|
|
|
if($this->method() == 'PUT'){
|
|
$rules['cif'] = ['required', new UniqueCifExceptZero($this->id)];
|
|
}else{
|
|
$rules['cif'] = ['required', new UniqueCifExceptZero(null)];
|
|
}
|
|
|
|
return $rules;
|
|
}
|
|
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*/
|
|
public function authorize()
|
|
: bool
|
|
{
|
|
return true;
|
|
}
|
|
}
|