Skip to content

Commit e2cb6aa

Browse files
committed
add bugs
1 parent 1c8453c commit e2cb6aa

File tree

3 files changed

+20
-26
lines changed

3 files changed

+20
-26
lines changed

BUGS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# BUG-1
2+
3+
When a user tries to delete a vehicle in the vehicles list, it doesn't work. The vehicle stays there.
4+
5+
# BUG-2
6+
7+
In the trip details panel, you can reorder stops. It shouldn't be possible to put the delivery of a given order before the pickup, but here it's not preventing me from doing it.

frontend/src/components/trips/TripDetailsDrawer.tsx

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -393,36 +393,23 @@ export const TripDetailsDrawer: React.FC<TripDetailsDrawerProps> = ({
393393
>
394394
<GripVertical size={16} />
395395
</Box>
396-
<Box
397-
minW="24px"
398-
textAlign="center"
399-
fontWeight="bold"
400-
color="blue.600"
401-
fontSize="sm"
402-
>
403-
{index + 1}
404-
</Box>
405396
<Box flex="1">
406397
<Box fontWeight="medium">
407398
{ts.stop.name}
408399
</Box>
409400
<Box fontSize="sm" color="gray.600" mt={1}>
410-
Arrival: {ts.planned_arrival_time}
401+
Arrival: {ts.planned_arrival_time} /{' '}
402+
<Link
403+
as={RouterLink}
404+
to={`/orders/${ts.linked_order.id}`}
405+
color="blue.500"
406+
fontSize="sm"
407+
textDecoration="underline"
408+
mr={2}
409+
>
410+
{ts.linked_order.order_number}
411+
</Link>
411412
</Box>
412-
{ts.linked_order && (
413-
<Flex fontSize="sm" mt={1}>
414-
<Link
415-
as={RouterLink}
416-
to={`/orders/${ts.linked_order.id}`}
417-
color="blue.500"
418-
fontSize="sm"
419-
textDecoration="underline"
420-
mr={2}
421-
>
422-
{ts.linked_order.order_number}
423-
</Link>
424-
</Flex>
425-
)}
426413
</Box>
427414
<Badge
428415
colorScheme={

frontend/src/types/domain.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ export interface TripStop {
7777
actual_departure_datetime: string | null
7878
notes: string
7979
is_completed: boolean
80-
linked_order?: {
80+
linked_order: {
8181
id: number
8282
order_number: string
8383
customer_name: string
84-
} | null
84+
}
8585
}
8686

8787
export interface Trip {

0 commit comments

Comments
 (0)