Skip to content

Commit 71769f5

Browse files
committed
signal for course card
1 parent 29249df commit 71769f5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/main/webapp/app/lti/lti-course-card.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="card" style="min-height: 80px !important">
22
<div
3-
id="course-{{ course.id }}-header"
3+
id="course-{{ course().id }}-header"
44
class="card-header text-white"
55
[routerLink]="['/lti/exercises', this.course.id]"
66
[ngStyle]="{ '--background-color-for-hover': courseColor }"
@@ -9,13 +9,13 @@
99
<div class="container">
1010
<div class="row d-flex">
1111
<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" />
1414
}
1515
</div>
1616
<div class="col-7 header-col title-col px-3">
1717
<h5 class="card-title text-center">
18-
{{ course.title + ' (' + course.shortName + ')' }}
18+
{{ course().title + ' (' + course().shortName + ')' }}
1919
</h5>
2020
</div>
2121
<div class="col-2 header-col course-info-col"></div>

src/main/webapp/app/lti/lti-course-card.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Input, OnChanges } from '@angular/core';
1+
import { Component, OnChanges, input } from '@angular/core';
22
import { Course } from 'app/entities/course.model';
33
import { ARTEMIS_DEFAULT_COLOR } from 'app/app.constants';
44
import { CachingStrategy } from 'app/shared/image/secured-image.component';
@@ -15,11 +15,11 @@ import { ArtemisSharedModule } from 'app/shared/shared.module';
1515
})
1616
export class LtiCourseCardComponent implements OnChanges {
1717
readonly ARTEMIS_DEFAULT_COLOR = ARTEMIS_DEFAULT_COLOR;
18-
@Input() course: Course;
18+
course = input<Course>();
1919
CachingStrategy = CachingStrategy;
2020
courseColor: string;
2121

2222
ngOnChanges() {
23-
this.courseColor = this.course.color || this.ARTEMIS_DEFAULT_COLOR;
23+
this.courseColor = this.course().color || this.ARTEMIS_DEFAULT_COLOR;
2424
}
2525
}

0 commit comments

Comments
 (0)