This commit is contained in:
@@ -13,6 +13,13 @@ export default {
|
||||
// title: "Priciest widgets (all time) ",
|
||||
// type: "GzDashTestListWidgetsPriciest"
|
||||
// },
|
||||
{
|
||||
id: "TestScheduleableOnly",
|
||||
roles: [role.Tech, role.TechRestricted],
|
||||
title: "TEST sched user widget",
|
||||
type: "NextSchedItem",
|
||||
scheduleableUserOnly: true
|
||||
},
|
||||
{
|
||||
id: "TestBarWidgetCountByUserType",
|
||||
roles: [
|
||||
@@ -22,7 +29,8 @@ export default {
|
||||
role.SalesRestricted
|
||||
],
|
||||
title: "TEST Bar chart widget",
|
||||
type: "GzDashTestBarWidgetCountByUserType"
|
||||
type: "GzDashTestBarWidgetCountByUserType",
|
||||
scheduleableUserOnly: false
|
||||
},
|
||||
{
|
||||
id: "TestLineWidgetMonthlyTotalPrice",
|
||||
@@ -33,7 +41,8 @@ export default {
|
||||
role.SalesRestricted
|
||||
],
|
||||
title: "TEST Line chart widget",
|
||||
type: "GzDashTestLineWidgetMonthlyTotalPrice"
|
||||
type: "GzDashTestLineWidgetMonthlyTotalPrice",
|
||||
scheduleableUserOnly: false
|
||||
},
|
||||
{
|
||||
id: "TestDayCalendarWidget",
|
||||
@@ -44,14 +53,23 @@ export default {
|
||||
role.SalesRestricted
|
||||
],
|
||||
title: "TEST calendar widget",
|
||||
type: "GzDashTestDayCalendarWidget"
|
||||
type: "GzDashTestDayCalendarWidget",
|
||||
scheduleableUserOnly: false
|
||||
}
|
||||
],
|
||||
availableItems() {
|
||||
const ret = [];
|
||||
for (let i = 0; i < this.registry.length; i++) {
|
||||
const item = this.registry[i];
|
||||
|
||||
if (authorizationroles.hasRole(item.roles)) {
|
||||
//if it's only for sched users and not then skip
|
||||
if (
|
||||
item.scheduleableUserOnly &&
|
||||
!window.$gz.store.getters.isScheduleableUser
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
ret.push({ id: item.id, title: item.title, type: item.type });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user