mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'issue601_admin_social_work_social_action' into 'master'
admin: repair social action edit See merge request Chill-Projet/chill-bundles!434
This commit is contained in:
commit
9511d6eaee
@ -11,12 +11,12 @@ and this project adheres to
|
|||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
<!-- write down unreleased development here -->
|
<!-- write down unreleased development here -->
|
||||||
|
* [admin] repair edit of social action in the admin (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/601)
|
||||||
* [admin]: add select2 to Goal form type entity fields (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/702)
|
* [admin]: add select2 to Goal form type entity fields (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/702)
|
||||||
* [main] allow hide permissions group list menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
* [main] allow hide permissions group list menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
||||||
* [main] allow hide change user password menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
* [main] allow hide change user password menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
||||||
* [main] filter user jobs by active jobs (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
* [main] filter user jobs by active jobs (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
||||||
* [main] add civility to User (entity, migration and form type) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
* [main] add civility to User (entity, migration and form type) (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/577)
|
||||||
|
|
||||||
* [admin] refactorisation of the admin section: reorganisation of the menu, translations, form types, new entities (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/592)
|
* [admin] refactorisation of the admin section: reorganisation of the menu, translations, form types, new entities (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/592)
|
||||||
* [admin] add admin section for languages and countries (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/596)
|
* [admin] add admin section for languages and countries (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/596)
|
||||||
* [activity] activity admin: translations + remove label field for comment on admin activity type (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/587)
|
* [activity] activity admin: translations + remove label field for comment on admin activity type (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/587)
|
||||||
|
@ -46,10 +46,8 @@ class SocialAction
|
|||||||
private $desactivationDate;
|
private $desactivationDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToMany(
|
* @ORM\ManyToMany(targetEntity=Evaluation::class, inversedBy="socialActions")
|
||||||
* targetEntity=Evaluation::class,
|
* @ORM\JoinTable(name="chill_person_social_work_evaluation_action")
|
||||||
* mappedBy="socialActions"
|
|
||||||
* )
|
|
||||||
*/
|
*/
|
||||||
private Collection $evaluations;
|
private Collection $evaluations;
|
||||||
|
|
||||||
@ -110,6 +108,15 @@ class SocialAction
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addEvaluation(Evaluation $evaluation): self
|
||||||
|
{
|
||||||
|
if (!$this->evaluations->contains($evaluation)) {
|
||||||
|
$this->evaluations[] = $evaluation;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function addGoal(Goal $goal): self
|
public function addGoal(Goal $goal): self
|
||||||
{
|
{
|
||||||
if (!$this->goals->contains($goal)) {
|
if (!$this->goals->contains($goal)) {
|
||||||
@ -300,6 +307,13 @@ class SocialAction
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function removeEvaluation(Evaluation $evaluation): self
|
||||||
|
{
|
||||||
|
$this->evaluations->removeElement($evaluation);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function removeGoal(Goal $goal): self
|
public function removeGoal(Goal $goal): self
|
||||||
{
|
{
|
||||||
$this->goals->removeElement($goal);
|
$this->goals->removeElement($goal);
|
||||||
|
@ -43,17 +43,6 @@ class GoalType extends AbstractType
|
|||||||
->add('title', TranslatableStringFormType::class, [
|
->add('title', TranslatableStringFormType::class, [
|
||||||
'label' => 'Nom',
|
'label' => 'Nom',
|
||||||
])
|
])
|
||||||
|
|
||||||
->add('socialActions', EntityType::class, [
|
|
||||||
'class' => SocialAction::class,
|
|
||||||
'required' => false,
|
|
||||||
'multiple' => true,
|
|
||||||
'choice_label' => function (SocialAction $issue) {
|
|
||||||
return $this->translatableStringHelper->localize($issue->getTitle());
|
|
||||||
},
|
|
||||||
'attr' => ['class' => 'select2 '],
|
|
||||||
])
|
|
||||||
|
|
||||||
->add('results', EntityType::class, [
|
->add('results', EntityType::class, [
|
||||||
'class' => Result::class,
|
'class' => Result::class,
|
||||||
'required' => false,
|
'required' => false,
|
||||||
@ -63,7 +52,6 @@ class GoalType extends AbstractType
|
|||||||
},
|
},
|
||||||
'attr' => ['class' => 'select2 '],
|
'attr' => ['class' => 'select2 '],
|
||||||
])
|
])
|
||||||
|
|
||||||
->add('desactivationDate', ChillDateType::class, [
|
->add('desactivationDate', ChillDateType::class, [
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'label' => 'goal.desactivationDate',
|
'label' => 'goal.desactivationDate',
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
{% block table_entities_thead_tr %}
|
{% block table_entities_thead_tr %}
|
||||||
<th>{{ 'Id'|trans }}</th>
|
<th>{{ 'Id'|trans }}</th>
|
||||||
<th>{{ 'Title'|trans }}</th>
|
<th>{{ 'Title'|trans }}</th>
|
||||||
<th>{{ 'Social actions'|trans }}</th>
|
|
||||||
<th>{{ 'goal.results'|trans }}</th>
|
<th>{{ 'goal.results'|trans }}</th>
|
||||||
<th>{{ 'goal.desactivationDate'|trans }}</th>
|
<th>{{ 'goal.desactivationDate'|trans }}</th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
@ -17,11 +16,6 @@
|
|||||||
<td>{{ entity.id }}</td>
|
<td>{{ entity.id }}</td>
|
||||||
<td>{{ entity.title|localize_translatable_string }}</td>
|
<td>{{ entity.title|localize_translatable_string }}</td>
|
||||||
<td>
|
<td>
|
||||||
{% for sa in entity.socialActions %}
|
|
||||||
{{ sa.title|localize_translatable_string }}{% if not loop.last %},{% else %}.{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% for sa in entity.results %}
|
{% for sa in entity.results %}
|
||||||
{{ sa.title|localize_translatable_string }}{% if not loop.last %},{% else %}.{% endif %}
|
{{ sa.title|localize_translatable_string }}{% if not loop.last %},{% else %}.{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -8,9 +8,20 @@
|
|||||||
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
||||||
|
|
||||||
{% block crud_content_form_rows %}
|
{% block crud_content_form_rows %}
|
||||||
|
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label class="col-form-label col-sm-4 required" for="social_action_ordering">{{ 'Parent'|trans }}</label>
|
||||||
|
<div class="col-sm-8">{{ entity.parent|chill_entity_render_box }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label class="col-form-label col-sm-4 required" for="social_action_ordering">{{ 'Social issue'|trans }}</label>
|
||||||
|
<div class="col-sm-8">{{ entity.issue|chill_entity_render_box }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% for f in form %}
|
{% for f in form %}
|
||||||
{% if f.vars.name == 'parent' or f.vars.name == 'issue' %}
|
{% if f.vars.name == 'parent' or f.vars.name == 'issue' %}
|
||||||
{{ form_row(f, { 'attr':{'disabled':'disabled'}}) }}
|
{{ form_widget(f, { 'attr':{'hidden':'hidden'}}) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ form_row(f) }}
|
{{ form_row(f) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user