Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -15,9 +15,12 @@ import {
|
|||||||
Stack,
|
Stack,
|
||||||
Menu,
|
Menu,
|
||||||
ButtonGroup,
|
ButtonGroup,
|
||||||
|
FormControl,
|
||||||
|
Select,
|
||||||
Link,
|
Link,
|
||||||
Chip,
|
Chip,
|
||||||
TableHead,
|
TableHead,
|
||||||
|
InputLabel,
|
||||||
Grid,
|
Grid,
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
||||||
@@ -61,6 +64,13 @@ export default function List() {
|
|||||||
|
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
|
const fileOptions = {
|
||||||
|
kondisi: 'Dokumen Billing',
|
||||||
|
diagnosa: 'Dokumen Diagnosa',
|
||||||
|
result: 'Dokumen Penduk Medis',
|
||||||
|
none: 'Belum ada Dokumen'
|
||||||
|
};
|
||||||
|
|
||||||
function SearchInput(props: any) {
|
function SearchInput(props: any) {
|
||||||
// SEARCH
|
// SEARCH
|
||||||
const searchInput = useRef<HTMLInputElement>(null);
|
const searchInput = useRef<HTMLInputElement>(null);
|
||||||
@@ -199,15 +209,48 @@ export default function List() {
|
|||||||
/>
|
/>
|
||||||
{!currentImportFileName && (
|
{!currentImportFileName && (
|
||||||
<Stack direction={'row'} spacing={2} sx={{ p: 2 }}>
|
<Stack direction={'row'} spacing={2} sx={{ p: 2 }}>
|
||||||
<SearchInput onSearch={applyFilter} />
|
<Grid item md={9}>
|
||||||
<Button
|
<SearchInput onSearch={applyFilter} />
|
||||||
variant="outlined"
|
</Grid>
|
||||||
startIcon={<UploadIcon />}
|
<Grid item md={2}>
|
||||||
sx={{ p: 1.8 }}
|
<FormControl fullWidth>
|
||||||
onClick={handleClick}
|
<InputLabel>File</InputLabel>
|
||||||
>
|
<Select
|
||||||
Import
|
value={searchParams.get('file') ?? 'semua'} // Pastikan menggunakan kunci 'file'
|
||||||
</Button>
|
label="File"
|
||||||
|
onChange={(el) => {
|
||||||
|
const selectedValue = el.target.value;
|
||||||
|
const filter = Object.fromEntries(searchParams.entries());
|
||||||
|
|
||||||
|
if (selectedValue === 'semua') {
|
||||||
|
delete filter.file; // Menghapus filter 'file' jika memilih 'semua'
|
||||||
|
} else {
|
||||||
|
filter.file = selectedValue; // Menambahkan atau memperbarui filter 'file'
|
||||||
|
}
|
||||||
|
|
||||||
|
setSearchParams(filter); // Update state searchParams
|
||||||
|
loadDataTableData(filter); // Memuat data sesuai filter
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MenuItem value={'semua'}>Semua</MenuItem>
|
||||||
|
{Object.entries(fileOptions).map((option, index) => (
|
||||||
|
<MenuItem value={option[0]} key={index}>
|
||||||
|
{option[1]}
|
||||||
|
</MenuItem>
|
||||||
|
))}
|
||||||
|
</Select>
|
||||||
|
</FormControl>
|
||||||
|
</Grid>
|
||||||
|
<Grid item md={1}>
|
||||||
|
<Button
|
||||||
|
variant="outlined"
|
||||||
|
startIcon={<UploadIcon />}
|
||||||
|
sx={{ p: 1.8 }}
|
||||||
|
onClick={handleClick}
|
||||||
|
>
|
||||||
|
Import
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
<Menu
|
<Menu
|
||||||
id="import-button"
|
id="import-button"
|
||||||
anchorEl={anchorEl}
|
anchorEl={anchorEl}
|
||||||
@@ -353,6 +396,31 @@ export default function List() {
|
|||||||
<TableCell align="left"><Label>{fDateTimesecond(row.admission_date)}</Label></TableCell>
|
<TableCell align="left"><Label>{fDateTimesecond(row.admission_date)}</Label></TableCell>
|
||||||
<TableCell align="left">{row.service_name}</TableCell>
|
<TableCell align="left">{row.service_name}</TableCell>
|
||||||
<TableCell align="left">{row.payment_type_name}</TableCell>
|
<TableCell align="left">{row.payment_type_name}</TableCell>
|
||||||
|
<TableCell align="left">
|
||||||
|
{row.files_by_type?.final_log_diagnosis?.length > 0 && (
|
||||||
|
<>
|
||||||
|
<Label variant='ghost' color='primary'>
|
||||||
|
{row.files_by_type.final_log_diagnosis.length} File Diagnosa
|
||||||
|
</Label>
|
||||||
|
<br />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{row.files_by_type?.final_log_kondisi?.length > 0 && (
|
||||||
|
<>
|
||||||
|
<Label variant='ghost' color='success'>
|
||||||
|
{row.files_by_type.final_log_kondisi.length} File Billing
|
||||||
|
</Label>
|
||||||
|
<br />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{row.files_by_type?.final_log_result?.length > 0 && (
|
||||||
|
<Label variant='ghost' color='warning'>
|
||||||
|
{row.files_by_type.final_log_result.length} File Pendukung Medis
|
||||||
|
</Label>
|
||||||
|
)}
|
||||||
|
</TableCell>
|
||||||
<TableCell align="left">
|
<TableCell align="left">
|
||||||
{ row.status_final_log == "requested" ?
|
{ row.status_final_log == "requested" ?
|
||||||
(<Label variant='ghost' color='primary'>{capitalizeFirstLetter(row.status_final_log)}</Label>) :
|
(<Label variant='ghost' color='primary'>{capitalizeFirstLetter(row.status_final_log)}</Label>) :
|
||||||
@@ -500,6 +568,9 @@ export default function List() {
|
|||||||
<TableCell style={headStyle} align="left">
|
<TableCell style={headStyle} align="left">
|
||||||
Claim Method
|
Claim Method
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
<TableCell style={headStyle} align="left">
|
||||||
|
File Upload
|
||||||
|
</TableCell>
|
||||||
<TableCell style={headStyle} align="left">
|
<TableCell style={headStyle} align="left">
|
||||||
Status
|
Status
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
@@ -241,7 +241,6 @@ export default function List() {
|
|||||||
<Stack direction={'row'} spacing={2} sx={{ p: 2 }}>
|
<Stack direction={'row'} spacing={2} sx={{ p: 2 }}>
|
||||||
<Grid item md={9}>
|
<Grid item md={9}>
|
||||||
<SearchInput onSearch={applyFilter} />
|
<SearchInput onSearch={applyFilter} />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item md={2}>
|
<Grid item md={2}>
|
||||||
<FormControl fullWidth>
|
<FormControl fullWidth>
|
||||||
@@ -464,7 +463,7 @@ export default function List() {
|
|||||||
{row.files_by_type?.final_log_diagnosis?.length > 0 && (
|
{row.files_by_type?.final_log_diagnosis?.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<Label variant='ghost' color='primary'>
|
<Label variant='ghost' color='primary'>
|
||||||
File Diagnosa {row.files_by_type.final_log_diagnosis.length}
|
{row.files_by_type.final_log_diagnosis.length} File Diagnosa
|
||||||
</Label>
|
</Label>
|
||||||
<br />
|
<br />
|
||||||
</>
|
</>
|
||||||
@@ -473,7 +472,7 @@ export default function List() {
|
|||||||
{row.files_by_type?.final_log_kondisi?.length > 0 && (
|
{row.files_by_type?.final_log_kondisi?.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<Label variant='ghost' color='success'>
|
<Label variant='ghost' color='success'>
|
||||||
File Billing {row.files_by_type.final_log_kondisi.length}
|
{row.files_by_type.final_log_kondisi.length} File Billing
|
||||||
</Label>
|
</Label>
|
||||||
<br />
|
<br />
|
||||||
</>
|
</>
|
||||||
@@ -481,7 +480,7 @@ export default function List() {
|
|||||||
|
|
||||||
{row.files_by_type?.final_log_result?.length > 0 && (
|
{row.files_by_type?.final_log_result?.length > 0 && (
|
||||||
<Label variant='ghost' color='warning'>
|
<Label variant='ghost' color='warning'>
|
||||||
File Pendukung Medis {row.files_by_type.final_log_result.length}
|
{row.files_by_type.final_log_result.length} File Pendukung Medis
|
||||||
</Label>
|
</Label>
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
Reference in New Issue
Block a user