openchs-models 1.33.52 → 1.33.53

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.
Files changed (2) hide show
  1. package/dist/Session.js +6 -2
  2. package/package.json +1 -1
package/dist/Session.js CHANGED
@@ -107,9 +107,13 @@ class Session extends _BaseEntity.default {
107
107
 
108
108
  // Caller iterates the returned records and persists them in the same realm.write.
109
109
  // rosterByStudentUUID: { [studentUUID]: { status: 'Present'|'Absent', reasonConceptUUID?: string } }
110
- markHeld(rosterByStudentUUID) {
110
+ // reasonConceptUUID: optional session-level reason. Required by the server for
111
+ // Mark-Anyway-Held (Held on weekly_off/public_holiday); ignored on a working day.
112
+ // Default null preserves prior semantics (e.g. re-mark-Held after DidntHappen
113
+ // clears the previously-stored reason).
114
+ markHeld(rosterByStudentUUID, reasonConceptUUID = null) {
111
115
  this.status = Session.status.HELD;
112
- this.reasonConceptUUID = null;
116
+ this.reasonConceptUUID = reasonConceptUUID || null;
113
117
  this.markedAt = new Date();
114
118
  const records = [];
115
119
  _lodash.default.forOwn(rosterByStudentUUID || {}, (entry, studentUUID) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "openchs-models",
3
3
  "description": "OpenCHS data model to be used by front end clients",
4
- "version": "1.33.52",
4
+ "version": "1.33.53",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",