feat: console Phase 2 final - live cancel and customer endpoints
- cancelOrder/cancelDeliveryAPI: real POST /admin/bookings/:id/cancel - getallcustomers/getcustomersummary: real /admin/customers, aliasing appcustomerid -> userid for existing call sites - BookingDetail: confirmed field names from live backend, cancel button now hits the live endpoint - customers.js: table columns show Name/Phone/Email/Total Bookings/Joined using appcustomerid/name/phone/email/totalbookings/createdat Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,9 +75,9 @@ const BookingDetail = () => {
|
||||
enabled: Boolean(id)
|
||||
});
|
||||
|
||||
// Response shape is unconfirmed beyond what /admin/bookings' list rows
|
||||
// return — reads defensively off `data.data` first, falling back to the
|
||||
// top-level response, same pattern used for the login response mismatch.
|
||||
// Confirmed shape (booking id 5): bookingid, bookingreference, status,
|
||||
// pickupaddress, deliveryaddress, assignedmileruserid, createdat,
|
||||
// bookingparcels (nested parcels), serviceoptions, payments.
|
||||
const booking = data?.data || data || {};
|
||||
|
||||
const reassignMutation = useMutation({
|
||||
|
||||
Reference in New Issue
Block a user