openchs-models 1.32.15 → 1.32.16
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/dist/Duration.js +1 -1
- package/dist/ReportCard.js +0 -4
- package/dist/Schema.js +7 -6
- package/package.json +1 -1
package/dist/Duration.js
CHANGED
|
@@ -16,7 +16,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
16
16
|
class Duration {
|
|
17
17
|
constructor(durationValue, durationUnit) {
|
|
18
18
|
this._durationValue = durationValue;
|
|
19
|
-
this.durationUnit = durationUnit
|
|
19
|
+
this.durationUnit = durationUnit;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
static inDay(value) {
|
package/dist/ReportCard.js
CHANGED
|
@@ -136,10 +136,6 @@ class ReportCard extends _BaseEntity.default {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
getStandardReportCardInputRecentDuration() {
|
|
139
|
-
if (_lodash.default.isEmpty(this.that.standardReportCardInputRecentDurationJSON)) {
|
|
140
|
-
return new _Duration.default(1, _Duration.default.Day);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
139
|
const duration = JSON.parse(this.that.standardReportCardInputRecentDurationJSON);
|
|
144
140
|
return new _Duration.default(duration.value, duration.unit);
|
|
145
141
|
}
|
package/dist/Schema.js
CHANGED
|
@@ -923,6 +923,13 @@ function createRealmConfig() {
|
|
|
923
923
|
}
|
|
924
924
|
|
|
925
925
|
if (oldDB.schemaVersion < 197) {
|
|
926
|
+
_lodash.default.forEach(newDB.objects("ReportCard"), reportCard => {
|
|
927
|
+
if (reportCard.standardReportCardType && ['Last 24 hours registrations', 'Last 24 hours enrolments', 'Last 24 hours visits'].includes(reportCard.standardReportCardType.name)) reportCard.standardReportCardInputRecentDurationJSON = JSON.stringify({
|
|
928
|
+
value: "1",
|
|
929
|
+
unit: "days"
|
|
930
|
+
});
|
|
931
|
+
});
|
|
932
|
+
|
|
926
933
|
_lodash.default.forEach(newDB.objects("StandardReportCardType"), standardReportCardType => {
|
|
927
934
|
if (standardReportCardType.name === 'Last 24 hours registrations') {
|
|
928
935
|
standardReportCardType.description = 'Recent registrations';
|
|
@@ -937,12 +944,6 @@ function createRealmConfig() {
|
|
|
937
944
|
}
|
|
938
945
|
|
|
939
946
|
standardReportCardType.type = _lodash.default.replace(_lodash.default.startCase(standardReportCardType.description), new RegExp(' ', 'g'), '');
|
|
940
|
-
});
|
|
941
|
-
|
|
942
|
-
_lodash.default.forEach(newDB.objects(_ReportCard.default.schema.name), card => {
|
|
943
|
-
card.standardReportCardInputSubjectTypes = [];
|
|
944
|
-
card.standardReportCardInputPrograms = [];
|
|
945
|
-
card.standardReportCardInputEncounterTypes = [];
|
|
946
947
|
}); //Reset MyDashboard cache because shape of filterJSON in cache has changed
|
|
947
948
|
|
|
948
949
|
|