@sumaris-net/ngx-components 18.23.6 → 18.23.8
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/esm2022/src/app/admin/users/person.validator.mjs +4 -2
- package/esm2022/src/app/admin/users/users.mjs +2 -1
- package/esm2022/src/app/core/register/register.form.mjs +3 -3
- package/fesm2022/sumaris-net.ngx-components.mjs +6 -3
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/inputs.d.ts +1 -1
- package/src/assets/manifest.json +1 -1
|
@@ -32750,7 +32750,9 @@ class PersonValidatorService extends AppValidatorService {
|
|
|
32750
32750
|
formConfig.usernameExtranet = [(data && data.usernameExtranet) || null, Validators.minLength(2)];
|
|
32751
32751
|
}
|
|
32752
32752
|
// Add additional fields
|
|
32753
|
-
this.accountService.additionalFields
|
|
32753
|
+
this.accountService.additionalFields
|
|
32754
|
+
.filter(field => field.extra.registration || field.extra.account)
|
|
32755
|
+
.forEach((field) => {
|
|
32754
32756
|
//console.debug("[register-form] Add additional field {" + field.name + "} to form", field);
|
|
32755
32757
|
formConfig[field.key] = [(data && data[field.key]) || null, this.getValidators(field)];
|
|
32756
32758
|
});
|
|
@@ -32895,10 +32897,10 @@ class RegisterForm {
|
|
|
32895
32897
|
// Add additional fields to details form
|
|
32896
32898
|
this.additionalFields = this.accountService.additionalFields
|
|
32897
32899
|
// Keep only required fields
|
|
32898
|
-
.filter((field) => field.extra?.registration
|
|
32900
|
+
.filter((field) => field.extra?.registration && field.extra.registration.disabled !== false);
|
|
32899
32901
|
this.additionalFields.forEach((field) => {
|
|
32900
32902
|
//if (this.debug) console.debug("[register-form] Add additional field {" + field.name + "} to form", field);
|
|
32901
|
-
formDetailDef[field.key] = new UntypedFormControl(null, this.accountValidatorService.getValidators(field, field.extra
|
|
32903
|
+
formDetailDef[field.key] = new UntypedFormControl(null, this.accountValidatorService.getValidators(field, field.extra.registration.required));
|
|
32902
32904
|
if (field.autocomplete && (field.type === 'entity' || field.type === 'entities' || field.type === 'enums')) {
|
|
32903
32905
|
field.autocomplete = this.autocompleteHelper.add(field.key, field.autocomplete);
|
|
32904
32906
|
}
|
|
@@ -47039,6 +47041,7 @@ class UsersPage extends AppTable {
|
|
|
47039
47041
|
this.defaultSortDirection = 'asc';
|
|
47040
47042
|
// Initialize additional fields first
|
|
47041
47043
|
this.additionalFields = (this.accountService.additionalFields || [])
|
|
47044
|
+
.filter(field => field.extra?.users && field.extra.users.disabled !== true)
|
|
47042
47045
|
.filter((field) => isNotNil(field.autocomplete))
|
|
47043
47046
|
.map((field) => {
|
|
47044
47047
|
// Make sure to get the final autocomplete config (e.g. with a suggestFn function)
|