hide license info in about from non staff users

This commit is contained in:
2020-04-02 23:36:39 +00:00
parent 3420182a51
commit 3ddbdfd2a4
2 changed files with 88 additions and 38 deletions

View File

@@ -77,45 +77,50 @@
<span class="ml-6 body-1">{{ t("TimeZone") }}: </span>
<span class="body-2">{{ serverInfo.serverTimeZone }}</span>
</div>
<div v-if="canViewLicenseInfo()">
<v-divider class="mt-6"></v-divider>
<v-subheader>{{ t("HelpLicense") }}</v-subheader>
<div>
<span class="ml-6 body-1">{{ t("RegisteredUser") }}: </span>
<span class="body-2">{{
serverInfo.license.license.licensedTo
}}</span>
</div>
<div>
<span class="ml-6 body-1">{{ t("DatabaseID") }}: </span>
<span class="body-2">{{ serverInfo.license.license.dbId }}</span>
</div>
<div>
<span class="ml-6 body-1">{{ t("LicenseSerial") }}: </span>
<span class="body-2">{{
serverInfo.license.license.keySerial
}}</span>
</div>
<div>
<span class="ml-6 body-1">{{ t("LicenseExpiration") }}: </span>
<span class="body-2">{{
serverInfo.license.license.licenseExpiration
}}</span>
</div>
<div>
<span class="ml-6 body-1">{{ t("SupportedUntil") }}: </span>
<span class="body-2">{{
serverInfo.license.license.maintenanceExpiration
}}</span>
</div>
<v-divider class="mt-6"></v-divider>
<v-subheader>{{ t("HelpLicense") }}</v-subheader>
<div>
<span class="ml-6 body-1">{{ t("RegisteredUser") }}: </span>
<span class="body-2">{{
serverInfo.license.license.licensedTo
}}</span>
</div>
<div>
<span class="ml-6 body-1">{{ t("DatabaseID") }}: </span>
<span class="body-2">{{ serverInfo.license.license.dbId }}</span>
</div>
<div>
<span class="ml-6 body-1">{{ t("LicenseSerial") }}: </span>
<span class="body-2">{{ serverInfo.license.license.keySerial }}</span>
</div>
<div>
<span class="ml-6 body-1">{{ t("LicenseExpiration") }}: </span>
<span class="body-2">{{
serverInfo.license.license.licenseExpiration
}}</span>
</div>
<div>
<span class="ml-6 body-1">{{ t("SupportedUntil") }}: </span>
<span class="body-2">{{
serverInfo.license.license.maintenanceExpiration
}}</span>
</div>
<v-divider class="mt-6"></v-divider>
<v-subheader>{{ t("LicensedOptions") }}</v-subheader>
<v-divider class="mt-6"></v-divider>
<v-subheader>{{ t("LicensedOptions") }}</v-subheader>
<div
v-for="item in serverInfo.license.license.features"
:key="item.Feature"
>
<span class="ml-6 body-1">{{ item.Feature }}</span>
<span class="body-2">{{ item.Count ? ": " + item.Count : "" }}</span>
<div
v-for="item in serverInfo.license.license.features"
:key="item.Feature"
>
<span class="ml-6 body-1">{{ item.Feature }}</span>
<span class="body-2">{{
item.Count ? ": " + item.Count : ""
}}</span>
</div>
</div>
<v-divider class="mt-6"></v-divider>
@@ -174,6 +179,21 @@ export default {
},
locale() {
return window.$gz.locale;
},
canViewLicenseInfo() {
/*
Administrator = 1,
Schedulable = 2,
NonSchedulable = 3,
Customer = 4,
HeadOffice = 5,
Utility = 6,
Subcontractor = 7 */
return (
window.$gz.store.state.userType == 1 ||
window.$gz.store.state.userType == 2 ||
window.$gz.store.state.userType == 3
);
}
}
};