This commit is contained in:
JOSEPH LE 2024-08-08 13:36:34 +07:00
commit 830b2748d2
1 changed files with 15 additions and 2 deletions

View File

@ -8,6 +8,7 @@ import { DataTablePagination } from '@/components/DataTable/DataTable'
import { Xdelete, create } from '@/rtk/helpers/CRUD'
import { get } from '@/rtk/helpers/apiService'
import {
Badge,
Box,
Button,
Dialog,
@ -179,13 +180,25 @@ const Tickets = () => {
name: 'status',
size: '8%',
header: 'Status',
render: (row: any) => {
switch (row.status) {
case 'WAITING':
return <Badge color="blue">Waiting</Badge>
case 'CONFIRMED':
return <Badge color="green">Confirmed</Badge>
case 'REFUSED':
return <Badge color="red">Refused</Badge>
default:
return null
}
},
},
{
name: '#',
size: '5%',
header: 'Action',
render: (row: any) => {
return (
return row.status === 'WAITING' ? (
<Box className={classes.optionIcon}>
<IconTrash
className={classes.deleteIcon}
@ -197,7 +210,7 @@ const Tickets = () => {
height={20}
/>
</Box>
)
) : null
},
},
]