mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
first eslint corrections
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<add-address
|
||||
v-bind:key="key"
|
||||
v-bind:context="context"
|
||||
v-bind:options="options"
|
||||
v-bind:addressChangedCallback="submitAddress"
|
||||
ref="addAddress">
|
||||
</add-address>
|
||||
<add-address
|
||||
:key="key"
|
||||
:context="context"
|
||||
:options="options"
|
||||
:address-changed-callback="submitAddress"
|
||||
ref="addAddress"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,18 +1,26 @@
|
||||
<template>
|
||||
<ul class="record_actions" v-if="!options.onlyButton"
|
||||
:class="{ 'sticky-form-buttons': isStickyForm }">
|
||||
|
||||
<li v-if="isStickyForm" class="cancel">
|
||||
<slot name="before"></slot>
|
||||
</li>
|
||||
<li>
|
||||
<slot name="action"></slot>
|
||||
</li>
|
||||
<li v-if="isStickyForm">
|
||||
<slot name="after"></slot>
|
||||
</li>
|
||||
</ul>
|
||||
<slot v-else name="action"></slot>
|
||||
<ul
|
||||
class="record_actions"
|
||||
v-if="!options.onlyButton"
|
||||
:class="{ 'sticky-form-buttons': isStickyForm }"
|
||||
>
|
||||
<li
|
||||
v-if="isStickyForm"
|
||||
class="cancel"
|
||||
>
|
||||
<slot name="before" />
|
||||
</li>
|
||||
<li>
|
||||
<slot name="action" />
|
||||
</li>
|
||||
<li v-if="isStickyForm">
|
||||
<slot name="after" />
|
||||
</li>
|
||||
</ul>
|
||||
<slot
|
||||
v-else
|
||||
name="action"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,230 +1,295 @@
|
||||
<template>
|
||||
<!-- step0 -->
|
||||
<show-pane
|
||||
v-if="flag.showPane"
|
||||
:context="this.context"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
:entity="this.entity"
|
||||
:flag="this.flag"
|
||||
:use-date-pane="this.useDatePane"
|
||||
@open-edit-pane="openEditPane"
|
||||
ref="showAddress"
|
||||
/>
|
||||
|
||||
<!-- step0 -->
|
||||
<show-pane v-if="flag.showPane"
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:useDatePane="this.useDatePane"
|
||||
@openEditPane="openEditPane"
|
||||
ref="showAddress">
|
||||
</show-pane>
|
||||
<!-- step 1 -->
|
||||
<teleport
|
||||
to="body"
|
||||
v-if="inModal"
|
||||
>
|
||||
<modal
|
||||
v-if="flag.suggestPane"
|
||||
modal-dialog-class="modal-dialog-scrollable modal-xl"
|
||||
@close="resetPane"
|
||||
>
|
||||
<template #header>
|
||||
<h2 class="modal-title">
|
||||
{{ $t(getTextTitle) }}
|
||||
<span
|
||||
v-if="flag.loading"
|
||||
class="loading"
|
||||
>
|
||||
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</span>
|
||||
</h2>
|
||||
</template>
|
||||
|
||||
<!-- step 1 -->
|
||||
<teleport to="body" v-if="inModal">
|
||||
<modal v-if="flag.suggestPane"
|
||||
modalDialogClass="modal-dialog-scrollable modal-xl"
|
||||
@close="resetPane">
|
||||
<template #body>
|
||||
<suggest-pane
|
||||
:context="this.context"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
:entity="this.entity"
|
||||
:flag="this.flag"
|
||||
@pick-address="this.pickAddress"
|
||||
ref="suggestAddress"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template v-slot:header>
|
||||
<h2 class="modal-title">{{ $t(getTextTitle) }}
|
||||
<span v-if="flag.loading" class="loading">
|
||||
<i class="fa fa-circle-o-notch fa-spin fa-fw"></i>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</span>
|
||||
</h2>
|
||||
</template>
|
||||
|
||||
<template v-slot:body>
|
||||
<suggest-pane
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
@pick-address="this.pickAddress"
|
||||
ref="suggestAddress">
|
||||
</suggest-pane>
|
||||
</template>
|
||||
|
||||
<template v-slot:footer>
|
||||
<button @click="openEditPane"
|
||||
class="btn btn-create">
|
||||
{{ $t('create_a_new_address')}}
|
||||
<template #footer>
|
||||
<button
|
||||
@click="openEditPane"
|
||||
class="btn btn-create"
|
||||
>
|
||||
{{ $t('create_a_new_address') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
<template v-else>
|
||||
<div
|
||||
v-if="flag.suggestPane"
|
||||
class="mt-4 flex-grow-1"
|
||||
>
|
||||
<suggest-pane
|
||||
:context="this.context"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
:entity="this.entity"
|
||||
:flag="this.flag"
|
||||
:inside-modal="false"
|
||||
@pick-address="this.pickAddress"
|
||||
ref="suggestAddress"
|
||||
>
|
||||
<template
|
||||
#before
|
||||
v-if="!bypassFirstStep"
|
||||
>
|
||||
<a
|
||||
class="btn btn-cancel"
|
||||
@click="resetPane"
|
||||
>
|
||||
{{ $t('action.cancel') }}
|
||||
</a>
|
||||
</template>
|
||||
<template #action>
|
||||
<li>
|
||||
<button
|
||||
@click="openEditPane"
|
||||
class="btn btn-create"
|
||||
>
|
||||
{{ $t('create_a_new_address') }}
|
||||
</button>
|
||||
</template>
|
||||
</li>
|
||||
</template>
|
||||
</suggest-pane>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</modal>
|
||||
</teleport>
|
||||
<template v-else>
|
||||
<div v-if="flag.suggestPane" class="mt-4 flex-grow-1">
|
||||
<suggest-pane
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:insideModal="false"
|
||||
@pick-address="this.pickAddress"
|
||||
ref="suggestAddress">
|
||||
<!-- step 2 -->
|
||||
<teleport
|
||||
to="body"
|
||||
v-if="inModal"
|
||||
>
|
||||
<modal
|
||||
v-if="flag.editPane"
|
||||
modal-dialog-class="modal-dialog-scrollable modal-xl"
|
||||
@close="resetPane"
|
||||
>
|
||||
<template #header>
|
||||
<h2 class="modal-title">
|
||||
{{ $t(getTextTitle) }}
|
||||
<span
|
||||
v-if="flag.loading"
|
||||
class="loading"
|
||||
>
|
||||
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</span>
|
||||
</h2>
|
||||
</template>
|
||||
|
||||
<template v-slot:before v-if="!bypassFirstStep">
|
||||
<a class="btn btn-cancel" @click="resetPane">
|
||||
{{ $t('action.cancel') }}
|
||||
</a>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<li>
|
||||
<button @click="openEditPane"
|
||||
class="btn btn-create">
|
||||
{{ $t('create_a_new_address')}}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
<template #body>
|
||||
<edit-pane
|
||||
:context="this.context"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
:entity="this.entity"
|
||||
:flag="this.flag"
|
||||
:errors="this.errors"
|
||||
:check-errors="this.checkErrors"
|
||||
@get-cities="getCities"
|
||||
@get-reference-addresses="getReferenceAddresses"
|
||||
/>
|
||||
</template>
|
||||
|
||||
</suggest-pane>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- step 2 -->
|
||||
<teleport to="body" v-if="inModal">
|
||||
<modal v-if="flag.editPane"
|
||||
modalDialogClass="modal-dialog-scrollable modal-xl"
|
||||
@close="resetPane">
|
||||
|
||||
<template v-slot:header>
|
||||
<h2 class="modal-title">{{ $t(getTextTitle) }}
|
||||
<span v-if="flag.loading" class="loading">
|
||||
<i class="fa fa-circle-o-notch fa-spin fa-fw"></i>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</span>
|
||||
</h2>
|
||||
</template>
|
||||
|
||||
<template v-slot:body>
|
||||
<edit-pane
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:errors="this.errors"
|
||||
v-bind:checkErrors="this.checkErrors"
|
||||
@getCities="getCities"
|
||||
@getReferenceAddresses="getReferenceAddresses">
|
||||
</edit-pane>
|
||||
</template>
|
||||
|
||||
<template v-slot:footer>
|
||||
<!--<button class="btn btn-cancel change-icon" @click="resetPane">{{ $t('action.cancel') }}</button>-->
|
||||
<button v-if="!this.context.edit && this.useDatePane" class="btn btn-update change-icon" @click="closeEditPane">
|
||||
{{ $t('nav.next')}}
|
||||
<i class="fa fa-fw fa-arrow-right"></i>
|
||||
<template #footer>
|
||||
<!--<button class="btn btn-cancel change-icon" @click="resetPane">{{ $t('action.cancel') }}</button>-->
|
||||
<button
|
||||
v-if="!this.context.edit && this.useDatePane"
|
||||
class="btn btn-update change-icon"
|
||||
@click="closeEditPane"
|
||||
>
|
||||
{{ $t('nav.next') }}
|
||||
<i class="fa fa-fw fa-arrow-right" />
|
||||
</button>
|
||||
<button
|
||||
v-else
|
||||
class="btn btn-save"
|
||||
@click="closeEditPane"
|
||||
>
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
<template v-else>
|
||||
<div
|
||||
v-if="flag.editPane"
|
||||
class="mt-4 flex-grow-1"
|
||||
>
|
||||
<edit-pane
|
||||
:context="this.context"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
:entity="this.entity"
|
||||
:flag="this.flag"
|
||||
:errors="this.errors"
|
||||
:check-errors="this.checkErrors"
|
||||
:inside-modal="false"
|
||||
@get-cities="getCities"
|
||||
@get-reference-addresses="getReferenceAddresses"
|
||||
>
|
||||
<template #before>
|
||||
<a
|
||||
class="btn btn-cancel"
|
||||
@click="resetPane"
|
||||
>
|
||||
{{ $t('action.cancel') }}
|
||||
</a>
|
||||
</template>
|
||||
<template #action>
|
||||
<li v-if="!this.context.edit && this.useDatePane">
|
||||
<button
|
||||
class="btn btn-update change-icon"
|
||||
@click="closeEditPane"
|
||||
>
|
||||
{{ $t('nav.next') }}
|
||||
<i class="fa fa-fw fa-arrow-right" />
|
||||
</button>
|
||||
<button v-else class="btn btn-save" @click="closeEditPane">
|
||||
{{ $t('action.save')}}
|
||||
</li>
|
||||
<li v-else>
|
||||
<button
|
||||
class="btn btn-save"
|
||||
@click="closeEditPane"
|
||||
>
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
</template>
|
||||
</li>
|
||||
</template>
|
||||
</edit-pane>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</modal>
|
||||
</teleport>
|
||||
<template v-else>
|
||||
<div v-if="flag.editPane" class="mt-4 flex-grow-1">
|
||||
<edit-pane
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:errors="this.errors"
|
||||
v-bind:checkErrors="this.checkErrors"
|
||||
v-bind:insideModal="false"
|
||||
@getCities="getCities"
|
||||
@getReferenceAddresses="getReferenceAddresses">
|
||||
<!-- step 3 -->
|
||||
<teleport
|
||||
to="body"
|
||||
v-if="inModal"
|
||||
>
|
||||
<modal
|
||||
v-if="flag.datePane"
|
||||
modal-dialog-class="modal-dialog-scrollable modal-xl"
|
||||
@close="resetPane"
|
||||
>
|
||||
<template #header>
|
||||
<h2 class="modal-title">
|
||||
{{ $t(getTextTitle) }}
|
||||
<span
|
||||
v-if="flag.loading"
|
||||
class="loading"
|
||||
>
|
||||
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</span>
|
||||
</h2>
|
||||
</template>
|
||||
|
||||
<template v-slot:before>
|
||||
<a class="btn btn-cancel" @click="resetPane">
|
||||
{{ $t('action.cancel') }}
|
||||
</a>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<li v-if="!this.context.edit && this.useDatePane">
|
||||
<button class="btn btn-update change-icon" @click="closeEditPane">
|
||||
{{ $t('nav.next')}}
|
||||
<i class="fa fa-fw fa-arrow-right"></i>
|
||||
</button>
|
||||
</li>
|
||||
<li v-else>
|
||||
<button class="btn btn-save" @click="closeEditPane">
|
||||
{{ $t('action.save')}}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
<template #body>
|
||||
<date-pane
|
||||
:context="this.context"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
:entity="this.entity"
|
||||
:flag="this.flag"
|
||||
ref="dateAddress"
|
||||
/>
|
||||
</template>
|
||||
|
||||
</edit-pane>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- step 3 -->
|
||||
<teleport to="body" v-if="inModal">
|
||||
<modal v-if="flag.datePane"
|
||||
modalDialogClass="modal-dialog-scrollable modal-xl"
|
||||
@close="resetPane">
|
||||
|
||||
<template v-slot:header>
|
||||
<h2 class="modal-title">{{ $t(getTextTitle) }}
|
||||
<span v-if="flag.loading" class="loading">
|
||||
<i class="fa fa-circle-o-notch fa-spin fa-fw"></i>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</span>
|
||||
</h2>
|
||||
</template>
|
||||
|
||||
<template v-slot:body>
|
||||
<date-pane
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
ref="dateAddress">
|
||||
</date-pane>
|
||||
</template>
|
||||
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-misc" @click="openEditPane">
|
||||
<i class="fa fa-fw fa-arrow-left"></i>
|
||||
{{ $t('nav.previous')}}
|
||||
<template #footer>
|
||||
<button
|
||||
class="btn btn-misc"
|
||||
@click="openEditPane"
|
||||
>
|
||||
<i class="fa fa-fw fa-arrow-left" />
|
||||
{{ $t('nav.previous') }}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-save"
|
||||
@click="closeDatePane"
|
||||
>
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
<!-- -->
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
<template v-else>
|
||||
<div
|
||||
v-if="flag.datePane"
|
||||
class="mt-4 flex-grow-1"
|
||||
>
|
||||
<date-pane
|
||||
:context="this.context"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
:entity="this.entity"
|
||||
:flag="this.flag"
|
||||
:inside-modal="false"
|
||||
ref="dateAddress"
|
||||
>
|
||||
<template #before>
|
||||
<button
|
||||
class="btn btn-misc"
|
||||
@click="openEditPane"
|
||||
>
|
||||
<i class="fa fa-fw fa-arrow-left" />
|
||||
{{ $t('nav.previous') }}
|
||||
</button>
|
||||
</template>
|
||||
<template #action>
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-save"
|
||||
@click="closeDatePane"
|
||||
>
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
<button class="btn btn-save" @click="closeDatePane">
|
||||
{{ $t('action.save')}}
|
||||
</button>
|
||||
<!-- -->
|
||||
</template>
|
||||
|
||||
</modal>
|
||||
</teleport>
|
||||
<template v-else>
|
||||
<div v-if="flag.datePane" class="mt-4 flex-grow-1">
|
||||
<date-pane
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:insideModal="false"
|
||||
ref="dateAddress">
|
||||
|
||||
<template v-slot:before>
|
||||
<button class="btn btn-misc" @click="openEditPane">
|
||||
<i class="fa fa-fw fa-arrow-left"></i>
|
||||
{{ $t('nav.previous')}}
|
||||
</button>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<li>
|
||||
<button class="btn btn-save" @click="closeDatePane">
|
||||
{{ $t('action.save')}}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
</date-pane>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</li>
|
||||
</template>
|
||||
</date-pane>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="address_map"></div>
|
||||
<div id="address_map" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,70 +1,95 @@
|
||||
<template>
|
||||
<h4 class="h3">{{ $t('fill_an_address') }}</h4>
|
||||
<div class="row my-3">
|
||||
<div class="col-lg-6" v-if="!isNoAddress">
|
||||
<div class="form-floating my-1">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
name="floor"
|
||||
:placeholder="$t('floor')"
|
||||
v-model="floor"/>
|
||||
<label for="floor">{{ $t('floor') }}</label>
|
||||
</div>
|
||||
<div class="form-floating my-1">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
name="corridor"
|
||||
:placeholder="$t('corridor')"
|
||||
v-model="corridor"/>
|
||||
<label for="corridor">{{ $t('corridor') }}</label>
|
||||
</div>
|
||||
<div class="form-floating my-1">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
name="steps"
|
||||
:placeholder="$t('steps')"
|
||||
v-model="steps"/>
|
||||
<label for="steps">{{ $t('steps') }}</label>
|
||||
</div>
|
||||
<div class="form-floating my-1">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
name="flat"
|
||||
:placeholder="$t('flat')"
|
||||
v-model="flat"/>
|
||||
<label for="flat">{{ $t('flat') }}</label>
|
||||
</div>
|
||||
<h4 class="h3">
|
||||
{{ $t('fill_an_address') }}
|
||||
</h4>
|
||||
<div class="row my-3">
|
||||
<div
|
||||
class="col-lg-6"
|
||||
v-if="!isNoAddress"
|
||||
>
|
||||
<div class="form-floating my-1">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="floor"
|
||||
:placeholder="$t('floor')"
|
||||
v-model="floor"
|
||||
>
|
||||
<label for="floor">{{ $t('floor') }}</label>
|
||||
</div>
|
||||
<div :class="isNoAddress ? 'col-lg-12' : 'col-lg-6'">
|
||||
<div class="form-floating my-1" v-if="!isNoAddress">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
name="buildingName"
|
||||
maxlength=255
|
||||
:placeholder="$t('buildingName')"
|
||||
v-model="buildingName"/>
|
||||
<label for="buildingName">{{ $t('buildingName') }}</label>
|
||||
</div>
|
||||
<div class="form-floating my-1">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
name="extra"
|
||||
maxlength=255
|
||||
:placeholder="$t('extra')"
|
||||
v-model="extra"/>
|
||||
<label for="extra">{{ $t('extra') }}</label>
|
||||
</div>
|
||||
<div class="form-floating my-1" v-if="!isNoAddress">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
name="distribution"
|
||||
maxlength=255
|
||||
:placeholder="$t('distribution')"
|
||||
v-model="distribution"/>
|
||||
<label for="distribution">{{ $t('distribution') }}</label>
|
||||
</div>
|
||||
<div class="form-floating my-1">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="corridor"
|
||||
:placeholder="$t('corridor')"
|
||||
v-model="corridor"
|
||||
>
|
||||
<label for="corridor">{{ $t('corridor') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-floating my-1">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="steps"
|
||||
:placeholder="$t('steps')"
|
||||
v-model="steps"
|
||||
>
|
||||
<label for="steps">{{ $t('steps') }}</label>
|
||||
</div>
|
||||
<div class="form-floating my-1">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="flat"
|
||||
:placeholder="$t('flat')"
|
||||
v-model="flat"
|
||||
>
|
||||
<label for="flat">{{ $t('flat') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="isNoAddress ? 'col-lg-12' : 'col-lg-6'">
|
||||
<div
|
||||
class="form-floating my-1"
|
||||
v-if="!isNoAddress"
|
||||
>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="buildingName"
|
||||
maxlength="255"
|
||||
:placeholder="$t('buildingName')"
|
||||
v-model="buildingName"
|
||||
>
|
||||
<label for="buildingName">{{ $t('buildingName') }}</label>
|
||||
</div>
|
||||
<div class="form-floating my-1">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="extra"
|
||||
maxlength="255"
|
||||
:placeholder="$t('extra')"
|
||||
v-model="extra"
|
||||
>
|
||||
<label for="extra">{{ $t('extra') }}</label>
|
||||
</div>
|
||||
<div
|
||||
class="form-floating my-1"
|
||||
v-if="!isNoAddress"
|
||||
>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="distribution"
|
||||
maxlength="255"
|
||||
:placeholder="$t('distribution')"
|
||||
v-model="distribution"
|
||||
>
|
||||
<label for="distribution">{{ $t('distribution') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,53 +1,63 @@
|
||||
<template>
|
||||
<div class="my-1">
|
||||
<label class="col-form-label" for="addressSelector">{{ $t('address') }}</label>
|
||||
<VueMultiselect
|
||||
id="addressSelector"
|
||||
v-model="value"
|
||||
:placeholder="$t('select_address')"
|
||||
:tag-placeholder="$t('create_address')"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('create_address')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
@search-change="listenInputSearch"
|
||||
:internal-search="false"
|
||||
ref="addressSelector"
|
||||
@select="selectAddress"
|
||||
@remove="remove"
|
||||
name="field"
|
||||
track-by="id"
|
||||
label="value"
|
||||
:custom-label="transName"
|
||||
:taggable="true"
|
||||
:multiple="false"
|
||||
@tag="addAddress"
|
||||
:loading="isLoading"
|
||||
:options="addresses">
|
||||
</VueMultiselect>
|
||||
</div>
|
||||
<div class="my-1">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="addressSelector"
|
||||
>{{ $t('address') }}</label>
|
||||
<VueMultiselect
|
||||
id="addressSelector"
|
||||
v-model="value"
|
||||
:placeholder="$t('select_address')"
|
||||
:tag-placeholder="$t('create_address')"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('create_address')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
@search-change="listenInputSearch"
|
||||
:internal-search="false"
|
||||
ref="addressSelector"
|
||||
@select="selectAddress"
|
||||
@remove="remove"
|
||||
name="field"
|
||||
track-by="id"
|
||||
label="value"
|
||||
:custom-label="transName"
|
||||
:taggable="true"
|
||||
:multiple="false"
|
||||
@tag="addAddress"
|
||||
:loading="isLoading"
|
||||
:options="addresses"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="custom-address row g-1" v-if="writeNewAddress || writeNewPostalCode || (isEnteredCustomAddress && !isAddressSelectorOpen)">
|
||||
<div class="col-10">
|
||||
<div class="form-floating">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
name="street"
|
||||
:placeholder="$t('street')"
|
||||
v-model="street"/>
|
||||
<label for="street">{{ $t('street') }}</label>
|
||||
</div>
|
||||
<div
|
||||
class="custom-address row g-1"
|
||||
v-if="writeNewAddress || writeNewPostalCode || (isEnteredCustomAddress && !isAddressSelectorOpen)"
|
||||
>
|
||||
<div class="col-10">
|
||||
<div class="form-floating">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="street"
|
||||
:placeholder="$t('street')"
|
||||
v-model="street"
|
||||
>
|
||||
<label for="street">{{ $t('street') }}</label>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="form-floating">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
name="streetNumber"
|
||||
:placeholder="$t('streetNumber')"
|
||||
v-model="streetNumber"/>
|
||||
<label for="streetNumber">{{ $t('streetNumber') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="form-floating">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="streetNumber"
|
||||
:placeholder="$t('streetNumber')"
|
||||
v-model="streetNumber"
|
||||
>
|
||||
<label for="streetNumber">{{ $t('streetNumber') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,53 +1,60 @@
|
||||
<template>
|
||||
<div class="my-1">
|
||||
<label class="col-form-label">{{ $t('city') }}</label>
|
||||
<VueMultiselect
|
||||
id="citySelector"
|
||||
v-model="value"
|
||||
@search-change="listenInputSearch"
|
||||
ref="citySelector"
|
||||
@select="selectCity"
|
||||
@remove="remove"
|
||||
name="field"
|
||||
track-by="id"
|
||||
label="value"
|
||||
:custom-label="transName"
|
||||
:placeholder="$t('select_city')"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('create_postal_code')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
:taggable="true"
|
||||
:multiple="false"
|
||||
:internal-search="false"
|
||||
@tag="addPostcode"
|
||||
:tagPlaceholder="$t('create_postal_code')"
|
||||
:loading="isLoading"
|
||||
:options="cities">
|
||||
</VueMultiselect>
|
||||
</div>
|
||||
<div class="my-1">
|
||||
<label class="col-form-label">{{ $t('city') }}</label>
|
||||
<VueMultiselect
|
||||
id="citySelector"
|
||||
v-model="value"
|
||||
@search-change="listenInputSearch"
|
||||
ref="citySelector"
|
||||
@select="selectCity"
|
||||
@remove="remove"
|
||||
name="field"
|
||||
track-by="id"
|
||||
label="value"
|
||||
:custom-label="transName"
|
||||
:placeholder="$t('select_city')"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('create_postal_code')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
:taggable="true"
|
||||
:multiple="false"
|
||||
:internal-search="false"
|
||||
@tag="addPostcode"
|
||||
:tag-placeholder="$t('create_postal_code')"
|
||||
:loading="isLoading"
|
||||
:options="cities"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="custom-postcode row g-1" v-if="writeNewPostcode || (isEnteredCustomCity && !isCitySelectorOpen)">
|
||||
<div class="col-4">
|
||||
<div class="form-floating">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
id="code"
|
||||
:placeholder="$t('postalCode_code')"
|
||||
v-model="code"/>
|
||||
<label for="code">{{ $t('postalCode_code') }}</label>
|
||||
</div>
|
||||
<div
|
||||
class="custom-postcode row g-1"
|
||||
v-if="writeNewPostcode || (isEnteredCustomCity && !isCitySelectorOpen)"
|
||||
>
|
||||
<div class="col-4">
|
||||
<div class="form-floating">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="code"
|
||||
:placeholder="$t('postalCode_code')"
|
||||
v-model="code"
|
||||
>
|
||||
<label for="code">{{ $t('postalCode_code') }}</label>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="form-floating">
|
||||
<input class="form-control"
|
||||
type="text"
|
||||
id="name"
|
||||
:placeholder="$t('postalCode_name')"
|
||||
v-model="name"/>
|
||||
<label for="name">{{ $t('postalCode_name') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="form-floating">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="name"
|
||||
:placeholder="$t('postalCode_name')"
|
||||
v-model="name"
|
||||
>
|
||||
<label for="name">{{ $t('postalCode_name') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,22 +1,24 @@
|
||||
<template>
|
||||
<div class="my-1">
|
||||
<label class="col-form-label" for="countrySelect">{{ $t('country') }}</label>
|
||||
<VueMultiselect
|
||||
id="countrySelect"
|
||||
label="name"
|
||||
track-by="id"
|
||||
:custom-label="transName"
|
||||
:placeholder="$t('select_country')"
|
||||
:options="sortedCountries"
|
||||
v-model="value"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
@select="selectCountry"
|
||||
@remove="remove"
|
||||
>
|
||||
</VueMultiselect>
|
||||
</div>
|
||||
<div class="my-1">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="countrySelect"
|
||||
>{{ $t('country') }}</label>
|
||||
<VueMultiselect
|
||||
id="countrySelect"
|
||||
label="name"
|
||||
track-by="id"
|
||||
:custom-label="transName"
|
||||
:placeholder="$t('select_country')"
|
||||
:options="sortedCountries"
|
||||
v-model="value"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
@select="selectCountry"
|
||||
@remove="remove"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,56 +1,83 @@
|
||||
<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"
|
||||
/>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="errorMsg && errorMsg.length > 0"
|
||||
class="alert alert-danger"
|
||||
>
|
||||
{{ errorMsg }}
|
||||
</div>
|
||||
|
||||
<div v-if="errorMsg && errorMsg.length > 0" class="alert alert-danger">
|
||||
{{ errorMsg }}
|
||||
</div>
|
||||
<address-render-box :address="selectedAddress" />
|
||||
|
||||
<address-render-box :address="selectedAddress"></address-render-box>
|
||||
|
||||
<div class="row">
|
||||
<div v-if="showDateFrom" class='col-lg-6 address-valid date-since'>
|
||||
<h3>{{ $t(getValidFromDateText) }}</h3>
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" id="validFrom"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
<input type="date" class="form-control form-control-lg" name="validFrom"
|
||||
v-bind:placeholder="$t(getValidFromDateText)"
|
||||
v-model="validFrom"
|
||||
aria-describedby="validFrom"
|
||||
/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div
|
||||
v-if="showDateFrom"
|
||||
class="col-lg-6 address-valid date-since"
|
||||
>
|
||||
<h3>{{ $t(getValidFromDateText) }}</h3>
|
||||
<div class="input-group mb-3">
|
||||
<span
|
||||
class="input-group-text"
|
||||
id="validFrom"
|
||||
><i class="fa fa-fw fa-calendar" /></span>
|
||||
<input
|
||||
type="date"
|
||||
class="form-control form-control-lg"
|
||||
name="validFrom"
|
||||
:placeholder="$t(getValidFromDateText)"
|
||||
v-model="validFrom"
|
||||
aria-describedby="validFrom"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="showDateTo" class='col-lg-6 address-valid date-until'>
|
||||
<h3>{{ $t(getValidToDateText) }}</h3>
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" id="validTo"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
<input type="date" class="form-control form-control-lg" name="validTo"
|
||||
v-bind:placeholder="$t(getValidToDateText)"
|
||||
v-model="validTo"
|
||||
aria-describedby="validTo"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="showDateTo"
|
||||
class="col-lg-6 address-valid date-until"
|
||||
>
|
||||
<h3>{{ $t(getValidToDateText) }}</h3>
|
||||
<div class="input-group mb-3">
|
||||
<span
|
||||
class="input-group-text"
|
||||
id="validTo"
|
||||
><i class="fa fa-fw fa-calendar" /></span>
|
||||
<input
|
||||
type="date"
|
||||
class="form-control form-control-lg"
|
||||
name="validTo"
|
||||
:placeholder="$t(getValidToDateText)"
|
||||
v-model="validTo"
|
||||
aria-describedby="validTo"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<action-buttons v-if="insideModal === false"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz">
|
||||
<template v-slot:before>
|
||||
<slot name="before"></slot>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<slot name="action"></slot>
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<slot name="after"></slot>
|
||||
</template>
|
||||
</action-buttons>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<action-buttons
|
||||
v-if="insideModal === false"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
>
|
||||
<template #before>
|
||||
<slot name="before" />
|
||||
</template>
|
||||
<template #action>
|
||||
<slot name="action" />
|
||||
</template>
|
||||
<template #after>
|
||||
<slot name="after" />
|
||||
</template>
|
||||
</action-buttons>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,100 +1,123 @@
|
||||
<template>
|
||||
<div class="address-form">
|
||||
<div class="address-form">
|
||||
<!-- Not display in modal -->
|
||||
<div
|
||||
v-if="insideModal === false"
|
||||
class="loading"
|
||||
>
|
||||
<i
|
||||
v-if="flag.loading"
|
||||
class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"
|
||||
/>
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
|
||||
<!-- Not display in modal -->
|
||||
<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>
|
||||
<span class="sr-only">Loading...</span>
|
||||
<div
|
||||
v-if="errors.length"
|
||||
class="alert alert-warning"
|
||||
>
|
||||
<ul>
|
||||
<li
|
||||
v-for="(e, i) in errors"
|
||||
:key="i"
|
||||
>
|
||||
{{ e }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h4 class="h3">
|
||||
{{ $t('select_an_address_title') }}
|
||||
</h4>
|
||||
<div class="row my-3">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-check">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
id="isConfidential"
|
||||
v-model="isConfidential"
|
||||
:value="valueConfidential"
|
||||
>
|
||||
<label
|
||||
class="form-check-label"
|
||||
for="isConfidential"
|
||||
>
|
||||
{{ $t('isConfidential') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
id="isNoAddress"
|
||||
v-model="isNoAddress"
|
||||
:value="value"
|
||||
>
|
||||
<label
|
||||
class="form-check-label"
|
||||
for="isNoAddress"
|
||||
>
|
||||
{{ $t('isNoAddress') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<country-selection
|
||||
:context="context"
|
||||
:entity="entity"
|
||||
:flag="flag"
|
||||
:check-errors="checkErrors"
|
||||
@get-cities="$emit('getCities', selected.country)"
|
||||
/>
|
||||
|
||||
<city-selection
|
||||
:entity="entity"
|
||||
:context="context"
|
||||
:focus-on-address="focusOnAddress"
|
||||
:update-map-center="updateMapCenter"
|
||||
:flag="flag"
|
||||
:check-errors="checkErrors"
|
||||
@get-reference-addresses="$emit('getReferenceAddresses', selected.city)"
|
||||
/>
|
||||
|
||||
<address-selection
|
||||
v-if="!isNoAddress"
|
||||
:entity="entity"
|
||||
:context="context"
|
||||
:update-map-center="updateMapCenter"
|
||||
:flag="flag"
|
||||
:check-errors="checkErrors"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="errors.length" class="alert alert-warning" >
|
||||
<ul>
|
||||
<li v-for="(e, i) in errors" :key="i">{{ e }}</li>
|
||||
</ul>
|
||||
<div class="col-lg-6 mt-3 mt-lg-0">
|
||||
<address-map
|
||||
:entity="entity"
|
||||
ref="addressMap"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="h3">{{ $t('select_an_address_title') }}</h4>
|
||||
<div class="row my-3">
|
||||
<div class="col-lg-6">
|
||||
<address-more
|
||||
:entity="entity"
|
||||
:is-no-address="isNoAddress"
|
||||
/>
|
||||
|
||||
<div class="form-check">
|
||||
<input type="checkbox"
|
||||
class="form-check-input"
|
||||
id="isConfidential"
|
||||
v-model="isConfidential"
|
||||
:value="valueConfidential" />
|
||||
<label class="form-check-label" for="isConfidential">
|
||||
{{ $t('isConfidential') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox"
|
||||
class="form-check-input"
|
||||
id="isNoAddress"
|
||||
v-model="isNoAddress"
|
||||
:value="value" />
|
||||
<label class="form-check-label" for="isNoAddress">
|
||||
{{ $t('isNoAddress') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<country-selection
|
||||
v-bind:context="context"
|
||||
v-bind:entity="entity"
|
||||
v-bind:flag="flag"
|
||||
v-bind:checkErrors="checkErrors"
|
||||
@getCities="$emit('getCities', selected.country)">
|
||||
</country-selection>
|
||||
|
||||
<city-selection
|
||||
v-bind:entity="entity"
|
||||
v-bind:context="context"
|
||||
v-bind:focusOnAddress="focusOnAddress"
|
||||
v-bind:updateMapCenter="updateMapCenter"
|
||||
v-bind:flag="flag"
|
||||
v-bind:checkErrors="checkErrors"
|
||||
@getReferenceAddresses="$emit('getReferenceAddresses', selected.city)">
|
||||
</city-selection>
|
||||
|
||||
<address-selection v-if="!isNoAddress"
|
||||
v-bind:entity="entity"
|
||||
v-bind:context="context"
|
||||
v-bind:updateMapCenter="updateMapCenter"
|
||||
v-bind:flag="flag"
|
||||
v-bind:checkErrors="checkErrors">
|
||||
</address-selection>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6 mt-3 mt-lg-0">
|
||||
|
||||
<address-map
|
||||
v-bind:entity="entity"
|
||||
ref="addressMap">
|
||||
</address-map>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<address-more
|
||||
v-bind:entity="entity"
|
||||
v-bind:isNoAddress="isNoAddress">
|
||||
</address-more>
|
||||
|
||||
<action-buttons v-if="insideModal === false"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz">
|
||||
<template v-slot:before>
|
||||
<slot name="before"></slot>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<slot name="action"></slot>
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<slot name="after"></slot>
|
||||
</template>
|
||||
</action-buttons>
|
||||
|
||||
</div>
|
||||
<action-buttons
|
||||
v-if="insideModal === false"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
>
|
||||
<template #before>
|
||||
<slot name="before" />
|
||||
</template>
|
||||
<template #action>
|
||||
<slot name="action" />
|
||||
</template>
|
||||
<template #after>
|
||||
<slot name="after" />
|
||||
</template>
|
||||
</action-buttons>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,75 +1,112 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="!onlyButton"
|
||||
class="mt-4 flex-grow-1"
|
||||
>
|
||||
<div class="loading">
|
||||
<i
|
||||
v-if="flag.loading"
|
||||
class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"
|
||||
/>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="!onlyButton" class="mt-4 flex-grow-1">
|
||||
<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="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="flag.success" class="alert alert-success">
|
||||
{{ $t(getSuccessText) }}
|
||||
<span v-if="forceRedirect">{{ $t('wait_redirection') }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="(!this.context.edit && !this.flag.success && this.context.target.name !== 'household')"
|
||||
class="mt-5"
|
||||
>
|
||||
<div class="no-address-yet">
|
||||
<i
|
||||
class="fa fa-map-marker"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('not_yet_address') }}
|
||||
</p>
|
||||
|
||||
<div v-if="(!this.context.edit && !this.flag.success && this.context.target.name !== 'household')" class="mt-5">
|
||||
<div class="no-address-yet">
|
||||
<i class="fa fa-map-marker" aria-hidden="true"></i>
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('not_yet_address') }}
|
||||
</p>
|
||||
|
||||
<action-buttons
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
class="add-address-btn">
|
||||
<template v-slot:action>
|
||||
<button @click.prevent="$emit('openEditPane')"
|
||||
class="btn" :class="getClassButton"
|
||||
type="button" name="button" :title="$t(getTextButton)">
|
||||
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
||||
</button>
|
||||
</template>
|
||||
</action-buttons>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<address-render-box :address="address" :isMultiline="false" :useDatePane="useDatePane"></address-render-box>
|
||||
|
||||
<div v-if="this.context.target.name === 'household' || this.context.edit">
|
||||
<action-buttons
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz">
|
||||
<template v-slot:action>
|
||||
<button @click.prevent="$emit('openEditPane')"
|
||||
class="btn" :class="getClassButton"
|
||||
type="button" name="button" :title="$t(getTextButton)">
|
||||
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
||||
</button>
|
||||
</template>
|
||||
</action-buttons>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="onlyButton">
|
||||
<action-buttons
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
class="add-address-btn">
|
||||
<template v-slot:action>
|
||||
<button @click.prevent="$emit('openEditPane')"
|
||||
class="btn" :class="getClassButton"
|
||||
type="button" name="button" :title="$t(getTextButton)">
|
||||
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
||||
<action-buttons
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
class="add-address-btn"
|
||||
>
|
||||
<template #action>
|
||||
<button
|
||||
@click.prevent="$emit('openEditPane')"
|
||||
class="btn"
|
||||
:class="getClassButton"
|
||||
type="button"
|
||||
name="button"
|
||||
:title="$t(getTextButton)"
|
||||
>
|
||||
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
||||
</button>
|
||||
</template>
|
||||
</template>
|
||||
</action-buttons>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<address-render-box
|
||||
:address="address"
|
||||
:is-multiline="false"
|
||||
:use-date-pane="useDatePane"
|
||||
/>
|
||||
|
||||
<div v-if="this.context.target.name === 'household' || this.context.edit">
|
||||
<action-buttons
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
>
|
||||
<template #action>
|
||||
<button
|
||||
@click.prevent="$emit('openEditPane')"
|
||||
class="btn"
|
||||
:class="getClassButton"
|
||||
type="button"
|
||||
name="button"
|
||||
:title="$t(getTextButton)"
|
||||
>
|
||||
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
||||
</button>
|
||||
</template>
|
||||
</action-buttons>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="onlyButton">
|
||||
<action-buttons
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
class="add-address-btn"
|
||||
>
|
||||
<template #action>
|
||||
<button
|
||||
@click.prevent="$emit('openEditPane')"
|
||||
class="btn"
|
||||
:class="getClassButton"
|
||||
type="button"
|
||||
name="button"
|
||||
:title="$t(getTextButton)"
|
||||
>
|
||||
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
||||
</button>
|
||||
</template>
|
||||
</action-buttons>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,53 +1,73 @@
|
||||
<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"
|
||||
/>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="errorMsg && errorMsg.length > 0"
|
||||
class="alert alert-danger"
|
||||
>
|
||||
{{ errorMsg }}
|
||||
</div>
|
||||
|
||||
<div v-if="errorMsg && errorMsg.length > 0" class="alert alert-danger">{{ errorMsg }}</div>
|
||||
<h4 class="h3">
|
||||
{{ $t('address_suggestions') }}
|
||||
</h4>
|
||||
|
||||
<h4 class="h3">{{ $t('address_suggestions') }}</h4>
|
||||
|
||||
<div class="flex-table AddressSuggestionList">
|
||||
<div v-for="(a, i) in context.suggestions" class="item-bloc" :key="`suggestions-${i}`">
|
||||
<div class="float-button bottom">
|
||||
<div class="box">
|
||||
<div class="action">
|
||||
<!-- QUESTION normal que ça vienne avant l'adresse ? pourquoi pas après avoir affiché le address-render-box ? -->
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn btn-sm btn-choose" @click="this.pickAddress(a)">
|
||||
{{ $t('use_this_address') }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<address-render-box :address="a"></address-render-box>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-table AddressSuggestionList">
|
||||
<div
|
||||
v-for="(a, i) in context.suggestions"
|
||||
class="item-bloc"
|
||||
:key="`suggestions-${i}`"
|
||||
>
|
||||
<div class="float-button bottom">
|
||||
<div class="box">
|
||||
<div class="action">
|
||||
<!-- QUESTION normal que ça vienne avant l'adresse ? pourquoi pas après avoir affiché le address-render-box ? -->
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-sm btn-choose"
|
||||
@click="this.pickAddress(a)"
|
||||
>
|
||||
{{ $t('use_this_address') }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker" />
|
||||
<address-render-box :address="a" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<action-buttons v-if="insideModal === false"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz">
|
||||
<template v-slot:before>
|
||||
<slot name="before"></slot>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<slot name="action"></slot>
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<slot name="after"></slot>
|
||||
</template>
|
||||
</action-buttons>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<action-buttons
|
||||
v-if="insideModal === false"
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz"
|
||||
>
|
||||
<template #before>
|
||||
<slot name="before" />
|
||||
</template>
|
||||
<template #action>
|
||||
<slot name="action" />
|
||||
</template>
|
||||
<template #after>
|
||||
<slot name="after" />
|
||||
</template>
|
||||
</action-buttons>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
Reference in New Issue
Block a user