Merge branch 'staging' of https://dev.sismedika.online/febio/aso into staging
This commit is contained in:
@@ -26,6 +26,9 @@ use Box\Spout\Writer\Common\Creator\Style\StyleBuilder;
|
|||||||
use Box\Spout\Common\Entity\Style\CellAlignment;
|
use Box\Spout\Common\Entity\Style\CellAlignment;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\View;
|
use Illuminate\Support\Facades\View;
|
||||||
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use App\Exports\FailedRowsExport; // Import class export Excel
|
||||||
|
|
||||||
use Modules\Internal\Transformers\RequestLogResource;
|
use Modules\Internal\Transformers\RequestLogResource;
|
||||||
|
|
||||||
@@ -119,6 +122,94 @@ class ClaimController extends Controller
|
|||||||
return response()->json(Helper::paginateResources($results));
|
return response()->json(Helper::paginateResources($results));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function downloadTemplate()
|
||||||
|
{
|
||||||
|
return Helper::responseJson([
|
||||||
|
'file_name' => "Template - Claim - Management.xlsx",
|
||||||
|
"file_url" => url('files/Template - Claim - Management.xlsx')
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function import(Request $request)
|
||||||
|
{
|
||||||
|
if ($request->hasFile('file')) {
|
||||||
|
$file = $request->file('file');
|
||||||
|
$data = Excel::toArray([], $file);
|
||||||
|
|
||||||
|
$processedData = $this->processCategoryNames($data);
|
||||||
|
|
||||||
|
$importedRows = 0;
|
||||||
|
$failedRows = [];
|
||||||
|
|
||||||
|
foreach ($processedData as $row) {
|
||||||
|
try {
|
||||||
|
$affectedRows = DB::table('claim_requests')
|
||||||
|
->where('code','=', $row['code'])
|
||||||
|
->where('claim_management','=', 1)
|
||||||
|
->update([
|
||||||
|
'status_claim_management' => $row['qc'] == 'Y' ? 'approved' : 'declined',
|
||||||
|
'reason_decline' => $row['reason'] ? $row['reason'] : null,
|
||||||
|
'approval_by_claim_management' => auth()->user()->id,
|
||||||
|
'approval_date_claim_management' => date('Y-m-d H:i:s'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
if ($affectedRows === 0) {
|
||||||
|
$failedRows[] = $row;
|
||||||
|
} else {
|
||||||
|
$importedRows += $affectedRows;
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$failedRows[] = $row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = [
|
||||||
|
'message' => 'File uploaded and data saved to database',
|
||||||
|
'data' => [
|
||||||
|
'total_success_row' => $importedRows,
|
||||||
|
'total_failed_row' => count($failedRows),
|
||||||
|
'failed_rows' => $failedRows,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
return response()->json($response);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json(['error' => 'No file uploaded.']);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function processCategoryNames($data)
|
||||||
|
{
|
||||||
|
$header = [];
|
||||||
|
$row = [];
|
||||||
|
for ($i = 1; $i < count($data[0]); $i++) {
|
||||||
|
$row[] = $data[0][$i];
|
||||||
|
$header[] = $data[0][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$filed = [];
|
||||||
|
foreach ($header[0] as $value)
|
||||||
|
{
|
||||||
|
$modelColumn = strtolower(preg_replace('/\s+/', '_', trim($value)));
|
||||||
|
$modelColumn = str_replace(['*', ' '], '', $modelColumn);
|
||||||
|
if($modelColumn)
|
||||||
|
{
|
||||||
|
$filed[] = $modelColumn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = [];
|
||||||
|
foreach ($row as $subarray) {
|
||||||
|
$trimmedSubarray = [];
|
||||||
|
for ($i = 0; $i < count($filed); $i++) {
|
||||||
|
$trimmedSubarray[$filed[$i]] = $subarray[$i] ? $subarray[$i] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result[] = $trimmedSubarray;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
public function exportClaimManagement(Request $request)
|
public function exportClaimManagement(Request $request)
|
||||||
{
|
{
|
||||||
$start_date = $request->input('start_date') ? $request->input('start_date') : 'all';
|
$start_date = $request->input('start_date') ? $request->input('start_date') : 'all';
|
||||||
@@ -280,6 +371,72 @@ class ClaimController extends Controller
|
|||||||
"file_url" => url('files/Report-Data-Claim-Management-'. $start_date.'-'.$end_date.'.xlsx')
|
"file_url" => url('files/Report-Data-Claim-Management-'. $start_date.'-'.$end_date.'.xlsx')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function exportFiled(Request $request)
|
||||||
|
{
|
||||||
|
$writer = WriterEntityFactory::createXLSXWriter();
|
||||||
|
$writer->openToFile(public_path('files/Report-Data-Filed-Import.xlsx'));
|
||||||
|
$header = [
|
||||||
|
'Code*',
|
||||||
|
'QC*',
|
||||||
|
'Reason'
|
||||||
|
];
|
||||||
|
$style = (new StyleBuilder())
|
||||||
|
->setFontBold()
|
||||||
|
// ->setFontSize(15)
|
||||||
|
// ->setFontColor(Color::BLUE)
|
||||||
|
// ->setShouldWrapText()
|
||||||
|
->setCellAlignment(CellAlignment::LEFT)
|
||||||
|
// ->setBackgroundColor(Color::YELLOW)
|
||||||
|
->build();
|
||||||
|
|
||||||
|
$headerRow = WriterEntityFactory::createRowFromArray($header, $style);
|
||||||
|
$writer->addRow($headerRow);
|
||||||
|
// ============================
|
||||||
|
|
||||||
|
foreach($request->params as $item)
|
||||||
|
{
|
||||||
|
|
||||||
|
$rowData = [
|
||||||
|
$item['code'],
|
||||||
|
$item['qc'],
|
||||||
|
$item['reason']
|
||||||
|
];
|
||||||
|
$style = (new StyleBuilder())
|
||||||
|
//->setFontBold()
|
||||||
|
// ->setFontSize(15)
|
||||||
|
// ->setFontColor(Color::BLUE)
|
||||||
|
// ->setShouldWrapText()
|
||||||
|
->setCellAlignment(CellAlignment::LEFT)
|
||||||
|
// ->setBackgroundColor(Color::YELLOW)
|
||||||
|
->build();
|
||||||
|
$row = WriterEntityFactory::createRowFromArray($rowData, $style);
|
||||||
|
$writer->addRow($row);
|
||||||
|
}
|
||||||
|
$footer = [
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
];
|
||||||
|
$style = (new StyleBuilder())
|
||||||
|
->setFontBold()
|
||||||
|
// ->setFontSize(15)
|
||||||
|
// ->setFontColor(Color::BLUE)
|
||||||
|
// ->setShouldWrapText()
|
||||||
|
->setCellAlignment(CellAlignment::LEFT)
|
||||||
|
// ->setBackgroundColor(Color::YELLOW)
|
||||||
|
->build();
|
||||||
|
|
||||||
|
$footerRow = WriterEntityFactory::createRowFromArray($footer, $style);
|
||||||
|
$writer->addRow($footerRow);
|
||||||
|
|
||||||
|
$writer->close();
|
||||||
|
|
||||||
|
return Helper::responseJson([
|
||||||
|
'file_name' => 'Report-Data-Filed-Import',
|
||||||
|
"file_url" => url('files/Report-Data-Filed-Import.xlsx')
|
||||||
|
]);
|
||||||
|
}
|
||||||
public function getProvider(Request $request)
|
public function getProvider(Request $request)
|
||||||
{
|
{
|
||||||
$providers = DB::table('organizations')
|
$providers = DB::table('organizations')
|
||||||
|
|||||||
@@ -235,6 +235,9 @@ Route::prefix('internal')->group(function () {
|
|||||||
Route::post('claims/{claim_id}/set-final-encounter', [ClaimEncounterController::class, 'setFinalEncounter']);
|
Route::post('claims/{claim_id}/set-final-encounter', [ClaimEncounterController::class, 'setFinalEncounter']);
|
||||||
|
|
||||||
Route::get('claims', [ClaimController::class, 'index']);
|
Route::get('claims', [ClaimController::class, 'index']);
|
||||||
|
Route::get('claims/download-template', [ClaimController::class, 'downloadTemplate']);
|
||||||
|
Route::post('claims/import', [ClaimController::class, 'import']);
|
||||||
|
Route::post('claims/exportFiled/', [ClaimController::class, 'exportFiled']);
|
||||||
Route::get('claims/export-claim-management', [ClaimController::class, 'exportClaimManagement']);
|
Route::get('claims/export-claim-management', [ClaimController::class, 'exportClaimManagement']);
|
||||||
Route::get('claims/get-provider', [ClaimController::class, 'getProvider']);
|
Route::get('claims/get-provider', [ClaimController::class, 'getProvider']);
|
||||||
Route::post('claims/{id}/update-items', [ClaimController::class, 'updateItems'])->name('claim.update-items');
|
Route::post('claims/{id}/update-items', [ClaimController::class, 'updateItems'])->name('claim.update-items');
|
||||||
|
|||||||
@@ -291,9 +291,9 @@ const dummyServices = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleClick = () => {
|
// const handleClick = () => {
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -393,6 +393,105 @@ const dummyServices = [
|
|||||||
function send_bulk(id) {
|
function send_bulk(id) {
|
||||||
return axios.post(`claims/${id}/${approve}`, { reasonDecline: reasonDecline });
|
return axios.post(`claims/${id}/${approve}`, { reasonDecline: reasonDecline });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
|
||||||
|
const createMenu = Boolean(anchorEl);
|
||||||
|
const importHospital = useRef<HTMLInputElement>(null);
|
||||||
|
const [currentImportFileName, setCurrentImportFileName] = useState(null);
|
||||||
|
const [importLoading, setImportLoading] = useState(false);
|
||||||
|
const [importResult, setImportResult] = useState(null);
|
||||||
|
const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
||||||
|
setAnchorEl(event.currentTarget);
|
||||||
|
};
|
||||||
|
const handleClose = () => {
|
||||||
|
setAnchorEl(null);
|
||||||
|
};
|
||||||
|
const handleImportButton = () => {
|
||||||
|
if (importHospital?.current) {
|
||||||
|
handleClose();
|
||||||
|
importHospital.current ? importHospital.current.click() : console.log('No File selected');
|
||||||
|
} else {
|
||||||
|
alert('No file selected');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleCancelImportButton = () => {
|
||||||
|
if(importHospital.current)
|
||||||
|
{
|
||||||
|
importHospital.current.value = '';
|
||||||
|
importHospital.current.dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleImportChange = (event: any) => {
|
||||||
|
if (event.target.files[0]) {
|
||||||
|
setCurrentImportFileName(event.target.files[0].name);
|
||||||
|
} else {
|
||||||
|
setCurrentImportFileName(null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleUpload = () => {
|
||||||
|
if(importHospital.current && importHospital.current.files)
|
||||||
|
{
|
||||||
|
if (importHospital.current?.files.length) {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', importHospital.current?.files[0]);
|
||||||
|
setImportLoading(true);
|
||||||
|
axios
|
||||||
|
.post('claims/import', formData)
|
||||||
|
.then((response) => {
|
||||||
|
handleCancelImportButton();
|
||||||
|
loadDataTableData();
|
||||||
|
setImportResult(response.data);
|
||||||
|
setImportLoading(false);
|
||||||
|
enqueueSnackbar('Success Import Hospitals', { variant: 'success' });
|
||||||
|
})
|
||||||
|
.catch((response) => {
|
||||||
|
enqueueSnackbar(
|
||||||
|
'Looks like something went wrong. Please check your data and try again. ' +
|
||||||
|
response.message,
|
||||||
|
{ variant: 'error' }
|
||||||
|
);
|
||||||
|
setImportLoading(false);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
enqueueSnackbar('No File Selected', { variant: 'warning' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleGetTemplate = () => {
|
||||||
|
axios.get('claims/download-template').then((response) => {
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = response.data.data.file_url;
|
||||||
|
link.setAttribute('download', response.data.data.file_name);
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
handleClose();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleExportReportFiled = async () => {
|
||||||
|
|
||||||
|
await axios
|
||||||
|
.post('claims/exportFiled', { params: importResult?.data.failed_rows })
|
||||||
|
.then((res) => {
|
||||||
|
enqueueSnackbar('Data berhasil di Export', {
|
||||||
|
variant: 'success',
|
||||||
|
anchorOrigin: { horizontal: 'right', vertical: 'top' },
|
||||||
|
});
|
||||||
|
setIsLoading(false)
|
||||||
|
|
||||||
|
document.location.href = res.data.data.file_url;
|
||||||
|
})
|
||||||
|
.catch((err) =>
|
||||||
|
enqueueSnackbar('Data Gagal di Export', {
|
||||||
|
variant: 'error',
|
||||||
|
anchorOrigin: { horizontal: 'right', vertical: 'top' },
|
||||||
|
})
|
||||||
|
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
@@ -690,6 +789,16 @@ const dummyServices = [
|
|||||||
<Grid item xs={12} md={12} lg={12}>
|
<Grid item xs={12} md={12} lg={12}>
|
||||||
<form style={{ width: '100%' }}>
|
<form style={{ width: '100%' }}>
|
||||||
<Grid container spacing={1} sx={{ justifyContent: 'space-between', alignItems: 'center' }}>
|
<Grid container spacing={1} sx={{ justifyContent: 'space-between', alignItems: 'center' }}>
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
id="file"
|
||||||
|
ref={importHospital}
|
||||||
|
style={{ display: 'none' }}
|
||||||
|
onChange={handleImportChange}
|
||||||
|
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, text/plain"
|
||||||
|
/>
|
||||||
|
{!currentImportFileName && (
|
||||||
|
<>
|
||||||
<Grid item xs={12} md={3}>
|
<Grid item xs={12} md={3}>
|
||||||
<TextField
|
<TextField
|
||||||
id="search-input"
|
id="search-input"
|
||||||
@@ -780,13 +889,33 @@ const dummyServices = [
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
startIcon={<UploadIcon />}
|
startIcon={<UploadIcon />}
|
||||||
sx={{ p: 1.8 }}
|
sx={{ p: 1.8 }}
|
||||||
// onClick={handleExportReport}
|
|
||||||
loading={isLoadingImport}
|
loading={isLoadingImport}
|
||||||
|
onClick={handleClick}
|
||||||
>
|
>
|
||||||
<Typography variant="inherit" sx={{ marginLeft: 1 }}>
|
<Typography variant="inherit" sx={{ marginLeft: 1 }}>
|
||||||
Import
|
Import
|
||||||
</Typography>
|
</Typography>
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
|
<Menu
|
||||||
|
id="import-button"
|
||||||
|
anchorEl={anchorEl}
|
||||||
|
open={createMenu}
|
||||||
|
onClose={handleClose}
|
||||||
|
MenuListProps={{
|
||||||
|
'aria-labelledby': 'basic-button',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MenuItem onClick={handleImportButton}>
|
||||||
|
<Typography variant='body2'>Import</Typography>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem
|
||||||
|
onClick={() => {
|
||||||
|
handleGetTemplate();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography variant='body2'> Download Template</Typography>
|
||||||
|
</MenuItem>
|
||||||
|
</Menu>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormControl >
|
<FormControl >
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
@@ -803,8 +932,59 @@ const dummyServices = [
|
|||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{currentImportFileName && (
|
||||||
|
<Grid item xs={12} md={12}>
|
||||||
|
<Stack direction={'row'} spacing={2} sx={{ p: 2 }}>
|
||||||
|
<ButtonGroup variant="outlined" aria-label="outlined button group" fullWidth>
|
||||||
|
<Button onClick={handleImportButton} fullWidth>
|
||||||
|
{currentImportFileName ?? 'No File Selected'}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
onClick={handleCancelImportButton}
|
||||||
|
size="small"
|
||||||
|
fullWidth={false}
|
||||||
|
sx={{ p: 1.8 }}
|
||||||
|
>
|
||||||
|
<CancelIcon color="error" />
|
||||||
|
</Button>
|
||||||
|
</ButtonGroup>
|
||||||
|
|
||||||
|
<LoadingButton
|
||||||
|
id="upload-button"
|
||||||
|
variant="outlined"
|
||||||
|
startIcon={<UploadIcon />}
|
||||||
|
sx={{ p: 1.8 }}
|
||||||
|
onClick={handleUpload}
|
||||||
|
loading={importLoading}
|
||||||
|
>
|
||||||
|
Upload
|
||||||
|
</LoadingButton>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
)}
|
||||||
|
{importResult && (
|
||||||
|
<Stack direction={'row'} sx={{ px: 2, pb: 2 }}>
|
||||||
|
<Box sx={{ color: 'text.secondary' }}>
|
||||||
|
Last Import Result :{' '}
|
||||||
|
<Box sx={{ color: 'success.main', display: 'inline' }}>
|
||||||
|
{importResult.data.total_success_row ?? 0}
|
||||||
|
</Box>{' '}
|
||||||
|
Row Processed,{' '}
|
||||||
|
<Box sx={{ color: 'error.main', display: 'inline' }}>
|
||||||
|
{importResult.data.total_failed_row}
|
||||||
|
</Box>{' '}
|
||||||
|
Failed
|
||||||
|
{/* {importResult.data.failed_rows.map((row, index) => (
|
||||||
|
<Typography variant='body' key={index} color="error"> [Code={row.code ? row.code : 'Required'}]</Typography>
|
||||||
|
))} */}
|
||||||
|
<u onClick={handleExportReportFiled} style={{cursor:'pointer'}}>Download Data Filed</u>
|
||||||
|
</Box>
|
||||||
|
</Stack>
|
||||||
|
)}
|
||||||
</Grid>
|
</Grid>
|
||||||
</form>
|
</form>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -57,5 +57,7 @@
|
|||||||
"txtCancel": "Cancel",
|
"txtCancel": "Cancel",
|
||||||
"txtDecline": "Decline",
|
"txtDecline": "Decline",
|
||||||
"txtApprove": "Approve",
|
"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"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,5 +57,7 @@
|
|||||||
"txtCancel": "Batal",
|
"txtCancel": "Batal",
|
||||||
"txtDecline": "Tolak",
|
"txtDecline": "Tolak",
|
||||||
"txtApprove": "Terima",
|
"txtApprove": "Terima",
|
||||||
"txtDialogConfirmation": "Apakah Anda yakin ingin melanjutkan tindakan ini?"
|
"txtDialogConfirmation": "Apakah Anda yakin ingin melanjutkan tindakan ini?",
|
||||||
|
"txtStartDate": "Tanggal Mulai",
|
||||||
|
"txtEndDate": "Tanggal Akhir"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ import {
|
|||||||
linearProgressClasses,
|
linearProgressClasses,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import { visuallyHidden } from '@mui/utils';
|
import { visuallyHidden } from '@mui/utils';
|
||||||
|
|
||||||
|
import { DatePicker, LocalizationProvider, MobileDatePicker } from '@mui/x-date-pickers';
|
||||||
|
|
||||||
|
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
||||||
/* ---------------------------------- axios --------------------------------- */
|
/* ---------------------------------- axios --------------------------------- */
|
||||||
import axios from '../utils/axios';
|
import axios from '../utils/axios';
|
||||||
/* ---------------------------------- react --------------------------------- */
|
/* ---------------------------------- react --------------------------------- */
|
||||||
@@ -297,7 +301,7 @@ export default function Table<T>({
|
|||||||
{/* Start date */}
|
{/* Start date */}
|
||||||
{filterStartDate && filterStartDate.useFilter ? (
|
{filterStartDate && filterStartDate.useFilter ? (
|
||||||
<Grid item xs={12} lg={2} xl={2}>
|
<Grid item xs={12} lg={2} xl={2}>
|
||||||
<form onChange={(event) => filterStartDate.handleStartDateChange(event)}>
|
{/* <form onChange={(event) => filterStartDate.handleStartDateChange(event)}>
|
||||||
<TextField
|
<TextField
|
||||||
id="date-input"
|
id="date-input"
|
||||||
type="date"
|
type="date"
|
||||||
@@ -309,7 +313,18 @@ export default function Table<T>({
|
|||||||
shrink: true,
|
shrink: true,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</form>
|
</form> */}
|
||||||
|
<LocalizationProvider dateAdapter={AdapterDateFns}>
|
||||||
|
<DatePicker
|
||||||
|
label={localeData.txtStartDate}
|
||||||
|
value={filterStartDate.startDate}
|
||||||
|
onChange={(newValue:any) => {
|
||||||
|
filterStartDate.setStartDate( (newValue));
|
||||||
|
}}
|
||||||
|
inputFormat="dd-MM-yyyy"
|
||||||
|
renderInput={(params) => <TextField sx={{width:'40%'}} {...params} required/>}
|
||||||
|
/>
|
||||||
|
</LocalizationProvider>
|
||||||
</Grid>
|
</Grid>
|
||||||
) : null }
|
) : null }
|
||||||
|
|
||||||
@@ -317,7 +332,7 @@ export default function Table<T>({
|
|||||||
|
|
||||||
{filterEndDate && filterEndDate.useFilter ? (
|
{filterEndDate && filterEndDate.useFilter ? (
|
||||||
<Grid item xs={12} lg={2} xl={2}>
|
<Grid item xs={12} lg={2} xl={2}>
|
||||||
<form onChange={(event) => filterEndDate.handleEndDateChange(event)}>
|
{/* <form onChange={(event) => filterEndDate.handleEndDateChange(event)}>
|
||||||
<TextField
|
<TextField
|
||||||
id="date-input"
|
id="date-input"
|
||||||
type="date"
|
type="date"
|
||||||
@@ -329,7 +344,18 @@ export default function Table<T>({
|
|||||||
shrink: true,
|
shrink: true,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</form>
|
</form> */}
|
||||||
|
<LocalizationProvider dateAdapter={AdapterDateFns}>
|
||||||
|
<DatePicker
|
||||||
|
label={localeData.txtEndDate}
|
||||||
|
value={filterEndDate.endDate}
|
||||||
|
onChange={(newValue:any) => {
|
||||||
|
filterEndDate.setEndDate( (newValue));
|
||||||
|
}}
|
||||||
|
inputFormat="dd-MM-yyyy"
|
||||||
|
renderInput={(params) => <TextField sx={{width:'40%'}} {...params} required/>}
|
||||||
|
/>
|
||||||
|
</LocalizationProvider>
|
||||||
</Grid>
|
</Grid>
|
||||||
) : null }
|
) : null }
|
||||||
|
|
||||||
|
|||||||
@@ -304,12 +304,12 @@ export default function TableList() {
|
|||||||
label: localeData.txtStatus,
|
label: localeData.txtStatus,
|
||||||
isSort: true,
|
isSort: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
id: 'action',
|
// id: 'action',
|
||||||
align: 'right',
|
// align: 'right',
|
||||||
label: '',
|
// label: '',
|
||||||
isSort: false,
|
// isSort: false,
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@@ -363,15 +363,15 @@ export default function TableList() {
|
|||||||
{obj.submission_date ? fDateSuffix(obj.submission_date) : ''}
|
{obj.submission_date ? fDateSuffix(obj.submission_date) : ''}
|
||||||
</Label>
|
</Label>
|
||||||
,
|
,
|
||||||
action:
|
// action:
|
||||||
<TableMoreMenu actions={
|
// <TableMoreMenu actions={
|
||||||
<>
|
// <>
|
||||||
<MenuItem onClick={() => navigate ('/claim/detail/'+obj.claim_request_id)}>
|
// <MenuItem onClick={() => navigate ('/claim/detail/'+obj.claim_request_id)}>
|
||||||
<Iconify icon="eva:eye-fill" />
|
// <Iconify icon="eva:eye-fill" />
|
||||||
View
|
// View
|
||||||
</MenuItem>
|
// </MenuItem>
|
||||||
</>
|
// </>
|
||||||
} />
|
// } />
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ export default function TableList() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// handle start date
|
// handle start date
|
||||||
const [startDateValue, setStartDateValue] = useState('');
|
const [startDateValue, setStartDateValue] = useState(null);
|
||||||
|
|
||||||
const handleStartDateChanges = async (event: React.FormEvent<HTMLFormElement>) => {
|
const handleStartDateChanges = async (event: React.FormEvent<HTMLFormElement>) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -263,7 +263,7 @@ export default function TableList() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// handle end date
|
// handle end date
|
||||||
const [endDateValue, setEndDateValue] = useState('');
|
const [endDateValue, setEndDateValue] = useState(null);
|
||||||
|
|
||||||
const handleEndDateChanges = async (event: React.FormEvent<HTMLFormElement>) => {
|
const handleEndDateChanges = async (event: React.FormEvent<HTMLFormElement>) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -494,8 +494,8 @@ export default function TableList() {
|
|||||||
searchs={searchs}
|
searchs={searchs}
|
||||||
filterStatus={filterStatus}
|
filterStatus={filterStatus}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
// filterStartDate={filterStartDate}
|
//filterStartDate={filterStartDate}
|
||||||
// filterEndDate={filterEndDate}
|
//filterEndDate={filterEndDate}
|
||||||
/>
|
/>
|
||||||
<MuiDialog
|
<MuiDialog
|
||||||
title={{name: nameMember}}
|
title={{name: nameMember}}
|
||||||
|
|||||||
BIN
public/files/Template - Claim - Management.xlsx
Normal file
BIN
public/files/Template - Claim - Management.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user