Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -72,6 +72,23 @@ class RequestLogController extends Controller
|
||||
$q->orderBy($orderBy, $request->order);
|
||||
}
|
||||
})
|
||||
->when($request->file, function ($q, $search) {
|
||||
if ($search == 'kondisi') {
|
||||
$q->whereHas('files', function ($subQuery) {
|
||||
$subQuery->where('type', 'final-log-kondisi');
|
||||
});
|
||||
} elseif ($search == 'diagnosa') {
|
||||
$q->whereHas('files', function ($subQuery) {
|
||||
$subQuery->where('type', 'final-log-diagnosis');
|
||||
});
|
||||
} elseif ($search == 'result') {
|
||||
$q->whereHas('files', function ($subQuery) {
|
||||
$subQuery->where('type', 'final-log-result');
|
||||
});
|
||||
} elseif ($search == 'none') {
|
||||
$q->doesntHave('files');
|
||||
}
|
||||
})
|
||||
->when(empty($request->orderBy), function ($q) {
|
||||
$q->orderBy('submission_date', 'desc');
|
||||
})
|
||||
|
||||
@@ -123,7 +123,7 @@ export default function DialogUploadFileFinalLog({ id, openDialog, setOpenDialog
|
||||
{/* -------------------------------Upload Dokumen Kondisi------------------------------- */}
|
||||
<Stack sx={{ marginTop: 2 }}>
|
||||
<Typography variant="body1" sx={{fontWeight:'bold'}}>
|
||||
File Kondisi
|
||||
File Billing
|
||||
</Typography>
|
||||
{/* <Typography variant="body2">Hasil Lab, </Typography> */}
|
||||
<Stack
|
||||
@@ -240,7 +240,7 @@ export default function DialogUploadFileFinalLog({ id, openDialog, setOpenDialog
|
||||
{/* -------------------------------Upload Dokumen Hasil Penunjang------------------------------- */}
|
||||
<Stack sx={{ marginTop: 2 }}>
|
||||
<Typography variant="body1" sx={{fontWeight:'bold'}}>
|
||||
File Hasil Penunjang
|
||||
File Hasil Penunjang Medis
|
||||
</Typography>
|
||||
{/* <Typography variant="body2">Hasil Lab, </Typography> */}
|
||||
<Stack
|
||||
|
||||
@@ -16,9 +16,12 @@ import {
|
||||
Stack,
|
||||
Menu,
|
||||
ButtonGroup,
|
||||
FormControl,
|
||||
Select,
|
||||
Link,
|
||||
Chip,
|
||||
TableHead,
|
||||
InputLabel,
|
||||
Grid,
|
||||
} from '@mui/material';
|
||||
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
||||
@@ -64,6 +67,13 @@ export default function List() {
|
||||
|
||||
const navigate = useNavigate()
|
||||
|
||||
const fileOptions = {
|
||||
kondisi: 'Dokumen Billing',
|
||||
diagnosa: 'Dokumen Diagnosa',
|
||||
result: 'Dokumen Penduk Medis',
|
||||
none: 'Belum ada Dokumen'
|
||||
};
|
||||
|
||||
function SearchInput(props: any) {
|
||||
// SEARCH
|
||||
const searchInput = useRef<HTMLInputElement>(null);
|
||||
@@ -229,30 +239,64 @@ export default function List() {
|
||||
/>
|
||||
{!currentImportFileName && (
|
||||
<Stack direction={'row'} spacing={2} sx={{ p: 2 }}>
|
||||
<SearchInput onSearch={applyFilter} />
|
||||
<Button
|
||||
variant="outlined"
|
||||
startIcon={<UploadIcon />}
|
||||
sx={{ p: 1.8 }}
|
||||
onClick={handleClick}
|
||||
>
|
||||
Import
|
||||
</Button>
|
||||
<Menu
|
||||
id="import-button"
|
||||
anchorEl={anchorEl}
|
||||
open={createMenu}
|
||||
onClose={handleClose}
|
||||
MenuListProps={{
|
||||
'aria-labelledby': 'basic-button',
|
||||
}}
|
||||
<Grid item md={9}>
|
||||
<SearchInput onSearch={applyFilter} />
|
||||
|
||||
</Grid>
|
||||
<Grid item md={2}>
|
||||
<FormControl fullWidth>
|
||||
<InputLabel>File</InputLabel>
|
||||
<Select
|
||||
value={searchParams.get('file') ?? 'semua'} // Pastikan menggunakan kunci 'file'
|
||||
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}
|
||||
>
|
||||
<MenuItem onClick={() => {handleImportButton('claim')}}>Import</MenuItem>
|
||||
<MenuItem onClick={() => {handleGetTemplate('claim-request')}}>Download Template</MenuItem>
|
||||
<MenuItem onClick={() => {handleGetData('data-plan-benefit')}}>Download Claim Request</MenuItem>
|
||||
<MenuItem onClick={() => {handleImportButton('invoice')}}>Import Invoice</MenuItem>
|
||||
<MenuItem onClick={() => {handleGetTemplate('final-log-invoice')}}>Download Template Invoice</MenuItem>
|
||||
</Menu>
|
||||
Import
|
||||
</Button>
|
||||
<Menu
|
||||
id="import-button"
|
||||
anchorEl={anchorEl}
|
||||
open={createMenu}
|
||||
onClose={handleClose}
|
||||
MenuListProps={{
|
||||
'aria-labelledby': 'basic-button',
|
||||
}}
|
||||
>
|
||||
<MenuItem onClick={() => {handleImportButton('claim')}}>Import</MenuItem>
|
||||
<MenuItem onClick={() => {handleGetTemplate('claim-request')}}>Download Template</MenuItem>
|
||||
<MenuItem onClick={() => {handleGetData('data-plan-benefit')}}>Download Claim Request</MenuItem>
|
||||
<MenuItem onClick={() => {handleImportButton('invoice')}}>Import Invoice</MenuItem>
|
||||
<MenuItem onClick={() => {handleGetTemplate('final-log-invoice')}}>Download Template Invoice</MenuItem>
|
||||
</Menu>
|
||||
</Grid>
|
||||
{/* <Button
|
||||
variant="contained"
|
||||
startIcon={<AddIcon />}
|
||||
@@ -413,7 +457,36 @@ export default function List() {
|
||||
) : '-'}
|
||||
</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'>
|
||||
File Diagnosa {row.files_by_type.final_log_diagnosis.length}
|
||||
</Label>
|
||||
<br />
|
||||
</>
|
||||
)}
|
||||
|
||||
{row.files_by_type?.final_log_kondisi?.length > 0 && (
|
||||
<>
|
||||
<Label variant='ghost' color='success'>
|
||||
File Billing {row.files_by_type.final_log_kondisi.length}
|
||||
</Label>
|
||||
<br />
|
||||
</>
|
||||
)}
|
||||
|
||||
{row.files_by_type?.final_log_result?.length > 0 && (
|
||||
<Label variant='ghost' color='warning'>
|
||||
File Pendukung Medis {row.files_by_type.final_log_result.length}
|
||||
</Label>
|
||||
)}
|
||||
</TableCell>
|
||||
|
||||
|
||||
<TableCell align="left">
|
||||
{ row.status_final_log == "requested" ?
|
||||
(<Label variant='ghost' color='primary'>{capitalizeFirstLetter(row.status_final_log)}</Label>) :
|
||||
@@ -572,6 +645,12 @@ export default function List() {
|
||||
label: 'Claim Method',
|
||||
isSort: false,
|
||||
},
|
||||
{
|
||||
id: 'file',
|
||||
align: 'left',
|
||||
label: 'File Upload',
|
||||
isSort: true,
|
||||
},
|
||||
{
|
||||
id: 'status',
|
||||
align: 'left',
|
||||
|
||||
@@ -109,9 +109,9 @@ export type Benefit = {
|
||||
}
|
||||
|
||||
export type files_by_type = {
|
||||
claim_diagnosis : file[],
|
||||
claim_kondisi : file[],
|
||||
claim_result : file[],
|
||||
final_log_diagnosis : file[],
|
||||
final_log_kondisi : file[],
|
||||
final_log_result : file[],
|
||||
}
|
||||
|
||||
export type file = {
|
||||
|
||||
1
frontend/hospital-portal/public/image/ic_mail.svg
Normal file
1
frontend/hospital-portal/public/image/ic_mail.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g transform="translate(1.5 4)"><path d="m11.0988387 10.3846452c-.1981935.1238709-.4211613.1734193-.6193548.1734193-.1981936 0-.4211613-.0495484-.61935487-.1734193l-9.86012903-6.02012907v8.00206447c0 1.7094194 1.38735484 3.0967742 3.09677419 3.0967742h14.79019351c1.7094194 0 3.0967742-1.3873548 3.0967742-3.0967742v-8.00206447z"/><path d="m17.8869677.00425806h-14.79019351c-1.46167742 0-2.70038709 1.04051613-2.99767742 2.42787097l10.40516133 6.34219355 10.3803871-6.34219355c-.2972904-1.38735484-1.536-2.42787097-2.9976775-2.42787097z" opacity=".48"/></g></svg>
|
||||
|
After Width: | Height: | Size: 646 B |
@@ -242,7 +242,7 @@ function renderContent(notification: NotificationItemProps) {
|
||||
avatar: (
|
||||
<img
|
||||
alt={notification.title}
|
||||
src="https://minimal-assets-api.vercel.app/assets/icons/ic_notification_package.svg"
|
||||
src="/image/ic_mail.svg"
|
||||
/>
|
||||
),
|
||||
title,
|
||||
@@ -253,7 +253,7 @@ function renderContent(notification: NotificationItemProps) {
|
||||
avatar: (
|
||||
<img
|
||||
alt={notification.title}
|
||||
src="https://minimal-assets-api.vercel.app/assets/icons/ic_notification_shipping.svg"
|
||||
src="/image/ic_mail.svg"
|
||||
/>
|
||||
),
|
||||
title,
|
||||
@@ -264,7 +264,7 @@ function renderContent(notification: NotificationItemProps) {
|
||||
avatar: (
|
||||
<img
|
||||
alt={notification.title}
|
||||
src="/icons/ic_mail.svg"
|
||||
src="/image/ic_mail.svg"
|
||||
/>
|
||||
),
|
||||
title,
|
||||
@@ -275,7 +275,7 @@ function renderContent(notification: NotificationItemProps) {
|
||||
avatar: (
|
||||
<img
|
||||
alt={notification.title}
|
||||
src="https://minimal-assets-api.vercel.app/assets/icons/ic_notification_chat.svg"
|
||||
src="/image/ic_mail.svg"
|
||||
/>
|
||||
),
|
||||
title,
|
||||
|
||||
Reference in New Issue
Block a user