Merge branch '295_resume_retouches' into 'master'

295 resume retouches

See merge request Chill-Projet/chill-bundles!238
This commit is contained in:
Julien Fastré 2021-11-29 13:48:18 +00:00
commit 3b725a8a12
30 changed files with 590 additions and 339 deletions

View File

@ -18,6 +18,15 @@ and this project adheres to
* Use the user.label in accompanying course banner, instead of username; * Use the user.label in accompanying course banner, instead of username;
* fix: show validation message when closing accompanying course; * fix: show validation message when closing accompanying course;
* [thirdparty] link from modal to thirdparty detail page fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/228) * [thirdparty] link from modal to thirdparty detail page fixed (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/228)
* [assets] new asset to style suggestions lists (with add/remove item link) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/258)
* [accompanyingCourseWorkEdit] improves hyphenation and line breaks for long badges
* [acompanyingCourse] improve Resume page
* complete all needed informations,
* actions and activities are clickables,
* better placement with js masonry blocks on top of content area,
* https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/101
* https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/295
* [activity/calendar] on show page, concerned groups of persons table adapt itself to isVisibles options
* [activity] remove the "plus" button in activity list * [activity] remove the "plus" button in activity list
* [activity] check ACL on activity list in person context * [activity] check ACL on activity list in person context
* [list for accompanying course in person] filter list using ACL * [list for accompanying course in person] filter list using ACL
@ -57,7 +66,7 @@ and this project adheres to
* [accompanyingCourse] Ability to close accompanying course (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/296) * [accompanyingCourse] Ability to close accompanying course (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/296)
* [task] Select2 field in task form to allow search for a user (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/167) * [task] Select2 field in task form to allow search for a user (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/167)
* [list result] show all courses, except ones with period closed * [list result] show all courses, except ones with period closed
* [accompanyingCourse] improve banner with small carousel to display slide social-issues or slide associated persons (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/69)
### Test release 2021-11-15 ### Test release 2021-11-15

View File

@ -98,7 +98,7 @@ Finalement, il importe ici de définir ce qu'est un bloc, ce qu'est une zone d'a
Par exemple pour mettre un style au titre on précise juste h3 dans la cascade bloc. Par exemple pour mettre un style au titre on précise juste h3 dans la cascade bloc.
```sass ```scss
div.bloc { div.bloc {
// un bloc générique, utilisé à plusieurs endroits // un bloc générique, utilisé à plusieurs endroits
&.bloc-dark { &.bloc-dark {
@ -381,3 +381,31 @@ A chaque fois qu'un lien est indiqué, vérifier si on ne doit pas utiliser la f
* utiliser `chill_return_path_or` dans le bouton "Cancel"; * utiliser `chill_return_path_or` dans le bouton "Cancel";
* pour les boutons "enregistrer et voir" et "Enregistrer et fermer" => ? * pour les boutons "enregistrer et voir" et "Enregistrer et fermer" => ?
### Assets pour les listes de suggestion
Créer une liste de suggestions à ajouter (tout l'item est cliquable)
```html
<ul class="list-suggest add-items">
<li>
<span>item</span>
</li>
</ul>
```
Créer une liste de suggestions à enlever (avec une croix rouge cliquable, l'ancre a est vide)
```html
<ul class="list-suggest remove-items">
<li>
<span>
item
<a></a>
</span>
</li>
</ul>
```
Créer un titre enlevable (avec une croix rouge cliquable, l'ancre a est vide)
```html
<div class="item-title">
title
<a></a>
</div>
```

View File

@ -354,8 +354,9 @@ class Activity implements HasCenterInterface, HasScopeInterface, AccompanyingPer
if (null !== $this->accompanyingPeriod) { if (null !== $this->accompanyingPeriod) {
$personsNotAssociated = []; $personsNotAssociated = [];
// TODO better semantic with: return $this->persons->filter(...);
foreach ($this->persons as $person) { foreach ($this->persons as $person) {
if (!in_array($person, $this->getPersonsAssociated())) { if ($this->accompanyingPeriod->getOpenParticipationContainsPerson($person) === null) {
$personsNotAssociated[] = $person; $personsNotAssociated[] = $person;
} }
} }

View File

@ -1,35 +1,33 @@
<template> <template>
<teleport to="#add-persons" v-if="isComponentVisible"> <teleport to="#add-persons" v-if="isComponentVisible">
<div class="flex-bloc concerned-groups" :class="getContext"> <div class="flex-bloc concerned-groups" :class="getContext">
<persons-bloc <persons-bloc
v-for="bloc in contextPersonsBlocs" v-for="bloc in contextPersonsBlocs"
v-bind:key="bloc.key" v-bind:key="bloc.key"
v-bind:bloc="bloc" v-bind:bloc="bloc"
v-bind:setPersonsInBloc="setPersonsInBloc"> v-bind:blocWidth="getBlocWidth"
</persons-bloc> v-bind:setPersonsInBloc="setPersonsInBloc">
</div> </persons-bloc>
<div v-if="getContext === 'accompanyingCourse' && suggestedEntities.length > 0"> </div>
<ul class="list-unstyled"> <div v-if="getContext === 'accompanyingCourse' && suggestedEntities.length > 0">
<li v-for="p in suggestedEntities" @click="addSuggestedEntity(p)"> <ul class="list-suggest add-items">
<span class="badge bg-primary" style="cursor: pointer;"> <li v-for="p in suggestedEntities" @click="addSuggestedEntity(p)">
<i class="fa fa-plus fa-fw text-success"></i> <span>{{ p.text }}</span>
{{ p.text }} </li>
</span> </ul>
</li> </div>
</ul>
</div>
<add-persons <add-persons
buttonTitle="activity.add_persons" buttonTitle="activity.add_persons"
modalTitle="activity.add_persons" modalTitle="activity.add_persons"
v-bind:key="addPersons.key" v-bind:key="addPersons.key"
v-bind:options="addPersonsOptions" v-bind:options="addPersonsOptions"
@addNewPersons="addNewPersons" @addNewPersons="addNewPersons"
ref="addPersons"> ref="addPersons">
</add-persons> </add-persons>
</teleport> </teleport>
</template> </template>
<script> <script>
@ -122,6 +120,9 @@ export default {
} }
} }
}, },
getBlocWidth() {
return Math.round(100/(this.contextPersonsBlocs.length)) + '%';
}
}, },
mounted() { mounted() {
this.setPersonsInBloc(); this.setPersonsInBloc();

View File

@ -1,12 +1,8 @@
<template> <template>
<li> <li>
<span class="badge bg-primary" :title="person.text"> <span :title="person.text">
<span class="chill_denomination"> <span class="chill_denomination">{{ textCutted }}</span>
{{ textCutted }} <a @click.prevent="$emit('remove', person)"></a>
</span>
<a class="fa fa-fw fa-times text-danger text-decoration-none"
@click.prevent="$emit('remove', person)">
</a>
</span> </span>
</li> </li>
</template> </template>

View File

@ -1,11 +1,11 @@
<template> <template>
<div class="item-bloc"> <div class="item-bloc" :style="{ 'flex-basis': blocWidth }">
<div class="item-row"> <div class="item-row">
<div class="item-col"> <div class="item-col">
<h4>{{ $t(bloc.title) }}</h4> <h4>{{ $t(bloc.title) }}</h4>
</div> </div>
<div class="item-col"> <div class="item-col">
<ul class="list-content"> <ul class="list-suggest remove-items">
<person-badge <person-badge
v-for="person in bloc.persons" v-for="person in bloc.persons"
v-bind:key="person.id" v-bind:key="person.id"
@ -25,7 +25,7 @@ export default {
components: { components: {
PersonBadge PersonBadge
}, },
props: ['bloc', 'setPersonsInBloc'], props: ['bloc', 'setPersonsInBloc', 'blocWidth'],
methods: { methods: {
removePerson(item) { removePerson(item) {
console.log('@@ CLICK remove person: item', item); console.log('@@ CLICK remove person: item', item);

View File

@ -26,23 +26,45 @@
{{ activity.type.name | localize_translatable_string }} {{ activity.type.name | localize_translatable_string }}
<ul class="small_in_title"> {% if activity.emergency %}
{% if activity.location and t.locationVisible %} <span class="badge bg-danger rounded-pill fs-6">{{ 'Emergency'|trans|upper }}</span>
<li> {% endif %}
<span class="item-key">{{ 'location'|trans ~ ': ' }}</span>
<span>{{ activity.location.locationType.title|localize_translatable_string }}</span> <ul class="small_in_title mt-3">
{{ activity.location.name }}
</li> {% if activity.sentReceived is not empty and t.sentReceivedVisible %}
<li>
<span class="item-key">{{ 'Sent received'|trans ~ ' : ' }}</span>
<b>{{ activity.sentReceived|capitalize|trans }}</b>
</li>
{% endif %} {% endif %}
{% if activity.location and t.locationVisible %}
<li>
<span class="item-key">{{ 'location'|trans ~ ': ' }}</span>
<b>
<span>{{ activity.location.locationType.title|localize_translatable_string }}</span>
{{ activity.location.name }}
</b>
</li>
{% endif %}
{% if activity.user and t.userVisible %} {% if activity.user and t.userVisible %}
<li> <li>
<span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span> <span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span>
{{ activity.user.usernameCanonical }} <b>{{ activity.user.usernameCanonical }}</b>
</li> </li>
{% endif %} {% endif %}
<li class="associated-persons">
<span class="item-key">{{ 'Participants'|trans ~ ' : ' }}</span>
{% for p in activity.personsAssociated %}
<span class="badge-person">{{ p|chill_entity_render_box }}</span>
{% endfor %}
</li>
</ul> </ul>
<ul class="list-content"> <ul class="list-content my-3">
{%- if t.reasonsVisible -%} {%- if t.reasonsVisible -%}
{%- if activity.reasons is not empty -%} {%- if activity.reasons is not empty -%}
<li class="reasons"> <li class="reasons">
@ -71,11 +93,9 @@
{%- endif -%} {%- endif -%}
{% endif %} {% endif %}
</ul> </ul>
</span> </span>
</h2> </h2>
{#
{% if context == 'person' and activity.accompanyingPeriod is not empty %} {% if context == 'person' and activity.accompanyingPeriod is not empty %}
<div class="mt-3"> <div class="mt-3">
<a class="btn btn-sm btn-outline-primary" <a class="btn btn-sm btn-outline-primary"
@ -87,4 +107,4 @@
</a> </a>
</div> </div>
{% endif %} {% endif %}
#}

View File

@ -3,89 +3,93 @@
{{ path(pathname, parms) }} {{ path(pathname, parms) }}
{% endmacro %} {% endmacro %}
{% if context == 'person' %} {% macro computeWidth(nbBlocks) %}
{% set blocs = [ {{ 'flex-basis: ' ~ (100 / nbBlocks)|round(1) ~ '%;' }}
{ 'title': 'Others persons'|trans, {% endmacro %}
{% set blocks = [] %}
{% if entity.activityType.personsVisible %}
{% if context == 'person' %}
{% set blocks = blocks|merge([{
'title': 'Others persons'|trans,
'items': entity.persons, 'items': entity.persons,
'path' : 'chill_person_view', 'path' : 'chill_person_view',
'key' : 'person_id' 'key' : 'person_id'
}, }]) %}
{ 'title': 'Third parties'|trans, {% else %}
'items': entity.thirdParties, {% set blocks = blocks|merge([{
'path' : 'chill_crud_3party_3party_view', 'title': 'Persons in accompanying course'|trans,
'key' : 'id'
},
{ 'title': 'Users concerned'|trans,
'items': entity.users,
'key' : 'id'
},
] %}
{% else %}
{% set blocs = [
{ 'title': 'Persons in accompanying course'|trans,
'items': entity.personsAssociated, 'items': entity.personsAssociated,
'path' : 'chill_person_view', 'path' : 'chill_person_view',
'key' : 'person_id' 'key' : 'person_id'
}, },{
{ 'title': 'Third persons'|trans, 'title': 'Third persons'|trans,
'items': entity.personsNotAssociated, 'items': entity.personsNotAssociated,
'path' : 'chill_person_view', 'path' : 'chill_person_view',
'key' : 'person_id' 'key' : 'person_id',
}, }]) %}
{ 'title': 'Third parties'|trans, {% endif %}
'items': entity.thirdParties, {% endif %}
'path' : 'chill_crud_3party_3party_view', {% if entity.activityType.thirdPartiesVisible %}
'key' : 'id' {% set blocks = blocks|merge([{
}, 'title': 'Third parties'|trans,
{ 'title': 'Users concerned'|trans, 'items': entity.thirdParties,
'items': entity.users, 'path' : 'chill_crud_3party_3party_view',
'key' : 'id' 'key' : 'id',
}, }]) %}
] %} {% endif %}
{% if entity.activityType.usersVisible %}
{% set blocks = blocks|merge([{
'title': 'Users concerned'|trans,
'items': entity.users,
'key' : 'id',
}]) %}
{% endif %} {% endif %}
{% if (with_display == 'bloc') %} {% if (with_display == 'bloc') %}
<div class="{{ context }} flex-bloc concerned-groups"> <div class="{{ context }} flex-bloc concerned-groups">
{% for bloc in blocs %} {% for bloc in blocks %}
<div class="item-bloc">
<div class="item-row"> <div class="item-bloc" style="{{ _self.computeWidth(loop.length) }}">
<div class="item-col"> <div class="item-row">
<h4>{{ bloc.title }}</h4> <div class="item-col">
</div> <h4>{{ bloc.title }}</h4>
<div class="item-col"> </div>
<ul class="list-content"> <div class="item-col">
{% for item in bloc.items %} <ul class="list-content">
<li> {% for item in bloc.items %}
{% if bloc.path is defined %} <li>
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}"> {% if bloc.path is defined %}
<span class="{% if (badge_person is defined and badge_person == true) %}badge-person{% else %}badge bg-primary{% endif %}"> <a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
{{ item|chill_entity_render_box({ <span class="{% if (badge_person is defined and badge_person == true) %}badge-person{% else %}badge bg-primary{% endif %}">
'render': 'raw', {{ item|chill_entity_render_box({
'addAltNames': false 'render': 'raw',
}) }} 'addAltNames': false
</span> }) }}
</a> </span>
{% else %} </a>
<span class="{% if (badge_person is defined and badge_person == true) %}badge-person{% else %}badge bg-primary{% endif %}"> {% else %}
{{ item|chill_entity_render_box({ <span class="{% if (badge_person is defined and badge_person == true) %}badge-person{% else %}badge bg-primary{% endif %}">
'render': 'raw', {{ item|chill_entity_render_box({
'addAltNames': false 'render': 'raw',
}) }} 'addAltNames': false
</span> }) }}
{% endif %} </span>
</li> {% endif %}
{% endfor %} </li>
</ul> {% endfor %}
</ul>
</div>
</div> </div>
</div> </div>
</div>
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
{% if (with_display == 'row') %} {% if (with_display == 'row') %}
<div class="concerned-groups"> <div class="concerned-groups">
{% for bloc in blocs %} {% for bloc in blocks %}
<div class="group"> <div class="group">
{% if bloc.items|length > 0 %} {% if bloc.items|length > 0 %}
<h4>{{ bloc.title }}</h4> <h4>{{ bloc.title }}</h4>
@ -118,7 +122,7 @@
{% if (with_display == 'wrap-list') %} {% if (with_display == 'wrap-list') %}
<div class="concerned-groups wrap-list"> <div class="concerned-groups wrap-list">
{% for bloc in blocs %} {% for bloc in blocks %}
<div class="wl-row"> <div class="wl-row">
{% if bloc.items|length > 0 %} {% if bloc.items|length > 0 %}
<div class="wl-col title"> <div class="wl-col title">

View File

@ -2,9 +2,11 @@
{% for activity in activities | slice(0,5) %} {% for activity in activities | slice(0,5) %}
{% set t = activity.type %} {% set t = activity.type %}
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"></a> <a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
class="badge-link" title="{{ 'Show the activity'|trans }}">
{% include '@ChillActivity/Activity/activity-badge-title.html.twig' %} {% include '@ChillActivity/Activity/activity-badge-title.html.twig' %}
</a>
{% endfor %} {% endfor %}
</div> </div>

View File

@ -9,7 +9,7 @@
{% block content -%} {% block content -%}
<div class="activity-show"> <div class="activity-show">
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %} {% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %}
</div> </div>
{% endblock content %} {% endblock content %}

View File

@ -10,6 +10,9 @@
// Chill buttons // Chill buttons
@import './scss/buttons'; @import './scss/buttons';
// Chill badges
@import './scss/badge';
// Chill forms // Chill forms
@import './scss/forms'; @import './scss/forms';
@ -202,9 +205,9 @@ footer.footer {
} }
} }
/* /*
* SPECIFIC RULES * GENERIC MAIN STYLES
* miscellaneous
*/ */
/// titles /// titles
@ -280,7 +283,6 @@ div.metadata {
} }
/// chill help tooltip /// chill help tooltip
.chill-help-tooltip { .chill-help-tooltip {
&::before { &::before {
content: '\f05a'; content: '\f05a';
@ -295,7 +297,6 @@ div.metadata {
/// display definition list /// display definition list
// with dt and dd on same line // with dt and dd on same line
dl.definition-inline { dl.definition-inline {
dd { dd {
display: inline; display: inline;
@ -317,6 +318,19 @@ dl.definition-inline {
font-style: italic; font-style: italic;
} }
/// flash
div#flashMessages {
margin-top: 20px;
.flash-notice {
margin-top: 10px;
margin-bottom: 10px;
}
}
/*
* SPECIFIC RULES
*/
//// still used ? //// still used ?
// move from chillmain.css, converted to sass // move from chillmain.css, converted to sass
@ -369,14 +383,6 @@ div#usefulbar {
} }
} }
div#flashMessages {
margin-top: 20px;
.flash-notice {
margin-top: 10px;
margin-bottom: 10px;
}
}
.personName { .personName {
font-variant: small-caps; font-variant: small-caps;
text-transform: capitalize; text-transform: capitalize;

View File

@ -0,0 +1,54 @@
/// mixin used in this sheet
@mixin remove_link {
cursor: pointer;
&:before {
font: normal normal normal 14px/1 ForkAwesome;
margin-left: 0.5em;
content: "\f00d"; // fa-times
color: var(--bs-danger);
text-decoration: none;
}
}
/*
* SUGGESTIONS LIST - A specific list of badges used to manage suggestions (with add/remove link)
* /!\ use bootstrap badge styles,
* cfr. src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/_custom.scss
*/
ul.list-suggest {
list-style-type: none;
padding-left: 0;
li > span {
white-space: normal;
text-align: start;
margin-bottom: 3px;
}
&.add-items {
li {
cursor: pointer;
& > span:before {
font: normal normal normal 14px/1 ForkAwesome;
margin-right: 0.5em;
content: "\f067"; // fa-plus
color: var(--bs-success);
}
}
}
&.remove-items {
li {
a {
@include remove_link;
}
}
}
}
/// manage remove link if it isn't a list but a title
/// (cfr. in Vue AccompanyingCourseWorkEdit)
div.item-title {
a {
@include remove_link;
}
}

View File

@ -4,3 +4,12 @@
*/ */
/// A specific list of badges, use bootstrap badge styles
/// cfr. src/Bundle/ChillMainBundle/Resources/public/chill/scss/badge.scss
ul.list-suggest {
li > span {
@extend .badge;
@extend .bg-primary;
}
}

View File

@ -219,6 +219,7 @@ thirdparty: tiers
# circles / scopes # circles / scopes
Choose the circle: Choisir le cercle Choose the circle: Choisir le cercle
Scopes: Services
#export #export

View File

@ -95,7 +95,6 @@ div.person-view {
* Header custom for Accompanying Course * Header custom for Accompanying Course
*/ */
div.banner { div.banner {
div#header-accompanying_course-name { div#header-accompanying_course-name {
background: none repeat scroll 0 0 $chill-accourse-context; background: none repeat scroll 0 0 $chill-accourse-context;
@ -117,6 +116,37 @@ div.banner {
color: $white; color: $white;
padding-top: 1em; padding-top: 1em;
padding-bottom: 1em; padding-bottom: 1em;
/// AccompanyingCourse: HeaderSlider Carousel
button.carousel-control-prev,
button.carousel-control-next {
width: 8%;
opacity: inherit;
}
button.carousel-control-prev {
left: unset;
right: 0;
}
span.to-social-issues,
span.to-persons-associated {
display: inline-block;
border-radius: 15px;
width: 24px;
height: 24px;
box-shadow: 0 0 3px 1px grey;
opacity: 0.8;
&:hover {
opacity: 1;
}
}
span.to-social-issues {
background-color: #4bafe8;
border-left: 12px solid #32749a;
}
span.to-persons-associated {
background-color: #16d9b4;
border-right: 12px solid #ffffff;
}
} }
} }
@ -203,34 +233,11 @@ div.household-resume {
} }
} }
/// Horizontal list of persons (Accourse resume page) /*
div.accompanyingcourse-resume { * GENERIC PERSON STYLES
div.associated-persons { * miscellaneous
font-size: 110%; */
span.household {
display: inline-block;
border-radius: 8px;
border: 1px solid $white;
&:hover {
border: 1px solid $chill-beige;
i {
display: inline-block;
}
}
&.no-household:hover {
border: 1px solid $white;
}
i {
color: $chill-beige;
display: none;
}
padding: 0.3em;
margin-right: 2px;
}
}
}
///
abbr.referrer { // still used ? abbr.referrer { // still used ?
font-size: 70%; font-size: 70%;
padding-right: 0.4em; padding-right: 0.4em;

View File

@ -87,26 +87,12 @@ div.accompanying_course_work-list {
&.result_list { &.result_list {
padding-left: 1em; padding-left: 1em;
margin-bottom: 0; margin-bottom: 0;
li {
padding-left: 0.3em;
&::marker {
/*
content: '';
font-weight: bold;
font-size: 120%;
*/
font-family: ForkAwesome;
content: '\f04b';
font-size: 75%;
transform: rotate(45deg);
}
}
} }
&.goal_title li::marker { &.goal_title {
color: $social-issue-color; @include list_marker_triangle($social-issue-color);
} }
&.result_list li::marker { &.result_list {
color: $pink; @include list_marker_triangle($pink);
} }
} }
} }

View File

@ -49,8 +49,6 @@ h2.badge-title {
width: 100%; width: 100%;
color: $dark; color: $dark;
a & { text-decoration: none; } // ?!? keep it ?
span.title_label { span.title_label {
border-radius: 0.35rem 0 0 0.35rem; border-radius: 0.35rem 0 0 0.35rem;
color: $white; color: $white;
@ -75,13 +73,43 @@ h2.badge-title {
flex-grow: 1; flex-grow: 1;
margin: 0 0 0 auto; margin: 0 0 0 auto;
border-radius: 0 0.35rem 0.35rem 0; border-radius: 0 0.35rem 0.35rem 0;
background-color: $light; background-color: $chill-llight-gray;
padding: 0.2em 1em; padding: 0.2em 1em;
ul.small_in_title { ul.small_in_title {
margin-top: 0.5em; margin: 0;
//margin-top: 0.5em;
font-size: 70%; font-size: 70%;
padding-left: 1rem; padding-left: 1rem;
&.evaluations {
@include list_marker_triangle($orange);
}
}
ul.columns { // XS:1 SM:2 MD:1 LG:2 XL:2 XXL:2
@include media-breakpoint-only(sm) {
columns: 2; -webkit-columns: 2; -moz-columns: 2;
}
@include media-breakpoint-up(lg) {
columns: 2; -webkit-columns: 2; -moz-columns: 2;
}
}
}
}
/// Theses links apply on badge as parent tag.
/// They don't look like button, picto or simple text links
a.badge-link {
color: unset;
text-decoration: unset;
& > h2.badge-title {
&:hover {
//box-shadow: 0 0 7px 0 $chill-gray;
//opacity: 0.8;
}
span.title_action {
&:hover {
background-color: $chill-ll-gray;
}
} }
} }
} }
@ -128,35 +156,7 @@ div.activity-list {
} }
} }
/// AccompanyingCourse: HeaderSlider Carousel /*
div#header-accompanying_course-details { */
button.carousel-control-prev,
button.carousel-control-next {
width: 8%;
opacity: inherit;
}
button.carousel-control-prev {
left: unset;
right: 0;
}
span.to-social-issues,
span.to-persons-associated {
display: inline-block;
border-radius: 15px;
width: 24px;
height: 24px;
box-shadow: 0 0 3px 1px grey;
opacity: 0.8;
&:hover {
opacity: 1;
}
}
span.to-social-issues {
background-color: #4bafe8;
border-left: 12px solid #32749a;
}
span.to-persons-associated {
background-color: #16d9b4;
border-right: 12px solid #ffffff;
}
}

View File

@ -37,3 +37,20 @@
margin: 0 0.3em 0 -1.05em; margin: 0 0.3em 0 -1.05em;
} }
} }
///
/// Make list with items marker like a colored triangle
///
@mixin list_marker_triangle($color) {
& > li {
padding-left: 0.3em;
&::marker {
font-family: ForkAwesome;
content: '\f04b';
font-size: 75%;
transform: rotate(45deg);
color: $color;
}
}
}

View File

@ -0,0 +1,6 @@
import Masonry from 'masonry-layout/masonry';
let elem = document.querySelector('#dashboards');
let msnry = new Masonry( elem, {
// options
});

View File

@ -48,9 +48,7 @@ export default {
persons: this.persons.filter(p => p.current_household_id === h) persons: this.persons.filter(p => p.current_household_id === h)
}) })
}) })
console.log(personsByHousehold) //console.log(personsByHousehold)
return personsByHousehold return personsByHousehold
}, },
householdExists(id) { householdExists(id) {

View File

@ -20,10 +20,9 @@
</VueMultiselect> </VueMultiselect>
<template v-if="referrersSuggested.length > 0"> <template v-if="referrersSuggested.length > 0">
<ul class="list-unstyled"> <ul class="list-suggest add-items">
<li v-for="u in referrersSuggested" @click="updateReferrer(u)"> <li v-for="u in referrersSuggested" @click="updateReferrer(u)">
<span class="badge bg-primary" style="cursor: pointer"> <span>
<i class="fa fa-plus fa-fw text-success"></i>
<user-render-box-badge :user="u"></user-render-box-badge> <user-render-box-badge :user="u"></user-render-box-badge>
</span> </span>
</li> </li>

View File

@ -35,7 +35,7 @@ const appMessages = {
title: "Origine de la demande", title: "Origine de la demande",
label: "Origine de la demande", label: "Origine de la demande",
placeholder: "Renseignez l'origine de la demande", placeholder: "Renseignez l'origine de la demande",
not_valid: "Indiquez une origine de la demande", not_valid: "Indiquez une origine à la demande",
}, },
persons_associated: { persons_associated: {
title: "Usagers concernés", title: "Usagers concernés",
@ -126,7 +126,7 @@ const appMessages = {
participation_not_valid: "sélectionnez au minimum 1 usager", participation_not_valid: "sélectionnez au minimum 1 usager",
socialIssue_not_valid: "sélectionnez au minimum une problématique sociale", socialIssue_not_valid: "sélectionnez au minimum une problématique sociale",
location_not_valid: "indiquez au minimum une localisation temporaire du parcours", location_not_valid: "indiquez au minimum une localisation temporaire du parcours",
origin_not_valid: "indiquez une origine de la demande", origin_not_valid: "Indiquez une origine à la demande",
set_a_scope: "indiquez au moins un service", set_a_scope: "indiquez au moins un service",
sure: "Êtes-vous sûr ?", sure: "Êtes-vous sûr ?",
sure_description: "Une fois le changement confirmé, il ne sera plus possible de le remettre à l'état de brouillon !", sure_description: "Une fois le changement confirmé, il ne sera plus possible de le remettre à l'état de brouillon !",

View File

@ -44,9 +44,9 @@
<!-- results which **are** attached to an objective --> <!-- results which **are** attached to an objective -->
<div v-for="g in goalsPicked"> <div v-for="g in goalsPicked">
<div> <div>
<div class="item-title" @click="removeGoal(g)"> <div class="item-title">
<i class="fa fa-times"></i>
{{ g.goal.title.fr }} {{ g.goal.title.fr }}
<a @click="removeGoal(g)"></a>
</div> </div>
</div> </div>
<div> <div>
@ -61,10 +61,9 @@
<p>{{ $t('available_goals_text') }}</p> <p>{{ $t('available_goals_text') }}</p>
<ul class="list-objectives"> <ul class="list-suggest add-items">
<li v-for="g in availableForCheckGoal" class="badge bg-primary" @click="addGoal(g)"> <li v-for="g in availableForCheckGoal" @click="addGoal(g)">
<i class="fa fa-plus"></i> <span>{{ g.title.fr }}</span>
{{ g.title.fr }}
</li> </li>
</ul> </ul>
</div> </div>
@ -98,10 +97,9 @@
<div class="add_evaluation"> <div class="add_evaluation">
<div v-if="showAddEvaluation"> <div v-if="showAddEvaluation">
<p>{{ $t('available_evaluations_text') }}</p> <p>{{ $t('available_evaluations_text') }}</p>
<ul class="list-evaluations"> <ul class="list-suggest add-items">
<li v-for="e in evaluationsForAction" class="badge bg-primary" @click="addEvaluation(e)"> <li v-for="e in evaluationsForAction" @click="addEvaluation(e)">
<i class="fa fa-plus"></i> <span>{{ e.title.fr }}</span>
{{ e.title.fr }}
</li> </li>
</ul> </ul>
</div> </div>
@ -497,8 +495,8 @@ div#workEditor {
& > div.results_without_objective { & > div.results_without_objective {
background: repeating-linear-gradient( background: repeating-linear-gradient(
45deg, 45deg,
$gray-500, $gray-200,
$gray-500 10px, $gray-200 10px,
$gray-100 10px, $gray-100 10px,
$gray-100 20px $gray-100 20px
); );
@ -537,31 +535,11 @@ div#workEditor {
font-size: 85%; font-size: 85%;
} }
ul.list-evaluations,
ul.list-objectives,
ul.list-results {
list-style-type: none;
padding: 0;
li {
margin: 0.5rem;
&.badge {
padding-bottom: 0;
padding-top: 0;
padding-left: 0;
}
}
}
i.fa { i.fa {
padding: 0.25rem; padding: 0.25rem;
color: $white; color: $white;
&.fa-plus { background-color: $green; } &.fa-times { color: $red; }
&.fa-times { background-color: $red; }
&.fa-pencil { background-color: $orange; }
} }
} }

View File

@ -1,9 +1,10 @@
<template> <template>
<div> <div>
<div class="item-title" @click="removeEvaluation(evaluation)"> <div class="item-title">
<i class="fa fa-fw fa-times"></i>
{{ evaluation.evaluation.title.fr }} {{ evaluation.evaluation.title.fr }}
<a @click="removeEvaluation(evaluation)"></a>
</div> </div>
<div v-if="!evaluation.editEvaluation"> <div v-if="!evaluation.editEvaluation">
<dl class="item-details definition-inline"> <dl class="item-details definition-inline">

View File

@ -1,33 +1,57 @@
<template> <template>
<div v-if="hasResult" class="addResult"> <div v-if="hasResult" class="addResult">
<p v-if="pickedResults.length ===0" class="chill-no-data-statement"> <p v-if="pickedResults.length ===0" class="chill-no-data-statement">
Aucun résultat associé Aucun résultat associé
</p> </p>
<ul class="list-results">
<li v-for="r in pickedResults" class="badge bg-primary" @click="removeResult(r)"> <ul class="list-suggest remove-items">
<i class="fa fa-times"></i> <li v-for="r in pickedResults">
{{ r.title.fr }} <span>
</li>
<template v-if="isExpanded">
<li v-for="r in availableForCheckResults" class="badge bg-primary" @click="addResult(r)">
<i class="fa fa-plus"></i>
{{ r.title.fr }} {{ r.title.fr }}
</li> <a @click="removeResult(r)"></a>
</template> </span>
</ul>
<ul class="record_actions">
<li v-if="isExpanded">
<button class="btn btn-hide" @click="toggleSelect">
<i class="fa fa-eye-slash"></i>
Masquer résultats et orientations disponibles
</button>
</li>
<li v-else>
<button class="btn btn-show" @click="toggleSelect">
Afficher résultats et orientations disponibles
</button>
</li> </li>
</ul> </ul>
<div class="accordion" id="expandedSuggestions">
<div class="accordion-item">
<h2 class="accordion-header" id="heading_expanded_suggestions">
<button v-if="isExpanded"
class="accordion-button"
type="button"
data-bs-toggle="collapse"
aria-expanded="true"
@click="toggleSelect">
Masquer résultats et orientations disponibles
</button>
<button v-else
class="accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
aria-expanded="false"
@click="toggleSelect">
Afficher résultats et orientations disponibles
</button>
</h2>
<div class="accordion-collapse" id="collapse_expanded_suggestions"
aria-labelledby="heading_expanded_suggestions" data-bs-parent="#expandedSuggestions">
<template v-if="isExpanded">
<ul class="list-suggest add-items">
<li v-for="r in availableForCheckResults" @click="addResult(r)">
<span>{{ r.title.fr }}</span>
</li>
</ul>
</template>
</div>
</div>
</div>
</div> </div>
<div v-if="!hasResult" class="noResult"> <div v-if="!hasResult" class="noResult">
<div class="chill-no-data-statement"> <div class="chill-no-data-statement">

View File

@ -4,65 +4,111 @@
{{ 'Resume Accompanying Course'|trans }} {{ 'Resume Accompanying Course'|trans }}
{% endblock %} {% endblock %}
{% macro button_person(person) %} {% macro insert_onthefly(type, entity) %}
{% if person.isSharingHousehold %} {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
<li> action: 'show', displayBadge: true,
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': person.getCurrentHousehold.id }) }}" targetEntity: { name: type, id: entity.id },
class="btn btn-sm btn-chill-beige" title="{{ 'Show household'|trans ~ ' n° ' ~ person.getCurrentHousehold.id }}"> buttonText: entity|chill_entity_render_string
<i class="fa fa-home"></i> } %}
</a>
</li>
{% endif %}
{% endmacro %} {% endmacro %}
{% block js %} {% block js %}
{{ parent() }} {{ parent() }}
{{ encore_entry_script_tags('page_accompanying_course_index_person_locate') }} {{ encore_entry_script_tags('page_accompanying_course_index_person_locate') }}
{{ encore_entry_script_tags('page_accompanying_course_index_masonry') }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="accompanyingcourse-resume row"> <div class="accompanyingcourse-resume">
{% if 'DRAFT' == accompanyingCourse.step %} <div id="dashboards" class="row" data-masonry='{"percentPosition": true }'>
<div class="col-md-6 warnings mb-5"> {% if 'DRAFT' == accompanyingCourse.step %}
{% include '@ChillPerson/AccompanyingCourse/_still_draft.html.twig' %} <div class="col-4 warnings mb-4">
</div> {% include '@ChillPerson/AccompanyingCourse/_still_draft.html.twig' %}
{% endif %}
{% if 'DRAFT' != accompanyingCourse.step %}
{% if withoutHousehold|length > 0 %}
<div class="col-md-6 warnings mb-5">
{% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' %}
</div> </div>
{% endif %} {% endif %}
{% endif %}
{% if accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none' %} {% if 'DRAFT' != accompanyingCourse.step %}
<div class="col-md-6 warnings mb-5"> {% if withoutHousehold|length > 0 %}
{% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' %} <div class="col-4 warnings mb-4">
</div> {% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' %}
{% endif %} </div>
{% endif %}
<div class="col-md-6 location mb-5">
{% if accompanyingCourse.locationStatus == 'person' %}
<h2>{{ 'This course is located by'|trans }}</h2>
<h4>{{ accompanyingCourse.personLocation|chill_entity_render_string }}</h4>
{% elseif accompanyingCourse.locationStatus == 'address' %}
<h4>{{ 'This course has a temporarily location'|trans }}</h4>
{% endif %} {% endif %}
{% if accompanyingCourse.locationStatus != 'none' %} {% if accompanyingCourse.locationStatus == 'address'
{{ accompanyingCourse.location|chill_entity_render_box }} or accompanyingCourse.locationStatus == 'none' %}
<div class="col-4 warnings mb-4">
{% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' %}
</div>
{% endif %}
<div class="col col-sm-6 col-lg-4 location mb-4">
{% if accompanyingCourse.locationStatus == 'person' %}
<h2>{{ 'This course is located by'|trans }}</h2>
<h4>{{ accompanyingCourse.personLocation|chill_entity_render_string }}</h4>
{% elseif accompanyingCourse.locationStatus == 'address' %}
<h4>{{ 'This course has a temporarily location'|trans }}</h4>
{% endif %}
{% if accompanyingCourse.locationStatus != 'none' %}
{{ accompanyingCourse.location|chill_entity_render_box }}
{% endif %}
</div>
{% if accompanyingCourse.participations is not empty %}
<div class="col col-sm-6 col-lg-4 persons mb-4">
<h4 class="item-key">{{ 'Persons associated'|trans }}</h4>
{% for r in accompanyingCourse.participations %}
{{ _self.insert_onthefly('person', r.person) }}
{% endfor %}
</div>
{% endif %}
{% if accompanyingCourse.resources is not empty %}
<div class="col col-sm-6 col-lg-4 resources mb-4">
<h4 class="item-key">{{ 'Resources'|trans }}</h4>
{% for r in accompanyingCourse.resources %}
{% if r.person is not null %}
{{ _self.insert_onthefly('person', r.person) }}
{% elseif r.thirdParty is not null %}
{{ _self.insert_onthefly('thirdparty', r.thirdParty) }}
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if accompanyingCourse.scopes is not empty %}
<div class="col col-sm-6 col-lg-4 scopes mb-4">
<h4 class="item-key">{{ 'Scopes'|trans }}</h4>
<div>
{% for s in accompanyingCourse.scopes %}
<span>{{ s.name|localize_translatable_string|capitalize }}</span>{% if not loop.last %}, {% endif %}
{% endfor %}
</div>
</div>
{% endif %}
{% if accompanyingCourse.requestorPerson is not null or accompanyingCourse.requestorThirdParty is not null %}
<div class="col col-sm-6 col-lg-4 requestor mb-4">
{% if accompanyingCourse.requestorPerson is not null %}
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
{{ _self.insert_onthefly('person', accompanyingCourse.requestorPerson) }}
{% elseif accompanyingCourse.requestorThirdParty is not null %}
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
{{ _self.insert_onthefly('thirdparty', accompanyingCourse.requestorThirdParty) }}
{% endif %}
</div>
{% endif %} {% endif %}
</div> </div>
<div class="social-actions mb-5"> <div class="social-actions my-4">
<h2 class="mb-3 d-none">{{ 'Last social actions'|trans }}</h2> <h2 class="mb-3 d-none">{{ 'Last social actions'|trans }}</h2>
{% include 'ChillPersonBundle:AccompanyingCourseWork:list_recent_by_accompanying_period.html.twig' with {'buttonText': false } %} {% include 'ChillPersonBundle:AccompanyingCourseWork:list_recent_by_accompanying_period.html.twig' with {'buttonText': false } %}
</div> </div>
{% block contentActivity %} {% block contentActivity %}
<div class="activities mb-5"> <div class="activities my-4">
{% set person = null %} {% set person = null %}
{% set person_id = null %} {% set person_id = null %}

View File

@ -1,6 +1,8 @@
<div class="accompanying_course_work-list"> <div class="accompanying_course_work-list">
{% for w in works | slice(0,5) %} {% for w in works | slice(0,5) %}
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"></a>
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
class="badge-link" title="{{ 'crud.social_action.title_link'|trans }}">
<h2 class="badge-title"> <h2 class="badge-title">
<span class="title_label"> <span class="title_label">
@ -9,7 +11,7 @@
<span class="title_action"> <span class="title_action">
{{ w.socialAction|chill_entity_render_string }} {{ w.socialAction|chill_entity_render_string }}
<ul class="small_in_title"> <ul class="small_in_title columns mt-3">
<li> <li>
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span> <span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
<b>{{ w.startDate|format_date('short') }}</b> <b>{{ w.startDate|format_date('short') }}</b>
@ -22,6 +24,50 @@
{% endif %} {% endif %}
</ul> </ul>
<ul class="small_in_title">
{% if w.handlingThierParty %}
<li>
<span class="item-key">{{ 'Thirdparty handling'|trans ~ ' : ' }}</span>
<span class="badge-thirdparty">{{ w.handlingThierParty|chill_entity_render_box }}</span>
</li>
{% endif %}
<li class="associated-persons">
<span class="item-key">{{ 'Participants'|trans ~ ' : ' }}</span>
{% for p in w.persons %}
<span class="badge-person">{{ p|chill_entity_render_box }}</span>
{% endfor %}
</li>
</ul>
<ul class="list-content my-3">
<li class="social-issues">
{{ w.socialAction.issue|chill_entity_render_box }}
</li>
</ul>
<ul class="small_in_title evaluations mb-3">
{% for e in w.accompanyingPeriodWorkEvaluations %}
<li>
<span class="item-key">{{ 'accompanying_course_work.social_evaluation'|trans ~ ' : ' }}</span>
{{ e.evaluation.title|localize_translatable_string }}
<ul class="columns">
{% if e.startDate %}
<li>
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
<b>{{ e.startDate|format_date('short') }}</b>
</li>
{% endif %}
{% if e.endDate %}
<li>
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
<b>{{ e.endDate|format_date('short') }}</b>
</li>
{% endif %}
</ul>
</li>
{% endfor %}
</ul>
<div class="metadata text-end" style="font-size: 60%"> <div class="metadata text-end" style="font-size: 60%">
{{ 'Last updated by'|trans }} {{ 'Last updated by'|trans }}
<span class="user">{{ w.updatedBy|chill_entity_render_box }}</span>: <span class="user">{{ w.updatedBy|chill_entity_render_box }}</span>:
@ -30,6 +76,8 @@
</span> </span>
</h2> </h2>
</a>{# {{ dump(w) }} #}
{% endfor %} {% endfor %}
</div> </div>

View File

@ -17,4 +17,5 @@ module.exports = function(encore, entries)
encore.addEntry('page_household_edit_metadata', __dirname + '/Resources/public/page/household_edit_metadata/index.js'); encore.addEntry('page_household_edit_metadata', __dirname + '/Resources/public/page/household_edit_metadata/index.js');
encore.addEntry('page_person', __dirname + '/Resources/public/page/person/index.js'); encore.addEntry('page_person', __dirname + '/Resources/public/page/person/index.js');
encore.addEntry('page_accompanying_course_index_person_locate', __dirname + '/Resources/public/page/accompanying_course_index/person_locate.js'); encore.addEntry('page_accompanying_course_index_person_locate', __dirname + '/Resources/public/page/accompanying_course_index/person_locate.js');
encore.addEntry('page_accompanying_course_index_masonry', __dirname + '/Resources/public/page/accompanying_course_index/masonry.js');
}; };

View File

@ -205,6 +205,10 @@ See accompanying periods: Voir toutes les périodes d'accompagnement
See accompanying period: Voir la période See accompanying period: Voir la période
Edit accompanying period: Modifier la période Edit accompanying period: Modifier la période
See this period: Voir cette période See this period: Voir cette période
Requestor: Demandeur
No requestor: Pas de demandeur
No resources: "Pas d'interlocuteurs privilégiés"
Persons associated: Usagers concernés
Referrer: Référent Referrer: Référent
Some peoples does not belong to any household currently. Add them to an household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur appartenance à un ménage dès que possible. Some peoples does not belong to any household currently. Add them to an household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur appartenance à un ménage dès que possible.
Add to household now: Ajouter à un ménage Add to household now: Ajouter à un ménage
@ -330,6 +334,7 @@ crud:
add_new: Ajouter une nouvelle action d'accompagnements add_new: Ajouter une nouvelle action d'accompagnements
title_new: Nouvelle action d'accompagnements title_new: Nouvelle action d'accompagnements
title_edit: Modifier l'action d'accompagnements title_edit: Modifier l'action d'accompagnements
title_link: Voir l'action d'accompagnement
social_goal: social_goal:
index: index:
title: Liste des objectifs d'action d'accompagnements title: Liste des objectifs d'action d'accompagnements
@ -430,6 +435,7 @@ accompanying_course_work:
goal: Objectif - motif - dispositif goal: Objectif - motif - dispositif
Any work: Aucune action d'accompagnement Any work: Aucune action d'accompagnement
remove: Supprimer une action d'accompagnement remove: Supprimer une action d'accompagnement
social_evaluation: Évaluation
# #
Person addresses: Adresses de résidence Person addresses: Adresses de résidence

View File

@ -85,3 +85,6 @@ crud:
3party_3party: 3party_3party:
index: index:
add_new: Créer add_new: Créer
Thirdparty handling: Tiers traitant
Thirdparty workers: Tiers intervenants