toga-ai 1.0.345 → 1.0.346
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -93,6 +93,32 @@ from the saved fulfillment; **Save UPDATES the existing records** instead of POS
|
|
|
93
93
|
- `CardTable` was made reusable for this: optional `editIcon` + `isEditButtonDisabled` props
|
|
94
94
|
(defaults preserve prior behavior; the shipments card is the only consumer today).
|
|
95
95
|
|
|
96
|
+
## Delete a saved shipment from the Edit form (2026-07)
|
|
97
|
+
|
|
98
|
+
The Edit Shipment form has a **"Delete Shipment"** button (bottom-left of the footer,
|
|
99
|
+
**edit mode only** — there is no saved shipment to delete in create mode). It deletes the
|
|
100
|
+
saved shipment and returns the user to the Select Items page
|
|
101
|
+
(`/shipment-items?internalId=...`). Flow: opens a `SupplyFormGuardrail` **confirm** first
|
|
102
|
+
(delete is irreversible), then shows a "Deleting shipment..." loading screen and toasts
|
|
103
|
+
success/failure.
|
|
104
|
+
|
|
105
|
+
- **Reuses the existing cascade delete** `deleteShipments(shipmentUuid,
|
|
106
|
+
itemFulfillmentPackageUuid?, trackingNumberUuid?)` from `Shipments/api/ShipmentsApi.ts` —
|
|
107
|
+
the **same** API the Pending Shipments trash icon uses. Cascade/delete order:
|
|
108
|
+
item-fulfillment-tracking-numbers (bridge) → tracking-numbers →
|
|
109
|
+
item-fulfillment-item-units → item-fulfillment-items → item-fulfillments.
|
|
110
|
+
- **⚠ Bridge-vs-trackingNumber uuid footgun (see gotcha).** To fully delete without
|
|
111
|
+
orphaning the tracking bridge row, the **tracking-number BRIDGE uuid**
|
|
112
|
+
(`editShipment.itemFulfillmentTrackingNumbers[0].uuid`, i.e. the
|
|
113
|
+
`ItemFulfillments_TrackingNumbers` record) must be passed as the
|
|
114
|
+
`itemFulfillmentPackageUuid` arg — this is **distinct** from the trackingNumber uuid
|
|
115
|
+
(`...[0].trackingNumber.uuid`). The edit form's `EditShipmentContext`
|
|
116
|
+
(`UpdateShipmentApi.ts`) was extended with `itemFulfillmentTrackingNumberUuid`, and
|
|
117
|
+
rehydrate now captures it alongside `itemFulfillmentUuid` / `trackingNumberUuid` /
|
|
118
|
+
`shipToAddressUuid` / `returnAddressUuid`.
|
|
119
|
+
- **Decision:** a confirmation dialog was added even though the Pending-card trash deletes
|
|
120
|
+
**without** one, because this is a large, explicit, destructive button.
|
|
121
|
+
|
|
96
122
|
## Update Info / Edit Shipment form (config-driven; Figma-alignment pass 2026-07)
|
|
97
123
|
|
|
98
124
|
The New Shipment / Edit Shipment form is **config-driven**: fields come from
|
|
@@ -303,6 +329,13 @@ the call 403s and returns no label.
|
|
|
303
329
|
rehydrate `signatureType` in `EditShipmentForm.tsx` to the option object `{uuid, name}` derived from
|
|
304
330
|
`trackingNumber.requiresSignature` (`true`→`{uuid:"Required",name:"Required"}`, `false`→Not Required,
|
|
305
331
|
`null`→None Specified). Reusable checklist for any NEW select field in these forms.
|
|
332
|
+
- **⚠ Bridge uuid vs trackingNumber uuid on delete — two different records.** `deleteShipments`'s
|
|
333
|
+
second arg `itemFulfillmentPackageUuid` is the **bridge** record uuid
|
|
334
|
+
(`itemFulfillmentTrackingNumbers[0].uuid` = the `ItemFulfillments_TrackingNumbers` join row), NOT
|
|
335
|
+
the tracking number's own uuid (`itemFulfillmentTrackingNumbers[0].trackingNumber.uuid`). Passing
|
|
336
|
+
the trackingNumber uuid there leaves the bridge join row orphaned. On the tracking-number-bridge
|
|
337
|
+
model these are always two distinct uuids — read the shape carefully before wiring any
|
|
338
|
+
create/update/delete against the bridge.
|
|
306
339
|
- **The `/shipments` list is PER-SALES-ORDER (open product decision, Eric to decide).**
|
|
307
340
|
`getShipments` filters by `SalesOrders.c_netsuiteInternalSalesOrderId = <internalId>`, so
|
|
308
341
|
`/shipments` with no `internalId` shows the empty state — the tool is a per-SO **punch-out**
|
|
@@ -373,6 +406,13 @@ not the base `_Model_Client_ItemFulfillment`. Tested with GroWrk; UPS support wa
|
|
|
373
406
|
for Compass and is not yet in prod.
|
|
374
407
|
|
|
375
408
|
## Change history
|
|
409
|
+
- 2026-07-15 — TRUE-79191: added a **"Delete Shipment"** button to the Edit Shipment form (edit-mode
|
|
410
|
+
only, footer bottom-left) — `SupplyFormGuardrail` confirm → "Deleting shipment..." screen → returns
|
|
411
|
+
to Select Items. Reuses the Pending-card cascade delete `deleteShipments` (`ShipmentsApi.ts`).
|
|
412
|
+
Documented the **bridge-vs-trackingNumber uuid** footgun: the bridge uuid
|
|
413
|
+
(`itemFulfillmentTrackingNumbers[0].uuid`, the `ItemFulfillments_TrackingNumbers` join row) must be
|
|
414
|
+
passed as `itemFulfillmentPackageUuid` or the bridge row orphans; `EditShipmentContext` gained
|
|
415
|
+
`itemFulfillmentTrackingNumberUuid` and rehydrate now captures it. (mhammontree)
|
|
376
416
|
- 2026-07-15 — TRUE-79191 (Figma-alignment polish pass): documented two durable items on the
|
|
377
417
|
config-driven form — (1) **Tailwind does not scan `viewModel/FIELDS/*.json`**, so a JSON-only utility
|
|
378
418
|
class is silently inert (`!w-fit` footgun; surgical `safelist` fix, recommended clean fix = add the
|
package/package.json
CHANGED