@sumaris-net/ngx-components 18.5.13 → 18.5.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/esm2022/src/app/core/account/account.page.mjs +16 -15
- package/esm2022/src/app/core/services/account.service.mjs +1 -1
- package/fesm2022/sumaris-net.ngx-components.mjs +14 -13
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/manifest.json +1 -1
|
@@ -38435,16 +38435,16 @@ class AccountPage extends AppForm {
|
|
|
38435
38435
|
async setValue(data, opts) {
|
|
38436
38436
|
super.setValue(data, opts);
|
|
38437
38437
|
// Set options
|
|
38438
|
-
|
|
38439
|
-
|
|
38440
|
-
|
|
38441
|
-
.
|
|
38442
|
-
|
|
38443
|
-
|
|
38444
|
-
|
|
38445
|
-
|
|
38446
|
-
|
|
38447
|
-
|
|
38438
|
+
if (isNotEmptyArray(this.optionDefinitions) && this.propertiesTable) {
|
|
38439
|
+
const properties = data?.settings?.asLocalSettings()?.properties || {};
|
|
38440
|
+
const propertiesEntities = [];
|
|
38441
|
+
this.optionDefinitions
|
|
38442
|
+
.map((definition) => definition.key)
|
|
38443
|
+
.forEach((key) => {
|
|
38444
|
+
if (isNotNil(properties[key])) {
|
|
38445
|
+
propertiesEntities.push(PropertyEntity.fromObject({ id: key, value: properties[key] }));
|
|
38446
|
+
}
|
|
38447
|
+
});
|
|
38448
38448
|
await this.propertiesTable.ready();
|
|
38449
38449
|
this.propertiesTable.value = propertiesEntities;
|
|
38450
38450
|
}
|
|
@@ -38506,7 +38506,7 @@ class AccountPage extends AppForm {
|
|
|
38506
38506
|
...this.accountService.account.asObject(),
|
|
38507
38507
|
...this.form.value,
|
|
38508
38508
|
});
|
|
38509
|
-
if (this.propertiesTable) {
|
|
38509
|
+
if (isNotEmptyArray(this.optionDefinitions) && this.propertiesTable) {
|
|
38510
38510
|
// merge properties
|
|
38511
38511
|
await this.propertiesTable.save();
|
|
38512
38512
|
const propertyEntities = this.propertiesTable.value || [];
|
|
@@ -38517,8 +38517,9 @@ class AccountPage extends AppForm {
|
|
|
38517
38517
|
const newProperties = { ...newAccount.settings.content['properties'], ...properties };
|
|
38518
38518
|
newAccount.settings.merge({ properties: newProperties }, ['properties']);
|
|
38519
38519
|
}
|
|
38520
|
-
else {
|
|
38521
|
-
|
|
38520
|
+
else if (newAccount.settings.content['properties']) {
|
|
38521
|
+
// Clean properties
|
|
38522
|
+
delete newAccount.settings.content['properties'];
|
|
38522
38523
|
}
|
|
38523
38524
|
if (this.tokensTable) {
|
|
38524
38525
|
await this.tokensTable.save();
|