import ConcernedGroups from 'ChillActivityAssets/vuejs/Activity/components/ConcernedGroups.vue';
+import Location from 'ChillActivityAssets/vuejs/Activity/components/Location.vue';
import CalendarUserSelector from '../_components/CalendarUserSelector/CalendarUserSelector.vue';
import '@fullcalendar/core/vdom'; // solves problem with Vite
import frLocale from '@fullcalendar/core/locales/fr';
@@ -35,6 +37,7 @@ export default {
name: "App",
components: {
ConcernedGroups,
+ Location,
CalendarUserSelector,
FullCalendar
},
diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/i18n.js b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/i18n.js
index c086fed07..3020502e9 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/i18n.js
+++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/i18n.js
@@ -1,5 +1,6 @@
import { personMessages } from 'ChillPersonAssets/vuejs/_js/i18n'
import { calendarUserSelectorMessages } from '../_components/CalendarUserSelector/js/i18n';
+import { activityMessages } from 'ChillActivityAssets/vuejs/Activity/i18n';
const appMessages = {
fr: {
@@ -17,6 +18,7 @@ const appMessages = {
Object.assign(appMessages.fr, personMessages.fr);
Object.assign(appMessages.fr, calendarUserSelectorMessages.fr);
+Object.assign(appMessages.fr, activityMessages.fr);
export {
appMessages
diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store.js b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store.js
index 03d0548dc..b4578ea2b 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store.js
+++ b/src/Bundle/ChillCalendarBundle/Resources/public/vuejs/Calendar/store.js
@@ -66,6 +66,11 @@ const store = createStore({
setEvents(state, payload) {
console.log(payload)
state.currentEvent = {start: payload.start, end: payload.end}
+ },
+ // Location
+ updateLocation(state, value) {
+ console.log('### mutation: updateLocation', value);
+ state.activity.location = value;
}
},
actions: {
@@ -130,6 +135,14 @@ const store = createStore({
commit('setEvents', payload);
},
+ // Location
+ updateLocation({ commit }, value) {
+ console.log('### action: updateLocation', value);
+ let hiddenLocation = document.getElementById("chill_calendarbundle_calendar_location");
+ hiddenLocation.value = value.id;
+ commit('updateLocation', value);
+ }
+
}
});
diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
index e8830a33d..5dfde6fc3 100644
--- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
+++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/show.html.twig
@@ -36,6 +36,20 @@
{{ 'status'|trans }}
{{ entity.status }}
+
+ {{ 'calendar location'|trans }}
+
+ {% if entity.location is not null %}
+
+ {{ entity.location.locationType.title|localize_translatable_string }}
+ {{ entity.location.name }}
+
+ {{ entity.location.address|chill_entity_render_box }}
+ {% else %}
+ {{ 'No address given'|trans }}
+ {% endif %}
+
+
{% if not entity.comment.isEmpty %}
{{ 'calendar comment'|trans }}
{{ entity.comment|chill_entity_render_box }}
diff --git a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml
index 562233546..56ac8543c 100644
--- a/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillCalendarBundle/translations/messages.fr.yml
@@ -14,6 +14,7 @@ start date: début du rendez-vous
end date: fin du rendez-vous
cancel reason: motif d'annulation
status: Statut du rendez-vous
+calendar location: Localistion du rendez-vous
calendar comment: Remarque sur le rendez-vous
sendSMS: Envoi d'un SMS
Send s m s: Envoi d'un SMS ?