toga-ai 1.0.378 → 1.0.379
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.
- package/knowledge/2.0/apps/_underscore/features/surface-resolver.md +24 -1
- package/knowledge/2.0/apps/dbchanges2/INDEX.md +1 -1
- package/knowledge/2.0/apps/dbchanges2/features/surface-layer-schema.md +37 -0
- package/knowledge/2.0/apps/toga25-supply/INDEX.md +1 -1
- package/knowledge/2.0/apps/toga25-supply/features/surface-frontend.md +52 -2
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ project: _Underscore
|
|
|
6
6
|
client: shared
|
|
7
7
|
type: feature
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-07-
|
|
9
|
+
updated: 2026-07-20
|
|
10
10
|
owners: [jcardinal, apeterson]
|
|
11
11
|
files:
|
|
12
12
|
- _underscore/Model/Core/Surface.php
|
|
@@ -106,6 +106,21 @@ which surfaced latent resolution gaps in `_buildBundle`/`_resolveElement`:
|
|
|
106
106
|
- `bundle.surface.titleMessageKey` is set from `titleMessageId`.
|
|
107
107
|
- The 2nd `_loadMessages` return is merged into `$messageKeyById`; dangling message ids are logged.
|
|
108
108
|
|
|
109
|
+
### Boolean labels — `messages.trueLabel` / `messages.falseLabel`
|
|
110
|
+
Each resolved element now also emits **`messages.trueLabel`** and **`messages.falseLabel`**, sourced
|
|
111
|
+
from the element's **`trueMessageId`** / **`falseMessageId`** (the unified boolean-label pair on
|
|
112
|
+
`SurfaceElements` — see the [surface-layer-schema](../../dbchanges2/features/surface-layer-schema.md)).
|
|
113
|
+
`_buildBundle`/`_serializeElement` collect those two ids into the same message batch and id→key remap
|
|
114
|
+
as the other slots. **Additive + backward-compatible:** an element that sets neither id emits `null`
|
|
115
|
+
for both, so existing surfaces are unchanged. This makes `Core.Messages` the single source of truth for
|
|
116
|
+
Yes/No + Active/Inactive labels (no Vocabulary needed) so **BOOLEAN-`valueType` toggles render their
|
|
117
|
+
caption and boolean status badges get a label**. Historically the serializer only emitted
|
|
118
|
+
`label`/`tooltip`/`placeholder`/`disabledTooltip` and **silently dropped** `trueMessageId`/
|
|
119
|
+
`falseMessageId` — SalesOrders never hit this because its status badge uses a Vocabulary and it has no
|
|
120
|
+
boolean rows; the item-record modal (the first boolean consumer) exposed the gap. Rides in
|
|
121
|
+
`_underscore`, so it takes effect only once the framework branch is deployed (framework is pulled at
|
|
122
|
+
deploy).
|
|
123
|
+
|
|
109
124
|
## Vocabulary / label per-client relabeling (slugs are internal, labels are messages)
|
|
110
125
|
|
|
111
126
|
Clients **never rename a Vocabulary**. `Vocabularies.slug` (`sales-order-status`) and
|
|
@@ -338,6 +353,14 @@ Core record grants + their logic-group expressions all evaluate `all`/`"1"`. The
|
|
|
338
353
|
match Compass, a follow-up migration aligning both `meta` and `meta-group` to roles 1,3,4 is needed.
|
|
339
354
|
|
|
340
355
|
## Change history
|
|
356
|
+
- 2026-07-20 — Extended the resolver to emit `messages.trueLabel`/`messages.falseLabel` per element,
|
|
357
|
+
sourced from `trueMessageId`/`falseMessageId` (collected into the same message batch + id→key remap);
|
|
358
|
+
additive + backward-compatible (unset → null). Closes a latent gap: the serializer historically emitted
|
|
359
|
+
only label/tooltip/placeholder/disabledTooltip and dropped the boolean-label ids, so BOOLEAN-valueType
|
|
360
|
+
toggles rendered blank and boolean status badges had no label — SalesOrders sidestepped it (Vocabulary
|
|
361
|
+
badge, no boolean rows); the item-record modal (first boolean consumer) surfaced it. Keeps Core.Messages
|
|
362
|
+
the single source of truth for Yes/No + Active/Inactive. Takes effect only once the `_underscore`
|
|
363
|
+
framework branch is deployed. (apeterson)
|
|
341
364
|
- 2026-07-17 — Materialized the per-client sales-order button diffs (re-adding the overrides wiped in
|
|
342
365
|
the earlier rebuild): Compass/CompassCanada ADMIN = all four record-action buttons visible + both
|
|
343
366
|
`VISIBILITY_RULE`/`ENABLED_RULE` widened to `[pendingApproval, pendingInitialApproval]`, MANAGER =
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
| Doc | Summary | Files |
|
|
4
4
|
|-----|---------|-------|
|
|
5
5
|
| [Database Changes (dbchanges2) Repository Architecture](architecture.md) | `dbchanges2` is the **schema-migration / SQL change-set repository** for the entire 2.0 platform. | Core/, Client/, Client_<Tenant>/, Logs/, Logs_Client/, _modules/ |
|
|
6
|
-
| [Surface Layer Schema (UI presentation/config tables)](features/surface-layer-schema.md) | The persistent schema for the platform-wide **Surface** UI presentation/configuration layer (see the `_underscore` [surface-resolver](../../_underscore/features | dbchanges2/Client/2026-06-25a - SurfaceClientTables.sql, dbchanges2/Client_Compass/2026-06-25d - SalesOrderSurfaceClientSeed.sql, _underscore/Model/Client/ThemeToken.php, toga25-supply/src/themeConfig.json, dbchanges2/Core/2026-06-25a - SurfaceCoreTables.sql, dbchanges2/Core/2026-06-25b - SurfaceRecordsAndFields.sql, dbchanges2/Core/2026-06-25c - SalesOrderLoginSurfaceSeed.sql, dbchanges2/Core/2026-06-29a - ItemsSurfaceSeed.sql, dbchanges2/Core/2026-06-29b - SurfaceMetaPublicReadAcl.sql, dbchanges2/Client/2026-06-29c - SurfaceRecordScriptAcl.sql, dbchanges2/Core/2026-06-29c - SurfaceDebugPhpMethodFix.sql, dbchanges2/Core/2026-06-29d - VendorItemsSurfaceSeed.sql, dbchanges2/Core/2026-06-29e - InventorySurfaceSeed.sql, dbchanges2/Core/2026-06-30a - SurfaceMetaGroupAndSalesOrderSections.sql, dbchanges2/Client/2026-06-30a - SurfaceMetaGroupAcl.sql, dbchanges2/Client_Compass/2026-06-30a - SalesOrderDisplaySectionManagerOverrides.sql, dbchanges2/Client_CompassCanada/2026-06-30a - SalesOrderSurfaceManagerOverrides.sql, dbchanges2/Client_Quad/2026-06-30a - SalesOrderSurfaceClientOverrides.sql, dbchanges2/Client/2026-06-25a - SurfaceClientTables.sql, dbchanges2/Client/2026-06-25b - SurfaceClientSeed.sql, dbchanges2/Client/2026-06-25c - SurfaceClientAcl.sql, dbchanges2/Client/2026-06-03- BLANK_CLIENT_DATABASE.sql, dbchanges2/Core/2026-07-17h - Update - ClearApprovalsFilterButtonConfig.sql, dbchanges2/Client_Compass/2026-07-17a - SalesOrderApprovalActionsOverride.sql, dbchanges2/Client_Compass/2026-07-17b - SalesOrderApprovalsFilterButtonOverride.sql, dbchanges2/Client_CompassCanada/2026-07-17a - SalesOrderApprovalActionsOverride.sql, dbchanges2/Client_CompassCanada/2026-07-17b - SalesOrderApprovalsFilterButtonOverride.sql, dbchanges2/Client_Quad/2026-07-17a - SalesOrderApprovalActionsOverride.sql, dbchanges2/Client_Quad/2026-07-17b - SalesOrderApprovalsFilterButtonOverride.sql, dbchanges2/Core/2026-07-20a - Update - HideAdminNotesSectionByDefault.sql, dbchanges2/Core/2026-07-20b - Update - NotesSectionFieldElements.sql, dbchanges2/Client_Compass/2026-07-20a - AdminNotesSectionVisibilityOverride.sql, dbchanges2/Client_Compass/2026-07-20b - NotesSectionFieldsOverride.sql, dbchanges2/Client_CompassCanada/2026-07-20a - AdminNotesSectionVisibilityOverride.sql, dbchanges2/Client_CompassCanada/2026-07-20b - NotesSectionFieldsOverride.sql, dbchanges2/Client_Quad/2026-07-20a - NotesSectionFieldsOverride.sql |
|
|
6
|
+
| [Surface Layer Schema (UI presentation/config tables)](features/surface-layer-schema.md) | The persistent schema for the platform-wide **Surface** UI presentation/configuration layer (see the `_underscore` [surface-resolver](../../_underscore/features | dbchanges2/Client/2026-06-25a - SurfaceClientTables.sql, dbchanges2/Client_Compass/2026-06-25d - SalesOrderSurfaceClientSeed.sql, _underscore/Model/Client/ThemeToken.php, toga25-supply/src/themeConfig.json, dbchanges2/Core/2026-06-25a - SurfaceCoreTables.sql, dbchanges2/Core/2026-06-25b - SurfaceRecordsAndFields.sql, dbchanges2/Core/2026-06-25c - SalesOrderLoginSurfaceSeed.sql, dbchanges2/Core/2026-06-29a - ItemsSurfaceSeed.sql, dbchanges2/Core/2026-06-29b - SurfaceMetaPublicReadAcl.sql, dbchanges2/Client/2026-06-29c - SurfaceRecordScriptAcl.sql, dbchanges2/Core/2026-06-29c - SurfaceDebugPhpMethodFix.sql, dbchanges2/Core/2026-06-29d - VendorItemsSurfaceSeed.sql, dbchanges2/Core/2026-06-29e - InventorySurfaceSeed.sql, dbchanges2/Core/2026-06-30a - SurfaceMetaGroupAndSalesOrderSections.sql, dbchanges2/Client/2026-06-30a - SurfaceMetaGroupAcl.sql, dbchanges2/Client_Compass/2026-06-30a - SalesOrderDisplaySectionManagerOverrides.sql, dbchanges2/Client_CompassCanada/2026-06-30a - SalesOrderSurfaceManagerOverrides.sql, dbchanges2/Client_Quad/2026-06-30a - SalesOrderSurfaceClientOverrides.sql, dbchanges2/Client/2026-06-25a - SurfaceClientTables.sql, dbchanges2/Client/2026-06-25b - SurfaceClientSeed.sql, dbchanges2/Client/2026-06-25c - SurfaceClientAcl.sql, dbchanges2/Client/2026-06-03- BLANK_CLIENT_DATABASE.sql, dbchanges2/Core/2026-07-17h - Update - ClearApprovalsFilterButtonConfig.sql, dbchanges2/Client_Compass/2026-07-17a - SalesOrderApprovalActionsOverride.sql, dbchanges2/Client_Compass/2026-07-17b - SalesOrderApprovalsFilterButtonOverride.sql, dbchanges2/Client_CompassCanada/2026-07-17a - SalesOrderApprovalActionsOverride.sql, dbchanges2/Client_CompassCanada/2026-07-17b - SalesOrderApprovalsFilterButtonOverride.sql, dbchanges2/Client_Quad/2026-07-17a - SalesOrderApprovalActionsOverride.sql, dbchanges2/Client_Quad/2026-07-17b - SalesOrderApprovalsFilterButtonOverride.sql, dbchanges2/Core/2026-07-20a - Update - HideAdminNotesSectionByDefault.sql, dbchanges2/Core/2026-07-20b - Update - NotesSectionFieldElements.sql, dbchanges2/Client_Compass/2026-07-20a - AdminNotesSectionVisibilityOverride.sql, dbchanges2/Client_Compass/2026-07-20b - NotesSectionFieldsOverride.sql, dbchanges2/Client_CompassCanada/2026-07-20a - AdminNotesSectionVisibilityOverride.sql, dbchanges2/Client_CompassCanada/2026-07-20b - NotesSectionFieldsOverride.sql, dbchanges2/Client_Quad/2026-07-20a - NotesSectionFieldsOverride.sql, dbchanges2/Core/2026-07-20c - Update - VendorItemsToggleSurfaceSeed.sql, dbchanges2/Client_Compass/2026-07-20c - ItemRecordEditButtonEnable.sql, dbchanges2/Client_Compass/2026-07-20d - ItemRecordVendorItemsEnable.sql, dbchanges2/Client_CompassCanada/2026-07-20c - ItemRecordEditButtonEnable.sql, dbchanges2/Client_CompassCanada/2026-07-20d - ItemRecordVendorItemsEnable.sql, dbchanges2/Core/2026-07-17 - README - RUN ORDER.md |
|
|
7
7
|
| [2.0 New-Client Onboarding (manual process)](workflows/client-onboarding.md) | How to manually stand up a new 2.0 client (tenant). | Client/, Client_<Tenant>/, Core/, Logs_Client/ |
|
|
@@ -45,6 +45,12 @@ files:
|
|
|
45
45
|
- dbchanges2/Client_CompassCanada/2026-07-20a - AdminNotesSectionVisibilityOverride.sql
|
|
46
46
|
- dbchanges2/Client_CompassCanada/2026-07-20b - NotesSectionFieldsOverride.sql
|
|
47
47
|
- dbchanges2/Client_Quad/2026-07-20a - NotesSectionFieldsOverride.sql
|
|
48
|
+
- dbchanges2/Core/2026-07-20c - Update - VendorItemsToggleSurfaceSeed.sql
|
|
49
|
+
- dbchanges2/Client_Compass/2026-07-20c - ItemRecordEditButtonEnable.sql
|
|
50
|
+
- dbchanges2/Client_Compass/2026-07-20d - ItemRecordVendorItemsEnable.sql
|
|
51
|
+
- dbchanges2/Client_CompassCanada/2026-07-20c - ItemRecordEditButtonEnable.sql
|
|
52
|
+
- dbchanges2/Client_CompassCanada/2026-07-20d - ItemRecordVendorItemsEnable.sql
|
|
53
|
+
- dbchanges2/Core/2026-07-17 - README - RUN ORDER.md
|
|
48
54
|
related:
|
|
49
55
|
- ../../_underscore/features/surface-resolver.md
|
|
50
56
|
---
|
|
@@ -213,6 +219,29 @@ buttons above): Core seeds the section **off**, each client opts in via a `Surfa
|
|
|
213
219
|
`shipping`); the FE resolves `salesOrderNotes[].note` by that slug (client-agnostic). Per-client slug
|
|
214
220
|
variance is handled by a **`CONFIG` override** on the element (REPLACE semantics) — no FE change.
|
|
215
221
|
|
|
222
|
+
### Item-record modal gating (Edit button + vendor-items table, 2026-07-20)
|
|
223
|
+
The item-record modal's per-client gating uses the same Core-neutral-default → client-opt-in rule as
|
|
224
|
+
the SalesOrder buttons/sections above, applied via two mechanisms:
|
|
225
|
+
|
|
226
|
+
- **Header Edit button (existing element).** The `item-record-header` Edit button is seeded OFF in Core
|
|
227
|
+
(the neutral-default action-button rule — see the TRUE NEUTRAL DEFAULT section). Compass + Compass
|
|
228
|
+
Canada opt in with a client-wide `IS_VISIBLE='1'` override (`Client_*/2026-07-20c -
|
|
229
|
+
ItemRecordEditButtonEnable.sql`). The override resolves the element **id-agnostically** by
|
|
230
|
+
`renderType='BUTTON'` + `config.kind='itemEdit'` (never a hardcoded element id/uuid — those regenerate
|
|
231
|
+
per environment), `NOT EXISTS`-guarded, client-wide (`roleId`/`personaId` NULL).
|
|
232
|
+
- **Vendor-items table (new dedicated toggle surface).** `Core/2026-07-20c -
|
|
233
|
+
VendorItemsToggleSurfaceSeed.sql` seeds a dedicated **`item-record-vendor-items`** SECTION surface
|
|
234
|
+
carrying a single hidden marker element (`config.role='sectionVisibility'`, the **marker pattern**
|
|
235
|
+
above), OFF in Core. The FE reads that marker's resolved `isVisible` as `vendorItemsEnabled` and
|
|
236
|
+
conditionally renders the vendor table (see
|
|
237
|
+
[surface-frontend](../../toga25-supply/features/surface-frontend.md)). Compass + Compass Canada opt in
|
|
238
|
+
via `Client_*/2026-07-20d - ItemRecordVendorItemsEnable.sql` (client-wide `IS_VISIBLE='1'` on the
|
|
239
|
+
marker, resolved by `Surfaces.slug='item-record-vendor-items'` + `config.role='sectionVisibility'`).
|
|
240
|
+
|
|
241
|
+
Both clients' `c`/`d` overrides and the Core seed were added to `Core/2026-07-17 - README - RUN
|
|
242
|
+
ORDER.md`. Verified working in the UI for both clients. (Boolean toggle/badge labels in this modal
|
|
243
|
+
resolve through the resolver's new `trueLabel`/`falseLabel` emission — see the resolver doc.)
|
|
244
|
+
|
|
216
245
|
## ThemeTokens — per-tenant, physically isolated in each client DB
|
|
217
246
|
|
|
218
247
|
`ThemeTokens` lives **inside each tenant's own database** (`Client_Compass.ThemeTokens`,
|
|
@@ -366,6 +395,14 @@ rule resumes.
|
|
|
366
395
|
override is added). **Open follow-up.**
|
|
367
396
|
|
|
368
397
|
## Change history
|
|
398
|
+
- 2026-07-20 — Applied the Core-neutral-default → client-opt-in pattern to the **item-record modal**.
|
|
399
|
+
Header Edit button seeded OFF in Core; Compass + Compass Canada opt in via `Client_*/2026-07-20c`,
|
|
400
|
+
resolving the element id-agnostically by `renderType='BUTTON'`+`config.kind='itemEdit'` (NOT EXISTS,
|
|
401
|
+
client-wide). New dedicated `item-record-vendor-items` toggle surface (`Core/2026-07-20c`) carrying a
|
|
402
|
+
`config.role='sectionVisibility'` marker (marker pattern, OFF in Core) that the FE reads as
|
|
403
|
+
`vendorItemsEnabled`; Compass + Compass Canada opt in via `Client_*/2026-07-20d` (resolved by
|
|
404
|
+
`Surfaces.slug`+`config.role`). All added to the `Core/2026-07-17 - README - RUN ORDER.md`; verified
|
|
405
|
+
in the UI for both clients. (apeterson)
|
|
369
406
|
- 2026-07-20 — Applied the Core-neutral-default → client-opt-in pattern to two SalesOrder display
|
|
370
407
|
sections. **admin-notes** (marker pattern): `Core/2026-07-20a` hides it by default (marker
|
|
371
408
|
`isVisible=0`, resolved id-agnostically by `Surfaces.slug`+`config.role='sectionVisibility'`);
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
| [Column Visibility (URL-driven show/hide columns)](features/column-visibility.md) | A "Columns" header button that opens a modal listing every column from the table meta, lets the user show/hide columns, adjusts the table live, and persists the | toga25-supply/src/components/ColumnVisibilityModal/, toga25-supply/src/pages/SalesOrders/SalesOrders.tsx, toga25-supply/src/pages/SalesOrders/viewModel/useSalesOrdersPageViewModel.tsx, toga25-supply/src/pages/SalesOrders/hooks/useSalesOrdersTableData.tsx |
|
|
10
10
|
| [Meta-Driven Page & Table Setup](features/meta-driven-table-data.md) | A page in this app is **meta-driven end to end**: the page view model fetches *page meta* (labels, sections, ACL) and *table meta* (the columns/fields + table s | toga25-supply/src/pages/SalesOrders/viewModel/useSalesOrdersPageViewModel.tsx, toga25-supply/src/pages/SalesOrders/hooks/useSalesOrdersTableState.ts, toga25-supply/src/hooks/useTablePageMeta.ts, toga-blox-npm/dist/hooks/useFetchPageMeta.d.ts, toga-blox-npm/dist/hooks/useFetchTablePageMeta.d.ts, toga-blox-npm/dist/hooks/useAssignTableFieldLabels.d.ts, toga-blox-npm/dist/components/Table/hooks/useTableData.d.ts |
|
|
11
11
|
| [Record Modals & Nested Tables](features/record-modals-and-nested-tables.md) | The repo's family of modal + nested-table patterns layered over toga-blox `TableRecordModal` and `PrimaryTable*Layout`. | toga25-supply/src/layout/ItemRecordModalLayout/, toga25-supply/src/layout/SalesOrderRecordModalLayout/, toga25-supply/src/layout/SalesOrderItemsTableLayout/, toga25-supply/src/layout/ItemFulfillmentModal/, toga25-supply/src/layout/GenericNestedTables/, toga25-supply/src/hooks/useTableCellInteractions.ts |
|
|
12
|
-
| [Surface Frontend (DB-driven UI consumption, src/surface/)](features/surface-frontend.md) | The frontend consumer of the platform-wide Surface layer — DB-driven UI config fetched from `GET /v2/surfaces/meta?slug=<slug>` instead of statically-imported J | toga25-supply/src/surface/useFetchSurfaceMeta.ts, toga25-supply/src/pages/SalesOrders/helpers/surfaceBundleToTenantFields.ts, toga25-supply/src/pages/SalesOrders/helpers/buildPatchedTenantFields.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/viewModel/useSalesOrderRecordModalLayoutModel.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/SalesOrderView.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/layoutComponents/SalesOrderSummaryGrid.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/helpers/getDetailSections.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/sections/SalesOrderNotesSection.tsx, toga25-supply/src/pages/SalesOrders/helpers/cleanOrder.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/helpers/index.ts, toga25-supply/src/surface/evaluateSurfaceRule.ts, toga25-supply/src/surface/actionRegistry.ts, toga25-supply/src/surface/componentRegistry.tsx, toga25-supply/src/surface/SurfaceActionBar.tsx, toga25-supply/src/surface/SurfaceSection.tsx, toga25-supply/src/surface/resolve.ts, toga25-supply/src/surface/types.ts, toga25-supply/src/surface/index.ts, toga25-supply/src/pages/Login/LoginPage.tsx, toga25-supply/src/pages/SalesOrders/SalesOrders.tsx, toga25-supply/src/pages/SalesOrders/view/SurfaceRowActions.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/sections/SalesOrderTopBar.tsx, toga25-supply/src/pages/Items/ItemsPage.tsx, toga25-supply/src/pages/Items/viewModel/useItemsPageViewModel.tsx, toga25-supply/src/pages/VendorItems/VendorItemsPage.tsx, toga25-supply/src/pages/VendorItems/viewModel/useVendorItemsPageViewModel.tsx, toga25-supply/src/pages/Inventory/Inventory.tsx, toga25-supply/src/pages/Inventory/viewModel/useInventoryPageViewModel.tsx, toga25-supply/src/pages/Inventory/viewModel/FIELDS/index.ts, toga25-supply/src/fieldsConfig/index.ts |
|
|
12
|
+
| [Surface Frontend (DB-driven UI consumption, src/surface/)](features/surface-frontend.md) | The frontend consumer of the platform-wide Surface layer — DB-driven UI config fetched from `GET /v2/surfaces/meta?slug=<slug>` instead of statically-imported J | toga25-supply/src/surface/useFetchSurfaceMeta.ts, toga25-supply/src/pages/SalesOrders/helpers/surfaceBundleToTenantFields.ts, toga25-supply/src/pages/SalesOrders/helpers/buildPatchedTenantFields.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/viewModel/useSalesOrderRecordModalLayoutModel.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/SalesOrderView.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/layoutComponents/SalesOrderSummaryGrid.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/helpers/getDetailSections.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/sections/SalesOrderNotesSection.tsx, toga25-supply/src/pages/SalesOrders/helpers/cleanOrder.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/helpers/index.ts, toga25-supply/src/surface/evaluateSurfaceRule.ts, toga25-supply/src/surface/actionRegistry.ts, toga25-supply/src/surface/componentRegistry.tsx, toga25-supply/src/surface/SurfaceActionBar.tsx, toga25-supply/src/surface/SurfaceSection.tsx, toga25-supply/src/surface/resolve.ts, toga25-supply/src/surface/types.ts, toga25-supply/src/surface/index.ts, toga25-supply/src/pages/Login/LoginPage.tsx, toga25-supply/src/pages/SalesOrders/SalesOrders.tsx, toga25-supply/src/pages/SalesOrders/view/SurfaceRowActions.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/sections/SalesOrderTopBar.tsx, toga25-supply/src/pages/Items/ItemsPage.tsx, toga25-supply/src/pages/Items/viewModel/useItemsPageViewModel.tsx, toga25-supply/src/pages/VendorItems/VendorItemsPage.tsx, toga25-supply/src/pages/VendorItems/viewModel/useVendorItemsPageViewModel.tsx, toga25-supply/src/pages/Inventory/Inventory.tsx, toga25-supply/src/pages/Inventory/viewModel/useInventoryPageViewModel.tsx, toga25-supply/src/pages/Inventory/viewModel/FIELDS/index.ts, toga25-supply/src/fieldsConfig/index.ts, toga25-supply/src/layout/ItemRecordModalLayout/helpers/surfaceBundleToItemFields.ts, toga25-supply/src/layout/ItemRecordModalLayout/helpers/index.ts, toga25-supply/src/layout/ItemRecordModalLayout/viewModel/useItemRecordModalViewModel.tsx, toga25-supply/src/layout/ItemRecordModalLayout/ItemRecordModalLayout.tsx, toga25-supply/src/layout/ItemRecordModalLayout/components/ItemRecordView.tsx |
|
|
13
13
|
| [AWS Amplify Multi-Environment Deployment](workflows/amplify-deployment.md) | How `toga25-supply` deploys to **all** of its environments on AWS Amplify from a **single shared `amplify.yml`**. | toga25-supply/amplify.yml, toga25-supply/src/api/api.ts, toga25-supply/src/hooks/useAuthenticationFlow.ts, toga25-supply/vite.config.ts, toga25-supply/package.json |
|
|
14
14
|
| [Cypress Testing Harness (component + e2e)](workflows/cypress-testing.md) | The Cypress test harness for the `toga25-supply` frontend, bootstrapped from scratch (`cypress` was already a dependency but there was no config, no `cypress/` | toga25-supply/cypress.config.ts, toga25-supply/cypress/tsconfig.json, toga25-supply/cypress/support/component.tsx, toga25-supply/cypress/support/component-index.html, toga25-supply/cypress/support/e2e.ts, toga25-supply/cypress/support/commands.ts, toga25-supply/cypress/support/fixtures.ts, toga25-supply/cypress/support/mocks/useApprovalModalViewModel.ts, toga25-supply/cypress/component/SalesOrderApprovalModalsLayout.cy.tsx, toga25-supply/cypress/component/RecordApprovalModalLayout.cy.tsx, toga25-supply/cypress/component/EnterPoNumberModal.cy.tsx, toga25-supply/cypress/e2e/salesOrderApproval.cy.ts |
|
|
@@ -39,6 +39,11 @@ files:
|
|
|
39
39
|
- toga25-supply/src/pages/Inventory/viewModel/useInventoryPageViewModel.tsx
|
|
40
40
|
- toga25-supply/src/pages/Inventory/viewModel/FIELDS/index.ts
|
|
41
41
|
- toga25-supply/src/fieldsConfig/index.ts
|
|
42
|
+
- toga25-supply/src/layout/ItemRecordModalLayout/helpers/surfaceBundleToItemFields.ts
|
|
43
|
+
- toga25-supply/src/layout/ItemRecordModalLayout/helpers/index.ts
|
|
44
|
+
- toga25-supply/src/layout/ItemRecordModalLayout/viewModel/useItemRecordModalViewModel.tsx
|
|
45
|
+
- toga25-supply/src/layout/ItemRecordModalLayout/ItemRecordModalLayout.tsx
|
|
46
|
+
- toga25-supply/src/layout/ItemRecordModalLayout/components/ItemRecordView.tsx
|
|
42
47
|
related:
|
|
43
48
|
- ../../_underscore/features/surface-resolver.md
|
|
44
49
|
- meta-driven-table-data.md
|
|
@@ -109,8 +114,8 @@ legacy pre-Surface fallback branches at the wired screens removed). Legacy per-s
|
|
|
109
114
|
|
|
110
115
|
## What's wired
|
|
111
116
|
|
|
112
|
-
Login + sales-orders list + the sales-order modal + the **
|
|
113
|
-
**Inventory** LIST screens. The SalesOrder action
|
|
117
|
+
Login + sales-orders list + the sales-order modal + the **item-record modal (VIEW, all clients)** +
|
|
118
|
+
the **Items**, **VendorItems**, and **Inventory** LIST screens. The SalesOrder action
|
|
114
119
|
bar reproduces `orderViewFields.json` approve/deny/approvalWorkflow/viewLog/editOrder by delegating
|
|
115
120
|
to the existing `onActionClick`/`onOpenLog` handlers. TABLE-type surfaces stay on the existing
|
|
116
121
|
TableView pipeline via `tableViewSlug` (see [meta-driven-table-data](meta-driven-table-data.md)) —
|
|
@@ -219,6 +224,39 @@ third section pattern alongside card sections (`cardType` → grid renderer) and
|
|
|
219
224
|
seeding NYCHH/Prudential/SPGlobal is deferred; the Client-DB prod cross-cluster seed fix is on hold
|
|
220
225
|
(see [surface-layer-schema](../../dbchanges2/features/surface-layer-schema.md)).
|
|
221
226
|
|
|
227
|
+
## Item-record modal (VIEW) — migrated via an adapter seam, ALL clients (no roster)
|
|
228
|
+
|
|
229
|
+
The item-record modal's **VIEW** sections are now resolved from Surface for **every client** — unlike
|
|
230
|
+
the SalesOrders modal, there is **no migration roster**. It mirrors the SalesOrders adapter-seam
|
|
231
|
+
approach (config source moves JSON → Surface; the existing view is untouched):
|
|
232
|
+
|
|
233
|
+
- **`surfaceBundleToItemViewFields()`** (`ItemRecordModalLayout/helpers/surfaceBundleToItemFields.ts`,
|
|
234
|
+
new; barrel `helpers/index.ts`) adapts the grouped Surface bundle into the
|
|
235
|
+
`{ header, editItem, sections, vendorItemsEnabled }` shape the view already consumed.
|
|
236
|
+
- **`useItemRecordModalViewModel`** fetches the `item-record-*` surface group via
|
|
237
|
+
`useFetchSurfaceMetaGroup`, adapts it, and threads it into **`ItemRecordView`** as a **`viewFields`**
|
|
238
|
+
prop. The per-client JSON (`itemRecordViewFields`) is now a **fallback only** — used when the group
|
|
239
|
+
fails to resolve. **Edit mode stays JSON-driven (deferred).**
|
|
240
|
+
- **Boolean labels** flow through `messages.trueLabel`/`messages.falseLabel` (added to
|
|
241
|
+
`SurfaceElementMessages` in `src/surface/types.ts`), which the resolver now emits from each element's
|
|
242
|
+
`trueMessageId`/`falseMessageId` (see
|
|
243
|
+
[surface-resolver](../../_underscore/features/surface-resolver.md)) — so BOOLEAN toggles/badges render
|
|
244
|
+
their caption instead of blank.
|
|
245
|
+
|
|
246
|
+
**Per-client gating rides the Core-default-OFF → SurfaceOverride opt-in pattern** (the same
|
|
247
|
+
"approvals-gate" shape used on SalesOrders — `elements.some(el => el.isVisible)`); the seed side lives
|
|
248
|
+
in [surface-layer-schema](../../dbchanges2/features/surface-layer-schema.md):
|
|
249
|
+
|
|
250
|
+
- **Header Edit button** — an element in `item-record-header`, matched **id-agnostically** by
|
|
251
|
+
`renderType='BUTTON'` + `config.kind='itemEdit'`. Core seeds it OFF; Compass / Compass Canada opt in.
|
|
252
|
+
- **Vendor-items table** — a dedicated `item-record-vendor-items` **toggle surface** carrying a
|
|
253
|
+
`config.role='sectionVisibility'` marker element; the FE reads it as **`vendorItemsEnabled`** and
|
|
254
|
+
conditionally renders the vendor table in `ItemRecordView`. Core-OFF; Compass / Compass Canada opt in.
|
|
255
|
+
|
|
256
|
+
> **Seed-intent to verify (flagged to the dev):** the Core item-record Pricing section seed now also
|
|
257
|
+
> shows **`leasePrice`** for all clients, whereas the old DEFAULT JSON showed only unit price. Confirm
|
|
258
|
+
> that is the intended seed shape.
|
|
259
|
+
|
|
222
260
|
## Gotchas
|
|
223
261
|
|
|
224
262
|
- **The single-meta envelope can hide the real bundle behind a DECOY `elements: []`.** The V2 envelope
|
|
@@ -293,6 +331,18 @@ seeding NYCHH/Prudential/SPGlobal is deferred; the Client-DB prod cross-cluster
|
|
|
293
331
|
treat type-checking as pending. Runtime `GET /v2/surfaces/{slug}/meta` also not yet exercised.
|
|
294
332
|
|
|
295
333
|
## Change history
|
|
334
|
+
- 2026-07-20 — Migrated the **item-record modal VIEW** onto Surface for **ALL clients (no roster)** via
|
|
335
|
+
the adapter seam: new `surfaceBundleToItemViewFields()` adapts the `item-record-*` surface group
|
|
336
|
+
(`useFetchSurfaceMetaGroup`) into the existing `{header, editItem, sections, vendorItemsEnabled}`
|
|
337
|
+
shape, threaded into `ItemRecordView` as a `viewFields` prop with the per-client JSON
|
|
338
|
+
(`itemRecordViewFields`) as resolve-failure fallback only; edit mode stays JSON-driven (deferred).
|
|
339
|
+
Added `trueLabel`/`falseLabel` to `SurfaceElementMessages` (`src/surface/types.ts`) so BOOLEAN
|
|
340
|
+
toggles/badges render their caption (backend resolver now emits them). Per-client gating uses the
|
|
341
|
+
Core-default-OFF → SurfaceOverride opt-in pattern: header Edit button (`item-record-header`, matched
|
|
342
|
+
by `renderType='BUTTON'`+`config.kind='itemEdit'`) and a dedicated `item-record-vendor-items` toggle
|
|
343
|
+
surface (marker `config.role='sectionVisibility'` → FE `vendorItemsEnabled`), both opted into by
|
|
344
|
+
Compass / Compass Canada. Flagged: Core Pricing seed now also shows `leasePrice` for all clients
|
|
345
|
+
(verify seed intent). (apeterson)
|
|
296
346
|
- 2026-07-20 — Made the SalesOrders `notes` display section **field-driven** per client.
|
|
297
347
|
`buildSection`'s `displayToggle` branch now handles field-carrying sections: it maps each `FIELD`
|
|
298
348
|
element to a field config (`elementToFieldConfig` now carries `config.noteTypeSlug`) and **derives**
|
package/package.json
CHANGED