mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-01 10:59:45 +00:00
Take Null value for gender into account and fix OnTheFly makeFetch
This commit is contained in:
@@ -24,12 +24,12 @@ const getCivilities = () =>
|
||||
throw Error('Error with request resource response');
|
||||
});
|
||||
|
||||
const getGenders = () =>
|
||||
makeFetch("GET", '/api/1.0/main/gender.json').
|
||||
.then(response => {
|
||||
if (response.ok) { return response.json(); }
|
||||
throw Error('Error with request resource response');
|
||||
});
|
||||
const getGenders = () => makeFetch("GET", '/api/1.0/main/gender.json')
|
||||
// .then(response => {
|
||||
// console.log(response)
|
||||
// if (response.ok) { return response.json(); }
|
||||
// throw Error('Error with request resource response');
|
||||
// });
|
||||
|
||||
const getCentersForPersonCreation = () => makeFetch('GET', '/api/1.0/person/creation/authorized-centers', null);
|
||||
|
||||
|
@@ -39,7 +39,7 @@
|
||||
<p v-if="options.addInfo === true" class="moreinfo">
|
||||
<gender-icon-render-box v-if="person.gender" :gender="person.gender"></gender-icon-render-box>
|
||||
<time v-if="person.birthdate && !person.deathdate" :datetime="person.birthdate" :title="birthdate">
|
||||
{{ $t(`renderbox.birthday.${person.gender.genderTranslation}`) + ' ' + $d(birthdate, 'text') }}
|
||||
{{ $t(person.gender ? `renderbox.birthday.${person.gender.genderTranslation}` : 'renderbox.birthday.neutral') + ' ' + $d(birthdate, 'text') }}
|
||||
</time>
|
||||
|
||||
<time v-else-if="person.birthdate && person.deathdate" :datetime="person.deathdate"
|
||||
|
Reference in New Issue
Block a user