fix: properly handle recurring events in EventUpdateModal
- Fix handling of solo vs. all event updates for recurring events - Add calendar refresh for update all events - Disable repeat option when editing a single occurrence (solo mode) - Fix event recurrence editing in modals to match main branch - Properly link EventDisplayPreview with EventUpdateModal for typeOfAction
This commit is contained in:
committed by
Benoit TELLIER
parent
9ff8354950
commit
474ff22cab
@@ -101,6 +101,7 @@ interface EventFormFieldsProps {
|
||||
setAllDay: (allday: boolean) => void;
|
||||
repetition: RepetitionObject;
|
||||
setRepetition: (repetition: RepetitionObject) => void;
|
||||
typeOfAction?: "solo" | "all";
|
||||
attendees: userAttendee[];
|
||||
setAttendees: (attendees: userAttendee[]) => void;
|
||||
alarm: string;
|
||||
@@ -155,6 +156,7 @@ export default function EventFormFields({
|
||||
setAllDay,
|
||||
repetition,
|
||||
setRepetition,
|
||||
typeOfAction,
|
||||
attendees,
|
||||
setAttendees,
|
||||
alarm,
|
||||
@@ -343,12 +345,13 @@ export default function EventFormFields({
|
||||
label="All day"
|
||||
/>
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
checked={showRepeat}
|
||||
onChange={() => {
|
||||
const newShowRepeat = !showRepeat;
|
||||
setShowRepeat(newShowRepeat);
|
||||
control={
|
||||
<Checkbox
|
||||
checked={showRepeat}
|
||||
disabled={typeOfAction === "solo"}
|
||||
onChange={() => {
|
||||
const newShowRepeat = !showRepeat;
|
||||
setShowRepeat(newShowRepeat);
|
||||
if (newShowRepeat) {
|
||||
setRepetition({
|
||||
freq: "daily",
|
||||
@@ -393,6 +396,7 @@ export default function EventFormFields({
|
||||
repetition={repetition}
|
||||
eventStart={new Date(start)}
|
||||
setRepetition={setRepetition}
|
||||
isOwn={true} /* Always editable when shown */
|
||||
/>
|
||||
</FieldWithLabel>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user