File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
{{!-- template-lint-disable no-nested-interactive --}}
2
- <UiAccordion class =" segment p-0" style ={{ css background-color = @session.track.color border-color =' lightgray' }} >
2
+ <UiAccordion class =" segment p-0" style ={{ css background-color = @session.track.color border-color =' lightgray' }} {{ did-insert this.setUpComponent }} >
3
3
<div class =" title p-4 pr-1" {{ action ' hideSpeakerImage' }} role =" button" style ={{ css color = (text-color @session.track.color )}} >
4
4
<div class =" ui" >
5
5
<h3 class =" ui header d-flex" id =" session-id-{{ @session.id }} " style ={{ css color = (text-color @session.track.color )}} >
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ export default class SessionItem extends Component {
16
16
@tracked
17
17
hideImage = this . args . expanded ;
18
18
19
+ @tracked
20
+ sortedSpeakers = [ ] ;
21
+
19
22
get youtubeLink ( ) {
20
23
return extractYoutubeUrl ( this . args . session . videoUrl ) ;
21
24
}
@@ -25,8 +28,9 @@ export default class SessionItem extends Component {
25
28
return url . startsWith ( 'https://open-event-api-dev.herokuapp.com' ) || url . startsWith ( 'https://api.eventyay.com' ) ;
26
29
}
27
30
28
- get sortedSpeakers ( ) {
29
- const { speakers } = this . args . session ;
31
+ @action
32
+ async setUpComponent ( ) {
33
+ const { speakers } = await this . args . session ;
30
34
const sortedSpeakers = { } ;
31
35
const sessionId = this . args . session . id ;
32
36
let count = 0 ;
@@ -37,7 +41,7 @@ export default class SessionItem extends Component {
37
41
}
38
42
} ) ;
39
43
Object . fromEntries ( Object . entries ( sortedSpeakers ) . sort ( ) ) ;
40
- return count === speakers . length ? Object . values ( sortedSpeakers ) : speakers ;
44
+ this . sortedSpeakers = count === speakers . length ? Object . values ( sortedSpeakers ) : speakers ;
41
45
}
42
46
43
47
get sessionEnded ( ) {
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export default class Schedule extends Component<ScheduleArgs> {
62
62
}
63
63
64
64
get resources ( ) { // eslint-disable-line @typescript-eslint/explicit-module-boundary-types
65
- return this . args . rooms . map ( room => ( { id : room . id , title : room . name } ) ) ;
65
+ return this . args . rooms ? .map ( room => ( { id : room . id , title : room . name } ) ) ;
66
66
}
67
67
68
68
get events ( ) { // eslint-disable-line @typescript-eslint/explicit-module-boundary-types
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export default class extends Controller {
11
11
12
12
@computed ( 'model.microlocations' )
13
13
get microlocations ( ) {
14
- return this . model . microlocations . sortBy ( 'position' ) . filter ( x => ! x . hiddenInScheduler ) ;
14
+ return this . model . microlocations ? .sortBy ( 'position' ) . filter ( x => ! x . hiddenInScheduler ) ;
15
15
}
16
16
17
17
@computed ( 'model.unscheduled' , 'filter' )
You can’t perform that action at this time.
0 commit comments