This commit is contained in:
@@ -469,8 +469,11 @@ and it's probably not a big list to fill anyway
|
||||
return headers;
|
||||
},
|
||||
itemList: function() {
|
||||
const vm = this;
|
||||
return this.value.items
|
||||
.map((x, i) => {
|
||||
const stat = statusViz(x.workorderItemStatusId, this);
|
||||
const prior = priorityViz(x.workorderItemPriorityId, this);
|
||||
return {
|
||||
index: i,
|
||||
id: x.id,
|
||||
@@ -480,14 +483,14 @@ 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: stat.name,
|
||||
requestDate: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
||||
x.requestDate,
|
||||
this.pvm.timeZoneName,
|
||||
this.pvm.languageName,
|
||||
this.pvm.hour12
|
||||
),
|
||||
priority: x.workorderItemPriorityId, //todo: get actual priority, color etc here
|
||||
priority: prior.name,
|
||||
warranty: x.warrantyService,
|
||||
tags: x.tags
|
||||
};
|
||||
@@ -508,6 +511,7 @@ and it's probably not a big list to fill anyway
|
||||
return s.active == true || s.id == selectedId;
|
||||
});
|
||||
},
|
||||
|
||||
formState: function() {
|
||||
return this.pvm.formState;
|
||||
},
|
||||
@@ -533,9 +537,30 @@ 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)
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
function statusViz(id, vm) {
|
||||
if (id == null) {
|
||||
return { name: null, color: null };
|
||||
}
|
||||
|
||||
return vm.pvm.selectLists.woItemStatus.find(s => s.id == id);
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
function priorityViz(id, vm) {
|
||||
if (id == null) {
|
||||
return { name: null, color: null };
|
||||
}
|
||||
|
||||
return vm.pvm.selectLists.woItemPriorities.find(s => s.id == id);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user