mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 23:35:42 +00:00
fix
This commit is contained in:
@@ -771,9 +771,25 @@ const FirstMilePage = () => {
|
||||
meta: { headerClassName, cellClassName },
|
||||
cell: ({ row }) => {
|
||||
const hasDistance = row.original.exactKm != null && row.original.exactKm > 0;
|
||||
const isPaid = (row.original as any).paid;
|
||||
if (!hasDistance) {
|
||||
return <Text c="dimmed">—</Text>;
|
||||
}
|
||||
if (isPaid) {
|
||||
return (
|
||||
<Group gap="xs" wrap="nowrap">
|
||||
<UnstyledButton
|
||||
onClick={() => openInvoice(row.original)}
|
||||
c="blue"
|
||||
fw={500}
|
||||
style={{ textDecoration: "underline", cursor: "pointer" }}
|
||||
>
|
||||
#345
|
||||
</UnstyledButton>
|
||||
<Badge color="green" variant="light" size="sm">Paid</Badge>
|
||||
</Group>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<UnstyledButton
|
||||
onClick={() => openInvoice(row.original)}
|
||||
|
||||
@@ -751,9 +751,25 @@ const LastMilePage = () => {
|
||||
meta: { headerClassName, cellClassName },
|
||||
cell: ({ row }) => {
|
||||
const hasDistance = row.original.exactKm != null && row.original.exactKm > 0;
|
||||
const isPaid = (row.original as any).paid;
|
||||
if (!hasDistance) {
|
||||
return <Text c="dimmed">—</Text>;
|
||||
}
|
||||
if (isPaid) {
|
||||
return (
|
||||
<Group gap="xs" wrap="nowrap">
|
||||
<UnstyledButton
|
||||
onClick={() => openInvoice(row.original)}
|
||||
c="blue"
|
||||
fw={500}
|
||||
style={{ textDecoration: "underline", cursor: "pointer" }}
|
||||
>
|
||||
#345
|
||||
</UnstyledButton>
|
||||
<Badge color="green" variant="light" size="sm">Paid</Badge>
|
||||
</Group>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<UnstyledButton
|
||||
onClick={() => openInvoice(row.original)}
|
||||
|
||||
Reference in New Issue
Block a user