fix: recurring schedule offset and event limit

This commit is contained in:
Rainer Killinger
2022-10-26 12:19:44 +02:00
parent a037090eec
commit 9c6b5131cd
2 changed files with 4 additions and 6 deletions

View File

@@ -262,6 +262,7 @@ export class ScheduleProvider implements OnDestroy {
},
type: 'boolean',
},
size: 50,
});
return {

View File

@@ -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>),
);