hvp-shared 14.1.0 → 14.3.0

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.
@@ -79,12 +79,15 @@ export interface GetChecklistViewQuery {
79
79
  */
80
80
  export interface RecordChecklistStatusItem {
81
81
  activityId: string;
82
- status: ChecklistCompletionStatus;
82
+ /** Required unless `clear` is true. */
83
+ status?: ChecklistCompletionStatus;
83
84
  /** who did it; defaults to [current user]. Multiple for shared tasks. */
84
85
  performedByIds?: string[];
85
86
  /** optional reason when status is "skipped" / "not_done" */
86
87
  skipReason?: string;
87
88
  notes?: string;
89
+ /** When true, REMOVE the day's cell for this activity (un-mark / undo). */
90
+ clear?: boolean;
88
91
  }
89
92
  /**
90
93
  * Batch upsert the day's status for one branch (idempotent per activity).
@@ -59,6 +59,10 @@ export interface ChecklistActivityStat {
59
59
  skippedDays: number;
60
60
  /** distinct days marked "No se pudo" */
61
61
  notDoneDays: number;
62
+ /** times it was due in the period per its cadence (0 if no cadence) */
63
+ expectedDays: number;
64
+ /** due but NO record at all (expected − done − skipped − notDone, clamped ≥0) */
65
+ missedDays: number;
62
66
  }
63
67
  /**
64
68
  * Per-collaborator rollup over the period: how many activity cells each person
@@ -73,6 +77,8 @@ export interface ChecklistCollaboratorStat {
73
77
  skippedCount: number;
74
78
  /** cells marked "No se pudo" the person recorded */
75
79
  notDoneCount: number;
80
+ /** sum of estimatedMinutes of the DONE activities credited to the person */
81
+ doneMinutes: number;
76
82
  }
77
83
  /**
78
84
  * Per-branch checklist statistics over a period.
@@ -86,6 +92,12 @@ export interface ChecklistBranchStats {
86
92
  skippedCount: number;
87
93
  /** matrix cells with status not_done in range */
88
94
  notDoneCount: number;
95
+ /** sum of estimatedMinutes of DONE cells in range */
96
+ doneMinutes: number;
97
+ /** total due occurrences in range across this branch's activities */
98
+ expectedCount: number;
99
+ /** due but NO record at all in range (sum of activities' missedDays) */
100
+ missedCount: number;
89
101
  /** master activities currently overdue at this branch */
90
102
  overdueActivityCount: number;
91
103
  byActivity: ChecklistActivityStat[];
@@ -105,6 +117,12 @@ export interface ChecklistStatsResponse {
105
117
  totalDone: number;
106
118
  /** all acted cells in range (done + skipped + not_done) */
107
119
  totalActions: number;
120
+ /** sum of estimatedMinutes of all DONE cells in range */
121
+ totalDoneMinutes: number;
122
+ /** total due occurrences in range (cadence-based) */
123
+ totalExpected: number;
124
+ /** due but NO record at all in range */
125
+ totalMissed: number;
108
126
  }
109
127
  /**
110
128
  * A one-off "pendiente" — created on the fly, stays open per branch across shifts
@@ -23,6 +23,8 @@ export interface ChecklistTodayStatus {
23
23
  notes: string;
24
24
  /** when the latest action was recorded today */
25
25
  lastActionAt: string | null;
26
+ /** who last registered/updated this cell (the reporter, not the performer) */
27
+ recordedById: string | null;
26
28
  }
27
29
  /**
28
30
  * One row in the day view: a master activity plus its last-done history and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "14.1.0",
3
+ "version": "14.3.0",
4
4
  "description": "Shared types and utilities for HVP backend and frontend",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",