This commit is contained in:
@@ -392,6 +392,9 @@ TODO: Hiding sections not used when empty and now added from the menu to present
|
|||||||
add from fab floating action button when new?
|
add from fab floating action button when new?
|
||||||
something that stays so users can use either way so no confusion about shifting UI elements that disappear
|
something that stays so users can use either way so no confusion about shifting UI elements that disappear
|
||||||
|
|
||||||
|
bugbug: service completed (closed status) workorder goes gray initially but when go out and back in it's editable again WTF??
|
||||||
|
Seems to have just happened
|
||||||
|
|
||||||
todo: check Joyce's cases
|
todo: check Joyce's cases
|
||||||
|
|
||||||
--------- TEST RELEASE HERE ---------------
|
--------- TEST RELEASE HERE ---------------
|
||||||
|
|||||||
@@ -243,6 +243,10 @@ export default {
|
|||||||
gotoIndex: {
|
gotoIndex: {
|
||||||
default: null,
|
default: null,
|
||||||
type: Number
|
type: Number
|
||||||
|
},
|
||||||
|
addNew: {
|
||||||
|
default: null,
|
||||||
|
type: Number
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -253,8 +257,13 @@ export default {
|
|||||||
},
|
},
|
||||||
gotoIndex(val, oldVal) {
|
gotoIndex(val, oldVal) {
|
||||||
if (val != oldVal) {
|
if (val != oldVal) {
|
||||||
this.selectedRow = [{ index: val }];
|
let gotoIndex = val;
|
||||||
this.activeItemIndex = val;
|
if (val < 0) {
|
||||||
|
//it's a create request
|
||||||
|
gotoIndex = this.newItem();
|
||||||
|
}
|
||||||
|
this.selectedRow = [{ index: gotoIndex }];
|
||||||
|
this.activeItemIndex = gotoIndex;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const el = this.$refs.unittopform;
|
const el = this.$refs.unittopform;
|
||||||
if (el) {
|
if (el) {
|
||||||
@@ -301,6 +310,8 @@ export default {
|
|||||||
`Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId`
|
`Items[${this.activeWoItemIndex}].units[${this.activeItemIndex}].unitId`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return newIndex; //for create new on goto
|
||||||
},
|
},
|
||||||
unDeleteItem() {
|
unDeleteItem() {
|
||||||
this.value.items[this.activeWoItemIndex].units[
|
this.value.items[this.activeWoItemIndex].units[
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
>
|
>
|
||||||
{{ $ay.t("WorkOrderItemList") }}
|
{{ $ay.t("WorkOrderItemList") }}
|
||||||
<v-btn large icon v-bind="attrs" v-on="on">
|
<v-btn large icon v-bind="attrs" v-on="on">
|
||||||
<v-icon small color="primary">$ayiEllipsisV</v-icon>
|
<v-icon color="primary">$ayiEllipsisV</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -35,6 +35,20 @@
|
|||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-title>{{ $ay.t("Undelete") }}</v-list-item-title>
|
<v-list-item-title>{{ $ay.t("Undelete") }}</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
|
<template v-if="hasData && hasSelection && pvm.rights.change">
|
||||||
|
<v-divider></v-divider>
|
||||||
|
<v-subheader>{{ $ay.t("Add") }}</v-subheader>
|
||||||
|
<v-list-item
|
||||||
|
v-if="pvm.subRights.units.create"
|
||||||
|
@click="newSubItem($ay.ayt.WorkOrderItemUnit)"
|
||||||
|
>
|
||||||
|
<v-list-item-icon>
|
||||||
|
<v-icon>$ayiFan</v-icon>
|
||||||
|
</v-list-item-icon>
|
||||||
|
<v-list-item-title>{{ $ay.t("Unit") }}</v-list-item-title>
|
||||||
|
</v-list-item>
|
||||||
|
</template>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -362,13 +376,7 @@
|
|||||||
GRANDCHILDREN
|
GRANDCHILDREN
|
||||||
############################################################################ -->
|
############################################################################ -->
|
||||||
|
|
||||||
<v-col
|
<v-col cols="12" v-show="showUnits">
|
||||||
cols="12"
|
|
||||||
v-if="
|
|
||||||
pvm.subRights.units.visible &&
|
|
||||||
form().showMe(this, 'WorkOrderItemUnitList')
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<GzWoItemUnits
|
<GzWoItemUnits
|
||||||
v-model="value"
|
v-model="value"
|
||||||
:pvm="pvm"
|
:pvm="pvm"
|
||||||
@@ -795,6 +803,15 @@ export default {
|
|||||||
this.fieldValueChanged(`items[${this.activeItemIndex}].notes`);
|
this.fieldValueChanged(`items[${this.activeItemIndex}].notes`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
newSubItem(atype) {
|
||||||
|
//new Id value to use (by convention goto negative will trigger create and then goto instead of simple goto)
|
||||||
|
let newId = -Math.abs(Date.now());
|
||||||
|
switch (atype) {
|
||||||
|
case window.$gz.WorkOrderItemUnit:
|
||||||
|
this.gotoUnitIndex = newId;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
unDeleteItem() {
|
unDeleteItem() {
|
||||||
this.value.items[this.activeItemIndex].deleted = false;
|
this.value.items[this.activeItemIndex].deleted = false;
|
||||||
//CHILDREN
|
//CHILDREN
|
||||||
@@ -1026,6 +1043,14 @@ and it's probably not a big list to fill anyway
|
|||||||
this.pvm.rights.change &&
|
this.pvm.rights.change &&
|
||||||
this.pvm.subRights.items.delete
|
this.pvm.subRights.items.delete
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
showUnits: function() {
|
||||||
|
return (
|
||||||
|
this.pvm.subRights.units.visible &&
|
||||||
|
this.form().showMe(this, "WorkOrderItemUnitList") &&
|
||||||
|
this.value.items[this.activeItemIndex].units &&
|
||||||
|
this.value.items[this.activeItemIndex].units.length > 0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -301,12 +301,15 @@ function generateMenu(vm) {
|
|||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
|
|
||||||
menuOptions.menuItems.push({
|
if (!window.$gz.store.state.isCustomerUser) {
|
||||||
title: "DirectNotification",
|
menuOptions.menuItems.push({
|
||||||
icon: "$ayiCommentAlt",
|
title: "DirectNotification",
|
||||||
data: "home-notify-direct",
|
icon: "$ayiCommentAlt",
|
||||||
key: "app:nav"
|
data: "home-notify-direct",
|
||||||
});
|
key: "app:nav"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
}
|
}
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user