mattrguerra/meridian-ops-boardmainPrivate on GitHub, published here in full

plinth-seed.ts

Language TypeScript7.8 KB249 lines

apps/dashboard/src/plinth-seed.ts

  1. /**
  2. * Plinth orders for demos and tests: invented, in the shape of the "Order Product
  3. * Detail" report, covering 01 Jul - 07 Aug 2026.
  4. *
  5. * Order level, because that is the report's shape: it carries order-level
  6. * columns, including production_owner and account_owner, and no product
  7. * status.
  8. *
  9. * Deduplication: the export emits one row per product line but carries only order-level
  10. * columns, so a four-item order appears four times with identical values.
  11. * Collapsing is only safe if the duplicates really are byte-identical on every
  12. * field, so that is checked before rows are merged, not assumed.
  13. *
  14. * "--" in the export means unassigned; it is stored as null here.
  15. *
  16. * Static by design. This is seed data for demos and for testing the render path
  17. * without credentials, not a cache. `pnpm dashboard` (no --fixtures) reads live.
  18. *
  19. * Ages are measured against `SEED_EXPORTED_AT`, not against today. `placedAt`
  20. * is frozen, so an age computed from `Date.now()` would grow one day per real
  21. * day: the fixture would get steadily more alarming while nothing changed, and
  22. * the whole queue would eventually flag as "aging", which trains anyone
  23. * reviewing the demo to ignore the flag that matters most. So the clock is
  24. * pinned to the export date, and every age here is fixed.
  25. */
  26. /**
  27. * A date, not a precise instant. Midnight UTC is the conventional encoding for
  28. * "this calendar day" and it is what this means. Display it by slicing the
  29. * date part: running it through localDay() moves it to the day before,
  30. * because midnight UTC is 7 PM the evening before in Chicago. A timezone sweep
  31. * that "fixes" this would make it wrong.
  32. */
  33. export const SEED_EXPORTED_AT = '2026-08-09T00:00:00Z'
  34. export interface SeedOrder {
  35. displayNumber: string
  36. orderId: number | null
  37. orderStatus: string
  38. placedAt: string | null
  39. /** Customer deadline. The one date that makes a queue urgent rather than long. */
  40. inHandDate: string | null
  41. userGroup: string | null
  42. /** Plinth account label, e.g. "Marco-Acct7-Desk". Map via config/plinth-people.ts. */
  43. productionOwner: string | null
  44. accountOwner: string | null
  45. }
  46. export const PLINTH_SEED: SeedOrder[] = [
  47. {
  48. "displayNumber": "MD2639511",
  49. "orderId": 39511,
  50. "orderStatus": "Proof Signed Off",
  51. "placedAt": "2026-07-09T13:09:25",
  52. "inHandDate": "2026-07-21T00:00:00",
  53. "userGroup": "Retail",
  54. "productionOwner": "Marco-Acct7-Desk",
  55. "accountOwner": "Hazel (Desk 2)"
  56. },
  57. {
  58. "displayNumber": "MD2639517",
  59. "orderId": 39517,
  60. "orderStatus": "Design Requested",
  61. "placedAt": "2026-07-10T08:04:52",
  62. "inHandDate": "2026-07-22T00:00:00",
  63. "userGroup": "Retail",
  64. "productionOwner": null,
  65. "accountOwner": null
  66. },
  67. {
  68. "displayNumber": "MD2639541",
  69. "orderId": 39541,
  70. "orderStatus": "Design Requested",
  71. "placedAt": "2026-07-13T16:06:23",
  72. "inHandDate": "2026-07-22T00:00:00",
  73. "userGroup": "Retail",
  74. "productionOwner": "Marco-Acct7-Desk",
  75. "accountOwner": "Hazel (Desk 2)"
  76. },
  77. {
  78. "displayNumber": "MD2639554",
  79. "orderId": 39554,
  80. "orderStatus": "File Check",
  81. "placedAt": "2026-07-14T17:03:58",
  82. "inHandDate": "2026-07-24T00:00:00",
  83. "userGroup": null,
  84. "productionOwner": "Marco-Acct7-Desk",
  85. "accountOwner": "Hazel (Desk 2)"
  86. },
  87. {
  88. "displayNumber": "MD2639578",
  89. "orderId": 39578,
  90. "orderStatus": "Proof Out",
  91. "placedAt": "2026-07-15T16:13:02",
  92. "inHandDate": "2026-08-06T00:00:00",
  93. "userGroup": "Retail",
  94. "productionOwner": "Rafael-Prod-Desk",
  95. "accountOwner": "Hazel (Desk 2)"
  96. },
  97. {
  98. "displayNumber": "MD2639585",
  99. "orderId": 39585,
  100. "orderStatus": "Proof Signed Off",
  101. "placedAt": "2026-07-15T09:27:26",
  102. "inHandDate": "2026-08-04T00:00:00",
  103. "userGroup": "Retail",
  104. "productionOwner": "Rafael-Prod-Desk",
  105. "accountOwner": "Sam-Accounts-Desk"
  106. },
  107. {
  108. "displayNumber": "MD2639595",
  109. "orderId": 39595,
  110. "orderStatus": "File Check",
  111. "placedAt": "2026-07-17T09:15:05",
  112. "inHandDate": "2026-07-31T00:00:00",
  113. "userGroup": "Retail",
  114. "productionOwner": "Marco-Acct7-Desk",
  115. "accountOwner": "Hazel (Desk 2)"
  116. },
  117. {
  118. "displayNumber": "MD2639635",
  119. "orderId": 39635,
  120. "orderStatus": "File Check",
  121. "placedAt": "2026-07-23T16:27:03",
  122. "inHandDate": "2026-07-31T00:00:00",
  123. "userGroup": "Platinum Partner",
  124. "productionOwner": "Marco-Acct7-Desk",
  125. "accountOwner": "Hazel (Desk 2)"
  126. },
  127. {
  128. "displayNumber": "MD2639640",
  129. "orderId": 39640,
  130. "orderStatus": "Proof Signed Off",
  131. "placedAt": "2026-07-23T17:07:14",
  132. "inHandDate": "2026-08-07T00:00:00",
  133. "userGroup": "Retail",
  134. "productionOwner": "Rafael-Prod-Desk",
  135. "accountOwner": "Hazel (Desk 2)"
  136. },
  137. {
  138. "displayNumber": "MD2639645",
  139. "orderId": 39645,
  140. "orderStatus": "Proof Signed Off",
  141. "placedAt": "2026-07-23T17:03:36",
  142. "inHandDate": "2026-08-18T00:00:00",
  143. "userGroup": "Platinum Partner",
  144. "productionOwner": "Marco-Acct7-Desk",
  145. "accountOwner": "Hazel (Desk 2)"
  146. },
  147. {
  148. "displayNumber": "MD2639701",
  149. "orderId": 39701,
  150. "orderStatus": "Proof Signed Off",
  151. "placedAt": "2026-07-30T17:25:03",
  152. "inHandDate": "2026-08-11T00:00:00",
  153. "userGroup": null,
  154. "productionOwner": "Marco-Acct7-Desk",
  155. "accountOwner": "Hazel (Desk 2)"
  156. },
  157. {
  158. "displayNumber": "MD2639718",
  159. "orderId": 39718,
  160. "orderStatus": "Proof Out",
  161. "placedAt": "2026-07-31T11:02:35",
  162. "inHandDate": "2026-08-14T00:00:00",
  163. "userGroup": "Platinum Partner",
  164. "productionOwner": "Rafael-Prod-Desk",
  165. "accountOwner": "Sam-Accounts-Desk"
  166. },
  167. {
  168. "displayNumber": "MD2639738",
  169. "orderId": 39738,
  170. "orderStatus": "Proof Out",
  171. "placedAt": "2026-08-04T10:18:26",
  172. "inHandDate": "2026-08-19T00:00:00",
  173. "userGroup": null,
  174. "productionOwner": "Rafael-Prod-Desk",
  175. "accountOwner": "Sam-Accounts-Desk"
  176. },
  177. {
  178. "displayNumber": "MD2639752",
  179. "orderId": 39752,
  180. "orderStatus": "File Check",
  181. "placedAt": "2026-08-05T10:34:07",
  182. "inHandDate": "2026-08-20T00:00:00",
  183. "userGroup": null,
  184. "productionOwner": "Marco-Acct7-Desk",
  185. "accountOwner": "Hazel (Desk 2)"
  186. },
  187. {
  188. "displayNumber": "MD2639761",
  189. "orderId": 39761,
  190. "orderStatus": "Proof Out",
  191. "placedAt": "2026-08-05T17:19:35",
  192. "inHandDate": "2026-08-14T00:00:00",
  193. "userGroup": "Platinum Partner",
  194. "productionOwner": "Rafael-Prod-Desk",
  195. "accountOwner": "Sam-Accounts-Desk"
  196. },
  197. {
  198. "displayNumber": "MD2639767",
  199. "orderId": 39767,
  200. "orderStatus": "Proof Out",
  201. "placedAt": "2026-08-06T10:06:37",
  202. "inHandDate": "2026-08-18T00:00:00",
  203. "userGroup": "Retail",
  204. "productionOwner": "Rafael-Prod-Desk",
  205. "accountOwner": "Sam-Accounts-Desk"
  206. },
  207. {
  208. "displayNumber": "MD2639770",
  209. "orderId": 39770,
  210. "orderStatus": "Proof Signed Off",
  211. "placedAt": "2026-08-06T17:40:12",
  212. "inHandDate": "2026-08-18T00:00:00",
  213. "userGroup": "Retail",
  214. "productionOwner": "Rafael-Prod-Desk",
  215. "accountOwner": "Sam-Accounts-Desk"
  216. },
  217. {
  218. "displayNumber": "MD2639773",
  219. "orderId": 39773,
  220. "orderStatus": "Proof Out",
  221. "placedAt": "2026-08-06T13:06:35",
  222. "inHandDate": "2026-08-19T00:00:00",
  223. "userGroup": "Platinum Partner",
  224. "productionOwner": "Marco-Acct7-Desk",
  225. "accountOwner": "Hazel (Desk 2)"
  226. },
  227. {
  228. "displayNumber": "MD2639779",
  229. "orderId": 39779,
  230. "orderStatus": "Proof Out",
  231. "placedAt": "2026-08-07T09:36:03",
  232. "inHandDate": "2026-08-20T00:00:00",
  233. "userGroup": "Retail",
  234. "productionOwner": "Rafael-Prod-Desk",
  235. "accountOwner": "Sam-Accounts-Desk"
  236. },
  237. {
  238. "displayNumber": "MD2639780",
  239. "orderId": 39780,
  240. "orderStatus": "Proof Signed Off",
  241. "placedAt": "2026-08-07T17:13:31",
  242. "inHandDate": "2026-08-21T00:00:00",
  243. "userGroup": "Platinum Partner",
  244. "productionOwner": "Marco-Acct7-Desk",
  245. "accountOwner": "Hazel (Desk 2)"
  246. }
  247. ]