implemenation on the bot

This commit is contained in:
2026-08-19 17:08:45 +05:30
parent bdb21766f2
commit 37ca2352e2
52 changed files with 7074 additions and 3568 deletions

View File

@@ -58,9 +58,18 @@ export const STATUS_META = {
// "is this a known alias?" rather than silently falling back.
//
// The booking enums come from `GET /admin/bookings` (confirmed live — see
// orders.js). `converted_to_consignment` is deliberately `accepted` and not
// `picked`: it fires when the rider marks pickup COMPLETE, but the operator
// workflow on the Orders page treats everything before hand-off as assigned.
// orders.js). `converted_to_consignment` stays `accepted` HERE and only here:
// this registry renders the badge on the Orders page, whose operator workflow
// treats everything before hand-off as assigned.
//
// The DELIVERIES page classifies the same status as `picked`, in
// `mapBookingStatusToDeliveryStatus` (api.js) — deliberately, and the two are
// not in conflict. Deliveries tracks the rider's engagement, and
// doormile-flow.md §5 is explicit that `pickup-complete` is what converts a
// booking into a consignment, so on that page the parcel is in the rider's
// hands. Orders tracks the operator's action, where it is still just assigned.
// Same booking, two questions, two answers. Don't "fix" one to match the other
// without re-reading root CLAUDE.md on why the two taxonomies exist.
export const STATUS_ALIASES = {
pending_pickup: 'pending',
pending_assignment: 'pending',