From f3a8552829d3702620a99027ac10a2044557d87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 10 May 2021 13:21:28 +0200 Subject: [PATCH 01/77] rewrite methods for participation --- .../Entity/AccompanyingPeriod.php | 33 ++++++++++++++++--- .../Tests/Entity/AccompanyingPeriodTest.php | 24 +++++++++++--- 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index 9eec8e6fb..68f5d76e6 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -384,9 +384,9 @@ class AccompanyingPeriod } /** - * Add Person + * Open a new participation for a person */ - public function addPerson(Person $person = null): AccompanyingPeriodParticipation + public function createParticipationFor(Person $person): AccompanyingPeriodParticipation { $participation = new AccompanyingPeriodParticipation($this, $person); $this->participations[] = $participation; @@ -394,10 +394,24 @@ class AccompanyingPeriod return $participation; } + public function addPerson(Person $person = null): self + { + if (NULL !== $person) { + $this->createParticipationFor($person); + } + + return $this; + } + /** - * Remove Person + * Close a participation for a person + * + * Search for the person's participation and set the end date at + * 'now'. + * + * @return void */ - public function removePerson(Person $person): ?AccompanyingPeriodParticipation + public function closeParticipationFor($person): ?AccompanyingPeriodParticipation { $participation = $this->getOpenParticipationContainsPerson($person); @@ -407,6 +421,17 @@ class AccompanyingPeriod return $participation; } + + + /** + * Remove Person + */ + public function removePerson(Person $person): self + { + $this->closeParticipationFor($person); + + return $this; + } public function getClosingMotive(): ?ClosingMotive diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php index 03fddab41..aac6454a8 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php @@ -23,6 +23,7 @@ namespace Chill\PersonBundle\Tests\Entity; use Chill\PersonBundle\Entity\AccompanyingPeriod; +use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; use Chill\PersonBundle\Entity\Person; class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase @@ -83,10 +84,11 @@ class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase $person3 = new Person(); $period = new AccompanyingPeriod(new \DateTime()); - $period->addPerson($person); - $period->addPerson($person2); - $period->addPerson($person3); + $participation0 = $period->createParticipationFor($person); + $period->createParticipationFor($person2); + $period->createParticipationFor($person3); + $this->assertNotNull($participation0); $this->assertEquals(3, $period->getParticipations()->count()); $this->assertTrue($period->containsPerson($person)); $this->assertFalse($period->containsPerson(new Person())); @@ -95,13 +97,27 @@ class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase $participations = $period->getParticipationsContainsPerson($person); $this->assertNotNull($participation); $this->assertSame($person, $participation->getPerson()); + $this->assertSame($participation, $participation0); $this->assertEquals(1, $participations->count()); - $participationL = $period->removePerson($person); + $participationL = $period->closeParticipationFor($person); $this->assertSame($participationL, $participation); $this->assertTrue($participation->getEndDate() instanceof \DateTimeInterface); $participation = $period->getOpenParticipationContainsPerson($person); $this->assertNull($participation); + + $person4 = new Person(); + $participations4 = $period->getParticipationsContainsPerson($person4); + $this->assertEquals(0, $participations4->count()); + $participation4 = $period->getOpenParticipationContainsPerson($person4); + $this->assertNull($participation4); + + $period->addPerson($person4); + $this->assertInstanceOf(AccompanyingPeriodParticipation::class, $period->getOpenParticipationContainsPerson($person4)); + $this->assertEquals(1, $period->getParticipationsContainsPerson($person4)->count()); + $period->removePerson($person4); + $this->assertNull($period->getOpenParticipationContainsPerson($person4)); + $this->assertEquals(1, $period->getParticipationsContainsPerson($person4)->count()); } } From 52637c2919182878e156d098650a2ce8b635464f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 10 May 2021 13:24:57 +0200 Subject: [PATCH 02/77] rewrite method add participation for new period's methods --- .../Controller/AccompanyingCourseApiController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php index bbf2f399a..dc666400f 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php @@ -42,11 +42,10 @@ class AccompanyingCourseApiController extends ApiController switch ($request->getMethod()) { case Request::METHOD_POST: - $participation = $accompanyingPeriod->addPerson($person); + $participation = $accompanyingPeriod->createParticipationFor($person); break; case Request::METHOD_DELETE: - $participation = $accompanyingPeriod->removePerson($person); - $participation->setEndDate(new \DateTimeImmutable('now')); + $participation = $accompanyingPeriod->closeParticipationFor($person); break; default: throw new BadRequestException("This method is not supported"); From 242c77a30c2d51339045c5466280b626668b1233 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 19 May 2021 13:39:51 +0200 Subject: [PATCH 03/77] partially revert 75ba07f18 (17/05) --- .../Resources/views/AccompanyingCourse/banner.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig index 2091cf54a..8416c1e06 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig @@ -23,7 +23,7 @@

ouvert le {{ accompanyingCourse.openingDate|format_date('short') }}
- par {{ accompanyingCourse.user.usernameCanonical }} + par Soline Maillet | SIPAS

From b018a50a7ee83c182d86a39765a3e4147266a8b7 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 19 May 2021 13:41:51 +0200 Subject: [PATCH 04/77] encore_entry_link_tags allows to use diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue index 758b49313..ce413290f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue @@ -12,7 +12,6 @@ + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ToggleFlags.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ToggleFlags.vue index ac5960d19..5dfcaf67c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ToggleFlags.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ToggleFlags.vue @@ -66,3 +66,17 @@ export default { } } + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue index 83143f1b5..18d9043ee 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue @@ -207,3 +207,44 @@ export default { }, } + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/PersonSuggestion.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/PersonSuggestion.vue index d71fce599..3846f7b39 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/PersonSuggestion.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/PersonSuggestion.vue @@ -7,7 +7,7 @@ v-model="selected" name="item" v-bind:id="item" - v-bind:value="setValueIfType(item, type)" /> + v-bind:value="setValueByType(item, type)" /> + + diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig index 427f5f0ac..76b6e1d4e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/show.html.twig @@ -6,7 +6,11 @@ {% block content %}

{{ block('title') }}

-
+
{# <== insert accompanyingCourse vue component #} +{% endblock %} + +{% block css %} + {{ encore_entry_link_tags('accompanying_course') }} {% endblock %} {% block js %} From 30b127bc88fe6353da5f41bfd99f707fa2047dc7 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 19 May 2021 14:27:26 +0200 Subject: [PATCH 05/77] vue-component dev style more discrete, + disable flashbag for comment --- .../Resources/public/vuejs/AccompanyingCourse/App.vue | 5 ++++- .../public/vuejs/AccompanyingCourse/components/Comment.vue | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue index ce413290f..b046516de 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue @@ -45,7 +45,10 @@ export default { div.vue-component { padding: 1.5em; margin: 2em 0; - border: 2px dashed grey; + border: 2px dotted lightgrey; + border-radius: 10px; + border-left: 0; + border-right: 0; position: relative; &:before { content: "vuejs component"; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue index 2aaced056..08f0a5ac6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue @@ -2,9 +2,10 @@

{{ $t('comment.title') }}

-
+
créé par {{ initialComment.creator.text }} From c39097f1647641de9aed2b90d9a78b738a548c3a Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 19 May 2021 15:58:38 +0200 Subject: [PATCH 06/77] removeComment button replaced by link that allows to keep it both inside
and in
    --- .../AccompanyingCourse/components/Comment.vue | 74 ++++++++++--------- .../vuejs/AccompanyingCourse/js/i18n.js | 3 +- 2 files changed, 42 insertions(+), 35 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue index 08f0a5ac6..febd24b1e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue @@ -7,39 +7,40 @@ TODO fix errors flashbag for app component -
    - créé par {{ initialComment.creator.text }} - le {{ $d(initialComment.createdAt.datetime, 'long') }} -
    - modifié par {{ initialComment.updatedBy.text }} - le {{ $d(initialComment.updatedAt.datetime, 'long') }} +
    +
    + créé par {{ initialComment.creator.text }} + le {{ $d(initialComment.createdAt.datetime, 'long') }} +
    + modifié par {{ initialComment.updatedBy.text }} + le {{ $d(initialComment.updatedAt.datetime, 'long') }} +
    + + + + + +
    -
    - -
      -
    • - -
    • -
    • -
    • -
    -
    - - -
    @@ -83,9 +84,14 @@ export default { } /* * TODO -* - patch endpoint to update Content -* - delete/reset button ? -* - manage flash messages => specific component ? -* - ckeditor +* - [x] delete button in ul record_actions, but not in form +* - [ ] display updatedAt => initialComment fetch PATCH content changes MUST NOT change object id !! +* - [ ] ckeditor integration */ + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js index 4058e179a..603d79a72 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js @@ -64,7 +64,8 @@ const appMessages = { add_resources: "Ajouter des interlocuteurs", }, comment: { - title: "Ajout d'une note", + title: "Observations", + label: "Ajout d'une première note", content: "Rédigez une première note..." }, confirm: { From 28a45992c6309dd8fc4eeec2b7cdd819381f6729 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 19 May 2021 16:01:56 +0200 Subject: [PATCH 07/77] first vue multiselect implementation --- .../components/SocialIssue.vue | 27 +++++++++++++++++++ .../vuejs/AccompanyingCourse/js/i18n.js | 1 + 2 files changed, 28 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue index e66594b53..73698c722 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue @@ -1,11 +1,38 @@ + + + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js index 603d79a72..0580e369f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js @@ -52,6 +52,7 @@ const appMessages = { }, social_issue: { title: "Problématiques sociales", + label: "Choisir les problématiques sociales", }, referrer: { title: "Référent", From f548121312d1c127c77cc9584bc412072234530e Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 19 May 2021 18:29:24 +0200 Subject: [PATCH 08/77] wip --- .../public/vuejs/AccompanyingCourse/components/SocialIssue.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue index 73698c722..fff321c27 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue @@ -8,6 +8,7 @@ name="selectIssues" v-model="selected" :multiple="true" + :close-on-select="false" :options="options">
    From 9da4c1ebebd7f942f2d5d7847af0ab7d34438d42 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 19 May 2021 22:20:16 +0200 Subject: [PATCH 09/77] get SocialIssues List in multiselect --- .../public/vuejs/AccompanyingCourse/App.vue | 2 +- .../public/vuejs/AccompanyingCourse/api.js | 13 ++++++++++ .../components/SocialIssue.vue | 25 +++++++++++++++++-- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue index b046516de..b362a2455 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue @@ -43,7 +43,7 @@ export default { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js index 0580e369f..bd0341517 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js @@ -14,7 +14,6 @@ const appMessages = { status: "État", step: { draft: "Brouillon", - open: "Ouvert", active: "En file active" }, open_at: "ouvert le ", @@ -71,8 +70,9 @@ const appMessages = { }, confirm: { title: "Confirmation", - text_draft: "Le parcours est actuellement au statut de brouillon. En validant cette étape, vous lui donnez le statut actif.", - ok: "Activer le parcours" + text_draft: "Le parcours est actuellement à l'état de ", + text_active: "En validant cette étape, vous lui donnez le statut ", + ok: "Confirmer le parcours" }, } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js index 9efdd8d81..53786bef2 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js @@ -1,7 +1,8 @@ import 'es6-promise/auto'; import { createStore } from 'vuex'; import { getAccompanyingCourse, - patchAccompanyingCourse, + patchAccompanyingCourse, + confirmAccompanyingCourse, postParticipation, postRequestor, postResource } from '../api'; @@ -75,6 +76,10 @@ let initPromise = getAccompanyingCourse(id) postFirstComment(state, comment) { console.log('### mutation: postFirstComment', comment); state.accompanyingCourse.initialComment = comment; + }, + confirmAccompanyingCourse(state, response) { + //console.log('### mutation: confirmAccompanyingCourse: response', response); + state.accompanyingCourse.step = response.step; } }, actions: { @@ -168,6 +173,15 @@ let initPromise = getAccompanyingCourse(id) commit('postFirstComment', course.initialComment); resolve(); })).catch((error) => { commit('catchError', error) }); + }, + + confirmAccompanyingCourse({ commit }) { + console.log('## action: confirmAccompanyingCourse'); + confirmAccompanyingCourse(id) + .then(response => new Promise((resolve, reject) => { + commit('confirmAccompanyingCourse', response); + resolve(); + })).catch((error) => { commit('catchError', error) }); } } }); From 821b67723cdffd6eb836e141048bedadde8bdbed Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 20 May 2021 12:59:58 +0200 Subject: [PATCH 12/77] Banner vue component fully manage AccompanyingCourse banner --- .../public/vuejs/AccompanyingCourse/App.vue | 17 +++--- .../AccompanyingCourse/components/Banner.vue | 59 +++++++++++++++---- .../AccompanyingCourse/components/Confirm.vue | 4 +- .../components/ToggleFlags.vue | 55 +++++++++-------- .../views/AccompanyingCourse/banner.html.twig | 22 ++----- 5 files changed, 95 insertions(+), 62 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue index b1826c70b..287db7fb6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue @@ -43,21 +43,22 @@ export default { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue index 98fbd3f25..f7a321cc6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue @@ -7,11 +7,11 @@

    {{ $t('confirm.text_draft') }} - {{ $t('course.step.draft') }} + {{ $t('course.step.draft') }}

    {{ $t('confirm.text_active') }} - {{ $t('course.step.active') }} + {{ $t('course.step.active') }}

    diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ToggleFlags.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ToggleFlags.vue index 5dfcaf67c..67ef8c193 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ToggleFlags.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/ToggleFlags.vue @@ -1,24 +1,20 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig index 94663e2f0..af07af698 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/banner.html.twig @@ -2,7 +2,7 @@
    -
    {% set title = title %} +
    {% set title = title %}

    {{ 'Accompanying Course'|trans }}{# ou défini en amont @@ -11,30 +11,16 @@

    -
    -
    + -
    -

    - {% if 'DRAFT' == accompanyingCourse.getStep() %} - Brouillon - {% else %} - {{ 'Started on %date%'|trans({'%date%': accompanyingCourse.openingDate|format_date('short') } ) }}
    - {% if accompanyingCourse.user is not null %} - par {{ accompanyingCourse.user.username }} - {% endif %} - {% endif %} -

    -
    +
    -
    Problématiques sociales
    -
    _
    -
    _
    +
    From 8683f8faf3cfaf8c8c9adb435e34f4015ffb873f Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 20 May 2021 13:24:53 +0200 Subject: [PATCH 13/77] titles: size and interaction --- .../public/vuejs/AccompanyingCourse/App.vue | 17 ++++++++++++----- .../AccompanyingCourse/components/Banner.vue | 1 - .../AccompanyingCourse/components/Comment.vue | 2 +- .../AccompanyingCourse/components/Confirm.vue | 4 ++-- .../components/PersonsAssociated.vue | 2 +- .../AccompanyingCourse/components/Referrer.vue | 2 +- .../AccompanyingCourse/components/Requestor.vue | 2 +- .../AccompanyingCourse/components/Resources.vue | 2 +- .../components/SocialIssue.vue | 2 +- .../AccompanyingCourse/components/Test.vue | 6 +++--- .../public/vuejs/AccompanyingCourse/js/i18n.js | 5 ++++- .../views/AccompanyingCourse/banner.html.twig | 5 ++--- .../views/AccompanyingCourse/show.html.twig | 1 - 13 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue index 287db7fb6..0835b8d2d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue @@ -1,5 +1,9 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js index a73eca515..90ec02bf5 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js @@ -68,13 +68,15 @@ const appMessages = { }, comment: { title: "Observations", - label: "Ajout d'une première note", + label: "Ajout d'une note", content: "Rédigez une première note..." }, confirm: { title: "Confirmation", text_draft: "Le parcours est actuellement à l'état de ", text_active: "En validant cette étape, vous lui donnez le statut ", + sure: "Êtes-vous sûr ?", + sure_description: "Une fois le changement confirmé, il n'est plus possible de le remettre à l'état de brouillon !", ok: "Confirmer le parcours" }, diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js index 53786bef2..0f7a4f188 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js @@ -180,6 +180,7 @@ let initPromise = getAccompanyingCourse(id) confirmAccompanyingCourse(id) .then(response => new Promise((resolve, reject) => { commit('confirmAccompanyingCourse', response); + console.log('fetch resolve'); // redirection with #top anchor resolve(); })).catch((error) => { commit('catchError', error) }); } From 8bd75429c12012cf68c9a01cecaf4757b6f9774f Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 20 May 2021 16:37:35 +0200 Subject: [PATCH 16/77] improve AccompanyingCourse ux design --- .../public/vuejs/AccompanyingCourse/App.vue | 19 ++++++---- .../AccompanyingCourse/components/Banner.vue | 13 +++++-- .../AccompanyingCourse/components/Comment.vue | 2 +- .../AccompanyingCourse/components/Confirm.vue | 26 +++++--------- .../components/PersonsAssociated.vue | 26 ++++++++------ .../components/Requestor.vue | 36 +++++++++++-------- .../components/Resources.vue | 25 +++++++------ .../components/SocialIssue.vue | 4 +-- .../vuejs/AccompanyingCourse/js/i18n.js | 4 +-- .../public/vuejs/_components/AddPersons.vue | 10 ++++-- 10 files changed, 95 insertions(+), 70 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue index e5c4d87e1..7f9b66326 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue @@ -24,7 +24,6 @@ import Referrer from './components/Referrer.vue'; import Resources from './components/Resources.vue'; import Comment from './components/Comment.vue'; import Confirm from './components/Confirm.vue'; -//import Test from './components/Test.vue'; export default { name: 'App', @@ -50,12 +49,13 @@ export default { } div.vue-component { h2 { + margin-left: 0.7em; position: relative; &:before { position: absolute; - content: "\f1dd"; + content: "\f192"; font-family: "ForkAwesome"; - color: lightgrey; + color: #718596ab; left: -28px; top: 4px; } @@ -64,12 +64,12 @@ export default { top: -2em; } } - padding: 1.5em 1em; + padding: 0.8em 0em; margin: 2em 0; - border: 1px solid lightgrey; + border: 1px dotted #718596ab; border-radius: 5px; - border-left: 1px dotted lightgrey; - border-right: 1px dotted lightgrey; + border-left: 1px dotted #718596ab; + border-right: 1px dotted #718596ab; /* position: relative; &:before { @@ -85,5 +85,10 @@ export default { dd { margin-left: 1em; } + & > div { + margin: 1em 3em 0; + } + table { + } } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Banner.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Banner.vue index c44679d34..1a85e4bb7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Banner.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Banner.vue @@ -2,9 +2,16 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue index e464ec7cb..c3e83a548 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Comment.vue @@ -92,6 +92,6 @@ export default { diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue index 2318ab61f..c2143b72a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Confirm.vue @@ -13,24 +13,16 @@ {{ $t('confirm.text_active') }} {{ $t('course.step.active') }}

    + +
      +
    • + +
    • +
    -
    -
    {{ $t('course.closing_date') }}
    -
    {{ $d(accompanyingCourse.closingDate.datetime, 'short') }}
    - -
    {{ $t('course.closing_motive') }}
    -
    {{ accompanyingCourse.closingMotive.name.fr }}
    -
    - -
      -
    • - -
    • -
    - diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue index a4da6d88d..d69c3d0ea 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/Resources.vue @@ -3,8 +3,11 @@

    {{ $t('resources.title')}}

    - - +
    + +
    + +
    @@ -22,14 +25,16 @@
    {{ $t('resources.text') }}
    - - +
    + + +
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue index 2cd1aa6e9..a756727d8 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue @@ -2,7 +2,7 @@

{{ $t('social_issue.title') }}

-
+
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js index 90ec02bf5..93de282db 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js @@ -28,7 +28,7 @@ const appMessages = { }, persons_associated: { title: "Usagers concernés", - counter: "Pas d'usager | 1 usager | {count} usagers", + counter: "Il n'y a pas encore d'usager | 1 usager | {count} usagers", firstname: "Prénom", lastname: "Nom", startdate: "Date d'entrée", @@ -61,7 +61,7 @@ const appMessages = { }, resources: { title: "Interlocuteurs privilégiés", - counter: "Pas d'interlocuteur | 1 interlocuteur | {count} interlocuteurs", + counter: "Il n'y a pas encore d'interlocuteur | 1 interlocuteur | {count} interlocuteurs", text: "Dénomination", description: "Description", add_resources: "Ajouter des interlocuteurs", diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue index 18d9043ee..a37f93e7e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons.vue @@ -1,7 +1,11 @@