openchs-models 1.32.11 → 1.32.13

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/Schema.js CHANGED
@@ -921,6 +921,28 @@ function createRealmConfig() {
921
921
  if (oldDB.schemaVersion < 191) {
922
922
  newDB.delete(newDB.objects("CustomDashboardCache"));
923
923
  }
924
+
925
+ if (oldDB.schemaVersion < 197) {
926
+ _lodash.default.forEach(newDB.objects("StandardReportCardType"), standardReportCardType => {
927
+ if (standardReportCardType.name === 'Last 24 hours registrations') {
928
+ standardReportCardType.description = 'Recent registrations';
929
+ }
930
+
931
+ if (standardReportCardType.name === 'Last 24 hours enrolments') {
932
+ standardReportCardType.description = 'Recent enrolments';
933
+ }
934
+
935
+ if (standardReportCardType.name === 'Last 24 hours visits') {
936
+ standardReportCardType.description = 'Recent visits';
937
+ }
938
+
939
+ standardReportCardType.type = _lodash.default.replace(_lodash.default.startCase(standardReportCardType.description), new RegExp(' ', 'g'), '');
940
+ }); //Reset MyDashboard cache because shape of filterJSON in cache has changed
941
+
942
+
943
+ const dashboardCache = newDB.objects("DashboardCache");
944
+ newDB.delete(dashboardCache);
945
+ }
924
946
  }
925
947
  };
926
948
  }
@@ -149,8 +149,7 @@ _defineProperty(StandardReportCardType, "schema", {
149
149
  optional: true
150
150
  },
151
151
  type: {
152
- type: "string",
153
- optional: true
152
+ type: "string"
154
153
  },
155
154
  voided: {
156
155
  type: "bool",
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.32.11",
4
+ "version": "1.32.13",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",