@7365admin1/layer-common 3.2.2-staging.156 → 3.2.2-staging.158

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.
@@ -66,7 +66,7 @@
66
66
  :y="label.y"
67
67
  text-anchor="end"
68
68
  alignment-baseline="middle"
69
- style="fill: #7e8b96; font-size: 11px; font-weight: 500"
69
+ style="fill: #64748b; font-size: 11px; font-weight: 500"
70
70
  >
71
71
  {{ label.text }}
72
72
  </text>
@@ -112,14 +112,15 @@
112
112
  :x="label.x"
113
113
  y="246"
114
114
  text-anchor="middle"
115
- style="fill: #7e8b96; font-size: 12px; font-weight: 600"
115
+ style="fill: #64748b; font-size: 12px; font-weight: 600"
116
116
  >
117
117
  {{ label.text }}
118
118
  </text>
119
119
  </svg>
120
120
  <div class="d-flex align-center justify-center ga-5 mt-2">
121
121
  <span
122
- class="d-inline-flex align-center ga-2 text-caption font-weight-bold text-blue-grey"
122
+ class="d-inline-flex align-center ga-2 text-caption font-weight-bold"
123
+ style="color: #64748b"
123
124
  >
124
125
  <span
125
126
  class="rounded-circle"
@@ -133,7 +134,8 @@
133
134
  {{ primaryLegendLabel }}
134
135
  </span>
135
136
  <span
136
- class="d-inline-flex align-center ga-2 text-caption font-weight-bold text-blue-grey"
137
+ class="d-inline-flex align-center ga-2 text-caption font-weight-bold"
138
+ style="color: #64748b"
137
139
  >
138
140
  <span
139
141
  class="rounded-circle"
@@ -1621,14 +1623,23 @@ const finalDashboardData = computed<Record<string, any>>(() => {
1621
1623
  ];
1622
1624
  }
1623
1625
 
1626
+ // `weekly-activity` returns each interval twice over: `openWorkOrder` and
1627
+ // `workOrder` are the same not-yet-completed count, `closedWorkOrder` and
1628
+ // `taskCompleted` the same completed count. Carry BOTH names - the Word export
1629
+ // reads `workOrders`/`taskCompleted`, and the open/closed pair is what tells
1630
+ // the chart legend these are work orders and not checklist tasks.
1631
+ const openSeries = weeklyActivity.map(
1632
+ (item: any) => item.workOrder ?? item.openWorkOrder
1633
+ );
1634
+ const closedSeries = weeklyActivity.map(
1635
+ (item: any) => item.taskCompleted ?? item.closedWorkOrder
1636
+ );
1624
1637
  const activityChart = {
1625
1638
  labels: weeklyActivity.map((item: any) => item.day || item.label),
1626
- workOrders: weeklyActivity.map(
1627
- (item: any) => item.workOrder ?? item.openWorkOrder
1628
- ),
1629
- taskCompleted: weeklyActivity.map(
1630
- (item: any) => item.taskCompleted ?? item.closedWorkOrder
1631
- ),
1639
+ workOrders: openSeries,
1640
+ taskCompleted: closedSeries,
1641
+ openWorkOrder: openSeries,
1642
+ closedWorkOrder: closedSeries,
1632
1643
  };
1633
1644
 
1634
1645
  if (isHygieneMode.value) {
@@ -2387,8 +2398,12 @@ const primarySeries = computed(() =>
2387
2398
  const secondarySeries = computed(() =>
2388
2399
  normalizeSeries(activityChart.value.secondary, chartLabels.value.length)
2389
2400
  );
2390
- const primaryLegendLabel = computed(() => "Closed Work Order");
2391
- const secondaryLegendLabel = computed(() => "Open Work Order");
2401
+ // The legend must name the series it is drawn beside. These were hard-coded, and
2402
+ // hard-coded the wrong way round: the primary line is the OPEN work orders and
2403
+ // was labelled "Closed Work Order". `normalizeActivityChart()` already works out
2404
+ // what each series is from the payload it found - read that instead of guessing.
2405
+ const primaryLegendLabel = computed(() => activityChart.value.primaryLabel);
2406
+ const secondaryLegendLabel = computed(() => activityChart.value.secondaryLabel);
2392
2407
  const chartMax = computed(() =>
2393
2408
  Math.max(1, ...primarySeries.value, ...secondarySeries.value)
2394
2409
  );
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.156",
5
+ "version": "3.2.2-staging.158",
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.",