From 39ccf2a0b576e2a77f1909cf256a8df96a7f2cd9 Mon Sep 17 00:00:00 2001 From: ivan-sim Date: Mon, 4 Mar 2024 09:54:07 +0700 Subject: [PATCH] Update Hospital portal --- .../hospital-portal/public/lang/en-US.json | 4 ++- .../hospital-portal/public/lang/id-ID.json | 4 ++- .../hospital-portal/src/components/Table.tsx | 34 ++++++++++++++++--- .../src/sections/claim/TableList.tsx | 30 ++++++++-------- .../sections/dashboard/TableListReqLog.tsx | 8 ++--- 5 files changed, 55 insertions(+), 25 deletions(-) diff --git a/frontend/hospital-portal/public/lang/en-US.json b/frontend/hospital-portal/public/lang/en-US.json index 64b5efee..e11ef130 100644 --- a/frontend/hospital-portal/public/lang/en-US.json +++ b/frontend/hospital-portal/public/lang/en-US.json @@ -57,5 +57,7 @@ "txtCancel": "Cancel", "txtDecline": "Decline", "txtApprove": "Approve", - "txtDialogConfirmation": "Are you sure you want to proceed with this action?" + "txtDialogConfirmation": "Are you sure you want to proceed with this action?", + "txtStartDate": "Start Date", + "txtEndDate": "End Date" } diff --git a/frontend/hospital-portal/public/lang/id-ID.json b/frontend/hospital-portal/public/lang/id-ID.json index 96077fe4..d3f59306 100644 --- a/frontend/hospital-portal/public/lang/id-ID.json +++ b/frontend/hospital-portal/public/lang/id-ID.json @@ -57,5 +57,7 @@ "txtCancel": "Batal", "txtDecline": "Tolak", "txtApprove": "Terima", - "txtDialogConfirmation": "Apakah Anda yakin ingin melanjutkan tindakan ini?" + "txtDialogConfirmation": "Apakah Anda yakin ingin melanjutkan tindakan ini?", + "txtStartDate": "Tanggal Mulai", + "txtEndDate": "Tanggal Akhir" } diff --git a/frontend/hospital-portal/src/components/Table.tsx b/frontend/hospital-portal/src/components/Table.tsx index 6de87395..7334e85b 100644 --- a/frontend/hospital-portal/src/components/Table.tsx +++ b/frontend/hospital-portal/src/components/Table.tsx @@ -26,6 +26,10 @@ import { linearProgressClasses, } from '@mui/material'; import { visuallyHidden } from '@mui/utils'; + +import { DatePicker, LocalizationProvider, MobileDatePicker } from '@mui/x-date-pickers'; + +import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'; /* ---------------------------------- axios --------------------------------- */ import axios from '../utils/axios'; /* ---------------------------------- react --------------------------------- */ @@ -297,7 +301,7 @@ export default function Table({ {/* Start date */} {filterStartDate && filterStartDate.useFilter ? ( -
filterStartDate.handleStartDateChange(event)}> + {/* filterStartDate.handleStartDateChange(event)}> ({ shrink: true, }} /> - + */} + + { + filterStartDate.setStartDate( (newValue)); + }} + inputFormat="dd-MM-yyyy" + renderInput={(params) => } + /> +
) : null } @@ -317,7 +332,7 @@ export default function Table({ {filterEndDate && filterEndDate.useFilter ? ( -
filterEndDate.handleEndDateChange(event)}> + {/* filterEndDate.handleEndDateChange(event)}> ({ shrink: true, }} /> - + */} + + { + filterEndDate.setEndDate( (newValue)); + }} + inputFormat="dd-MM-yyyy" + renderInput={(params) => } + /> +
) : null } diff --git a/frontend/hospital-portal/src/sections/claim/TableList.tsx b/frontend/hospital-portal/src/sections/claim/TableList.tsx index dcd4994e..17dcf2c4 100644 --- a/frontend/hospital-portal/src/sections/claim/TableList.tsx +++ b/frontend/hospital-portal/src/sections/claim/TableList.tsx @@ -304,12 +304,12 @@ export default function TableList() { label: localeData.txtStatus, isSort: true, }, - { - id: 'action', - align: 'right', - label: '', - isSort: false, - }, + // { + // id: 'action', + // align: 'right', + // label: '', + // isSort: false, + // }, ]; @@ -363,15 +363,15 @@ export default function TableList() { {obj.submission_date ? fDateSuffix(obj.submission_date) : ''} , - action: - - navigate ('/claim/detail/'+obj.claim_request_id)}> - - View - - - } /> + // action: + // + // navigate ('/claim/detail/'+obj.claim_request_id)}> + // + // View + // + // + // } /> })) ); diff --git a/frontend/hospital-portal/src/sections/dashboard/TableListReqLog.tsx b/frontend/hospital-portal/src/sections/dashboard/TableListReqLog.tsx index 8cb70e4d..7fe20e82 100644 --- a/frontend/hospital-portal/src/sections/dashboard/TableListReqLog.tsx +++ b/frontend/hospital-portal/src/sections/dashboard/TableListReqLog.tsx @@ -239,7 +239,7 @@ export default function TableList() { }; // handle start date - const [startDateValue, setStartDateValue] = useState(''); + const [startDateValue, setStartDateValue] = useState(null); const handleStartDateChanges = async (event: React.FormEvent) => { event.preventDefault(); @@ -263,7 +263,7 @@ export default function TableList() { }; // handle end date - const [endDateValue, setEndDateValue] = useState(''); + const [endDateValue, setEndDateValue] = useState(null); const handleEndDateChanges = async (event: React.FormEvent) => { event.preventDefault(); @@ -494,8 +494,8 @@ export default function TableList() { searchs={searchs} filterStatus={filterStatus} selected={selected} - // filterStartDate={filterStartDate} - // filterEndDate={filterEndDate} + //filterStartDate={filterStartDate} + //filterEndDate={filterEndDate} />