This commit is contained in:
2021-04-09 19:15:34 +00:00
parent 063c9bd205
commit ec5e141671
3 changed files with 4 additions and 4 deletions

View File

@@ -143,7 +143,7 @@ export default {
let o = this.value.items[this.activeWoItemIndex].scheduledUsers[
this.activeItemIndex
];
console.log("scheduserdelete", o);
if (o.id != 0) {
//it's a previously saved item so it needs to be removed at the server too
this.$emit("graph-item-deleted", {
@@ -307,7 +307,7 @@ IN ORDER: start, stop, quantity, user, rate
},
canDelete: function() {
return (
this.pvm.hasSelectedScheduledUserItem &&
this.activeItemIndex != null &&
!this.value.isLockedAtServer &&
this.pvm.rights.change &&
this.pvm.subRights.scheduledUsers.delete

View File

@@ -85,6 +85,7 @@
:pvm="pvm"
:active-wo-item-index="activeItemIndex"
data-cy="woItemScheduledUsers"
@graph-item-deleted="$emit('graph-item-deleted', $event)"
/>
</template>
</div>

View File

@@ -169,9 +169,7 @@ export default {
timeZoneName: window.$gz.locale.getResolvedTimeZoneName(),
languageName: window.$gz.locale.getResolvedLanguage(),
hour12: window.$gz.locale.getHour12(),
selectedItemIndex: null,
deletedGraphItems: { items: [], scheduledUsers: [] },
selectedScheduledUserItemIndex: null,
selectLists: {
wostatus: [],
allowedwostatus: []
@@ -320,6 +318,7 @@ export default {
this.deletedGraphItems.items.push(item.id);
break;
case window.$gz.type.WorkOrderItemScheduledUser:
this.deletedGraphItems.scheduledUsers.push(item.id);
break;
}
this.setDirty();