From 09812f3803e6d2bd00e1ec9ab03d774c0e6dd5dd Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 7 Jul 2021 18:36:24 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 3 -- .../src/components/work-order-item-labors.vue | 41 +++++++++++++++++++ .../work-order-item-scheduled-users.vue | 5 ++- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index c0cb80ac..d5a48057 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -426,9 +426,6 @@ CURRENTLY DOING: TODO 2 (all 2's): V7 features on wo I haven't coded yet - - Sched user selected - Convert sched user to labor Tasks 3445 - copy selected tasks to a labor record it says selected but I wonder about just doing all and they can simply edit out the ones they don't want? diff --git a/ayanova/src/components/work-order-item-labors.vue b/ayanova/src/components/work-order-item-labors.vue index 2d44373b..88392520 100644 --- a/ayanova/src/components/work-order-item-labors.vue +++ b/ayanova/src/components/work-order-item-labors.vue @@ -21,6 +21,15 @@ {{ $ay.t("New") }} + + + $ayiTasks + + {{ $ay.t("AppendTasks") }} + $ayiTrashRestoreAlt @@ -479,6 +488,38 @@ export default { } }, methods: { + appendTasks() { + //if no tasks then nothing to do + const tasks = this.value.items[this.activeWoItemIndex].tasks; + if (tasks.length == 0) { + return; + } + + const l = this.value.items[this.activeWoItemIndex].labors[ + this.activeItemIndex + ]; + + let at = ""; + tasks.forEach(z => { + at += `${z.task} - ${z.statusViz}\n`; + }); + l.serviceDetails += `\n${at}`; + + // this.value.items[this.activeWoItemIndex].tasks.push({ + // id: 0, + // concurrency: 0, + // sequence: newIndex + 1, //indexes are zero based but sequences are visible to user so 1 based + // task: undefined, //to trigger validation on new + // status: 1, //incomplete==1 + // completedByUserId: null, + // completedDate: null, + // isDirty: true, + // workOrderItemId: this.value.items[this.activeWoItemIndex].id, + // uid: Date.now(), + // completedByUserViz: null, + // statusViz: null + // }); + }, userChange(newName) { this.value.items[this.activeWoItemIndex].labors[ this.activeItemIndex diff --git a/ayanova/src/components/work-order-item-scheduled-users.vue b/ayanova/src/components/work-order-item-scheduled-users.vue index ba21df15..213204c7 100644 --- a/ayanova/src/components/work-order-item-scheduled-users.vue +++ b/ayanova/src/components/work-order-item-scheduled-users.vue @@ -21,7 +21,10 @@ {{ $ay.t("New") }} - + $ayiHammer