mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
activity: create new vue subcomponent socialIssuesAcc
This commit is contained in:
parent
e55a2691b7
commit
fe22e6c7dc
@ -105,7 +105,11 @@ class ActivityType extends AbstractType
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($activityType->isVisible('socialIssues') && $accompanyingPeriod) {
|
if ($activityType->isVisible('socialIssues') && $accompanyingPeriod) {
|
||||||
$builder->add('socialIssues', EntityType::class, [
|
$builder->add('socialIssues',
|
||||||
|
/*
|
||||||
|
HiddenType::class
|
||||||
|
*/
|
||||||
|
EntityType::class, [
|
||||||
'label' => $activityType->getLabel('socialIssues'),
|
'label' => $activityType->getLabel('socialIssues'),
|
||||||
'required' => $activityType->isRequired('socialIssues'),
|
'required' => $activityType->isRequired('socialIssues'),
|
||||||
'class' => SocialIssue::class,
|
'class' => SocialIssue::class,
|
||||||
@ -115,11 +119,16 @@ class ActivityType extends AbstractType
|
|||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'choices' => $accompanyingPeriod->getRecursiveSocialIssues(),
|
'choices' => $accompanyingPeriod->getRecursiveSocialIssues(),
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activityType->isVisible('socialActions') && $accompanyingPeriod) {
|
if ($activityType->isVisible('socialActions') && $accompanyingPeriod) {
|
||||||
$builder->add('socialActions', EntityType::class, [
|
$builder->add('socialActions',
|
||||||
|
/*
|
||||||
|
HiddenType::class
|
||||||
|
*/
|
||||||
|
EntityType::class, [
|
||||||
'label' => $activityType->getLabel('socialActions'),
|
'label' => $activityType->getLabel('socialActions'),
|
||||||
'required' => $activityType->isRequired('socialActions'),
|
'required' => $activityType->isRequired('socialActions'),
|
||||||
'class' => SocialAction::class,
|
'class' => SocialAction::class,
|
||||||
@ -129,7 +138,8 @@ class ActivityType extends AbstractType
|
|||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'choices' => $accompanyingPeriod->getRecursiveSocialActions(),
|
'choices' => $accompanyingPeriod->getRecursiveSocialActions(),
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activityType->isVisible('date')) {
|
if ($activityType->isVisible('date')) {
|
||||||
@ -203,9 +213,7 @@ class ActivityType extends AbstractType
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($activityType->isVisible('persons')) {
|
if ($activityType->isVisible('persons')) {
|
||||||
$builder->add('persons', HiddenType::class, [
|
$builder->add('persons', HiddenType::class);
|
||||||
//'data_class' => Person::class,
|
|
||||||
]);
|
|
||||||
$builder->get('persons')
|
$builder->get('persons')
|
||||||
->addModelTransformer(new CallbackTransformer(
|
->addModelTransformer(new CallbackTransformer(
|
||||||
function (iterable $personsAsIterable): string {
|
function (iterable $personsAsIterable): string {
|
||||||
@ -226,9 +234,7 @@ class ActivityType extends AbstractType
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($activityType->isVisible('thirdParties')) {
|
if ($activityType->isVisible('thirdParties')) {
|
||||||
$builder->add('thirdParties', HiddenType::class, [
|
$builder->add('thirdParties', HiddenType::class);
|
||||||
//'data_class' => ThirdParty::class,
|
|
||||||
]);
|
|
||||||
$builder->get('thirdParties')
|
$builder->get('thirdParties')
|
||||||
->addModelTransformer(new CallbackTransformer(
|
->addModelTransformer(new CallbackTransformer(
|
||||||
function (iterable $thirdpartyAsIterable): string {
|
function (iterable $thirdpartyAsIterable): string {
|
||||||
@ -260,9 +266,7 @@ class ActivityType extends AbstractType
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($activityType->isVisible('users')) {
|
if ($activityType->isVisible('users')) {
|
||||||
$builder->add('users', HiddenType::class, [
|
$builder->add('users', HiddenType::class);
|
||||||
//'data_class' => User::class,
|
|
||||||
]);
|
|
||||||
$builder->get('users')
|
$builder->get('users')
|
||||||
->addModelTransformer(new CallbackTransformer(
|
->addModelTransformer(new CallbackTransformer(
|
||||||
function (iterable $usersAsIterable): string {
|
function (iterable $usersAsIterable): string {
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<concerned-groups></concerned-groups>
|
<concerned-groups></concerned-groups>
|
||||||
|
<social-issues-acc></social-issues-acc>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ConcernedGroups from './components/ConcernedGroups.vue';
|
import ConcernedGroups from './components/ConcernedGroups.vue';
|
||||||
|
import SocialIssuesAcc from './components/SocialIssuesAcc.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
components: {
|
components: {
|
||||||
ConcernedGroups
|
ConcernedGroups,
|
||||||
|
SocialIssuesAcc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
<template>
|
||||||
|
<teleport to="#social-issues-acc">
|
||||||
|
boum
|
||||||
|
</teleport>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "SocialIssuesAcc"
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
@ -19,13 +19,15 @@
|
|||||||
{{ form_row(edit_form.scope) }}
|
{{ form_row(edit_form.scope) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if edit_form.socialIssues is defined -%}
|
||||||
|
{{ form_row(edit_form.socialIssues) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{%- if edit_form.socialActions is defined -%}
|
{%- if edit_form.socialActions is defined -%}
|
||||||
{{ form_row(edit_form.socialActions) }}
|
{{ form_row(edit_form.socialActions) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{%- if edit_form.socialIssues is defined -%}
|
<div id="social-issues-acc"></div>
|
||||||
{{ form_row(edit_form.socialIssues) }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{%- if edit_form.reasons is defined -%}
|
{%- if edit_form.reasons is defined -%}
|
||||||
{{ form_row(edit_form.reasons) }}
|
{{ form_row(edit_form.reasons) }}
|
||||||
|
@ -24,14 +24,15 @@
|
|||||||
{{ form_row(form.scope) }}
|
{{ form_row(form.scope) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{%- if form.socialActions is defined -%}
|
|
||||||
{{ form_row(form.socialActions) }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{%- if form.socialIssues is defined -%}
|
{%- if form.socialIssues is defined -%}
|
||||||
{{ form_row(form.socialIssues) }}
|
{{ form_row(form.socialIssues) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if form.socialActions is defined -%}
|
||||||
|
{{ form_row(form.socialActions) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div id="social-issues-acc"></div>
|
||||||
|
|
||||||
{%- if form.reasons is defined -%}
|
{%- if form.reasons is defined -%}
|
||||||
{{ form_row(form.reasons) }}
|
{{ form_row(form.reasons) }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user