@7365admin1/layer-common 3.2.2-staging.154 → 3.2.2-staging.155

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.
@@ -357,6 +357,29 @@
357
357
  </h2>
358
358
  </div>
359
359
 
360
+ <!--
361
+ THE TWO SERIES COLOURS STAY LITERAL, AND HERE IS WHY.
362
+
363
+ Everything else in this chart already follows the theme - the gridlines,
364
+ the axis labels and the ring around each dot are all Vuetify theme vars.
365
+ The two series are not, and they are the only chart colours in the file
366
+ that are still hexes.
367
+
368
+ They are left that way deliberately. The handoff names no chart palette
369
+ at all (searched: no "chart", no "legend", no "graph", and neither hex
370
+ appears anywhere in it), so the fallback rule is "use the token the
371
+ literal was already imitating". `#e53935` is plainly `--err`. `#ff9b9b`
372
+ is a second, softer red, and the palette has no second red - the only
373
+ other red token is `--err-bg`, a 10%-alpha FILL that would be invisible
374
+ as a 3px line. Re-pointing just one of them would collapse the pair in
375
+ dark mode, where `--err` is `rgb(229,115,115)` and would sit almost on
376
+ top of `#ff9b9b`'s `rgb(255,155,155)` - two lines the reader could no
377
+ longer tell apart. That is the same "do not merge two series into one
378
+ colour" trap as the Work Order Status bars below.
379
+
380
+ So: a two-series chart palette is missing from the design system, and
381
+ that is a designer question, not something to invent here.
382
+ -->
360
383
  <div v-if="hasChartData" class="mt-4" ref="chartContainerRef">
361
384
  <svg
362
385
  :viewBox="`0 0 ${chartWidth} 260`"
@@ -2473,6 +2496,29 @@ const todayAttentions = computed(() =>
2473
2496
  normalizeListItems(["todayAttentions", "attentions"])
2474
2497
  );
2475
2498
 
2499
+ /**
2500
+ * THE WORK ORDER STATUS BARS.
2501
+ *
2502
+ * Was three hand-picked hexes - `#2fb84d` green, `#f12d2d` red, `#ff8900`
2503
+ * orange - and blind to the theme: the SAME three bars in light and in dark,
2504
+ * because a literal cannot follow a theme. Each is re-pointed at the token
2505
+ * whose hue it was already imitating, which is the same treatment the KPI
2506
+ * tiles got, and which keeps all three bars distinguishable.
2507
+ *
2508
+ * ONE OF THEM DOES NOT AGREE WITH `utils/status.ts`, ON PURPOSE.
2509
+ * That file maps `completed -> ok` and `pending -> warn` (both honoured here),
2510
+ * but it also maps `in progress -> warn` - the SAME tone as `pending`. Applying
2511
+ * it literally would paint two of these three bars the same amber and make the
2512
+ * chart unreadable, which is a regression, not a fix. So "In Progress" keeps
2513
+ * the tone it is drawn in today (`--err`, the token `#f12d2d` was imitating)
2514
+ * and this stays a colour change with no behaviour change.
2515
+ *
2516
+ * That leaves a real inconsistency to settle: on this very page the "In
2517
+ * Progress" feedback CHIP is amber (`warn`) while this bar is red. Resolving it
2518
+ * means either giving `in progress` its own tone in `utils/status.ts` - which
2519
+ * is shared by every chip in the estate - or ruling that a chart series is not
2520
+ * a status chip. Both are design decisions, so neither is taken here.
2521
+ */
2476
2522
  const workOrderStatus = computed(() => {
2477
2523
  const summary = finalDashboardData.value?.workOrderStatusSummary;
2478
2524
  const metric = getMetric(["openWorkOrder", "workOrders", "workOrder"]);
@@ -2493,19 +2539,19 @@ const workOrderStatus = computed(() => {
2493
2539
  label: "Completed",
2494
2540
  value: completed,
2495
2541
  percent: (completed / max) * 100,
2496
- color: "#2fb84d",
2542
+ color: "var(--ok)",
2497
2543
  },
2498
2544
  {
2499
2545
  label: "In Progress",
2500
2546
  value: inProgress,
2501
2547
  percent: (inProgress / max) * 100,
2502
- color: "#f12d2d",
2548
+ color: "var(--err)",
2503
2549
  },
2504
2550
  {
2505
2551
  label: "Pending",
2506
2552
  value: pending,
2507
2553
  percent: (pending / max) * 100,
2508
- color: "#ff8900",
2554
+ color: "var(--warn)",
2509
2555
  },
2510
2556
  ];
2511
2557
  });
@@ -3945,32 +3991,53 @@ function formatDashboardTime(value?: string) {
3945
3991
  text-transform: capitalize;
3946
3992
  }
3947
3993
 
3948
- /* Was five pairs of literal pastels - the same pale green on the dark page,
3949
- and none of them the tones the rest of the product uses. */
3994
+ /* THESE FIVE ARE LITERAL ON PURPOSE - THE PRINT VIEW IS PAPER.
3995
+ *
3996
+ * `.print-dashboard-view` above pins its surface to `#ffffff` and its ink to
3997
+ * `#1e293b` in BOTH themes, because a printed page is white however the app is
3998
+ * themed. Putting the status tokens on these badges therefore did the opposite
3999
+ * of what tokenising usually does: it let the SCREEN theme reach a surface that
4000
+ * does not follow it. Measured on the print branch at 1440:
4001
+ *
4002
+ * light In Progress rgb(59,111,212) on rgb(235,241,251) 4.20:1
4003
+ * light Completed rgb(15,138,98) on rgb(231,243,239) 3.82:1
4004
+ * dark In Progress rgb(125,166,236) on rgb(239,244,253) 2.23:1
4005
+ * dark Completed rgb(65,199,149) on rgb(232,248,242) 1.93:1
4006
+ *
4007
+ * The dark rows are the defect: the dark-theme INK composited over the white
4008
+ * paper the print view forces, so anyone who exports the dashboard while the
4009
+ * app is in dark mode gets washed-out badges - 1.93:1, the lowest reading taken
4010
+ * on this component. So these go back to fixed pastels, and specifically to the
4011
+ * SAME five pairs the Word export writes into its own stylesheet further up, so
4012
+ * the on-page print view and the exported document finally match.
4013
+ *
4014
+ * Same rule as the signature pad: a surface that does not follow the theme must
4015
+ * not be painted with tokens that do.
4016
+ */
3950
4017
  .badge-success {
3951
- background-color: var(--ok-bg);
3952
- color: var(--ok);
4018
+ background-color: #d1fae5;
4019
+ color: #065f46;
3953
4020
  }
3954
4021
 
3955
4022
  .badge-info {
3956
- background-color: var(--info-bg);
3957
- color: var(--info);
4023
+ background-color: #e0f2fe;
4024
+ color: #075985;
3958
4025
  }
3959
4026
 
3960
4027
  .badge-danger,
3961
4028
  .badge-error {
3962
- background-color: var(--err-bg);
3963
- color: var(--err);
4029
+ background-color: #fee2e2;
4030
+ color: #991b1b;
3964
4031
  }
3965
4032
 
3966
4033
  .badge-warning {
3967
- background-color: var(--warn-bg);
3968
- color: var(--warn);
4034
+ background-color: #fef3c7;
4035
+ color: #92400e;
3969
4036
  }
3970
4037
 
3971
4038
  .badge-neutral {
3972
- background-color: var(--hover);
3973
- color: var(--text2);
4039
+ background-color: #f1f5f9;
4040
+ color: #475569;
3974
4041
  }
3975
4042
 
3976
4043
  /* ------------------------------------------------------------------ */
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "3.2.2-staging.154",
5
+ "version": "3.2.2-staging.155",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",