mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-13 17:56:20 +00:00
fix: recurring schedule offset and event limit
This commit is contained in:
@@ -262,6 +262,7 @@ export class ScheduleProvider implements OnDestroy {
|
||||
},
|
||||
type: 'boolean',
|
||||
},
|
||||
size: 50,
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
@@ -91,13 +91,10 @@ export class ScheduleViewComponent
|
||||
// @Override
|
||||
routeFragment = 'schedule/recurring';
|
||||
|
||||
// start at sunday
|
||||
// start at fist weekday depending on locale
|
||||
weekDates = Array.from({length: 7}).map(
|
||||
// eslint-disable-next-line unicorn/consistent-function-scoping
|
||||
(_, i) =>
|
||||
moment()
|
||||
.startOf('week')
|
||||
.add(i - 1, 'days'),
|
||||
(_, i) => moment().startOf('week').add(i, 'days'),
|
||||
);
|
||||
|
||||
constructor(
|
||||
@@ -162,7 +159,7 @@ export class ScheduleViewComponent
|
||||
for (const series of dateSeries.dates) {
|
||||
const weekDays = Object.keys(
|
||||
series.dates.reduce((accumulator, date) => {
|
||||
accumulator[moment(date).isoWeekday()] = true;
|
||||
accumulator[moment(date).weekday()] = true;
|
||||
return accumulator;
|
||||
}, {} as Record<number, true>),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user