This commit is contained in:
2021-05-05 19:39:35 +00:00
parent cbb3b07497
commit bdc9f18fea

View File

@@ -126,12 +126,13 @@
lg="4"
xl="3"
>
selectablestatuslist: {{ selectableStatusList }}
<v-autocomplete
v-model="value.items[activeItemIndex].workorderItemStatusId"
:readonly="formState.readOnly"
:disabled="isDeleted"
@input="fieldValueChanged('workorderItemStatusId')"
:items="pvm.selectLists.woItemStatus"
:items="selectableStatusList"
item-text="name"
item-value="id"
:label="$ay.t('WorkOrderItemWorkOrderStatusID')"
@@ -480,7 +481,7 @@ and it's probably not a big list to fill anyway
x.quantityReceived,
this.pvm.languageName
),
status: x.workorderItemStatusId, //todo: get real status name etc here use
status: x.workorderItemStatusId, //todo: get real status name etc here use
requestDate: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
x.requestDate,
this.pvm.timeZoneName,
@@ -494,6 +495,18 @@ and it's probably not a big list to fill anyway
})
.sort((a, b) => a.sequence - b.sequence);
},
selectableStatusList: function() {
const selectedStatusId = this.value.items[this.activeItemIndex]
.workorderItemStatusId;
console.log("selectableStatusList:", {
selectedStatusId: selectedStatusId,
raw: this.pvm.selectLists.woItemStatus
});
return this.pvm.selectLists.woItemStatus.filter(s => {
s.active == true || s.id == selectedStatusId;
});
//words.filter(word => word.length > 6);
},
formState: function() {
return this.pvm.formState;
},
@@ -520,9 +533,8 @@ and it's probably not a big list to fill anyway
}
}
//TODO: Function status name from woitemstatusid
//and priority same
//this.pvm.pickLists.woItemStatus.find(x=>x.id==x.workorderItemStatusId)
//TODO: Function status name from woitemstatusid
//and priority same
//this.pvm.pickLists.woItemStatus.find(x=>x.id==x.workorderItemStatusId)
};
</script>