mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Merge conflicts fixed
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
export const lightGreen = '#43b29d';
|
||||
export const darkGreen = '#368e7e';
|
||||
export const lightBrown = '#a2ac80';
|
||||
export const darkBrown = '#929d69';
|
||||
export const lightBlue = '#8d9dab';
|
||||
export const darkBlue = '#718596';
|
@@ -2,6 +2,7 @@ import { createStore } from 'vuex'
|
||||
import { getHouseholdByPerson, getCoursesByPerson, getRelationshipsByPerson } from './api'
|
||||
import { getHouseholdLabel, getHouseholdWidth, getRelationshipLabel, getRelationshipTitle, getRelationshipDirection, splitId, getGender, getAge } from './vis-network'
|
||||
import {visMessages} from "./i18n";
|
||||
import { darkBlue, darkBrown, darkGreen, lightBlue, lightBrown, lightGreen } from './colors';
|
||||
|
||||
const debug = process.env.NODE_ENV !== 'production'
|
||||
|
||||
@@ -172,8 +173,8 @@ const store = createStore({
|
||||
id: 'relationship_' + splitId(link.id,'id')
|
||||
+ '-person_' + link.fromPerson.id + '-person_' + link.toPerson.id,
|
||||
arrows: getRelationshipDirection(link),
|
||||
color: 'lightblue',
|
||||
font: { color: '#33839d' },
|
||||
color: lightGreen,
|
||||
font: { color: darkGreen },
|
||||
dashes: true,
|
||||
label: getRelationshipLabel(link),
|
||||
title: getRelationshipTitle(link),
|
||||
@@ -316,10 +317,10 @@ const store = createStore({
|
||||
to: `${household.id}`,
|
||||
id: `${household.id}-person_${m.person.id}`,
|
||||
arrows: 'from',
|
||||
color: 'pink',
|
||||
font: { color: '#D04A60' },
|
||||
color: lightBrown,
|
||||
font: { color: darkBrown },
|
||||
dashes: (getHouseholdWidth(m) === 1)? [0,4] : false, //edge style: [dash, gap, dash, gap]
|
||||
label: getHouseholdLabel(m),
|
||||
//label: getHouseholdLabel(m),
|
||||
width: getHouseholdWidth(m),
|
||||
})
|
||||
if (!getters.isPersonLoaded(m.person.id)) {
|
||||
@@ -375,8 +376,8 @@ const store = createStore({
|
||||
to: `${course.id}`,
|
||||
id: `accompanying_period_${splitId(course.id,'id')}-person_${p.person.id}`,
|
||||
arrows: 'from',
|
||||
color: 'orange',
|
||||
font: { color: 'darkorange' },
|
||||
color: lightBlue,
|
||||
font: { color: darkBlue },
|
||||
})
|
||||
if (!getters.isPersonLoaded(p.person.id)) {
|
||||
dispatch('addMissingPerson', [p.person, course])
|
||||
@@ -428,8 +429,8 @@ const store = createStore({
|
||||
id: 'relationship_' + splitId(relationship.id,'id')
|
||||
+ '-person_' + relationship.fromPerson.id + '-person_' + relationship.toPerson.id,
|
||||
arrows: getRelationshipDirection(relationship),
|
||||
color: 'lightblue',
|
||||
font: { color: '#33839d' },
|
||||
color: lightGreen,
|
||||
font: { color: darkGreen },
|
||||
dashes: true,
|
||||
label: getRelationshipLabel(relationship),
|
||||
title: getRelationshipTitle(relationship),
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { visMessages } from './i18n'
|
||||
import { darkGreen, lightBlue, lightBrown, lightGreen } from './colors';
|
||||
import { visMessages } from './i18n';
|
||||
|
||||
/**
|
||||
* Vis-network initial data/configuration script
|
||||
@@ -15,12 +16,12 @@ window.options = {
|
||||
/*
|
||||
*/
|
||||
configure: {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
filter: 'physics',
|
||||
showButton: true
|
||||
},
|
||||
physics: {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
barnesHut: {
|
||||
theta: 0.5,
|
||||
gravitationalConstant: -2000,
|
||||
@@ -89,7 +90,7 @@ window.options = {
|
||||
edges: {
|
||||
font: {
|
||||
color: '#b0b0b0',
|
||||
size: 9,
|
||||
size: 14,
|
||||
face: 'arial',
|
||||
background: 'none',
|
||||
strokeWidth: 2, // px
|
||||
@@ -112,30 +113,30 @@ window.options = {
|
||||
},
|
||||
color: {
|
||||
border: '#b0b0b0',
|
||||
background: 'rgb(193,229,222)',
|
||||
background: lightGreen,
|
||||
highlight: {
|
||||
border: '#89c9a9',
|
||||
background: 'rgb(156,213,203)'
|
||||
border: '#216458',
|
||||
background: darkGreen,
|
||||
},
|
||||
hover: {
|
||||
border: '#89c9a9',
|
||||
background: 'rgb(156,213,203)'
|
||||
border: '#216458',
|
||||
background: darkGreen,
|
||||
}
|
||||
},
|
||||
opacity: 0.85,
|
||||
opacity: 0.9,
|
||||
shadow:{
|
||||
enabled: true,
|
||||
color: 'rgba(0,0,0,0.5)',
|
||||
size:10,
|
||||
x:5,
|
||||
y:5
|
||||
y:5,
|
||||
},
|
||||
},
|
||||
household: {
|
||||
color: 'pink'
|
||||
color: lightBrown,
|
||||
},
|
||||
accompanying_period: {
|
||||
color: 'orange',
|
||||
color: lightBlue,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@@ -151,14 +151,14 @@
|
||||
{% if accompanyingCourse.requestorPerson is not null %}
|
||||
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
|
||||
{% if accompanyingCourse.requestorAnonymous %}
|
||||
<div class="confidential"><p class="blur">{{ _self.insert_onthefly('person', accompanyingCourse.requestorPerson) }}</p></div>
|
||||
<div class="confidential"><p>{{ _self.insert_onthefly('person', accompanyingCourse.requestorPerson) }}</p></div>
|
||||
{% else %}
|
||||
{{ _self.insert_onthefly('person', accompanyingCourse.requestorPerson) }}
|
||||
{% endif %}
|
||||
{% elseif accompanyingCourse.requestorThirdParty is not null %}
|
||||
<h4 class="item-key">{{ 'Requestor'|trans }}</h4>
|
||||
{% if accompanyingCourse.requestorAnonymous %}
|
||||
<div class="confidential"><p class="blur">{{ _self.insert_onthefly('thirdparty', accompanyingCourse.requestorThirdParty) }}</p></div>
|
||||
<div class="confidential"><p>{{ _self.insert_onthefly('thirdparty', accompanyingCourse.requestorThirdParty) }}</p></div>
|
||||
{% else %}
|
||||
{{ _self.insert_onthefly('thirdparty', accompanyingCourse.requestorThirdParty) }}
|
||||
{% endif %}
|
||||
|
@@ -0,0 +1,37 @@
|
||||
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
{{ form_row(form.startDate) }}
|
||||
{{ form_row(form.endDate) }}
|
||||
|
||||
{% if form.hostPerson is defined %}
|
||||
{{ form_row(form.hostPerson) }}
|
||||
{% endif %}
|
||||
|
||||
{% if form.hostThirdParty is defined %}
|
||||
{{ form_row(form.hostThirdParty) }}
|
||||
{% endif %}
|
||||
|
||||
{% if form.address is defined %}
|
||||
{{ form_row(form.address) }}
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('mod_input_address') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('mod_input_address') }}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.comment) }}
|
||||
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li>
|
||||
<button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
@@ -0,0 +1,58 @@
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = '' %}
|
||||
|
||||
{% block title %}{{ 'Delete residential address'|trans }}{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="address-new">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
{% set a = residentialAddress %}
|
||||
<ul class="list-content fa-ul">
|
||||
{% if a.hostPerson is not null %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-home"></i>
|
||||
<span class="item-key">{{ "Address of"|trans}} </span>
|
||||
<span class="chill-entity entity-person badge-person">{{ a.hostPerson|chill_entity_render_box }}</span>
|
||||
</li>
|
||||
<li>
|
||||
{% set address_date = date(a.startDate|date("m/d/Y")) %}
|
||||
{% if a.hostPerson.getCurrentHouseholdAddress(a.endDate) is not null %}
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{{ a.hostPerson.getCurrentHouseholdAddress(a.endDate)|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% elseif a.hostThirdParty is not null %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-home"></i>
|
||||
<span class="item-key">{{ "Address of"|trans}}</span>
|
||||
<span class="chill-entity entity-person badge-person">{{ a.hostThirdParty|chill_entity_render_box }}</span>
|
||||
</li>
|
||||
<li>
|
||||
{% if a.hostThirdParty.address is not null %}
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{{ a.hostThirdParty.address|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
{% if a.address is not null %}
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{{ a.address|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ include('@ChillMain/Util/confirmation_template.html.twig',
|
||||
{
|
||||
'title' : 'Delete residential address ?'|trans,
|
||||
'confirm_question' : 'Are you sure you want to remove this residential address for %name% ?'|trans({'%name%': person|chill_entity_render_string }),
|
||||
'cancel_route' : 'chill_person_residential_address_list',
|
||||
'cancel_parameters' : {'id' : person.Id},
|
||||
'form' : delete_form
|
||||
} ) }}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
@@ -0,0 +1,51 @@
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = '' %}
|
||||
|
||||
{% block title 'Edit a residential address'|trans %}
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="address-edit">
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
{{ form_row(form.startDate) }}
|
||||
{{ form_row(form.endDate) }}
|
||||
|
||||
{% if residentialAddress.address is not null %}
|
||||
|
||||
{% if form.address is defined %}
|
||||
{{ form_row(form.address) }}
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('mod_input_address') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('mod_input_address') }}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.comment) }}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ chill_path_add_return_path('chill_person_residential_address_list', {'id': person.id}) }}" class="btn btn-cancel">
|
||||
{{ 'Cancel'|trans|chill_return_path_label }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
@@ -0,0 +1,116 @@
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = '' %}
|
||||
|
||||
{% block title %}{{ 'Residential addresses history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="person-address">
|
||||
|
||||
<h1>{{ 'Residential addresses history'|trans }}</h1>
|
||||
|
||||
{% if is_granted('CHILL_PERSON_SEE', person) %}
|
||||
|
||||
{% if addresses|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
|
||||
{% else %}
|
||||
<div class="flex-table">
|
||||
{% for a in addresses %}
|
||||
|
||||
{% if a.address is not null %}
|
||||
{% set kind = 'address' %}
|
||||
{% else %}
|
||||
{% set kind = null %}
|
||||
{% endif %}
|
||||
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
|
||||
<div class="item-col" style="width: 33%;">
|
||||
<ul class="list-unstyled h3">
|
||||
{% if a.endDate is not null %}
|
||||
<li><span class="item-key">{{'Since'|trans}} : </span>{{ a.startDate|format_date('long') }}</li>
|
||||
{% endif %}
|
||||
<li><span class="item-key">{{'Until'|trans}} : </span><b>{{ a.endDate|format_date('long') }}</b></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="item-col flex-column justify-content-start">
|
||||
<div class="float-button top">
|
||||
<div class="box">
|
||||
<div class="action">
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
<a href="{{ path('chill_person_residential_address_edit', { 'id' : a.id, 'kind' : kind } ) }}" class="btn btn-update" title="{{ 'Update'|trans|e('html_attr') }}"></a>
|
||||
<a href="{{ path('chill_person_residential_address_delete', { 'id' : a.id, 'kind' : kind } ) }}" class="btn btn-delete" title="{{ 'Delete'|trans|e('html_attr') }}"></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<ul class="list-content fa-ul">
|
||||
{% if a.hostPerson is not null %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-home"></i>
|
||||
<span class="item-key">{{ "Address of"|trans}} </span>
|
||||
<span class="chill-entity entity-person badge-person">{{ a.hostPerson|chill_entity_render_box }}</span>
|
||||
</li>
|
||||
<li>
|
||||
{% set address_date = date(a.startDate|date("m/d/Y")) %}
|
||||
{% if a.hostPerson.getCurrentHouseholdAddress(a.endDate) is not null %}
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{{ a.hostPerson.getCurrentHouseholdAddress(a.endDate)|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% elseif a.hostThirdParty is not null %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-home"></i>
|
||||
<span class="item-key">{{ "Address of"|trans}}</span>
|
||||
<span class="chill-entity entity-person badge-person">{{ a.hostThirdParty|chill_entity_render_box }}</span>
|
||||
</li>
|
||||
<li>
|
||||
{% if a.hostThirdParty.address is not null %}
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{{ a.hostThirdParty.address|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
{% if a.address is not null %}
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{{ a.address|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="item-row">
|
||||
{% if not a.comment.isEmpty %}
|
||||
{{ a.comment|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_person_view', { 'person_id' : person.id } ) }}" class="btn btn-cancel">
|
||||
{{ 'Back to the person details'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
<li>
|
||||
<a class="btn btn-create"
|
||||
href="{{ path('chill_person_residential_address_new', { 'id' : person.id } ) }}">
|
||||
{{ 'Add a residential address'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
@@ -0,0 +1,29 @@
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = '' %}
|
||||
|
||||
{% block title %}{{ 'New residential address'|trans }}{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="address-new">
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{# TODO #}
|
||||
{% block form %}
|
||||
{% include '@ChillPerson/ResidentialAddress/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('mod_pickentity_type') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('mod_pickentity_type') }}
|
||||
{% endblock %}
|
@@ -0,0 +1,49 @@
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% block title 'Which kind of residential address would you create ?'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-10 centered">
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div class="container" style="margin-top: 2rem;">
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-4">
|
||||
<a
|
||||
href="{{ chill_path_forward_return_path('chill_person_residential_address_new', {'id': person.id, 'kind': 'person'}) }}"
|
||||
class="btn btn-outline-chill-green-dark">
|
||||
{{ 'The address of another person'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<p>{{ 'residential_address_person_explanation'|trans }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-4">
|
||||
<a
|
||||
href="{{ chill_path_forward_return_path('chill_person_residential_address_new', {'id': person.id, 'kind': 'thirdparty'}) }}"
|
||||
class="btn btn-outline-chill-green-dark">
|
||||
{{ 'The address of a third party'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<p>{{ 'residential_address_third_party_explanation'|trans }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-4">
|
||||
<a
|
||||
href="{{ chill_path_forward_return_path('chill_person_residential_address_new', {'id': person.id, 'kind': 'address'}) }}"
|
||||
class="btn btn-outline-chill-green-dark">
|
||||
{{ 'A new address'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<p>{{ 'residential_address_new_address_explanation'|trans }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user