plinth-seed.ts
Language TypeScript7.8 KB249 lines
/*** Plinth orders for demos and tests: invented, in the shape of the "Order Product* Detail" report, covering 01 Jul - 07 Aug 2026.** Order level, because that is the report's shape: it carries order-level* columns, including production_owner and account_owner, and no product* status.** Deduplication: the export emits one row per product line but carries only order-level* columns, so a four-item order appears four times with identical values.* Collapsing is only safe if the duplicates really are byte-identical on every* field, so that is checked before rows are merged, not assumed.** "--" in the export means unassigned; it is stored as null here.** Static by design. This is seed data for demos and for testing the render path* without credentials, not a cache. `pnpm dashboard` (no --fixtures) reads live.** Ages are measured against `SEED_EXPORTED_AT`, not against today. `placedAt`* is frozen, so an age computed from `Date.now()` would grow one day per real* day: the fixture would get steadily more alarming while nothing changed, and* the whole queue would eventually flag as "aging", which trains anyone* reviewing the demo to ignore the flag that matters most. So the clock is* pinned to the export date, and every age here is fixed.*//*** A date, not a precise instant. Midnight UTC is the conventional encoding for* "this calendar day" and it is what this means. Display it by slicing the* date part: running it through localDay() moves it to the day before,* because midnight UTC is 7 PM the evening before in Chicago. A timezone sweep* that "fixes" this would make it wrong.*/export const SEED_EXPORTED_AT = '2026-08-09T00:00:00Z'export interface SeedOrder {displayNumber: stringorderId: number | nullorderStatus: stringplacedAt: string | null/** Customer deadline. The one date that makes a queue urgent rather than long. */inHandDate: string | nulluserGroup: string | null/** Plinth account label, e.g. "Marco-Acct7-Desk". Map via config/plinth-people.ts. */productionOwner: string | nullaccountOwner: string | null}export const PLINTH_SEED: SeedOrder[] = [{"displayNumber": "MD2639511","orderId": 39511,"orderStatus": "Proof Signed Off","placedAt": "2026-07-09T13:09:25","inHandDate": "2026-07-21T00:00:00","userGroup": "Retail","productionOwner": "Marco-Acct7-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639517","orderId": 39517,"orderStatus": "Design Requested","placedAt": "2026-07-10T08:04:52","inHandDate": "2026-07-22T00:00:00","userGroup": "Retail","productionOwner": null,"accountOwner": null},{"displayNumber": "MD2639541","orderId": 39541,"orderStatus": "Design Requested","placedAt": "2026-07-13T16:06:23","inHandDate": "2026-07-22T00:00:00","userGroup": "Retail","productionOwner": "Marco-Acct7-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639554","orderId": 39554,"orderStatus": "File Check","placedAt": "2026-07-14T17:03:58","inHandDate": "2026-07-24T00:00:00","userGroup": null,"productionOwner": "Marco-Acct7-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639578","orderId": 39578,"orderStatus": "Proof Out","placedAt": "2026-07-15T16:13:02","inHandDate": "2026-08-06T00:00:00","userGroup": "Retail","productionOwner": "Rafael-Prod-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639585","orderId": 39585,"orderStatus": "Proof Signed Off","placedAt": "2026-07-15T09:27:26","inHandDate": "2026-08-04T00:00:00","userGroup": "Retail","productionOwner": "Rafael-Prod-Desk","accountOwner": "Sam-Accounts-Desk"},{"displayNumber": "MD2639595","orderId": 39595,"orderStatus": "File Check","placedAt": "2026-07-17T09:15:05","inHandDate": "2026-07-31T00:00:00","userGroup": "Retail","productionOwner": "Marco-Acct7-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639635","orderId": 39635,"orderStatus": "File Check","placedAt": "2026-07-23T16:27:03","inHandDate": "2026-07-31T00:00:00","userGroup": "Platinum Partner","productionOwner": "Marco-Acct7-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639640","orderId": 39640,"orderStatus": "Proof Signed Off","placedAt": "2026-07-23T17:07:14","inHandDate": "2026-08-07T00:00:00","userGroup": "Retail","productionOwner": "Rafael-Prod-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639645","orderId": 39645,"orderStatus": "Proof Signed Off","placedAt": "2026-07-23T17:03:36","inHandDate": "2026-08-18T00:00:00","userGroup": "Platinum Partner","productionOwner": "Marco-Acct7-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639701","orderId": 39701,"orderStatus": "Proof Signed Off","placedAt": "2026-07-30T17:25:03","inHandDate": "2026-08-11T00:00:00","userGroup": null,"productionOwner": "Marco-Acct7-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639718","orderId": 39718,"orderStatus": "Proof Out","placedAt": "2026-07-31T11:02:35","inHandDate": "2026-08-14T00:00:00","userGroup": "Platinum Partner","productionOwner": "Rafael-Prod-Desk","accountOwner": "Sam-Accounts-Desk"},{"displayNumber": "MD2639738","orderId": 39738,"orderStatus": "Proof Out","placedAt": "2026-08-04T10:18:26","inHandDate": "2026-08-19T00:00:00","userGroup": null,"productionOwner": "Rafael-Prod-Desk","accountOwner": "Sam-Accounts-Desk"},{"displayNumber": "MD2639752","orderId": 39752,"orderStatus": "File Check","placedAt": "2026-08-05T10:34:07","inHandDate": "2026-08-20T00:00:00","userGroup": null,"productionOwner": "Marco-Acct7-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639761","orderId": 39761,"orderStatus": "Proof Out","placedAt": "2026-08-05T17:19:35","inHandDate": "2026-08-14T00:00:00","userGroup": "Platinum Partner","productionOwner": "Rafael-Prod-Desk","accountOwner": "Sam-Accounts-Desk"},{"displayNumber": "MD2639767","orderId": 39767,"orderStatus": "Proof Out","placedAt": "2026-08-06T10:06:37","inHandDate": "2026-08-18T00:00:00","userGroup": "Retail","productionOwner": "Rafael-Prod-Desk","accountOwner": "Sam-Accounts-Desk"},{"displayNumber": "MD2639770","orderId": 39770,"orderStatus": "Proof Signed Off","placedAt": "2026-08-06T17:40:12","inHandDate": "2026-08-18T00:00:00","userGroup": "Retail","productionOwner": "Rafael-Prod-Desk","accountOwner": "Sam-Accounts-Desk"},{"displayNumber": "MD2639773","orderId": 39773,"orderStatus": "Proof Out","placedAt": "2026-08-06T13:06:35","inHandDate": "2026-08-19T00:00:00","userGroup": "Platinum Partner","productionOwner": "Marco-Acct7-Desk","accountOwner": "Hazel (Desk 2)"},{"displayNumber": "MD2639779","orderId": 39779,"orderStatus": "Proof Out","placedAt": "2026-08-07T09:36:03","inHandDate": "2026-08-20T00:00:00","userGroup": "Retail","productionOwner": "Rafael-Prod-Desk","accountOwner": "Sam-Accounts-Desk"},{"displayNumber": "MD2639780","orderId": 39780,"orderStatus": "Proof Signed Off","placedAt": "2026-08-07T17:13:31","inHandDate": "2026-08-21T00:00:00","userGroup": "Platinum Partner","productionOwner": "Marco-Acct7-Desk","accountOwner": "Hazel (Desk 2)"}]