From 9b06ccc3e6466fe4f315ee9c6b21af8f4c3735e8 Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 7 Mar 2022 11:13:11 +0100 Subject: [PATCH 001/104] user admin: use flex-table and flex-bloc in twig --- .../Resources/views/User/index.html.twig | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig index 53bd89482..a1f55e7d3 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig @@ -1,60 +1,60 @@ {% extends '@ChillMain/Admin/Permission/layout_crud_permission_index.html.twig' %} {% block admin_content -%} - {% embed '@ChillMain/CRUD/_index.html.twig' %} - {% block table_entities_thead_tr %} - {{ 'crud.admin_user.index.is_active'|trans }} - {{ 'crud.admin_user.index.usernames'|trans }} - {{ 'crud.admin_user.index.mains'|trans }} -   - {% endblock %} - {% block table_entities_tbody %} - {% for entity in entities %} - - + +

{{"Users"|trans}}

+ {% for entity in entities %} +
+
+
+
+ {{ entity.label }} {% if entity.isEnabled %} {% else %} {% endif %} - - - {{ entity.username }} -
- {{ entity.label }} -
- {{ entity.email }} - - +
+
{{ entity.email }}
+
+
+
+ login: {{ entity.username|e('html_attr') }} +
+
{% if entity.userJob %} - {{ entity.userJob.label|localize_translatable_string }} -
+ {{ entity.userJob.label|localize_translatable_string }} {% endif %} +
+
+
+
{% if entity.mainScope %} - {{ entity.mainScope.name|localize_translatable_string }} -
+ {{ entity.mainScope.name|localize_translatable_string }} {% endif %} {% if entity.mainCenter %} - {{ entity.mainCenter.name }} + , {{ entity.mainCenter.name }} {% endif %} - - -
    +
+
+
+
    +
  • + +
  • +
  • + +
  • + {% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
  • - +
  • -
  • - -
  • - {% if is_granted('ROLE_ALLOWED_TO_SWITCH') %} -
  • - -
  • - {% endif %} -
- - - {% endfor %} - {% endblock %} - {% endembed %} -{% endblock %} + {% endif %} + +
+
+ +
+ {% endfor %} + +{% endblock %} \ No newline at end of file From 17e83deb55f7e652acaaec5c5031e655fa539345 Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 8 Mar 2022 09:46:41 +0100 Subject: [PATCH 002/104] User admin: put pagination --- src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig index a1f55e7d3..5a558b6a0 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig @@ -57,4 +57,6 @@ {% endfor %} + {{ chill_pagination(paginator) }} + {% endblock %} \ No newline at end of file From 492c22d1b7582e0d4e70c87d0da37daad1f33cfe Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 10 Mar 2022 08:40:11 +0100 Subject: [PATCH 003/104] AccompanyingPeriodWork: add referrers field --- .../AccompanyingPeriodWork.php | 34 ++++++++++++++++ .../migrations/Version20220310063629.php | 40 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20220310063629.php diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index ed00c8611..f9f9f46e1 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -142,6 +142,15 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues */ private Collection $persons; + /** + * @ORM\ManyToMany(targetEntity=User::class) + * @ORM\JoinTable(name="chill_person_accompanying_period_work_referrer") + * @Serializer\Groups({"read", "docgen:read", "read:accompanyingPeriodWork:light"}) + * @Serializer\Groups({"accompanying_period_work:edit"}) + * @Serializer\Groups({"accompanying_period_work:create"}) + */ + private Collection $referrers; + /** * @ORM\ManyToMany(targetEntity=Result::class, inversedBy="accompanyingPeriodWorks") * @ORM\JoinTable(name="chill_person_accompanying_period_work_result") @@ -196,6 +205,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues $this->thirdParties = new ArrayCollection(); $this->persons = new ArrayCollection(); $this->accompanyingPeriodWorkEvaluations = new ArrayCollection(); + $this->referrers = new ArrayCollection(); } public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self @@ -497,4 +507,28 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this; } + + /** + * @return Collection|User[] + */ + public function getReferrers(): Collection + { + return $this->referrers; + } + + public function addReferrer(User $referrer): self + { + if (!$this->referrers->contains($referrer)) { + $this->referrers[] = $referrer; + } + + return $this; + } + + public function removeReferrer(User $referrer): self + { + $this->referrers->removeElement($referrer); + + return $this; + } } diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20220310063629.php b/src/Bundle/ChillPersonBundle/migrations/Version20220310063629.php new file mode 100644 index 000000000..0d56ff4b1 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20220310063629.php @@ -0,0 +1,40 @@ +addSql('CREATE TABLE chill_person_accompanying_period_work_referrer (accompanyingperiodwork_id INT NOT NULL, user_id INT NOT NULL, PRIMARY KEY(accompanyingperiodwork_id, user_id))'); + $this->addSql('CREATE INDEX IDX_3619F5EBB99F6060 ON chill_person_accompanying_period_work_referrer (accompanyingperiodwork_id)'); + $this->addSql('CREATE INDEX IDX_3619F5EBA76ED395 ON chill_person_accompanying_period_work_referrer (user_id)'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_referrer ADD CONSTRAINT FK_3619F5EBB99F6060 FOREIGN KEY (accompanyingperiodwork_id) REFERENCES chill_person_accompanying_period_work (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_work_referrer ADD CONSTRAINT FK_3619F5EBA76ED395 FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); + } + + public function down(Schema $schema): void + { + $this->addSql('DROP TABLE chill_person_accompanying_period_work_referrer'); + } +} From 55a65ee6e9b20516868ef3a406062cbb376959d9 Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 10 Mar 2022 10:32:20 +0100 Subject: [PATCH 004/104] accompanyingPeriodWork: add referrer in vuejs form --- .../vuejs/AccompanyingCourseWorkEdit/App.vue | 75 ++++++++++++++++++- .../vuejs/AccompanyingCourseWorkEdit/store.js | 18 ++++- 2 files changed, 91 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index a0d88d1bf..1f895708b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -151,6 +151,40 @@ +
+

{{ $t('referrers') }}

+ +
+

{{ $t('no_referrers') }}

+
+ +
+
+
+ + {{ u.text }} + + +
+
+
+ +
    +
  • + + +
  • +
+
+

{{ $t('handling_thirdparty') }}

@@ -289,7 +323,6 @@ import PersonText from 'ChillPersonAssets/vuejs/_components/Entity/PersonText.vu import {buildLinkCreate} from 'ChillMainAssets/lib/entity-workflow/api.js'; import { makeFetch } from 'ChillMainAssets/lib/api/apiMethods'; - const i18n = { messages: { fr: { @@ -322,6 +355,10 @@ const i18n = { available_evaluations_text: "Évaluations disponibles pour ajout :", no_evaluations_available: "Aucune évaluation disponible", no_goals_available: "Aucun objectif disponible", + referrers: "Agents traitants", + no_referrers: "Aucun agent traitant", + choose_referrers: "Choisir des agents traitants", + remove_referrer: "Enlever l'agent" } } }; @@ -370,6 +407,17 @@ export default { } }, }, + referrerPicker: { + key: 'referrer', + options: { + type: ['user'], + priority: null, + uniq: false, + button: { + display: false + } + }, + }, }; }, computed: { @@ -381,6 +429,7 @@ export default { 'personsReachables', 'handlingThirdParty', 'thirdParties', + 'referrers', 'isPosting', 'errors', 'templatesAvailablesForAction', @@ -389,6 +438,7 @@ export default { 'hasResultsForAction', 'hasHandlingThirdParty', 'hasThirdParties', + 'hasReferrers' ]), startDate: { get() { @@ -465,6 +515,14 @@ export default { removeThirdParty(t) { this.$store.commit('removeThirdParty', t); }, + addReferrers({selected, modal}) { + this.$store.commit('addReferrers', selected.map(r => r.result)); + this.$refs.referrerPicker.resetSearch(); + modal.showModal = false; + }, + removeReferrer(u) { + this.$store.commit('removeReferrer', u); + }, goToGenerateWorkflow({link}) { console.log('save before leave to generate workflow') const callback = (data) => { @@ -521,6 +579,7 @@ div#workEditor { "objectives objectives" "evaluations evaluations" "persons persons" + "referrers referrers" "handling handling" "tparties tparties" "errors errors"; @@ -543,6 +602,8 @@ div#workEditor { grid-area: handling; } #thirdParties { grid-area: tparties; } + #referrers { + grid-area: referrers; } #errors { grid-area: errors; } @@ -657,5 +718,17 @@ div#workEditor { } } +.referrer { + margin-bottom: 0.4rem; + .referrer-close-btn { + margin-left: 0.4rem; + margin-right: 0.4rem; + button { + height: 1.45rem; + min-width: 1.45rem; + font-size: 0.4rem; + } + } +} diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js index 7f96843e5..f53c9d246 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js @@ -31,6 +31,7 @@ const store = createStore({ .map(p => p.person), handlingThirdParty: window.accompanyingCourseWork.handlingThierParty, thirdParties: window.accompanyingCourseWork.thirdParties, + referrers: window.accompanyingCourseWork.referrers, isPosting: false, errors: [], }, @@ -54,6 +55,9 @@ const store = createStore({ hasHandlingThirdParty(state) { return state.handlingThirdParty !== null; }, + hasReferrers(state) { + return state.referrers.length > 0; + }, hasThirdParties(state) { return state.thirdParties.length > 0; }, @@ -82,6 +86,7 @@ const store = createStore({ }, results: state.resultsPicked.map(r => ({id: r.id, type: r.type})), thirdParties: state.thirdParties.map(t => ({id: t.id, type: t.type})), + referrers: state.referrers.map(t => ({id: t.id, type: t.type})), goals: state.goalsPicked.map(g => { let o = { type: g.type, @@ -302,6 +307,18 @@ const store = createStore({ state.thirdParties = state.thirdParties .filter(t => t.id !== thirdParty.id); }, + addReferrers(state, referrers) { + let ids = state.referrers.map(t => t.id); + let unexistings = referrers.filter(t => !ids.includes(t.id)); + + for (let i in unexistings) { + state.referrers.push(unexistings[i]); + } + }, + removeReferrer(state, user) { + state.referrers = state.referrers + .filter(u => u.id !== user.id); + }, setErrors(state, errors) { state.errors = errors; }, @@ -315,7 +332,6 @@ const store = createStore({ }, actions: { updateThirdParty({ commit }, payload) { - console.log(payload); commit('updateThirdParty', payload); }, getReachablesGoalsForAction({ getters, commit, dispatch }) { From da650fa1f2df82f77d9f7eb04e474b53fa4e7d8a Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 10 Mar 2022 10:53:40 +0100 Subject: [PATCH 005/104] AccompanyingPeriodWork: add doctrine event listener to add logged user to referrers collection --- .../AccompanyingPeriodWorkEventListener.php | 31 +++++++++++++++++++ .../services/doctrineEventListener.yaml | 10 ++++++ 2 files changed, 41 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/EventListener/AccompanyingPeriodWorkEventListener.php diff --git a/src/Bundle/ChillPersonBundle/EventListener/AccompanyingPeriodWorkEventListener.php b/src/Bundle/ChillPersonBundle/EventListener/AccompanyingPeriodWorkEventListener.php new file mode 100644 index 000000000..ab767802f --- /dev/null +++ b/src/Bundle/ChillPersonBundle/EventListener/AccompanyingPeriodWorkEventListener.php @@ -0,0 +1,31 @@ +security = $security; + } + + public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void + { + $work->addReferrer($this->security->getUser()); + } +} diff --git a/src/Bundle/ChillPersonBundle/config/services/doctrineEventListener.yaml b/src/Bundle/ChillPersonBundle/config/services/doctrineEventListener.yaml index f75243d02..dbf6fc16d 100644 --- a/src/Bundle/ChillPersonBundle/config/services/doctrineEventListener.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/doctrineEventListener.yaml @@ -12,3 +12,13 @@ services: event: 'prePersist' entity: 'Chill\PersonBundle\Entity\PersonAltName' method: 'prePersistAltName' + + Chill\PersonBundle\EventListener\AccompanyingPeriodWorkEventListener: + autoconfigure: true + autowire: true + tags: + - + name: 'doctrine.orm.entity_listener' + event: 'prePersist' + entity: 'Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork' + method: 'prePersistAccompanyingPeriodWork' \ No newline at end of file From 2628e58ea0476e90e3850143398fe413c15bd6a6 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 10 Mar 2022 12:28:17 +0100 Subject: [PATCH 006/104] document title added + concerned users --- .../Workflow/_evaluation_document.html.twig | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig index 488f31661..addc619f7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig @@ -1,5 +1,10 @@
+
+ {% for d in evaluation.documents %} +

{{ d.title }}

+ {% endfor %} +

@@ -20,6 +25,24 @@

+
+
+

+ {{ 'Participants'|trans }} +

+
+
+ {% for p in evaluation.accompanyingPeriodWork.persons %} + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + targetEntity: { name: 'person', id: p.id }, + action: 'show', + displayBadge: true, + buttonText: p|chill_entity_render_string, + isDead: p.deathdate is not null + } %} + {% endfor %} +
+
From bf2d9acc5a67991c9a0df240de68f32b900c470b Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 10 Mar 2022 14:03:37 +0100 Subject: [PATCH 007/104] correction of template, display title linked to workflow doc --- .../Resources/views/Workflow/_evaluation_document.html.twig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig index addc619f7..bd37226cc 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig @@ -1,9 +1,7 @@
- {% for d in evaluation.documents %} -

{{ d.title }}

- {% endfor %} +

{{ doc.title }}

From 9284a4bc29e22a8a81c340026e364e910f37b1e5 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 10 Mar 2022 14:30:19 +0100 Subject: [PATCH 008/104] ACL added and buttons to download and edit document --- .../views/Workflow/_evaluation_document.html.twig | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig index bd37226cc..398b5221e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig @@ -1,7 +1,9 @@ +{%- import "@ChillDocStore/Macro/macro.html.twig" as m -%} +
-

{{ doc.title }}

+

{{ doc.title }}

git st

@@ -113,12 +115,19 @@

{% if display_action is defined and display_action == true %} - {# TODO add acl #} + {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', evaluation.accompanyingPeriodWork) %}
    +
  • {{ m.download_button(doc.storedObject, doc.title) }}
  • + {# {% if chill_document_is_editable(doc.storedObject) %} #} +
  • + {{ doc.storedObject|chill_document_edit_button }} +
  • + {# {% endif %} #}
  • {{ 'Show'|trans }}
+ {% endif %} {% endif %} From 0a2730540e7e01179bcaeb0f16dac2394c370581 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 10 Mar 2022 14:45:43 +0100 Subject: [PATCH 009/104] lost text removed plus condition to editing file uncommented --- .../Resources/views/Workflow/_evaluation_document.html.twig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig index 398b5221e..2e05a6648 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig @@ -3,7 +3,7 @@
-

{{ doc.title }}

git st +

{{ doc.title }}

@@ -118,11 +118,11 @@ {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', evaluation.accompanyingPeriodWork) %}

+
+
  • @@ -98,6 +100,14 @@ @go-to-generate-workflow="goToGenerateWorkflowEvaluationDocument" >
  • +
  • + + +
  • @@ -176,7 +186,8 @@ const i18n = { document_upload: "Téléverser un document", document_title: "Titre du document", template_title: "Nom du template", - browse: "Ajouter un document" + browse: "Ajouter un document", + replace: "Remplacer" } } }; @@ -285,6 +296,18 @@ export default { }; this.$store.commit('addDocument', {key: this.evaluation.key, document: document}); }, + replaceDocument(oldDocument, storedObject) { + + console.log(oldDocument); + console.log(storedObject); + //console.log(oldDocument) how to get the old document? + let document = { + type: 'accompanying_period_work_evaluation_document', + storedObject: storedObject, + title: oldDocument.title + }; + this.$store.commit('replaceDocument', {key: this.evaluation.key, document: document, oldDocument: oldDocument}); + }, removeDocument(document) { if (window.confirm("Êtes-vous sûr·e de vouloir supprimer le document qui a pour titre \"" + document.title +"\" ?")) { this.$store.commit('removeDocument', {key: this.evaluation.key, document: document}); diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js index 7f96843e5..18d6847f1 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js @@ -221,6 +221,20 @@ const store = createStore({ evaluations.documents = evaluations.documents.filter(d => d.key !== document.key); }, + replaceDocument(state, payload) { + console.log('payload', payload) + console.log(state.evaluationsPicked) + let evaluations = state.evaluationsPicked.find(e => e.key === payload.key); + console.log(evaluations) + if (evaluations === undefined) { + return; + } + + //Add document with map + evaluations.documents = evaluations.documents.map(d => d.key === payload.oldDocument.key ? payload.document : d); //TODO no key on documents! + console.log(evaluations) + + }, addEvaluation(state, evaluation) { let e = { type: "accompanying_period_work_evaluation", @@ -408,6 +422,9 @@ const store = createStore({ removeDocument({commit}, payload) { commit('removeDocument', payload); }, + replaceDocument({commit}, payload) { + commit('replaceDocument', payload); + }, submit({ getters, state, commit }, callback) { let payload = getters.buildPayload, From 00787adf2b2b93d492fe7912d77b26be716246e7 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 14 Mar 2022 09:35:22 +0100 Subject: [PATCH 018/104] firstname property added to thirdparty + canonicalize function adapted --- .../Entity/ThirdParty.php | 9 ++++++ .../migrations/Version20211007165001.php | 20 ++++++------ .../migrations/Version20220311133150.php | 31 +++++++++++++++++++ 3 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php index 678084045..db56dbd94 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php @@ -222,6 +222,15 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface */ private ?string $name = ''; + /** + * @ORM\Column(name="firstname", type="string", length=255) + * @Assert\Length(min="2") + * @Assert\NotNull + * @Assert\NotBlank + * @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"}) + */ + private ?string $firstname = ''; + /** * [fr] Raison sociale. * diff --git a/src/Bundle/ChillThirdPartyBundle/migrations/Version20211007165001.php b/src/Bundle/ChillThirdPartyBundle/migrations/Version20211007165001.php index 2d33bbeb4..ef431f5ea 100644 --- a/src/Bundle/ChillThirdPartyBundle/migrations/Version20211007165001.php +++ b/src/Bundle/ChillThirdPartyBundle/migrations/Version20211007165001.php @@ -39,15 +39,17 @@ final class Version20211007165001 extends AbstractMigration $this->addSql(" UPDATE chill_3party.third_party SET canonicalized = - UNACCENT( - LOWER( - name || - CASE WHEN COALESCE(name_company, '') <> '' THEN ' ' ELSE '' END || - COALESCE(name_company, '') || - CASE WHEN COALESCE(acronym, '') <> '' THEN ' ' ELSE '' END || - COALESCE(acronym, '') - ) - ) + UNACCENT( + LOWER( + name || + CASE WHEN COALESCE (firstname, '') <> '' THEN ' ' ELSE '' END || + COALESCE(firstname, '') || + CASE WHEN COALESCE(name_company, '') <> '' THEN ' ' ELSE '' END || + COALESCE(name_company, '') || + CASE WHEN COALESCE(acronym, '') <> '' THEN ' ' ELSE '' END || + COALESCE(acronym, '') + ) + ) "); $this->addSql(" CREATE OR REPLACE FUNCTION chill_3party.canonicalize() RETURNS TRIGGER diff --git a/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php b/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php new file mode 100644 index 000000000..f9475e932 --- /dev/null +++ b/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE chill_3party.third_party ADD firstname VARCHAR(255) DEFAULT \'""\' NOT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE chill_3party.third_party DROP firstname'); + } +} From a24cd693e3e4176a45b35dafe8b79bbcaef877bc Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 14 Mar 2022 10:23:47 +0100 Subject: [PATCH 019/104] firstname field added to twig form for child or contact types --- .../Entity/ThirdParty.php | 35 ++++++++----------- .../Form/ThirdPartyType.php | 4 +++ .../views/ThirdParty/_form.html.twig | 4 +++ .../_form_thirdparty_children.html.twig | 5 +++ .../Resources/views/ThirdParty/view.html.twig | 2 +- .../translations/messages.fr.yml | 1 + 6 files changed, 30 insertions(+), 21 deletions(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php index db56dbd94..6e30c40dc 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php @@ -463,12 +463,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this->email; } - /** - * Get id. - * - * @return int - */ - public function getId() + public function getId(): ?int { return $this->id; } @@ -478,16 +473,16 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this->kind; } - /** - * Get name. - * - * @return string - */ - public function getName() + public function getName(): string { return $this->name; } + public function getFirstname(): string + { + return $this->firstname; + } + public function getNameCompany(): ?string { return $this->nameCompany; @@ -782,20 +777,20 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this; } - /** - * Set name. - * - * @param string $name - * - * @return ThirdParty - */ - public function setName($name) + public function setName($name): self { $this->name = $name; return $this; } + public function setFirstname($firstname): self + { + $this->firstname = $firstname; + + return $this; + } + /** * @param string $nameCompany */ diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php index 480808dfe..28e87c584 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php @@ -102,6 +102,10 @@ class ThirdPartyType extends AbstractType // Contact Person ThirdParty (child) if (ThirdParty::KIND_CONTACT === $options['kind'] || ThirdParty::KIND_CHILD === $options['kind']) { $builder + ->add('firstname', TextType::class, [ + 'label' => 'firstname', + 'required' => true, + ]) ->add('civility', PickCivilityType::class, [ 'label' => 'thirdparty.Civility', 'placeholder' => 'thirdparty.choose civility', diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig index 4827ba19c..fffa44a6a 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig @@ -3,6 +3,10 @@ {{ form_row(form.civility) }} {% endif %} +{% if form.firstname is defined %} +{{ form_row(form.firstname) }} +{% endif %} + {{ form_row(form.name) }} {% if form.nameCompany is defined %} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form_thirdparty_children.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form_thirdparty_children.html.twig index eac5c2a98..cffbf0ad7 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form_thirdparty_children.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form_thirdparty_children.html.twig @@ -7,6 +7,11 @@ {{ form_errors(form.civility) }} {{ form_label(form.civility) }}
+
+ {{ form_widget(form.firstname) }} + {{ form_errors(form.firstname) }} + {{ form_label(form.firstname) }} +
{{ form_widget(form.name) }} {{ form_errors(form.name) }} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig index c4f2bcfbd..3dac7a0dd 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig @@ -25,7 +25,7 @@
{{ 'Name'|trans }}
{% if thirdParty.isLeaf == true %}{{ thirdParty.civility }}{% endif %} - {{ thirdParty.name }} + {{ thirdParty.firstname ~ ' ' ~ thirdParty.name }}
{% if thirdParty.kind == 'company' %} diff --git a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml index 20b45a398..4607f5ba9 100644 --- a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml @@ -1,6 +1,7 @@ Third party: Tiers Third parties: Tiers third parties: tiers +firstname: Prénom name: Nom telephone: Téléphone adress: Adresse From 6eac6044cd6a69147abe51149db24ef68eb912f4 Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 14 Mar 2022 10:42:16 +0100 Subject: [PATCH 020/104] AccompanyingCourseWorkEdit: replace document by a new one (working now) --- .../components/FormEvaluation.vue | 4 --- .../vuejs/AccompanyingCourseWorkEdit/store.js | 25 ++++++++++--------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue index 2e31c0669..7fe9bd278 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue @@ -297,10 +297,6 @@ export default { this.$store.commit('addDocument', {key: this.evaluation.key, document: document}); }, replaceDocument(oldDocument, storedObject) { - - console.log(oldDocument); - console.log(storedObject); - //console.log(oldDocument) how to get the old document? let document = { type: 'accompanying_period_work_evaluation_document', storedObject: storedObject, diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js index 18d6847f1..893d3663a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js @@ -213,27 +213,28 @@ const store = createStore({ })); }, removeDocument(state, {key, document}) { - let evaluations = state.evaluationsPicked.find(e => e.key === key); + let evaluation = state.evaluationsPicked.find(e => e.key === key); - if (evaluations === undefined) { + if (evaluation === undefined) { return; } - evaluations.documents = evaluations.documents.filter(d => d.key !== document.key); + evaluation.documents = evaluation.documents.filter(d => d.key !== document.key); }, replaceDocument(state, payload) { - console.log('payload', payload) - console.log(state.evaluationsPicked) - let evaluations = state.evaluationsPicked.find(e => e.key === payload.key); - console.log(evaluations) - if (evaluations === undefined) { + let evaluation = state.evaluationsPicked.find(e => e.key === payload.key); + if (evaluation === undefined) { return; } - //Add document with map - evaluations.documents = evaluations.documents.map(d => d.key === payload.oldDocument.key ? payload.document : d); //TODO no key on documents! - console.log(evaluations) - + let newDocument = Object.assign( + payload.document, { + key: evaluation.documents.length + 1, + workflows_availables: state.work.workflows_availables_evaluation_documents, + workflows: [], + } + ); + evaluation.documents = evaluation.documents.map(d => d.id === payload.oldDocument.id ? newDocument : d); }, addEvaluation(state, evaluation) { let e = { From 9f0ab5aee74c21d9138539b7259452e0ef60f4c1 Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 14 Mar 2022 10:43:28 +0100 Subject: [PATCH 021/104] upd CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 885068bc0..fa50b6389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to ## Unreleased +* [person] AccompanyingCourseWorkEdit: replace document by a new one (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/511) + * [main] filter user job in undispatch acc period to assign (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/472) * [person] Add url in accompanying period work evaluations entity and form (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/476) * [person] Add document generation in admin and in person/{id}/document (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/464) From f44f9d356b3d870e8bee57cf36d24c78a26a2cde Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 14 Mar 2022 11:16:58 +0100 Subject: [PATCH 022/104] migration adjusted to have actual empty string instead of '' --- .../ChillThirdPartyBundle/migrations/Version20220311133150.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php b/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php index f9475e932..aec6669d8 100644 --- a/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php +++ b/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php @@ -20,7 +20,7 @@ final class Version20220311133150 extends AbstractMigration public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE chill_3party.third_party ADD firstname VARCHAR(255) DEFAULT \'""\' NOT NULL'); + $this->addSql('ALTER TABLE chill_3party.third_party ADD firstname VARCHAR(255) DEFAULT \'\' NOT NULL'); } public function down(Schema $schema): void From 09e68727245af9b21fd2535f66e9bb8a8234d4a2 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 14 Mar 2022 11:48:39 +0100 Subject: [PATCH 023/104] firstname added to onthefly for child or contact --- .../vuejs/_components/OnTheFly/ThirdParty.vue | 16 +++++++++++++--- .../Resources/public/vuejs/_js/i18n.js | 2 ++ .../Normalizer/ThirdPartyNormalizer.php | 1 + .../Templating/Entity/ThirdPartyRender.php | 4 +++- .../ChillThirdPartyBundle/chill.api.specs.yaml | 2 ++ 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue index 8de41b989..9ed4481dd 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -65,7 +65,7 @@
-
+
+
+
+ + +
+
+ + +
+
-
+
@@ -307,7 +317,7 @@ dl { margin-bottom: 1rem; } -#child-info { +.child-info { display: flex; justify-content: space-between; div { diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js index 76f01e3f4..04cfc0cf4 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_js/i18n.js @@ -1,6 +1,8 @@ const thirdpartyMessages = { fr: { thirdparty: { + firstname: "Prénom", + lastname: "Nom", name: "Dénomination", email: "Courriel", phonenumber: "Téléphone", diff --git a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php index 8e4775aad..87bfb6995 100644 --- a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php +++ b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php @@ -43,6 +43,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf { return [ 'type' => 'thirdparty', + 'firstname' => $thirdParty->getFirstname(), 'name' => $thirdParty->getName(), 'text' => $this->thirdPartyRender->renderString($thirdParty, []), 'id' => $thirdParty->getId(), diff --git a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php index 8cfa95f80..cec9dee7d 100644 --- a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php +++ b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php @@ -77,7 +77,9 @@ class ThirdPartyRender extends AbstractChillEntityRender $acronym = ''; } - return $civility . $entity->getName() . $acronym; + $firstname = empty($entity->getFirstname()) ? '' : $entity->getFirstname(); + + return $civility . $firstname . ' ' . $entity->getName() . $acronym; } public function supports($entity, array $options): bool diff --git a/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml b/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml index eb303a4f0..035185181 100644 --- a/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillThirdPartyBundle/chill.api.specs.yaml @@ -20,6 +20,8 @@ components: type: string enum: - "thirdparty" + firstname: + type: string name: type: string email: From 96e38a8a6de08da64a60a8306c8dc0055b0b53b2 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 14 Mar 2022 11:49:01 +0100 Subject: [PATCH 024/104] eventlistener added to capitalize names correctly --- .../ChillThirdPartyExtension.php | 1 + .../EventListener/ThirdPartyEventListener.php | 31 +++++++++++++++++++ .../services/doctrineEventListener.yaml | 9 ++++++ 3 files changed, 41 insertions(+) create mode 100644 src/Bundle/ChillThirdPartyBundle/EventListener/ThirdPartyEventListener.php create mode 100644 src/Bundle/ChillThirdPartyBundle/config/services/doctrineEventListener.yaml diff --git a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php index 124f5b7f3..d2023fae5 100644 --- a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php +++ b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php @@ -46,6 +46,7 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte $loader->load('services/fixtures.yaml'); $loader->load('services/serializer.yaml'); $loader->load('services/repository.yaml'); + $loader->load('services/doctrineEventListener.yaml'); } public function prepend(ContainerBuilder $container) diff --git a/src/Bundle/ChillThirdPartyBundle/EventListener/ThirdPartyEventListener.php b/src/Bundle/ChillThirdPartyBundle/EventListener/ThirdPartyEventListener.php new file mode 100644 index 000000000..bdeed8866 --- /dev/null +++ b/src/Bundle/ChillThirdPartyBundle/EventListener/ThirdPartyEventListener.php @@ -0,0 +1,31 @@ +getKind() !== 'company') { + $firstnameCaps = mb_convert_case(mb_strtolower($thirdparty->getFirstname()), MB_CASE_TITLE, 'UTF-8'); + $firstnameCaps = ucwords(strtolower($firstnameCaps), " \t\r\n\f\v'-"); + $thirdparty->setFirstName($firstnameCaps); + + $lastnameCaps = mb_strtoupper($thirdparty->getName(), 'UTF-8'); + $thirdparty->setName($lastnameCaps); + } + } +} diff --git a/src/Bundle/ChillThirdPartyBundle/config/services/doctrineEventListener.yaml b/src/Bundle/ChillThirdPartyBundle/config/services/doctrineEventListener.yaml new file mode 100644 index 000000000..8c48e125e --- /dev/null +++ b/src/Bundle/ChillThirdPartyBundle/config/services/doctrineEventListener.yaml @@ -0,0 +1,9 @@ +services: + Chill\ThirdPartyBundle\EventListener\ThirdPartyEventListener: + autoconfigure: true + tags: + - + name: 'doctrine.orm.entity_listener' + event: 'prePersist' + entity: 'Chill\ThirdPartyBundle\Entity\ThirdParty' + method: 'prePersistThirdParty' \ No newline at end of file From 4ea72f7d9d208ae6cbab1d1076be70bb0b2a5b38 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 14 Mar 2022 11:49:58 +0100 Subject: [PATCH 025/104] csfixes --- .../Entity/ThirdParty.php | 42 +++++++++---------- .../migrations/Version20220311133150.php | 19 ++++++--- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php index 6e30c40dc..766c74a39 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php @@ -197,6 +197,15 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface */ private ?string $email = null; + /** + * @ORM\Column(name="firstname", type="string", length=255) + * @Assert\Length(min="2") + * @Assert\NotNull + * @Assert\NotBlank + * @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"}) + */ + private ?string $firstname = ''; + /** * @var int * @ORM\Column(name="id", type="integer") @@ -222,15 +231,6 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface */ private ?string $name = ''; - /** - * @ORM\Column(name="firstname", type="string", length=255) - * @Assert\Length(min="2") - * @Assert\NotNull - * @Assert\NotBlank - * @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"}) - */ - private ?string $firstname = ''; - /** * [fr] Raison sociale. * @@ -463,6 +463,11 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this->email; } + public function getFirstname(): string + { + return $this->firstname; + } + public function getId(): ?int { return $this->id; @@ -478,11 +483,6 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this->name; } - public function getFirstname(): string - { - return $this->firstname; - } - public function getNameCompany(): ?string { return $this->nameCompany; @@ -770,6 +770,13 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this; } + public function setFirstname($firstname): self + { + $this->firstname = $firstname; + + return $this; + } + public function setKind(?string $kind): ThirdParty { $this->kind = $kind; @@ -784,13 +791,6 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface return $this; } - public function setFirstname($firstname): self - { - $this->firstname = $firstname; - - return $this; - } - /** * @param string $nameCompany */ diff --git a/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php b/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php index aec6669d8..768cd9533 100644 --- a/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php +++ b/src/Bundle/ChillThirdPartyBundle/migrations/Version20220311133150.php @@ -1,5 +1,12 @@ addSql('ALTER TABLE chill_3party.third_party DROP firstname'); + } + public function getDescription(): string { return 'Adding firstname to thirdparty'; @@ -22,10 +35,4 @@ final class Version20220311133150 extends AbstractMigration // this up() migration is auto-generated, please modify it to your needs $this->addSql('ALTER TABLE chill_3party.third_party ADD firstname VARCHAR(255) DEFAULT \'\' NOT NULL'); } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE chill_3party.third_party DROP firstname'); - } } From 0546a43d631f51ed14da0d12ac51fabc6f421f71 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 14 Mar 2022 13:41:32 +0100 Subject: [PATCH 026/104] changelog updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 885068bc0..118e0c705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ and this project adheres to * [thirdparty] Add parameter condition to display centers or not (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/500) * [phonenumber] Remove placeholder in phonenumber field (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/496) * [contact] add contact button color changed plus the pipe at the side removed (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/506) +* [thirdparty] add firstname field to thirdparty 'child' or 'contact' types (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/508) ## Test releases From 1beae4d7135b67ebcf32b2edc41132d4b754e291 Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 14 Mar 2022 14:42:04 +0100 Subject: [PATCH 027/104] AccompanyingCourseWorkEdit: download existing documents --- .../Entity/StoredObject.php | 4 +- .../public/module/async_upload/downloader.js | 3 +- .../public/module/async_upload/uploader.js | 4 +- .../_components/AddAsyncUploadDownloader.vue | 45 +++++++++++++++++++ .../components/FormEvaluation.vue | 13 +++++- 5 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/_components/AddAsyncUploadDownloader.vue diff --git a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php index c512dba73..78387e7fe 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/StoredObject.php @@ -61,13 +61,13 @@ class StoredObject implements AsyncFileInterface, Document /** * @var int[] * @ORM\Column(type="json", name="iv") - * @Serializer\Groups({"write"}) + * @Serializer\Groups({"read", "write"}) */ private array $iv = []; /** * @ORM\Column(type="json", name="key") - * @Serializer\Groups({"write"}) + * @Serializer\Groups({"read", "write"}) */ private array $keyInfos = []; diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/downloader.js b/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/downloader.js index 4c82a8e4b..0e889c373 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/downloader.js +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/downloader.js @@ -73,6 +73,7 @@ var download = (button) => { button.type = mimeType; button.textContent = labelReady; if (hasFilename) { + button.download = filename; if (extension !== false) { button.download = button.download + '.' + extension; @@ -92,4 +93,4 @@ window.addEventListener('load', function(e) { initializeButtons(e.target); }); -module.exports = initializeButtons; +export { initializeButtons, download }; \ No newline at end of file diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/uploader.js b/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/uploader.js index 35871245b..5def6a0b2 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/uploader.js +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/module/async_upload/uploader.js @@ -1,6 +1,6 @@ var algo = 'AES-CBC'; import Dropzone from 'dropzone'; -var initializeDownload = require('./downloader.js'); +import { initializeButtons } from './downloader.js'; /** @@ -359,7 +359,7 @@ var insertDownloadButton = (zone, zoneData) => { addBelowButton(newButton, zone, zoneData); //zone.appendChild(newButton); - initializeDownload(zone); + initializeButtons(zone); }; window.addEventListener('load', function(e) { diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/_components/AddAsyncUploadDownloader.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/_components/AddAsyncUploadDownloader.vue new file mode 100644 index 000000000..781c47d6f --- /dev/null +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/_components/AddAsyncUploadDownloader.vue @@ -0,0 +1,45 @@ + + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue index 7fe9bd278..ec412842e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue @@ -108,6 +108,14 @@ > +
  • + + + +
  • @@ -162,6 +170,7 @@ import { mapGetters, mapState } from 'vuex'; import PickTemplate from 'ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue'; import {buildLink} from 'ChillDocGeneratorAssets/lib/document-generator'; import AddAsyncUpload from 'ChillDocStoreAssets/vuejs/_components/AddAsyncUpload.vue'; +import AddAsyncUploadDownloader from 'ChillDocStoreAssets/vuejs/_components/AddAsyncUploadDownloader.vue'; import ListWorkflowModal from 'ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue'; import {buildLinkCreate} from 'ChillMainAssets/lib/entity-workflow/api.js'; @@ -187,7 +196,8 @@ const i18n = { document_title: "Titre du document", template_title: "Nom du template", browse: "Ajouter un document", - replace: "Remplacer" + replace: "Remplacer", + download: "Télécharger le fichier existant" } } }; @@ -199,6 +209,7 @@ export default { ckeditor: CKEditor.component, PickTemplate, AddAsyncUpload, + AddAsyncUploadDownloader, ListWorkflowModal, }, i18n, From 369397bf4f6649e47bed54e32d2273cff583aed0 Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 14 Mar 2022 14:42:53 +0100 Subject: [PATCH 028/104] upd CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa50b6389..13ae858ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to ## Unreleased +* [person] AccompanyingCourseWorkEdit: download existing documents (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/512) * [person] AccompanyingCourseWorkEdit: replace document by a new one (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/511) * [main] filter user job in undispatch acc period to assign (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/472) From 82052f5d70b557b6c1438c1eaaa3328b6bf0dce0 Mon Sep 17 00:00:00 2001 From: nobohan Date: Mon, 14 Mar 2022 15:13:21 +0100 Subject: [PATCH 029/104] AccompanyingCourseWorkEdit: fix setting title of document with a fresh upload --- .../components/FormEvaluation.vue | 6 ++++-- .../public/vuejs/AccompanyingCourseWorkEdit/store.js | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue index ec412842e..2b380a7ec 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue @@ -65,7 +65,7 @@
    {{ $t('Documents') }} :
    -
    +
    @@ -75,6 +75,7 @@ type="text" :value="d.title" :id="d.id" + :data-key="i" @input="onInputDocumentTitle"/>
    @@ -296,8 +297,9 @@ export default { }, onInputDocumentTitle(event) { const id = Number(event.target.id); + const key = Number(event.target.dataset.key) + 1; const title = event.target.value; - this.$store.commit('updateDocumentTitle', {id: id, evaluationKey: this.evaluation.key, title: title}); + this.$store.commit('updateDocumentTitle', {id: id, key: key, evaluationKey: this.evaluation.key, title: title}); }, addDocument(storedObject) { let document = { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js index 893d3663a..2ea9b48e0 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/store.js @@ -324,8 +324,13 @@ const store = createStore({ state.isPosting = st; }, updateDocumentTitle(state, payload) { - state.evaluationsPicked.find(e => e.key === payload.evaluationKey) + if (payload.id === 0) { + state.evaluationsPicked.find(e => e.key === payload.evaluationKey) + .documents.find(d => d.key === payload.key).title = payload.title; + } else { + state.evaluationsPicked.find(e => e.key === payload.evaluationKey) .documents.find(d => d.id === payload.id).title = payload.title; + } } }, actions: { From 90bebbad7de90779ae13e629dd6ba3e6c8339159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 14 Mar 2022 21:27:21 +0100 Subject: [PATCH 030/104] fix normalization for docgen --- src/Bundle/ChillMainBundle/Entity/UserJob.php | 1 + .../Normalizer/PhonenumberNormalizer.php | 21 ++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Entity/UserJob.php b/src/Bundle/ChillMainBundle/Entity/UserJob.php index 5f0bea45d..99db5d4f1 100644 --- a/src/Bundle/ChillMainBundle/Entity/UserJob.php +++ b/src/Bundle/ChillMainBundle/Entity/UserJob.php @@ -40,6 +40,7 @@ class UserJob * @var array|string[]A * @ORM\Column(name="label", type="json") * @Serializer\Groups({"read", "docgen:read"}) + * @Serializer\Context({"is-translatable": true}, groups={"docgen:read"}) */ protected array $label = []; diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php index 3562c1361..677199ad4 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php @@ -16,10 +16,11 @@ use libphonenumber\PhoneNumber; use libphonenumber\PhoneNumberUtil; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\Serializer\Exception\UnexpectedValueException; +use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class PhonenumberNormalizer implements NormalizerInterface, DenormalizerInterface +class PhonenumberNormalizer implements ContextAwareNormalizerInterface, DenormalizerInterface { private string $defaultCarrierCode; @@ -53,6 +54,10 @@ class PhonenumberNormalizer implements NormalizerInterface, DenormalizerInterfac public function normalize($object, ?string $format = null, array $context = []): string { + if ($format === 'docgen' && null === $object) { + return ''; + } + return $this->phoneNumberUtil->formatOutOfCountryCallingNumber($object, $this->defaultCarrierCode); } @@ -61,8 +66,18 @@ class PhonenumberNormalizer implements NormalizerInterface, DenormalizerInterfac return 'libphonenumber\PhoneNumber' === $type; } - public function supportsNormalization($data, ?string $format = null) + public function supportsNormalization($data, ?string $format = null, array $context = []): bool { - return $data instanceof PhoneNumber; + if ($data instanceof PhoneNumber && $format === 'json') { + return true; + } + + if ($format === 'docgen' && ( + $data instanceof PhoneNumber || PhoneNumber::class === ($context['docgen:expects'] ?? null) + )) { + return true; + } + + return false; } } From f51279e83e1486bcbb0ba167063d59075428d63f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 14 Mar 2022 21:46:01 +0100 Subject: [PATCH 031/104] fix saving maxDate when denormalizing object --- .../AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php index 07c9f526c..ed3200370 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkEvaluation.php @@ -124,6 +124,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU /** * @ORM\Column(type="date_immutable", nullable=true, options={"default": null}) * @Serializer\Groups({"read", "docgen:read"}) + * @Serializer\Groups({"write"}) * @Serializer\Groups({"accompanying_period_work_evaluation:create"}) */ private ?DateTimeImmutable $maxDate = null; From d04f5a527bc56ddeeedebddec2e95eb8f6b12b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 14 Mar 2022 21:46:21 +0100 Subject: [PATCH 032/104] remove link to action on homepage, in evaluation list --- .../Resources/public/vuejs/HomepageWidget/MyEvaluations.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue index 7cd40f45a..a872a2f43 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue @@ -42,9 +42,6 @@ {{ $t('show_entity', { entity: $t('the_evaluation') }) }} - - {{ $t('show_entity', { entity: $t('the_action') }) }} - {{ $t('show_entity', { entity: $t('the_course') }) }} @@ -102,4 +99,4 @@ export default { \ No newline at end of file + From 387b7c2fbd04d26a49f4143586928accebc4094d Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 16 Mar 2022 11:36:46 +0100 Subject: [PATCH 033/104] first commit --- .../UserAccompanyingPeriodController.php | 65 ++++++++++++++++++- .../AccompanyingPeriodRepository.php | 10 +++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php index 321f212d5..774b272c5 100644 --- a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php @@ -11,11 +11,17 @@ declare(strict_types=1); namespace Chill\PersonBundle\Controller; +use Chill\MainBundle\Entity\User; use Chill\MainBundle\Pagination\PaginatorFactory; +use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Repository\AccompanyingPeriodRepository; +use Doctrine\ORM\EntityRepository; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Symfony\Component\Form\FormInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; +use Symfony\Component\Security\Core\Exception\AccessDeniedException; +use Symfony\Component\Security\Core\Security; class UserAccompanyingPeriodController extends AbstractController { @@ -23,10 +29,13 @@ class UserAccompanyingPeriodController extends AbstractController private PaginatorFactory $paginatorFactory; - public function __construct(AccompanyingPeriodRepository $accompanyingPeriodRepository, PaginatorFactory $paginatorFactory) + private Security $security; + + public function __construct(AccompanyingPeriodRepository $accompanyingPeriodRepository, PaginatorFactory $paginatorFactory, Security $security) { $this->accompanyingPeriodRepository = $accompanyingPeriodRepository; $this->paginatorFactory = $paginatorFactory; + $this->security = $security; } /** @@ -68,4 +77,58 @@ class UserAccompanyingPeriodController extends AbstractController 'pagination' => $pagination, ]); } + + /** + * @Route("/{_locale}/person/accompanying-periods/my/drafts", name="chill_person_accompanying_period_draft_user") + */ + public function listConfirmedAction(Request $request) + { + if (!$this->security->isGranted('ROLE_USER') || !$this->security->getUser() instanceof User) { + throw new AccessDeniedException(); + } + + $form = $this->buildUserSelectionForm(); + + $form->handleRequest($request); + if ($form->isSubmitted() && $form->isValid()) { + $user = $_POST['user']; + + $periods = $this->getDoctrine()->getRepository(AccompanyingPeriod::class)->findConfirmedByUser($user); + + return $this->render('@ChillPerson/AccompanyingPeriod/user_reassign_periods_list.html.twig', [ + 'accompanyingPeriods' => $periods, + ]); + } + + return $this->render('@ChillPerson/AccompanyingPeriod/user_reassign_periods_list.html.twig', [ + 'form' => $form + ]); + } + + private function buildUserSelectionForm(): FormInterface + { + $data = [ + 'users' => [], + ]; + + $builder = $this->formFactory->createBuilder(FormType::class, $data, [ + 'method' => 'get', 'csrf_protection' => false]); + + $builder + ->add('users', EntityType::class, [ + 'class' => User::class, + 'query_builder' => function (EntityRepository $er) { + $qb = $er->createQueryBuilder('u'); + return $qb; + }, + 'choice_label' => function(User $u) { + return $u->getUsername(); + }, + 'multiple' => false, + 'label' => 'User', + 'required' => false, + ]); + + return $builder->getForm(); + } } diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php index 122b658bd..ab7006fd8 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php @@ -78,6 +78,16 @@ final class AccompanyingPeriodRepository implements ObjectRepository ->getResult(); } + public function findConfirmedByUser(User $user) + { + $qb = $this->createQueryBuilder('ap'); + $qb->where($qb->expr()->eq('ap.user', ':user')) + ->andWhere('ap.step', 'CONFIRMED') + ->setParameter('user', $user); + + return $qb; + } + public function findOneBy(array $criteria): ?AccompanyingPeriod { return $this->findOneBy($criteria); From 6151d0ce54346bcf7cd80eec851969dfd2e95e40 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 16 Mar 2022 12:32:54 +0100 Subject: [PATCH 034/104] fix name suggestion badges underneath input fields --- .../vuejs/_components/OnTheFly/Person.vue | 40 +++++----- .../vuejs/_components/OnTheFly/ThirdParty.vue | 80 +++++++++++++------ 2 files changed, 77 insertions(+), 43 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue index 366ecd6b7..e6fa85902 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue @@ -24,11 +24,11 @@
    @@ -43,11 +43,11 @@
    @@ -62,10 +62,10 @@
    @@ -125,9 +125,9 @@
    -
      -
    • {{ e }}
    • -
    +
      +
    • {{ e }}
    • +
    @@ -238,13 +238,13 @@ export default { checkErrors(e) { this.errors = []; if (!this.person.lastName) { - this.errors.push("Le nom ne doit pas être vide."); + this.errors.push("Le nom ne doit pas être vide."); } if (!this.person.firstName) { - this.errors.push("Le prénom ne doit pas être vide."); + this.errors.push("Le prénom ne doit pas être vide."); } if (!this.person.gender) { - this.errors.push("Le genre doit être renseigné"); + this.errors.push("Le genre doit être renseigné"); } }, loadData() { diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue index 9ed4481dd..c61d98aea 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/OnTheFly/ThirdParty.vue @@ -66,14 +66,14 @@
    -
    +
    -
    +
    - +
    +
    + + +
    +
    +
      +
    • + {{ qi }} +
    • +
    +
    -
    - - +
    +
    + + +
    +
    +
      +
    • + {{ qi }} +
    • +
    +
    -
    - - -
    -
    -
      -
    • - {{ query }} -
    • -
    +
    +
    + + +
    +
    +
      +
    • + {{ query }} +
    • +
    +