mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
feat: planning events
This commit is contained in:
@ -42,7 +42,13 @@ export const BE_SCHOOL_PAYMENT_PLANS_URL = `${BASE_URL}/School/paymentPlans`;
|
||||
export const BE_SCHOOL_PAYMENT_MODES_URL = `${BASE_URL}/School/paymentModes`;
|
||||
export const BE_SCHOOL_ESTABLISHMENT_URL = `${BASE_URL}/School/establishments`;
|
||||
|
||||
// En attendant la gestion des sessions
|
||||
|
||||
// GESTION PLANNING
|
||||
export const BE_PLANNING_PLANNINGS_URL = `${BASE_URL}/Planning/plannings`
|
||||
export const BE_PLANNING_EVENTS_URL = `${BASE_URL}/Planning/events`
|
||||
|
||||
|
||||
// FIXME : En attendant la gestion des sessions
|
||||
export const ESTABLISHMENT_ID = 1;
|
||||
|
||||
// GESTION MESSAGERIE
|
||||
|
||||
@ -14,7 +14,7 @@ export const DEFAULT_EVENT = {
|
||||
start: '',
|
||||
end: '',
|
||||
location: '',
|
||||
scheduleId: 'default',
|
||||
planning: 'default',
|
||||
color: '#10b981',
|
||||
recurrence: 'none',
|
||||
selectedDays: [],
|
||||
|
||||
@ -85,7 +85,7 @@ export const getWeekEvents = (day, events) => {
|
||||
const start = startOfDay(day);
|
||||
const end = endOfDay(day);
|
||||
|
||||
return events.filter(event => {
|
||||
return events?.filter(event => {
|
||||
const eventStart = new Date(event.start);
|
||||
const eventEnd = new Date(event.end);
|
||||
|
||||
@ -106,5 +106,5 @@ export const getWeekEvents = (day, events) => {
|
||||
* @returns {Array<Object>} Liste des événements filtrés
|
||||
*/
|
||||
export const filterEventsByVisibleSchedules = (events, hiddenSchedules) => {
|
||||
return events.filter(event => !hiddenSchedules.includes(event.scheduleId));
|
||||
return events.filter(event => !hiddenSchedules.includes(event.planning));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user