File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
< div class ="card " style ="min-height: 80px !important ">
2
2
< div
3
- id ="course-{{ course.id }}-header "
3
+ id ="course-{{ course() .id }}-header "
4
4
class ="card-header text-white "
5
5
[routerLink] ="['/lti/exercises', this.course.id] "
6
6
[ngStyle] ="{ '--background-color-for-hover': courseColor } "
9
9
< div class ="container ">
10
10
< div class ="row d-flex ">
11
11
< div class ="col-2 header-col image-col ">
12
- @if (course.courseIcon) {
13
- < jhi-secured-image [cachingStrategy] ="CachingStrategy.LOCAL_STORAGE " [src] ="course.courseIcon " />
12
+ @if (course() .courseIcon) {
13
+ < jhi-secured-image [cachingStrategy] ="CachingStrategy.LOCAL_STORAGE " [src] ="course() .courseIcon " />
14
14
}
15
15
</ div >
16
16
< div class ="col-7 header-col title-col px-3 ">
17
17
< h5 class ="card-title text-center ">
18
- {{ course.title + ' (' + course.shortName + ')' }}
18
+ {{ course() .title + ' (' + course() .shortName + ')' }}
19
19
</ h5 >
20
20
</ div >
21
21
< div class ="col-2 header-col course-info-col "> </ div >
Original file line number Diff line number Diff line change 1
- import { Component , Input , OnChanges } from '@angular/core' ;
1
+ import { Component , OnChanges , input } from '@angular/core' ;
2
2
import { Course } from 'app/entities/course.model' ;
3
3
import { ARTEMIS_DEFAULT_COLOR } from 'app/app.constants' ;
4
4
import { CachingStrategy } from 'app/shared/image/secured-image.component' ;
@@ -15,11 +15,11 @@ import { ArtemisSharedModule } from 'app/shared/shared.module';
15
15
} )
16
16
export class LtiCourseCardComponent implements OnChanges {
17
17
readonly ARTEMIS_DEFAULT_COLOR = ARTEMIS_DEFAULT_COLOR ;
18
- @ Input ( ) course : Course ;
18
+ course = input < Course > ( ) ;
19
19
CachingStrategy = CachingStrategy ;
20
20
courseColor : string ;
21
21
22
22
ngOnChanges ( ) {
23
- this . courseColor = this . course . color || this . ARTEMIS_DEFAULT_COLOR ;
23
+ this . courseColor = this . course ( ) . color || this . ARTEMIS_DEFAULT_COLOR ;
24
24
}
25
25
}
You can’t perform that action at this time.
0 commit comments