File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { next } from '@ember/runloop';
1313
1414interface ScheduleArgs {
1515 timezone : string | undefined ,
16+ isPublic : boolean | undefined ,
1617 event : Event ,
1718 sessions : Session [ ] ,
1819 rooms : Microlocation [ ]
@@ -124,8 +125,18 @@ export default class Schedule extends Component<ScheduleArgs> {
124125 */
125126 adjustMinTime ( view : FullCalendarView , calendar : JQuery < HTMLElement > ) : void {
126127 if ( isTesting || ! ( view . type === 'agendaDay' || view . type === 'timelineDay' ) ) { return }
127-
128- let minTime = '0:00:00' ;
128+ let min_time = '24:00:00' ;
129+ if ( this . args . isPublic === true ) {
130+ this . args . sessions . map ( x => {
131+ const z = String ( x . startsAt . format ( 'HH:mm:ss' ) ) ;
132+ if ( min_time > z ) {
133+ min_time = z ;
134+ }
135+ } ) ;
136+ } else {
137+ min_time = '0:00:00' ;
138+ }
139+ let minTime = min_time ;
129140 let maxTime = '24:00:00' ;
130141 if ( view . start . isSame ( this . args . event . startsAt , 'day' ) ) {
131142 ( { minTime } = this ) ;
Original file line number Diff line number Diff line change 1111 @event ={{ this.model.event }}
1212 @sessions ={{ this.model.sessions }}
1313 @rooms ={{ this.model.microlocations }}
14- @height =" auto" />
14+ @height =" auto"
15+ @isPublic ={{ true }} />
1516{{ else }}
1617 <div class =" ui disabled header" >{{ t ' Schedule for the event is currently unavailable' }} </div >
1718{{ /if }}
You can’t perform that action at this time.
0 commit comments