Skip to content

Commit 6820286

Browse files
committed
adds calendarStartDate and calendarEndDate attrs to learner-group and offering calendars.
since we're dealing with offering-based events only here, we can default these attrs to startDate and endDate directly. no edge-case logic needed.
1 parent cf9535b commit 6820286

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/frontend/app/components/learner-group/calendar.gjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export default class LearnerGroupCalendarComponent extends Component {
6464
return {
6565
startDate: offering.startDate.toISOString(),
6666
endDate: offering.endDate.toISOString(),
67+
calendarStartDate: offering.startDate.toISOString(),
68+
calendarEndDate: offering.endDate.toISOString(),
6769
courseTitle: course.title,
6870
name: session.title,
6971
offering: offering.id,

packages/ilios-common/addon/components/offering-calendar.gjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export default class OfferingCalendar extends Component {
4444
return {
4545
startDate: DateTime.fromJSDate(offering.startDate).toISO(),
4646
endDate: DateTime.fromJSDate(offering.endDate).toISO(),
47+
calendarStartDate: DateTime.fromJSDate(offering.startDate).toISO(),
48+
calendarEndDate: DateTime.fromJSDate(offering.endDate).toISO(),
4749
courseTitle: course.title,
4850
name: session.title,
4951
offering: offering.id,
@@ -71,6 +73,8 @@ export default class OfferingCalendar extends Component {
7173
return {
7274
startDate: DateTime.fromJSDate(offering.startDate).toISO(),
7375
endDate: DateTime.fromJSDate(offering.endDate).toISO(),
76+
calendarStartDate: DateTime.fromJSDate(offering.startDate).toISO(),
77+
calendarEndDate: DateTime.fromJSDate(offering.endDate).toISO(),
7478
courseTitle: course.title,
7579
name: session.title,
7680
offering: offering.id,
@@ -84,6 +88,8 @@ export default class OfferingCalendar extends Component {
8488
this.currentEvent = {
8589
startDate: DateTime.fromJSDate(startDate).toISO(),
8690
endDate: DateTime.fromJSDate(endDate).toISO(),
91+
calendarStartDate: DateTime.fromJSDate(startDate).toISO(),
92+
calendarEndDate: DateTime.fromJSDate(endDate).toISO(),
8793
courseTitle: course.title,
8894
name: session.title,
8995
isPublished: session.isPublished,

0 commit comments

Comments
 (0)