updates on the validations on th action button in the substitution page
This commit is contained in:
@@ -1056,41 +1056,43 @@ const Riders = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align="right">
|
<TableCell align="right">
|
||||||
<Stack direction="row" spacing={0.75} justifyContent="flex-end">
|
{(row.status || '').toLowerCase() !== 'cancelled' && (
|
||||||
<Tooltip title="Update substitution" placement="top">
|
<Stack direction="row" spacing={0.75} justifyContent="flex-end">
|
||||||
<IconButton
|
<Tooltip title="Update substitution" placement="top">
|
||||||
size="small"
|
<IconButton
|
||||||
sx={{
|
size="small"
|
||||||
bgcolor: soft(BRAND),
|
sx={{
|
||||||
color: BRAND,
|
bgcolor: soft(BRAND),
|
||||||
border: `1px solid ${edge(BRAND)}`,
|
color: BRAND,
|
||||||
'&:hover': { bgcolor: BRAND, color: '#fff' }
|
border: `1px solid ${edge(BRAND)}`,
|
||||||
}}
|
'&:hover': { bgcolor: BRAND, color: '#fff' }
|
||||||
onClick={() => {
|
}}
|
||||||
setEditingSub(row);
|
onClick={() => {
|
||||||
setNewSubRider(null);
|
setEditingSub(row);
|
||||||
}}
|
setNewSubRider(null);
|
||||||
>
|
}}
|
||||||
<MdEdit size={14} />
|
>
|
||||||
</IconButton>
|
<MdEdit size={14} />
|
||||||
</Tooltip>
|
</IconButton>
|
||||||
<Tooltip title="Delete substitution" placement="top">
|
</Tooltip>
|
||||||
<IconButton
|
<Tooltip title="Delete substitution" placement="top">
|
||||||
size="small"
|
<IconButton
|
||||||
sx={{
|
size="small"
|
||||||
bgcolor: soft('#ef4444'),
|
sx={{
|
||||||
color: '#ef4444',
|
bgcolor: soft('#ef4444'),
|
||||||
border: `1px solid ${edge('#ef4444')}`,
|
color: '#ef4444',
|
||||||
'&:hover': { bgcolor: '#ef4444', color: '#fff' }
|
border: `1px solid ${edge('#ef4444')}`,
|
||||||
}}
|
'&:hover': { bgcolor: '#ef4444', color: '#fff' }
|
||||||
onClick={() => {
|
}}
|
||||||
handleDeleteSubstitution(row);
|
onClick={() => {
|
||||||
}}
|
handleDeleteSubstitution(row);
|
||||||
>
|
}}
|
||||||
<MdDelete size={14} />
|
>
|
||||||
</IconButton>
|
<MdDelete size={14} />
|
||||||
</Tooltip>
|
</IconButton>
|
||||||
</Stack>
|
</Tooltip>
|
||||||
|
</Stack>
|
||||||
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user