This commit is contained in:
2021-04-06 23:46:14 +00:00
parent 57c4034163
commit cb93e3ef28
3 changed files with 129 additions and 22 deletions

View File

@@ -154,48 +154,48 @@ and it's probably not a big list to fill anyway
If the column is a number or number + unit, (or date) right-align it (like excel)
*/
let headers = [];
let vm = this;
headers.push({
text: vm.$ay.t("WorkOrderItemSummary"), //mandatory not hidden
text: this.$ay.t("WorkOrderItemSummary"), //mandatory not hidden
align: "left",
value: "notes"
});
if (vm.form().showMe(vm, "Items.WorkOrderItemWorkOrderStatusID")) {
if (this.form().showMe(this, "Items.WorkOrderItemWorkOrderStatusID")) {
headers.push({
text: vm.$ay.t("WorkOrderItemWorkOrderStatusID"),
text: this.$ay.t("WorkOrderItemWorkOrderStatusID"),
align: "left",
value: "status"
});
}
if (vm.form().showMe(vm, "Items.RequestDate")) {
if (this.form().showMe(this, "Items.RequestDate")) {
headers.push({
text: vm.$ay.t("WorkOrderItemRequestDate"),
text: this.$ay.t("WorkOrderItemRequestDate"),
align: "right",
value: "requestDate"
});
}
if (vm.form().showMe(vm, "Items.WorkOrderItemPriorityID")) {
if (this.form().showMe(this, "Items.WorkOrderItemPriorityID")) {
headers.push({
text: vm.$ay.t("WorkOrderItemPriorityID"),
text: this.$ay.t("WorkOrderItemPriorityID"),
align: "left",
value: "priority"
});
}
if (vm.form().showMe(vm, "Items.WorkOrderItemWarrantyService")) {
if (this.form().showMe(this, "Items.WorkOrderItemWarrantyService")) {
headers.push({
text: vm.$ay.t("WorkOrderItemWarrantyService"),
text: this.$ay.t("WorkOrderItemWarrantyService"),
align: "center",
value: "warranty"
});
}
if (vm.form().showMe(vm, "Items.Tags")) {
if (this.form().showMe(this, "Items.Tags")) {
headers.push({
text: vm.$ay.t("Tags"),
text: this.$ay.t("Tags"),
align: "left",
value: "tags"
});
@@ -206,22 +206,21 @@ and it's probably not a big list to fill anyway
return headers;
},
itemList: function() {
let vm = this;
return vm.value.items.map((x, i) => {
return this.value.items.map((x, i) => {
return {
index: i,
id: x.id,
notes: x.notes,
quantityReceived: window.$gz.locale.decimalLocalized(
x.quantityReceived,
vm.languageName
this.pvm.languageName
),
status: x.workorderItemStatusId, //todo: get real status name etc here
requestDate: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
x.requestDate,
vm.timeZoneName,
vm.languageName,
vm.hour12
this.pvm.timeZoneName,
this.pvm.languageName,
this.pvm.hour12
),
priority: x.workorderItemPriorityId, //todo: get actual priority, color etc here
warranty: x.warrantyService,