openchs-models 1.30.13 → 1.30.14
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/Makefile +1 -1
- package/dist/Individual.js +1 -1
- package/dist/Schema.js +7 -12
- package/dist/SubjectType.js +13 -0
- package/package.json +1 -1
package/Makefile
CHANGED
|
@@ -15,7 +15,7 @@ release:
|
|
|
15
15
|
git pull --tags
|
|
16
16
|
git pull --rebase
|
|
17
17
|
@echo "Ensure version changes follow semantic versioning - https://classic.yarnpkg.com/en/docs/dependency-versions#toc-semantic-versioning"
|
|
18
|
-
yarn version
|
|
18
|
+
yarn version --patch
|
|
19
19
|
@echo " Now please run \nmake publish"
|
|
20
20
|
|
|
21
21
|
publish:
|
package/dist/Individual.js
CHANGED
|
@@ -540,7 +540,7 @@ class Individual extends _BaseEntity.default {
|
|
|
540
540
|
}
|
|
541
541
|
|
|
542
542
|
validateLastName() {
|
|
543
|
-
return this.validateName(this.lastName, Individual.validationKeys.LAST_NAME, this.subjectType.validLastNameFormat);
|
|
543
|
+
return this.validateName(this.lastName, Individual.validationKeys.LAST_NAME, this.subjectType.validLastNameFormat, !this.subjectType.lastNameOptional);
|
|
544
544
|
}
|
|
545
545
|
|
|
546
546
|
validateRegistrationLocation() {
|
package/dist/Schema.js
CHANGED
|
@@ -198,7 +198,7 @@ const entities = [_DashboardFilter.default, _LocaleMapping.default, _Settings.de
|
|
|
198
198
|
function createRealmConfig() {
|
|
199
199
|
return {
|
|
200
200
|
//order is important, should be arranged according to the dependency
|
|
201
|
-
schemaVersion:
|
|
201
|
+
schemaVersion: 175,
|
|
202
202
|
migration: function (oldDB, newDB) {
|
|
203
203
|
console.log("[AvniModels.Schema]", `Running migration with old schema version: ${oldDB.schemaVersion} and new schema version: ${newDB.schemaVersion}`);
|
|
204
204
|
|
|
@@ -728,18 +728,13 @@ function createRealmConfig() {
|
|
|
728
728
|
if (entityApprovalStatusSyncStatus[0]) {
|
|
729
729
|
newDB.delete(entityApprovalStatusSyncStatus);
|
|
730
730
|
}
|
|
731
|
-
}
|
|
732
|
-
// if (oldDB.schemaVersion < 171) {
|
|
733
|
-
// _.forEach([...newDB.objects("Settings")], (settings) => {
|
|
734
|
-
// settings.idpType = "";
|
|
735
|
-
// settings.keycloakGrantType = "";
|
|
736
|
-
// settings.keycloakScope = "";
|
|
737
|
-
// settings.keycloakClientId = "";
|
|
738
|
-
// settings.keycloakAuthServerUrl = "";
|
|
739
|
-
// settings.keycloakRealm = "";
|
|
740
|
-
// });
|
|
741
|
-
// }
|
|
731
|
+
}
|
|
742
732
|
|
|
733
|
+
if (oldDB.schemaVersion < 175) {
|
|
734
|
+
_lodash.default.forEach(newDB.objects(_SubjectType.default.schema.name), sub => {
|
|
735
|
+
sub.lastNameOptional = false;
|
|
736
|
+
});
|
|
737
|
+
}
|
|
743
738
|
}
|
|
744
739
|
};
|
|
745
740
|
}
|
package/dist/SubjectType.js
CHANGED
|
@@ -150,6 +150,14 @@ class SubjectType extends _ReferenceEntity.default {
|
|
|
150
150
|
this.that.allowMiddleName = x;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
get lastNameOptional() {
|
|
154
|
+
return this.that.lastNameOptional;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
set lastNameOptional(x) {
|
|
158
|
+
this.that.lastNameOptional = x;
|
|
159
|
+
}
|
|
160
|
+
|
|
153
161
|
get nameHelpText() {
|
|
154
162
|
return this.that.nameHelpText;
|
|
155
163
|
}
|
|
@@ -190,6 +198,7 @@ class SubjectType extends _ReferenceEntity.default {
|
|
|
190
198
|
subjectType.programEligibilityCheckRule = operationalSubjectType.programEligibilityCheckRule;
|
|
191
199
|
subjectType.uniqueName = operationalSubjectType.uniqueName;
|
|
192
200
|
subjectType.allowMiddleName = operationalSubjectType.allowMiddleName;
|
|
201
|
+
subjectType.lastNameOptional = operationalSubjectType.lastNameOptional;
|
|
193
202
|
subjectType.directlyAssignable = operationalSubjectType.directlyAssignable;
|
|
194
203
|
subjectType.allowProfilePicture = operationalSubjectType.allowProfilePicture;
|
|
195
204
|
subjectType.validFirstNameFormat = _Format.default.fromResource(operationalSubjectType["validFirstNameFormat"]);
|
|
@@ -321,6 +330,10 @@ _defineProperty(SubjectType, "schema", {
|
|
|
321
330
|
type: 'bool',
|
|
322
331
|
default: false
|
|
323
332
|
},
|
|
333
|
+
lastNameOptional: {
|
|
334
|
+
type: 'bool',
|
|
335
|
+
default: false
|
|
336
|
+
},
|
|
324
337
|
directlyAssignable: {
|
|
325
338
|
type: 'bool',
|
|
326
339
|
default: false
|