v0.9.85.1 updates
This commit is contained in:
@@ -253,7 +253,12 @@ export default function MobileEventForm({ event, eventTypes, userGroups, selecte
|
||||
setSaving(true);
|
||||
try {
|
||||
const body = { title:title.trim(), eventTypeId:typeId||null, startAt:allDay?`${sd}T00:00:00`:buildISO(sd,st), endAt:allDay?`${ed}T23:59:59`:buildISO(ed,et), allDay, location, description, isPublic:!isPrivate, trackAvailability:track, userGroupIds:[...groups], recurrenceRule:recRule||null };
|
||||
const r = event ? await api.updateEvent(event.id, body) : await api.createEvent(body);
|
||||
let scope = 'this';
|
||||
if(event && event.recurrence_rule?.freq) {
|
||||
const choice = window.confirm('This is a recurring event.\n\nOK = Update this and all future occurrences\nCancel = Update this event only');
|
||||
scope = choice ? 'future' : 'this';
|
||||
}
|
||||
const r = event ? await api.updateEvent(event.id, {...body, recurringScope:scope}) : await api.createEvent(body);
|
||||
onSave(r.event);
|
||||
} catch(e) { toast(e.message,'error'); }
|
||||
finally { setSaving(false); }
|
||||
|
||||
Reference in New Issue
Block a user