diff --git a/src/widgets/RRule.tsx b/src/widgets/RRule.tsx index de39b3a..6c9034e 100644 --- a/src/widgets/RRule.tsx +++ b/src/widgets/RRule.tsx @@ -18,13 +18,17 @@ export interface RRuleOptions { byweekno?: number; bymonth?: Months; bysetpos?: number; -} + wkst?: Weekday; + bysecond?: number[]; + byminute?: number[]; + byday?: number[]; +} enum Frequency { - Year = 0, - Month = 1, - Week = 2, - Day = 3, + YEARLY, + MONTHLY, + WEEKLY, + DAILY, } enum Ends { Never, @@ -70,7 +74,7 @@ const menuItemsEnds = [Ends.Never, Ends.Date, Ends.After].map((key) => { ); }); const weekdays = [Weekday.Mo, Weekday.Tu, Weekday.We, Weekday.Th, Weekday.Fr, Weekday.Sa, Weekday.Su]; -const menuItemsFrequency = [Frequency.Year, Frequency.Month, Frequency.Week, Frequency.Day].map((value) => { +const menuItemsFrequency = [Frequency.YEARLY, Frequency.MONTHLY, Frequency.WEEKLY, Frequency.DAILY].map((value) => { return ( ); @@ -164,9 +168,9 @@ export default function RRuleEteSync(props: PropsType) { const updatedOptions = { freq: freq, bysetpos: undefined, - bymonthday: freq === Frequency.Month || Frequency.Year === freq ? 1 : undefined, + bymonthday: freq === Frequency.MONTHLY || Frequency.YEARLY === freq ? 1 : undefined, byweekday: undefined, - bymonth: freq === Frequency.Year ? Months.Jan : undefined, + bymonth: freq === Frequency.YEARLY ? Months.Jan : undefined, }; updateRule(updatedOptions); }} @@ -176,7 +180,7 @@ export default function RRuleEteSync(props: PropsType) {