From 21fd69488f065f75cdb5ca229ff04a6953d5014a Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 12 Aug 2021 15:21:33 +0200 Subject: [PATCH 1/7] start of PersonRenderBox in vue --- .../_components/Entity/PersonRenderBox.vue | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue new file mode 100644 index 000000000..3fead699c --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -0,0 +1,102 @@ + + + + + From c48586cd0e95ce126ff6b3de0725e9d209277a5f Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 12 Aug 2021 15:55:35 +0200 Subject: [PATCH 2/7] renaming of PersonItem into ParticipationItem --- .../AccompanyingCourse/components/PersonsAssociated.vue | 8 ++++---- .../{PersonItem.vue => ParticipationItem.vue} | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/{PersonItem.vue => ParticipationItem.vue} (98%) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue index 0155d89dc..c5efafa16 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue @@ -16,13 +16,13 @@ - - + @@ -42,13 +42,13 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index 3fead699c..232fff316 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -3,7 +3,7 @@
-
+
@@ -11,19 +11,19 @@ - **firstname** - **lastname** + {{ participation.person.firstName }} + {{ participation.person.lastName }} - + - + **label** - + - **firstname** - **lastname** + {{ participation.person.firstName }} + {{ participation.person.lastName }} @@ -33,7 +33,7 @@ **Person object?** - **person_id** + {{ participation.person.id }}
@@ -42,9 +42,9 @@

- **age** + {{ participation.person.age }}

@@ -61,9 +61,9 @@
  • - **mobilenumber** + {{ participation.person.mobilenumber }} - **regular phonenumber** + {{ participation.person.phonenumber }} **no phonenumber**
  • @@ -87,7 +87,8 @@ export default { name: "PersonRenderBox", props: [ - 'options' + 'options', + 'participation' ], data() { return { From 166144e57e5ac340fcdb5551792d383ec8a8e916 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 13 Aug 2021 13:15:08 +0200 Subject: [PATCH 4/7] first conditionalities added analog to twig template --- .../components/PersonsAssociated.vue | 12 +++++-- .../PersonsAssociated/ParticipationItem.vue | 27 +++++++++++---- .../_components/Entity/PersonRenderBox.vue | 34 +++++++++---------- 3 files changed, 46 insertions(+), 27 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue index c5efafa16..cd05eb709 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue @@ -5,8 +5,16 @@
    + + + - +
    -
    + + + + {{ participation.person.firstName }} + {{ participation.person.lastName }} - + + --> + + From 438134690fb394824989aef4b0d2a91b133d5aa5 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 13 Aug 2021 14:57:56 +0200 Subject: [PATCH 5/7] styling fixed with proper class cascade --- .../PersonsAssociated/ParticipationItem.vue | 4 +-- .../_components/Entity/PersonRenderBox.vue | 33 ++++++++++++++----- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue index 1c2978b80..a50fa049f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated/ParticipationItem.vue @@ -2,11 +2,11 @@ + From b89a66b20cb35c00b79518e53452d6275c806895 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 13 Aug 2021 18:31:15 +0200 Subject: [PATCH 6/7] dynamic properties displayed --- .../_components/Entity/PersonRenderBox.vue | 65 ++++++++++++++++--- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index 72f9a2c37..6fc3933a8 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -19,7 +19,7 @@ - **label** + hello @@ -30,7 +30,7 @@ - **label** + {{ alt.label }} @@ -43,13 +43,12 @@

    - -

    -

    {{this.gender}}

    @@ -73,18 +72,48 @@ {{ participation.person.phonenumber }} - No phonenumber listed + Pas d'information + + +
      +
    • + + +
    • +
    • + + +
    • +
    • + +
    • +
    • + +
    -
      + @@ -96,11 +125,27 @@ From 77fe497994c19b5b4e79d0b3c457692cca1db575 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Sat, 14 Aug 2021 12:01:44 +0200 Subject: [PATCH 7/7] altNames displayed dynamically --- .../vuejs/_components/Entity/PersonRenderBox.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index 6fc3933a8..d504cb60f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -19,7 +19,7 @@ - hello + {{ altNameLabel }} @@ -30,7 +30,7 @@ - {{ alt.label }} + {{ altNameLabel }} @@ -50,7 +50,6 @@ {{ participation.person.age }}

      - @@ -146,6 +145,16 @@ export default { var year = date.getFullYear() return `${day} ${months[month]} ${year}`; }, + altNameLabel: function(){ + for(let i = 0; i < this.participation.person.altNames.length; i++){ + return this.participation.person.altNames[i].label + } + }, + altNameKey: function(){ + for(let i = 0; i < this.participation.person.altNames.length; i++){ + return this.participation.person.altNames[i].key + } + }, } }