Merge branch 'fix-prototypage-details' into 'master'

Fix prototypage details

See merge request Chill-Projet/chill-bundles!94
This commit is contained in:
2021-06-29 15:06:20 +00:00
36 changed files with 1033 additions and 598 deletions

View File

@@ -848,7 +848,6 @@ class AccompanyingPeriod implements TrackCreationInterface, TrackUpdateInterface
}
}
}
return $recursiveSocialIssues;
}

View File

@@ -1,3 +1,3 @@
require('./sass/person.scss');
require('./sass/chillperson.scss');
require('./sass/person_with_period.scss');
require('./sass/household_banner.scss');

View File

@@ -0,0 +1,214 @@
@import '~ChillMainSass/custom/config/colors';
/*
* PERSON CONTEXT
*/
div#header-person-name {
background: none repeat scroll 0 0 $chill-green-dark;
color: #FFF;
padding-top: 1em;
padding-bottom: 1em;
}
div#header-person-details {
background: none repeat scroll 0 0 $chill-green;
color: #FFF;
padding-top: 1em;
padding-bottom: 1em;
}
div#person_details_container {
padding-top: 20px;
padding-bottom: 20px;
}
div.person-view {
figure.person-details {
h2 {
font-family: 'Open Sans';
font-weight: 600;
margin-bottom: 0.3em;
font-variant: small-caps;
}
dl {
margin-top: 0.3em;
}
dt {
font-family: 'Open Sans';
font-weight: 600;
}
dd {
margin-left: 0;
}
/*
a.sc-button { background-color: $black; padding-top: 0.2em; padding-bottom: 0.2em; }
*/
}
/* custom fields on the home page */
div.custom-fields {
figure.person-details {
display: flex;
flex-flow: row wrap;
div.cf_title_box:nth-child(4n+1) h2 {
@extend .chill-red;
}
div.cf_title_box:nth-child(4n+2) h2 {
@extend .chill-green;
}
div.cf_title_box:nth-child(4n+3) h2 {
@extend .chill-orange;
}
div.cf_title_box:nth-child(4n+4) h2 {
@extend .chill-blue;
}
div.cf_title_box:nth-child(2n+1) {
width: 50%;
margin-right: 40px;
}
div.cf_title_box:nth-child(2n+2) {
width: calc(50% - 40px);
}
}
}
}
/*
* ACCOMPANYING_COURSE CONTEXT
* Header custom for Accompanying Course
*/
div#header-accompanying_course-name {
background: none repeat scroll 0 0 #718596;
color: #FFF;
h1 {
margin: 0.4em 0;
}
span {
a {
color: white;
}
a:hover {
text-decoration: underline;
}
}
}
div#header-accompanying_course-details {
background: none repeat scroll 0 0 #718596ab;
color: #FFF;
padding-top: 1em;
padding-bottom: 1em;
}
/*
* HOUSEHOLD CONTEXT
* Header custom for Household
*/
div#header-household-name {
background: none repeat scroll 0 0 #929d69; //#b97a7a;
color: #FFF;
h1 {
margin: 0.4em 0;
}
span {
a {
color: white;
}
a:hover {
text-decoration: underline;
}
}
}
div#header-household-details {
background: none repeat scroll 0 0 #b0b984; //#d29791;
color: #FFF;
padding-top: 1em;
padding-bottom: 1em;
span.current-members-explain {
font-weight: bold;
}
}
/*
* ADDRESS HISTORY
* context person / household
*/
div.address-timeline.grid {
display: grid;
grid-template-rows: auto auto auto;
grid-template-columns: auto 120px auto;
@media only screen and (max-width: 750px) {
grid-template-columns: auto 1em auto;
}
div.top {
grid-column: 2;
text-align: center;
color: lightgrey;
margin-bottom: -20px;
}
div.col-a {
grid-column: 1;
text-align: right;
}
div.col-b,
div.date {
grid-column: 2;
position: relative;
&:after {
position: absolute;
content: '';
top: 0; bottom: 0;
left: 50%;
margin: auto -5px;
width: 10px;
height: 100%;
background-color: lightgrey;
z-index: -5;
}
}
div.col-c {
grid-column: 3;
}
div.col-b,
div.action,
div.content {
min-height: 30px;
padding: 1em;
}
div.content {
margin: 0.3em;
border: 1px dashed #00000045;
&.row1 { // current address
border: 1px solid #000;
}
div.address {
font-variant: small-caps;
}
}
div.date {
text-align: center;
background-color: lightgrey;
padding: 0.5em;
border-radius: 0.3em;
}
div.span2 { grid-row: span 3; }
div.span3 { grid-row: span 5; }
div.span4 { grid-row: span 7; }
div.span5 { grid-row: span 9; }
ul.record_actions {
margin: 0;
}
.fake {
&:after {
content: 'fake, just to test.. ';
color: lightgrey;
font-style: italic;
}
}
}

View File

@@ -1,168 +0,0 @@
@import '~ChillMainSass/custom/config/colors';
div#header-person-name {
background: none repeat scroll 0 0 $chill-green-dark;
color: #FFF;
padding-top: 1em;
padding-bottom: 1em;
}
div#header-person-details {
background: none repeat scroll 0 0 $chill-green;
color: #FFF;
padding-top: 1em;
padding-bottom: 1em;
}
div#person_details_container {
padding-top: 20px;
padding-bottom: 20px;
}
div.person-view {
figure.person-details {
h2 {
font-family: 'Open Sans';
font-weight: 600;
margin-bottom: 0.3em;
font-variant: small-caps;
}
dl {
margin-top: 0.3em;
}
dt {
font-family: 'Open Sans';
font-weight: 600;
}
dd {
margin-left: 0;
}
// a.sc-button {
/* background-color: $black;
padding-top: 0.2em;
padding-bottom: 0.2em;
}*/
}
/* custom fields on the home page */
div.custom-fields {
figure.person-details {
display: flex;
flex-flow: row wrap;
div.cf_title_box:nth-child(4n+1) h2 {
@extend .chill-red;
}
div.cf_title_box:nth-child(4n+2) h2 {
@extend .chill-green;
}
div.cf_title_box:nth-child(4n+3) h2 {
@extend .chill-orange;
}
div.cf_title_box:nth-child(4n+4) h2 {
@extend .chill-blue;
}
div.cf_title_box:nth-child(2n+1){
width: 50%;
margin-right: 40px;
}
iv.cf_title_box:nth-child(2n+2) {
width: calc(50% - 40px);
}
}
}
}
/*
* HOUSEHOLD
*/
div.household__address, div.person__address {
div.row {
height: 100px;
width: 100%;
position: relative;
& > div {
position: absolute;
display: table;
height: 100%;
border: 1px dotted #c3c3c3;
}
div.household__address--date, div.person__address--date {
width: 30%;
background-color: #c3c3c3;
height: 100%;
div.cell {
box-sizing: border-box;
position: relative;
height: 100%;
width: 100%;
margin-left: 50%;
div.pill {
position: absolute;
box-sizing: border-box;
width: 120px;
height: 40px;
bottom: -20px;
background-color: white;
padding: 10px;
border-radius: 30px;
left: -60px;
text-align: center;
z-index: 10;
}
}
}
div.household__address--content, div.person__address--content {
width: 70%;
left: 30%;
text-align: left;
background-color: #ececec;
border: 1px solid #888;
div.cell {
display: table-cell;
padding: 5px 30px;
vertical-align: middle;
& > div {
display: flex;
justify-content: space-between;
}
i.dot::before, i.dot::after {
position: absolute;
width: 20px;
height: 20px;
content: '';
border: 0;
background-color: white;
border-radius: 50%;
border: 5px solid #c3c3c3;
z-index: 10;
left: -15px;
bottom: -15px;
}
}
}
}
}
div.household__address-move {
div.household__address-move__create {
display: flex;
flex-direction: column;
}
}

View File

@@ -57,12 +57,6 @@ export default {
position: relative;
&:before {
position: absolute;
/*
content: "\f192"; //circle-dot
content: "\f1dd"; //paragraph
content: "\f292"; //hashtag
content: "\f069"; //asterisk
*/
content: "\f142"; //ellipsis-v
font-family: "ForkAwesome";
color: #718596ab;
@@ -71,7 +65,7 @@ export default {
}
a[name^="section"] {
position: absolute;
top: -3.5em; // ref. stickNav
top: -3.5em; // reference for stickNav
}
}
padding: 0.8em 0em;
@@ -80,18 +74,6 @@ export default {
border-radius: 5px;
border-left: 1px dotted #718596ab;
border-right: 1px dotted #718596ab;
/* debug components
position: relative;
&:before {
content: "vuejs component";
position: absolute;
left: 1.5em;
top: -0.9em;
background-color: white;
color: grey;
padding: 0 0.3em;
}
*/
dd {
margin-left: 1em;
}

View File

@@ -9,7 +9,7 @@ const personMessages = {
item: {
type_person: "Usager",
type_user: "TMS",
type_thirdparty: "Tiers",
type_thirdparty: "Tiers professionnel",
type_household: "Ménage"
},
person: {

View File

@@ -25,68 +25,84 @@
{% block personcontent %}
<h1>{{ 'Addresses\'history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}</h1>
<div class="person__address">
<div class="row">
<div class="person__address--date"></div>
<div class="person__address--content">
<div class="cell">
<div>
{% if person.addresses|length == 0 %}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
{% endif %}
<a class="sc-button bt-create"
href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
{{ 'Add an address'|trans }}
</a>
</div>
</div>
</div>
</div>
<div class="address-timeline grid">
{% if person.addresses|length == 0 %}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
{% else %}
<div class="top"><i class="fa fa-caret-up fa-3x"></i></div>
{% endif %}
{% for address in person.addresses %}
<div class="row">
<div class="person__address--date">
<div class="cell">
<div class="pill">
{% if address.validFrom is not empty %}
{{ address.validFrom|format_date('long') }}
{% endif %}
</div>
</div>
</div>
<div class="person__address--content">
<div class="cell">
<i class="dot"></i>
<div>
{% if address.isNoAddress == true %}
{# if person address #}
<div class="col-a content{{ ' row' ~ loop.index }}">
<div class="address">
{% if address.isNoAddress == true %}
<div class="chill_address_is_noaddress">{{ 'address.consider homeless'|trans }}</div>
{% else %}
<div>
{% if address.street is not empty %}
<div class="street">
<i class="fa fa-fw fa-map-marker"></i>
<span class="streetNumber">{{ address.street }}</span>
{% if address.streetNumber is not empty %}
<span class="streetNumber">, {{ address.streetNumber }}</span>
{% endif %}
</div>
{% endif %}
{% if address.postCode is not empty %}
<div class="postCode">
<span>{{ address.postCode.code }}</span> <span>{{ address.postCode.name }}</span>
<span class="country">({{ address.postCode.country.name|localize_translatable_string }})</span>
</div>
{% else %}
{% if address.street is not empty %}
<div class="street">
<span class="streetNumber">{{ address.street }}</span>
{% if address.streetNumber is not empty %}
<span class="streetNumber">, {{ address.streetNumber }}</span>
{% endif %}
</div>
{% endif %}
<a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : address.id } ) }}" class="sc-button bt-edit"></a>
</div>
{% if address.postCode is not empty %}
<div class="postCode">
<span>{{ address.postCode.code }}</span> <span>{{ address.postCode.name }}</span>
<span class="country">({{ address.postCode.country.name|localize_translatable_string }})</span>
</div>
{% endif %}
{% endif %}
<ul class="record_actions">
<li>
<a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : address.id } ) }}" class="sc-button bt-edit"></a>
</li>
</ul>
</div>
</div>
</div>
{# endif #}
<div class="col-b"></div>
{# if household address #}{#
<div class="col-c content rowXX">
<div class="address">...</div>
</div>
#}{# endif #}
<div class="date">
{% if address.validFrom is not empty %}
{{ address.validFrom|format_date('long') }}
{% endif %}
</div>
{% endfor %}
{# TEST HOUSEHOLD POSITION
#}
<div class="col-b"></div>
<div class="col-c content fake">
<div class="address">
<div class="street">
<span class="streetNumber">549, chemin De Sousa</span>
<span class="streetNumber">, 45, boulevard Aurore Roux</span>
</div>
<div class="postCode">
<span>10850</span> <span>Nanterre</span> <span class="country">(France)</span>
</div>
<ul class="record_actions"><li><a href="" class="sc-button bt-edit"></a></li></ul>
</div>
</div>
<div class="date">01 janvier 1970</div>
</div>
<ul class="record_actions">
@@ -95,7 +111,12 @@
{{ 'Back to the person details'|trans }}
</a>
</li>
<li>
<a class="sc-button bt-create"
href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
{{ 'Add an address'|trans }}
</a>
</li>
</ul>
{% endblock personcontent %}

View File

@@ -4,67 +4,66 @@
{% block content %}
<h1>{{ block('title') }}</h1>
<div class="household">
<div class="household__address">
<div class="address-timeline grid">
<div class="row">
<div class="household__address--date"></div>
<div class="household__address--content">
<div class="cell">
<a class="sc-button bt-create"
href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
{{ 'Move household'|trans }}
</a>
</div>
</div>
</div>
{% if household.addresses|length == 0 %}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
{% else %}
<div class="top"><i class="fa fa-caret-up fa-3x"></i></div>
{% endif %}
{% for address in household.addresses %}
{% for address in household.addresses %}
<div class="row">
<div class="household__address--date">
<div class="cell">
<div class="pill">
{% if address.validFrom is not empty %}
{{ address.validFrom|format_date('long') }}
{% endif %}
</div>
</div>
</div>
<div class="household__address--content">
<div class="cell">
<i class="dot"></i>
<div>
{% if address.isNoAddress == true %}
<div class="chill_address_is_noaddress">{{ 'address.consider homeless'|trans }}</div>
{% else %}
<div>
{% if address.street is not empty %}
<div class="street">
<i class="fa fa-fw fa-map-marker"></i>
<span class="streetNumber">{{ address.street }}</span>
{% if address.streetNumber is not empty %}
<span class="streetNumber">, {{ address.streetNumber }}</span>
{% endif %}
</div>
{% endif %}
{% if address.postCode is not empty %}
<div class="postCode">
<span>{{ address.postCode.code }}</span> <span>{{ address.postCode.name }}</span>
<span class="country">({{ address.postCode.country.name|localize_translatable_string }})</span>
</div>
{% endif %}
</div>
<div class="col-b"></div>
<div class="col-c content{{ ' row' ~ loop.index }}">
<div class="address">
{% if address.isNoAddress == true %}
<div class="chill_address_is_noaddress">{{ 'address.consider homeless'|trans }}</div>
{% else %}
{% if address.street is not empty %}
<div class="street">
<span class="streetNumber">{{ address.street }}</span>
{% if address.streetNumber is not empty %}
<span class="streetNumber">, {{ address.streetNumber }}</span>
{% endif %}
<a href="{{ path('chill_person_household_address_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}" class="sc-button bt-edit"></a>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% if address.postCode is not empty %}
<div class="postCode">
<span>{{ address.postCode.code }}</span> <span>{{ address.postCode.name }}</span>
<span class="country">({{ address.postCode.country.name|localize_translatable_string }})</span>
</div>
{% endif %}
{% endif %}
</div>
<ul class="record_actions">
<li>
<a href="{{ path('chill_person_household_address_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}" class="sc-button bt-edit"></a>
</li>
</ul>
</div>
<div class="date">
{% if address.validFrom is not empty %}
{{ address.validFrom|format_date('long') }}
{% endif %}
</div>
{% endfor %}
</div>
<ul class="record_actions">
<li>
<a class="sc-button bt-create"
href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
{{ 'Move household'|trans }}
</a>
</li>
</ul>
{% endblock %}

View File

@@ -1,5 +1,5 @@
<div class="subheader banner-household">
<div class="grid-12 parent" id="header-accompanying_course-name" >
<div class="grid-12 parent" id="header-household-name" >
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
<div class="grid-6">{% set title = title %}
@@ -25,7 +25,7 @@
</div>
</div>
<div class="grid-12 parent" id="header-accompanying_course-details" >
<div class="grid-12 parent" id="header-household-details" >
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
<div id="banner-misc">
{%- set members = household.getCurrentMembersOrdered() -%}

View File

@@ -95,25 +95,17 @@
<ul class="record_actions">
<li>
<a
href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
class="sc-button bt-edit"
/>
{{ 'household.Update membership'|trans }}
href="{{ chill_path_add_return_path('chill_person_household_members_editor', {
'persons': [ m.person.id ],
'allow_leave_without_household': true
} ) }}" class="sc-button" title="{{ 'household.Leave household'|trans }}" />
<i class="fa fa-sign-out"></i>
{{ 'household.Leave household'|trans }}
</a>
</li>
<li>
<a
href="{{ chill_path_add_return_path(
'chill_person_household_members_editor',
{
'persons': [ m.person.id ],
'allow_leave_without_household': true
} ) }}"
class="sc-button"
/>
<i class="fa fa-sign-out"></i>
{{ 'household.Leave'|trans }}
</a>
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
class="sc-button bt-edit" title="{{ 'household.Update membership'|trans }}"/></a>
</li>
</ul>
</div>
@@ -168,10 +160,7 @@
<li>
<a
href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
class="sc-button bt-edit"
/>
{{ 'household.Update membership'|trans }}
</a>
class="sc-button bt-edit" title="{{ 'household.Update membership'|trans }}" /></a>
</li>
</ul>
</div>

View File

@@ -8,7 +8,6 @@ module.exports = function(encore, entries)
ChillPersonAssets: __dirname + '/Resources/public'
});
encore.addEntry('accompanying_course', __dirname + '/Resources/public/vuejs/AccompanyingCourse/index.js');
encore.addEntry('household_address', __dirname + '/Resources/public/vuejs/HouseholdAddress/index.js');
encore.addEntry('household_members_editor', __dirname + '/Resources/public/vuejs/HouseholdMembersEditor/index.js');
encore.addEntry('vue_accourse', __dirname + '/Resources/public/vuejs/AccompanyingCourse/index.js');

View File

@@ -21,7 +21,8 @@ household:
}
Those members does not share address: Ces usagers ne partagent pas l'adresse du ménage.
Any persons into this position: Aucune personne n'appartient au ménage à cette position.
Leave: Quitter le ménage
Leave household: Quitter le ménage
Leave: Quitter
Join: Rejoindre un ménage
Change position: Repositionner
Household file: Dossier ménage
@@ -35,7 +36,7 @@ household:
is not holder: N'est pas titulaire
holder: Titulaire
Edit member household: Modifier l'appartenance au ménage
Current household members: Membres actuels du ménage
Current household members: Membres actuels
Household summary: Résumé
Addresses: Adresses
Current address: Adresse actuelle
@@ -64,4 +65,3 @@ household:
from: Depuis
to: Jusqu'au
person history: Ménages