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
//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();
});
}

View File

@@ -233,6 +233,7 @@
hide-default-footer
data-cy="itemsTable"
dense
:item-class="rowClasses"
>
<template v-slot:top>
<span class="title">{{ $ay.t("PurchaseOrderItemList") }}</span>
@@ -323,7 +324,7 @@
:label="$ay.t('Part')"
ref="Items.PartId"
data-cy="Items.PartId"
:rules="[form().required(this, 'Items.PartId')]"
:rules="[form().required(this, 'Items.PartId')]"
></gz-pick-list>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
@@ -847,6 +848,13 @@ export default {
}
},
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) {
this.editPoItemIndex = item.index;
this.editPoItemDialog = true;