diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index ee1ec0da..2e5834c6 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -50,35 +50,12 @@ https://www.calculator.net/percent-calculator.html - Widgets to make for beta in order of priority **MUST HAVE*** - * LIST overdue workorders (booked on, in the past, not a closed status, passed completeby date) for current scheduleable user - criteria: - tags wo, woitem - -SELECT distinct(AWORKORDER.ID), - AWORKORDER.SERIAL, - AWORKORDER.completebydate, - ACUSTOMER.NAME, - AWORKORDER.NOTES -FROM AWORKORDER -LEFT JOIN AWORKORDERITEM ON AWORKORDER.ID = AWORKORDERITEM.WORKORDERID -LEFT JOIN AWORKORDERITEMSCHEDULEDUSER ON AWORKORDERITEM.ID = AWORKORDERITEMSCHEDULEDUSER.WORKORDERITEMID -LEFT JOIN AWORKORDERSTATUS ON (AWORKORDER.LASTSTATUSID = AWORKORDERSTATUS.ID) -LEFT JOIN ACUSTOMER ON (AWORKORDER.CUSTOMERID = ACUSTOMER.ID) -WHERE (LASTSTATUSID IS NULL OR AWORKORDERSTATUS.COMPLETED = FALSE) and aworkorder.completebydate < now() - AND AWORKORDERITEMSCHEDULEDUSER.userID = 10 -ORDER BY AWORKORDER.ID ASC - - - - - * LIST overdue workorders list not user centric available to service manager roles - criteria: - tags wo, woitem LINE/BAR Count of work orders created per day over time (from case 1882) criteria: timespan and INTERVAL tags wo + BAR % wo completed status vs not completed by completed date within interval query is all wo not completed that should be by now within the interval vs all that were completed within the interval, count up each, count up the total and present as a pct for that interval diff --git a/ayanova/src/api/dash-registry.js b/ayanova/src/api/dash-registry.js index 6a917b7f..33b8c7e7 100644 --- a/ayanova/src/api/dash-registry.js +++ b/ayanova/src/api/dash-registry.js @@ -5,6 +5,54 @@ const role = authorizationroles.AUTHORIZATION_ROLES; */ export default { registry: [ + { + roles: [ + role.BizAdmin, + role.BizAdminRestricted, + role.ServiceRestricted, + role.Service, + role.Accounting + ], + title: "DashboardCountWorkOrdersCreated", + icon: "$ayiChartLine", + type: "GzDashWorkOrderCreatedCountLine", + scheduleableUserOnly: false, + singleOnly: false, + settings: { + customTitle: null, + timeSpan: "*thisyear*", + interval: "day", + wotags: [], + wotagsany: true, + woitemtags: [], + woitemtagsany: true, + color: "#00205B" + } + }, + { + roles: [ + role.BizAdmin, + role.BizAdminRestricted, + role.ServiceRestricted, + role.Service, + role.Accounting + ], + title: "DashboardCountWorkOrdersCreated", + icon: "$ayiChartBar", + type: "GzDashWorkOrderCreatedCountBar", + scheduleableUserOnly: false, + singleOnly: false, + settings: { + customTitle: null, + timeSpan: "*thisyear*", + wotags: [], + wotagsany: true, + woitemtags: [], + woitemtagsany: true, + interval: "month", + color: "#00205B" + } + }, { roles: [ role.BizAdmin, @@ -254,6 +302,10 @@ export default { }, async cacheTranslationsForAvailableItems() { const items = this.availableItems(); - await window.$gz.translation.cacheTranslations(items.map(z => z.title)); + + //await window.$gz.translation.cacheTranslations(items.map(z => z.title)); + await window.$gz.translation.cacheTranslations([ + ...new Set(items.map(z => z.title)) + ]); } }; diff --git a/ayanova/src/components/dash-work-order-created-count-bar.vue b/ayanova/src/components/dash-work-order-created-count-bar.vue new file mode 100644 index 00000000..5cc61abb --- /dev/null +++ b/ayanova/src/components/dash-work-order-created-count-bar.vue @@ -0,0 +1,388 @@ + + diff --git a/ayanova/src/components/dash-work-order-created-count-line.vue b/ayanova/src/components/dash-work-order-created-count-line.vue new file mode 100644 index 00000000..e39f8f49 --- /dev/null +++ b/ayanova/src/components/dash-work-order-created-count-line.vue @@ -0,0 +1,391 @@ + + diff --git a/ayanova/src/views/home-dashboard.vue b/ayanova/src/views/home-dashboard.vue index 67b7b12e..c24f3c3a 100644 --- a/ayanova/src/views/home-dashboard.vue +++ b/ayanova/src/views/home-dashboard.vue @@ -94,7 +94,8 @@ import GzDashWorkorderUnscheduledOpenList from "../components/dash-workorder-uns import GzDashCSROpenList from "../components/dash-csr-open-list.vue"; import GzDashWorkorderOverduePersonalList from "../components/dash-workorder-overdue-personal-list.vue"; import GzDashWorkorderOverdueAllList from "../components/dash-workorder-overdue-all-list.vue"; - +import GzDashWorkOrderCreatedCountLine from "../components/dash-work-order-created-count-line.vue"; +import GzDashWorkOrderCreatedCountBar from "../components/dash-work-order-created-count-bar.vue"; export default { components: { GzDashLaborHoursPersonalLine, @@ -107,7 +108,9 @@ export default { GzDashLaborHoursEveryoneLine, GzDashLaborHoursEveryoneBar, GzDashWorkorderOverduePersonalList, - GzDashWorkorderOverdueAllList + GzDashWorkorderOverdueAllList, + GzDashWorkOrderCreatedCountLine, + GzDashWorkOrderCreatedCountBar }, data() { return {