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({
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
/>
|
||||
</v-form>
|
||||
</div>
|
||||
<v-overlay :value="!formState.ready || formState.loading">
|
||||
<v-overlay
|
||||
:value="!formState.ready || formState.loading"
|
||||
data-cy="busyoverlay"
|
||||
>
|
||||
<v-progress-circular indeterminate :size="64" />
|
||||
</v-overlay>
|
||||
<!-- ################################################################################-->
|
||||
@@ -625,9 +628,16 @@ export default {
|
||||
} catch (ex) {
|
||||
window.$gz.errorHandler.handleFormError(ex, vm);
|
||||
} finally {
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
loading: false
|
||||
// window.$gz.form.setFormState({
|
||||
// vm: vm,
|
||||
// loading: false
|
||||
// });
|
||||
|
||||
this.$nextTick(() => {
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
loading: false
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user