toga-ai 1.0.947 → 1.0.948
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.
|
@@ -5,7 +5,7 @@ project: _Underscore
|
|
|
5
5
|
client: compass-usa
|
|
6
6
|
type: client-feature
|
|
7
7
|
status: active
|
|
8
|
-
updated: 2026-
|
|
8
|
+
updated: 2026-10-05
|
|
9
9
|
owners: [bala, ajean]
|
|
10
10
|
files:
|
|
11
11
|
- toga2-commerce/src/pages/Cart/api/CartApi.ts
|
|
@@ -17,6 +17,7 @@ files:
|
|
|
17
17
|
- dbchanges2/Client_Compass/2026-07-06 - RemoveNonNumericCostCenters.sql
|
|
18
18
|
related:
|
|
19
19
|
- ../profile.md
|
|
20
|
+
- ./location-hierarchy-and-sectors.md
|
|
20
21
|
- ../../../2.0/apps/toga2-commerce/features/cart-page-config-architecture.md
|
|
21
22
|
- ../../../1.0/apps/tools/features/compass-user-persona-admin.md
|
|
22
23
|
- ./people-file-user-lifecycle.md
|
|
@@ -60,6 +61,14 @@ Deactivation proven safe against prod data:
|
|
|
60
61
|
- Proven end-to-end in dev-sandbox: after the migration, active non-numeric rows = **0** (all 1,185 codes incl. the 725 number+alphabet combos) while pure-numeric stayed untouched at **440,005** active rows.
|
|
61
62
|
|
|
62
63
|
## Gotchas
|
|
64
|
+
- **⚠ A cost-center number is NOT unique across sectors — never match on the number alone.** Scope
|
|
65
|
+
every match to a sector / hierarchy path. Measured 2026-10-05: 10 of the client's 634 "corporate"
|
|
66
|
+
cost centers also exist under other sectors — `4018` / `45781` / `62937` under B&I Overhead
|
|
67
|
+
(`M00000`), `22772` / `26963` / `28184` / `54188` under Corporate Income (`H00000`), `47258` /
|
|
68
|
+
`62230` under CCL Hospitality (`Y00000`), `31335` under ESFM (`W00000`). Three carry real users
|
|
69
|
+
(`4018` → 10, `31335` → 9, `47258` → 9), so the wrong match hits live people. See
|
|
70
|
+
[Location Hierarchy & Sectors](./location-hierarchy-and-sectors.md) for the walk and the
|
|
71
|
+
dedupe-before-counting recipe.
|
|
63
72
|
- **⚠ `Users.c_erpSystemEntityId` has a DOUBLE meaning — never overwrite it to persist a cost-center change.** In `worker2/Worker/Client/Compass/PeopleFile.php` it is (a) copied straight into `c_hrEmpDirectoryKey` and treated as **unique per employee** (`:544-546`, e.g. `"1001-1003"`), and (b) used as the **primary key for resolving `Users.locationId`** (`:566-571`). Writing a location code into it corrupts employee identity to buy one night of persistence. This is why the [Tools Compass admin](../../../1.0/apps/tools/features/compass-user-persona-admin.md) writes only `Users.locationId` + `Users.c_erpEntityId` and accepts that a cost-center edit is **undone that night** for anyone in the PEOPLE file.
|
|
64
73
|
- **⚠ The `Locations` column names are REVERSED — confirmed by the importer's own comment** (`PeopleFile.php:328-330`): `Locations.c_erpEntityId` holds the **FULL** code (`"1001-1018"`) and `Locations.c_erpSystemEntityId` holds the **SHORT** code (`"1018"`). Never label these by column name in a UI — show the value, not the field name.
|
|
65
74
|
- **⚠ There is no usable index for a cost-center search, so never wire one to a type-ahead.** `Client_Compass` has ~909,700 active `locationTypeId = 1` (Unit) rows carrying only ~36,352 distinct `c_erpSystemEntityId` values (~730 duplicate rows per code); **442,549** of the active rows have a numeric short code. Per the `dbchanges2` schema the only key on `Locations` is `locationTypeId`, which covers nearly the whole table — so there is no index on `c_erpSystemEntityId`, on `isActive`, or any composite. Every cost-center search reads the table then groups. **Recommended follow-up (not done): index `Locations (locationTypeId, isActive, c_erpSystemEntityId)` in BOTH Compass tenants** (dbchanges2).
|
|
@@ -70,6 +79,7 @@ Deactivation proven safe against prod data:
|
|
|
70
79
|
|
|
71
80
|
## Related
|
|
72
81
|
- [Compass USA profile](../profile.md)
|
|
82
|
+
- [Location Hierarchy & Sectors](./location-hierarchy-and-sectors.md)
|
|
73
83
|
- [Cart page config architecture](../../../2.0/apps/toga2-commerce/features/cart-page-config-architecture.md)
|
|
74
84
|
- [Tools Compass user/persona admin](../../../1.0/apps/tools/features/compass-user-persona-admin.md)
|
|
75
85
|
- [PEOPLE-file user lifecycle](./people-file-user-lifecycle.md)
|
|
@@ -6,12 +6,14 @@ project: Worker
|
|
|
6
6
|
client: compass-usa
|
|
7
7
|
type: client-feature
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-
|
|
9
|
+
updated: 2026-10-05
|
|
10
10
|
owners: [bala, ajean, mhammontree]
|
|
11
11
|
files:
|
|
12
12
|
- worker2/Worker/Client/Compass/PeopleFile.php
|
|
13
13
|
related:
|
|
14
14
|
- ./people-file-user-lifecycle.md
|
|
15
|
+
- ./corporate-vs-field-laptop-personas.md
|
|
16
|
+
- ./location-hierarchy-and-sectors.md
|
|
15
17
|
- ../../../2.0/apps/_underscore/features/effective-persona-resolution.md
|
|
16
18
|
- ../../../2.0/apps/toga2-commerce/features/storefront-persona-gating-and-home-counts.md
|
|
17
19
|
- ../profile.md
|
|
@@ -182,6 +184,11 @@ Both are **latent, not live, and not yet fixed** — each needs its own ticket.
|
|
|
182
184
|
constants from this file into tickets, docs, or chat transcripts.
|
|
183
185
|
|
|
184
186
|
## Change history
|
|
187
|
+
- 2026-10-05 — Linked the deferred
|
|
188
|
+
[corporate vs field laptop split](./corporate-vs-field-laptop-personas.md) (Corporate attached at
|
|
189
|
+
sector `J00000` via `Locations_Personas`; Field assigned here in `PeopleFile`, mirroring the Levy
|
|
190
|
+
branch) and the new [location hierarchy doc](./location-hierarchy-and-sectors.md) that owns the
|
|
191
|
+
sector walk and the `Locations` dedupe rule. (bala)
|
|
185
192
|
- 2026-09-23 — Recorded the per-tenant persona-id table and two **unfixed** CA gating gaps found while fixing TRUE-82230: persona **35 (VIP) has no tenant check** and would FK-fail on Canada (latent only because the file carries no CA VIP rows), and the persona **30 delete branch strips a real CA persona** from every Canadian user holding it (0 today). Both need their own tickets; both become reachable now that Canada runs again. (mhammontree)
|
|
186
193
|
- 2026-09-17 — **The refactor is live in prod (TRUE-80672) and the persona set changed shape.** It is
|
|
187
194
|
a **three-way** split: Base (1) keeps the 9 kits Levy also held, **Non-Levy is id 40 / number 42**
|
|
@@ -44,6 +44,8 @@ related:
|
|
|
44
44
|
- features/multi-tier-tracking-and-serial-mirroring.md
|
|
45
45
|
- features/order-fulfillment-status-per-line.md
|
|
46
46
|
- features/cost-centers.md
|
|
47
|
+
- features/location-hierarchy-and-sectors.md
|
|
48
|
+
- features/corporate-vs-field-laptop-personas.md
|
|
47
49
|
- features/isfulfillable-data-quality-and-type-rule.md
|
|
48
50
|
- features/item-catalogs-and-duplicate-items.md
|
|
49
51
|
- features/approval-decision-flow.md
|
package/package.json
CHANGED