mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-06 05:22:52 +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',
|
type: 'boolean',
|
||||||
},
|
},
|
||||||
|
size: 50,
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -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>),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user