mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 22:04:23 +00:00
Merge remote-tracking branch 'origin/fix_small_issues_juminet' into deploy/quick-fixes
This commit is contained in:
commit
f5d38f606c
@ -38,7 +38,7 @@ Required: Obligatoire
|
|||||||
Persons: Personnes
|
Persons: Personnes
|
||||||
Users: Utilisateurs
|
Users: Utilisateurs
|
||||||
Emergency: Urgent
|
Emergency: Urgent
|
||||||
Sent received: Envoyer / Recevoir
|
Sent received: Entrant / Sortant
|
||||||
Sent: Envoyer
|
Sent: Envoyer
|
||||||
Received: Recevoir
|
Received: Recevoir
|
||||||
by: 'Par '
|
by: 'Par '
|
||||||
|
@ -26,6 +26,12 @@
|
|||||||
<div v-if="errors.length > 0">
|
<div v-if="errors.length > 0">
|
||||||
{{ errors }}
|
{{ errors }}
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="loading">
|
||||||
|
{{ $t('loading') }}
|
||||||
|
</div>
|
||||||
|
<div v-if="success">
|
||||||
|
{{ $t('person_address_creation_success') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@ -68,6 +74,12 @@ export default {
|
|||||||
},
|
},
|
||||||
errors() {
|
errors() {
|
||||||
return this.$store.state.errorMsg;
|
return this.$store.state.errorMsg;
|
||||||
|
},
|
||||||
|
loading() {
|
||||||
|
return this.$store.state.loading;
|
||||||
|
},
|
||||||
|
success() {
|
||||||
|
return this.$store.state.success;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -26,7 +26,9 @@ const addressMessages = {
|
|||||||
date: 'Date de la nouvelle adresse',
|
date: 'Date de la nouvelle adresse',
|
||||||
add_an_address_to_person: 'Ajouter l\'adresse à la personne',
|
add_an_address_to_person: 'Ajouter l\'adresse à la personne',
|
||||||
validFrom: 'Date de la nouvelle adresse',
|
validFrom: 'Date de la nouvelle adresse',
|
||||||
back_to_the_list: 'Retour à la liste'
|
back_to_the_list: 'Retour à la liste',
|
||||||
|
person_address_creation_success: 'La nouvelle adresse de la personne est enregistrée',
|
||||||
|
loading: 'chargement en cours...'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,7 +11,9 @@ const store = createStore({
|
|||||||
address: {},
|
address: {},
|
||||||
editAddress: {}, //TODO or should be address?
|
editAddress: {}, //TODO or should be address?
|
||||||
person: {},
|
person: {},
|
||||||
errorMsg: []
|
errorMsg: [],
|
||||||
|
loading: false,
|
||||||
|
success: false
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
},
|
},
|
||||||
@ -39,11 +41,17 @@ const store = createStore({
|
|||||||
console.log('@M getEditAddress address', address);
|
console.log('@M getEditAddress address', address);
|
||||||
state.editAddress = address;
|
state.editAddress = address;
|
||||||
},
|
},
|
||||||
|
setLoading(state, b) {
|
||||||
|
state.loading = b;
|
||||||
|
},
|
||||||
|
setSuccess(state, b) {
|
||||||
|
state.success = b;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
addAddress({ commit }, payload) {
|
addAddress({ commit }, payload) {
|
||||||
console.log('@A addAddress payload', payload);
|
console.log('@A addAddress payload', payload);
|
||||||
|
commit('setLoading', true);
|
||||||
if('newPostalCode' in payload){
|
if('newPostalCode' in payload){
|
||||||
let postalCodeBody = payload.newPostalCode;
|
let postalCodeBody = payload.newPostalCode;
|
||||||
postalCodeBody = Object.assign(postalCodeBody, {'origin': 3});
|
postalCodeBody = Object.assign(postalCodeBody, {'origin': 3});
|
||||||
@ -55,9 +63,11 @@ const store = createStore({
|
|||||||
.then(address => new Promise((resolve, reject) => {
|
.then(address => new Promise((resolve, reject) => {
|
||||||
commit('addAddress', address);
|
commit('addAddress', address);
|
||||||
resolve();
|
resolve();
|
||||||
|
commit('setLoading', false);
|
||||||
}))
|
}))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
commit('catchError', error);
|
commit('catchError', error);
|
||||||
|
commit('setLoading', false);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -66,15 +76,17 @@ const store = createStore({
|
|||||||
.then(address => new Promise((resolve, reject) => {
|
.then(address => new Promise((resolve, reject) => {
|
||||||
commit('addAddress', address);
|
commit('addAddress', address);
|
||||||
resolve();
|
resolve();
|
||||||
|
commit('setLoading', false);
|
||||||
}))
|
}))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
commit('catchError', error);
|
commit('catchError', error);
|
||||||
|
commit('setLoading', false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addDateToAddressAndAddressToPerson({ commit }, payload) {
|
addDateToAddressAndAddressToPerson({ commit }, payload) {
|
||||||
console.log('@A addDateToAddressAndAddressToPerson payload', payload);
|
console.log('@A addDateToAddressAndAddressToPerson payload', payload);
|
||||||
|
commit('setLoading', true);
|
||||||
patchAddress(payload.addressId, payload.body)
|
patchAddress(payload.addressId, payload.body)
|
||||||
.then(address => new Promise((resolve, reject) => {
|
.then(address => new Promise((resolve, reject) => {
|
||||||
commit('addDateToAddress', address.validFrom);
|
commit('addDateToAddress', address.validFrom);
|
||||||
@ -84,13 +96,17 @@ const store = createStore({
|
|||||||
.then(person => new Promise((resolve, reject) => {
|
.then(person => new Promise((resolve, reject) => {
|
||||||
commit('addAddressToPerson', person);
|
commit('addAddressToPerson', person);
|
||||||
resolve();
|
resolve();
|
||||||
|
commit('setLoading', false);
|
||||||
|
commit('setSuccess', true);
|
||||||
}))
|
}))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
commit('catchError', error);
|
commit('catchError', error);
|
||||||
|
commit('setLoading', false);
|
||||||
})
|
})
|
||||||
))
|
))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
commit('catchError', error);
|
commit('catchError', error);
|
||||||
|
commit('setLoading', false);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateAddress({ commit }, payload) {
|
updateAddress({ commit }, payload) {
|
||||||
|
@ -19,6 +19,10 @@
|
|||||||
<template v-slot:body>
|
<template v-slot:body>
|
||||||
<div class="address_form">
|
<div class="address_form">
|
||||||
|
|
||||||
|
<div v-if="loading">
|
||||||
|
{{ $t('loading') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="address_form__header">
|
<div class="address_form__header">
|
||||||
<h4>{{ $t('select_an_address_title') }}</h4>
|
<h4>{{ $t('select_an_address_title') }}</h4>
|
||||||
</div>
|
</div>
|
||||||
@ -110,6 +114,7 @@ export default {
|
|||||||
showModal: false,
|
showModal: false,
|
||||||
modalDialogClass: "modal-dialog-scrollable modal-xl"
|
modalDialogClass: "modal-dialog-scrollable modal-xl"
|
||||||
},
|
},
|
||||||
|
loading: false,
|
||||||
address: {
|
address: {
|
||||||
writeNewAddress: false,
|
writeNewAddress: false,
|
||||||
writeNewPostalCode: false,
|
writeNewPostalCode: false,
|
||||||
@ -143,7 +148,7 @@ export default {
|
|||||||
extra: null,
|
extra: null,
|
||||||
distribution: null,
|
distribution: null,
|
||||||
},
|
},
|
||||||
errorMsg: {}
|
errorMsg: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -170,33 +175,42 @@ export default {
|
|||||||
},
|
},
|
||||||
getCountries() {
|
getCountries() {
|
||||||
console.log('getCountries');
|
console.log('getCountries');
|
||||||
|
this.loading = true;
|
||||||
fetchCountries().then(countries => new Promise((resolve, reject) => {
|
fetchCountries().then(countries => new Promise((resolve, reject) => {
|
||||||
this.address.loaded.countries = countries.results;
|
this.address.loaded.countries = countries.results;
|
||||||
resolve()
|
resolve()
|
||||||
|
this.loading = false;
|
||||||
}))
|
}))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.errorMsg.push(error.message);
|
this.errorMsg.push(error.message);
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCities(country) {
|
getCities(country) {
|
||||||
console.log('getCities for', country.name);
|
console.log('getCities for', country.name);
|
||||||
|
this.loading = true;
|
||||||
fetchCities(country).then(cities => new Promise((resolve, reject) => {
|
fetchCities(country).then(cities => new Promise((resolve, reject) => {
|
||||||
this.address.loaded.cities = cities.results.filter(c => c.origin !== 3); // filter out user-defined cities
|
this.address.loaded.cities = cities.results.filter(c => c.origin !== 3); // filter out user-defined cities
|
||||||
resolve();
|
resolve();
|
||||||
|
this.loading = false;
|
||||||
}))
|
}))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.errorMsg.push(error.message);
|
this.errorMsg.push(error.message);
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getReferenceAddresses(city) {
|
getReferenceAddresses(city) {
|
||||||
|
this.loading = true;
|
||||||
console.log('getReferenceAddresses for', city.name);
|
console.log('getReferenceAddresses for', city.name);
|
||||||
fetchReferenceAddresses(city).then(addresses => new Promise((resolve, reject) => {
|
fetchReferenceAddresses(city).then(addresses => new Promise((resolve, reject) => {
|
||||||
console.log('addresses', addresses);
|
console.log('addresses', addresses);
|
||||||
this.address.loaded.addresses = addresses.results;
|
this.address.loaded.addresses = addresses.results;
|
||||||
resolve();
|
resolve();
|
||||||
|
this.loading = false;
|
||||||
}))
|
}))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.errorMsg.push(error.message);
|
this.errorMsg.push(error.message);
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateMapCenter(point) {
|
updateMapCenter(point) {
|
||||||
|
@ -23,7 +23,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
init() {
|
init() {
|
||||||
map = L.map('address_map').setView([48.8589, 2.3469], 12);
|
map = L.map('address_map').setView([46.67059, -1.42683], 12);
|
||||||
|
|
||||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="floor"
|
name="floor"
|
||||||
|
maxlength=16
|
||||||
:placeholder="$t('floor')"
|
:placeholder="$t('floor')"
|
||||||
v-model="floor"/>
|
v-model="floor"/>
|
||||||
</div>
|
</div>
|
||||||
@ -13,6 +14,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="corridor"
|
name="corridor"
|
||||||
|
maxlength=16
|
||||||
:placeholder="$t('corridor')"
|
:placeholder="$t('corridor')"
|
||||||
v-model="corridor"/>
|
v-model="corridor"/>
|
||||||
</div>
|
</div>
|
||||||
@ -21,6 +23,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="steps"
|
name="steps"
|
||||||
|
maxlength=16
|
||||||
:placeholder="$t('steps')"
|
:placeholder="$t('steps')"
|
||||||
v-model="steps"/>
|
v-model="steps"/>
|
||||||
</div>
|
</div>
|
||||||
@ -29,6 +32,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="flat"
|
name="flat"
|
||||||
|
maxlength=16
|
||||||
:placeholder="$t('flat')"
|
:placeholder="$t('flat')"
|
||||||
v-model="flat"/>
|
v-model="flat"/>
|
||||||
</div>
|
</div>
|
||||||
@ -37,6 +41,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="buildingName"
|
name="buildingName"
|
||||||
|
maxlength=255
|
||||||
:placeholder="$t('buildingName')"
|
:placeholder="$t('buildingName')"
|
||||||
v-model="buildingName"/>
|
v-model="buildingName"/>
|
||||||
</div>
|
</div>
|
||||||
@ -45,6 +50,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="extra"
|
name="extra"
|
||||||
|
maxlength=255
|
||||||
:placeholder="$t('extra')"
|
:placeholder="$t('extra')"
|
||||||
v-model="extra"/>
|
v-model="extra"/>
|
||||||
</div>
|
</div>
|
||||||
@ -53,6 +59,7 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="distribution"
|
name="distribution"
|
||||||
|
maxlength=255
|
||||||
:placeholder="$t('distribution')"
|
:placeholder="$t('distribution')"
|
||||||
v-model="distribution"/>
|
v-model="distribution"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Chill\PersonBundle\Controller;
|
namespace Chill\PersonBundle\Controller;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Entity\Activity;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
||||||
use Chill\PersonBundle\Privacy\AccompanyingPeriodPrivacyEvent;
|
use Chill\PersonBundle\Privacy\AccompanyingPeriodPrivacyEvent;
|
||||||
@ -75,7 +76,7 @@ class AccompanyingCourseController extends Controller
|
|||||||
return $this->redirectToRoute('chill_person_accompanying_course_edit', [
|
return $this->redirectToRoute('chill_person_accompanying_course_edit', [
|
||||||
'accompanying_period_id' => $period->getId()
|
'accompanying_period_id' => $period->getId()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -96,9 +97,15 @@ class AccompanyingCourseController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$activities = $this->getDoctrine()->getManager()->getRepository(Activity::class)->findBy(
|
||||||
|
['accompanyingPeriod' => $accompanyingCourse],
|
||||||
|
['date' => 'DESC'],
|
||||||
|
);
|
||||||
|
|
||||||
return $this->render('@ChillPerson/AccompanyingCourse/index.html.twig', [
|
return $this->render('@ChillPerson/AccompanyingCourse/index.html.twig', [
|
||||||
'accompanyingCourse' => $accompanyingCourse,
|
'accompanyingCourse' => $accompanyingCourse,
|
||||||
'withoutHousehold' => $withoutHousehold
|
'withoutHousehold' => $withoutHousehold,
|
||||||
|
'activities' => $activities
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,18 +297,16 @@ class PersonAddressController extends AbstractController
|
|||||||
*/
|
*/
|
||||||
protected function findAddressById(Person $person, $address_id)
|
protected function findAddressById(Person $person, $address_id)
|
||||||
{
|
{
|
||||||
// filtering address
|
$address = $this->getDoctrine()->getManager()
|
||||||
$criteria = Criteria::create()
|
->getRepository(Address::class)
|
||||||
->where(Criteria::expr()->eq('id', $address_id))
|
->find($address_id)
|
||||||
->setMaxResults(1);
|
;
|
||||||
$addresses = $person->getAddresses()->matching($criteria);
|
|
||||||
|
|
||||||
if (count($addresses) === 0) {
|
if (!$person->getAddresses()->contains($address)) {
|
||||||
throw $this->createNotFoundException("Address with id $address_id "
|
throw $this->createAccessDeniedException("Not allowed to see this address");
|
||||||
. "matching person $person_id not found ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $addresses->first();
|
return $address;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,7 +51,7 @@ class Household
|
|||||||
* targetEntity=HouseholdMember::class,
|
* targetEntity=HouseholdMember::class,
|
||||||
* mappedBy="household"
|
* mappedBy="household"
|
||||||
* )
|
* )
|
||||||
* @Serializer\Groups({"write", "read"})
|
* @Serializer\Groups({"read"})
|
||||||
*/
|
*/
|
||||||
private Collection $members;
|
private Collection $members;
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ class Household
|
|||||||
public function getCurrentMembersOrdered(?\DateTimeImmutable $now = null): Collection
|
public function getCurrentMembersOrdered(?\DateTimeImmutable $now = null): Collection
|
||||||
{
|
{
|
||||||
$members = $this->getCurrentMembers($now);
|
$members = $this->getCurrentMembers($now);
|
||||||
|
|
||||||
$members->getIterator()
|
$members->getIterator()
|
||||||
->uasort(
|
->uasort(
|
||||||
function (HouseholdMember $a, HouseholdMember $b) {
|
function (HouseholdMember $a, HouseholdMember $b) {
|
||||||
|
@ -24,6 +24,12 @@
|
|||||||
<div v-if="errors.length > 0">
|
<div v-if="errors.length > 0">
|
||||||
{{ errors }}
|
{{ errors }}
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="loading">
|
||||||
|
{{ $t('loading') }}
|
||||||
|
</div>
|
||||||
|
<div v-if="success">
|
||||||
|
{{ $t('household_address_move_success') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ul class="record_actions sticky-form-buttons">
|
<ul class="record_actions sticky-form-buttons">
|
||||||
@ -65,6 +71,12 @@ export default {
|
|||||||
},
|
},
|
||||||
errors() {
|
errors() {
|
||||||
return this.$store.state.errorMsg;
|
return this.$store.state.errorMsg;
|
||||||
|
},
|
||||||
|
loading() {
|
||||||
|
return this.$store.state.loading;
|
||||||
|
},
|
||||||
|
success() {
|
||||||
|
return this.$store.state.success;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -7,7 +7,9 @@ const appMessages = {
|
|||||||
add_an_address_to_household: 'Déménager le ménage',
|
add_an_address_to_household: 'Déménager le ménage',
|
||||||
validFrom: 'Date du déménagement',
|
validFrom: 'Date du déménagement',
|
||||||
move_date: 'Date du déménagement',
|
move_date: 'Date du déménagement',
|
||||||
back_to_the_list: 'Retour à la liste'
|
back_to_the_list: 'Retour à la liste',
|
||||||
|
household_address_move_success: 'La nouvelle adresse du ménage est enregistrée',
|
||||||
|
loading: 'chargement en cours...'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,7 +12,9 @@ const store = createStore({
|
|||||||
newAddress: {},
|
newAddress: {},
|
||||||
household: {},
|
household: {},
|
||||||
validFrom: {},
|
validFrom: {},
|
||||||
errorMsg: []
|
errorMsg: [],
|
||||||
|
loading: false,
|
||||||
|
success: false
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
},
|
},
|
||||||
@ -31,12 +33,18 @@ const store = createStore({
|
|||||||
addDateToAddress(state, validFrom) {
|
addDateToAddress(state, validFrom) {
|
||||||
console.log('@M addDateToAddress address.validFrom', validFrom);
|
console.log('@M addDateToAddress address.validFrom', validFrom);
|
||||||
state.validFrom = validFrom;
|
state.validFrom = validFrom;
|
||||||
|
},
|
||||||
|
setLoading(state, b) {
|
||||||
|
state.loading = b;
|
||||||
|
},
|
||||||
|
setSuccess(state, b) {
|
||||||
|
state.success = b;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
addAddress({ commit }, payload) {
|
addAddress({ commit }, payload) {
|
||||||
console.log('@A addAddress payload', payload);
|
console.log('@A addAddress payload', payload);
|
||||||
|
commit('setLoading', true);
|
||||||
if('newPostalCode' in payload){
|
if('newPostalCode' in payload){
|
||||||
postPostalCode(payload.newPostalCode)
|
postPostalCode(payload.newPostalCode)
|
||||||
.then(postalCode => {
|
.then(postalCode => {
|
||||||
@ -46,9 +54,11 @@ const store = createStore({
|
|||||||
.then(address => new Promise((resolve, reject) => {
|
.then(address => new Promise((resolve, reject) => {
|
||||||
commit('addAddress', address);
|
commit('addAddress', address);
|
||||||
resolve();
|
resolve();
|
||||||
|
commit('setLoading', false);
|
||||||
}))
|
}))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
commit('catchError', error);
|
commit('catchError', error);
|
||||||
|
commit('setLoading', false);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -57,15 +67,17 @@ const store = createStore({
|
|||||||
.then(address => new Promise((resolve, reject) => {
|
.then(address => new Promise((resolve, reject) => {
|
||||||
commit('addAddress', address);
|
commit('addAddress', address);
|
||||||
resolve();
|
resolve();
|
||||||
|
commit('setLoading', false);
|
||||||
}))
|
}))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
commit('catchError', error);
|
commit('catchError', error);
|
||||||
|
commit('setLoading', false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addDateToAddressAndAddressToHousehold({ commit }, payload) {
|
addDateToAddressAndAddressToHousehold({ commit }, payload) {
|
||||||
console.log('@A addDateToAddressAndAddressToHousehold payload', payload);
|
console.log('@A addDateToAddressAndAddressToHousehold payload', payload);
|
||||||
|
commit('setLoading', true);
|
||||||
patchAddress(payload.addressId, payload.body)
|
patchAddress(payload.addressId, payload.body)
|
||||||
.then(address => new Promise((resolve, reject) => {
|
.then(address => new Promise((resolve, reject) => {
|
||||||
commit('addDateToAddress', address.validFrom);
|
commit('addDateToAddress', address.validFrom);
|
||||||
@ -74,14 +86,18 @@ const store = createStore({
|
|||||||
postAddressToHousehold(payload.householdId, payload.addressId)
|
postAddressToHousehold(payload.householdId, payload.addressId)
|
||||||
.then(household => new Promise((resolve, reject) => {
|
.then(household => new Promise((resolve, reject) => {
|
||||||
commit('addAddressToHousehold', household);
|
commit('addAddressToHousehold', household);
|
||||||
|
commit('setSuccess', true);
|
||||||
|
commit('setLoading', false);
|
||||||
resolve();
|
resolve();
|
||||||
}))
|
}))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
commit('catchError', error);
|
commit('catchError', error);
|
||||||
|
commit('setLoading', false);
|
||||||
})
|
})
|
||||||
))
|
))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
commit('catchError', error);
|
commit('catchError', error);
|
||||||
|
commit('setLoading', false);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -67,9 +67,9 @@
|
|||||||
<h3>{{ p.person.firstname ~ ' ' ~ p.person.lastname }}</h3>
|
<h3>{{ p.person.firstname ~ ' ' ~ p.person.lastname }}</h3>
|
||||||
<p>
|
<p>
|
||||||
{% set born = (p.person.gender == 'woman') ? 'née': 'né' %}
|
{% set born = (p.person.gender == 'woman') ? 'née': 'né' %}
|
||||||
{% set gender = (p.person.gender == 'woman') ? 'fa-venus' :
|
{% set gender = (p.person.gender == 'woman') ? 'fa-venus' :
|
||||||
(p.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
(p.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||||
{% set genderTitle = (p.person.gender == 'woman') ? 'femme' :
|
{% set genderTitle = (p.person.gender == 'woman') ? 'femme' :
|
||||||
(p.person.gender == 'man') ? 'homme' : 'neutre' %}
|
(p.person.gender == 'man') ? 'homme' : 'neutre' %}
|
||||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ p.person.birthdate|format_date('short') }}
|
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ p.person.birthdate|format_date('short') }}
|
||||||
</p>
|
</p>
|
||||||
@ -103,9 +103,9 @@
|
|||||||
</li>
|
</li>
|
||||||
{% if p.person.isSharingHousehold %}
|
{% if p.person.isSharingHousehold %}
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="{{ chill_path_add_return_path(
|
href="{{ chill_path_add_return_path(
|
||||||
'chill_person_household_summary',
|
'chill_person_household_summary',
|
||||||
{ 'household_id': p.person.getCurrentHousehold.id }
|
{ 'household_id': p.person.getCurrentHousehold.id }
|
||||||
) }}"
|
) }}"
|
||||||
class="sc-button">
|
class="sc-button">
|
||||||
@ -128,7 +128,7 @@
|
|||||||
{% for r in accompanyingCourse.resources %}
|
{% for r in accompanyingCourse.resources %}
|
||||||
<div class="item-bloc">
|
<div class="item-bloc">
|
||||||
{% if r.person %}
|
{% if r.person %}
|
||||||
|
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
<h3>
|
<h3>
|
||||||
@ -137,9 +137,9 @@
|
|||||||
</h3>
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
{% set born = (r.person.gender == 'woman') ? 'née': 'né' %}
|
{% set born = (r.person.gender == 'woman') ? 'née': 'né' %}
|
||||||
{% set gender = (r.person.gender == 'woman') ? 'fa-venus' :
|
{% set gender = (r.person.gender == 'woman') ? 'fa-venus' :
|
||||||
(r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
(r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||||
{% set genderTitle = (r.person.gender == 'woman') ? 'femme' :
|
{% set genderTitle = (r.person.gender == 'woman') ? 'femme' :
|
||||||
(r.person.gender == 'homme') ? 'fa-mars' : 'neutre' %}
|
(r.person.gender == 'homme') ? 'fa-mars' : 'neutre' %}
|
||||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
|
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
|
||||||
</p>
|
</p>
|
||||||
@ -174,10 +174,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if r.thirdParty %}
|
{% if r.thirdParty %}
|
||||||
|
|
||||||
<div class="item-row">
|
<div class="item-row">
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
<h3>
|
<h3>
|
||||||
@ -214,7 +214,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -222,9 +222,11 @@
|
|||||||
|
|
||||||
<h2>{{ 'Social actions'|trans }}</h2>
|
<h2>{{ 'Social actions'|trans }}</h2>
|
||||||
|
|
||||||
<h2>{{ 'Last events on accompanying course'|trans }}</h2>
|
{% set person = null %}
|
||||||
|
{% block contentActivity %}
|
||||||
|
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'person'} %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{# ==> insert accompanyingCourse vue component #}
|
{# ==> insert accompanyingCourse vue component #}
|
||||||
<div id="accompanying-course"></div>
|
<div id="accompanying-course"></div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user