@7365admin1/module-hygiene 4.28.1-staging.8 → 4.28.1
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.
- package/CHANGELOG.md +30 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @7365admin1/module-hygiene
|
|
2
2
|
|
|
3
|
+
## 4.28.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0166aeb: Hygiene dashboard metrics: report the selected period honestly instead of fabricating figures
|
|
8
|
+
|
|
9
|
+
The dashboard's metric calculations were computed inline inside
|
|
10
|
+
`hygiene-dashboard.repository.ts` and were wrong in four ways. They now live in
|
|
11
|
+
`src/utils/hygiene-dashboard-metrics.util.ts`, covered by unit tests (`yarn test`),
|
|
12
|
+
so a change to a metric fails a test rather than a screen. What a consumer of the
|
|
13
|
+
dashboard endpoints sees change:
|
|
14
|
+
|
|
15
|
+
- **Trend comparisons follow the selected period.** The "vs previous" figure was
|
|
16
|
+
always computed against yesterday, whatever range the user picked, so a
|
|
17
|
+
month-to-month comparison was really a day-to-day one. It now compares the
|
|
18
|
+
selected period against the period immediately before it.
|
|
19
|
+
- **Day boundaries are Singapore time.** Period start/end were taken from the
|
|
20
|
+
server host's midnight, so a host on UTC put work into the wrong day. All
|
|
21
|
+
boundaries are now computed in `Asia/Singapore`.
|
|
22
|
+
- **No invented percentages on an empty prior period.** When the previous period
|
|
23
|
+
had no data, the change was reported as `100%` (or `0`) as if measured. It now
|
|
24
|
+
returns `null`, so the UI can show "no comparison available" rather than a
|
|
25
|
+
number nobody can reproduce.
|
|
26
|
+
- **The supply alert percentage is no longer hard-coded.** It was emitted as a
|
|
27
|
+
fixed value regardless of stock; it is now derived, and reports its reason when
|
|
28
|
+
there is no prior period to compare against.
|
|
29
|
+
|
|
30
|
+
No API surface changes and no consumer code change is required — the same fields
|
|
31
|
+
are returned, with `null` now possible where a comparison genuinely cannot be made.
|
|
32
|
+
|
|
3
33
|
## 4.28.0
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|