toga-ai 1.0.345 → 1.0.347
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,24 @@ 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
|
+
- **⚠ react-select `unstyled` still renders its DEFAULT DropdownIndicator glyph — you can't fix a
|
|
333
|
+
glyph mismatch with `classNames` alone.** Native `<select>` elements in these forms (the modal's
|
|
334
|
+
Addressee warehouse selector, the in./cm unit selector) render an FA `chevronDown`, but
|
|
335
|
+
`BaseInput`'s react-select renders react-select's own default caret SVG — a different shape/weight
|
|
336
|
+
(Figma's "dropdown - single select" uses `chevron-down` everywhere, so the react-select caret is
|
|
337
|
+
the outlier). `classNames.dropdownIndicator` only recolors/resizes the existing SVG; to change the
|
|
338
|
+
**glyph** you must override `components.DropdownIndicator`. Fix (2026-07-15): added a
|
|
339
|
+
`CompactDropdownIndicator` (FA `chevronDown`, `text-xs text-supply-blue-400`) to `BaseInput` and
|
|
340
|
+
wired it into both react-select `components={{}}` blocks **only when `compact` is true**
|
|
341
|
+
(`...(compact ? { DropdownIndicator: CompactDropdownIndicator } : {})`) — scoped to compact to
|
|
342
|
+
limit blast radius to the shipment forms/modal and leave non-compact selects on the default caret.
|
|
343
|
+
- **⚠ Bridge uuid vs trackingNumber uuid on delete — two different records.** `deleteShipments`'s
|
|
344
|
+
second arg `itemFulfillmentPackageUuid` is the **bridge** record uuid
|
|
345
|
+
(`itemFulfillmentTrackingNumbers[0].uuid` = the `ItemFulfillments_TrackingNumbers` join row), NOT
|
|
346
|
+
the tracking number's own uuid (`itemFulfillmentTrackingNumbers[0].trackingNumber.uuid`). Passing
|
|
347
|
+
the trackingNumber uuid there leaves the bridge join row orphaned. On the tracking-number-bridge
|
|
348
|
+
model these are always two distinct uuids — read the shape carefully before wiring any
|
|
349
|
+
create/update/delete against the bridge.
|
|
306
350
|
- **The `/shipments` list is PER-SALES-ORDER (open product decision, Eric to decide).**
|
|
307
351
|
`getShipments` filters by `SalesOrders.c_netsuiteInternalSalesOrderId = <internalId>`, so
|
|
308
352
|
`/shipments` with no `internalId` shows the empty state — the tool is a per-SO **punch-out**
|
|
@@ -373,6 +417,20 @@ not the base `_Model_Client_ItemFulfillment`. Tested with GroWrk; UPS support wa
|
|
|
373
417
|
for Compass and is not yet in prod.
|
|
374
418
|
|
|
375
419
|
## Change history
|
|
420
|
+
- 2026-07-15 — TRUE-79191: unified the **dropdown chevron glyph** across the compact selects — added a
|
|
421
|
+
`CompactDropdownIndicator` (FA `chevronDown`) to `BaseInput` and wired it into both react-select
|
|
422
|
+
`components` blocks **only when `compact` is true**, so the react-select caret matches the native
|
|
423
|
+
`<select>` chevrons per Figma. Documented the reusable gotcha: react-select `unstyled` still renders
|
|
424
|
+
its default DropdownIndicator, so a glyph mismatch needs a `components.DropdownIndicator` override,
|
|
425
|
+
not `classNames`. (Footer button-row spacing `mt-12`→`mt-5` and the "Edit Return Label" modal header
|
|
426
|
+
divider were cosmetic Figma polish — no doc change.) (mhammontree)
|
|
427
|
+
- 2026-07-15 — TRUE-79191: added a **"Delete Shipment"** button to the Edit Shipment form (edit-mode
|
|
428
|
+
only, footer bottom-left) — `SupplyFormGuardrail` confirm → "Deleting shipment..." screen → returns
|
|
429
|
+
to Select Items. Reuses the Pending-card cascade delete `deleteShipments` (`ShipmentsApi.ts`).
|
|
430
|
+
Documented the **bridge-vs-trackingNumber uuid** footgun: the bridge uuid
|
|
431
|
+
(`itemFulfillmentTrackingNumbers[0].uuid`, the `ItemFulfillments_TrackingNumbers` join row) must be
|
|
432
|
+
passed as `itemFulfillmentPackageUuid` or the bridge row orphans; `EditShipmentContext` gained
|
|
433
|
+
`itemFulfillmentTrackingNumberUuid` and rehydrate now captures it. (mhammontree)
|
|
376
434
|
- 2026-07-15 — TRUE-79191 (Figma-alignment polish pass): documented two durable items on the
|
|
377
435
|
config-driven form — (1) **Tailwind does not scan `viewModel/FIELDS/*.json`**, so a JSON-only utility
|
|
378
436
|
class is silently inert (`!w-fit` footgun; surgical `safelist` fix, recommended clean fix = add the
|
package/package.json
CHANGED