updates on the ui design and desing updates
This commit is contained in:
@@ -611,6 +611,20 @@ export const fetchDeliveries = async ({ pageParam = 1, queryKey }) => {
|
||||
deliverytype: customer ? 'B' : 'C',
|
||||
orderdate: b.createdat,
|
||||
deliverydate: b.serviceoptions?.[0]?.estimateddeliveryat || b.updatedat,
|
||||
// ⚠ NOT a real assignment time. The Doormile bookings feed has no
|
||||
// assignment timestamp (the true one lives on `bookingassignments`,
|
||||
// reachable only per-booking via GET /admin/bookings/:id/track), so this
|
||||
// is the booking's last-modified column. It moves every time ANYTHING
|
||||
// touches the row — status change, parcel scan, payment, pickup-complete.
|
||||
//
|
||||
// **Never bucket or group by this field.** Dispatch.js and deliveries.js
|
||||
// used to bucket their Morning/Afternoon/Evening batches on it, which
|
||||
// meant an order re-stamped during the evening silently jumped out of the
|
||||
// batch it was actually assigned to and into whichever window contained
|
||||
// the current clock time — the same orders appearing under Afternoon and
|
||||
// then Evening on the same day. Both now bucket on
|
||||
// `expecteddeliverytime`, which is stable. It remains fine to DISPLAY
|
||||
// this as a "last updated" stamp, which is all the reports use it for.
|
||||
assigntime: b.updatedat,
|
||||
orderstatus: mapBookingStatusToDeliveryStatus(b.status),
|
||||
droplat: b.deliverylatitude,
|
||||
|
||||
Reference in New Issue
Block a user