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

View File

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

View File

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