This commit is contained in:
@@ -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();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -323,7 +324,7 @@
|
|||||||
:label="$ay.t('Part')"
|
:label="$ay.t('Part')"
|
||||||
ref="Items.PartId"
|
ref="Items.PartId"
|
||||||
data-cy="Items.PartId"
|
data-cy="Items.PartId"
|
||||||
:rules="[form().required(this, 'Items.PartId')]"
|
:rules="[form().required(this, 'Items.PartId')]"
|
||||||
></gz-pick-list>
|
></gz-pick-list>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user