From 34b3c6fa327a40c99c7507ebcd24ca9f753aa18b Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 3 Mar 2022 14:15:20 +0100 Subject: [PATCH 01/64] bugfix when position of member is null --- .../vuejs/_components/Entity/HouseholdRenderBox.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue index 16d0fa2ff..163f49bcf 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/HouseholdRenderBox.vue @@ -87,10 +87,14 @@ export default { currentMembers() { let members = this.household.members.filter(m => this.household.current_members_id.includes(m.id)) .sort((a, b) => { - if (a.position.ordering < b.position.ordering) { + + const orderA = a.position ? a.position.ordering : 0; + const orderB = b.position ? b.position.ordering : 0; + + if (orderA < orderB) { return -1; } - if (a.position.ordering > b.position.ordering) { + if (orderA > orderB) { return 1; } if (a.holder && !b.holder) { From 892be425807ff901efcd593c764bab132cfd46ab Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 3 Mar 2022 16:28:31 +0100 Subject: [PATCH 02/64] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd743078..8dd9bbbe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to * [confidential] Fix position of toggle button so it does not cover text nor fall outside of box (no issue) * [parcours] Fix edit of both thirdparty and contact name (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/474) * [template] do not list inactive templates (for doc generator) +* [household] bugfix if position of member is null, renderbox no longer throws an error (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/480) ## Test releases From 3ff92915809e0907eda8d4aa051725b6a01cc748 Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 3 Mar 2022 16:37:58 +0100 Subject: [PATCH 03/64] assign User to undsipatched acc period: filter users by job type --- .../public/mod/AccompanyingPeriod/setReferrer.js | 13 ++++++------- .../_components/AccompanyingPeriod/SetReferrer.vue | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/mod/AccompanyingPeriod/setReferrer.js b/src/Bundle/ChillPersonBundle/Resources/public/mod/AccompanyingPeriod/setReferrer.js index b73c0afea..939075380 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/mod/AccompanyingPeriod/setReferrer.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/mod/AccompanyingPeriod/setReferrer.js @@ -19,22 +19,21 @@ import {fetchResults} from 'ChillMainAssets/lib/api/apiMethods.js'; */ document.querySelectorAll('[data-set-referrer-app]').forEach(function (el) { - let - periodId = Number.parseInt(el.dataset.setReferrerAccompanyingPeriodId); - + const periodId = Number.parseInt(el.dataset.setReferrerAccompanyingPeriodId); + const jobId = Number.parseInt(el.dataset.setReferrerJobId); const url = `/api/1.0/person/accompanying-course/${periodId}/referrers-suggested.json`; fetchResults(url).then(suggested => { - + const filteredSuggested = suggested.filter((s) => s.user_job ? s.user_job.id === jobId : false); const app = createApp({ components: { SetReferrer, }, template: - '', + '', data() { return { - periodId, suggested, original: suggested, + periodId, filteredSuggested, original: filteredSuggested, } }, methods: { @@ -56,7 +55,7 @@ document.querySelectorAll('[data-set-referrer-app]').forEach(function (el) { label.textContent = ref.text; label.classList.remove('chill-no-data-statement'); - this.suggested = this.original.filter(user => user.id !== ref.id); + this.filteredSuggested = this.original.filter(user => user.id !== ref.id); } } }); diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriod/SetReferrer.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriod/SetReferrer.vue index 3d3675c73..38418f305 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriod/SetReferrer.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AccompanyingPeriod/SetReferrer.vue @@ -1,12 +1,12 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig index 54a0b86b7..3dfc27d2f 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig @@ -59,7 +59,7 @@ must be shown in such list #} {%- if render == 'list' -%} -
  • +
  • {% if options['with_picto'] %} {% endif %} @@ -68,7 +68,7 @@ {%- endif -%} {%- if render == 'inline' -%} - + {% if options['with_picto'] %} {% endif %} @@ -77,7 +77,7 @@ {%- endif -%} {%- if render == 'bloc' -%} -
    +
    {% if options['has_no_address'] == true and address.isNoAddress == true %} {% if address.postCode is not empty %}
    diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss index 92542f178..fba0516a7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss +++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss @@ -33,6 +33,8 @@ div.banner { padding-top: 1em; padding-bottom: 1em; div.contact { + display: flex; + align-content: center; & > * { margin-right: 1em; } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue index 713693605..7cf0dcecc 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue @@ -9,7 +9,7 @@ {{ $t('requestor.is_anonymous') }} - + @@ -12,28 +12,24 @@ diff --git a/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig index 54a0b86b7..3dfc27d2f 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Entity/address.html.twig @@ -59,7 +59,7 @@ must be shown in such list #} {%- if render == 'list' -%} -
  • +
  • {% if options['with_picto'] %} {% endif %} @@ -68,7 +68,7 @@ {%- endif -%} {%- if render == 'inline' -%} - + {% if options['with_picto'] %} {% endif %} @@ -77,7 +77,7 @@ {%- endif -%} {%- if render == 'bloc' -%} -
    +
    {% if options['has_no_address'] == true and address.isNoAddress == true %} {% if address.postCode is not empty %}
    diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss index 92542f178..fba0516a7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss +++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss @@ -33,6 +33,8 @@ div.banner { padding-top: 1em; padding-bottom: 1em; div.contact { + display: flex; + align-content: center; & > * { margin-right: 1em; } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue index 713693605..7cf0dcecc 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Requestor.vue @@ -9,7 +9,7 @@ {{ $t('requestor.is_anonymous') }} - +