Merge branch 'master' into ticket-app-master

# Conflicts:
#	.eslint-baseline.json
#	src/Bundle/ChillMainBundle/Entity/User.php
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressMore.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CitySelection.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/CountrySelection.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue
#	src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue
#	src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml
This commit is contained in:
2025-09-05 18:32:01 +02:00
192 changed files with 6915 additions and 1173 deletions

View File

@@ -12,22 +12,24 @@
ref="showAddress"
/>
<!-- 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"
modal-dialog-class="modal-dialog-scrollable modal-xl"
@close="resetPane"
>
<template #header>
<h2 class="modal-title">
{{ trans(getTextTitle) }}
<span v-if="flag.loading" class="loading">
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
<span class="sr-only">{{
trans(ADDRESS_LOADING)
}}</span>
</span>
</h2>
</template>
<template #body>
<suggest-pane
@@ -43,7 +45,7 @@
<template #footer>
<button @click="openEditPane" class="btn btn-create">
{{ $t("create_a_new_address") }}
{{ trans(CREATE_A_NEW_ADDRESS) }}
</button>
</template>
</modal>
@@ -62,13 +64,13 @@
>
<template #before v-if="!bypassFirstStep">
<a class="btn btn-cancel" @click="resetPane">
{{ $t("action.cancel") }}
{{ trans(CANCEL) }}
</a>
</template>
<template #action>
<li>
<button @click="openEditPane" class="btn btn-create">
{{ $t("create_a_new_address") }}
{{ trans(CREATE_A_NEW_ADDRESS) }}
</button>
</li>
</template>
@@ -85,10 +87,12 @@
>
<template #header>
<h2 class="modal-title">
{{ $t(getTextTitle) }}
{{ trans(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 class="sr-only">{{
trans(ADDRESS_LOADING)
}}</span>
</span>
</h2>
</template>
@@ -108,17 +112,17 @@
</template>
<template #footer>
<!--<button class="btn btn-cancel change-icon" @click="resetPane">{{ $t('action.cancel') }}</button>-->
<!--<button class="btn btn-cancel change-icon" @click="resetPane">{{ trans(CANCEL) }}</button>-->
<button
v-if="!this.context.edit && this.useDatePane"
class="btn btn-update change-icon"
@click="closeEditPane"
>
{{ $t("nav.next") }}
{{ trans(NEXT) }}
<i class="fa fa-fw fa-arrow-right" />
</button>
<button v-else class="btn btn-save" @click="closeEditPane">
{{ $t("action.save") }}
{{ trans(SAVE) }}
</button>
</template>
</modal>
@@ -139,19 +143,19 @@
>
<template #before>
<a class="btn btn-cancel" @click="resetPane">
{{ $t("action.cancel") }}
{{ trans(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") }}
{{ trans(NEXT) }}
<i class="fa fa-fw fa-arrow-right" />
</button>
</li>
<li v-else>
<button class="btn btn-save" @click="closeEditPane">
{{ $t("action.save") }}
{{ trans(SAVE) }}
</button>
</li>
</template>
@@ -168,10 +172,12 @@
>
<template #header>
<h2 class="modal-title">
{{ $t(getTextTitle) }}
{{ trans(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 class="sr-only">{{
trans(ADDRESS_LOADING)
}}</span>
</span>
</h2>
</template>
@@ -190,10 +196,10 @@
<template #footer>
<button class="btn btn-misc" @click="openEditPane">
<i class="fa fa-fw fa-arrow-left" />
{{ $t("nav.previous") }}
{{ trans(PREVIOUS) }}
</button>
<button class="btn btn-save" @click="closeDatePane">
{{ $t("action.save") }}
{{ trans(SAVE) }}
</button>
<!-- -->
</template>
@@ -213,13 +219,13 @@
<template #before>
<button class="btn btn-misc" @click="openEditPane">
<i class="fa fa-fw fa-arrow-left" />
{{ $t("nav.previous") }}
{{ trans(PREVIOUS) }}
</button>
</template>
<template #action>
<li>
<button class="btn btn-save" @click="closeDatePane">
{{ $t("action.save") }}
{{ trans(SAVE) }}
</button>
</li>
</template>
@@ -241,9 +247,16 @@ import {
postPostalCode,
} from "../api";
import {
postAddressToPerson,
postAddressToHousehold,
} from "ChillPersonAssets/vuejs/_api/AddAddress.js";
CREATE_A_NEW_ADDRESS,
ADDRESS_LOADING,
ACTIVITY_CREATE_ADDRESS,
ACTIVITY_EDIT_ADDRESS,
CANCEL,
SAVE,
PREVIOUS,
NEXT,
trans,
} from "translator";
import ShowPane from "./ShowPane.vue";
import SuggestPane from "./SuggestPane.vue";
import EditPane from "./EditPane.vue";
@@ -251,7 +264,17 @@ import DatePane from "./DatePane.vue";
export default {
name: "AddAddress",
props: ["context", "options", "addressChangedCallback"],
setup() {
return {
trans,
CREATE_A_NEW_ADDRESS,
ADDRESS_LOADING,
CANCEL,
SAVE,
PREVIOUS,
NEXT,
};
},props: ["context", "options", "addressChangedCallback"],
components: {
Modal,
ShowPane,
@@ -369,9 +392,11 @@ export default {
typeof this.options.title !== "undefined" &&
(this.options.title.edit !== null || this.options.title.create !== null)
) {
return this.context.edit
? this.options.title.edit
: this.options.title.create;
console.log("this.options.title", this.options.title);
return this.context.edit
? ACTIVITY_EDIT_ADDRESS
: ACTIVITY_CREATE_ADDRESS;
}
return this.context.edit
? this.defaultz.title.edit
@@ -498,7 +523,7 @@ export default {
getAddress(id)
.then(
(address) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.entity.address = address;
this.flag.loading = false;
resolve();
@@ -515,7 +540,7 @@ export default {
fetchCountries()
.then(
(countries) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.entity.loaded.countries = countries.results;
if (this.flag.showPane === true) {
this.closeShowPane();
@@ -543,7 +568,7 @@ export default {
fetchCities(country)
.then(
(cities) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.entity.loaded.cities = cities.results.filter(
(c) => c.origin !== 3,
); // filter out user-defined cities
@@ -562,7 +587,7 @@ export default {
fetchReferenceAddresses(city)
.then(
(addresses) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.entity.loaded.addresses = addresses.results;
this.flag.loading = false;
resolve();
@@ -784,7 +809,7 @@ export default {
return postAddress(payload)
.then(
(address) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.entity.address = address;
this.flag.loading = false;
this.flag.success = true;
@@ -833,7 +858,7 @@ export default {
return patchAddress(payload.addressId, payload.newAddress)
.then(
(address) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.entity.address = address;
this.flag.loading = false;
this.flag.success = true;

View File

@@ -1,6 +1,6 @@
<template>
<h4 class="h3">
{{ $t("fill_an_address") }}
{{ trans(ADDRESS_FILL_AN_ADDRESS) }}
</h4>
<div class="row my-3">
<div class="col-lg-6" v-if="!isNoAddress">
@@ -9,40 +9,40 @@
class="form-control"
type="text"
name="floor"
:placeholder="$t('floor')"
:placeholder="trans(ADDRESS_FLOOR)"
v-model="floor"
/>
<label for="floor">{{ $t("floor") }}</label>
<label for="floor">{{ trans(ADDRESS_FLOOR) }}</label>
</div>
<div class="form-floating my-1">
<input
class="form-control"
type="text"
name="corridor"
:placeholder="$t('corridor')"
:placeholder="trans(ADDRESS_CORRIDOR)"
v-model="corridor"
/>
<label for="corridor">{{ $t("corridor") }}</label>
<label for="corridor">{{ trans(ADDRESS_CORRIDOR) }}</label>
</div>
<div class="form-floating my-1">
<input
class="form-control"
type="text"
name="steps"
:placeholder="$t('steps')"
:placeholder="trans(ADDRESS_STEPS)"
v-model="steps"
/>
<label for="steps">{{ $t("steps") }}</label>
<label for="steps">{{ trans(ADDRESS_STEPS) }}</label>
</div>
<div class="form-floating my-1">
<input
class="form-control"
type="text"
name="flat"
:placeholder="$t('flat')"
:placeholder="trans(ADDRESS_FLAT)"
v-model="flat"
/>
<label for="flat">{{ $t("flat") }}</label>
<label for="flat">{{ trans(ADDRESS_FLAT) }}</label>
</div>
</div>
<div :class="isNoAddress ? 'col-lg-12' : 'col-lg-6'">
@@ -52,10 +52,12 @@
type="text"
name="buildingName"
maxlength="255"
:placeholder="$t('buildingName')"
:placeholder="trans(ADDRESS_BUILDING_NAME)"
v-model="buildingName"
/>
<label for="buildingName">{{ $t("buildingName") }}</label>
<label for="buildingName">{{
trans(ADDRESS_BUILDING_NAME)
}}</label>
</div>
<div class="form-floating my-1">
<input
@@ -63,10 +65,10 @@
type="text"
name="extra"
maxlength="255"
:placeholder="$t('extra')"
:placeholder="trans(ADDRESS_EXTRA)"
v-model="extra"
/>
<label for="extra">{{ $t("extra") }}</label>
<label for="extra">{{ trans(ADDRESS_EXTRA) }}</label>
</div>
<div class="form-floating my-1" v-if="!isNoAddress">
<input
@@ -74,19 +76,48 @@
type="text"
name="distribution"
maxlength="255"
:placeholder="$t('distribution')"
:placeholder="trans(ADDRESS_DISTRIBUTION)"
v-model="distribution"
/>
<label for="distribution">{{ $t("distribution") }}</label>
<label for="distribution">{{
trans(ADDRESS_DISTRIBUTION)
}}</label>
</div>
</div>
</div>
</template>
<script>
import {
ADDRESS_STREET,
ADDRESS_STREET_NUMBER,
ADDRESS_FLOOR,
ADDRESS_CORRIDOR,
ADDRESS_STEPS,
ADDRESS_FLAT,
ADDRESS_BUILDING_NAME,
ADDRESS_DISTRIBUTION,
ADDRESS_EXTRA,
ADDRESS_FILL_AN_ADDRESS,
trans,
} from "translator";
export default {
name: "AddressMore",
props: ["entity", "isNoAddress"],
setup() {
return {
ADDRESS_STREET,
ADDRESS_STREET_NUMBER,
ADDRESS_FLOOR,
ADDRESS_CORRIDOR,
ADDRESS_STEPS,
ADDRESS_FLAT,
ADDRESS_BUILDING_NAME,
ADDRESS_DISTRIBUTION,
ADDRESS_EXTRA,
ADDRESS_FILL_AN_ADDRESS,
trans,
};
},props: ["entity", "isNoAddress"],
computed: {
floor: {
set(value) {

View File

@@ -1,16 +1,16 @@
<template>
<div class="my-1">
<label class="col-form-label" for="addressSelector">{{
$t("address")
trans(ADDRESS_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')"
:placeholder="trans(ADDRESS_SELECT_ADDRESS)"
:tag-placeholder="trans(ADDRESS_CREATE_ADDRESS)"
:select-label="trans(MULTISELECT_SELECT_LABEL)"
:deselect-label="trans(ADDRESS_CREATE_ADDRESS)"
:selected-label="trans(MULTISELECT_SELECTED_LABEL)"
@search-change="listenInputSearch"
:internal-search="false"
ref="addressSelector"
@@ -42,10 +42,10 @@
class="form-control"
type="text"
name="street"
:placeholder="$t('street')"
:placeholder="trans(ADDRESS_STREET)"
v-model="street"
/>
<label for="street">{{ $t("street") }}</label>
<label for="street">{{ trans(ADDRESS_STREET) }}</label>
</div>
</div>
<div class="col-2">
@@ -54,10 +54,12 @@
class="form-control"
type="text"
name="streetNumber"
:placeholder="$t('streetNumber')"
:placeholder="trans(ADDRESS_STREET_NUMBER)"
v-model="streetNumber"
/>
<label for="streetNumber">{{ $t("streetNumber") }}</label>
<label for="streetNumber">{{
trans(ADDRESS_STREET_NUMBER)
}}</label>
</div>
</div>
</div>
@@ -69,11 +71,32 @@ import {
searchReferenceAddresses,
fetchReferenceAddresses,
} from "../../api.js";
import {
ADDRESS_STREET,
ADDRESS_STREET_NUMBER,
ADDRESS_ADDRESS,
MULTISELECT_SELECTED_LABEL,
MULTISELECT_SELECT_LABEL,
ADDRESS_SELECT_ADDRESS,
ADDRESS_CREATE_ADDRESS,
trans,
} from "translator";
export default {
name: "AddressSelection",
components: { VueMultiselect },
props: ["entity", "context", "updateMapCenter", "flag", "checkErrors"],
setup() {
return {
ADDRESS_STREET,
ADDRESS_STREET_NUMBER,
ADDRESS_ADDRESS,
MULTISELECT_SELECTED_LABEL,
MULTISELECT_SELECT_LABEL,
ADDRESS_SELECT_ADDRESS,
ADDRESS_CREATE_ADDRESS,
trans,
};
},props: ["entity", "context", "updateMapCenter", "flag", "checkErrors"],
data() {
return {
value: this.context.edit ? this.entity.address.addressReference : null,
@@ -148,7 +171,7 @@ export default {
searchReferenceAddresses(query, this.entity.selected.city)
.then(
(addresses) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.entity.loaded.addresses = addresses.results;
this.isLoading = false;
resolve();
@@ -165,7 +188,7 @@ export default {
fetchReferenceAddresses(this.entity.selected.city)
.then(
(addresses) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.entity.loaded.addresses = addresses.results;
this.isLoading = false;
resolve();

View File

@@ -1,6 +1,6 @@
<template>
<div class="my-1">
<label class="col-form-label">{{ $t("city") }}</label>
<label class="col-form-label">{{ trans(ADDRESS_CITY) }}</label>
<VueMultiselect
id="citySelector"
v-model="value"
@@ -12,15 +12,15 @@
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')"
:placeholder="trans(ADDRESS_SELECT_CITY)"
:select-label="trans(MULTISELECT_SELECT_LABEL)"
:deselect-label="trans(ADDRESS_CREATE_POSTAL_CODE)"
:selected-label="trans(MULTISELECT_SELECTED_LABEL)"
:taggable="true"
:multiple="false"
:internal-search="false"
@tag="addPostcode"
:tag-placeholder="$t('create_postal_code')"
:tag-placeholder="trans(ADDRESS_CREATE_POSTAL_CODE)"
:loading="isLoading"
:options="cities"
/>
@@ -36,10 +36,10 @@
class="form-control"
type="text"
id="code"
:placeholder="$t('postalCode_code')"
:placeholder="trans(ADDRESS_POSTAL_CODE_CODE)"
v-model="code"
/>
<label for="code">{{ $t("postalCode_code") }}</label>
<label for="code">{{ trans(ADDRESS_POSTAL_CODE_CODE) }}</label>
</div>
</div>
<div class="col-8">
@@ -48,10 +48,10 @@
class="form-control"
type="text"
id="name"
:placeholder="$t('postalCode_name')"
:placeholder="trans(ADDRESS_POSTAL_CODE_NAME)"
v-model="name"
/>
<label for="name">{{ $t("postalCode_name") }}</label>
<label for="name">{{ trans(ADDRESS_POSTAL_CODE_NAME) }}</label>
</div>
</div>
</div>
@@ -60,11 +60,32 @@
<script>
import VueMultiselect from "vue-multiselect";
import { searchCities, fetchCities } from "../../api.js";
import {
MULTISELECT_SELECTED_LABEL,
MULTISELECT_SELECT_LABEL,
ADDRESS_POSTAL_CODE_CODE,
ADDRESS_POSTAL_CODE_NAME,
ADDRESS_CREATE_POSTAL_CODE,
ADDRESS_CITY,
ADDRESS_SELECT_CITY,
trans,
} from "translator";
export default {
name: "CitySelection",
components: { VueMultiselect },
props: [
setup() {
return {
MULTISELECT_SELECTED_LABEL,
MULTISELECT_SELECT_LABEL,
ADDRESS_CITY,
ADDRESS_SELECT_CITY,
ADDRESS_POSTAL_CODE_CODE,
ADDRESS_POSTAL_CODE_NAME,
ADDRESS_CREATE_POSTAL_CODE,
trans,
};
},props: [
"entity",
"context",
"focusOnAddress",
@@ -164,7 +185,7 @@ export default {
searchCities(query, this.entity.selected.country)
.then(
(cities) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.entity.loaded.cities = cities.results.filter(
(c) => c.origin !== 3,
); // filter out user-defined cities
@@ -183,7 +204,7 @@ export default {
fetchCities(this.entity.selected.country)
.then(
(cities) =>
new Promise((resolve, reject) => {
new Promise((resolve) => {
this.entity.loaded.cities = cities.results.filter(
(c) => c.origin !== 3,
); // filter out user-defined cities

View File

@@ -1,19 +1,19 @@
<template>
<div class="my-1">
<label class="col-form-label" for="countrySelect">{{
$t("country")
trans(ADDRESS_COUNTRY)
}}</label>
<VueMultiselect
id="countrySelect"
label="name"
track-by="id"
:custom-label="transName"
:placeholder="$t('select_country')"
:placeholder="trans(ADDRESS_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-label="trans(MULTISELECT_SELECT_LABEL)"
:deselect-label="trans(MULTISELECT_DESELECT_LABEL)"
:selected-label="trans(MULTISELECT_SELECTED_LABEL)"
@select="selectCountry"
@remove="remove"
/>
@@ -23,11 +23,28 @@
<script>
import VueMultiselect from "vue-multiselect";
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";
import {
MULTISELECT_SELECTED_LABEL,
MULTISELECT_SELECT_LABEL,
MULTISELECT_DESELECT_LABEL,
ADDRESS_COUNTRY,
ADDRESS_SELECT_COUNTRY,
trans,
} from "translator";
export default {
name: "CountrySelection",
components: { VueMultiselect },
props: ["context", "entity", "flag", "checkErrors"],
setup() {
return {
MULTISELECT_SELECTED_LABEL,
MULTISELECT_SELECT_LABEL,
MULTISELECT_DESELECT_LABEL,
ADDRESS_COUNTRY,
ADDRESS_SELECT_COUNTRY,
trans,
};
},props: ["context", "entity", "flag", "checkErrors"],
emits: ["getCities"],
data() {
return {

View File

@@ -15,7 +15,7 @@
</div>
<h4 class="h3">
{{ $t("select_an_address_title") }}
{{ trans(ADDRESS_SELECT_AN_ADDRESS_TITLE) }}
</h4>
<div class="row my-3">
<div class="col-lg-6">
@@ -28,7 +28,7 @@
:value="valueConfidential"
/>
<label class="form-check-label" for="isConfidential">
{{ $t("isConfidential") }}
{{ trans(ADDRESS_IS_CONFIDENTIAL) }}
</label>
</div>
<div class="form-check">
@@ -40,7 +40,7 @@
:value="value"
/>
<label class="form-check-label" for="isNoAddress">
{{ $t("isNoAddress") }}
{{ trans(ADDRESS_IS_NO_ADDRESS) }}
</label>
</div>
@@ -105,6 +105,12 @@ import AddressSelection from "./AddAddress/AddressSelection";
import AddressMap from "./AddAddress/AddressMap";
import AddressMore from "./AddAddress/AddressMore";
import ActionButtons from "./ActionButtons.vue";
import {
ADDRESS_SELECT_AN_ADDRESS_TITLE,
ADDRESS_IS_CONFIDENTIAL,
ADDRESS_IS_NO_ADDRESS,
trans,
} from "translator";
export default {
name: "EditPane",
@@ -116,7 +122,14 @@ export default {
AddressMore,
ActionButtons,
},
props: [
setup() {
return {
trans,
ADDRESS_SELECT_AN_ADDRESS_TITLE,
ADDRESS_IS_CONFIDENTIAL,
ADDRESS_IS_NO_ADDRESS,
};
},props: [
"context",
"options",
"defaultz",

View File

@@ -2,7 +2,7 @@
<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>
<span class="sr-only">{{ trans(ADDRESS_LOADING) }}</span>
</div>
<div v-if="errorMsg && errorMsg.length > 0" class="alert alert-danger">
@@ -10,8 +10,10 @@
</div>
<div v-if="flag.success" class="alert alert-success">
{{ $t(getSuccessText) }}
<span v-if="forceRedirect">{{ $t("wait_redirection") }}</span>
{{ trans(getSuccessText) }}
<span v-if="forceRedirect">{{
trans(ADDRESS_WAIT_REDIRECTION)
}}</span>
</div>
<div
@@ -25,7 +27,7 @@
<div class="no-address-yet">
<i class="fa fa-map-marker" aria-hidden="true" />
<p class="chill-no-data-statement">
{{ $t("not_yet_address") }}
{{ trans(ADDRESS_NOT_YET_ADDRESS) }}
</p>
<action-buttons
@@ -40,9 +42,9 @@
:class="getClassButton"
type="button"
name="button"
:title="$t(getTextButton)"
:title="trans(getTextButton)"
>
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
<span v-if="displayTextButton">{{ trans(getTextButton) }}</span>
</button>
</template>
</action-buttons>
@@ -64,9 +66,9 @@
:class="getClassButton"
type="button"
name="button"
:title="$t(getTextButton)"
:title="trans(getTextButton)"
>
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
<span v-if="displayTextButton">{{ trans(getTextButton) }}</span>
</button>
</template>
</action-buttons>
@@ -86,9 +88,9 @@
:class="getClassButton"
type="button"
name="button"
:title="$t(getTextButton)"
:title="trans(getTextButton)"
>
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
<span v-if="displayTextButton">{{ trans(getTextButton) }}</span>
</button>
</template>
</action-buttons>
@@ -98,14 +100,35 @@
<script>
import AddressRenderBox from "ChillMainAssets/vuejs/_components/Entity/AddressRenderBox.vue";
import ActionButtons from "./ActionButtons.vue";
import {
ACTIVITY_CREATE_ADDRESS,
ACTIVITY_EDIT_ADDRESS,
ADDRESS_NOT_YET_ADDRESS,
ADDRESS_WAIT_REDIRECTION,
ADDRESS_LOADING,
ADDRESS_ADDRESS_EDIT_SUCCESS,
ADDRESS_ADDRESS_NEW_SUCCESS,
trans,
} from "translator";
export default {
name: "ShowPane",
components: {
methods: {},components: {
AddressRenderBox,
ActionButtons,
},
props: [
setup() {
return {
trans,
ACTIVITY_CREATE_ADDRESS,
ACTIVITY_EDIT_ADDRESS,
ADDRESS_NOT_YET_ADDRESS,
ADDRESS_WAIT_REDIRECTION,
ADDRESS_LOADING,
ADDRESS_ADDRESS_NEW_SUCCESS,
ADDRESS_ADDRESS_EDIT_SUCCESS,
};
},props: [
"context",
"defaultz",
"options",
@@ -145,16 +168,18 @@ export default {
(this.options.button.text.edit !== null ||
this.options.button.text.create !== null)
) {
return this.context.edit
? this.options.button.text.edit
: this.options.button.text.create;
}
// console.log('this.options.button.text', this.options.button.text)
return this.context.edit
? ACTIVITY_CREATE_ADDRESS
: ACTIVITY_EDIT_ADDRESS;
}
console.log("defaultz", this.defaultz);
return this.context.edit
? this.defaultz.button.text.edit
: this.defaultz.button.text.create;
},
getSuccessText() {
return this.context.edit ? "address_edit_success" : "address_new_success";
return this.context.edit ? ADDRESS_ADDRESS_EDIT_SUCCESS : ADDRESS_ADDRESS_NEW_SUCCESS;
},
onlyButton() {
return typeof this.options.onlyButton !== "undefined"

View File

@@ -61,3 +61,5 @@ const props = defineProps({
entity: Object,
});
</script>
thirdparty_duplicate: merge: Fussioner find: 'Désigner un tiers doublon'