mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 01:25:00 +00:00
Compare commits
70 Commits
fixtures/f
...
ameliorati
Author | SHA1 | Date | |
---|---|---|---|
1e996ce230 | |||
4ee67869bd | |||
8bcd69c5ec | |||
badf632a8a | |||
7363092d51 | |||
698514ef12 | |||
55c34c2583 | |||
3e27589cca | |||
52469d995a | |||
b4234ddc58 | |||
bb471fd4af | |||
fdd08905a8 | |||
755812ae3c | |||
3602b0d097 | |||
5dc92ed5bd | |||
d61dbaed91 | |||
9ac72a21d1 | |||
fd8f4a98c0 | |||
2394895ccb | |||
6ca35d5a18 | |||
6253927e2e | |||
0f87d77896 | |||
8b50e5bd62 | |||
f490fdd37c | |||
7ffdf4cb1f | |||
801e897a38 | |||
21db8674e7 | |||
de7322464b | |||
90cfcd0569 | |||
4a0ffd2cba | |||
3e9d96368d | |||
227d627ad5 | |||
c7a2bbfc1d | |||
1aa77bd1c4 | |||
39e8af48b4 | |||
9a1f56a820 | |||
d652771af0 | |||
9d655d92f2 | |||
9e51717984 | |||
a6b360c193 | |||
42b9e25403 | |||
403922c631 | |||
53fe90adc3 | |||
41fe95c80f | |||
28435940f1 | |||
34e1a9b748 | |||
097ad3a364 | |||
816d860f4a | |||
c7cc2c7596 | |||
6ad8a73fc0 | |||
eac4c48d8f | |||
7af85bc401 | |||
1a6c0529cc | |||
77fe497994 | |||
b89a66b20c | |||
438134690f | |||
166144e57e | |||
6bb5440220 | |||
c48586cd0e | |||
21fd69488f | |||
4eef8492b1 | |||
5d1d6c83a9 | |||
a559589883 | |||
587da94645 | |||
3f9e215ea5 | |||
732390f704 | |||
25b00296ca | |||
1e626d573f | |||
3ee676600e | |||
d2c631ae20 |
@@ -54,7 +54,7 @@
|
|||||||
{{ form_row(edit_form.date) }}
|
{{ form_row(edit_form.date) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
.. location
|
{# TODO .. location #}
|
||||||
|
|
||||||
{%- if edit_form.durationTime is defined -%}
|
{%- if edit_form.durationTime is defined -%}
|
||||||
{{ form_row(edit_form.durationTime) }}
|
{{ form_row(edit_form.durationTime) }}
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{%- if edit_form.comment is defined -%}
|
{%- if edit_form.comment is defined -%}
|
||||||
.. public and private
|
{# TODO .. public and private #}
|
||||||
{{ form_row(edit_form.comment) }}
|
{{ form_row(edit_form.comment) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
{{ form_row(edit_form.attendee) }}
|
{{ form_row(edit_form.attendee) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
.. status
|
{# TODO .. status #}
|
||||||
|
|
||||||
{% set person_id = null %}
|
{% set person_id = null %}
|
||||||
{% if entity.person %}
|
{% if entity.person %}
|
||||||
|
@@ -55,7 +55,7 @@
|
|||||||
{{ form_row(form.date) }}
|
{{ form_row(form.date) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
.. location
|
{# TODO .. location #}
|
||||||
|
|
||||||
{%- if form.durationTime is defined -%}
|
{%- if form.durationTime is defined -%}
|
||||||
{{ form_row(form.durationTime) }}
|
{{ form_row(form.durationTime) }}
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{%- if form.comment is defined -%}
|
{%- if form.comment is defined -%}
|
||||||
.. public and private
|
{# TODO .. public and private #}
|
||||||
{{ form_row(form.comment) }}
|
{{ form_row(form.comment) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@@ -78,13 +78,13 @@
|
|||||||
{{ form_row(form.attendee) }}
|
{{ form_row(form.attendee) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
.. status
|
{# TODO .. status #}
|
||||||
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
<ul class="record_actions sticky-form-buttons">
|
||||||
<li class="cancel">
|
<li class="cancel">
|
||||||
<a
|
<a
|
||||||
class="btn btn-cancel"
|
class="btn btn-cancel"
|
||||||
{%- if context == 'person' -%}
|
{%- if context == 'person' -%}
|
||||||
href="{{ chill_return_path_or('chill_activity_activity_list', { 'person_id': person.id } )}}"
|
href="{{ chill_return_path_or('chill_activity_activity_list', { 'person_id': person.id } )}}"
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
href="{{ chill_return_path_or('chill_activity_activity_list', { 'accompanying_period_id': accompanyingCourse.id } )}}"
|
href="{{ chill_return_path_or('chill_activity_activity_list', { 'accompanying_period_id': accompanyingCourse.id } )}}"
|
||||||
|
@@ -81,9 +81,9 @@ activity:
|
|||||||
'%user% has done an %activity_type%': '%user% a effectué une activité de type "%activity_type%"'
|
'%user% has done an %activity_type%': '%user% a effectué une activité de type "%activity_type%"'
|
||||||
|
|
||||||
#controller
|
#controller
|
||||||
'Success : activity created!': Bravo ! L'activité a été créée.
|
'Success : activity created!': L'activité a été créée.
|
||||||
'The form is not valid. The activity has not been created !': Le formulaire est invalide. L'activité n'a pas été créée.
|
'The form is not valid. The activity has not been created !': Le formulaire est invalide. L'activité n'a pas été créée.
|
||||||
'Success : activity updated!': Bravo ! L'activité a été mise à jour.
|
'Success : activity updated!': L'activité a été mise à jour.
|
||||||
'The form is not valid. The activity has not been updated !': Le formulaire est invalide. L'activité n'a pas été mise à jour.
|
'The form is not valid. The activity has not been updated !': Le formulaire est invalide. L'activité n'a pas été mise à jour.
|
||||||
|
|
||||||
# ROLES
|
# ROLES
|
||||||
|
@@ -17,15 +17,19 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||||
use Symfony\Component\Form\FormEvent;
|
use Symfony\Component\Form\FormEvent;
|
||||||
use Symfony\Component\Form\FormEvents;
|
use Symfony\Component\Form\FormEvents;
|
||||||
|
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||||
|
use Symfony\Component\Security\Core\Security;
|
||||||
|
|
||||||
final class AsideActivityFormType extends AbstractType
|
final class AsideActivityFormType extends AbstractType
|
||||||
{
|
{
|
||||||
protected array $timeChoices;
|
protected array $timeChoices;
|
||||||
private TranslatableStringHelper $translatableStringHelper;
|
private TranslatableStringHelper $translatableStringHelper;
|
||||||
|
private TokenStorageInterface $storage;
|
||||||
|
|
||||||
public function __construct (TranslatableStringHelper $translatableStringHelper, array $timeChoices){
|
public function __construct (TranslatableStringHelper $translatableStringHelper, array $timeChoices, TokenStorageInterface $storage){
|
||||||
$this->timeChoices = $timeChoices;
|
$this->timeChoices = $timeChoices;
|
||||||
$this->translatableStringHelper = $translatableStringHelper;
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
|
$this->storage = $storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
@@ -48,7 +52,8 @@ final class AsideActivityFormType extends AbstractType
|
|||||||
'label' => 'Agent',
|
'label' => 'Agent',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'class' => User::class,
|
'class' => User::class,
|
||||||
//translate
|
'data' => $this->storage->getToken()->getUser(),
|
||||||
|
'attr' => array('class' => 'select2 '),
|
||||||
'placeholder' => 'Choose the agent for whom this activity is created',
|
'placeholder' => 'Choose the agent for whom this activity is created',
|
||||||
'choice_label' => 'username'
|
'choice_label' => 'username'
|
||||||
])
|
])
|
||||||
|
@@ -1,12 +1,14 @@
|
|||||||
{% extends "@ChillMain/layout.html.twig" %}
|
{% extends "@ChillMain/layout.html.twig" %}
|
||||||
|
|
||||||
|
{% block title %}{{ 'Aside activity list' |trans }}{% endblock title %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="col-md-10 col-xxl asideactivity-list">
|
<div class="col-md-10 col-xxl asideactivity-list">
|
||||||
<h2>{{ 'My aside activities' |trans }}</h2>
|
<h2>{{ 'My aside activities' |trans }}</h2>
|
||||||
|
|
||||||
{% if entities|length == 0 %}
|
{% if entities|length == 0 %}
|
||||||
<p class="chill-no-data-statement">
|
<p class="chill-no-data-statement">
|
||||||
{{ "There isn't any activities."|trans }}
|
{{ "There aren't any aside activities."|trans }}
|
||||||
<a href="{{ path('chill_crud_aside_activity_new') }}" class="btn btn-create button-small"></a>
|
<a href="{{ path('chill_crud_aside_activity_new') }}" class="btn btn-create button-small"></a>
|
||||||
</p>
|
</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -30,13 +32,13 @@
|
|||||||
{% if entity.date %}
|
{% if entity.date %}
|
||||||
<p>{{ entity.date|format_date('long') }}</p>
|
<p>{{ entity.date|format_date('long') }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{#
|
|
||||||
<div class="duration">
|
<div class="duration">
|
||||||
<p>
|
<p>
|
||||||
<i class="fa fa-fw fa-hourglass-end"></i>
|
<i class="fa fa-fw fa-hourglass-end"></i>
|
||||||
{{ entity.duration|date('H:i') }}
|
{{ entity.duration|date('H:i') }}
|
||||||
</p>
|
</p>
|
||||||
</div> #}
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
@@ -66,9 +68,9 @@
|
|||||||
<div class="item-col">
|
<div class="item-col">
|
||||||
<ul class="list-content">
|
<ul class="list-content">
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
{# <li>
|
||||||
<a href="{{ path('chill_crud_aside_activity_view', { 'id': entity.id} ) }}" class="btn btn-show "></a>
|
<a href="{{ path('chill_crud_aside_activity_view', { 'id': entity.id} ) }}" class="btn btn-show "></a>
|
||||||
</li>
|
</li> #}
|
||||||
{# TOOD
|
{# TOOD
|
||||||
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
|
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
|
||||||
#}
|
#}
|
||||||
@@ -91,18 +93,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
<ul class="record_actions">
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('chill_crud_aside_activity_new') }}" class="btn btn-create">
|
||||||
|
{{ 'Add a new aside activity' | trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{# TODO set this condition in configuration #}
|
|
||||||
<ul class="record_actions">
|
|
||||||
<li>
|
|
||||||
<a href="{{ path('chill_crud_aside_activity_new') }}" class="btn btn-create">
|
|
||||||
{{ 'Add a new activity' | trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
|
@@ -36,8 +36,8 @@
|
|||||||
|
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path('chill_crud_activity_type_new') }}" class="btn btn-create">
|
<a href="{{ path('chill_crud_aside_activity_category_new') }}" class="btn btn-create">
|
||||||
{{ 'Create a new activity type'|trans }}
|
{{ 'Create a new aside activity type'|trans }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@@ -5,5 +5,6 @@ services:
|
|||||||
arguments:
|
arguments:
|
||||||
- "@chill.main.helper.translatable_string"
|
- "@chill.main.helper.translatable_string"
|
||||||
- "%chill_activity.form.time_duration%"
|
- "%chill_activity.form.time_duration%"
|
||||||
|
- "@security.token_storage"
|
||||||
tags:
|
tags:
|
||||||
- { name: form.type, alias: chill_asideactivitybundle_asideactivity }
|
- { name: form.type, alias: chill_asideactivitybundle_asideactivity }
|
@@ -8,7 +8,7 @@ user_username: nom de l'utilisateur
|
|||||||
Remark: Commentaire
|
Remark: Commentaire
|
||||||
No comments: Aucun commentaire
|
No comments: Aucun commentaire
|
||||||
Add a new aside activity: Ajouter une nouvelle activité annexe
|
Add a new aside activity: Ajouter une nouvelle activité annexe
|
||||||
Aside activity list: Liste des activités annexes
|
Aside activity list: Activités annexes
|
||||||
present: présent
|
present: présent
|
||||||
not present: absent
|
not present: absent
|
||||||
Delete: Supprimer
|
Delete: Supprimer
|
||||||
@@ -32,7 +32,7 @@ location: Lieu
|
|||||||
crud:
|
crud:
|
||||||
aside_activity:
|
aside_activity:
|
||||||
title_view: Détail de l'activité annexe
|
title_view: Détail de l'activité annexe
|
||||||
title_new: Nouveau activité annexe
|
title_new: Nouvelle activité annexe
|
||||||
title_edit: Edition d'une activité annexe
|
title_edit: Edition d'une activité annexe
|
||||||
title_delete: Supprimation d'une activité annexe
|
title_delete: Supprimation d'une activité annexe
|
||||||
button_delete: Supprimer
|
button_delete: Supprimer
|
||||||
@@ -43,14 +43,20 @@ crud:
|
|||||||
|
|
||||||
#forms
|
#forms
|
||||||
Activity creation: Nouvelle activité annexe
|
Activity creation: Nouvelle activité annexe
|
||||||
|
Create a new aside activity type: Nouvelle categorie d'activité annexe
|
||||||
Create: Créer
|
Create: Créer
|
||||||
Back to the list: Retour à la liste
|
Back to the list: Retour à la liste
|
||||||
Save activity: Sauver l'activité
|
Save activity: Sauver l'activité
|
||||||
Reset form: Remise à zéro du formulaire
|
Reset form: Remise à zéro du formulaire
|
||||||
Choose the agent for whom this activity is created: Choissisez l'agent pour qui l'activitée est creeé.
|
Choose the agent for whom this activity is created: Choissisez l'utilisateur pour qui l'activité est creéé.
|
||||||
Choose the activity category: Choissisez le type d'activité
|
Choose the activity category: Choissisez le type d'activité
|
||||||
Choose the duration: Choisir la durée
|
Choose the duration: Choisir la durée
|
||||||
Choose a category: Choisir un categorie
|
Choose a category: Choisir un categorie
|
||||||
|
Is active: Actif
|
||||||
|
Agent: Utilisateur
|
||||||
|
date: Date
|
||||||
|
Duration: Durée
|
||||||
|
Note: Note
|
||||||
5 minutes: 5 minutes
|
5 minutes: 5 minutes
|
||||||
10 minutes: 10 minutes
|
10 minutes: 10 minutes
|
||||||
15 minutes: 15 minutes
|
15 minutes: 15 minutes
|
||||||
|
@@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2021, Champs Libres Cooperative SCRLFS,
|
||||||
|
* <http://www.champs-libres.coop>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Chill\MainBundle\Pagination;
|
||||||
|
|
||||||
|
use Twig\Environment;
|
||||||
|
use Twig\Extension\AbstractExtension;
|
||||||
|
use Twig\TwigFunction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add twig function to render pagination
|
||||||
|
*
|
||||||
|
* @author Mathieu Jaumotte <mathieu.jaumotte@champs-libres.coop>
|
||||||
|
* @author Champs Libres <info@champs-libres.coop>
|
||||||
|
*/
|
||||||
|
class ChillItemsPerPageTwig extends AbstractExtension
|
||||||
|
{
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return 'chill_items_per_page';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFunctions()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
new TwigFunction(
|
||||||
|
'chill_items_per_page',
|
||||||
|
array($this, 'paginationRender'),
|
||||||
|
array(
|
||||||
|
'needs_environment' => true,
|
||||||
|
'is_safe' => ['html']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function paginationRender(
|
||||||
|
Environment $env,
|
||||||
|
PaginatorInterface $paginator,
|
||||||
|
$template = '@ChillMain/Pagination/items_per_page.html.twig'
|
||||||
|
) {
|
||||||
|
|
||||||
|
return $env->render($template, array(
|
||||||
|
'paginator' => $paginator,
|
||||||
|
'current' => $paginator->getItemsPerPage()
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
@@ -61,7 +61,7 @@ class PaginatorFactory
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
RequestStack $requestStack,
|
RequestStack $requestStack,
|
||||||
RouterInterface $router,
|
RouterInterface $router,
|
||||||
$itemPerPage = 50
|
$itemPerPage = 20
|
||||||
) {
|
) {
|
||||||
$this->itemPerPage = $itemPerPage;
|
$this->itemPerPage = $itemPerPage;
|
||||||
$this->requestStack = $requestStack;
|
$this->requestStack = $requestStack;
|
||||||
|
@@ -111,3 +111,8 @@ $chill-theme-buttons: (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fix min-width on small pictos buttons
|
||||||
|
.btn-sm, .btn-group-sm > .btn {
|
||||||
|
min-width: 36px;
|
||||||
|
}
|
||||||
|
@@ -51,6 +51,7 @@ div.flex-bloc {
|
|||||||
flex-grow: 0; flex-shrink: 1; flex-basis: auto;
|
flex-grow: 0; flex-shrink: 1; flex-basis: auto;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
hyphens: auto;
|
||||||
|
|
||||||
div.item-row {
|
div.item-row {
|
||||||
flex-grow: 1; flex-shrink: 1; flex-basis: auto;
|
flex-grow: 1; flex-shrink: 1; flex-basis: auto;
|
||||||
|
@@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="chill-entity entity-address my-3">
|
<component :is="component" class="chill-entity entity-address my-3">
|
||||||
<div class="address multiline">
|
|
||||||
|
<component :is="component" class="address" :class="multiline">
|
||||||
<p v-if="address.text"
|
<p v-if="address.text"
|
||||||
class="street">
|
class="street">
|
||||||
{{ address.text }}
|
{{ address.text }},
|
||||||
</p>
|
</p>
|
||||||
<p v-if="address.postcode"
|
<p v-if="address.postcode"
|
||||||
class="postcode">
|
class="postcode">
|
||||||
@@ -13,8 +14,9 @@
|
|||||||
class="country">
|
class="country">
|
||||||
{{ address.country.name.fr }}
|
{{ address.country.name.fr }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</component>
|
||||||
<div>
|
|
||||||
|
<div v-if="isMultiline">
|
||||||
<div v-if="address.floor">
|
<div v-if="address.floor">
|
||||||
<span class="floor">
|
<span class="floor">
|
||||||
<b>{{ $t('floor') }}</b>: {{ address.floor }}
|
<b>{{ $t('floor') }}</b>: {{ address.floor }}
|
||||||
@@ -35,28 +37,76 @@
|
|||||||
<b>{{ $t('flat') }}</b>: {{ address.flat }}
|
<b>{{ $t('flat') }}</b>: {{ address.flat }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="address.buildingName">
|
<div>
|
||||||
<span class="buildingName">
|
<div v-if="address.floor">
|
||||||
<b>{{ $t('buildingName') }}</b>: {{ address.buildingName }}
|
<span class="floor">
|
||||||
</span>
|
<b>{{ $t('floor') }}</b>: {{ address.floor }}
|
||||||
</div>
|
</span>
|
||||||
<div v-if="address.extra">
|
</div>
|
||||||
<span class="extra">
|
<div v-if="address.corridor">
|
||||||
<b>{{ $t('extra') }}</b>: {{ address.extra }}
|
<span class="corridor">
|
||||||
</span>
|
<b>{{ $t('corridor') }}</b>: {{ address.corridor }}
|
||||||
</div>
|
</span>
|
||||||
<div v-if="address.distribution">
|
</div>
|
||||||
<span class="distribution">
|
<div v-if="address.steps">
|
||||||
<b>{{ $t('distribution') }}</b>: {{ address.distribution }}
|
<span class="steps">
|
||||||
</span>
|
<b>{{ $t('steps') }}</b>: {{ address.steps }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="address.flat">
|
||||||
|
<span class="flat">
|
||||||
|
<b>{{ $t('flat') }}</b>: {{ address.flat }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="address.buildingName">
|
||||||
|
<span class="buildingName">
|
||||||
|
<b>{{ $t('buildingName') }}</b>: {{ address.buildingName }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="address.extra">
|
||||||
|
<span class="extra">
|
||||||
|
<b>{{ $t('extra') }}</b>: {{ address.extra }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="address.distribution">
|
||||||
|
<span class="distribution">
|
||||||
|
<b>{{ $t('distribution') }}</b>: {{ address.distribution }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "ShowAddress",
|
name: 'ShowAddress',
|
||||||
props: ['address']
|
props: {
|
||||||
}
|
address: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
isMultiline: {
|
||||||
|
default: true,
|
||||||
|
type: Boolean
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
component(){
|
||||||
|
return this.isMultiline == true ? "div" : "span";
|
||||||
|
},
|
||||||
|
multiline(){
|
||||||
|
return this.isMultiline == true ? "multiline" : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
p {
|
||||||
|
&:after {
|
||||||
|
content: " ";
|
||||||
|
margin-right: 0.3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@@ -43,8 +43,9 @@
|
|||||||
|
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<button v-if="action === 'show'"
|
<button v-if="action === 'show'"
|
||||||
@click="changeActionTo('edit')"
|
@click="goToLocation(id, type)"
|
||||||
class="btn btn-update">
|
:title="$t(titleMessage)"
|
||||||
|
class="btn btn-show">{{ $t(buttonMessage) }}
|
||||||
</button>
|
</button>
|
||||||
<button v-else
|
<button v-else
|
||||||
class="btn btn-save"
|
class="btn btn-save"
|
||||||
@@ -60,9 +61,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Modal from 'ChillMainAssets/vuejs/_components/Modal.vue';
|
import Modal from 'ChillMainAssets/vuejs/_components/Modal.vue';
|
||||||
import OnTheFlyPerson from 'ChillPersonAssets/vuejs/_components/OnTheFly/Person.vue';
|
|
||||||
import OnTheFlyThirdparty from './OnTheFly/ThirdParty.vue';
|
|
||||||
import OnTheFlyCreate from './OnTheFly/Create.vue';
|
import OnTheFlyCreate from './OnTheFly/Create.vue';
|
||||||
|
import OnTheFlyPerson from 'ChillPersonAssets/vuejs/_components/OnTheFly/Person.vue';
|
||||||
|
import OnTheFlyThirdparty from 'ChillThirdPartyAssets/vuejs/_components/OnTheFly/ThirdParty.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'OnTheFly',
|
name: 'OnTheFly',
|
||||||
@@ -115,6 +116,22 @@ export default {
|
|||||||
case 'create':
|
case 'create':
|
||||||
return 'onthefly.create.title';
|
return 'onthefly.create.title';
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
titleMessage() {
|
||||||
|
switch (this.type){
|
||||||
|
case 'person':
|
||||||
|
return 'action.redirect.' + this.type;
|
||||||
|
case 'thirdparty':
|
||||||
|
return 'action.redirect.' + this.type;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttonMessage(){
|
||||||
|
switch (this.type){
|
||||||
|
case 'person':
|
||||||
|
return 'onthefly.show.file_' + this.type;
|
||||||
|
case 'thirdparty':
|
||||||
|
return 'onthefly.show.file_' + this.type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -139,6 +156,13 @@ export default {
|
|||||||
this.$refs.castNew.castByType();
|
this.$refs.castNew.castByType();
|
||||||
}
|
}
|
||||||
this.modal.showModal = false;
|
this.modal.showModal = false;
|
||||||
|
},
|
||||||
|
goToLocation(id, type){
|
||||||
|
if(type == 'person'){
|
||||||
|
window.location = `../../person/${id}/general`
|
||||||
|
} else if(type == 'thirdparty') {
|
||||||
|
window.location = `../../thirdparty/thirdparty/${id}/show`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -148,4 +172,5 @@ export default {
|
|||||||
a {
|
a {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import OnTheFlyPerson from 'ChillPersonAssets/vuejs/_components/OnTheFly/Person.vue';
|
import OnTheFlyPerson from 'ChillPersonAssets/vuejs/_components/OnTheFly/Person.vue';
|
||||||
import OnTheFlyThirdparty from './ThirdParty.vue'; // TODO move in ChillThirdpartyAssets
|
import OnTheFlyThirdparty from 'ChillThirdPartyAssets/vuejs/_components/OnTheFly/ThirdParty.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OnTheFlyCreate",
|
name: "OnTheFlyCreate",
|
||||||
|
@@ -1,23 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div v-if="action === 'show'">
|
|
||||||
show
|
|
||||||
thirdparty
|
|
||||||
{{ id }}
|
|
||||||
</div>
|
|
||||||
<div v-else-if="action === 'edit' || action === 'create'">
|
|
||||||
{{ action }}
|
|
||||||
thirdparty
|
|
||||||
{{ id }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "OnTheFlyThirdParty",
|
|
||||||
props: ['id', 'type', 'action']
|
|
||||||
}
|
|
||||||
// TODO move in ChillThirdpartyAssets
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="css" scoped>
|
|
||||||
</style>
|
|
@@ -41,7 +41,11 @@ const messages = {
|
|||||||
close: "Fermer",
|
close: "Fermer",
|
||||||
back: "Retour",
|
back: "Retour",
|
||||||
check_all: "cocher tout",
|
check_all: "cocher tout",
|
||||||
reset: "réinitialiser"
|
reset: "réinitialiser",
|
||||||
|
redirect: {
|
||||||
|
person: "Quitter la page et ouvrir le dossier",
|
||||||
|
thirdparty: "Quitter la page et voir le tiers",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
nav: {
|
nav: {
|
||||||
next: "Suivant",
|
next: "Suivant",
|
||||||
@@ -52,7 +56,9 @@ const messages = {
|
|||||||
onthefly: {
|
onthefly: {
|
||||||
show: {
|
show: {
|
||||||
person: "Détails de l'usager",
|
person: "Détails de l'usager",
|
||||||
thirdparty: "Détails du tiers"
|
thirdparty: "Détails du tiers",
|
||||||
|
file_person: "Ouvrir le dossier",
|
||||||
|
file_thirdparty: "Voir le Tiers",
|
||||||
},
|
},
|
||||||
edit: {
|
edit: {
|
||||||
person: "Modifier un usager",
|
person: "Modifier un usager",
|
||||||
@@ -65,6 +71,18 @@ const messages = {
|
|||||||
thirdparty: "un nouveau tiers professionnel"
|
thirdparty: "un nouveau tiers professionnel"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
renderbox: {
|
||||||
|
person: "Person",
|
||||||
|
birthday: {
|
||||||
|
man: "Né le",
|
||||||
|
woman: "Née le"
|
||||||
|
} ,
|
||||||
|
no_data: "Aucune information renseignée",
|
||||||
|
type: {
|
||||||
|
thirdparty: "Tiers",
|
||||||
|
person: "Usager"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -0,0 +1,20 @@
|
|||||||
|
<select class="form-select" aria-label="items Per Page" id="itemsPerPage">
|
||||||
|
<option value="10">10 {{ 'results'|trans }}</option>
|
||||||
|
<option value="20">20 {{ 'results'|trans }}</option>
|
||||||
|
<option value="50">50 {{ 'results'|trans }}</option>
|
||||||
|
<option value="100">100 {{ 'results'|trans }}</option>
|
||||||
|
</select>
|
||||||
|
<script>
|
||||||
|
let select = document.querySelector("select#itemsPerPage");
|
||||||
|
window.addEventListener('load', () =>
|
||||||
|
select.value = {{ current }}
|
||||||
|
);
|
||||||
|
select.addEventListener('change', () => {
|
||||||
|
let url = new URL(window.location.href);
|
||||||
|
let params = url.searchParams;
|
||||||
|
params.set('page', '1');
|
||||||
|
params.set('item_per_page', select.value);
|
||||||
|
url.search = params.toString();
|
||||||
|
window.location.href = url.toString();
|
||||||
|
});
|
||||||
|
</script>
|
@@ -15,3 +15,8 @@ services:
|
|||||||
class: Chill\MainBundle\Pagination\ChillPaginationTwig
|
class: Chill\MainBundle\Pagination\ChillPaginationTwig
|
||||||
tags:
|
tags:
|
||||||
- { name: twig.extension }
|
- { name: twig.extension }
|
||||||
|
|
||||||
|
chill_main.paginator.items_per_page.twig_extensions:
|
||||||
|
class: Chill\MainBundle\Pagination\ChillItemsPerPageTwig
|
||||||
|
tags:
|
||||||
|
- { name: twig.extension }
|
||||||
|
@@ -85,6 +85,7 @@ Search %pattern%: Recherche de "%pattern%"
|
|||||||
Results %start%-%end% of %total%: Résultats %start%-%end% sur %total%
|
Results %start%-%end% of %total%: Résultats %start%-%end% sur %total%
|
||||||
See all results: Voir tous les résultats
|
See all results: Voir tous les résultats
|
||||||
Advanced search: Recherche avancée
|
Advanced search: Recherche avancée
|
||||||
|
results: résultats
|
||||||
|
|
||||||
# timeline
|
# timeline
|
||||||
Global timeline: Historique global
|
Global timeline: Historique global
|
||||||
|
@@ -167,7 +167,7 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
|
|||||||
/**
|
/**
|
||||||
* @return DateTimeImmutable|null
|
* @return DateTimeImmutable|null
|
||||||
*/
|
*/
|
||||||
public function getUpdatedAt(): ?DateTimeInterface
|
public function getUpdatedAt(): ?\DateTimeInterface
|
||||||
{
|
{
|
||||||
return $this->updatedAt;
|
return $this->updatedAt;
|
||||||
}
|
}
|
||||||
|
@@ -6,15 +6,21 @@
|
|||||||
<h1 v-else>{{ $t('course.title.active') }}</h1>
|
<h1 v-else>{{ $t('course.title.active') }}</h1>
|
||||||
|
|
||||||
<persons-associated></persons-associated>
|
<persons-associated></persons-associated>
|
||||||
|
<course-location></course-location>
|
||||||
<origin-demand></origin-demand>
|
<origin-demand></origin-demand>
|
||||||
<requestor></requestor>
|
<requestor></requestor>
|
||||||
<social-issue></social-issue>
|
<social-issue></social-issue>
|
||||||
<course-location></course-location>
|
|
||||||
<referrer></referrer>
|
<referrer></referrer>
|
||||||
<resources></resources>
|
<resources></resources>
|
||||||
<comment v-if="accompanyingCourse.step === 'DRAFT'"></comment>
|
<comment v-if="accompanyingCourse.step === 'DRAFT'"></comment>
|
||||||
<confirm v-if="accompanyingCourse.step === 'DRAFT'"></confirm>
|
<confirm v-if="accompanyingCourse.step === 'DRAFT'"></confirm>
|
||||||
|
|
||||||
|
<div v-for="error in errorMsg" class="vue-component errors alert alert-danger">
|
||||||
|
<p>
|
||||||
|
<span>{{ error.sta }} {{ error.txt }}</span><br>
|
||||||
|
<span>{{ $t(error.msg) }}</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -48,7 +54,8 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: mapState([
|
computed: mapState([
|
||||||
'accompanyingCourse',
|
'accompanyingCourse',
|
||||||
'addressContext'
|
'addressContext',
|
||||||
|
'errorMsg'
|
||||||
])
|
])
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -86,8 +93,27 @@ export default {
|
|||||||
}
|
}
|
||||||
& > div {
|
& > div {
|
||||||
margin: 1em 3em 0;
|
margin: 1em 3em 0;
|
||||||
|
&.flex-table {
|
||||||
|
margin: 1em 0 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
table {
|
|
||||||
|
div.flex-table {
|
||||||
|
div.item-row {
|
||||||
|
div.item-col:first-child {
|
||||||
|
flex-basis: 33%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.errors {
|
||||||
|
//display: flex;
|
||||||
|
//position: sticky;
|
||||||
|
//bottom: 0.3em;
|
||||||
|
//z-index: 1000;
|
||||||
|
margin: 1em 0;
|
||||||
|
padding: 1em;
|
||||||
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,7 +9,7 @@ const getAccompanyingCourse = (id) => {
|
|||||||
return fetch(url)
|
return fetch(url)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
throw { msg: 'Error while retriving AccompanyingPeriod Course.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -32,7 +32,8 @@ const patchAccompanyingCourse = (id, body) => {
|
|||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
console.log(response);
|
||||||
|
throw { msg: 'Error while updating AccompanyingPeriod Course.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ const confirmAccompanyingCourse = (id) => {
|
|||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
throw { msg: 'Error while confirming AccompanyingPeriod Course.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -59,7 +60,7 @@ const getSocialIssues = () => {
|
|||||||
return fetch(url)
|
return fetch(url)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
throw { msg: 'Error while retriving Social Issues.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -83,7 +84,7 @@ const postParticipation = (id, payload, method) => {
|
|||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
throw { msg: 'Error while sending AccompanyingPeriod Course participation.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -109,7 +110,7 @@ const postRequestor = (id, payload, method) => {
|
|||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
throw { msg: 'Error while sending AccompanyingPeriod Course requestor', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -142,7 +143,7 @@ const postResource = (id, payload, method) => {
|
|||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
throw { msg: 'Error while sending AccompanyingPeriod Course resource.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -161,7 +162,7 @@ const postSocialIssue = (id, body, method) => {
|
|||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
throw { msg: 'Error while updating SocialIssue.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -170,7 +171,7 @@ const getUsers = () => {
|
|||||||
return fetch(url)
|
return fetch(url)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
throw { msg: 'Error while retriving users.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -179,7 +180,7 @@ const whoami = () => {
|
|||||||
return fetch(url)
|
return fetch(url)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
throw { msg: 'Error while getting whoami.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -188,7 +189,7 @@ const getListOrigins = () => {
|
|||||||
return fetch(url)
|
return fetch(url)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.ok) { return response.json(); }
|
if (response.ok) { return response.json(); }
|
||||||
throw Error('Error with request resource response');
|
throw { msg: 'Error while retriving origin\'s list.', sta: response.status, txt: response.statusText, err: new Error(), body: response.body };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ export default {
|
|||||||
personId: this.person.id
|
personId: this.person.id
|
||||||
};
|
};
|
||||||
this.$store.dispatch('updateLocation', payload);
|
this.$store.dispatch('updateLocation', payload);
|
||||||
window.location.assign('#section-50');
|
window.location.assign('#section-20');
|
||||||
this.modal.showModal = false;
|
this.modal.showModal = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -27,17 +27,19 @@
|
|||||||
]) }}
|
]) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="record_actions">
|
<div>
|
||||||
<li>
|
<ul class="record_actions">
|
||||||
<button type="submit" class="btn btn-save">{{ $t('action.save') }}</button>
|
<li>
|
||||||
</li>
|
<button type="submit" class="btn btn-save">{{ $t('action.save') }}</button>
|
||||||
<li v-if="initialComment !== null">
|
</li>
|
||||||
<a class="btn btn-delete"
|
<li v-if="initialComment !== null">
|
||||||
@click="removeComment">
|
<a class="btn btn-delete"
|
||||||
{{ $t('action.delete') }}
|
@click="removeComment">
|
||||||
</a>
|
{{ $t('action.delete') }}
|
||||||
</li>
|
</a>
|
||||||
</ul>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -3,24 +3,43 @@
|
|||||||
<h2><a name="section-90"></a>
|
<h2><a name="section-90"></a>
|
||||||
{{ $t('confirm.title') }}
|
{{ $t('confirm.title') }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p v-html="$t('confirm.text_draft', [$t('course.step.draft')])"></p>
|
||||||
{{ $t('confirm.text_draft') }}
|
|
||||||
<span class="badge bg-secondary">{{ $t('course.step.draft') }}</span>
|
<div v-if="!isValidToBeConfirmed">
|
||||||
</p>
|
<div class="alert alert-warning">
|
||||||
<p>
|
{{ $t('confirm.alert_validation') }}
|
||||||
{{ $t('confirm.text_active') }}
|
<ul class="mt-2">
|
||||||
<span class="badge bg-primary">{{ $t('course.step.active') }}</span>
|
<li v-for="k in validationKeys">
|
||||||
</p>
|
{{ $t(notValidMessages[k].msg) }}
|
||||||
|
<a :href="notValidMessages[k].anchor">
|
||||||
|
<i class="fa fa-level-up fa-fw"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<ul class="record_actions">
|
||||||
|
<li>
|
||||||
|
<button class="btn btn-save" disabled>
|
||||||
|
{{ $t('confirm.ok') }}
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-else>
|
||||||
|
<p v-html="$t('confirm.text_active', [$t('course.step.active')])"></p>
|
||||||
|
<ul class="record_actions">
|
||||||
|
<li>
|
||||||
|
<button
|
||||||
|
class="btn btn-save"
|
||||||
|
@click="modal.showModal = true">
|
||||||
|
{{ $t('confirm.ok') }}
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ul class="record_actions">
|
|
||||||
<li>
|
|
||||||
<button class="btn btn-save" @click="modal.showModal = true">
|
|
||||||
{{ $t('confirm.ok') }}
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<teleport to="body">
|
<teleport to="body">
|
||||||
@@ -43,6 +62,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {mapGetters, mapState} from "vuex";
|
||||||
import Modal from 'ChillMainAssets/vuejs/_components/Modal';
|
import Modal from 'ChillMainAssets/vuejs/_components/Modal';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -55,13 +75,34 @@ export default {
|
|||||||
modal: {
|
modal: {
|
||||||
showModal: false,
|
showModal: false,
|
||||||
modalDialogClass: "modal-dialog-centered modal-md"
|
modalDialogClass: "modal-dialog-centered modal-md"
|
||||||
|
},
|
||||||
|
notValidMessages: {
|
||||||
|
participation: {
|
||||||
|
msg: 'confirm.participation_not_valid',
|
||||||
|
anchor: '#section-10'
|
||||||
|
},
|
||||||
|
location: {
|
||||||
|
msg: 'confirm.location_not_valid',
|
||||||
|
anchor: '#section-20' //
|
||||||
|
},
|
||||||
|
socialIssue: {
|
||||||
|
msg: 'confirm.socialIssue_not_valid',
|
||||||
|
anchor: '#section-50'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
accompanyingCourse() {
|
...mapState([
|
||||||
return this.$store.state.accompanyingCourse
|
'accompanyingCourse'
|
||||||
}
|
]),
|
||||||
|
...mapGetters([
|
||||||
|
'isParticipationValid',
|
||||||
|
'isSocialIssueValid',
|
||||||
|
'isLocationValid',
|
||||||
|
'validationKeys',
|
||||||
|
'isValidToBeConfirmed'
|
||||||
|
])
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
confirmCourse() {
|
confirmCourse() {
|
||||||
@@ -72,9 +113,3 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
div.vue-component > div {
|
|
||||||
//margin: 1em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@@ -1,28 +1,36 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-50"></a>
|
<h2><a name="section-20"></a>
|
||||||
{{ $t('courselocation.title') }}
|
{{ $t('courselocation.title') }}
|
||||||
</h2>
|
</h2>
|
||||||
<div class="my-4">
|
|
||||||
|
|
||||||
<!-- {# include vue_address component #} -->
|
<!-- {# include vue_address component #} -->
|
||||||
<div v-for="error in displayErrors" class="alert alert-danger my-2">
|
<div v-for="error in displayErrors" class="alert alert-danger my-2">
|
||||||
{{ error }}
|
{{ error }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<show-address
|
<div v-if="hasNoLocation">
|
||||||
v-if="accompanyingCourse.location"
|
<label class="chill-no-data-statement">
|
||||||
:address="accompanyingCourse.location">
|
{{ $t('courselocation.no_address') }}
|
||||||
</show-address>
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="isPersonLocation" class="alert alert-success">
|
<div v-if="isPersonLocation">
|
||||||
|
<label class="col-form-label">
|
||||||
{{ $t('courselocation.person_locator', [ accompanyingCourse.personLocation.text ]) }}
|
{{ $t('courselocation.person_locator', [ accompanyingCourse.personLocation.text ]) }}
|
||||||
</div>
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-if="isTemporaryAddress" class="alert alert-warning">
|
<show-address
|
||||||
<p>{{ $t('courselocation.temporary_address_must_be_changed') }}</p>
|
v-if="accompanyingCourse.location"
|
||||||
</div>
|
:address="accompanyingCourse.location">
|
||||||
|
</show-address>
|
||||||
|
|
||||||
|
<div v-if="isTemporaryAddress" class="alert alert-warning">
|
||||||
|
<p>{{ $t('courselocation.temporary_address_must_be_changed') }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
<add-address
|
<add-address
|
||||||
@@ -43,8 +51,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -96,6 +104,9 @@ export default {
|
|||||||
isPersonLocation() {
|
isPersonLocation() {
|
||||||
return this.accompanyingCourse.locationStatus === 'person';
|
return this.accompanyingCourse.locationStatus === 'person';
|
||||||
},
|
},
|
||||||
|
hasNoLocation() {
|
||||||
|
return this.accompanyingCourse.locationStatus === 'none';
|
||||||
|
},
|
||||||
isContextEdit() {
|
isContextEdit() {
|
||||||
return this.context.edit;
|
return this.context.edit;
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-20"></a>{{ $t('origin.title') }}</h2>
|
<h2><a name="section-30"></a>{{ $t('origin.title') }}</h2>
|
||||||
|
|
||||||
<div class="my-4">
|
<div class="mb-4">
|
||||||
<label for="selectOrigin">
|
<label for="selectOrigin">
|
||||||
{{ $t('origin.label') }}
|
{{ $t('origin.label') }}
|
||||||
</label>
|
</label>
|
||||||
|
@@ -2,29 +2,22 @@
|
|||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-10"></a>{{ $t('persons_associated.title')}}</h2>
|
<h2><a name="section-10"></a>{{ $t('persons_associated.title')}}</h2>
|
||||||
|
|
||||||
<div>
|
<div v-if="participations.length > 0">
|
||||||
<label class="col-form-label">{{ $tc('persons_associated.counter', counter) }}</label>
|
<label class="col-form-label">{{ $tc('persons_associated.counter', counter) }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<label class="chill-no-data-statement">{{ $tc('persons_associated.counter', counter) }}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table class="table table-bordered table-striped border-dark align-middle" v-if="participations.length > 0">
|
<div class="flex-table mb-3">
|
||||||
<thead>
|
<participation-item
|
||||||
<tr>
|
v-for="participation in participations"
|
||||||
<th class="chill-orange">{{ $t('persons_associated.name') }}</th>
|
v-bind:participation="participation"
|
||||||
<th class="chill-orange">{{ $t('persons_associated.startdate') }}</th>
|
v-bind:key="participation.id"
|
||||||
<th class="chill-orange">{{ $t('persons_associated.enddate') }}</th>
|
@remove="removeParticipation"
|
||||||
<th class="chill-orange">{{ $t('action.actions') }}</th>
|
@close="closeParticipation">
|
||||||
</tr>
|
</participation-item>
|
||||||
</thead>
|
</div>
|
||||||
<tbody>
|
|
||||||
<person-item
|
|
||||||
v-for="participation in participations"
|
|
||||||
v-bind:participation="participation"
|
|
||||||
v-bind:key="participation.id"
|
|
||||||
@remove="removeParticipation"
|
|
||||||
@close="closeParticipation">
|
|
||||||
</person-item>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<add-persons
|
<add-persons
|
||||||
@@ -42,13 +35,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex';
|
import { mapState } from 'vuex';
|
||||||
import PersonItem from "./PersonsAssociated/PersonItem.vue"
|
import ParticipationItem from "./PersonsAssociated/ParticipationItem.vue"
|
||||||
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue'
|
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PersonsAssociated',
|
name: 'PersonsAssociated',
|
||||||
components: {
|
components: {
|
||||||
PersonItem,
|
ParticipationItem,
|
||||||
AddPersons
|
AddPersons
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@@ -0,0 +1,111 @@
|
|||||||
|
<template>
|
||||||
|
<person-render-box
|
||||||
|
:options="{
|
||||||
|
addInfo : true,
|
||||||
|
addId : false,
|
||||||
|
addEntity: false,
|
||||||
|
addLink: false,
|
||||||
|
addAltNames: true,
|
||||||
|
addAge : false,
|
||||||
|
hLevel : 3,
|
||||||
|
}"
|
||||||
|
:person="participation.person">
|
||||||
|
|
||||||
|
<template v-slot:record-actions>
|
||||||
|
<ul class="record_actions">
|
||||||
|
<button-location
|
||||||
|
v-if="hasCurrentHouseholdAddress"
|
||||||
|
v-bind:person="participation.person">
|
||||||
|
</button-location>
|
||||||
|
<li>
|
||||||
|
<on-the-fly
|
||||||
|
v-bind:type="participation.person.type"
|
||||||
|
v-bind:id="participation.person.id"
|
||||||
|
action="show">
|
||||||
|
</on-the-fly>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<on-the-fly
|
||||||
|
v-bind:type="participation.person.type"
|
||||||
|
v-bind:id="participation.person.id"
|
||||||
|
action="edit">
|
||||||
|
</on-the-fly>
|
||||||
|
</li>
|
||||||
|
<!-- <li>
|
||||||
|
<button class="btn btn-delete"
|
||||||
|
:title="$t('action.delete')"
|
||||||
|
@click.prevent="$emit('remove', participation)">
|
||||||
|
</button>
|
||||||
|
</li> -->
|
||||||
|
<li>
|
||||||
|
<button v-if="!participation.endDate"
|
||||||
|
class="btn btn-sm btn-remove"
|
||||||
|
v-bind:title="$t('action.remove')"
|
||||||
|
@click.prevent="$emit('close', participation)">
|
||||||
|
</button>
|
||||||
|
<button v-else
|
||||||
|
class="btn btn-sm btn-remove disabled"></button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</person-render-box>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue';
|
||||||
|
import ButtonLocation from '../ButtonLocation.vue';
|
||||||
|
import PersonRenderBox from 'ChillPersonAssets/vuejs/_components/Entity/PersonRenderBox.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ParticipationItem',
|
||||||
|
components: {
|
||||||
|
OnTheFly,
|
||||||
|
ButtonLocation,
|
||||||
|
PersonRenderBox
|
||||||
|
},
|
||||||
|
props: ['participation'],
|
||||||
|
emits: ['remove', 'close'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
PersonRenderBox: {
|
||||||
|
participation: 'participation',
|
||||||
|
options: {
|
||||||
|
addInfo: false,
|
||||||
|
addId: true,
|
||||||
|
addAge: false,
|
||||||
|
hLevel: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
hasCurrentHouseholdAddress() {
|
||||||
|
if ( !this.participation.endDate
|
||||||
|
&& this.participation.person.current_household_address !== null ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* dates of participation
|
||||||
|
*
|
||||||
|
* :title="$t('persons_associated.date_start_to_end', {
|
||||||
|
* start: $d(participation.startDate.datetime, 'short'),
|
||||||
|
* end: $d(participation.endDate.datetime, 'short')
|
||||||
|
* })"
|
||||||
|
*
|
||||||
|
* <tr>
|
||||||
|
* <td><span v-if="participation.startDate">
|
||||||
|
* {{ $d(participation.startDate.datetime, 'short') }}</span>
|
||||||
|
* </td>
|
||||||
|
* <td><span v-if="participation.endDate">
|
||||||
|
* {{ $d(participation.endDate.datetime, 'short') }}</span>
|
||||||
|
* </td>
|
||||||
|
* </tr>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
</script>
|
@@ -1,74 +0,0 @@
|
|||||||
<template>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
{{ participation.person.firstName }}
|
|
||||||
{{ participation.person.lastName }}
|
|
||||||
</td>
|
|
||||||
<td><span v-if="participation.startDate">
|
|
||||||
{{ $d(participation.startDate.datetime, 'short') }}</span>
|
|
||||||
</td>
|
|
||||||
<td><span v-if="participation.endDate">
|
|
||||||
{{ $d(participation.endDate.datetime, 'short') }}</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<ul class="record_actions">
|
|
||||||
<button-location
|
|
||||||
v-if="hasCurrentHouseholdAddress"
|
|
||||||
v-bind:person="participation.person">
|
|
||||||
</button-location>
|
|
||||||
<li>
|
|
||||||
<on-the-fly
|
|
||||||
v-bind:type="participation.person.type"
|
|
||||||
v-bind:id="participation.person.id"
|
|
||||||
action="show">
|
|
||||||
</on-the-fly>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<on-the-fly
|
|
||||||
v-bind:type="participation.person.type"
|
|
||||||
v-bind:id="participation.person.id"
|
|
||||||
action="edit">
|
|
||||||
</on-the-fly>
|
|
||||||
</li>
|
|
||||||
<!--li>
|
|
||||||
<button class="btn btn-delete"
|
|
||||||
:title="$t('action.delete')"
|
|
||||||
@click.prevent="$emit('remove', participation)">
|
|
||||||
</button>
|
|
||||||
</li-->
|
|
||||||
<li>
|
|
||||||
<button v-if="!participation.endDate"
|
|
||||||
class="btn btn-sm btn-remove"
|
|
||||||
v-bind:title="$t('action.remove')"
|
|
||||||
@click.prevent="$emit('close', participation)">
|
|
||||||
</button>
|
|
||||||
<button v-else class="btn btn-sm btn-remove" disabled></button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue';
|
|
||||||
import ButtonLocation from '../ButtonLocation.vue';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'PersonItem',
|
|
||||||
components: {
|
|
||||||
OnTheFly,
|
|
||||||
ButtonLocation
|
|
||||||
},
|
|
||||||
props: ['participation'],
|
|
||||||
emits: ['remove', 'close'],
|
|
||||||
computed: {
|
|
||||||
hasCurrentHouseholdAddress() {
|
|
||||||
if ( !this.participation.endDate
|
|
||||||
&& this.participation.person.current_household_address !== null ) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@@ -2,7 +2,7 @@
|
|||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-60"></a>{{ $t('referrer.title') }}</h2>
|
<h2><a name="section-60"></a>{{ $t('referrer.title') }}</h2>
|
||||||
|
|
||||||
<div class="my-4">
|
<div>
|
||||||
<label class="col-form-label" for="selectReferrer">
|
<label class="col-form-label" for="selectReferrer">
|
||||||
{{ $t('referrer.label') }}
|
{{ $t('referrer.label') }}
|
||||||
</label>
|
</label>
|
||||||
@@ -18,7 +18,9 @@
|
|||||||
v-bind:options="options"
|
v-bind:options="options"
|
||||||
@select="updateReferrer">
|
@select="updateReferrer">
|
||||||
</VueMultiselect>
|
</VueMultiselect>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
<button
|
<button
|
||||||
@@ -30,8 +32,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@@ -1,17 +1,58 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
|
<!-- {{ accompanyingCourse.requestor }} -->
|
||||||
<h2><a name="section-30"></a>{{ $t('requestor.title') }}</h2>
|
<h2><a name="section-40"></a>{{ $t('requestor.title') }}</h2>
|
||||||
|
|
||||||
<div v-if="accompanyingCourse.requestor" class="flex-table">
|
<div v-if="accompanyingCourse.requestor" class="flex-table">
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" v-model="isAnonymous" class="me-2" /><!-- :value="value" -->
|
<input type="checkbox" v-model="isAnonymous" class="me-2" />
|
||||||
{{ $t('requestor.is_anonymous') }}
|
{{ $t('requestor.is_anonymous') }}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<third-party-render-box v-if="accompanyingCourse.requestor.type == 'thirdparty'"
|
||||||
|
:thirdparty="accompanyingCourse.requestor"
|
||||||
|
:options="{
|
||||||
|
addLink: false,
|
||||||
|
addId: false,
|
||||||
|
addEntity: true,
|
||||||
|
addInfo: true,
|
||||||
|
hLevel: 3,
|
||||||
|
isMultiline: true
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template v-slot:record-actions>
|
||||||
|
<ul class="record_actions">
|
||||||
|
<button-location v-if="hasCurrentHouseholdAddress" :thirdparty="accompanyingCourse.requestor"></button-location>
|
||||||
|
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="show"></on-the-fly></li>
|
||||||
|
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit"></on-the-fly></li>
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
</third-party-render-box>
|
||||||
|
|
||||||
<div class="item-bloc">
|
<person-render-box v-else-if="accompanyingCourse.requestor.type == 'person'"
|
||||||
<h4>
|
:person="accompanyingCourse.requestor"
|
||||||
|
:options="{
|
||||||
|
addLink: false,
|
||||||
|
addId: false,
|
||||||
|
addAltNames: false,
|
||||||
|
addEntity: true,
|
||||||
|
addInfo: true,
|
||||||
|
hLevel: 3,
|
||||||
|
isMultiline: true
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template v-slot:record-actions>
|
||||||
|
<ul class="record_actions">
|
||||||
|
<button-location v-if="hasCurrentHouseholdAddress" :person="accompanyingCourse.requestor"></button-location>
|
||||||
|
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="show"></on-the-fly></li>
|
||||||
|
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit"></on-the-fly></li>
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
</person-render-box>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <h4>
|
||||||
<span class="badge rounded-pill bg-secondary">{{ accompanyingCourse.requestor.type }}</span>
|
<span class="badge rounded-pill bg-secondary">{{ accompanyingCourse.requestor.type }}</span>
|
||||||
{{ accompanyingCourse.requestor.text }}
|
{{ accompanyingCourse.requestor.text }}
|
||||||
</h4>
|
</h4>
|
||||||
@@ -54,8 +95,8 @@
|
|||||||
action="edit">
|
action="edit">
|
||||||
</on-the-fly>
|
</on-the-fly>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul> -->
|
||||||
</div>
|
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
<button class="btn btn-remove"
|
<button class="btn btn-remove"
|
||||||
@@ -67,7 +108,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<label>{{ $t('requestor.counter') }}</label>
|
<label class="chill-no-data-statement">{{ $t('requestor.counter') }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -87,12 +128,16 @@
|
|||||||
<script>
|
<script>
|
||||||
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
|
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
|
||||||
import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue';
|
import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue';
|
||||||
|
import PersonRenderBox from '../../_components/Entity/PersonRenderBox.vue';
|
||||||
|
import ThirdPartyRenderBox from 'ChillThirdPartyAssets/vuejs/_components/Entity/ThirdPartyRenderBox.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Requestor',
|
name: 'Requestor',
|
||||||
components: {
|
components: {
|
||||||
AddPersons,
|
AddPersons,
|
||||||
OnTheFly
|
OnTheFly,
|
||||||
|
PersonRenderBox,
|
||||||
|
ThirdPartyRenderBox,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@@ -3,28 +3,21 @@
|
|||||||
|
|
||||||
<h2><a name="section-70"></a>{{ $t('resources.title')}}</h2>
|
<h2><a name="section-70"></a>{{ $t('resources.title')}}</h2>
|
||||||
|
|
||||||
<div>
|
<div v-if="resources.length > 0">
|
||||||
<label class="col-form-label">{{ $tc('resources.counter', counter) }}</label>
|
<label class="col-form-label">{{ $tc('resources.counter', counter) }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<label class="chill-no-data-statement">{{ $tc('resources.counter', counter) }}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table class="table table-bordered table-striped border-dark align-middle" v-if="resources.length > 0">
|
<div class="flex-table mb-3">
|
||||||
<thead>
|
<resource-item
|
||||||
<tr>
|
v-for="resource in resources"
|
||||||
<th class="chill-orange">{{ $t('resources.text') }}</th>
|
v-bind:resource="resource"
|
||||||
<th class="chill-orange">{{ $t('resources.description') }}</th>
|
v-bind:key="resource.id"
|
||||||
<th class="chill-orange">{{ $t('action.actions') }}</th>
|
@remove="removeResource">
|
||||||
</tr>
|
</resource-item>
|
||||||
</thead>
|
</div>
|
||||||
<tbody>
|
|
||||||
<resource-item
|
|
||||||
v-for="resource in resources"
|
|
||||||
v-bind:resource="resource"
|
|
||||||
v-bind:key="resource.id"
|
|
||||||
@remove="removeResource">
|
|
||||||
</resource-item>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<add-persons
|
<add-persons
|
||||||
buttonTitle="resources.add_resources"
|
buttonTitle="resources.add_resources"
|
||||||
|
@@ -1,71 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<tr>
|
<person-render-box
|
||||||
|
v-if="resource.resource.type === 'person'"
|
||||||
|
:person="resource.resource"
|
||||||
|
:options="{ addInfo : true, addId : false, addEntity: true, addLink: false, addAltNames: true, addAge : false, hLevel : 3 }"
|
||||||
|
>
|
||||||
|
<template v-slot:record-actions>
|
||||||
|
<ul class="record_actions">
|
||||||
|
<button-location v-if="hasCurrentHouseholdAddress" :person="resource.resource"></button-location>
|
||||||
|
<li><on-the-fly :type="resource.resource.type" :id="resource.resource.id" action="show"></on-the-fly></li>
|
||||||
|
<li><on-the-fly :type="resource.resource.type" :id="resource.resource.id" action="edit"></on-the-fly></li>
|
||||||
|
<li><button class="btn btn-sm btn-remove" :title="$t('action.remove')" @click.prevent="$emit('remove', resource)"></button></li>
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
|
||||||
<td>
|
</person-render-box>
|
||||||
<span class="badge rounded-pill bg-secondary"
|
<third-party-render-box
|
||||||
v-bind:title="resource.resource.id">
|
v-if="resource.resource.type === 'thirdparty'"
|
||||||
<span v-if="resource.resource.type === 'person'" >{{ $t('item.type_person') }}</span>
|
:thirdparty="resource.resource"
|
||||||
<span v-if="resource.resource.type === 'thirdparty'" >{{ $t('item.type_thirdparty') }}</span>
|
:options="{ addLink : false, addId : false, addEntity: true, addInfo: true, hLevel: 3 }"
|
||||||
</span>
|
>
|
||||||
{{ resource.resource.text }}
|
<template v-slot:record-actions>
|
||||||
</td>
|
<ul class="record_actions">
|
||||||
|
<li><on-the-fly :type="resource.resource.type" :id="resource.resource.id" action="show"></on-the-fly></li>
|
||||||
|
<li><on-the-fly :type="resource.resource.type" :id="resource.resource.id" action="edit"></on-the-fly></li>
|
||||||
|
<li><button class="btn btn-sm btn-remove" :title="$t('action.remove')" @click.prevent="$emit('remove', resource)"></button></li>
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
|
||||||
<td v-if="resource.resource.type === 'person'">
|
</third-party-render-box>
|
||||||
{{ $tc('person.born') }}{{ $d(resource.resource.birthdate.datetime, 'short') }}
|
|
||||||
</td>
|
|
||||||
<td v-else-if="resource.resource.type === 'thirdparty'">
|
|
||||||
{{ resource.resource.address.text }}<br>
|
|
||||||
{{ resource.resource.address.postcode.name }}
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
<ul class="record_actions">
|
|
||||||
<button-location
|
|
||||||
v-if="hasCurrentHouseholdAddress"
|
|
||||||
v-bind:person="resource.resource">
|
|
||||||
</button-location>
|
|
||||||
<li>
|
|
||||||
<on-the-fly
|
|
||||||
v-bind:type="resource.resource.type"
|
|
||||||
v-bind:id="resource.resource.id"
|
|
||||||
action="show">
|
|
||||||
</on-the-fly>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<on-the-fly
|
|
||||||
v-bind:type="resource.resource.type"
|
|
||||||
v-bind:id="resource.resource.id"
|
|
||||||
action="edit">
|
|
||||||
</on-the-fly>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<button
|
|
||||||
class="btn btn-sm btn-remove"
|
|
||||||
v-bind:title="$t('action.remove')"
|
|
||||||
@click.prevent="$emit('remove', resource)">
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue';
|
import OnTheFly from 'ChillMainAssets/vuejs/_components/OnTheFly.vue';
|
||||||
import ButtonLocation from '../ButtonLocation.vue';
|
import ButtonLocation from '../ButtonLocation.vue';
|
||||||
|
import PersonRenderBox from 'ChillPersonAssets/vuejs/_components/Entity/PersonRenderBox.vue';
|
||||||
|
import ThirdPartyRenderBox from 'ChillThirdPartyAssets/vuejs/_components/Entity/ThirdPartyRenderBox.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ResourceItem',
|
name: 'ResourceItem',
|
||||||
components: {
|
components: {
|
||||||
OnTheFly,
|
OnTheFly,
|
||||||
ButtonLocation
|
ButtonLocation,
|
||||||
|
PersonRenderBox,
|
||||||
|
ThirdPartyRenderBox
|
||||||
},
|
},
|
||||||
props: ['resource'],
|
props: ['resource'],
|
||||||
emits: ['remove'],
|
emits: ['remove'],
|
||||||
computed: {
|
computed: {
|
||||||
hasCurrentHouseholdAddress() {
|
hasCurrentHouseholdAddress() {
|
||||||
if ( !this.resource.resource.type === 'person'
|
if ( this.resource.resource.current_household_address !== null ) {
|
||||||
&& this.resource.resource.current_household_address !== null ) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="vue-component">
|
<div class="vue-component">
|
||||||
<h2><a name="section-40"></a>{{ $t('social_issue.title') }}</h2>
|
<h2><a name="section-50"></a>{{ $t('social_issue.title') }}</h2>
|
||||||
|
|
||||||
<div class="my-4">
|
<div class="my-4">
|
||||||
<!--label for="field">{{ $t('social_issue.label') }}</label
|
<!--label for="field">{{ $t('social_issue.label') }}</label
|
||||||
|
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "vendor_name/AccompanyingCourse",
|
||||||
|
"description": "description",
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"license": "proprietary",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "mat",
|
||||||
|
"email": "email@example.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
}
|
||||||
|
}
|
@@ -34,13 +34,14 @@ const appMessages = {
|
|||||||
},
|
},
|
||||||
persons_associated: {
|
persons_associated: {
|
||||||
title: "Usagers concernés",
|
title: "Usagers concernés",
|
||||||
counter: "Il n'y a pas encore d'usager | 1 usager | {count} usagers",
|
counter: "Il n'y a pas encore d'usagers | 1 usager | {count} usagers",
|
||||||
firstname: "Prénom",
|
firstname: "Prénom",
|
||||||
lastname: "Nom",
|
lastname: "Nom",
|
||||||
name: "Nom",
|
name: "Nom",
|
||||||
startdate: "Date d'entrée",
|
startdate: "Date d'entrée",
|
||||||
enddate: "Date de sortie",
|
enddate: "Date de sortie",
|
||||||
add_persons: "Ajouter des usagers",
|
add_persons: "Ajouter des usagers",
|
||||||
|
date_start_to_end: "Participation du {start} au {end}",
|
||||||
},
|
},
|
||||||
requestor: {
|
requestor: {
|
||||||
title: "Demandeur",
|
title: "Demandeur",
|
||||||
@@ -70,11 +71,12 @@ const appMessages = {
|
|||||||
edit_temporary_address: "Modifier l'adresse temporaire",
|
edit_temporary_address: "Modifier l'adresse temporaire",
|
||||||
assign_course_address: "Désigner comme l'adresse du parcours",
|
assign_course_address: "Désigner comme l'adresse du parcours",
|
||||||
remove_button: "Enlever l'adresse",
|
remove_button: "Enlever l'adresse",
|
||||||
temporary_address_must_be_changed: "Cette addresse est temporaire et doit être remplacée par celle d'un usager de référence.",
|
temporary_address_must_be_changed: "Cette addresse est temporaire et devrait être remplacée par celle d'un usager de référence.",
|
||||||
sure: "Êtes-vous sûr ?",
|
sure: "Êtes-vous sûr ?",
|
||||||
sure_description: "Voulez-vous faire de cette adresse l'adresse du parcours ?",
|
sure_description: "Voulez-vous faire de cette adresse l'adresse du parcours ?",
|
||||||
ok: "Désigner comme adresse du parcours",
|
ok: "Désigner comme adresse du parcours",
|
||||||
person_locator: "Parcours localisé auprès de {0}",
|
person_locator: "Parcours localisé auprès de {0}",
|
||||||
|
no_address: "Il n'y a pas d'adresse associée au parcours"
|
||||||
},
|
},
|
||||||
referrer: {
|
referrer: {
|
||||||
title: "Référent du parcours",
|
title: "Référent du parcours",
|
||||||
@@ -97,13 +99,28 @@ const appMessages = {
|
|||||||
},
|
},
|
||||||
confirm: {
|
confirm: {
|
||||||
title: "Confirmation",
|
title: "Confirmation",
|
||||||
text_draft: "Le parcours est actuellement à l'état de ",
|
text_draft: "Le parcours est actuellement à l'état de <b>{0}</b>.",
|
||||||
text_active: "En validant cette étape, vous lui donnez le statut ",
|
text_active: "En validant cette étape, vous lui donnez le statut <b>{0}</b>.",
|
||||||
|
alert_validation: "Certaines conditions ne sont pas remplies pour pouvoir confirmer le parcours :",
|
||||||
|
participation_not_valid: "sélectionnez au minimum 1 usager",
|
||||||
|
socialIssue_not_valid: "sélectionnez au minimum une problématique sociale",
|
||||||
|
location_not_valid: "indiquez au minimum une localisation temporaire du parcours",
|
||||||
sure: "Êtes-vous sûr ?",
|
sure: "Êtes-vous sûr ?",
|
||||||
sure_description: "Une fois le changement confirmé, il n'est 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 !",
|
||||||
ok: "Confirmer le parcours"
|
ok: "Confirmer le parcours"
|
||||||
},
|
},
|
||||||
|
// 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.",
|
||||||
|
'Error while confirming AccompanyingPeriod Course.': "Erreur du serveur lors de la confirmation du parcours d'accompagnement.",
|
||||||
|
'Error while retriving Social Issues.': "Erreur du serveur lors du chargement des problématique sociales.",
|
||||||
|
'Error while sending AccompanyingPeriod Course participation.': "Erreur du serveur lors de l'envoi des infos d'un usager.",
|
||||||
|
'Error while sending AccompanyingPeriod Course requestor': "Erreur du serveur lors de l'envoi des infos du demandeur.",
|
||||||
|
'Error while sending AccompanyingPeriod Course resource.': "Erreur du serveur lors de l'envoi des infos d'un interlocuteur privilégié.",
|
||||||
|
'Error while updating SocialIssue.': "Erreur du serveur lors de la mise à jour d'une problématique sociale.",
|
||||||
|
'Error while retriving users.': "Erreur du serveur lors du chargement de la liste des travailleurs.",
|
||||||
|
'Error while getting whoami.': "Erreur du serveur lors de la requête 'qui suis-je ?'",
|
||||||
|
'Error while retriving origin\'s list.': "Erreur du serveur lors du chargement de la liste des origines de la demande.",
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -25,9 +25,33 @@ let initPromise = getAccompanyingCourse(id)
|
|||||||
errorMsg: []
|
errorMsg: []
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
|
isParticipationValid(state) {
|
||||||
|
return state.accompanyingCourse.participations.length > 0;
|
||||||
|
},
|
||||||
|
isSocialIssueValid(state) {
|
||||||
|
return state.accompanyingCourse.socialIssues.length > 0;
|
||||||
|
},
|
||||||
|
isLocationValid(state) {
|
||||||
|
return state.accompanyingCourse.location !== null;
|
||||||
|
},
|
||||||
|
validationKeys(state, getters) {
|
||||||
|
let keys = [];
|
||||||
|
if (!getters.isParticipationValid) { keys.push('participation'); }
|
||||||
|
if (!getters.isLocationValid) { keys.push('location'); }
|
||||||
|
if (!getters.isSocialIssueValid) { keys.push('socialIssue'); }
|
||||||
|
//console.log('getter keys', keys);
|
||||||
|
return keys;
|
||||||
|
},
|
||||||
|
isValidToBeConfirmed(state, getters) {
|
||||||
|
if (getters.validationKeys.length === 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
catchError(state, error) {
|
catchError(state, error) {
|
||||||
|
console.log('### mutation: a new error have been catched and pushed in store !', error);
|
||||||
state.errorMsg.push(error);
|
state.errorMsg.push(error);
|
||||||
},
|
},
|
||||||
removeParticipation(state, participation) {
|
removeParticipation(state, participation) {
|
||||||
|
@@ -0,0 +1,48 @@
|
|||||||
|
// CURRENTLY NOT IN USE
|
||||||
|
|
||||||
|
<template>
|
||||||
|
|
||||||
|
<li v-if="address" class="chill-entity entity-address">
|
||||||
|
<i v-if="options.with_picto == true" class="fa fa-fw fa-map-marker"></i>
|
||||||
|
<span v-if="options.render == 'list' || options.render == 'list'" :class="'address ' + {'multiline' : options.multiline === true}">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- if address.street is not empty -->
|
||||||
|
<p v-if="address.street" class="street">{{ address.street }}
|
||||||
|
<!-- if address.streetNumber is not empty -->
|
||||||
|
<span v-if="address.streetNumber" class="streetnumber">{{ address.streetNumber }}</span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- if options['extended_infos'] -->
|
||||||
|
<div v-if="options.extended_infos == true">
|
||||||
|
<span v-if="address.floor" class="floor">{{ address.floor }}</span>
|
||||||
|
<span v-if="address.corridor" class="corridor">{{ address.corridor }}</span>
|
||||||
|
<span v-if="address.steps" class="steps">{{ address.steps }}</span>
|
||||||
|
<span v-if="address.buildingName" class="buildingName">{{ address.buildingName }}</span>
|
||||||
|
<span v-if="address.flat" class="flat">{{ address.flat }}</span>
|
||||||
|
<span v-if="address.distribution" class="distribution">{{ address.distribution }}</span>
|
||||||
|
<span v-if="address.extra" class="extra">{{ address.extra }}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- if address.postCode is not empty -->
|
||||||
|
<div v-if="address.postCode">
|
||||||
|
<p class="postcode">
|
||||||
|
<span class="code">{{ address.postCode.code }}</span>
|
||||||
|
<span class="name">{{ address.postCode.name }}</span>
|
||||||
|
</p>
|
||||||
|
<p class="country">{{ address.postCode.country.name }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default{
|
||||||
|
name: "AddressRenderBox",
|
||||||
|
props: ['address', 'options']
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
@@ -0,0 +1,158 @@
|
|||||||
|
<template>
|
||||||
|
<div class="item-bloc">
|
||||||
|
<section class="chill-entity entity-person">
|
||||||
|
<div class="item-row entity-bloc">
|
||||||
|
|
||||||
|
<div class="item-col">
|
||||||
|
<div class="entity-label">
|
||||||
|
|
||||||
|
<div :class="'denomination h' + options.hLevel">
|
||||||
|
|
||||||
|
<a v-if="this.options.addLink == true" href="#">
|
||||||
|
<span class="firstname">{{ person.firstName }}</span>
|
||||||
|
<span class="lastname">{{ person.lastName }}</span>
|
||||||
|
<span v-if="person.altNames && options.addAltNames == true" class="altnames">
|
||||||
|
<span :class="'altname altname-' + altNameKey">{{ altNameLabel }}</span>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<span class="firstname">{{ person.firstName }}</span>
|
||||||
|
<span class="lastname">{{ person.lastName }}</span>
|
||||||
|
<span v-if="person.altNames && options.addAltNames == true" class="altnames">
|
||||||
|
<span :class="'altname altname-' + altNameKey">{{ altNameLabel }}</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span v-if="options.addId == true" class="id-number" :title="'n° ' + person.id">{{ person.id }}</span>
|
||||||
|
<span v-if="options.addEntity == true" class="badge rounded-pill bg-secondary">{{ $t('renderbox.person') }}</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p v-if="this.options.addInfo == true" class="moreinfo">
|
||||||
|
<i :class="'fa fa-fw ' + getGenderIcon" title="{{ getGender }}"></i>
|
||||||
|
<time v-if="person.birthdate" datetime="{{ person.birthdate }}" title="{{ birthdate }}">
|
||||||
|
{{ $t(getGender) + ' ' + $d(birthdate, 'text') }}
|
||||||
|
</time>
|
||||||
|
<time v-else-if="person.deathdate" datetime="{{ person.deathdate }}" title="{{ person.deathdate }}">
|
||||||
|
{{ birthdate }} - {{ deathdate }}
|
||||||
|
</time>
|
||||||
|
<!-- <span class="age">{{ person.age }}</span> -->
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="item-col separator">
|
||||||
|
<ul class="list-content fa-ul">
|
||||||
|
|
||||||
|
<li v-if="person.current_household_address">
|
||||||
|
<i class="fa fa-li fa-map-marker"></i>
|
||||||
|
<show-address :address="person.current_household_address" :isMultiline="isMultiline"></show-address>
|
||||||
|
</li>
|
||||||
|
<li v-else-if="options.addNoData">
|
||||||
|
<i class="fa fa-li fa-map-marker"></i>
|
||||||
|
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li v-if="person.mobilenumber">
|
||||||
|
<i class="fa fa-li fa-mobile"></i>
|
||||||
|
<a :href="'tel: ' + person.mobilenumber">{{ person.mobilenumber }}</a>
|
||||||
|
</li>
|
||||||
|
<li v-else-if="options.addNoData">
|
||||||
|
<i class="fa fa-li fa-mobile"></i>
|
||||||
|
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||||
|
</li>
|
||||||
|
<li v-if="person.phonenumber">
|
||||||
|
<i class="fa fa-li fa-phone"></i>
|
||||||
|
<a :href="'tel: ' + person.phonenumber">{{ person.phonenumber }}</a>
|
||||||
|
</li>
|
||||||
|
<li v-else-if="options.addNoData">
|
||||||
|
<i class="fa fa-li fa-phone"></i>
|
||||||
|
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li v-if="person.center && options.addCenter">
|
||||||
|
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||||
|
{{ person.center.name }}
|
||||||
|
</li>
|
||||||
|
<li v-else-if="options.addNoData">
|
||||||
|
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||||
|
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||||
|
</li>
|
||||||
|
<slot name="custom-zone"></slot>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<slot name="record-actions"></slot>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {dateToISO} from 'ChillMainAssets/chill/js/date.js';
|
||||||
|
import ShowAddress from 'ChillMainAssets/vuejs/Address/components/ShowAddress.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "PersonRenderBox",
|
||||||
|
components: {
|
||||||
|
ShowAddress
|
||||||
|
},
|
||||||
|
props: ['person', 'options'],
|
||||||
|
computed: {
|
||||||
|
getGender: function() {
|
||||||
|
return this.person.gender == 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man';
|
||||||
|
},
|
||||||
|
isMultiline: function() {
|
||||||
|
if(this.options.isMultiline){
|
||||||
|
return this.options.isMultiline
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getGenderIcon: function() {
|
||||||
|
return this.person.gender == 'woman' ? 'fa-venus' : this.person.gender == 'man' ? 'fa-mars' : 'fa-neuter';
|
||||||
|
},
|
||||||
|
birthdate: function(){
|
||||||
|
var date = new Date(this.person.birthdate.datetime);
|
||||||
|
return dateToISO(date);
|
||||||
|
},
|
||||||
|
deathdate: function(){
|
||||||
|
var date = new Date(this.person.deathdate.datetime);
|
||||||
|
return dateToISO(date);
|
||||||
|
},
|
||||||
|
altNameLabel: function(){
|
||||||
|
for(let i = 0; i < this.person.altNames.length; i++){
|
||||||
|
return this.person.altNames[i].label
|
||||||
|
}
|
||||||
|
},
|
||||||
|
altNameKey: function(){
|
||||||
|
for(let i = 0; i < this.person.altNames.length; i++){
|
||||||
|
return this.person.altNames[i].key
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss'>
|
||||||
|
.lastname:before{
|
||||||
|
content: " "
|
||||||
|
}
|
||||||
|
|
||||||
|
div.item-col:first-child{
|
||||||
|
width: 33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.flex-table {
|
||||||
|
div.item-bloc {
|
||||||
|
div.item-row {
|
||||||
|
div.item-col:last-child {
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
@@ -1,57 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="action === 'show'">
|
<div v-if="action === 'show'">
|
||||||
|
|
||||||
<div class="flex-table">
|
<div class="flex-table">
|
||||||
<div class="item-bloc">
|
<person-render-box
|
||||||
<div class="item-row">
|
:person="person"
|
||||||
<div class="item-col">
|
:options="{
|
||||||
<h3 :title="person.id">{{ person.text }}</h3>
|
addInfo: true,
|
||||||
<p>
|
addEntity: false,
|
||||||
<i class="fa fa-fw"
|
addAltNames: true,
|
||||||
:class="genderClass">
|
addId: true,
|
||||||
<!--
|
addLink: false,
|
||||||
:title="$t(genderTranslation)"
|
hLevel: 3,
|
||||||
-->
|
addCenter: true,
|
||||||
</i>
|
addNoData: true,
|
||||||
<span v-if="person.birthdate">
|
isMultiline: true
|
||||||
{{ $t('person.born', { e: feminized }) }}
|
}"
|
||||||
{{ $d(person.birthdate.datetime, 'short') }}
|
></person-render-box>
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="item-col">
|
|
||||||
<dl class="list-content">
|
|
||||||
<dt>{{ $t('person.firstname') }}</dt>
|
|
||||||
<dd>{{ person.firstName }}</dd>
|
|
||||||
|
|
||||||
<dt>{{ $t('person.lastname') }}</dt>
|
|
||||||
<dd>{{ person.lastName }}</dd>
|
|
||||||
|
|
||||||
<dt>{{ $t('person.altnames') }}</dt>
|
|
||||||
<dd>{{ person.altNames }}</dd>
|
|
||||||
|
|
||||||
<span v-if="person.center">
|
|
||||||
<dt>{{ $t('person.center_name') }}</dt>
|
|
||||||
<dd :title="person.center.id">{{ person.center.name }}</dd>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<dt>{{ $t('person.phonenumber') }}</dt>
|
|
||||||
<dd>{{ person.phonenumber }}</dd>
|
|
||||||
|
|
||||||
<dt>{{ $t('person.mobilenumber') }}</dt>
|
|
||||||
<dd>{{ person.mobilenumber }}</dd>
|
|
||||||
|
|
||||||
<dt>{{ $t('person.gender.title') }}</dt>
|
|
||||||
<!--
|
|
||||||
<dd>{{ $t(genderTranslation) }}</dd>
|
|
||||||
-->
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="action === 'edit' || action === 'create'">
|
<div v-else-if="action === 'edit' || action === 'create'">
|
||||||
|
|
||||||
<div class="form-floating mb-3">
|
<div class="form-floating mb-3">
|
||||||
@@ -109,10 +75,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPerson, postPerson } from '../../_api/OnTheFly';
|
import { getPerson, postPerson } from '../../_api/OnTheFly';
|
||||||
|
import PersonRenderBox from '../Entity/PersonRenderBox.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OnTheFlyPerson",
|
name: "OnTheFlyPerson",
|
||||||
props: ['id', 'type', 'action'],
|
props: ['id', 'type', 'action'],
|
||||||
|
components: {
|
||||||
|
PersonRenderBox
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
person: {
|
person: {
|
||||||
@@ -204,10 +174,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
ul {
|
|
||||||
li::marker {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
div.flex-table {
|
div.flex-table {
|
||||||
div.item-bloc {
|
div.item-bloc {
|
||||||
div.item-row {
|
div.item-row {
|
||||||
|
@@ -137,13 +137,14 @@
|
|||||||
{{ options['customButtons']['before'] }}
|
{{ options['customButtons']['before'] }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_PERSON_SEE', person) -%}
|
{%- if options['customButtons']['replace'] is defined -%}
|
||||||
|
{{ options['customButtons']['replace'] }}
|
||||||
|
{%- elseif is_granted('CHILL_PERSON_SEE', person) -%}
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show person'|trans }}"
|
<a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show person'|trans }}"
|
||||||
href="{{ path('chill_person_view', { person_id: person.id }) }}"></a>
|
href="{{ path('chill_person_view', { person_id: person.id }) }}"></a>
|
||||||
</li>
|
</li>
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{ options['customButtons']['replace'] }}
|
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{% if options['customButtons']['after'] is defined %}
|
{% if options['customButtons']['after'] is defined %}
|
||||||
|
@@ -36,8 +36,11 @@
|
|||||||
'args' : {'person_id': person.id, 'person': person },
|
'args' : {'person_id': person.id, 'person': person },
|
||||||
'activeRouteKey': activeRouteKey
|
'activeRouteKey': activeRouteKey
|
||||||
}) }}
|
}) }}
|
||||||
|
|
||||||
<div class="block-post-menu">
|
{% block block_post_menu %}
|
||||||
{{ chill_delegated_block('person_post_vertical_menu', { 'person': person } ) }}
|
<div class="block-post-menu">
|
||||||
</div>
|
{{ chill_delegated_block('person_post_vertical_menu', { 'person': person } ) }}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -46,7 +46,7 @@ Married: Marié(e)
|
|||||||
Return: Retour
|
Return: Retour
|
||||||
Submit: Submit
|
Submit: Submit
|
||||||
Reset: 'Remise à zéro'
|
Reset: 'Remise à zéro'
|
||||||
'The person data has been updated': 'Bravo ! Les données ont été mises à jour.'
|
'The person data has been updated': 'Les données ont été mises à jour.'
|
||||||
'{1} The person field %field% is incorrect. Please check. | ]1, Inf] Several person fields are incorrect. Please check.': '{1} Le champs %field% est incorrect. Veuillez le corriger. | ]1, Inf] Plusieurs champs sont incorrects. Veuillez les vérifier.'
|
'{1} The person field %field% is incorrect. Please check. | ]1, Inf] Several person fields are incorrect. Please check.': '{1} Le champs %field% est incorrect. Veuillez le corriger. | ]1, Inf] Plusieurs champs sont incorrects. Veuillez les vérifier.'
|
||||||
'Add a person': 'Ajout d''une personne'
|
'Add a person': 'Ajout d''une personne'
|
||||||
'Person Menu': 'Menu personne'
|
'Person Menu': 'Menu personne'
|
||||||
|
@@ -125,7 +125,7 @@ Show person: Voir le dossier de la personne
|
|||||||
Return: Retour
|
Return: Retour
|
||||||
Submit: Envoi
|
Submit: Envoi
|
||||||
Reset: 'Remise à zéro'
|
Reset: 'Remise à zéro'
|
||||||
'The person data has been updated': 'Bravo ! Les données ont été mises à jour.'
|
'The person data has been updated': 'Les données ont été mises à jour.'
|
||||||
'The person data provided are not valid': 'Les données introduites ne sont pas valides'
|
'The person data provided are not valid': 'Les données introduites ne sont pas valides'
|
||||||
'{1} The person field %field% is incorrect. Please check. | ]1, Inf] Several person fields are incorrect. Please check.': '{1} Le champs %field% est incorrect. Veuillez le corriger. | ]1, Inf] Plusieurs champs sont incorrects. Veuillez les vérifier.'
|
'{1} The person field %field% is incorrect. Please check. | ]1, Inf] Several person fields are incorrect. Please check.': '{1} Le champs %field% est incorrect. Veuillez le corriger. | ]1, Inf] Plusieurs champs sont incorrects. Veuillez les vérifier.'
|
||||||
'Add a person': 'Ajout d''une personne'
|
'Add a person': 'Ajout d''une personne'
|
||||||
|
@@ -28,36 +28,36 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
|
|||||||
use Chill\TaskBundle\Security\Authorization\TaskVoter;
|
use Chill\TaskBundle\Security\Authorization\TaskVoter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||||
*/
|
*/
|
||||||
class UserMenuBuilder implements LocalMenuBuilderInterface
|
class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @var CountNotificationTask
|
* @var CountNotificationTask
|
||||||
*/
|
*/
|
||||||
public $counter;
|
public $counter;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @var TokenStorageInterface
|
* @var TokenStorageInterface
|
||||||
*/
|
*/
|
||||||
public $tokenStorage;
|
public $tokenStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @var TranslatorInterface
|
* @var TranslatorInterface
|
||||||
*/
|
*/
|
||||||
public $translator;
|
public $translator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @var AuthorizationCheckerInterface
|
* @var AuthorizationCheckerInterface
|
||||||
*/
|
*/
|
||||||
public $authorizationChecker;
|
public $authorizationChecker;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
CountNotificationTask $counter,
|
CountNotificationTask $counter,
|
||||||
TokenStorageInterface $tokenStorage,
|
TokenStorageInterface $tokenStorage,
|
||||||
@@ -69,44 +69,44 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
$this->translator = $translator;
|
$this->translator = $translator;
|
||||||
$this->authorizationChecker = $authorizationChecker;
|
$this->authorizationChecker = $authorizationChecker;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getMenuIds(): array
|
public static function getMenuIds(): array
|
||||||
{
|
{
|
||||||
return [ 'user' ];
|
return [ 'user' ];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
{
|
{
|
||||||
if (FALSE === $this->authorizationChecker->isGranted(TaskVoter::SHOW)) {
|
if (FALSE === $this->authorizationChecker->isGranted(TaskVoter::SHOW)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = $this->tokenStorage->getToken()->getUser();
|
$user = $this->tokenStorage->getToken()->getUser();
|
||||||
$ended = $this->counter->countNotificationEnded($user);
|
$ended = $this->counter->countNotificationEnded($user);
|
||||||
$warning = $this->counter->countNotificationWarning($user);
|
$warning = $this->counter->countNotificationWarning($user);
|
||||||
|
|
||||||
if ($ended > 0) {
|
if ($ended > 0) {
|
||||||
$this->addItemInMenu(
|
$this->addItemInMenu(
|
||||||
$menu,
|
$menu,
|
||||||
$user,
|
$user,
|
||||||
'%number% tasks over deadline',
|
'%number% tasks over deadline',
|
||||||
'My tasks over deadline',
|
'My tasks over deadline',
|
||||||
SingleTaskRepository::DATE_STATUS_ENDED,
|
SingleTaskRepository::DATE_STATUS_ENDED,
|
||||||
$ended,
|
$ended,
|
||||||
-15);
|
-15);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($warning > 0) {
|
if ($warning > 0) {
|
||||||
$this->addItemInMenu(
|
$this->addItemInMenu(
|
||||||
$menu,
|
$menu,
|
||||||
$user,
|
$user,
|
||||||
'%number% tasks near deadline',
|
'%number% tasks near deadline',
|
||||||
'My tasks near deadline',
|
'My tasks near deadline',
|
||||||
SingleTaskRepository::DATE_STATUS_WARNING,
|
SingleTaskRepository::DATE_STATUS_WARNING,
|
||||||
$warning,
|
$warning,
|
||||||
-14);
|
-14);
|
||||||
}
|
}
|
||||||
|
|
||||||
$menu->addChild("My tasks", [
|
$menu->addChild("My tasks", [
|
||||||
'route' => 'chill_task_single_my_tasks'
|
'route' => 'chill_task_single_my_tasks'
|
||||||
])
|
])
|
||||||
@@ -115,6 +115,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
'icon' => 'tasks'
|
'icon' => 'tasks'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/*
|
||||||
$menu->addChild("My aside activities", [
|
$menu->addChild("My aside activities", [
|
||||||
'route' => 'chill_crud_aside_activity_index'
|
'route' => 'chill_crud_aside_activity_index'
|
||||||
])
|
])
|
||||||
@@ -122,13 +123,14 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
'order' => -10,
|
'order' => -10,
|
||||||
'icon' => 'tasks'
|
'icon' => 'tasks'
|
||||||
]);
|
]);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addItemInMenu(MenuItem $menu, User $u, $message, $title, $status, $number, $order)
|
protected function addItemInMenu(MenuItem $menu, User $u, $message, $title, $status, $number, $order)
|
||||||
{
|
{
|
||||||
if ($number > 0) {
|
if ($number > 0) {
|
||||||
$menu->addChild(
|
$menu->addChild(
|
||||||
$this->translator->transChoice($message, $number),
|
$this->translator->transChoice($message, $number),
|
||||||
[
|
[
|
||||||
'route' => 'chill_task_singletask_list',
|
'route' => 'chill_task_singletask_list',
|
||||||
'routeParameters' => [
|
'routeParameters' => [
|
||||||
|
@@ -70,8 +70,6 @@ class ThirdPartyController extends Controller
|
|||||||
$nbThirdParties = $repository->countByMemberOfCenters($centers);
|
$nbThirdParties = $repository->countByMemberOfCenters($centers);
|
||||||
$pagination = $this->paginatorFactory->create($nbThirdParties);
|
$pagination = $this->paginatorFactory->create($nbThirdParties);
|
||||||
|
|
||||||
$pagination->setItemsPerPage(20);
|
|
||||||
|
|
||||||
$thirdParties = $repository->findByMemberOfCenters(
|
$thirdParties = $repository->findByMemberOfCenters(
|
||||||
$centers,
|
$centers,
|
||||||
$pagination->getCurrentPage()->getFirstItemNumber(),
|
$pagination->getCurrentPage()->getFirstItemNumber(),
|
||||||
|
@@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\ThirdPartyBundle\DataFixtures\ORM;
|
||||||
|
|
||||||
|
use Chill\ThirdPartyBundle\Entity\ThirdPartyCategory;
|
||||||
|
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||||
|
use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface;
|
||||||
|
use Doctrine\Persistence\ObjectManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class LoadThirdPartyCategory
|
||||||
|
* @package Chill\ThirdPartyBundle\DataFixtures\ORM
|
||||||
|
* @author Mathieu Jaumotte mathieu.jaumotte@champs-libres.coop
|
||||||
|
*/
|
||||||
|
class LoadThirdPartyCategory extends Fixture implements FixtureGroupInterface
|
||||||
|
{
|
||||||
|
public static function getGroups(): array
|
||||||
|
{
|
||||||
|
return ['thirdparty_categories'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function load(ObjectManager $manager)
|
||||||
|
{
|
||||||
|
$categories = [
|
||||||
|
['name' => ['fr' => "maison médicale" ]],
|
||||||
|
['name' => ['fr' => "hôpital" ]],
|
||||||
|
['name' => ['fr' => "médecin généraliste" ]],
|
||||||
|
['name' => ['fr' => "pharmacien" ]],
|
||||||
|
['name' => ['fr' => "assistance aux personnes âgées" ]],
|
||||||
|
['name' => ['fr' => "assistante maternelle" ]],
|
||||||
|
['name' => ['fr' => "assistant social" ]],
|
||||||
|
['name' => ['fr' => "éducateur spécialisé" ]],
|
||||||
|
['name' => ['fr' => "infirmier.ère" ]],
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ( $categories as $val) {
|
||||||
|
print "Creating thirdparty category : " . $val['name']['fr'] . "\n";
|
||||||
|
$category = (new ThirdPartyCategory())
|
||||||
|
->setName($val['name'])
|
||||||
|
->setActive(true);
|
||||||
|
$manager->persist($category);
|
||||||
|
}
|
||||||
|
|
||||||
|
$manager->flush();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\ThirdPartyBundle\DataFixtures\ORM;
|
||||||
|
|
||||||
|
use Chill\ThirdPartyBundle\Entity\ThirdPartyCivility;
|
||||||
|
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||||
|
use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface;
|
||||||
|
use Doctrine\Persistence\ObjectManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class LoadThirdPartyCivility
|
||||||
|
* @package Chill\ThirdPartyBundle\DataFixtures\ORM
|
||||||
|
* @author Mathieu Jaumotte mathieu.jaumotte@champs-libres.coop
|
||||||
|
*/
|
||||||
|
class LoadThirdPartyCivility extends Fixture implements FixtureGroupInterface
|
||||||
|
{
|
||||||
|
public static function getGroups(): array
|
||||||
|
{
|
||||||
|
return ['thirdparty_civilities'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function load(ObjectManager $manager): void
|
||||||
|
{
|
||||||
|
$civilities = [
|
||||||
|
['name' => ['fr' => "Monsieur" ]],
|
||||||
|
['name' => ['fr' => "Madame" ]],
|
||||||
|
['name' => ['fr' => "Docteur" ]],
|
||||||
|
['name' => ['fr' => "Professeur" ]],
|
||||||
|
['name' => ['fr' => "Madame la Directrice" ]],
|
||||||
|
['name' => ['fr' => "Monsieur le Directeur" ]],
|
||||||
|
['name' => ['fr' => "Madame la Maire" ]],
|
||||||
|
['name' => ['fr' => "Monsieur le Maire" ]],
|
||||||
|
['name' => ['fr' => "Maître" ]],
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ( $civilities as $val) {
|
||||||
|
print "Creating thirdparty civility : " . $val['name']['fr'] . "\n";
|
||||||
|
$civility = (new ThirdPartyCivility())
|
||||||
|
->setName($val['name'])
|
||||||
|
->setActive(true);
|
||||||
|
$manager->persist($civility);
|
||||||
|
}
|
||||||
|
|
||||||
|
$manager->flush();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\ThirdPartyBundle\DataFixtures\ORM;
|
||||||
|
|
||||||
|
use Chill\ThirdPartyBundle\Entity\ThirdPartyProfession;
|
||||||
|
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||||
|
use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface;
|
||||||
|
use Doctrine\Persistence\ObjectManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class LoadThirdPartyProfession
|
||||||
|
* @package Chill\ThirdPartyBundle\DataFixtures\ORM
|
||||||
|
* @author Mathieu Jaumotte mathieu.jaumotte@champs-libres.coop
|
||||||
|
*/
|
||||||
|
class LoadThirdPartyProfession extends Fixture implements FixtureGroupInterface
|
||||||
|
{
|
||||||
|
public static function getGroups(): array
|
||||||
|
{
|
||||||
|
return ['thirdparty_professions'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function load(ObjectManager $manager)
|
||||||
|
{
|
||||||
|
$professions = [
|
||||||
|
['name' => ['fr' => "Directeur" ]],
|
||||||
|
['name' => ['fr' => "Docteur" ]],
|
||||||
|
['name' => ['fr' => "Médecin" ]],
|
||||||
|
['name' => ['fr' => "Opérateur" ]],
|
||||||
|
['name' => ['fr' => "Personnel administratif" ]],
|
||||||
|
['name' => ['fr' => "Président" ]],
|
||||||
|
['name' => ['fr' => "Responsable infirmier.ère" ]],
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ( $professions as $val) {
|
||||||
|
print "Creating thirdparty professions : " . $val['name']['fr'] . "\n";
|
||||||
|
$profession = (new ThirdPartyProfession())
|
||||||
|
->setName($val['name'])
|
||||||
|
->setActive(true);
|
||||||
|
$manager->persist($profession);
|
||||||
|
}
|
||||||
|
|
||||||
|
$manager->flush();
|
||||||
|
}
|
||||||
|
}
|
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
namespace Chill\ThirdPartyBundle\Entity;
|
namespace Chill\ThirdPartyBundle\Entity;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\User;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
@@ -41,13 +42,13 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
|||||||
* @ORM\Entity(repositoryClass="Chill\ThirdPartyBundle\Repository\ThirdPartyRepository")
|
* @ORM\Entity(repositoryClass="Chill\ThirdPartyBundle\Repository\ThirdPartyRepository")
|
||||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||||
* "thirdparty"=ThirdParty::class
|
* "thirdparty"=ThirdParty::class
|
||||||
*})
|
* })
|
||||||
|
* @ORM\HasLifecycleCallbacks()
|
||||||
*/
|
*/
|
||||||
class ThirdParty
|
class ThirdParty
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*
|
|
||||||
* @ORM\Column(name="id", type="integer")
|
* @ORM\Column(name="id", type="integer")
|
||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\GeneratedValue(strategy="AUTO")
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
@@ -56,15 +57,73 @@ class ThirdParty
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
|
||||||
* @ORM\Column(name="name", type="string", length=255)
|
* @ORM\Column(name="name", type="string", length=255)
|
||||||
* @Assert\Length(min="2")
|
* @Assert\Length(min="2")
|
||||||
*/
|
*/
|
||||||
private $name;
|
private $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [fr] Raison sociale
|
||||||
|
* @var string
|
||||||
|
* @ORM\Column(name="name_company", type="string", length=255, nullable=true)
|
||||||
|
* @Assert\Length(min="3")
|
||||||
|
*/
|
||||||
|
private $nameCompany;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [fr] Sigle
|
||||||
|
* @var string
|
||||||
|
* @ORM\Column(name="acronym", type="string", length=64, nullable=true)
|
||||||
|
* @Assert\Length(min="2")
|
||||||
|
*/
|
||||||
|
private $acronym;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ThirdPartyCategory
|
||||||
|
* @ORM\ManyToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdPartyCategory")
|
||||||
|
* @ORM\JoinTable(name="chill_3party.thirdparty_category",
|
||||||
|
* joinColumns={@ORM\JoinColumn(name="thirdparty_id", referencedColumnName="id")},
|
||||||
|
* inverseJoinColumns={@ORM\JoinColumn(name="category_id", referencedColumnName="id")})
|
||||||
|
*/
|
||||||
|
private $categories;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array|null
|
||||||
|
* @ORM\Column(name="types", type="json", nullable=true)
|
||||||
|
* @Assert\Count(min=1)
|
||||||
|
*/
|
||||||
|
private $type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contact Persons: One Institutional ThirdParty has Many Contact Persons
|
||||||
|
* @ORM\OneToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty", mappedBy="parent")
|
||||||
|
*/
|
||||||
|
private Collection $children;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Institutional ThirdParty: Many Contact Persons have One Institutional ThirdParty
|
||||||
|
* @ORM\ManyToOne(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty", inversedBy="children")
|
||||||
|
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
|
||||||
|
*/
|
||||||
|
private ?ThirdParty $parent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ThirdPartyCivility
|
||||||
|
* @ORM\OneToOne(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdPartyCivility")
|
||||||
|
* @ORM\JoinColumn(name="civility", referencedColumnName="id", nullable=true)
|
||||||
|
*/
|
||||||
|
private $civility;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [fr] Qualité
|
||||||
|
* @var ThirdPartyProfession
|
||||||
|
* @ORM\OneToOne(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdPartyProfession")
|
||||||
|
* @ORM\JoinColumn(name="profession", referencedColumnName="id", nullable=true)
|
||||||
|
*/
|
||||||
|
private $profession;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string|null
|
* @var string|null
|
||||||
*
|
|
||||||
* @ORM\Column(name="telephone", type="string", length=64, nullable=true)
|
* @ORM\Column(name="telephone", type="string", length=64, nullable=true)
|
||||||
* @Assert\Regex("/^([\+{1}])([0-9\s*]{4,20})$/",
|
* @Assert\Regex("/^([\+{1}])([0-9\s*]{4,20})$/",
|
||||||
* message="Invalid phone number: it should begin with the international prefix starting with ""+"", hold only digits and be smaller than 20 characters. Ex: +33123456789"
|
* message="Invalid phone number: it should begin with the international prefix starting with ""+"", hold only digits and be smaller than 20 characters. Ex: +33123456789"
|
||||||
@@ -74,41 +133,11 @@ class ThirdParty
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string|null
|
* @var string|null
|
||||||
*
|
|
||||||
* @ORM\Column(name="email", type="string", length=255, nullable=true)
|
* @ORM\Column(name="email", type="string", length=255, nullable=true)
|
||||||
* @Assert\Email(checkMX=false)
|
* @Assert\Email(checkMX=false)
|
||||||
*/
|
*/
|
||||||
private $email;
|
private $email;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="comment", type="text", nullable=true)
|
|
||||||
*/
|
|
||||||
private $comment;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array|null
|
|
||||||
*
|
|
||||||
* @ORM\Column(name="types", type="json", nullable=true)
|
|
||||||
* @Assert\Count(min=1)
|
|
||||||
*/
|
|
||||||
private $type;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var boolean
|
|
||||||
* @ORM\Column(name="active", type="boolean", options={"defaut": true})
|
|
||||||
*/
|
|
||||||
private $active = true;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Collection instances of Center
|
|
||||||
* @ORM\ManyToMany(targetEntity="\Chill\MainBundle\Entity\Center")
|
|
||||||
* @ORM\JoinTable(name="chill_3party.party_center")
|
|
||||||
* @Assert\Count(min=1)
|
|
||||||
*/
|
|
||||||
private $centers;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Address|null
|
* @var Address|null
|
||||||
* @ORM\ManyToOne(targetEntity="\Chill\MainBundle\Entity\Address",
|
* @ORM\ManyToOne(targetEntity="\Chill\MainBundle\Entity\Address",
|
||||||
@@ -117,12 +146,69 @@ class ThirdParty
|
|||||||
*/
|
*/
|
||||||
private $address;
|
private $address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var boolean
|
||||||
|
* @ORM\Column(name="active", type="boolean", options={"defaut": true})
|
||||||
|
*/
|
||||||
|
private $active = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string|null
|
||||||
|
* @ORM\Column(name="comment", type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
private $comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection
|
||||||
|
* @ORM\ManyToMany(targetEntity="\Chill\MainBundle\Entity\Center")
|
||||||
|
* @ORM\JoinTable(name="chill_3party.party_center")
|
||||||
|
* @Assert\Count(min=1)
|
||||||
|
*/
|
||||||
|
private $centers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(name="created_at", type="datetime_immutable", nullable=false)
|
||||||
|
*/
|
||||||
|
private \DateTimeImmutable $createdAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(name="updated_at", type="datetime", nullable=true)
|
||||||
|
*/
|
||||||
|
private ?\DateTime $updatedAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var User
|
||||||
|
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
|
||||||
|
* @ORM\JoinColumn(name="updated_by", referencedColumnName="id")
|
||||||
|
*/
|
||||||
|
private $updatedBy;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\PrePersist()
|
||||||
|
*/
|
||||||
|
public function prePersist()
|
||||||
|
{
|
||||||
|
$this->createdAt = new \DateTimeImmutable();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\PreUpdate()
|
||||||
|
*/
|
||||||
|
public function preUpdate()
|
||||||
|
{
|
||||||
|
$this->updatedAt = new \DateTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ThirdParty constructor.
|
* ThirdParty constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->centers = new ArrayCollection();
|
$this->centers = new ArrayCollection();
|
||||||
|
$this->categories = new ArrayCollection();
|
||||||
|
$this->children = new ArrayCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -342,4 +428,212 @@ class ThirdParty
|
|||||||
{
|
{
|
||||||
return $this->getName();
|
return $this->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
public function getNameCompany(): ?string
|
||||||
|
{
|
||||||
|
return $this->nameCompany;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $nameCompany
|
||||||
|
* @return ThirdParty
|
||||||
|
*/
|
||||||
|
public function setNameCompany(string $nameCompany): ThirdParty
|
||||||
|
{
|
||||||
|
$this->nameCompany = $nameCompany;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getAcronym(): ?string
|
||||||
|
{
|
||||||
|
return $this->acronym;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $acronym
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setAcronym(string $acronym): ThirdParty
|
||||||
|
{
|
||||||
|
$this->acronym = $acronym;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
public function getCategories(): Collection
|
||||||
|
{
|
||||||
|
return $this->categories;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ThirdPartyCategory $category
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function addCategory(ThirdPartyCategory $category): self
|
||||||
|
{
|
||||||
|
$this->categories[] = $category;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ThirdPartyCategory $category
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function removeCategory(ThirdPartyCategory $category): self
|
||||||
|
{
|
||||||
|
$this->categories->removeElement($category);
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isLeaf(): bool
|
||||||
|
{
|
||||||
|
return $this->children->count() !== 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection
|
||||||
|
*/
|
||||||
|
public function getChildren(): Collection
|
||||||
|
{
|
||||||
|
return $this->children;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ThirdParty $child
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function addChild(ThirdParty $child): self
|
||||||
|
{
|
||||||
|
$this->children[] = $child;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ThirdParty $child
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function removeChild(ThirdParty $child): self
|
||||||
|
{
|
||||||
|
$this->categories->removeElement($child);
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ThirdParty|null
|
||||||
|
*/
|
||||||
|
public function getParent(): ?ThirdParty
|
||||||
|
{
|
||||||
|
return $this->parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ThirdParty|null $parent
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setParent(?ThirdParty $parent): ThirdParty
|
||||||
|
{
|
||||||
|
$this->parent = $parent;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ThirdPartyCivility|null
|
||||||
|
*/
|
||||||
|
public function getCivility(): ?ThirdPartyCivility
|
||||||
|
{
|
||||||
|
return $this->civility;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ThirdPartyCivility $civility
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setCivility(ThirdPartyCivility $civility): ThirdParty
|
||||||
|
{
|
||||||
|
$this->civility = $civility;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ThirdPartyProfession
|
||||||
|
*/
|
||||||
|
public function getProfession(): ?ThirdPartyProfession
|
||||||
|
{
|
||||||
|
return $this->profession;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ThirdPartyProfession $profession
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setProfession(ThirdPartyProfession $profession): ThirdParty
|
||||||
|
{
|
||||||
|
$this->profession = $profession;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \DateTimeImmutable
|
||||||
|
*/
|
||||||
|
public function getCreatedAt(): \DateTimeImmutable
|
||||||
|
{
|
||||||
|
return $this->createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \DateTimeImmutable $createdAt
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setCreatedAt(\DateTimeImmutable $createdAt): ThirdParty
|
||||||
|
{
|
||||||
|
$this->createdAt = $createdAt;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \DateTime|null
|
||||||
|
*/
|
||||||
|
public function getUpdatedAt(): ?\DateTime
|
||||||
|
{
|
||||||
|
return $this->updatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \DateTime $updatedAt
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setUpdatedAt(\DateTime $updatedAt): ThirdParty
|
||||||
|
{
|
||||||
|
$this->updatedAt = $updatedAt;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return User|null
|
||||||
|
*/
|
||||||
|
public function getUpdatedBy(): ?User
|
||||||
|
{
|
||||||
|
return $this->updatedBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param User $updatedBy
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setUpdatedBy(User $updatedBy): ThirdParty
|
||||||
|
{
|
||||||
|
$this->updatedBy = $updatedBy;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2021, Champs Libres Cooperative SCRLFS,
|
||||||
|
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Chill\ThirdPartyBundle\Entity;
|
||||||
|
|
||||||
|
use Chill\ThirdPartyBundle\Repository\ThirdPartyCategoryRepository;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Table(name="chill_3party.party_category")
|
||||||
|
* @ORM\Entity(repositoryClass=ThirdPartyCategoryRepository::class)
|
||||||
|
*/
|
||||||
|
class ThirdPartyCategory
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @ORM\Id
|
||||||
|
* @ORM\GeneratedValue
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="json")
|
||||||
|
*/
|
||||||
|
private $name = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $active = true;
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName(): ?array
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName(array $name): self
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getActive(): ?bool
|
||||||
|
{
|
||||||
|
return $this->active;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setActive(bool $active): self
|
||||||
|
{
|
||||||
|
$this->active = $active;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2021, Champs Libres Cooperative SCRLFS,
|
||||||
|
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Chill\ThirdPartyBundle\Entity;
|
||||||
|
|
||||||
|
use Chill\ThirdPartyBundle\Repository\ThirdPartyCivilityRepository;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Table(name="chill_3party.party_civility")
|
||||||
|
* @ORM\Entity(repositoryClass=ThirdPartyCivilityRepository::class)
|
||||||
|
*/
|
||||||
|
class ThirdPartyCivility
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @ORM\Id
|
||||||
|
* @ORM\GeneratedValue
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="json")
|
||||||
|
*/
|
||||||
|
private $name = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $active = true;
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName(): ?array
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName(array $name): self
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getActive(): ?bool
|
||||||
|
{
|
||||||
|
return $this->active;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setActive(bool $active): self
|
||||||
|
{
|
||||||
|
$this->active = $active;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2021, Champs Libres Cooperative SCRLFS,
|
||||||
|
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Chill\ThirdPartyBundle\Entity;
|
||||||
|
|
||||||
|
use Chill\ThirdPartyBundle\Repository\ThirdPartyProfessionRepository;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Table(name="chill_3party.party_profession")
|
||||||
|
* @ORM\Entity(repositoryClass=ThirdPartyProfessionRepository::class)
|
||||||
|
*/
|
||||||
|
class ThirdPartyProfession
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @ORM\Id
|
||||||
|
* @ORM\GeneratedValue
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="json")
|
||||||
|
*/
|
||||||
|
private $name = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $active = true;
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName(): ?array
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName(array $name): self
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getActive(): ?bool
|
||||||
|
{
|
||||||
|
return $this->active;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setActive(bool $active): self
|
||||||
|
{
|
||||||
|
$this->active = $active;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
@@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
namespace Chill\ThirdPartyBundle\Form;
|
namespace Chill\ThirdPartyBundle\Form;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
||||||
|
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||||
|
use Chill\ThirdPartyBundle\Entity\ThirdPartyCategory;
|
||||||
|
use Chill\ThirdPartyBundle\Entity\ThirdPartyCivility;
|
||||||
|
use Chill\ThirdPartyBundle\Entity\ThirdPartyProfession;
|
||||||
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Doctrine\ORM\QueryBuilder;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
@@ -20,34 +27,26 @@ use Chill\MainBundle\Form\Type\AddressType;
|
|||||||
|
|
||||||
class ThirdPartyType extends AbstractType
|
class ThirdPartyType extends AbstractType
|
||||||
{
|
{
|
||||||
/**
|
protected AuthorizationHelper $authorizationHelper;
|
||||||
*
|
|
||||||
* @var AuthorizationHelper
|
protected TokenStorageInterface $tokenStorage;
|
||||||
*/
|
|
||||||
protected $authorizationHelper;
|
protected ThirdPartyTypeManager $typesManager;
|
||||||
|
|
||||||
/**
|
protected TranslatableStringHelper $translatableStringHelper;
|
||||||
*
|
|
||||||
* @var TokenStorageInterface
|
|
||||||
*/
|
|
||||||
protected $tokenStorage;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @var ThirdPartyTypeManager
|
|
||||||
*/
|
|
||||||
protected $typesManager;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
AuthorizationHelper $authorizationHelper,
|
AuthorizationHelper $authorizationHelper,
|
||||||
TokenStorageInterface $tokenStorage,
|
TokenStorageInterface $tokenStorage,
|
||||||
ThirdPartyTypeManager $typesManager
|
ThirdPartyTypeManager $typesManager,
|
||||||
|
TranslatableStringHelper $translatableStringHelper
|
||||||
) {
|
) {
|
||||||
$this->authorizationHelper = $authorizationHelper;
|
$this->authorizationHelper = $authorizationHelper;
|
||||||
$this->tokenStorage = $tokenStorage;
|
$this->tokenStorage = $tokenStorage;
|
||||||
$this->typesManager = $typesManager;
|
$this->typesManager = $typesManager;
|
||||||
|
$this->translatableStringHelper = $translatableStringHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@@ -57,11 +56,31 @@ class ThirdPartyType extends AbstractType
|
|||||||
foreach ($this->typesManager->getProviders() as $key => $provider) {
|
foreach ($this->typesManager->getProviders() as $key => $provider) {
|
||||||
$types['chill_3party.key_label.'.$key] = $key;
|
$types['chill_3party.key_label.'.$key] = $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
->add('name', TextType::class, [
|
->add('name', TextType::class, [
|
||||||
'required' => true
|
'required' => true
|
||||||
])
|
])
|
||||||
|
->add('categories', EntityType::class, [
|
||||||
|
'label' => 'thirdparty.Categories',
|
||||||
|
'class' => ThirdPartyCategory::class,
|
||||||
|
'choice_label' => function (ThirdPartyCategory $category): string {
|
||||||
|
return $this->translatableStringHelper->localize($category->getName());
|
||||||
|
},
|
||||||
|
'query_builder' => function (EntityRepository $er): QueryBuilder {
|
||||||
|
return $er->createQueryBuilder('c')
|
||||||
|
->where('c.active = true');
|
||||||
|
},
|
||||||
|
'required' => true,
|
||||||
|
'multiple' => true,
|
||||||
|
'attr' => ['class' => 'select2']
|
||||||
|
])
|
||||||
|
->add('type', ChoiceType::class, [
|
||||||
|
'choices' => $types,
|
||||||
|
'expanded' => true,
|
||||||
|
'multiple' => true,
|
||||||
|
'label' => 'thirdparty.Type'
|
||||||
|
])
|
||||||
->add('telephone', TextType::class, [
|
->add('telephone', TextType::class, [
|
||||||
'label' => 'Phonenumber',
|
'label' => 'Phonenumber',
|
||||||
'required' => false
|
'required' => false
|
||||||
@@ -69,16 +88,13 @@ class ThirdPartyType extends AbstractType
|
|||||||
->add('email', EmailType::class, [
|
->add('email', EmailType::class, [
|
||||||
'required' => false
|
'required' => false
|
||||||
])
|
])
|
||||||
->add('comment', TextareaType::class, [
|
->add('address', AddressType::class, [
|
||||||
|
'has_valid_from' => false,
|
||||||
|
'null_if_empty' => true,
|
||||||
'required' => false
|
'required' => false
|
||||||
])
|
])
|
||||||
->add('type', ChoiceType::class, [
|
|
||||||
'choices' => $types,
|
|
||||||
'expanded' => true,
|
|
||||||
'multiple' => true,
|
|
||||||
'label' => 'thirdparty.Type'
|
|
||||||
])
|
|
||||||
->add('active', ChoiceType::class, [
|
->add('active', ChoiceType::class, [
|
||||||
|
'label' => 'thirdparty.Status',
|
||||||
'choices' => [
|
'choices' => [
|
||||||
'Active, shown to users' => true,
|
'Active, shown to users' => true,
|
||||||
'Inactive, not shown to users' => false
|
'Inactive, not shown to users' => false
|
||||||
@@ -86,22 +102,65 @@ class ThirdPartyType extends AbstractType
|
|||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'multiple' => false
|
'multiple' => false
|
||||||
])
|
])
|
||||||
|
->add('comment', ChillTextareaType::class, [
|
||||||
|
'required' => false
|
||||||
|
])
|
||||||
->add('centers', EntityType::class, [
|
->add('centers', EntityType::class, [
|
||||||
'choices' => $this->getReachableCenters($options),
|
'choices' => $this->getReachableCenters($options),
|
||||||
'class' => \Chill\MainBundle\Entity\Center::class,
|
'class' => \Chill\MainBundle\Entity\Center::class,
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'expanded' => true
|
'attr' => ['class' => 'select2']
|
||||||
])
|
|
||||||
->add('address', AddressType::class, [
|
|
||||||
'has_valid_from' => false,
|
|
||||||
'null_if_empty' => true,
|
|
||||||
'required' => false
|
|
||||||
])
|
])
|
||||||
|
;
|
||||||
|
|
||||||
|
// Contact Person ThirdParty (child)
|
||||||
|
if ($options['data']->isLeaf()) {
|
||||||
|
$builder
|
||||||
|
->add('civility', EntityType::class, [
|
||||||
|
'label' => 'thirdparty.Civility',
|
||||||
|
'class' => ThirdPartyCivility::class,
|
||||||
|
'choice_label' => function (ThirdPartyCivility $civility): string {
|
||||||
|
return $this->translatableStringHelper->localize($civility->getName());
|
||||||
|
},
|
||||||
|
'query_builder' => function (EntityRepository $er): QueryBuilder {
|
||||||
|
return $er->createQueryBuilder('c')
|
||||||
|
->where('c.active = true');
|
||||||
|
},
|
||||||
|
'placeholder' => 'thirdparty.choose civility',
|
||||||
|
'required' => true
|
||||||
|
])
|
||||||
|
->add('profession', EntityType::class, [
|
||||||
|
'label' => 'thirdparty.Profession',
|
||||||
|
'class' => ThirdPartyProfession::class,
|
||||||
|
'choice_label' => function (ThirdPartyProfession $profession): string {
|
||||||
|
return $this->translatableStringHelper->localize($profession->getName());
|
||||||
|
},
|
||||||
|
'query_builder' => function (EntityRepository $er): QueryBuilder {
|
||||||
|
return $er->createQueryBuilder('p')
|
||||||
|
->where('p.active = true');
|
||||||
|
},
|
||||||
|
'placeholder' => 'thirdparty.choose profession',
|
||||||
|
'required' => false
|
||||||
|
])
|
||||||
;
|
;
|
||||||
|
|
||||||
|
// Institutional ThirdParty (parent)
|
||||||
|
} else {
|
||||||
|
$builder
|
||||||
|
->add('nameCompany', TextType::class, [
|
||||||
|
'label' => 'thirdparty.NameCompany',
|
||||||
|
'required' => false
|
||||||
|
])
|
||||||
|
->add('acronym', TextType::class, [
|
||||||
|
'label' => 'thirdparty.Acronym',
|
||||||
|
'required' => false
|
||||||
|
])
|
||||||
|
;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param array $options
|
* @param array $options
|
||||||
* @return \Chill\MainBundle\Entity\Center[]
|
* @return \Chill\MainBundle\Entity\Center[]
|
||||||
*/
|
*/
|
||||||
@@ -113,11 +172,11 @@ class ThirdPartyType extends AbstractType
|
|||||||
case 'update': $role = new Role(ThirdPartyVoter::UPDATE);
|
case 'update': $role = new Role(ThirdPartyVoter::UPDATE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->authorizationHelper->getReachableCenters(
|
return $this->authorizationHelper->getReachableCenters(
|
||||||
$this->tokenStorage->getToken()->getUser(), $role);
|
$this->tokenStorage->getToken()->getUser(), $role);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@@ -126,7 +185,7 @@ class ThirdPartyType extends AbstractType
|
|||||||
$resolver->setDefaults(array(
|
$resolver->setDefaults(array(
|
||||||
'data_class' => 'Chill\ThirdPartyBundle\Entity\ThirdParty'
|
'data_class' => 'Chill\ThirdPartyBundle\Entity\ThirdParty'
|
||||||
));
|
));
|
||||||
|
|
||||||
$resolver->setRequired('usage')
|
$resolver->setRequired('usage')
|
||||||
->setAllowedValues('usage', ['create', 'update'])
|
->setAllowedValues('usage', ['create', 'update'])
|
||||||
;
|
;
|
||||||
|
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2021, Champs Libres Cooperative SCRLFS,
|
||||||
|
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Chill\ThirdPartyBundle\Repository;
|
||||||
|
|
||||||
|
use Chill\ThirdPartyBundle\Entity\ThirdPartyCategory;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method ThirdPartyCategory|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method ThirdPartyCategory|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method ThirdPartyCategory[] findAll()
|
||||||
|
* @method ThirdPartyCategory[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class ThirdPartyCategoryRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, ThirdPartyCategory::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2021, Champs Libres Cooperative SCRLFS,
|
||||||
|
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Chill\ThirdPartyBundle\Repository;
|
||||||
|
|
||||||
|
use Chill\ThirdPartyBundle\Entity\ThirdPartyCivility;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method ThirdPartyCivility|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method ThirdPartyCivility|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method ThirdPartyCivility[] findAll()
|
||||||
|
* @method ThirdPartyCivility[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class ThirdPartyCivilityRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, ThirdPartyCivility::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* Copyright (C) 2021, Champs Libres Cooperative SCRLFS,
|
||||||
|
* <http://www.champs-libres.coop>, <info@champs-libres.coop>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Chill\ThirdPartyBundle\Repository;
|
||||||
|
|
||||||
|
use Chill\ThirdPartyBundle\Entity\ThirdPartyProfession;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method ThirdPartyProfession|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method ThirdPartyProfession|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method ThirdPartyProfession[] findAll()
|
||||||
|
* @method ThirdPartyProfession[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class ThirdPartyProfessionRepository extends ServiceEntityRepository
|
||||||
|
{
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, ThirdPartyProfession::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -1,3 +1,13 @@
|
|||||||
|
///
|
||||||
|
div.thirdparty-list {
|
||||||
|
label.counter {
|
||||||
|
float: right;
|
||||||
|
span {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// render_box
|
/// render_box
|
||||||
section.chill-entity {
|
section.chill-entity {
|
||||||
.entity-thirdparty {
|
.entity-thirdparty {
|
||||||
|
@@ -0,0 +1,103 @@
|
|||||||
|
<template>
|
||||||
|
<div class="item-bloc col">
|
||||||
|
<section class="chill-entity entity-thirdparty">
|
||||||
|
<div class="item-row entity-bloc">
|
||||||
|
|
||||||
|
<div class="item-col">
|
||||||
|
<div class="entity-label">
|
||||||
|
|
||||||
|
<div :class="'denomination h' + options.hLevel">
|
||||||
|
|
||||||
|
<a v-if="this.options.addLink == true" href="#">
|
||||||
|
<span class="name">{{ thirdparty.text }}</span>
|
||||||
|
</a>
|
||||||
|
<span class="name">{{ thirdparty.text }}</span>
|
||||||
|
|
||||||
|
<span v-if="options.addId == true" class="id-number" :title="'n° ' + thirdparty.id">{{ thirdparty.id }}</span>
|
||||||
|
<span v-if="options.addEntity == true && thirdparty.type == 'thirdparty'" class="badge rounded-pill bg-secondary">{{ $t('renderbox.type.thirdparty') }}</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p v-if="this.options.addInfo == true" class="moreinfo">
|
||||||
|
<i v-if="thirdparty.birthdate" :class="'fa fa-fw ' + getGenderIcon" title="{{ getGender }}"></i>
|
||||||
|
<time v-if="thirdparty.birthdate" datetime="{{ thirdparty.birthdate.datetime }}" title="{{ birthdate }}">
|
||||||
|
{{ $t(getGender) + ' ' + $d(birthdate, 'short') }}
|
||||||
|
</time>
|
||||||
|
<time v-else-if="thirdparty.deathdate" datetime="{{ thirdparty.deathdate.datetime }}" title="{{ thirdparty.deathdate }}">
|
||||||
|
{{ birthdate }} - {{ deathdate }}
|
||||||
|
</time>
|
||||||
|
<span class="age">{{ thirdparty.age }}</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="item-col separator">
|
||||||
|
<ul class="list-content fa-ul">
|
||||||
|
<li v-if="thirdparty.address">
|
||||||
|
<i class="fa fa-li fa-map-marker"></i>
|
||||||
|
<show-address :address="thirdparty.address" :isMultiline="isMultiline"></show-address>
|
||||||
|
</li>
|
||||||
|
<li v-if="thirdparty.telephone">
|
||||||
|
<i class="fa fa-li fa-mobile"></i>
|
||||||
|
<a :href="'tel: ' + thirdparty.telephone">{{ thirdparty.telephone }}</a>
|
||||||
|
</li>
|
||||||
|
<li v-if="thirdparty.email">
|
||||||
|
<i class="fa fa-li fa-envelope-o"></i>
|
||||||
|
<a :href="'mailto: ' + thirdparty.email">{{ thirdparty.email }}</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<slot name="record-actions"></slot>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ShowAddress from 'ChillMainAssets/vuejs/Address/components/ShowAddress.vue';
|
||||||
|
import {dateToISO} from 'ChillMainAssets/chill/js/date.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ThirdPartyRenderBox",
|
||||||
|
components: {
|
||||||
|
ShowAddress
|
||||||
|
},
|
||||||
|
props: ['thirdparty', 'options'],
|
||||||
|
computed: {
|
||||||
|
isMultiline: function() {
|
||||||
|
if(this.options.isMultiline){
|
||||||
|
return this.options.isMultiline
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getGender: function() {
|
||||||
|
return this.thirdparty.gender == 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man';
|
||||||
|
},
|
||||||
|
getGenderIcon: function() {
|
||||||
|
return this.thirdparty.gender == 'woman' ? 'fa-venus' : this.thirdparty.gender == 'man' ? 'fa-mars' : 'fa-neuter';
|
||||||
|
},
|
||||||
|
birthdate: function(){
|
||||||
|
var date = new Date(this.thirdparty.birthdate.datetime);
|
||||||
|
return dateToISO(date);
|
||||||
|
},
|
||||||
|
deathdate: function(){
|
||||||
|
var date = new Date(this.thirdparty.deathdate.datetime);
|
||||||
|
return dateToISO(date);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.name{
|
||||||
|
&:before{
|
||||||
|
content: " "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
@@ -0,0 +1,80 @@
|
|||||||
|
<template>
|
||||||
|
<!-- !!!! DATA still hardcoded until endpoint is fixed -->
|
||||||
|
|
||||||
|
<div v-if="action === 'show'">
|
||||||
|
<div class="flex-table">
|
||||||
|
<third-party-render-box
|
||||||
|
:thirdparty="thirdparty"
|
||||||
|
:options="{
|
||||||
|
addInfo: true,
|
||||||
|
addEntity: false,
|
||||||
|
addAltNames: true,
|
||||||
|
addId: true,
|
||||||
|
addLink: false,
|
||||||
|
hLevel: 3,
|
||||||
|
addCenter: true,
|
||||||
|
addNoData: true,
|
||||||
|
isMultiline: true
|
||||||
|
}"
|
||||||
|
></third-party-render-box>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="action === 'edit' || action === 'create'">
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control form-control-lg" id="firstname" v-model="thirdparty.firstName" v-bind:placeholder="$t('thirdparty.firstname')" />
|
||||||
|
<label for="firstname">{{ $t('thirdparty.firstname') }}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control form-control-lg" id="lastname" v-model="thirdparty.lastName" v-bind:placeholder="$t('thirdparty.lastname')" />
|
||||||
|
<label for="lastname">{{ $t('thirdparty.lastname') }}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
<span class="input-group-text" id="email"><i class="fa fa-fw fa-envelope"></i></span>
|
||||||
|
<input class="form-control form-control-lg"
|
||||||
|
v-model="thirdparty.email"
|
||||||
|
v-bind:placeholder="$t('thirdparty.email')"
|
||||||
|
v-bind:aria-label="$t('thirdparty.email')"
|
||||||
|
aria-describedby="email" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
<span class="input-group-text" id="phonenumber"><i class="fa fa-fw fa-phone"></i></span>
|
||||||
|
<input class="form-control form-control-lg"
|
||||||
|
v-model="thirdparty.telephone"
|
||||||
|
v-bind:placeholder="$t('thirdparty.phonenumber')"
|
||||||
|
v-bind:aria-label="$t('thirdparty.phonenumber')"
|
||||||
|
aria-describedby="phonenumber" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ThirdPartyRenderBox from '../Entity/ThirdPartyRenderBox.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "OnTheFlyThirdParty",
|
||||||
|
props: ['id', 'type', 'action'],
|
||||||
|
components: {
|
||||||
|
ThirdPartyRenderBox,
|
||||||
|
},
|
||||||
|
data: function() {
|
||||||
|
return {
|
||||||
|
thirdparty: {
|
||||||
|
text : "Bart Maes",
|
||||||
|
firstName : "Bart",
|
||||||
|
lastName : "Maes",
|
||||||
|
email : "bartmaes@gmail.com",
|
||||||
|
telephone : "0475 94 66 15",
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// TODO move in ChillThirdpartyAssets
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="css" scoped>
|
||||||
|
</style>
|
@@ -94,13 +94,12 @@
|
|||||||
|
|
||||||
{% if options['customButtons']['replace'] is defined %}
|
{% if options['customButtons']['replace'] is defined %}
|
||||||
{{ options['customButtons']['replace'] }}
|
{{ options['customButtons']['replace'] }}
|
||||||
{% elseif is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) %}
|
{% elseif is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) %}
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show thirdparty'|trans }}"
|
<a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show thirdparty'|trans }}"
|
||||||
href="{{ path('chill_3party_3party_show', { thirdparty_id: thirdparty.id }) }}"></a>
|
href="{{ path('chill_3party_3party_show', { thirdparty_id: thirdparty.id }) }}"></a>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
{# rien faire ? j'ai eu un bug car options['customButtons'] était vide (marc) #}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if options['customButtons']['after'] is defined %}
|
{% if options['customButtons']['after'] is defined %}
|
||||||
|
@@ -3,64 +3,107 @@
|
|||||||
{% block title 'List of third parties'|trans %}
|
{% block title 'List of third parties'|trans %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="col-10 centered">
|
<div class="thirdparty-list my-5">
|
||||||
<h1>{{ 'List of third parties'|trans }}</h1>
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-10 col-xxl">
|
||||||
{% if third_parties|length == 0 %}
|
|
||||||
<p class="chill-no-data-statement">{{ 'No third parties'|trans }}</p>
|
|
||||||
{% else %}
|
|
||||||
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width: 35px;"></th>
|
|
||||||
<th>{{ 'Name'|trans }}</th>
|
|
||||||
<th>{{ 'Category'|trans }}</th>
|
|
||||||
<th> </th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for tp in third_parties %}
|
|
||||||
<tr>
|
|
||||||
<th>{{ (tp.active ? '<i class="fa fa-check chill-green">' : '<i class="fa fa-times chill-red">')|raw }}</th>
|
|
||||||
<td>{{ tp.name }}</td>
|
|
||||||
{% set types = [] %}
|
|
||||||
{% for t in tp.type %}
|
|
||||||
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
|
|
||||||
{% endfor %}
|
|
||||||
<td>{{ types|join(', ') }}</td>
|
|
||||||
<td>
|
|
||||||
<ul class="record_actions">
|
|
||||||
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ chill_path_add_return_path('chill_3party_3party_update', { 'thirdparty_id': tp.id }) }}" class="btn btn-update"></a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ chill_path_add_return_path('chill_3party_3party_show', { 'thirdparty_id': tp.id }) }}" class="btn btn-show"></a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
{% if third_parties|length < pagination.getTotalItems %}
|
<h1>{{ 'List of third parties'|trans }}</h1>
|
||||||
{{ chill_pagination(pagination) }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endif %}
|
{% if third_parties|length == 0 %}
|
||||||
|
<p class="chill-no-data-statement">{{ 'No third parties'|trans }}</p>
|
||||||
|
{% else %}
|
||||||
|
|
||||||
{% if is_granted('CHILL_3PARTY_3PARTY_CREATE') %}
|
<nav class="filter-actions border border-secondary my-4 p-3">
|
||||||
<ul class="record_actions">
|
<i>outils de filtrage</i>
|
||||||
<li>
|
</nav>
|
||||||
<a href="{{ chill_path_add_return_path('chill_3party_3party_new') }}" class="btn btn-create">
|
|
||||||
{{ "New third party"|trans }}
|
</div>
|
||||||
</a>
|
</div>
|
||||||
{% endif %}
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-10 col-xxl">
|
||||||
|
|
||||||
|
<label class="counter">
|
||||||
|
<span>{{ pagination.totalItems }}</span> {{ 'third parties'|trans }}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<table class="table table-striped table-hover align-middle">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="chill-pink" style="width: 35px;"></th>
|
||||||
|
<th class="chill-pink">{{ 'Name'|trans }}
|
||||||
|
<i class="fa fa-fw fa-sort"></i>
|
||||||
|
</th>
|
||||||
|
<th class="chill-pink">{{ 'Category'|trans }}
|
||||||
|
<i class="fa fa-fw fa-sort"></i>
|
||||||
|
</th>
|
||||||
|
<th class="chill-pink">{{ 'Address'|trans }}
|
||||||
|
<i class="fa fa-fw fa-sort"></i>
|
||||||
|
</th>
|
||||||
|
<th class="chill-pink">{{ 'thirdparty.UpdatedAt.short'|trans }}
|
||||||
|
<i class="fa fa-fw fa-sort"></i>
|
||||||
|
</th>
|
||||||
|
<th class="chill-pink"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for tp in third_parties %}
|
||||||
|
<tr>
|
||||||
|
<th>{{ (tp.active ? '<i class="fa fa-check chill-green">' : '<i class="fa fa-times chill-red">')|raw }}</th>
|
||||||
|
<td>{{ tp.name }}</td>
|
||||||
|
{% set types = [] %}
|
||||||
|
{% for t in tp.type %}
|
||||||
|
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
|
||||||
|
{% endfor %}
|
||||||
|
<td>{{ types|join(', ') }}</td>
|
||||||
|
<td>
|
||||||
|
{{ tp.address|chill_entity_render_box({'multiline': false, 'with_valid_from': false}) }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if tp.updatedAt != null %}
|
||||||
|
{{ tp.updatedAt|format_date('short') }}
|
||||||
|
{% else %}
|
||||||
|
{{ tp.createdAt|format_date('short') }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<ul class="record_actions">
|
||||||
|
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ chill_path_add_return_path('chill_3party_3party_update', { 'thirdparty_id': tp.id }) }}" class="btn btn-update"></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if is_granted('CHILL_3PARTY_3PARTY_SHOW', tp) %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ chill_path_add_return_path('chill_3party_3party_show', { 'thirdparty_id': tp.id }) }}" class="btn btn-show"></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
{% if third_parties|length < pagination.getTotalItems %}
|
||||||
|
{{ chill_pagination(pagination, 'long') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
<li class="cancel">
|
||||||
|
{{ chill_items_per_page(pagination) }}
|
||||||
|
</li>
|
||||||
|
{% if is_granted('CHILL_3PARTY_3PARTY_CREATE') %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ chill_path_add_return_path('chill_3party_3party_new') }}" class="btn btn-create">
|
||||||
|
{{ "New third party"|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -3,32 +3,58 @@
|
|||||||
{% block title 'Create third party'|trans %}
|
{% block title 'Create third party'|trans %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="col-10 centered">
|
<div class="thirdparty-new my-5">
|
||||||
<h1>{{ 'Create third party'|trans }}</h1>
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-md-10 col-xxl">
|
||||||
|
|
||||||
{{ form_start(form) }}
|
<h1>{{ 'Create third party'|trans }}</h1>
|
||||||
{{ form_row(form.name) }}
|
|
||||||
{{ form_row(form.type) }}
|
|
||||||
{{ form_row(form.telephone) }}
|
|
||||||
{{ form_row(form.email) }}
|
|
||||||
{{ form_row(form.address) }}
|
|
||||||
|
|
||||||
{{ form_row(form.active) }}
|
|
||||||
{{ form_row(form.centers) }}
|
|
||||||
{{ form_row(form.comment) }}
|
|
||||||
|
|
||||||
|
{{ form_start(form) }}
|
||||||
|
|
||||||
<ul class="record_actions">
|
{% if form.civility is defined %}
|
||||||
<li class="cancel">
|
{{ form_row(form.civility) }}
|
||||||
<a href="{{ chill_return_path_or('chill_3party_3party_index') }}" class="btn btn-cancel">
|
{% endif %}
|
||||||
{{ 'Back to the list'|trans }}
|
|
||||||
</a>
|
{{ form_row(form.name) }}
|
||||||
</li>
|
|
||||||
<li>
|
{% if form.nameCompany is defined %}
|
||||||
{{ form_widget(form.submit, {'label': 'Create', 'attr': {'class': 'btn btn-new' }}) }}
|
{{ form_row(form.nameCompany) }}
|
||||||
</li>
|
{{ form_row(form.acronym) }}
|
||||||
</ul>
|
{% endif %}
|
||||||
|
|
||||||
{{ form_end(form) }}
|
{% if form.profession is defined %}
|
||||||
|
{{ form_row(form.profession) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ form_row(form.categories) }}
|
||||||
|
{{ form_row(form.type) }}
|
||||||
|
|
||||||
|
{{ form_row(form.telephone) }}
|
||||||
|
{{ form_row(form.email) }}
|
||||||
|
{{ form_row(form.address) }}
|
||||||
|
|
||||||
|
{{ form_row(form.comment) }}
|
||||||
|
{{ form_row(form.centers) }}
|
||||||
|
|
||||||
|
{{ form_row(form.active) }}
|
||||||
|
|
||||||
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
<li class="cancel">
|
||||||
|
<a href="{{ chill_return_path_or('chill_3party_3party_index') }}" class="btn btn-cancel">
|
||||||
|
{{ 'Back to the list'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{{ form_widget(form.submit, {'label': 'Create', 'attr': {'class': 'btn btn-new' }}) }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{{ form_end(form) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -5,61 +5,118 @@
|
|||||||
{% block title title_ %}
|
{% block title title_ %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="col-10 centered">
|
<div class="thirdparty-show my-5">
|
||||||
<h1>
|
<div class="row justify-content-center">
|
||||||
{{ title_ }}
|
<div class="col-md-10 col-xxl">
|
||||||
<span class="chill__box {{ thirdParty.active ? 'green' : 'red' }}">{{ (thirdParty.active ? 'Active, shown to users' : 'Inactive, not shown to users')|trans }}</span>
|
|
||||||
</h1>
|
<h1>
|
||||||
|
{{ title_ }}
|
||||||
<dl class="chill_view_data">
|
<span class="badge bg-{{ thirdParty.active ? 'success' : 'danger' }}"
|
||||||
<dt>{{ 'Name'|trans }}</dt>
|
title="{{ (thirdParty.active ? 'shown to users' : 'not shown to users')|trans }}">
|
||||||
<dd>{{ thirdParty.name }}</dd>
|
{{ (thirdParty.active ? 'Active' : 'Inactive')|trans }}
|
||||||
|
</span>
|
||||||
<dt>{{ 'Type'|trans }}</dt>
|
</h1>
|
||||||
{% set types = [] %}
|
|
||||||
{% for t in thirdParty.type %}
|
|
||||||
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
|
<dl class="chill_view_data">
|
||||||
{% endfor %}
|
|
||||||
<dd>{{ types|join(', ') }}</dd>
|
<dt>{{ 'Name'|trans }}</dt>
|
||||||
|
<dd>
|
||||||
<dt>{{ 'Centers'|trans }}</dt>
|
{% if thirdParty.isLeaf == true %}{{ thirdParty.civility }}{% endif %}
|
||||||
<dd>{{ 'The party is visible in those centers'|trans }} : {{ thirdParty.centers|join(', ') }}</dd>
|
{{ thirdParty.name }}
|
||||||
|
</dd>
|
||||||
<dt>{{ 'Phonenumber'|trans }}</dt>
|
|
||||||
<dd>{{ thirdParty.telephone|chill_print_or_message("thirdparty.No_phonenumber") }}</dd>
|
{% if thirdParty.isLeaf == false %}
|
||||||
|
<dt>{{ 'thirdparty.NameCompany'|trans }}</dt>
|
||||||
<dt>{{ 'email'|trans }}<dt>
|
<dd>
|
||||||
<dd>{{ thirdParty.email|chill_print_or_message("thirdparty.No_email") }}</dd>
|
{% if thirdParty.nameCompany == null %}
|
||||||
|
<span class="chill-no-data-statement">{{ 'No nameCompany given'|trans }}</span>
|
||||||
<dt>{{ 'Address'|trans }}</dt>
|
{% else %}
|
||||||
<dd>
|
{{ thirdParty.nameCompany }}
|
||||||
{% if thirdParty.address == null %}
|
{% endif %}
|
||||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
</dd>
|
||||||
{% else %}
|
|
||||||
{{ thirdParty.address|chill_entity_render_box({'with_valid_from': false }) }}
|
<dt>{{ 'thirdparty.Acronym'|trans }}</dt>
|
||||||
{% endif %}
|
<dd>
|
||||||
</dd>
|
{% if thirdParty.acronym == null %}
|
||||||
|
<span class="chill-no-data-statement">{{ 'No acronym given'|trans }}</span>
|
||||||
<dt>{{ 'Comment'|trans }}</dt>
|
{% else %}
|
||||||
<dd>{{ thirdParty.comment|chill_print_or_message("thirdparty.No_comment") }}</dd>
|
{{ thirdParty.acronym }}
|
||||||
|
{% endif %}
|
||||||
</dl>
|
</dd>
|
||||||
|
{% endif %}
|
||||||
<ul class="record_actions">
|
|
||||||
<li class="cancel">
|
<dt>{{ 'Type'|trans }}</dt>
|
||||||
<a class="btn btn-cancel" href="{{ chill_return_path_or('chill_3party_3party_index') }}">
|
{% set types = [] %}
|
||||||
{{ 'Cancel'|trans }}
|
{% for t in thirdParty.type %}
|
||||||
</a>
|
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
|
||||||
</li>
|
{% endfor %}
|
||||||
|
<dd>
|
||||||
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', thirdParty) %}
|
{{ types|join(', ') }}
|
||||||
<li>
|
</dd>
|
||||||
<a class="btn btn-update" href="{{ chill_path_forward_return_path('chill_3party_3party_update', { 'thirdparty_id': thirdParty.id }) }}">
|
|
||||||
{{ 'Update'|trans }}
|
<dt>{{ 'Phonenumber'|trans }}</dt>
|
||||||
</a>
|
<dd>
|
||||||
</li>
|
{% if thirdParty.telephone == null %}
|
||||||
{% endif %}
|
<span class="chill-no-data-statement">{{ 'No phone given'|trans }}</span>
|
||||||
</ul>
|
{% else %}
|
||||||
|
<a href="{{ 'tel:' ~ thirdParty.telephone }}">
|
||||||
|
{{ thirdParty.telephone|chill_print_or_message("thirdparty.No_phonenumber") }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt>{{ 'email'|trans }}<dt>
|
||||||
|
<dd>
|
||||||
|
{% if thirdParty.email == null %}
|
||||||
|
<span class="chill-no-data-statement">{{ 'No email given'|trans }}</span>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ 'mailto:' ~ thirdParty.email }}">
|
||||||
|
{{ thirdParty.email|chill_print_or_message("thirdparty.No_email") }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt>{{ 'Address'|trans }}</dt>
|
||||||
|
<dd>
|
||||||
|
{% if thirdParty.address == null %}
|
||||||
|
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||||
|
{% else %}
|
||||||
|
{{ thirdParty.address|chill_entity_render_box({'with_valid_from': false }) }}
|
||||||
|
{% endif %}
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt>{{ 'Comment'|trans }}</dt>
|
||||||
|
<dd>
|
||||||
|
{% if thirdParty.comment is not empty %}
|
||||||
|
<blockquote class="chill-user-quote">
|
||||||
|
{{ thirdParty.comment|chill_markdown_to_html }}
|
||||||
|
</blockquote>
|
||||||
|
{% endif %}
|
||||||
|
</dd>
|
||||||
|
|
||||||
|
<dt>{{ 'Centers'|trans }}</dt>
|
||||||
|
<dd>{{ 'The party is visible in those centers'|trans }} : {{ thirdParty.centers|join(', ') }}</dd>
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
<li class="cancel">
|
||||||
|
<a class="btn btn-cancel" href="{{ chill_return_path_or('chill_3party_3party_index') }}">
|
||||||
|
{{ 'Cancel'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', thirdParty) %}
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-update" href="{{ chill_path_forward_return_path('chill_3party_3party_update', { 'thirdparty_id': thirdParty.id }) }}">
|
||||||
|
{{ 'Update'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -3,35 +3,75 @@
|
|||||||
{% block title 'Update third party %name%'|trans({ '%name%': thirdParty.name }) %}
|
{% block title 'Update third party %name%'|trans({ '%name%': thirdParty.name }) %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="col-10 centered">
|
<div class="thirdparty-edit my-5">
|
||||||
<h1>
|
<div class="row justify-content-center">
|
||||||
{{ 'Update third party %name%'|trans({ '%name%': thirdParty.name }) }}
|
<div class="col-md-10 col-xxl">
|
||||||
<span class="chill__box {{ thirdParty.active ? 'green' : 'red' }}">{{ (thirdParty.active ? 'Active, shown to users' : 'Inactive, not shown to users')|trans }}</span>
|
|
||||||
|
|
||||||
</h1>
|
<h1>
|
||||||
|
{{ 'Update third party %name%'|trans({ '%name%': thirdParty.name }) }}
|
||||||
|
<span class="badge bg-{{ thirdParty.active ? 'success' : 'danger' }}"
|
||||||
|
title="{{ (thirdParty.active ? 'shown to users' : 'not shown to users')|trans }}">
|
||||||
|
{{ (thirdParty.active ? 'Active' : 'Inactive')|trans }}
|
||||||
|
</span>
|
||||||
|
</h1>
|
||||||
|
|
||||||
{{ form_start(form) }}
|
<div class="date-by">
|
||||||
{{ form_row(form.name) }}
|
{% if thirdParty.updatedAt != null %}
|
||||||
{{ form_row(form.type) }}
|
{{ 'thirdparty.UpdatedAt.short'|trans ~ thirdParty.updatedAt|format_date('short') }}
|
||||||
{{ form_row(form.telephone) }}
|
{% else %}
|
||||||
{{ form_row(form.email) }}
|
{{ 'thirdparty.CreatedAt.short'|trans ~ thirdParty.createdAt|format_date('short') }}
|
||||||
{{ form_row(form.address) }}
|
{% endif %}
|
||||||
|
{% if thirdParty.updatedBy != null %}
|
||||||
{{ form_row(form.active) }}
|
{{ 'thirdparty.UpdateBy.short'|trans ~ thirdParty.updatedBy.usernameCanonical }}
|
||||||
{{ form_row(form.centers) }}
|
{% endif %}
|
||||||
{{ form_row(form.comment) }}
|
</div>
|
||||||
|
|
||||||
|
{{ form_start(form) }}
|
||||||
|
|
||||||
<ul class="record_actions">
|
{% if form.civility is defined %}
|
||||||
<li class="cancel">
|
{{ form_row(form.civility) }}
|
||||||
<a class="btn btn-cancel" href="{{ chill_path_forward_return_path('chill_3party_3party_index') }}">
|
{% endif %}
|
||||||
{{ 'Back to the list'|trans }}
|
|
||||||
</a>
|
{{ form_row(form.name) }}
|
||||||
<li>
|
|
||||||
{{ form_row(form.submit, {'label': 'Update', 'attr': {'class': 'btn btn-update' }}) }}
|
{% if form.nameCompany is defined %}
|
||||||
</li>
|
{{ form_row(form.nameCompany) }}
|
||||||
</ul>
|
{{ form_row(form.acronym) }}
|
||||||
|
{% endif %}
|
||||||
{{ form_end(form) }}
|
|
||||||
|
{% if form.profession is defined %}
|
||||||
|
{{ form_row(form.profession) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ form_row(form.categories) }}
|
||||||
|
{{ form_row(form.type) }}
|
||||||
|
|
||||||
|
{{ form_row(form.telephone) }}
|
||||||
|
{{ form_row(form.email) }}
|
||||||
|
{{ form_row(form.address) }}
|
||||||
|
|
||||||
|
{{ form_row(form.comment) }}
|
||||||
|
{{ form_row(form.centers) }}
|
||||||
|
|
||||||
|
{{ form_row(form.active) }}
|
||||||
|
|
||||||
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
<li class="cancel">
|
||||||
|
<a class="btn btn-cancel" href="{{ chill_path_forward_return_path('chill_3party_3party_index') }}">
|
||||||
|
{{ 'Back to the list'|trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{{ form_widget(form.submit, {'label': 'Update', 'attr': {'class': 'btn btn-update' }}) }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{{ form_end(form) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -1,4 +1,9 @@
|
|||||||
module.exports = function(encore, entries)
|
module.exports = function(encore, entries)
|
||||||
{
|
{
|
||||||
entries.push(__dirname + '/Resources/public/chill/index.js');
|
entries.push(__dirname + '/Resources/public/chill/index.js');
|
||||||
|
|
||||||
|
// Aliases are used when webpack is trying to resolve modules path
|
||||||
|
encore.addAliases({
|
||||||
|
ChillThirdPartyAssets: __dirname + '/Resources/public'
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
@@ -2,4 +2,16 @@
|
|||||||
services:
|
services:
|
||||||
Chill\ThirdPartyBundle\DataFixtures\ORM\LoadThirdParty:
|
Chill\ThirdPartyBundle\DataFixtures\ORM\LoadThirdParty:
|
||||||
tags:
|
tags:
|
||||||
- { 'name': doctrine.fixture.orm }
|
- { 'name': doctrine.fixture.orm }
|
||||||
|
|
||||||
|
Chill\ThirdPartyBundle\DataFixtures\ORM\LoadThirdPartyCivility:
|
||||||
|
tags:
|
||||||
|
- { 'name': doctrine.fixture.orm }
|
||||||
|
|
||||||
|
Chill\ThirdPartyBundle\DataFixtures\ORM\LoadThirdPartyCategory:
|
||||||
|
tags:
|
||||||
|
- { 'name': doctrine.fixture.orm }
|
||||||
|
|
||||||
|
Chill\ThirdPartyBundle\DataFixtures\ORM\LoadThirdPartyProfession:
|
||||||
|
tags:
|
||||||
|
- { 'name': doctrine.fixture.orm }
|
||||||
|
@@ -4,9 +4,10 @@ services:
|
|||||||
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
|
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
|
||||||
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
||||||
$typesManager: '@Chill\ThirdPartyBundle\ThirdPartyType\ThirdPartyTypeManager'
|
$typesManager: '@Chill\ThirdPartyBundle\ThirdPartyType\ThirdPartyTypeManager'
|
||||||
|
$translatableStringHelper: '@Chill\MainBundle\Templating\TranslatableStringHelper'
|
||||||
tags:
|
tags:
|
||||||
- { name: form.type }
|
- { name: form.type }
|
||||||
|
|
||||||
Chill\ThirdPartyBundle\Form\Type\PickThirdPartyType:
|
Chill\ThirdPartyBundle\Form\Type\PickThirdPartyType:
|
||||||
arguments:
|
arguments:
|
||||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||||
@@ -14,4 +15,4 @@ services:
|
|||||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||||
$typesManager: '@Chill\ThirdPartyBundle\ThirdPartyType\ThirdPartyTypeManager'
|
$typesManager: '@Chill\ThirdPartyBundle\ThirdPartyType\ThirdPartyTypeManager'
|
||||||
tags:
|
tags:
|
||||||
- { name: form.type }
|
- { name: form.type }
|
||||||
|
@@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Chill\Migrations\ThirdParty;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add new fields to ThirdParty Entity
|
||||||
|
* @author Mathieu Jaumotte mathieu.jaumotte@champs-libres.coop
|
||||||
|
*/
|
||||||
|
final class Version20210719105918 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return 'Add new fields to ThirdParty Entity + new join tables';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('CREATE SEQUENCE chill_3party.party_category_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE chill_3party.party_civility_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE SEQUENCE chill_3party.party_profession_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
|
||||||
|
$this->addSql('CREATE TABLE chill_3party.party_category (id INT NOT NULL, name JSON NOT NULL, active BOOLEAN NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('CREATE TABLE chill_3party.party_civility (id INT NOT NULL, name JSON NOT NULL, active BOOLEAN NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('CREATE TABLE chill_3party.party_profession (id INT NOT NULL, name JSON NOT NULL, active BOOLEAN NOT NULL, PRIMARY KEY(id))');
|
||||||
|
$this->addSql('CREATE TABLE chill_3party.thirdparty_category (thirdparty_id INT NOT NULL, category_id INT NOT NULL, PRIMARY KEY(thirdparty_id, category_id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_70495637C7D3A8E6 ON chill_3party.thirdparty_category (thirdparty_id)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_7049563712469DE2 ON chill_3party.thirdparty_category (category_id)');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.thirdparty_category ADD CONSTRAINT FK_70495637C7D3A8E6 FOREIGN KEY (thirdparty_id) REFERENCES chill_3party.third_party (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.thirdparty_category ADD CONSTRAINT FK_7049563712469DE2 FOREIGN KEY (category_id) REFERENCES chill_3party.party_category (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD parent_id INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD civility INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD profession INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD updated_by INT DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD name_company VARCHAR(255) DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD acronym VARCHAR(64) DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD created_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT \'2015-01-01\' NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD CONSTRAINT FK_D952467B727ACA70 FOREIGN KEY (parent_id) REFERENCES chill_3party.third_party (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD CONSTRAINT FK_D952467B384D4799 FOREIGN KEY (civility) REFERENCES chill_3party.party_civility (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD CONSTRAINT FK_D952467BBA930D69 FOREIGN KEY (profession) REFERENCES chill_3party.party_profession (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party ADD CONSTRAINT FK_D952467B16FE72E1 FOREIGN KEY (updated_by) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||||
|
$this->addSql('CREATE INDEX IDX_D952467B727ACA70 ON chill_3party.third_party (parent_id)');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_D952467B384D4799 ON chill_3party.third_party (civility)');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_D952467BBA930D69 ON chill_3party.third_party (profession)');
|
||||||
|
$this->addSql('CREATE INDEX IDX_D952467B16FE72E1 ON chill_3party.third_party (updated_by)');
|
||||||
|
$this->addSql('ALTER INDEX chill_3party.idx_c65d4397c7d3a8e6 RENAME TO IDX_14DC4475C7D3A8E6');
|
||||||
|
$this->addSql('ALTER INDEX chill_3party.idx_c65d43975932f377 RENAME TO IDX_14DC44755932F377');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.thirdparty_category DROP CONSTRAINT FK_7049563712469DE2');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP CONSTRAINT FK_D952467B384D4799');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP CONSTRAINT FK_D952467BBA930D69');
|
||||||
|
$this->addSql('DROP SEQUENCE chill_3party.party_category_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE chill_3party.party_civility_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP SEQUENCE chill_3party.party_profession_id_seq CASCADE');
|
||||||
|
$this->addSql('DROP TABLE chill_3party.party_category');
|
||||||
|
$this->addSql('DROP TABLE chill_3party.party_civility');
|
||||||
|
$this->addSql('DROP TABLE chill_3party.party_profession');
|
||||||
|
$this->addSql('DROP TABLE chill_3party.thirdparty_category');
|
||||||
|
$this->addSql('ALTER INDEX chill_3party.idx_14dc44755932f377 RENAME TO idx_c65d43975932f377');
|
||||||
|
$this->addSql('ALTER INDEX chill_3party.idx_14dc4475c7d3a8e6 RENAME TO idx_c65d4397c7d3a8e6');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP CONSTRAINT FK_D952467B727ACA70');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP CONSTRAINT FK_D952467B16FE72E1');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP parent_id');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP civility');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP profession');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP updated_by');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP name_company');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP acronym');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP created_at');
|
||||||
|
$this->addSql('ALTER TABLE chill_3party.third_party DROP updated_at');
|
||||||
|
}
|
||||||
|
}
|
@@ -1,5 +1,6 @@
|
|||||||
Third party: Tiers
|
Third party: Tiers
|
||||||
Third parties: Tiers
|
Third parties: Tiers
|
||||||
|
third parties: tiers
|
||||||
name: Nom
|
name: Nom
|
||||||
telephone: Téléphone
|
telephone: Téléphone
|
||||||
adress: Adresse
|
adress: Adresse
|
||||||
@@ -11,17 +12,45 @@ thirdparty.No_phonenumber: Aucun numéro de téléphone
|
|||||||
thirdparty.No_email: Aucun email
|
thirdparty.No_email: Aucun email
|
||||||
thirdparty.No_comment: Aucun commentaire
|
thirdparty.No_comment: Aucun commentaire
|
||||||
|
|
||||||
New third party: Nouveau tiers
|
thirdparty.NameCompany: Raison sociale
|
||||||
|
thirdparty.Acronym: Sigle
|
||||||
|
thirdparty.Categories: Catégories
|
||||||
|
thirdparty.Child: Personne de contact
|
||||||
|
thirdparty.Children: Personnes de contact
|
||||||
|
thirdparty.Parent: Tiers institutionnel
|
||||||
|
thirdparty.Parents: Tiers institutionnels
|
||||||
|
thirdparty.Civility: Civilité
|
||||||
|
thirdparty.choose civility: --
|
||||||
|
thirdparty.Profession: Qualité
|
||||||
|
thirdparty.choose profession: --
|
||||||
|
thirdparty.CreatedAt.short: 'Créé le '
|
||||||
|
thirdparty.UpdatedAt.short: 'Modifié le '
|
||||||
|
thirdparty.UpdateBy.short: ' par '
|
||||||
|
thirdparty.CreatedAt.long: Date de création
|
||||||
|
thirdparty.UpdatedAt.long: Date de la dernière modification
|
||||||
|
thirdparty.UpdateBy.long: Utilisateur qui a effectué la dernière modification
|
||||||
|
|
||||||
|
New third party: Ajouter un nouveau tiers
|
||||||
Show third party %name%: Tiers "%name%"
|
Show third party %name%: Tiers "%name%"
|
||||||
Create third party: Créer un tiers
|
Create third party: Créer un tiers
|
||||||
Update third party %name%: Mettre à jour "%name%"
|
Update third party %name%: Mettre à jour "%name%"
|
||||||
List of third parties: Liste des tiers
|
List of third parties: Liste des tiers
|
||||||
Third party updated: Le tiers a été mis à jour
|
Third party updated: Le tiers a été mis à jour
|
||||||
Third party created: Le tiers a été créé
|
Third party created: Le tiers a été créé
|
||||||
Active, shown to users: Actif, visible par les utilisateurs
|
thirdparty.Status: Statut
|
||||||
Inactive, not shown to users: Inactif, invisible par les utilisateurs
|
Active, shown to users: Actif, visible pour les utilisateurs
|
||||||
|
Active: Actif
|
||||||
|
shown to users: visible pour les utilisateurs
|
||||||
|
Inactive, not shown to users: Inactif, invisible pour les utilisateurs
|
||||||
|
Inactive: Inactif
|
||||||
|
not shown to users: invisible pour les utilisateurs
|
||||||
Show thirdparty: Voir le tiers
|
Show thirdparty: Voir le tiers
|
||||||
|
|
||||||
|
No nameCompany given: Aucune raison sociale renseignée
|
||||||
|
No acronym given: Aucun sigle renseigné
|
||||||
|
No phone given: Aucun téléphone renseigné
|
||||||
|
No email given: Aucune adresse courriel renseignée
|
||||||
|
|
||||||
The party is visible in those centers: Le tiers est visible dans ces centres
|
The party is visible in those centers: Le tiers est visible dans ces centres
|
||||||
No third parties: Aucun tiers
|
No third parties: Aucun tiers
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user