diff options
Diffstat (limited to 'modern/src/common')
-rw-r--r-- | modern/src/common/attributes/useCommonUserAttributes.js | 4 | ||||
-rw-r--r-- | modern/src/common/util/useFeatures.js | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/modern/src/common/attributes/useCommonUserAttributes.js b/modern/src/common/attributes/useCommonUserAttributes.js index 81ceaca7..791f46d4 100644 --- a/modern/src/common/attributes/useCommonUserAttributes.js +++ b/modern/src/common/attributes/useCommonUserAttributes.js @@ -37,6 +37,10 @@ export default (t) => useMemo(() => ({ name: t('attributeUiDisableGroups'), type: 'boolean', }, + 'ui.disableAttributes': { + name: t('attributeUiDisableAttributes'), + type: 'boolean', + }, 'ui.disableEvents': { name: t('attributeUiDisableEvents'), type: 'boolean', diff --git a/modern/src/common/util/useFeatures.js b/modern/src/common/util/useFeatures.js index 995fbf86..58c1bbf1 100644 --- a/modern/src/common/util/useFeatures.js +++ b/modern/src/common/util/useFeatures.js @@ -16,6 +16,7 @@ const get = (server, user, key) => { export default () => useSelector((state) => { const { server, user } = state.session; + const disableAttributes = get(server, user, 'ui.disableAttributes'); const disableVehicleFetures = get(server, user, 'ui.disableVehicleFetures'); const disableDrivers = disableVehicleFetures || get(server, user, 'ui.disableDrivers'); const disableMaintenance = disableVehicleFetures || get(server, user, 'ui.disableMaintenance'); @@ -25,6 +26,7 @@ export default () => useSelector((state) => { const disableCalendars = get(server, user, 'ui.disableCalendars'); return { + disableAttributes, disableDrivers, disableMaintenance, disableGroups, |