From ed0e7dc77cd23800ab14d97d392b22d4326c690c Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 28 Jul 2021 19:09:37 +0000 Subject: [PATCH] PM Dawn --- ayanova/devdocs/todo.txt | 1 + ayanova/src/api/initialize.js | 12 +- ayanova/src/api/open-object-handler.js | 46 + ayanova/src/components/pm-header.vue | 666 ++++++ ayanova/src/components/pm-item-expenses.vue | 798 +++++++ ayanova/src/components/pm-item-labors.vue | 997 ++++++++ ayanova/src/components/pm-item-loans.vue | 885 +++++++ .../components/pm-item-outside-services.vue | 1098 +++++++++ ayanova/src/components/pm-item-parts.vue | 1129 +++++++++ .../components/pm-item-scheduled-users.vue | 710 ++++++ ayanova/src/components/pm-item-tasks.vue | 644 +++++ ayanova/src/components/pm-item-travels.vue | 976 ++++++++ ayanova/src/components/pm-item-units.vue | 850 +++++++ ayanova/src/components/pm-items.vue | 1249 ++++++++++ ayanova/src/router.js | 20 +- ayanova/src/views/svc-pm-list.vue | 21 - ayanova/src/views/svc-pm-templates.vue | 21 - ayanova/src/views/svc-pm.vue | 2102 +++++++++++++++++ ayanova/src/views/svc-pms.vue | 295 +++ ayanova/src/views/svc-quote-templates.vue | 21 - ayanova/src/views/svc-quote.vue | 3 - ayanova/src/views/svc-workorder-templates.vue | 21 - ayanova/src/views/svc-workorder.vue | 1 - 23 files changed, 12453 insertions(+), 113 deletions(-) create mode 100644 ayanova/src/components/pm-header.vue create mode 100644 ayanova/src/components/pm-item-expenses.vue create mode 100644 ayanova/src/components/pm-item-labors.vue create mode 100644 ayanova/src/components/pm-item-loans.vue create mode 100644 ayanova/src/components/pm-item-outside-services.vue create mode 100644 ayanova/src/components/pm-item-parts.vue create mode 100644 ayanova/src/components/pm-item-scheduled-users.vue create mode 100644 ayanova/src/components/pm-item-tasks.vue create mode 100644 ayanova/src/components/pm-item-travels.vue create mode 100644 ayanova/src/components/pm-item-units.vue create mode 100644 ayanova/src/components/pm-items.vue delete mode 100644 ayanova/src/views/svc-pm-list.vue delete mode 100644 ayanova/src/views/svc-pm-templates.vue create mode 100644 ayanova/src/views/svc-pm.vue create mode 100644 ayanova/src/views/svc-pms.vue delete mode 100644 ayanova/src/views/svc-quote-templates.vue delete mode 100644 ayanova/src/views/svc-workorder-templates.vue diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 1be1bd36..2d50dbac 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -515,6 +515,7 @@ CURRENTLY DOING: PM stuff: Pore over quote and PM and look for workorder remnants, particularly biz actions and rules Add back end rules as necessary for quotes and PM's Sanity checks for PM settings will be a must here + test help links Child->grandchild data lists for quotes and pm's like workorders release profit$ diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 3c3a19be..154517bd 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -330,16 +330,6 @@ function initNavPanel() { }); } - // //WORKORDER TEMPLATES LIST - //this will be an item inside the workorders NEW menu or grid or wherever but it's not top level worthy - //there used to be an array for 3rd level shit but that's whack yo! ;) - // subSub.push({ - // title: "WorkOrderServiceTemplate", - // icon: "fa - stamp", - // route: "/svc-workorder-templates", - // key: key++ - // }); - //QUOTE LIST if (window.$gz.role.canOpen(window.$gz.type.Quote)) { sub.push({ @@ -355,7 +345,7 @@ function initNavPanel() { sub.push({ title: "PMList", icon: "$ayiBusinessTime", - route: "/svc-pm-list", + route: "/svc-pms", key: key++ }); } diff --git a/ayanova/src/api/open-object-handler.js b/ayanova/src/api/open-object-handler.js index 8b88f57a..d9a2842c 100644 --- a/ayanova/src/api/open-object-handler.js +++ b/ayanova/src/api/open-object-handler.js @@ -145,6 +145,52 @@ export default { }); break; + //### PM AND RELATIVES ### + case ayatype.PMItem: + case ayatype.PMItemExpense: + case ayatype.PMItemLabor: + case ayatype.PMItemLoan: + case ayatype.PMItemOutsideService: + case ayatype.PMItemPart: + case ayatype.PMItemPartRequest: + case ayatype.PMItemScheduledUser: + case ayatype.PMItemTask: + case ayatype.PMItemTravel: + case ayatype.PMItemUnit: + (async () => { + try { + let res = await window.$gz.api.get( + `search/ancestor/${tid.type}/${tid.id}` + ); + + if (res.error) { + throw new Error( + window.$gz.errorHandler.errorToString(res, vm) + ); + } + if (res.data.id && res.data.id != 0) { + this.handleOpenObjectClick(vm, { + type: ayatype.PM, + id: res.data.id, + gotype: tid.type, + goid: tid.id + }); + return; + } + } catch (e) { + //throw new Error(e); + throw new Error(window.$gz.errorHandler.errorToString(e, vm)); + } + })(); + + break; + case ayatype.PM: + vm.$router.push({ + name: "pm-edit", + params: { recordid: tid.id, gotype: tid.gotype, goid: tid.goid } + }); + break; + case ayatype.Memo: vm.$router.push({ name: "memo-edit", diff --git a/ayanova/src/components/pm-header.vue b/ayanova/src/components/pm-header.vue new file mode 100644 index 00000000..228ec0ef --- /dev/null +++ b/ayanova/src/components/pm-header.vue @@ -0,0 +1,666 @@ + + diff --git a/ayanova/src/components/pm-item-expenses.vue b/ayanova/src/components/pm-item-expenses.vue new file mode 100644 index 00000000..8d702dcb --- /dev/null +++ b/ayanova/src/components/pm-item-expenses.vue @@ -0,0 +1,798 @@ + + diff --git a/ayanova/src/components/pm-item-labors.vue b/ayanova/src/components/pm-item-labors.vue new file mode 100644 index 00000000..b37ecbdd --- /dev/null +++ b/ayanova/src/components/pm-item-labors.vue @@ -0,0 +1,997 @@ + + diff --git a/ayanova/src/components/pm-item-loans.vue b/ayanova/src/components/pm-item-loans.vue new file mode 100644 index 00000000..e8e04c09 --- /dev/null +++ b/ayanova/src/components/pm-item-loans.vue @@ -0,0 +1,885 @@ + + diff --git a/ayanova/src/components/pm-item-outside-services.vue b/ayanova/src/components/pm-item-outside-services.vue new file mode 100644 index 00000000..efbfc3e4 --- /dev/null +++ b/ayanova/src/components/pm-item-outside-services.vue @@ -0,0 +1,1098 @@ + + diff --git a/ayanova/src/components/pm-item-parts.vue b/ayanova/src/components/pm-item-parts.vue new file mode 100644 index 00000000..57f88829 --- /dev/null +++ b/ayanova/src/components/pm-item-parts.vue @@ -0,0 +1,1129 @@ + + diff --git a/ayanova/src/components/pm-item-scheduled-users.vue b/ayanova/src/components/pm-item-scheduled-users.vue new file mode 100644 index 00000000..262abea1 --- /dev/null +++ b/ayanova/src/components/pm-item-scheduled-users.vue @@ -0,0 +1,710 @@ + + diff --git a/ayanova/src/components/pm-item-tasks.vue b/ayanova/src/components/pm-item-tasks.vue new file mode 100644 index 00000000..4482d4d1 --- /dev/null +++ b/ayanova/src/components/pm-item-tasks.vue @@ -0,0 +1,644 @@ + + diff --git a/ayanova/src/components/pm-item-travels.vue b/ayanova/src/components/pm-item-travels.vue new file mode 100644 index 00000000..88cb3574 --- /dev/null +++ b/ayanova/src/components/pm-item-travels.vue @@ -0,0 +1,976 @@ + + diff --git a/ayanova/src/components/pm-item-units.vue b/ayanova/src/components/pm-item-units.vue new file mode 100644 index 00000000..ce3b554d --- /dev/null +++ b/ayanova/src/components/pm-item-units.vue @@ -0,0 +1,850 @@ + + diff --git a/ayanova/src/components/pm-items.vue b/ayanova/src/components/pm-items.vue new file mode 100644 index 00000000..843989bc --- /dev/null +++ b/ayanova/src/components/pm-items.vue @@ -0,0 +1,1249 @@ + + diff --git a/ayanova/src/router.js b/ayanova/src/router.js index cd736794..6f538d4a 100644 --- a/ayanova/src/router.js +++ b/ayanova/src/router.js @@ -392,14 +392,6 @@ export default new Router({ ) }, - { - path: "/svc-workorder-templates", - name: "svc-workorder-templates", - component: () => - import( - /* webpackChunkName: "svc" */ "./views/svc-workorder-templates.vue" - ) - }, { path: "/svc-quotes", name: "svc-quotes", @@ -429,16 +421,16 @@ export default new Router({ }, { - path: "/svc-pm-list", - name: "svc-pm-list", + path: "/svc-pms", + name: "svc-pms", component: () => - import(/* webpackChunkName: "svc" */ "./views/svc-pm-list.vue") + import(/* webpackChunkName: "svc" */ "./views/svc-pms.vue") }, { - path: "/svc-pm-templates", - name: "svc-pm-templates", + path: "/svc-pms/:recordid", + name: "pm-edit", component: () => - import(/* webpackChunkName: "svc" */ "./views/svc-pm-templates.vue") + import(/* webpackChunkName: "svc" */ "./views/svc-pm.vue") }, { path: "/svc-units", diff --git a/ayanova/src/views/svc-pm-list.vue b/ayanova/src/views/svc-pm-list.vue deleted file mode 100644 index 0028f1d7..00000000 --- a/ayanova/src/views/svc-pm-list.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/ayanova/src/views/svc-pm-templates.vue b/ayanova/src/views/svc-pm-templates.vue deleted file mode 100644 index f1ad6c90..00000000 --- a/ayanova/src/views/svc-pm-templates.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/ayanova/src/views/svc-pm.vue b/ayanova/src/views/svc-pm.vue new file mode 100644 index 00000000..9a4c04dd --- /dev/null +++ b/ayanova/src/views/svc-pm.vue @@ -0,0 +1,2102 @@ + + + diff --git a/ayanova/src/views/svc-pms.vue b/ayanova/src/views/svc-pms.vue new file mode 100644 index 00000000..2f72d173 --- /dev/null +++ b/ayanova/src/views/svc-pms.vue @@ -0,0 +1,295 @@ + + + diff --git a/ayanova/src/views/svc-quote-templates.vue b/ayanova/src/views/svc-quote-templates.vue deleted file mode 100644 index fdd5f804..00000000 --- a/ayanova/src/views/svc-quote-templates.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/ayanova/src/views/svc-quote.vue b/ayanova/src/views/svc-quote.vue index d5598b79..b4909835 100644 --- a/ayanova/src/views/svc-quote.vue +++ b/ayanova/src/views/svc-quote.vue @@ -1947,7 +1947,6 @@ async function fetchTranslatedText(vm) { "WorkOrderCustomerReferenceNumber", "WorkOrderInternalReferenceNumber", "WorkOrderOnsite", - "NewStatus", "QuoteQuoteStatusType", "WorkOrderCustom1", "WorkOrderCustom2", @@ -2150,8 +2149,6 @@ async function fetchTranslatedText(vm) { "RecentWorkOrders", "WorkOrderGenerateUnit", "ApplyUnitContract", - "WorkOrderFromQuoteID", - "WorkOrderFromPMID", "CustomerServiceRequest" ]); } diff --git a/ayanova/src/views/svc-workorder-templates.vue b/ayanova/src/views/svc-workorder-templates.vue deleted file mode 100644 index c719dca3..00000000 --- a/ayanova/src/views/svc-workorder-templates.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/ayanova/src/views/svc-workorder.vue b/ayanova/src/views/svc-workorder.vue index db8aa809..faaba5f0 100644 --- a/ayanova/src/views/svc-workorder.vue +++ b/ayanova/src/views/svc-workorder.vue @@ -2138,7 +2138,6 @@ async function fetchTranslatedText(vm) { "WorkOrderCustomerReferenceNumber", "WorkOrderInternalReferenceNumber", "WorkOrderOnsite", - "NewStatus", "WorkOrderStatus", "WorkOrderCustom1", "WorkOrderCustom2",