mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
addresses: person address history
This commit is contained in:
parent
f3a7556bca
commit
c378f59f5a
@ -47,7 +47,7 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (address.selected.address.point !== undefined){
|
if (address.selected.address.point !== undefined){
|
||||||
createdAddress = Object.assign(createdAddress, {
|
newAddress = Object.assign(newAddress, {
|
||||||
'point': address.selected.address.point.coordinates
|
'point': address.selected.address.point.coordinates
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -57,7 +57,7 @@ export default {
|
|||||||
newPostalCode = Object.assign(newPostalCode, {
|
newPostalCode = Object.assign(newPostalCode, {
|
||||||
'country': {'id': address.selected.country.id },
|
'country': {'id': address.selected.country.id },
|
||||||
});
|
});
|
||||||
createdAddress = Object.assign(createdAddress, {
|
newAddress = Object.assign(newAddress, {
|
||||||
'newPostalCode': newPostalCode
|
'newPostalCode': newPostalCode
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -92,8 +92,8 @@ div.person-view {
|
|||||||
* HOUSEHOLD
|
* HOUSEHOLD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
div.household {
|
|
||||||
div.household__address {
|
div.household__address, div.person__address {
|
||||||
div.row {
|
div.row {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -104,7 +104,7 @@ div.household {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
border: 1px dotted #c3c3c3;
|
border: 1px dotted #c3c3c3;
|
||||||
}
|
}
|
||||||
div.household__address--date {
|
div.household__address--date, div.person__address--date {
|
||||||
width: 30%;
|
width: 30%;
|
||||||
background-color: #c3c3c3;
|
background-color: #c3c3c3;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -129,7 +129,7 @@ div.household {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div.household__address--content {
|
div.household__address--content, div.person__address--content {
|
||||||
width: 70%;
|
width: 70%;
|
||||||
left: 30%;
|
left: 30%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@ -139,6 +139,10 @@ div.household {
|
|||||||
display: table-cell;
|
display: table-cell;
|
||||||
padding: 5px 30px;
|
padding: 5px 30px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
& > div {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
i.dot::before, i.dot::after {
|
i.dot::before, i.dot::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
@ -155,12 +159,10 @@ div.household {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div.household__address-move {
|
div.household__address-move {
|
||||||
div.household__address-move__create {
|
div.household__address-move__create {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,51 +26,68 @@
|
|||||||
|
|
||||||
<h1>{{ 'Addresses\'history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}</h1>
|
<h1>{{ 'Addresses\'history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}</h1>
|
||||||
|
|
||||||
<table class="records_list">
|
<div class="person__address">
|
||||||
<thead>
|
|
||||||
<tr>
|
<div class="row">
|
||||||
<th>{{ 'Valid from'|trans }}</th>
|
<div class="person__address--date"></div>
|
||||||
<th>{{ 'Address'|trans }}</th>
|
<div class="person__address--content">
|
||||||
<th> </th>
|
<div class="cell">
|
||||||
</tr>
|
<div>
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% if person.addresses|length == 0 %}
|
{% if person.addresses|length == 0 %}
|
||||||
<tr>
|
|
||||||
<td colspan="3">
|
|
||||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||||
<a href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
|
{% endif %}
|
||||||
|
<a class="sc-button bt-create"
|
||||||
|
href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
|
||||||
{{ 'Add an address'|trans }}
|
{{ 'Add an address'|trans }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
{% else %}
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% for address in person.addresses %}
|
{% for address in person.addresses %}
|
||||||
<tr>
|
<div class="row">
|
||||||
<td><strong>{{ 'Since %date%'|trans( { '%date%' : address.validFrom|format_date('long') } ) }}</strong></td>
|
<div class="person__address--date">
|
||||||
|
<div class="cell">
|
||||||
<td>
|
<div class="pill">
|
||||||
{{ address_macros._render(address, { 'with_valid_from' : false, 'has_no_address': true } ) }}
|
{% if address.validFrom is not empty %}
|
||||||
</td>
|
{{ address.validFrom|format_date('long') }}
|
||||||
|
|
||||||
<td>
|
|
||||||
<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>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tbody>
|
</div>
|
||||||
</table>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="person__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>
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : address.id } ) }}" class="sc-button bt-edit"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li class="cancel">
|
<li class="cancel">
|
||||||
@ -78,12 +95,7 @@
|
|||||||
{{ 'Back to the person details'|trans }}
|
{{ 'Back to the person details'|trans }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
|
|
||||||
<a href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}" class="sc-button bt-create">
|
|
||||||
{{ 'Add an address'|trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
{% endblock personcontent %}
|
{% endblock personcontent %}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="household__address--date"></div>
|
<div class="household__address--date"></div>
|
||||||
<div class="household__address--content">
|
<div class="household__address--content">
|
||||||
<div class="cell">
|
<div class="cell">
|
||||||
<a class="sc-button bt-update"
|
<a class="sc-button bt-create"
|
||||||
href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
|
href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
|
||||||
{{ 'Move household'|trans }}
|
{{ 'Move household'|trans }}
|
||||||
</a>
|
</a>
|
||||||
@ -34,9 +34,11 @@
|
|||||||
<div class="household__address--content">
|
<div class="household__address--content">
|
||||||
<div class="cell">
|
<div class="cell">
|
||||||
<i class="dot"></i>
|
<i class="dot"></i>
|
||||||
|
<div>
|
||||||
{% if address.isNoAddress == true %}
|
{% if address.isNoAddress == true %}
|
||||||
<div class="chill_address_is_noaddress">{{ 'address.consider homeless'|trans }}</div>
|
<div class="chill_address_is_noaddress">{{ 'address.consider homeless'|trans }}</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
<div>
|
||||||
{% if address.street is not empty %}
|
{% if address.street is not empty %}
|
||||||
<div class="street">
|
<div class="street">
|
||||||
<i class="fa fa-fw fa-map-marker"></i>
|
<i class="fa fa-fw fa-map-marker"></i>
|
||||||
@ -52,10 +54,12 @@
|
|||||||
<span class="country">({{ address.postCode.country.name|localize_translatable_string }})</span>
|
<span class="country">({{ address.postCode.country.name|localize_translatable_string }})</span>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user