toga-ai 1.0.401 → 1.0.402
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.
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
| Doc | Summary | Files |
|
|
4
4
|
|-----|---------|-------|
|
|
5
5
|
| [TOGa Supply (toga2-supply) Architecture](architecture.md) | `toga2-supply` is the **React + Vite frontend** for TOGa Supply — warehouse fulfillment tooling (shipment selection, fulfill & ship against carrier APIs, NetSui | toga2-supply/src/api/toga.ts, toga2-supply/src/pages/ShipmentItems/view/ShipmentItemsPage.tsx, toga2-supply/src/pages/EditShipment/view/EditShipmentPage.tsx, toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts, toga2-supply/src/pages/Shipments/view/components/ShipmentsCardTableForm/ShipmentsCardTableForm.tsx |
|
|
6
|
-
| [Fulfill & Ship](features/fulfill-and-ship.md) | Fulfill & Ship lets a warehouse user select sales-order line items, enter serials, pick a carrier/method, and in one action: create the Item Fulfillment records | toga2-supply/src/components/ui/Tables/BasicTable/BasicTable.tsx, toga2-supply/src/pages/ShipmentItems/view/forms/ShipmentItemsTable.tsx, toga2-supply/src/pages/ShipmentItems/api/ShipmentItemsApi.ts, toga2-supply/src/pages/ShipmentItems/types.ts, toga2-supply/src/pages/EditShipment/viewModel/FIELDS/RETURNLABELFIELDS.json, toga2-supply/src/pages/EditShipment/view/components/forms/EditShipmentForm.tsx, toga2-supply/src/components/ui/BaseInput/UnitSelect.tsx, toga2-supply/src/pages/EditShipment/view/modals/SerialNumbersModal.tsx, toga2-supply/src/pages/ShipmentItems/view/ShipmentItemsPage.tsx, toga2-supply/src/pages/EditShipment/view/EditShipmentPage.tsx, toga2-supply/src/pages/EditShipment/view/components/forms/EditShipmentForm.tsx, toga2-supply/src/pages/EditShipment/view/components/SelectedShipmentItemsTable.tsx, toga2-supply/src/pages/EditShipment/view/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx, toga2-supply/src/pages/EditShipment/viewModel/FIELDS/DUMMYUPDATESHIPMENTFIELDS.json, toga2-supply/src/pages/EditShipment/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx, toga2-supply/tailwind.config.cjs, toga2-supply/src/pages/EditShipment/view/modals/ReturnShippingModal.tsx, toga2-supply/src/styles/index.scss, toga2-supply/src/components/ui/BaseInput/BaseInput.tsx, toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts, toga2-supply/src/pages/EditShipment/viewModel/signatureTypes.ts, toga2-supply/src/pages/EditShipment/view/modals/SelectReturnAddressModal.tsx, toga2-supply/src/pages/EditShipment/helpers/ShipmentDetailsForm/formatShipmentData.ts, toga2-supply/src/pages/EditShipment/types.ts, toga2-supply/src/pages/Shipments/view/ShipmentsPage.tsx, toga2-supply/src/pages/Shipments/view/components/ShipmentsCardTableForm/ShipmentsCardTableForm.tsx, toga2-supply/src/pages/Shipments/api/ShipmentsApi.ts, toga2-supply/src/pages/Shipments/types.ts, toga2-supply/src/pages/FulfilledShipments/view/FulfilledShipmentsPage.tsx, toga2-supply/src/components/ui/CardTable/CardTable.tsx, toga2-supply/src/components/ui/CardTable/types.ts, toga2-supply/src/assets/pen-line.svg, _underscore/Model/Client/ItemFulfillment.php, _underscore/Trait/Netsuite/ItemFulfillment.php, _underscore/Component/Library/Carriers/Ups/Ups.php |
|
|
6
|
+
| [Fulfill & Ship](features/fulfill-and-ship.md) | Fulfill & Ship lets a warehouse user select sales-order line items, enter serials, pick a carrier/method, and in one action: create the Item Fulfillment records | toga2-supply/src/components/ui/Tables/BasicTable/BasicTable.tsx, toga2-supply/src/components/ui/Tables/types.ts, toga2-supply/src/components/ui/GoogleMapsLink.tsx, toga2-supply/src/pages/ShipmentItems/view/forms/ShipmentItemsTable.tsx, toga2-supply/src/pages/ShipmentItems/api/ShipmentItemsApi.ts, toga2-supply/src/pages/ShipmentItems/types.ts, toga2-supply/src/pages/EditShipment/viewModel/FIELDS/RETURNLABELFIELDS.json, toga2-supply/src/pages/EditShipment/view/components/forms/EditShipmentForm.tsx, toga2-supply/src/components/ui/BaseInput/UnitSelect.tsx, toga2-supply/src/pages/EditShipment/view/modals/SerialNumbersModal.tsx, toga2-supply/src/pages/ShipmentItems/view/ShipmentItemsPage.tsx, toga2-supply/src/pages/EditShipment/view/EditShipmentPage.tsx, toga2-supply/src/pages/EditShipment/view/components/forms/EditShipmentForm.tsx, toga2-supply/src/pages/EditShipment/view/components/SelectedShipmentItemsTable.tsx, toga2-supply/src/pages/EditShipment/view/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx, toga2-supply/src/pages/EditShipment/viewModel/FIELDS/DUMMYUPDATESHIPMENTFIELDS.json, toga2-supply/src/pages/EditShipment/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx, toga2-supply/tailwind.config.cjs, toga2-supply/src/pages/EditShipment/view/modals/ReturnShippingModal.tsx, toga2-supply/src/styles/index.scss, toga2-supply/src/components/ui/BaseInput/BaseInput.tsx, toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts, toga2-supply/src/pages/EditShipment/viewModel/signatureTypes.ts, toga2-supply/src/pages/EditShipment/view/modals/SelectReturnAddressModal.tsx, toga2-supply/src/pages/EditShipment/helpers/ShipmentDetailsForm/formatShipmentData.ts, toga2-supply/src/pages/EditShipment/types.ts, toga2-supply/src/pages/Shipments/view/ShipmentsPage.tsx, toga2-supply/src/pages/Shipments/view/components/ShipmentsCardTableForm/ShipmentsCardTableForm.tsx, toga2-supply/src/pages/Shipments/api/ShipmentsApi.ts, toga2-supply/src/pages/Shipments/types.ts, toga2-supply/src/pages/FulfilledShipments/view/FulfilledShipmentsPage.tsx, toga2-supply/src/components/ui/CardTable/CardTable.tsx, toga2-supply/src/components/ui/CardTable/types.ts, toga2-supply/src/assets/pen-line.svg, _underscore/Model/Client/ItemFulfillment.php, _underscore/Trait/Netsuite/ItemFulfillment.php, _underscore/Component/Library/Carriers/Ups/Ups.php |
|
|
7
7
|
| [AWS Amplify Build & Deploy (non-prod environments)](workflows/amplify-build-and-deploy.md) | How `toga2-supply` (React + Vite) builds and deploys on **AWS Amplify**. | toga2-supply/amplify.yml, toga2-supply/.gitattributes, toga2-supply/.github/workflows/sync-stage-environments.yml, toga2-supply/.env.qc-security |
|
|
@@ -10,6 +10,8 @@ updated: 2026-07-21
|
|
|
10
10
|
owners: [mhammontree]
|
|
11
11
|
files:
|
|
12
12
|
- toga2-supply/src/components/ui/Tables/BasicTable/BasicTable.tsx
|
|
13
|
+
- toga2-supply/src/components/ui/Tables/types.ts
|
|
14
|
+
- toga2-supply/src/components/ui/GoogleMapsLink.tsx
|
|
13
15
|
- toga2-supply/src/pages/ShipmentItems/view/forms/ShipmentItemsTable.tsx
|
|
14
16
|
- toga2-supply/src/pages/ShipmentItems/api/ShipmentItemsApi.ts
|
|
15
17
|
- toga2-supply/src/pages/ShipmentItems/types.ts
|
|
@@ -242,6 +244,17 @@ A field changed from its saved value shows a **mint-600 (`#2CB224`) border**; it
|
|
|
242
244
|
for a user-meaningful prefill (e.g. the warehouse-address prefill) must pass `{ shouldDirty: true }`
|
|
243
245
|
or RHF reports the field clean and the border never appears (see the RHF `isDirty` gotcha below).
|
|
244
246
|
|
|
247
|
+
### BasicTable click-to-select rows — `onRowClick` (2026-07-21)
|
|
248
|
+
|
|
249
|
+
`BasicTable` now accepts an optional **`onRowClick?: (row) => void`** (`components/ui/Tables/types.ts`,
|
|
250
|
+
`components/ui/Tables/BasicTable/BasicTable.tsx`) — a reusable click-to-select-row pattern for any
|
|
251
|
+
`BasicTable`. **The handler IGNORES clicks whose target is inside an interactive element**
|
|
252
|
+
(`input,button,a,select,textarea,label`), so checkboxes / inputs / buttons keep their own behavior; a
|
|
253
|
+
click anywhere ELSE on the row fires `onRowClick`. First consumer: Select Items
|
|
254
|
+
(`ShipmentItemsTable.tsx`) — clicking a row toggles its checkbox. Requirements for that use: rows must
|
|
255
|
+
carry a **`uuid`** and **disabled rows are skipped**. Reuse this for any `BasicTable` that wants
|
|
256
|
+
row-level selection rather than only the checkbox hit area.
|
|
257
|
+
|
|
245
258
|
## Signature Type — 4-level enum (2026-07)
|
|
246
259
|
|
|
247
260
|
Signature moved from a **boolean `requiresSignature`** to a **4-level `signatureType` enum**:
|
|
@@ -289,6 +302,27 @@ existing IF), `fulfillShipment` + `generateReturnLabel` (label), `saveShipmentTo
|
|
|
289
302
|
(push-back). New pieces needed: the punch-out entry carrying an IF id, and a **label-only mode**
|
|
290
303
|
(skip the create step). This is a separate feature/ticket — recorded as planned direction, not done.
|
|
291
304
|
|
|
305
|
+
## Planned direction — persist package dimension + volume Units of Measure (design, 2026-07-21)
|
|
306
|
+
|
|
307
|
+
**Design decision recorded for future work (not implemented this session).** Today the package
|
|
308
|
+
dimension in./cm selector is **visual-only** and `TrackingNumbers` stores `length`/`width`/`height`
|
|
309
|
+
with **no unit**. The plan is to persist the package **DIMENSION** unit (for L/W/H) and the **VOLUME**
|
|
310
|
+
unit on the tracking record.
|
|
311
|
+
|
|
312
|
+
- **Recommended design = ZERO new tables, only columns.** REUSE the existing client **`Measures`**
|
|
313
|
+
table + **`_Model_Client_Measure`** model (already referenced by `Items.defaultMeasureId`): add a
|
|
314
|
+
**`measureType` ENUM** (LENGTH / VOLUME / WEIGHT / COUNT — per Jeff the types are enumerators, so
|
|
315
|
+
**no separate `MeasureTypes` table**) plus a **`conversionFactorToBase`** column, and add
|
|
316
|
+
**`dimensionMeasureId` / `volumeMeasureId`** FK columns on **`TrackingNumbers`**.
|
|
317
|
+
- **Carrier constraint drives the conversion factor.** FedEx/UPS ship APIs accept only **IN/CM**
|
|
318
|
+
dimension units and **LB/KG** weight units, so the chosen measure must map/convert to the carrier
|
|
319
|
+
enum — hence `conversionFactorToBase`. **Volume is NOT sent to carriers** (dimensional weight is
|
|
320
|
+
derived from L/W/H).
|
|
321
|
+
- **Alternative (documented for opt-in):** two dedicated new tables instead of reusing `Measures`.
|
|
322
|
+
- Spans `_underscore` (Measure/TrackingNumber models), `dbchanges2`, and `api2`; full plan + the
|
|
323
|
+
deployment order live in external working files (`package_units_of_measure_plan.md`,
|
|
324
|
+
`TRUE-79191_deployment_order.md`) — not mirrored into the KB.
|
|
325
|
+
|
|
292
326
|
## Sources — meeting notes / decision origins
|
|
293
327
|
|
|
294
328
|
Fulfill & Ship meeting transcripts and notes live in the **Internal Knowledgebase MCP connector**
|
|
@@ -312,6 +346,25 @@ the call 403s and returns no label.
|
|
|
312
346
|
|
|
313
347
|
## Gotchas / known issues
|
|
314
348
|
|
|
349
|
+
- **⚠ The shared `GoogleMapsLink` mapped the RECIPIENT, not the address.** The shared
|
|
350
|
+
`components/ui/GoogleMapsLink.tsx` built its query from `[addressee, line1, line2, city, zip]`,
|
|
351
|
+
which had two bugs: (a) it included the **`addressee` (recipient name)**, so Google surfaced the
|
|
352
|
+
*person* instead of the location; (b) it read **`line1`** but the shipment address object exposes
|
|
353
|
+
the street as **`street`** (not `line1`), so the street was missing. Fix: map the **physical address
|
|
354
|
+
ONLY** — `street || line1`, line2, city, `state.name`, zip; **exclude the addressee**. Two more
|
|
355
|
+
bugs fixed in the same component: an **always-true empty-part filter** (`!= null || != undefined` —
|
|
356
|
+
a value is always either not-null or not-undefined, so nothing was ever filtered), and a
|
|
357
|
+
**double-encoding bug** — it did `replace(/\s+/g,"+")` and *then* `encodeURIComponent`, so the `+`
|
|
358
|
+
was itself encoded to literal `%2B` and Maps got broken queries. Encode once. Separately, the Edit
|
|
359
|
+
Return Label modal's "Google Maps" link (`ReturnShippingModal.tsx`) had **no `onClick` handler at
|
|
360
|
+
all** — wired it to open the current return address.
|
|
361
|
+
- **⚠ A viewport-relative `max-w-[NNvw]` truncation cap can itself force horizontal overflow on a WIDE
|
|
362
|
+
table.** The CSS-truncation pattern (`truncate max-w-[NNvw]` + native `title` — see the
|
|
363
|
+
`ExpandableCellContent` gotcha below) caps one column at `NN%` of the viewport, but on a
|
|
364
|
+
**many-column** table that capped column PLUS all the other columns can exceed the viewport width and
|
|
365
|
+
add a horizontal scrollbar. **Tune the `vw` per table by column count:** Select Items (13 columns)
|
|
366
|
+
uses `max-w-[20vw]`; Update Info (8 columns) keeps `max-w-[30vw]`. The truncation mechanism itself is
|
|
367
|
+
unchanged. (`ShipmentItemsTable.tsx`.)
|
|
315
368
|
- **⚠ The item-image tables hardcoded the placeholder and never requested the image.** The Select
|
|
316
369
|
Items (`ShipmentItemsTable`), Update Info, and Add-Serial (`SelectedShipmentItemsTable`) tables
|
|
317
370
|
rendered `imageUrl={placeholderImage}` as a **constant**, so a real item image could never appear.
|
|
@@ -618,6 +671,17 @@ not the base `_Model_Client_ItemFulfillment`. Tested with GroWrk; UPS support wa
|
|
|
618
671
|
for Compass and is not yet in prod.
|
|
619
672
|
|
|
620
673
|
## Change history
|
|
674
|
+
- 2026-07-21 — TRUE-79191 (commit `651e9d9d0`, toga2-supply UI fixes + UoM design): fixed the shared
|
|
675
|
+
**`GoogleMapsLink`** mapping the recipient instead of the address (excluded `addressee`; read
|
|
676
|
+
`street || line1` not `line1`; killed an always-true empty-part filter and a `replace`+`encodeURIComponent`
|
|
677
|
+
**double-encoding** bug) and wired the Edit Return Label modal's previously dead "Google Maps" link.
|
|
678
|
+
Added **`BasicTable.onRowClick`** — a reusable click-to-select-row capability that ignores clicks on
|
|
679
|
+
interactive children (`input,button,a,select,textarea,label`); first used on Select Items to toggle a
|
|
680
|
+
row's checkbox. Documented the **`max-w-[NNvw]` truncation-cap causing horizontal overflow** on wide
|
|
681
|
+
tables (tune the vw per column count: 13-col Select Items `20vw`, 8-col Update Info `30vw`). Recorded
|
|
682
|
+
the **package Units-of-Measure design** (persist dimension + volume units on `TrackingNumbers` by
|
|
683
|
+
reusing the `Measures` table + `measureType` enum + `conversionFactorToBase`; zero new tables;
|
|
684
|
+
carriers accept only IN/CM + LB/KG) as a planned direction — implementation not started. (mhammontree)
|
|
621
685
|
- 2026-07-21 — TRUE-79191 (commit `dc900ea4e`, toga2-supply item-image + table polish): fixed the
|
|
622
686
|
**item image never rendering** — the Select Items / Update Info / Add-Serial tables hardcoded
|
|
623
687
|
`imageUrl={placeholderImage}` and never requested the image; now request the two `_underscore` Item
|
package/package.json
CHANGED