mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-28 13:06:13 +00:00
rdv: twig layout + teleport calendar controls
This commit is contained in:
parent
7e64ec0a45
commit
1a025ead1b
@ -48,13 +48,13 @@ class CalendarType extends AbstractType
|
|||||||
->add('comment', CommentType::class, [
|
->add('comment', CommentType::class, [
|
||||||
'required' => false
|
'required' => false
|
||||||
])
|
])
|
||||||
->add('cancelReason', EntityType::class, [
|
// ->add('cancelReason', EntityType::class, [
|
||||||
'required' => false,
|
// 'required' => false,
|
||||||
'class' => CancelReason::class,
|
// 'class' => CancelReason::class,
|
||||||
'choice_label' => function (CancelReason $entity) {
|
// 'choice_label' => function (CancelReason $entity) {
|
||||||
return $entity->getCanceledBy();
|
// return $entity->getCanceledBy();
|
||||||
},
|
// },
|
||||||
])
|
// ])
|
||||||
->add('sendSMS', ChoiceType::class, [
|
->add('sendSMS', ChoiceType::class, [
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'choices' => [
|
'choices' => [
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
require('./scss/calendar.scss');
|
@ -0,0 +1,10 @@
|
|||||||
|
div#calendarControls {
|
||||||
|
height: 50%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#fullCalendar{
|
||||||
|
|
||||||
|
}
|
@ -1,18 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<concerned-groups></concerned-groups>
|
<concerned-groups></concerned-groups>
|
||||||
<calendar-user-selector
|
<teleport to="#calendarControls">
|
||||||
v-bind:users="users"
|
<calendar-user-selector
|
||||||
v-bind:calendarEvents="calendarEvents"
|
v-bind:users="users"
|
||||||
v-bind:updateEventsSource="updateEventsSource"
|
v-bind:calendarEvents="calendarEvents"
|
||||||
v-bind:showMyCalendar="showMyCalendar"
|
v-bind:updateEventsSource="updateEventsSource"
|
||||||
v-bind:toggleMyCalendar="toggleMyCalendar" >
|
v-bind:showMyCalendar="showMyCalendar"
|
||||||
</calendar-user-selector>
|
v-bind:toggleMyCalendar="toggleMyCalendar" >
|
||||||
<h2 class="chill-red">{{ $t('choose_your_date') }}</h2>
|
</calendar-user-selector>
|
||||||
<FullCalendar ref="fullCalendar" :options="calendarOptions">
|
</teleport>
|
||||||
<template v-slot:eventContent='arg'>
|
<teleport to="#fullCalendar">
|
||||||
<b>{{ arg.timeText }}</b>
|
<FullCalendar ref="fullCalendar" :options="calendarOptions">
|
||||||
</template>
|
<template v-slot:eventContent='arg'>
|
||||||
</FullCalendar>
|
<b>{{ arg.timeText }}</b>
|
||||||
|
</template>
|
||||||
|
</FullCalendar>
|
||||||
|
</teleport>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<h2 class="chill-red">{{ $t('choose_your_calendar_user') }}</h2>
|
<div class="calendar__controls">
|
||||||
<div>
|
<h2 class="chill-red">{{ $t('choose_your_calendar_user') }}</h2>
|
||||||
<VueMultiselect
|
<VueMultiselect
|
||||||
name="field"
|
name="field"
|
||||||
id="calendarUserSelector"
|
id="calendarUserSelector"
|
||||||
@ -196,3 +196,12 @@ export default {
|
|||||||
|
|
||||||
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
|
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
div.calendar__controls {
|
||||||
|
background-color: 'black';
|
||||||
|
height: 50%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -2,7 +2,7 @@ const calendarUserSelectorMessages = {
|
|||||||
fr: {
|
fr: {
|
||||||
choose_your_calendar_user: "Afficher les plages de disponibilités",
|
choose_your_calendar_user: "Afficher les plages de disponibilités",
|
||||||
select_user: "Sélectionnez des calendriers",
|
select_user: "Sélectionnez des calendriers",
|
||||||
show_my_calendar: "Affichez mon calendrier"
|
show_my_calendar: "Afficher mon calendrier"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,10 +40,6 @@
|
|||||||
|
|
||||||
.. location
|
.. location
|
||||||
|
|
||||||
{%- if form.cancelReason is defined -%}
|
|
||||||
{{ form_row(form.cancelReason) }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{%- if form.comment is defined -%}
|
{%- if form.comment is defined -%}
|
||||||
{{ form_row(form.comment) }}
|
{{ form_row(form.comment) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -52,8 +48,7 @@
|
|||||||
{{ form_row(form.sendSMS) }}
|
{{ form_row(form.sendSMS) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<div id="fullCalendar"></div>
|
||||||
..calendarRange
|
|
||||||
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
<ul class="record_actions sticky-form-buttons">
|
||||||
<li class="cancel">
|
<li class="cancel">
|
||||||
|
@ -36,3 +36,7 @@
|
|||||||
{{ parent() }}
|
{{ parent() }}
|
||||||
{{ encore_entry_link_tags('vue_calendar') }}
|
{{ encore_entry_link_tags('vue_calendar') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block block_post_menu %}
|
||||||
|
<div id="calendarControls"></div>
|
||||||
|
{% endblock %}
|
@ -1,4 +1,4 @@
|
|||||||
<h1>{{ "Calendar item creation"|trans ~ ' :' }}</h1>
|
<h1>{{ "Calendar item creation"|trans }}</h1>
|
||||||
|
|
||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
{{ form_errors(form) }}
|
{{ form_errors(form) }}
|
||||||
@ -34,16 +34,8 @@
|
|||||||
{{ form_row(form.endDate) }}
|
{{ form_row(form.endDate) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{%- if form.calendarRange is defined -%}
|
|
||||||
{{ form_row(form.calendarRange) }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
.. location
|
.. location
|
||||||
|
|
||||||
{%- if form.cancelReason is defined -%}
|
|
||||||
{{ form_row(form.cancelReason) }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{%- if form.comment is defined -%}
|
{%- if form.comment is defined -%}
|
||||||
{{ form_row(form.comment) }}
|
{{ form_row(form.comment) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -52,10 +44,7 @@
|
|||||||
{{ form_row(form.sendSMS) }}
|
{{ form_row(form.sendSMS) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<div id="fullCalendar"></div>
|
||||||
..calendarRange
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
<ul class="record_actions sticky-form-buttons">
|
||||||
<li class="cancel">
|
<li class="cancel">
|
||||||
|
@ -34,4 +34,6 @@
|
|||||||
<link rel="stylesheet" href="{{ asset('build/vue_calendar.css') }}"/>
|
<link rel="stylesheet" href="{{ asset('build/vue_calendar.css') }}"/>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block block_post_menu %}
|
||||||
|
<div id="calendarControls"></div>
|
||||||
|
{% endblock %}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// this file loads all assets from the Chill calendar bundle
|
// this file loads all assets from the Chill calendar bundle
|
||||||
module.exports = function(encore, entries) {
|
module.exports = function(encore, entries) {
|
||||||
//entries.push(__dirname + '/Resources/public/index.js');
|
entries.push(__dirname + '/Resources/public/chill/index.js');
|
||||||
|
|
||||||
encore.addAliases({
|
encore.addAliases({
|
||||||
ChillCalendarAssets: __dirname + '/Resources/public'
|
ChillCalendarAssets: __dirname + '/Resources/public'
|
||||||
|
@ -17,6 +17,10 @@
|
|||||||
'layout': '@ChillPerson/menu.html.twig',
|
'layout': '@ChillPerson/menu.html.twig',
|
||||||
'args' : { 'accompanyingCourse': accompanyingCourse }
|
'args' : { 'accompanyingCourse': accompanyingCourse }
|
||||||
}) }}
|
}) }}
|
||||||
|
|
||||||
|
{% block block_post_menu %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block css %}
|
{% block css %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user