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

@@ -170,13 +170,14 @@ div.banner {
font-weight: lighter;
font-size: 50%;
margin-left: 0.5em;
&:before { content: '(n°'; }
&:after { content: ')'; }
&.same-size {
font-size: unset;
font-weight: unset;
}
}
span.age {
margin-left: 0.5em;
&:before { content: '('; }
&:after { content: ')'; }
}
}

View File

@@ -10,8 +10,9 @@ $chill-household-context: #929d69;
// Badges colors
$social-issue-color: #4bafe8;
$social-action-color: $orange;
$event-theme-color: #ecc546;
$activity-color: yellowgreen;
// budget colors
$budget-resource-color: #6d9e63;
$budget-charge-color: #e03851;
$budget-charge-color: #e03851;

View File

@@ -44,8 +44,6 @@ section.chill-entity {
margin-left: 0.5em;
}
span.id-number {
&:before { content: '(n°'; }
&:after { content: ')'; }
}
}
p.moreinfo {}

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'

View File

@@ -4,7 +4,7 @@
{% endblock crud_content_header %}
{% block crud_content_view %}
{% block crud_content_view_details %}
<dl class="chill_view_data">
<dt>id</dt>
@@ -20,7 +20,7 @@
{{ 'Cancel'|trans }}
</a>
</li>
{% endblock %}
{% endblock %}
{% block content_view_actions_before %}{% endblock %}
{% block content_form_actions_delete %}
{% if chill_crud_action_exists(crud_name, 'delete') %}
@@ -32,7 +32,7 @@
</li>
{% endif %}
{% endif %}
{% endblock content_form_actions_delete %}
{% endblock content_form_actions_delete %}
{% block content_view_actions_duplicate_link %}
{% if chill_crud_action_exists(crud_name, 'new') %}
{% if is_granted(chill_crud_config('role', crud_name, 'new'), entity) %}
@@ -44,6 +44,17 @@
{% endif %}
{% endif %}
{% endblock content_view_actions_duplicate_link %}
{% block content_view_actions_merge %}
<li>
<a href="{{ chill_path_add_return_path('chill_thirdparty_find_duplicate',
{ 'thirdparty_id': entity.id }) }}"
title="{{ 'Merge'|trans }}"
class="btn btn-misc">
<i class="bi bi-chevron-contract"></i>
{{ 'Merge'|trans }}
</a>
</li>
{% endblock %}
{% block content_view_actions_edit_link %}
{% if chill_crud_action_exists(crud_name, 'edit') %}
{% if is_granted(chill_crud_config('role', crud_name, 'edit'), entity) %}

View File

@@ -63,8 +63,7 @@
<script>
const uncheckAll = () => {
const allCenters = document.getElementsByName('centers[center][]');
const allCenters = document.getElementsByName('centers[centers][]');
allCenters.forEach(checkbox => checkbox.checked = false)
}
</script>

View File

@@ -5,7 +5,7 @@
<strong><i class="fa fa-fw fa-filter"></i>Filtrer la liste</strong>
</button>
</h2>
<div class="accordion-collapse collapse" id="filterOrderCollapse" aria-labelledby="filterOrderHeading" data-bs-parent="#filterOrderAccordion">
<div id="filterOrderCollapse" aria-labelledby="filterOrderHeading" data-bs-parent="#filterOrderAccordion">
{% set btnSubmit = 0 %}
<div class="accordion-body chill_filter_order container-xxl p-5 py-2">
<div class="row my-2">
@@ -68,10 +68,17 @@
{{ form_label(form.entity_choices[checkbox_name])}}
{% endif %}
<div class="col-sm-8 pt-2">
{% for c in form['entity_choices'][checkbox_name].children %}
{{ form_widget(c) }}
{{ form_label(c) }}
{% endfor %}
{% set field = form['entity_choices'][checkbox_name] %}
{% if field.vars.expanded %}
{# Render expanded checkboxes/radios #}
{% for c in field.children %}
{{ form_widget(c) }}
{{ form_label(c) }}
{% endfor %}
{% else %}
{# Render select dropdown #}
{{ form_widget(field) }}
{% endif %}
</div>
</div>
{% endfor %}

View File

@@ -18,8 +18,9 @@
{%- endif -%}
{%- endblock form_label %}
{# this has been rewritten for chill #}
{% block form_label_class -%}
col-sm-4
{% if 'div_col_width' in label_attr|default({})|keys %}{% if label_attr['div_col_width'] is not same as false %}{{ label_attr['div_col_width'] }}{% endif %}{% else %}col-sm-4{% endif %}
{%- endblock form_label_class %}
{# Rows #}

View File

@@ -0,0 +1,13 @@
<header>
<nav class="navbar navbar-dark bg-primary navbar-expand-md">
<div class="container-xxl">
<div class="col-12">
<a class="navbar-brand" href="{{ path('chill_main_homepage') }}">
{{ include('@ChillMain/Layout/_header-logo.html.twig') }}
</a>
</div>
</div>
</nav>
</header>

View File

@@ -26,11 +26,12 @@
{{ 'Welcome' | trans }}<br/>
<b>
{{ app.user.username }}
{{ render(controller('Chill\\MainBundle\\Controller\\UIController::showNotificationUserCounterAction')) }}
</b>
{% if app.user %}
<b>
{{ app.user.username }}
{{ render(controller('Chill\\MainBundle\\Controller\\UIController::showNotificationUserCounterAction')) }}
</b>
{% endif %}
{% if is_granted('IS_IMPERSONATOR') %}
<i class="fa fa-wrench fa-lg" title="Impersonate mode"></i>
{% endif %}

View File

@@ -69,41 +69,44 @@
{% endif %}
</li>
{% endif %}
{% if c.notification.addressees|length > 0 %}
{% if c.notification.addressees|length > 0 or c.notification.addresseeUserGroups|length > 0 %}
<li class="notification-to">
{% if c.notification_cc is defined %}
{% if c.notification_cc %}
<span class="item-key">
<abbr title="{{ 'notification.sent_cc' | trans }}">
{{ "notification.cc" | trans }} :
</abbr>
</span>
<abbr title="{{ 'notification.sent_cc' | trans }}">
{{ "notification.cc" | trans }} :
</abbr>
</span>
{% else %}
<span class="item-key">
<abbr title="{{ 'notification.sent_to' | trans }}">
{{ "notification.to" | trans }} :
</abbr>
</span>
<abbr title="{{ 'notification.sent_to' | trans }}">
{{ "notification.to" | trans }} :
</abbr>
</span>
{% endif %}
{% else %}
<span class="item-key">
<abbr title="{{ 'notification.sent_to' | trans }}">
{{ "notification.to" | trans }} :
</abbr>
</span>
<abbr title="{{ 'notification.sent_to' | trans }}">
{{ "notification.to" | trans }} :
</abbr>
</span>
{% endif %}
{% for a in c.notification.addressees %}
<span class="badge-user">
{{ a | chill_entity_render_string({'at_date': c.notification.date}) }}
</span>
{{ a | chill_entity_render_string({'at_date': c.notification.date}) }}
</span>
{% endfor %}
{% for a in c.notification.addressesEmails %}
<span
class="badge-user"
title="{{ 'notification.Email with access link'|trans|e('html_attr') }}"
>
{{ a }}
</span>
{{ a }}
</span>
{% endfor %}
{% for ug in c.notification.addresseeUserGroups %}
{{ ug|chill_entity_render_box }}
{% endfor %}
</li>
{% endif %}

View File

@@ -21,8 +21,6 @@
{{ form_row(form.title, { 'label': 'notification.subject'|trans }) }}
{{ form_row(form.addressees, { 'label': 'notification.sent_to'|trans }) }}
{{ form_row(form.addressesEmails) }}
{% include handler.template(notification) with handler.templateData(notification) %}
<div class="mb-3 row">

View File

@@ -0,0 +1,24 @@
{% apply markdown_to_html %}
# {{ 'notification.daily_digest.title'|trans }}
{{ 'notification.daily_digest.greeting'|trans({'%user%': user.label ?? user.email}) }},
{{ 'daily_notifications'|trans({'notification_count': notification_count}) }}
{% for notification in notifications %}
## {{ notification.title }}
{{ notification.message }}
{{ 'notification.daily_digest.view_notification'|trans }}
{{ absolute_url(path('chill_main_notification_show', {'_locale': user.locale, 'id': notification.id }, false)) }}
{% if not loop.last %}
---
{% endif %}
{% endfor %}
---
{{ 'notification.daily_digest.signature'|trans }}
{% endapply %}

View File

@@ -16,29 +16,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>
{{ 'Login to %installation_name%' | trans({ '%installation_name%' : installation.name } ) }}
</title>
<link rel="shortcut icon" href="{{ asset('build/images/favicon.ico') }}" type="image/x-icon">
{{ encore_entry_link_tags('chill') }}
</head>
<body>
<header class="navigation container-fluid">
<div class="col-4 d-md-none parent">
<div class="col-10 col-md-12 offset-2 logo-container">
<a href="{{ path('chill_main_homepage') }}">
<img class="logo" src="{{ asset('build/images/logo-chill-sans-slogan_white.png') }}">
</a>
</div>
</div>
</header>
{% extends "@ChillMain/layout.html.twig" %}
<div id="content">
{% block content %}{% endblock %}
</div>
</body>
</html>
{% set header_logo_only = 1 %}
{% block title %}{{ 'Login to %installation_name%' | trans({ '%installation_name%' : installation.name } ) }}{% endblock %}
{% block content %}
<div id="content">
{% block password_content %}{% endblock %}
</div>
{% endblock %}

View File

@@ -2,7 +2,7 @@
{% block title %}{{ "New password set"|trans }}{% endblock %}
{% block content %}
{% block password_content %}
<div class="col-10 centered">
<h1>{{ "New password set"|trans }}</h1>

View File

@@ -4,7 +4,7 @@
{% block title %}{{ title }}{% endblock %}
{% block content %}
{% block password_content %}
<div class="col-10 centered">
<h1>{{ title }}</h1>

View File

@@ -22,7 +22,7 @@
{% block title %}{{"Recover password"|trans}}{% endblock %}
{% block content %}
{% block password_content %}
<div class="col-10 centered">
<h1>{{ 'Recover password'|trans }}</h1>

View File

@@ -2,7 +2,7 @@
{% block title "Check your email"|trans %}
{% block content %}
{% block password_content %}
<div class="col-10 centered">

View File

@@ -20,7 +20,7 @@
{% extends "@ChillMain/layout.html.twig" %}
{% block title %}{{"My profile"|trans}}{% endblock %}
{% block title %}{{"user.profile.title"|trans}}{% endblock %}
{% block content %}
<div class="justify-content-center col-10">
@@ -45,9 +45,35 @@
{{ form_start(form) }}
{{ form_row(form.phonenumber) }}
<h2 class="mb-4">{{ 'user.profile.notification_preferences'|trans }}</h2>
<table class="table table-striped align-middle">
<thead>
<tr>
<th>{{ 'notification.flags.type'|trans }}</th>
<th class="text-center">{{ 'notification.flags.preferences.immediate_email'|trans }}</th>
<th class="text-center">{{ 'notification.flags.preferences.daily_email'|trans }}</th>
</tr>
</thead>
<tbody class="table-hover table-group-divider">
{% for flag in form.notificationFlags %}
<tr>
<td class="col-sm-6">
{{ form_label(flag, null, {'label_attr': {'div_col_width': false}}) }}
</td>
<td class="text-center">
{{ form_widget(flag.immediate_email, {'label_attr': { 'class': 'checkbox-inline checkbox-switch'}}) }}
</td>
<td class="text-center">
{{ form_widget(flag.daily_email, {'label_attr': { 'class': 'checkbox-inline checkbox-switch'}}) }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul class="record_actions">
<li>
{{ form_widget(form.submit, { 'attr': { 'class': 'btn btn-save' } } ) }}
<button type="submit" class="btn btn-save">{{ 'Save'|trans }}</button>
</li>
</ul>

View File

@@ -30,7 +30,11 @@
{{ include('@ChillMain/Layout/_debug.html.twig') }}
{% endif %}
{{ include('@ChillMain/Layout/_header.html.twig') }}
{% if header_logo_only is defined and header_logo_only == 1 %}
{{ include('@ChillMain/Layout/_header_logo_only.html.twig') }}
{% else %}
{{ include('@ChillMain/Layout/_header.html.twig') }}
{% endif %}
{% block top_banner %}{#
To use if you want to add a banner below the header (ie the menu)