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', type: 'boolean',
}, },
size: 50,
}); });
return { return {

View File

@@ -91,13 +91,10 @@ export class ScheduleViewComponent
// @Override // @Override
routeFragment = 'schedule/recurring'; routeFragment = 'schedule/recurring';
// start at sunday // start at fist weekday depending on locale
weekDates = Array.from({length: 7}).map( weekDates = Array.from({length: 7}).map(
// eslint-disable-next-line unicorn/consistent-function-scoping // eslint-disable-next-line unicorn/consistent-function-scoping
(_, i) => (_, i) => moment().startOf('week').add(i, 'days'),
moment()
.startOf('week')
.add(i - 1, 'days'),
); );
constructor( constructor(
@@ -162,7 +159,7 @@ export class ScheduleViewComponent
for (const series of dateSeries.dates) { for (const series of dateSeries.dates) {
const weekDays = Object.keys( const weekDays = Object.keys(
series.dates.reduce((accumulator, date) => { series.dates.reduce((accumulator, date) => {
accumulator[moment(date).isoWeekday()] = true; accumulator[moment(date).weekday()] = true;
return accumulator; return accumulator;
}, {} as Record<number, true>), }, {} as Record<number, true>),
); );