This commit is contained in:
2021-06-30 22:30:46 +00:00
parent bca6dbce38
commit 7e3a964c05
4 changed files with 38 additions and 9 deletions

View File

@@ -423,19 +423,29 @@ todo: many biz objects are not using new PUT methodology
CURRENTLY DOING: template replacement additions
todo: template replacement changes
Mass delete
change Mark for deletion trans key SoftDelete to "Mark selected for deletion"
Mass delete
add trans key SoftDeleteAll "Mark *all* for deletion"
add code at every level of workorder where there is a mark all to implement mark all for deletion
Duplicate created reset code add routine to reset all loaner and workorderitemparts cost and listprice to zeros
X Duplicate created reset code add routine to reset all loaner and workorderitemparts cost and listprice to zeros
they will be filled in by server on first save, so this way it acts like newly added records
Dates
do nothing.
for now, up to user to manually remove or reset dates, we don't know what the user will want to duplicate for, maybe it's to replace an identical workorder for some reason
so we shouldn't mess with it too much automatically
Can always add date related features later but for now TTM
Close case 3897 after this is done
bugbug: can't delete workorder if there is any of the following items on any of it's woitems
woitempart
woitemexpenese
bugbug: missing code to delete all items in woitem where it's children get deleted?
see work-order-items.vue delete item and delete all item and undelete item
it's pencilled in for scheduled users only but perhaps it doesn't need any of that because the server handles it.
or maybe it was intended to show that subitems will also be removed??
perhaps it can be removed entirely??
todo: how to directly open a workorder quickly when you know the wo number??
should be supported, otherwise you need to scroll around a list to find it which is fucked

View File

@@ -211,6 +211,7 @@ export default {
"SaveACopy",
"Delete",
"SoftDelete",
"SoftDeleteAll",
"Undelete",
"Add",
"Replace",

View File

@@ -29,6 +29,14 @@
</v-list-item-icon>
<v-list-item-title>{{ $ay.t("SoftDelete") }}</v-list-item-title>
</v-list-item>
<v-list-item v-if="canDelete && !isDeleted" @click="deleteAllItem">
<v-list-item-icon>
<v-icon>$ayiTrashAlt</v-icon>
</v-list-item-icon>
<v-list-item-title>{{
$ay.t("SoftDeleteAll")
}}</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>
@@ -898,6 +906,16 @@ export default {
this.setDefaultView();
this.$emit("change");
},
deleteAllItem() {
this.value.items.forEach(z => (z.deleted = true));
// //CHILDREN
// this.value.items[this.activeItemIndex].scheduledUsers.forEach(
// z => (z.deleted = true)
// );
//todo: other grandchildren
this.setDefaultView();
this.$emit("change");
},
setDefaultView: function() {
//if only one record left then display it otherwise just let the datatable show what the user can click on
if (this.value && this.value.items && this.value.items.length == 1) {

View File

@@ -115,17 +115,17 @@ export default {
x.id = 0;
x.concurrency = undefined;
x.isDirty = true;
x.cost = 0;
x.listPrice = 0;
});
z.parts.forEach(x => {
x.id = 0;
x.concurrency = undefined;
x.isDirty = true;
x.cost = 0;
x.listPrice = 0;
});
// z.partRequests.forEach(x => {
// x.id = 0;
// x.concurrency = undefined;
// x.isDirty = true;
// });
z.scheduledUsers.forEach(x => {
x.id = 0;
x.concurrency = undefined;