fix(Items): Remove bulk actions.

fix(Settings): Parse the fetched settings from the storage.
This commit is contained in:
a.bouhuolia
2021-03-22 11:35:21 +02:00
parent 55771348b5
commit 1f6aca63e2
11 changed files with 265 additions and 289 deletions

View File

@@ -30,4 +30,24 @@ export default class SettingsService {
await settings.save();
}
}
/**
* Validates the given options is defined or either not.
* @param {Array} options
* @return {Boolean}
*/
validateNotDefinedSettings(tenantId: number, options) {
const notDefined = [];
const settings = this.tenancy.settings(tenantId);
options.forEach((option) => {
const setting = settings.config.getMetaConfig(option.key, option.group);
if (!setting) {
notDefined.push(option);
}
});
return notDefined;
}
}