mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 06:14:23 +00:00
rdv: add entity to serialize (WIP)
This commit is contained in:
parent
d84877e3b9
commit
450025c145
@ -190,14 +190,15 @@ class CalendarController extends AbstractController
|
|||||||
throw $this->createNotFoundException('Template not found');
|
throw $this->createNotFoundException('Template not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
// $activity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
|
$entity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
|
||||||
|
dump($entity_array);
|
||||||
|
|
||||||
return $this->render($view, [
|
return $this->render($view, [
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'accompanyingCourse' => $accompanyingPeriod,
|
'accompanyingCourse' => $accompanyingPeriod,
|
||||||
'entity' => $entity,
|
'entity' => $entity,
|
||||||
'form' => $form->createView(),
|
'form' => $form->createView(),
|
||||||
//'activity_json' => $calendar_array
|
'entity_json' => $entity_array
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,19 +17,19 @@ const removeIdFromValue = (string, id) => {
|
|||||||
return str;
|
return str;
|
||||||
};
|
};
|
||||||
|
|
||||||
const activity = {
|
// const activity = {
|
||||||
accompanyingPeriod: null,
|
// accompanyingPeriod: window.accompanyingPeriod,
|
||||||
persons: [],
|
// persons: [],
|
||||||
thirdParties: [],
|
// thirdParties: [],
|
||||||
users: [],
|
// users: []
|
||||||
//professionals: [],
|
// }; // TODO: get this object from window.activity ?
|
||||||
//invites: []
|
|
||||||
}; // TODO: get this object from window.activity ?
|
console.log(window.entity)
|
||||||
|
|
||||||
const store = createStore({
|
const store = createStore({
|
||||||
strict: debug,
|
strict: debug,
|
||||||
state: {
|
state: {
|
||||||
activity: activity,
|
activity: window.entity,
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
|
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]',
|
||||||
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
|
'{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
|
||||||
});
|
});
|
||||||
|
window.entity = {{ entity_json|json_encode|raw }};
|
||||||
</script>
|
</script>
|
||||||
{{ encore_entry_script_tags('vue_calendar') }}
|
{{ encore_entry_script_tags('vue_calendar') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user