Merge pull request 'Tạo page ticket management' (#7) from truong-sprint-1 into master
Reviewed-on: #7
This commit is contained in:
commit
34a40282c3
|
|
@ -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
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue