overall commit
This commit is contained in:
@@ -49,6 +49,7 @@ import Loader from 'components/Loader';
|
||||
import TitleCard from '../titleCard';
|
||||
import { fetchRidersSummary } from '../api/api';
|
||||
import { useTheme } from '@mui/material/styles';
|
||||
import { getValueColor } from 'components/nearle_components/getValueColor';
|
||||
|
||||
// table filter
|
||||
function descendingComparator(a, b, orderBy) {
|
||||
@@ -222,14 +223,15 @@ export default function RidersSummary() {
|
||||
<TableRow>
|
||||
<TableCell># </TableCell>
|
||||
<TableCell> Rider</TableCell>
|
||||
<TableCell>Total </TableCell>
|
||||
{/* <TableCell> Pending</TableCell>
|
||||
<TableCell>Deliveries </TableCell>
|
||||
<TableCell> Pending</TableCell>
|
||||
<TableCell> Assigned</TableCell>
|
||||
<TableCell> Accepted</TableCell>
|
||||
<TableCell>Arrived </TableCell>
|
||||
<TableCell>Picked </TableCell>
|
||||
<TableCell>Active </TableCell>
|
||||
<TableCell>Skipped </TableCell> */}
|
||||
<TableCell>Skipped </TableCell>
|
||||
<TableCell>Cancelled </TableCell>
|
||||
<TableCell>Delivered </TableCell>
|
||||
<TableCell>kms </TableCell>
|
||||
<TableCell> COD/PLA</TableCell>
|
||||
@@ -263,40 +265,45 @@ export default function RidersSummary() {
|
||||
{index + 1}
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
<Stack direction="row" sx={{ ml: -2 }}>
|
||||
{row.firstname}
|
||||
{row.status == 'Active' ? (
|
||||
<TaskAltIcon fontSize="small" color="success" sx={{ ml: 1 }} />
|
||||
) : (
|
||||
<HighlightOffIcon fontSize="small" color="error" sx={{ ml: 1 }} />
|
||||
)}
|
||||
<Stack sx={{ ml: -2, wrap: 'nowrap' }}>
|
||||
<Typography>
|
||||
{row.firstname} {row.lastname}
|
||||
</Typography>
|
||||
<Typography variant="body2">Id : {row.userid}</Typography>
|
||||
</Stack>
|
||||
</TableCell>
|
||||
|
||||
<TableCell align="left">{row.totalorders}</TableCell>
|
||||
{/* <TableCell align="left">
|
||||
{row.pending ? <Chip color="primary" variant="light" label={row.pending} /> : row.pending}
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
{row.assigned ? <Chip color="primary" variant="light" label={row.assigned} /> : row.assigned}
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
{row.accepted ? <Chip color="primary" variant="light" label={row.accepted} /> : row.accepted}
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
{row.arrived ? <Chip color="primary" variant="light" label={row.arrived} /> : row.arrived}
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
{row.picked ? <Chip color="primary" variant="light" label={row.picked} /> : row.picked}
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
{row.active ? <Chip color="primary" variant="light" label={row.active} /> : row.active}
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
{row.skipped ? <Chip color="primary" variant="light" label={row.skipped} /> : row.skipped}
|
||||
</TableCell> */}
|
||||
<TableCell align="center" sx={{ color: getValueColor(row.totalorders) }}>
|
||||
{row.totalorders}
|
||||
</TableCell>
|
||||
<TableCell align="center">
|
||||
{row.pending ? <Chip color="primary" variant="light" label={row.pending} /> : row.pending}
|
||||
</TableCell>
|
||||
<TableCell align="center">
|
||||
{row.assigned ? <Chip color="primary" variant="light" label={row.assigned} /> : row.assigned}
|
||||
</TableCell>
|
||||
<TableCell align="center">
|
||||
{row.accepted ? <Chip color="primary" variant="light" label={row.accepted} /> : row.accepted}
|
||||
</TableCell>
|
||||
<TableCell align="center">
|
||||
{row.arrived ? <Chip color="primary" variant="light" label={row.arrived} /> : row.arrived}
|
||||
</TableCell>
|
||||
<TableCell align="center">
|
||||
{row.picked ? <Chip color="primary" variant="light" label={row.picked} /> : row.picked}
|
||||
</TableCell>
|
||||
<TableCell align="center">
|
||||
{row.active ? <Chip color="primary" variant="light" label={row.active} /> : row.active}
|
||||
</TableCell>
|
||||
<TableCell align="center">
|
||||
{row.skipped ? <Chip color="primary" variant="light" label={row.skipped} /> : row.skipped}
|
||||
</TableCell>
|
||||
<TableCell align="center">
|
||||
{row.cancelled ? <Chip color="primary" variant="light" label={row.cancelled} /> : row.cancelled}
|
||||
</TableCell>
|
||||
|
||||
<TableCell align="left">{row.delivered}</TableCell>
|
||||
<TableCell align="center" sx={{ color: getValueColor(row.totalorders) }}>
|
||||
{row.delivered}
|
||||
</TableCell>
|
||||
|
||||
<TableCell align="left">
|
||||
<Stack direction={'row'}>
|
||||
@@ -314,10 +321,10 @@ export default function RidersSummary() {
|
||||
}}
|
||||
/>
|
||||
</Tooltip> */}
|
||||
<Tooltip title="Actual kms" placement="bottom">
|
||||
<Tooltip title="Cumulative Kms" placement="top">
|
||||
<Chip
|
||||
size="small"
|
||||
label={row.actualkms}
|
||||
label={row.cumulativekms ? parseFloat(row.cumulativekms).toFixed(2) : 0}
|
||||
sx={{
|
||||
color: '#ff8f00',
|
||||
bgcolor: '#ffecb3',
|
||||
@@ -423,10 +430,10 @@ export default function RidersSummary() {
|
||||
<TableCell>#</TableCell>
|
||||
<TableCell>Location</TableCell>
|
||||
<TableCell align="left">All</TableCell>
|
||||
{/* <TableCell align="left">Pending</TableCell> */}
|
||||
<TableCell align="left">Pending</TableCell>
|
||||
<TableCell align="left">Completed</TableCell>
|
||||
{/* <TableCell align="left">Cancelled</TableCell> */}
|
||||
<TableCell align="left">Actual Kms</TableCell>
|
||||
<TableCell align="left">Cancelled</TableCell>
|
||||
<TableCell align="left"> Kms</TableCell>
|
||||
<TableCell align="left">COD / PLA</TableCell>
|
||||
<TableCell align="left">Amount</TableCell>
|
||||
</TableRow>
|
||||
@@ -446,14 +453,23 @@ export default function RidersSummary() {
|
||||
{index + 1}
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
<Stack direction="row" sx={{ ml: -2 }}>
|
||||
{row.locationname}
|
||||
<Stack sx={{ ml: -2 }}>
|
||||
<Typography> {row.locationname}</Typography>
|
||||
<Typography variant="body2"> Id: {row.locationid}</Typography>
|
||||
</Stack>
|
||||
</TableCell>
|
||||
<TableCell align="left">{row.totalorders}</TableCell>
|
||||
{/* <TableCell align="left">{row.deliveriespending}</TableCell> */}
|
||||
<TableCell align="left">{row.deliveriescompleted}</TableCell>
|
||||
{/* <TableCell align="left">{row.deliveriescancelled}</TableCell> */}
|
||||
<TableCell align="center" sx={{ color: getValueColor(row.totalorders) }}>
|
||||
{row.totalorders}
|
||||
</TableCell>
|
||||
<TableCell align="center" sx={{ color: getValueColor(row.deliveriespending) }}>
|
||||
{row.deliveriespending}
|
||||
</TableCell>
|
||||
<TableCell align="center" sx={{ color: getValueColor(row.deliveriescompleted) }}>
|
||||
{row.deliveriescompleted}
|
||||
</TableCell>
|
||||
<TableCell align="center" sx={{ color: getValueColor(row.deliveriescancelled) }}>
|
||||
{row.deliveriescancelled}
|
||||
</TableCell>
|
||||
<TableCell align="left">
|
||||
{/* <Chip
|
||||
size="small"
|
||||
@@ -466,16 +482,18 @@ export default function RidersSummary() {
|
||||
minWidth: 80
|
||||
}}
|
||||
/> */}
|
||||
<Chip
|
||||
size="small"
|
||||
label={row.actualkms}
|
||||
sx={{
|
||||
color: '#ff8f00',
|
||||
bgcolor: '#ffecb3',
|
||||
border: '1px solid #ff8f00',
|
||||
minWidth: 80
|
||||
}}
|
||||
/>
|
||||
<Tooltip title="Cumulative Kms" placement="top">
|
||||
<Chip
|
||||
size="small"
|
||||
label={row.cumulativekms ? parseFloat(row.cumulativekms).toFixed(2) : 0}
|
||||
sx={{
|
||||
color: '#ff8f00',
|
||||
bgcolor: '#ffecb3',
|
||||
border: '1px solid #ff8f00',
|
||||
minWidth: 80
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
</TableCell>
|
||||
|
||||
<TableCell align="left">
|
||||
|
||||
Reference in New Issue
Block a user