update import/export excel request log

This commit is contained in:
2023-11-29 16:22:00 +07:00
parent a208d5f11e
commit dc582244a5
8 changed files with 112 additions and 91 deletions

View File

@@ -348,9 +348,10 @@ export default function List() {
// handleShowClaim(row);
// }}
>
{row.code}
{row.id}
</Typography>
</TableCell>
<TableCell align="left">{row.member?.code}</TableCell>
<TableCell align="left">{row.member?.full_name}</TableCell>
<TableCell align="left"><Label>{fDateTimesecond(row.submission_date)}</Label></TableCell>
<TableCell align="left">{row.service_name}</TableCell>
@@ -470,6 +471,9 @@ export default function List() {
<TableHead>
<TableRow>
{/* <TableCell style={headStyle} align="left" /> */}
<TableCell style={headStyle} align="left">
ID Request LOG
</TableCell>
<TableCell style={headStyle} align="left">
Code
</TableCell>

View File

@@ -143,7 +143,7 @@ export default function List() {
setImportLoading(true);
axios
.post(`claim-requests/import`, formData)
.post(`customer-service/request/import`, formData)
.then((response) => {
handleCancelImportButton();
loadDataTableData();
@@ -177,7 +177,7 @@ export default function List() {
}
const handleGetData = (type :string) => {
axios.get(`corporates/${corporate_id}/data-plan-benefit`)
axios.get(`customer-service/request/data`)
.then((response) => {
const link = document.createElement('a');
link.href = response.data.data.file_url;
@@ -219,10 +219,10 @@ export default function List() {
}}
>
<MenuItem onClick={handleImportButton}>Import</MenuItem>
<MenuItem onClick={() => {handleGetTemplate('claim-request')}}>Download Template</MenuItem>
<MenuItem onClick={() => {handleGetData('data-plan-benefit')}}>Download Claim Request</MenuItem>
<MenuItem onClick={() => {handleGetTemplate('request-log')}}>Download Template</MenuItem>
<MenuItem onClick={() => {handleGetData('data-request-log')}}>Download Request LOG</MenuItem>
</Menu>
<Button
{/* <Button
variant="contained"
startIcon={<AddIcon />}
sx={{ p: 1.8 }}
@@ -231,7 +231,7 @@ export default function List() {
}}
>
Create
</Button>
</Button> */}
</Stack>
)}
@@ -351,9 +351,10 @@ export default function List() {
// handleShowClaim(row);
// }}
>
{row.code}
{row.id}
</Typography>
</TableCell>
<TableCell align="left">{row.code}</TableCell>
<TableCell align="left">{row.member?.full_name}</TableCell>
<TableCell align="left"><Label>{fDateTimesecond(row.submission_date)}</Label></TableCell>
<TableCell align="left">{row.service_name}</TableCell>
@@ -361,8 +362,11 @@ export default function List() {
<TableCell align="left">
{ row.status == "requested" ?
(<Label variant='ghost' color='primary'>{capitalizeFirstLetter(row.status)}</Label>) :
row.status == "declined" ?
(<Label color='error'> {capitalizeFirstLetter(row.status)}</Label>)
:
(<Label color='success'> {capitalizeFirstLetter(row.status)}</Label>)
}
}
</TableCell>
<TableCell align="right">
<TableMoreMenu actions={
@@ -478,6 +482,9 @@ export default function List() {
<TableHead>
<TableRow>
{/* <TableCell style={headStyle} align="left" /> */}
<TableCell style={headStyle} align="left">
ID Request LOG
</TableCell>
<TableCell style={headStyle} align="left">
Code
</TableCell>