This commit is contained in:
@@ -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?
|
||||
|
||||
@@ -21,6 +21,15 @@
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item
|
||||
v-if="hasSelection && !formState.readOnly"
|
||||
@click="appendTasks"
|
||||
>
|
||||
<v-list-item-icon>
|
||||
<v-icon>$ayiTasks</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ $ay.t("AppendTasks") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item v-if="canDelete && isDeleted" @click="unDeleteItem">
|
||||
<v-list-item-icon>
|
||||
<v-icon>$ayiTrashRestoreAlt</v-icon>
|
||||
@@ -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
|
||||
|
||||
@@ -21,7 +21,10 @@
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item v-if="hasSelection" @click="convertToLabor">
|
||||
<v-list-item
|
||||
v-if="hasSelection && !formState.readOnly"
|
||||
@click="convertToLabor"
|
||||
>
|
||||
<v-list-item-icon>
|
||||
<v-icon>$ayiHammer</v-icon>
|
||||
</v-list-item-icon>
|
||||
|
||||
Reference in New Issue
Block a user