case 4112
This commit is contained in:
@@ -907,6 +907,7 @@ BUILD 8.0.0-beta.0.14 CHANGES OF NOTE
|
||||
- case 4108 fixed
|
||||
- case 4109 closed
|
||||
- case 4110 bumped
|
||||
- Restricted workorder users no longer offered "Realize suggested part quantities"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,16 @@
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
<template v-if="showRealizeSuggestedPartsInParts">
|
||||
<v-list-item
|
||||
data-cy="woItemRealizeSuggestedParts"
|
||||
@click="realizeSuggestedParts"
|
||||
>
|
||||
<v-list-item-title>{{
|
||||
$ay.t("WorkOrderItemPartRealizeSuggested")
|
||||
}}</v-list-item-title>
|
||||
</v-list-item>
|
||||
</template>
|
||||
<v-list-item
|
||||
v-if="hasSelection && !formState.readOnly"
|
||||
@click="generateUnit"
|
||||
@@ -49,6 +59,7 @@
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ $ay.t("PartAssembly") }}</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>
|
||||
@@ -830,6 +841,15 @@ export default {
|
||||
},
|
||||
canDeleteAll: function() {
|
||||
return this.pvm.rights.change && !this.value.userIsRestrictedType;
|
||||
},
|
||||
showRealizeSuggestedPartsInParts: function() {
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.hasData &&
|
||||
this.canAdd &&
|
||||
this.value.items[this.activeWoItemIndex].parts[this.activeItemIndex]
|
||||
.suggestedQuantity > 0
|
||||
);
|
||||
}
|
||||
|
||||
//----
|
||||
@@ -1115,6 +1135,17 @@ export default {
|
||||
this.setDefaultView();
|
||||
this.$emit("change");
|
||||
},
|
||||
realizeSuggestedParts() {
|
||||
let p = this.value.items[this.activeWoItemIndex].parts[
|
||||
this.activeItemIndex
|
||||
];
|
||||
if (p.quantity == 0 && p.suggestedQuantity > 0) {
|
||||
p.quantity = p.suggestedQuantity;
|
||||
p.isDirty = true;
|
||||
}
|
||||
|
||||
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.items[this.activeWoItemIndex].parts.length == 1) {
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<v-list-item-title>{{ $ay.t("Undelete") }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
|
||||
<template v-if="hasData && pvm.rights.change">
|
||||
<template v-if="showRealizeSuggestedPartsInItem">
|
||||
<v-divider></v-divider>
|
||||
<v-list-item
|
||||
data-cy="woItemRealizeSuggestedParts"
|
||||
@@ -1033,6 +1033,17 @@ export default {
|
||||
this.value.items[this.activeItemIndex].outsideServices.length > 0 &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
showRealizeSuggestedPartsInItem: function() {
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.canAddPart &&
|
||||
this.hasData &&
|
||||
this.value.items[this.activeItemIndex].parts.length > 0 &&
|
||||
this.value.items[this.activeItemIndex].parts.some(z => {
|
||||
return z.suggestedQuantity > 0;
|
||||
})
|
||||
);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user