aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/util
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-07-15 18:45:44 -0700
committerAnton Tananaev <anton@traccar.org>2022-07-15 18:45:44 -0700
commit85a3576f3046f5bcf3bbac6ad952ef180762fd51 (patch)
tree2bf4f2ed43848ea5f1ec49fcfeb48a277bfe0436 /modern/src/common/util
parent09e1e536aea906ae62f2a361df07d4b4532e62c2 (diff)
downloadtrackermap-web-85a3576f3046f5bcf3bbac6ad952ef180762fd51.tar.gz
trackermap-web-85a3576f3046f5bcf3bbac6ad952ef180762fd51.tar.bz2
trackermap-web-85a3576f3046f5bcf3bbac6ad952ef180762fd51.zip
Option to hide attributes
Diffstat (limited to 'modern/src/common/util')
-rw-r--r--modern/src/common/util/useFeatures.js2
1 files changed, 2 insertions, 0 deletions
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,