diff --git a/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php b/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php index 39168e81..ca7a3e08 100644 --- a/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php +++ b/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php @@ -324,10 +324,16 @@ class RequestLogController extends Controller ]; $validator = Validator::make($request->all(), [ 'request_logs_id' => 'required', - 'discharge_date' => 'required' + 'discharge_date' => 'required', + 'result_files.*' => 'sometimes|file|max:10000', + 'diagnosa_files.*' => 'sometimes|file|max:10000', + 'kondisi_files.*' => 'sometimes|file|max:10000', ], [ 'request_logs_id.required' => trans('Validation.required',['attribute' => 'Request Logs ID']), - 'discharge_date.required' => trans('Validation.required',['attribute' => 'Discharge Date']) + 'discharge_date.required' => trans('Validation.required',['attribute' => 'Discharge Date']), + 'result_files.*.max' => trans('Validation.max.file', ['attribute' => 'Result Files', 'max' => '10 MB' ]), + 'diagnosa_files.*.max' => trans('Validation.max.file', ['attribute' => 'Diagnosis Files', 'max' => '10 MB' ]), + 'kondisi_files.*.max' => trans('Validation.max.file', ['attribute' => 'Condition Files', 'max' => '10 MB' ]), ]); if ($validator->fails()) { diff --git a/frontend/hospital-portal/src/sections/dashboard/TableListFinalLog.tsx b/frontend/hospital-portal/src/sections/dashboard/TableListFinalLog.tsx index 63365102..010662dc 100644 --- a/frontend/hospital-portal/src/sections/dashboard/TableListFinalLog.tsx +++ b/frontend/hospital-portal/src/sections/dashboard/TableListFinalLog.tsx @@ -333,7 +333,7 @@ export default function TableListFinalLog() { const response = await axios.get(`/get-final-log`, { params: { ...parameters, search:searchText, order: order, - orderBy: orderBy, type: 'final-log' }, + orderBy: orderBy, status:statusValue, type: 'final-log' }, }); setData( response.data.data.map((obj: any) => ({ diff --git a/frontend/hospital-portal/src/sections/dashboard/TableListReqLog.tsx b/frontend/hospital-portal/src/sections/dashboard/TableListReqLog.tsx index 0b0c8729..17ce8ace 100644 --- a/frontend/hospital-portal/src/sections/dashboard/TableListReqLog.tsx +++ b/frontend/hospital-portal/src/sections/dashboard/TableListReqLog.tsx @@ -326,7 +326,7 @@ export default function TableList() { const response = await axios.get(`/get-request-log`, { params: { ...parameters, search:searchText, order: order, - orderBy: orderBy, type: 'request-log' }, + orderBy: orderBy, status:statusValue, type: 'request-log' }, }); setData( response.data.data.map((obj: any) => ({ diff --git a/resources/lang/en/Message.php b/resources/lang/en/Message.php index d0167b2b..7b8a6c6d 100644 --- a/resources/lang/en/Message.php +++ b/resources/lang/en/Message.php @@ -3,7 +3,7 @@ return [ 'success' => 'Request has been successfully processed.', 'server_error' => 'Internal server error.', - 'not_found' => 'Data not found', + 'not_found' => 'Data not found.', 'password' => 'Password wrong. Please try again.', 'read_notification' => 'Notification has been read.', 'already_exists' => 'Data already exists.', diff --git a/resources/lang/en/Validation.php b/resources/lang/en/Validation.php index c5c2b448..8f242065 100644 --- a/resources/lang/en/Validation.php +++ b/resources/lang/en/Validation.php @@ -3,6 +3,8 @@ return [ 'required' => 'The :attribute field is required.', 'invalid' => 'The :attribute field is invalid.', - 'max' => ':attribute cannot exceed :length characters.', + 'max' => [ + 'file' => ':attribute max size is :max.', + ], 'email' => 'Invalid email format.' ]; \ No newline at end of file diff --git a/resources/lang/id/Validation.php b/resources/lang/id/Validation.php index 2b2ffa07..5a8fdb02 100644 --- a/resources/lang/id/Validation.php +++ b/resources/lang/id/Validation.php @@ -3,6 +3,8 @@ return [ 'required' => 'Kolom :attribute harus diisi.', 'invalid' => 'Kolom :attribute tidak valid.', - 'max' => ':attribute tidak boleh melebihi :length karakter.', + 'max' => [ + 'file' => ':attribute tidak boleh melebihi :max.', + ], 'email' => 'Format email salah.' ]; \ No newline at end of file