feat(warehouses): approve-delivery opens handover doc for review and signing

Customer reviews the generated handover before signing:
- add booking-scoped handover-document endpoint (portal only has bookingId)
- ApproveDeliveryModal renders the handover PDF, then applies the customer's
  saved signature on approve and returns the signed PDF
- ApproveDeliveryButton opens the modal instead of one-click silent signing

Handover generation + sign notification (in-app + SMS + email) and the
"Approve delivery" visibility on an awaiting-signature handover were committed
earlier; this wires the review-and-sign step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hagernesh
2026-07-08 13:15:39 +00:00
parent 3772db2c72
commit 246663641a
6 changed files with 232 additions and 69 deletions

View File

@@ -264,6 +264,13 @@ export const api = {
bookingsService.downloadHandoverDocument(inventoryId),
),
downloadBookingHandoverDocument: endpoint<{ bookingId: string }, Blob>(
"bookings",
"downloadBookingHandoverDocument",
({ bookingId }) =>
bookingsService.downloadBookingHandoverDocument(bookingId),
),
create: endpoint<
{ payload: CreateBookingPayload; documents?: BookingDocuments },
Freight.IBooking