This commit is contained in:
2021-02-22 21:24:02 +00:00
parent 3117191950
commit 3f94db609e
2 changed files with 12 additions and 1 deletions

View File

@@ -101,6 +101,9 @@ function getErrorsForField(vm, ref) {
//so we need to normalize them all to lower case to match //so we need to normalize them all to lower case to match
//they will always differ by more than case so this is fine //they will always differ by more than case so this is fine
//NOTE: Indexed child collection error target field names are in this scheme "Items[2].FieldName"
//where Items is the name of the parent models property that contains the child collection
return o.target.toLowerCase() == ref.toLowerCase(); return o.target.toLowerCase() == ref.toLowerCase();
}); });
} }

View File

@@ -233,6 +233,7 @@
hide-default-footer hide-default-footer
data-cy="itemsTable" data-cy="itemsTable"
dense dense
:item-class="rowClasses"
> >
<template v-slot:top> <template v-slot:top>
<span class="title">{{ $ay.t("PurchaseOrderItemList") }}</span> <span class="title">{{ $ay.t("PurchaseOrderItemList") }}</span>
@@ -847,6 +848,13 @@ export default {
} }
}, },
methods: { methods: {
rowClasses: function(item, index) {
console.log("row_classes", { item: item });
//if item.index in errors collection then highlight the row
// if (item.calories < 200) {
// return "orange"; //can also return multiple classes e.g ["orange","disabled"]
// }
},
editItem: function(item) { editItem: function(item) {
this.editPoItemIndex = item.index; this.editPoItemIndex = item.index;
this.editPoItemDialog = true; this.editPoItemDialog = true;