This commit is contained in:
@@ -611,6 +611,16 @@ export default {
|
||||
);
|
||||
if (res.data && res.data.items) {
|
||||
let newIndex = this.value.items[this.activeWoItemIndex].parts.length;
|
||||
//subtle issue here but the user may have been only intending to add directly from a part assembly so they click add part to expose parts
|
||||
//select an assembly but then an empty part line is left from initial add part so here we clear that out if no part was selected
|
||||
if (
|
||||
newIndex == 1 &&
|
||||
this.value.items[this.activeWoItemIndex].parts[0].partId == null
|
||||
) {
|
||||
//remove it and set newIndex one lower
|
||||
this.value.items[this.activeWoItemIndex].parts.splice(0, 1);
|
||||
newIndex = 0;
|
||||
}
|
||||
res.data.items.forEach(z => {
|
||||
newIndex++;
|
||||
this.value.items[this.activeWoItemIndex].parts.push({
|
||||
|
||||
Reference in New Issue
Block a user