AddAddress: improve loading transition between step0/step1 and step2

This commit is contained in:
Mathieu Jaumotte 2021-09-22 15:15:00 +02:00
parent dfc6ed9bf3
commit f8d5dcf937
4 changed files with 11 additions and 11 deletions

View File

@ -380,15 +380,8 @@ export default {
console.log('displaySuggestions');
this.openSuggestPane();
} else {
if (this.flag.suggestPane === true) {
this.closeSuggestPane();
}
if (this.flag.showPane === true) {
this.closeShowPane();
}
console.log('step2: open the Edit panel');
this.initForm();
this.getCountries(); // will open edit pane when resolve promise
this.getCountries(); // will open editPane when resolve promise
}
},
closeEditPane() {
@ -463,6 +456,13 @@ export default {
fetchCountries().then(
countries => new Promise((resolve, reject) => {
this.entity.loaded.countries = countries.results;
if (this.flag.suggestPane === true) {
this.closeSuggestPane();
}
if (this.flag.showPane === true) {
this.closeShowPane();
}
console.log('step2: open the Edit panel');
this.flag.editPane = true;
this.flag.loading = false;
resolve()

View File

@ -1,4 +1,4 @@
<template>step3
<template>
<div v-if="insideModal === false" class="loading">
<i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"></i>

View File

@ -1,4 +1,4 @@
<template>step2
<template>
<div class="address-form">
<!-- Not display in modal -->

View File

@ -1,4 +1,4 @@
<template>step1
<template>
<div v-if="insideModal === false" class="loading">
<i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"></i>