fix: Ajout du mode Visu

This commit is contained in:
N3WT DE COMPET
2025-05-04 14:32:06 +02:00
parent 4ecf25a6ab
commit e1c607308c
29 changed files with 531 additions and 414 deletions

View File

@ -53,8 +53,11 @@ const removeDatas = (url, csrfToken) => {
}).then(requestResponseHandler);
};
export const fetchPlannings = (establishment_id=null,planningMode=null) => {
let url = `${BE_PLANNING_PLANNINGS_URL}`;
export const fetchPlannings = (
establishment_id = null,
planningMode = null
) => {
let url = `${BE_PLANNING_PLANNINGS_URL}`;
if (establishment_id) {
url += `?establishment_id=${establishment_id}`;
}
@ -80,7 +83,7 @@ export const deletePlanning = (id, csrfToken) => {
return removeDatas(`${BE_PLANNING_PLANNINGS_URL}/${id}`, csrfToken);
};
export const fetchEvents = (establishment_id=null, planningMode=null) => {
export const fetchEvents = (establishment_id = null, planningMode = null) => {
let url = `${BE_PLANNING_EVENTS_URL}`;
if (establishment_id) {
url += `?establishment_id=${establishment_id}`;
@ -90,7 +93,6 @@ export const fetchEvents = (establishment_id=null, planningMode=null) => {
}
return getData(url);
};
export const getEvent = (id) => {
@ -109,8 +111,8 @@ export const deleteEvent = (id, csrfToken) => {
return removeDatas(`${BE_PLANNING_EVENTS_URL}/${id}`, csrfToken);
};
export const fetchUpcomingEvents = (establishment_id=null) => {
let url = `${BE_PLANNING_EVENTS_URL}/upcoming`;
export const fetchUpcomingEvents = (establishment_id = null) => {
let url = `${BE_PLANNING_EVENTS_URL}/upcoming`;
if (establishment_id) {
url += `?establishment_id=${establishment_id}`;
}