major recurring event structure changes

This commit is contained in:
2026-03-29 10:40:06 -04:00
parent 4b4ddf0825
commit 2dffeb1fde
11 changed files with 183 additions and 1097 deletions

View File

@@ -454,7 +454,14 @@ export default function MobileEventForm({ event, eventTypes, userGroups, selecte
setSaving(true);
try {
const body = { title:title.trim(), eventTypeId:typeId||null, startAt:allDay?buildISO(sd,'00:00'):buildISO(sd,st), endAt:allDay?buildISO(ed,'23:59'):buildISO(ed,et), allDay, location, description, isPublic:isToolManager?!isPrivate:false, trackAvailability:track, userGroupIds:[...groups], recurrenceRule:recRule||null };
const r = event ? await api.updateEvent(event.id, {...body, recurringScope:scope}) : await api.createEvent(body);
let r;
if (event) {
const updateBody = { ...body, recurringScope: scope };
if (event._virtual) updateBody.occurrenceStart = event.start_at;
r = await api.updateEvent(event.id, updateBody);
} else {
r = await api.createEvent(body);
}
onSave(r.event);
} catch(e) { toast(e.message,'error'); }
finally { setSaving(false); }