This commit is contained in:
2021-11-03 20:57:05 +00:00
parent a1791db670
commit e79767bda3
2 changed files with 24 additions and 4 deletions

View File

@@ -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({

View File

@@ -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
});
});
}
},