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 });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,12 +79,14 @@ import DashRegistry from "../api/dash-registry";
|
||||
import GzDashTestBarWidgetCountByUserType from "../components/dash-test-bar-widget-count-by-usertype.vue";
|
||||
import GzDashTestLineWidgetMonthlyTotalPrice from "../components/dash-test-line-widget-monthly-total-price.vue";
|
||||
import GzDashTestDayCalendarWidget from "../components/dash-test-day-calendar-widget.vue";
|
||||
import NextSchedItem from "../components/dash-test-day-calendar-widget.vue";
|
||||
export default {
|
||||
components: {
|
||||
//GzDashTestListWidgetsPriciest,
|
||||
GzDashTestBarWidgetCountByUserType,
|
||||
GzDashTestLineWidgetMonthlyTotalPrice,
|
||||
GzDashTestDayCalendarWidget
|
||||
GzDashTestDayCalendarWidget,
|
||||
NextSchedItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user