diff --git a/CHANGELOG.md b/CHANGELOG.md index a1f4e134a..d828fd44c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,29 +11,41 @@ and this project adheres to ## Unreleased +* [asideactivity] creation of aside activity category fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/262) +* [vendee/person] fix typo "situation professionelle" => "situation professionnelle" * [main] add availableForUsers condition from locationType in the location API endpoint (champs-libres/departement-de-la-vendee/accent-suivi-developpement#248) * [main] add the current location of the user as API point + add it in the activity location list (champs-libres/departement-de-la-vendee/accent-suivi-developpement#247) +* [activity] improve show/new/edit templates, fix SEE and SEE_DETAILS acl +* [badges] create specific badge for TMS, and make person/thirdparty badges clickable with on-the-fly modal in : + * concerned groups items (activity, calendar) + * accompanyingCourseWork lists + * accompanyingCourse lists +* [acompanyingCourse] add initial comment on Resume page +## Test releases + +### test release 2021-12-11 + +* [main] add order field to civility * [main] change address format in case the country is France, in Address render box and address normalizer * [person] add validator for accompanying period with a test on social issues (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/76) * [activity] fix visibility for location * [origin] fix origin: use correctly the translatable strings - - * /!\ everyone must update the origin table. As there is only one row, execute `update chill_person_accompanying_period_origin set label = jsonb_build_object('fr', 'appel téléphonique');` + * /!\ everyone must update the origin table. As there is only one row, execute `update chill_person_accompanying_period_origin set label = jsonb_build_object('fr', 'appel téléphonique');` * [person] redirect bug fixed. * [action] add an unrelated issue within action creation. * [origin] fix origin: use correctly the translatable strings - * /!\ everyone must update the origin table. As there is only one row, execute `update chill_person_accompanying_period_origin set label = jsonb_build_object('fr', 'appel téléphonique');` + * /!\ everyone must update the origin table. As there is only one row, execute `update chill_person_accompanying_period_origin set label = jsonb_build_object('fr', 'appel téléphonique');` * [main] change order of civilities in civility fixtures (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191) * [person] set min attr in the minimum of children field (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191) * [person] add marital status date in person view (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191) * [person] show number of children + allow set number of children to null (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191) * [person] show acceptSMS option (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191) * [person] add death information in person render box in twig and vue render boxes (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/191) +* [badge-entity] design coherency between pills badge-person and 3 kinds of badge-thirdparty +* [AddPersons] suggestions row are clickable, not only checkbox -## Test releases - ### test release 2021-12-06 * [main] address: use search API end points for getting postal code and reference address (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/316) @@ -49,8 +61,6 @@ and this project adheres to * [visgraph] improve and fix bugs on vis-network relationship graph * [bugfix] posting of birth- and deathdate through api fixed. * [suggestions] improve suggestions lists -* [badge-entity] design coherency between badge-person and 3 kinds of badge-thirdparty -* [AddPersons] suggestions row are clickable, not only checkbox ### Test release 2021-11-19 - bis diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig index 2808cca60..d6d0ed43d 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig @@ -3,6 +3,14 @@ {{ path(pathname, parms) }} {% endmacro %} +{% macro insert_onthefly(type, entity) %} + {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with { + action: 'show', displayBadge: true, + targetEntity: { name: type, id: entity.id }, + buttonText: entity|chill_entity_render_string + } %} +{% endmacro %} + {% macro computeWidth(nbBlocks) %} {{ 'flex-basis: ' ~ (100 / nbBlocks)|round(1) ~ '%;' }} {% endmacro %} @@ -13,6 +21,7 @@ {% set blocks = blocks|merge([{ 'title': 'Others persons'|trans, 'items': entity.persons, + 'type': 'person', 'path' : 'chill_person_view', 'key' : 'person_id' }]) %} @@ -20,11 +29,13 @@ {% set blocks = blocks|merge([{ 'title': 'Persons in accompanying course'|trans, 'items': entity.personsAssociated, + 'type': 'person', 'path' : 'chill_person_view', 'key' : 'person_id' },{ 'title': 'Third persons'|trans, 'items': entity.personsNotAssociated, + 'type': 'person', 'path' : 'chill_person_view', 'key' : 'person_id', }]) %} @@ -34,6 +45,7 @@ {% set blocks = blocks|merge([{ 'title': 'Third parties'|trans, 'items': entity.thirdParties, + 'type': 'thirdparty', 'path' : 'chill_crud_3party_3party_view', 'key' : 'id', }]) %} @@ -42,6 +54,7 @@ {% set blocks = blocks|merge([{ 'title': 'Users concerned'|trans, 'items': entity.users, + 'type': 'user', 'key' : 'id', }]) %} {% endif %} @@ -59,22 +72,12 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Entity/Civility.php b/src/Bundle/ChillMainBundle/Entity/Civility.php index 48b2a7569..c91016a63 100644 --- a/src/Bundle/ChillMainBundle/Entity/Civility.php +++ b/src/Bundle/ChillMainBundle/Entity/Civility.php @@ -47,6 +47,11 @@ class Civility */ private array $name = []; + /** + * @ORM\Column(type="float", name="ordering", nullable=true, options={"default": 0.0}) + */ + private float $order = 0; + public function getAbbreviation(): array { return $this->abbreviation; @@ -67,6 +72,11 @@ class Civility return $this->name; } + public function getOrder(): ?float + { + return $this->order; + } + /** * @return Civility */ @@ -90,4 +100,11 @@ class Civility return $this; } + + public function setOrder(float $order): self + { + $this->order = $order; + + return $this; + } } diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss index 6b22302b2..20fe927a6 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss @@ -197,7 +197,7 @@ div.wrap-list { div.wl-col.list { background-color: cyan; - p.wl-item { + .wl-item { background-color: orange; } } diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/BadgeEntity.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/BadgeEntity.vue index 3e2d8ab97..5dd770328 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/BadgeEntity.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_components/BadgeEntity.vue @@ -1,13 +1,12 @@ 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 d4bb6a678..7e58ebba8 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/js/i18n.js @@ -132,10 +132,6 @@ const appMessages = { sure_description: "Une fois le changement confirmé, il ne sera plus possible de le remettre à l'état de brouillon !", ok: "Confirmer le parcours" }, - action: { - choose_other_social_issue: "Veuillez choisir un autre problématique", - cancel: "Annuler", - }, // catch errors 'Error while updating AccompanyingPeriod Course.': "Erreur du serveur lors de la mise à jour du parcours d'accompagnement.", 'Error while retriving AccompanyingPeriod Course.': "Erreur du serveur lors du chargement du parcours d'accompagnement.", 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 a1858c6b3..d092adb0b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js @@ -163,7 +163,7 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise]) }, postFirstComment(state, comment) { //console.log('### mutation: postFirstComment', comment); - state.accompanyingCourse.initialComment = comment; + state.accompanyingCourse.pinnedComment = comment; }, updateSocialIssues(state, value) { console.log('updateSocialIssues', value); @@ -565,11 +565,11 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise]) }, postFirstComment({ commit }, payload) { const url = `/api/1.0/person/accompanying-course/${id}.json` - const body = { type: "accompanying_period", initialComment: payload } + const body = { type: "accompanying_period", pinnedComment: payload } return makeFetch('PATCH', url, body) .then((response) => { - commit('postFirstComment', response.initialComment); + commit('postFirstComment', response.pinnedComment); }) .catch((error) => { commit('catchError', error); diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue index e30c90d08..2cbc0cdac 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/App.vue @@ -8,10 +8,10 @@

{{ $t('pick_social_issue_linked_with_action') }}

- {{ si.text }} + {{ si.text }}
-
+
@@ -35,7 +35,7 @@

{{ $t('pick_an_action') }}

-
+
{{ $t('form_has_errors') }}

    -
  • +
  • {{ e }}
@@ -120,10 +120,11 @@ const i18n = { endDate: "Date de fin", form_has_errors: "Le formulaire comporte des erreurs", pick_social_issue: "Choisir une problématique sociale", + pick_other_social_issue: "Veuillez choisir un autre problématique", pick_an_action: "Choisir une action d'accompagnement", pick_social_issue_linked_with_action: "Indiquez la problématique sociale liée à l'action d'accompagnement", persons_involved: "Usagers concernés", - + choose_other_social_issue: "Veuillez choisir un autre problématique", } } } @@ -178,12 +179,10 @@ export default { personsPicked: { get() { let s = this.$store.state.personsPicked.map(p => p.id); - // console.log('persons picked', s); return s; }, set(v) { - // console.log('persons picked', v); this.$store.commit('setPersonsPickedIds', v); } }, @@ -226,6 +225,11 @@ export default { this.$store.commit('setEndDate', ISOToDate(value)); } }, + setSocialIssue: { + set() { + this.$store.dispatch('setSocialIssue', socialIssues[socialIssues.length - 1]) + } + } } } @@ -280,4 +284,4 @@ span.badge { grid-area: confirm; } } - \ No newline at end of file + diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/store.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/store.js index 8633c003d..408115257 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/store.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkCreate/store.js @@ -31,7 +31,6 @@ const store = createStore({ return null !== state.socialActionPicked; }, hasSocialIssuePicked(state) { - console.log(state.socialIssuePicked); return null !== state.socialIssuePicked; }, isLoadingSocialActions(state) { @@ -74,36 +73,27 @@ const store = createStore({ }, mutations: { setSocialActionsReachables(state, actions) { - // console.log('set social action reachables'); - // console.log(actions); - state.socialActionsReachables = actions; }, setSocialAction(state, socialAction) { - // console.log('socialAction', socialAction); state.socialActionPicked = socialAction; }, setSocialIssue(state, socialIssueId) { - // console.log('set social issue', socialIssueId); if (socialIssueId === null) { state.socialIssuePicked = null; } else { let mapped = state.socialIssues .find(e => e.id === socialIssueId); state.socialIssuePicked = mapped; - // console.log('social issue setted', state.socialIssuePicked); } }, addIssueInList(state, issue) { - //console.log('add issue list', issue.id); state.socialIssues.push(issue); }, updateIssuesOther(state, payload) { - //console.log('update issues other'); state.socialIssuesOther = payload; }, removeIssueInOther(state, issue) { - //console.log('remove issue other', issue.id); state.socialIssuesOther = state.socialIssuesOther.filter( (i) => i.id !== issue.id ); @@ -124,12 +114,12 @@ const store = createStore({ state.endDate = date; }, setPersonsPickedIds(state, ids) { - console.log('persons ids', ids); + state.personsPicked = state.personsReachables .filter(p => ids.includes(p.id)) }, addErrors(state, { errors, cancel_posting }) { - console.log('add errors', errors); + state.errors = errors; if (cancel_posting) { state.isPostingWork = false; @@ -138,8 +128,6 @@ const store = createStore({ }, actions: { pickSocialIssue({ commit }, socialIssueId) { - console.log('pick social issue'); - commit('setIsLoadingSocialActions', true); commit('setSocialAction', null); commit('setSocialActionsReachables', []); diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/HouseholdAddress.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/HouseholdAddress.vue index 9b2fe94a0..70716ec81 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/HouseholdAddress.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/components/HouseholdAddress.vue @@ -3,7 +3,7 @@
  • -
  • diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/js/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/js/i18n.js index 527f3a7da..5688b4dad 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/js/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/HouseholdMembersEditor/js/i18n.js @@ -1,5 +1,6 @@ - -import { personMessages } from 'ChillPersonAssets/vuejs/_js/i18n' +import { personMessages } from 'ChillPersonAssets/vuejs/_js/i18n'; +import { ontheflyMessages } from 'ChillMainAssets/vuejs/OnTheFly/i18n'; +import { addressMessages } from 'ChillMainAssets/vuejs/Address/i18n'; const appMessages = { fr: { @@ -84,7 +85,7 @@ const appMessages = { } }; -Object.assign(appMessages.fr, personMessages.fr); +Object.assign(appMessages.fr, personMessages.fr, addressMessages.fr, ontheflyMessages.fr); export { appMessages diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/i18n.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/i18n.js index 8047aea11..f0eb331a6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/i18n.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/i18n.js @@ -9,6 +9,7 @@ const visMessages = { both: 'neutre, non binaire', woman: 'féminin', man: 'masculin', + undefined: "genre non précisé", years: 'ans', click_to_expand: 'cliquez pour étendre', add_relationship_link: "Créer un lien de filiation", diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js index 3e00db883..675ce63e9 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/VisGraph/vis-network.js @@ -153,7 +153,7 @@ const getGender = (gender) => { case 'man': return visMessages.fr.visgraph.man default: - throw 'gender undefined' + return visMessages.fr.visgraph.undefined } } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUser.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUser.vue index c3ec308d3..7a8b302c7 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUser.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/AddPersons/TypeUser.vue @@ -7,26 +7,22 @@
- - {{ $t('user')}} - + +