toga-ai 1.0.341 → 1.0.342
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/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/view/modals/ReturnShippingModal.tsx, toga2-supply/src/components/ui/BaseInput/BaseInput.tsx, toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts, 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/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/components/ui/BaseInput/BaseInput.tsx, toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts, 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 |
|
|
@@ -6,7 +6,7 @@ project: TOGa Supply
|
|
|
6
6
|
client: shared
|
|
7
7
|
type: feature
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-07-
|
|
9
|
+
updated: 2026-07-15
|
|
10
10
|
owners: [mhammontree]
|
|
11
11
|
files:
|
|
12
12
|
- toga2-supply/src/pages/ShipmentItems/view/ShipmentItemsPage.tsx
|
|
@@ -15,6 +15,8 @@ files:
|
|
|
15
15
|
- toga2-supply/src/pages/EditShipment/view/components/SelectedShipmentItemsTable.tsx
|
|
16
16
|
- toga2-supply/src/pages/EditShipment/view/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx
|
|
17
17
|
- toga2-supply/src/pages/EditShipment/viewModel/FIELDS/DUMMYUPDATESHIPMENTFIELDS.json
|
|
18
|
+
- toga2-supply/src/pages/EditShipment/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx
|
|
19
|
+
- toga2-supply/tailwind.config.cjs
|
|
18
20
|
- toga2-supply/src/pages/EditShipment/view/modals/ReturnShippingModal.tsx
|
|
19
21
|
- toga2-supply/src/components/ui/BaseInput/BaseInput.tsx
|
|
20
22
|
- toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts
|
|
@@ -102,6 +104,19 @@ layout, labels, required-ness, or ordering, edit the **config JSON**, not the co
|
|
|
102
104
|
**Every react-select field's form value is the whole option OBJECT `{uuid, name}`, never a
|
|
103
105
|
bare string** — see the gotcha below before wiring a new select field.
|
|
104
106
|
|
|
107
|
+
- **Renderer extension points (how to add a non-BaseInput control).** `renderEditShipmentFormInput.tsx`
|
|
108
|
+
special-cases fields by boolean flags on the JSON field object (existing: `isClearAll`, `isReadOnly`;
|
|
109
|
+
added `isUnitSelector` = a native in./cm `<select>`, mirroring the Return Shipping modal — visual-only,
|
|
110
|
+
not persisted). **Reuse pattern for any custom control: add a flag to the JSON field + a branch in the
|
|
111
|
+
renderer** rather than forcing it through `BaseInput`. A per-section `sectionTitleContainerClasses` is
|
|
112
|
+
also read by `EditShipmentForm.tsx`'s shared section-title wrapper (default unchanged) so a section can
|
|
113
|
+
e.g. right-align its title (used to right-align the Item Count column's title + value to a shared edge).
|
|
114
|
+
- **⚠ A custom/non-data field MUST set `valueKey: ""`.** Before rendering, `EditShipmentForm.tsx` runs
|
|
115
|
+
**every** field through `getValueFromPath(data, field.valueKey)`, which does `valueKey.split(".")` with
|
|
116
|
+
**no guard** — a field with no `valueKey` **white-screens the whole form** (`Cannot read properties of
|
|
117
|
+
undefined (reading 'split')`). Set `valueKey: ""` (same convention Clear All / Address already use) for
|
|
118
|
+
any field not bound to data.
|
|
119
|
+
|
|
105
120
|
- **Create vs Edit are distinct entry points (decision — kept, not merged).** Select Items →
|
|
106
121
|
Next = create a **New Shipment**; the pending-shipments pencil = **edit** an existing draft.
|
|
107
122
|
They are deliberately NOT merged and there is no auto-load from Select Items, because a Sales
|
|
@@ -180,6 +195,19 @@ the call 403s and returns no label.
|
|
|
180
195
|
|
|
181
196
|
## Gotchas / known issues
|
|
182
197
|
|
|
198
|
+
- **⚠ Tailwind does NOT scan the field-config JSON — a class used ONLY in `viewModel/FIELDS/*.json`
|
|
199
|
+
is silently inert.** The config-driven forms author Tailwind utility classes inside the field JSON
|
|
200
|
+
(e.g. `DUMMYUPDATESHIPMENTFIELDS.json`), but `tailwind.config.cjs` `content` globs only scan
|
|
201
|
+
`./src/**/*.{js,ts,jsx,tsx}` (+ `index.html` + toga-blox dist) — **not `.json`**. So a class used
|
|
202
|
+
*only* in the JSON never has its CSS rule generated: it appears in the DOM `className` but does
|
|
203
|
+
nothing. Common classes (`gap-1`, `w-4`, `w-full`) happen to also appear in `.tsx` so they compile;
|
|
204
|
+
unusual JSON-only classes do not. *Concrete failure:* `!w-fit` (keep the "Needs a return label"
|
|
205
|
+
checkbox content-width so the Edit link stays beside it) was JSON-only → never generated → `w-full`
|
|
206
|
+
won → the checkbox stretched with the column and the Edit gap grew on wide screens (col1 is `w-56`
|
|
207
|
+
above 1893px, `w-150px` below), fine only when narrow. **Fix applied (surgical):** added
|
|
208
|
+
`safelist: ["!w-fit"]` to `tailwind.config.cjs`. **Recommended clean fix (NOT yet done):** add the
|
|
209
|
+
FIELDS JSON to the `content` globs (e.g. `"./src/**/FIELDS/*.json"`) and re-test all config-driven
|
|
210
|
+
forms, since any JSON-only class is otherwise inert.
|
|
183
211
|
- **UPS test endpoint** (`wwwcie.ups.com`, debug mode) returns a constant tracking
|
|
184
212
|
number `1ZXXXXXXXXXXXXXXXX` + SAMPLE labels. On 2nd+ test runs this collides with the
|
|
185
213
|
`TrackingNumbers.number` UNIQUE index (surfaces mislabeled as "Labelary API error")
|
|
@@ -345,6 +373,15 @@ not the base `_Model_Client_ItemFulfillment`. Tested with GroWrk; UPS support wa
|
|
|
345
373
|
for Compass and is not yet in prod.
|
|
346
374
|
|
|
347
375
|
## Change history
|
|
376
|
+
- 2026-07-15 — TRUE-79191 (Figma-alignment polish pass): documented two durable items on the
|
|
377
|
+
config-driven form — (1) **Tailwind does not scan `viewModel/FIELDS/*.json`**, so a JSON-only utility
|
|
378
|
+
class is silently inert (`!w-fit` footgun; surgical `safelist` fix, recommended clean fix = add the
|
|
379
|
+
JSON to `content` globs); (2) **renderer extension points** — the `isUnitSelector` custom-control
|
|
380
|
+
branch + the flag-in-JSON/branch-in-renderer pattern, per-section `sectionTitleContainerClasses`, and
|
|
381
|
+
the **`valueKey: ""` requirement** for any custom/non-data field (empty/absent `valueKey` white-screens
|
|
382
|
+
the form via `getValueFromPath`'s unguarded `.split`). Remaining Figma tweaks (Dimensions in./cm
|
|
383
|
+
dropdown + gaps, Item Count right-align, return-label row gaps, shipment-card indicator top gap) were
|
|
384
|
+
cosmetic — no doc change. (mhammontree)
|
|
348
385
|
- 2026-07-14 — TRUE-79191 (commit `724d17c1a`): fixed **Signature Type** not saving/rehydrating —
|
|
349
386
|
documented the reusable **whole-object react-select** convention (`{uuid,name}`; map on `.uuid`,
|
|
350
387
|
rehydrate the object) as a gotcha; the string comparison `data.signatureType === "Required"`
|
package/package.json
CHANGED