penambahan menu activity dan perbaikan menu assingment
This commit is contained in:
@@ -9,20 +9,36 @@ class PenilaianRequest extends FormRequest
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'jenis_penilaian_id' => 'required|max:255',
|
||||
'teams_id' => 'required|max:255',
|
||||
'tanggal_kunjungan' => 'required|max:255',
|
||||
'status' => 'required|string',
|
||||
'nomor_registrasi' => 'required|string',
|
||||
'surveyor_id' => 'nullable|required_without:penilai_surveyor_id',
|
||||
'penilaian_id' => 'nullable|required_without:penilai_surveyor_id',
|
||||
'penilai_surveyor_id' => 'nullable|required_without:surveyor_id|required_without:penilaian_id',
|
||||
'keterangan' => 'nullable',
|
||||
];
|
||||
}
|
||||
{
|
||||
|
||||
|
||||
$action = $this->input('action');
|
||||
|
||||
if ($action === 'revisi') {
|
||||
return [
|
||||
'dokumen' => 'required|file|mimes:pdf',
|
||||
'keterangan' => 'required|string',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'jenis_penilaian_id' => 'required|max:255',
|
||||
'teams_id' => 'required|max:255',
|
||||
'tanggal_kunjungan' => 'required|max:255',
|
||||
'status' => 'required|string',
|
||||
'nomor_registrasi' => 'required|string',
|
||||
'surveyor_id' => 'nullable|required_without:penilai_surveyor_id',
|
||||
'penilaian_id' => 'nullable|required_without:penilai_surveyor_id',
|
||||
'penilai_surveyor_id' => 'nullable|required_without_all:surveyor_id,penilaian_id',
|
||||
'keterangan' => 'nullable',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user