From c1161bf3e3dc5437968042a23cc5bb10070b715b Mon Sep 17 00:00:00 2001 From: Paul Rangger Date: Sat, 1 Feb 2025 17:29:44 +0100 Subject: [PATCH] Added required to inputs --- .../course-conversations-code-of-conduct.component.ts | 6 +++--- .../course-wide-search/course-wide-search.component.html | 8 ++++---- .../course-wide-search/course-wide-search.component.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/app/overview/course-conversations/code-of-conduct/course-conversations-code-of-conduct.component.ts b/src/main/webapp/app/overview/course-conversations/code-of-conduct/course-conversations-code-of-conduct.component.ts index 427b97bf0000..9fa80076fc96 100644 --- a/src/main/webapp/app/overview/course-conversations/code-of-conduct/course-conversations-code-of-conduct.component.ts +++ b/src/main/webapp/app/overview/course-conversations/code-of-conduct/course-conversations-code-of-conduct.component.ts @@ -17,13 +17,13 @@ export class CourseConversationsCodeOfConductComponent implements OnInit { private alertService = inject(AlertService); private conversationService = inject(ConversationService); - course = input(); + course = input.required(); responsibleContacts: User[] = []; ngOnInit() { - if (this.course()?.id) { - this.conversationService.getResponsibleUsersForCodeOfConduct(this.course()!.id!).subscribe({ + if (this.course().id) { + this.conversationService.getResponsibleUsersForCodeOfConduct(this.course().id!).subscribe({ next: (res: HttpResponse) => { if (res.body) { this.responsibleContacts = res.body; diff --git a/src/main/webapp/app/overview/course-conversations/course-wide-search/course-wide-search.component.html b/src/main/webapp/app/overview/course-conversations/course-wide-search/course-wide-search.component.html index 861eec82d710..b14be123e767 100644 --- a/src/main/webapp/app/overview/course-conversations/course-wide-search/course-wide-search.component.html +++ b/src/main/webapp/app/overview/course-conversations/course-wide-search/course-wide-search.component.html @@ -1,18 +1,18 @@ -
+
-
+

- @if (!courseWideSearchConfig()?.searchTerm) { + @if (!courseWideSearchConfig().searchTerm) { } @else { - + }

diff --git a/src/main/webapp/app/overview/course-conversations/course-wide-search/course-wide-search.component.ts b/src/main/webapp/app/overview/course-conversations/course-wide-search/course-wide-search.component.ts index 190d04e6ce7c..d89f732ed883 100644 --- a/src/main/webapp/app/overview/course-conversations/course-wide-search/course-wide-search.component.ts +++ b/src/main/webapp/app/overview/course-conversations/course-wide-search/course-wide-search.component.ts @@ -27,7 +27,7 @@ import { ArtemisTranslatePipe } from 'app/shared/pipes/artemis-translate.pipe'; imports: [NgClass, TranslateDirective, FaIconComponent, FormsModule, ReactiveFormsModule, NgbTooltip, InfiniteScrollDirective, PostingThreadComponent, ArtemisTranslatePipe], }) export class CourseWideSearchComponent implements OnInit, AfterViewInit, OnDestroy { - readonly courseWideSearchConfig = input(); + readonly courseWideSearchConfig = input.required(); readonly messages = viewChildren('postingThread'); readonly messages$ = toObservable(this.messages);