mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Merge branch 'improve_address' into person_renderbox_thirdparty_onthefly
This commit is contained in:
@@ -306,7 +306,7 @@ export default {
|
||||
hasSuggestions() {
|
||||
// TODO
|
||||
//return addressSuggestions.length > 0
|
||||
return true;
|
||||
return false;
|
||||
},
|
||||
displaySuggestions() {
|
||||
return !this.context.edit && this.hasSuggestions;
|
||||
@@ -325,7 +325,7 @@ export default {
|
||||
return !this.context.edit && !this.inModal;
|
||||
},
|
||||
forceRedirect() {
|
||||
return this.context.backUrl !== null;
|
||||
return (!(this.context.backUrl === null || typeof this.context.backUrl === 'undefined'));
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -339,7 +339,7 @@ export default {
|
||||
|
||||
console.log('Mounted now !');
|
||||
if (this.context.edit) {
|
||||
console.log('getInitialAddress');
|
||||
console.log('getInitialAddress', this.context.addressId);
|
||||
this.getInitialAddress(this.context.addressId);
|
||||
}
|
||||
this.openShowPane();
|
||||
@@ -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()
|
||||
|
@@ -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>
|
||||
@@ -106,7 +106,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<template>step2
|
||||
<template>
|
||||
<div class="address-form">
|
||||
|
||||
<!-- Not display in modal -->
|
||||
|
@@ -1,24 +1,28 @@
|
||||
<template>
|
||||
|
||||
<div class="loading">
|
||||
<i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"></i>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</div>
|
||||
<div v-if="errorMsg && errorMsg.length > 0" class="alert alert-danger">
|
||||
{{ errorMsg }}
|
||||
</div>
|
||||
<div v-if="flag.success" class="alert alert-success">
|
||||
{{ $t(getSuccessText) }}
|
||||
<span v-if="forceRedirect">{{ $t('wait_redirection') }}</span>
|
||||
</div>
|
||||
<div v-if="!hideAddress">
|
||||
<div class="loading">
|
||||
<i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"></i>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="noAddressWithStickyActions" class="mt-5">
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('not_yet_address') }}
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="errorMsg && errorMsg.length > 0" class="alert alert-danger">
|
||||
{{ errorMsg }}
|
||||
</div>
|
||||
|
||||
<address-render-box v-if="!hideAddress" :address="address"></address-render-box>
|
||||
<div v-if="flag.success" class="alert alert-success">
|
||||
{{ $t(getSuccessText) }}
|
||||
<span v-if="forceRedirect">{{ $t('wait_redirection') }}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="noAddressWithStickyActions" class="mt-5">
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('not_yet_address') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<address-render-box :address="address"></address-render-box>
|
||||
</div>
|
||||
|
||||
<action-buttons
|
||||
:options="this.options"
|
||||
@@ -86,7 +90,7 @@ export default {
|
||||
this.options.hideAddress : this.defaultz.hideAddress;
|
||||
},
|
||||
forceRedirect() {
|
||||
return this.context.backUrl !== null;
|
||||
return (!(this.context.backUrl === null || typeof this.context.backUrl === 'undefined'));
|
||||
},
|
||||
noAddressWithStickyActions() {
|
||||
return !this.context.edit && !this.address.id && this.options.stickyActions;
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user