MCPcopy Create free account
hub / github.com/code100x/cms / handleUpdateEvent

Function handleUpdateEvent

src/components/big-calendar/calendar.tsx:108–122  ·  view source on GitHub ↗
(values: FormValues)

Source from the content-addressed store, hash-verified

106 };
107
108 const handleUpdateEvent = async (values: FormValues) => {
109 if (selectedEvent) {
110 const updatedEvent: CalendarEvent = {
111 ...selectedEvent,
112 title: values.title,
113 start: combineDateAndTime(values.start, values.startTime),
114 end: combineDateAndTime(values.end, values.endTime),
115 videoLink: values.videoLink,
116 notes: values.notes,
117 };
118 await updateEvent(updatedEvent as any);
119 loadEvents();
120 setSelectedEvent(null);
121 }
122 };
123
124 const handleDeleteEvent = async () => {
125 if (selectedEvent) {

Callers 2

onEventDropFunction · 0.85
onEventResizeFunction · 0.85

Calls 3

updateEventFunction · 0.90
combineDateAndTimeFunction · 0.85
loadEventsFunction · 0.85

Tested by

no test coverage detected