diff --git a/frontend/src/app/navigation-bar/navigation-bar.component.html b/frontend/src/app/navigation-bar/navigation-bar.component.html index d5a8a174a2..9261df7948 100644 --- a/frontend/src/app/navigation-bar/navigation-bar.component.html +++ b/frontend/src/app/navigation-bar/navigation-bar.component.html @@ -7,7 +7,7 @@ @if (user) { - + - - - - -
- - -
-
-
- - -
-

Questions

-
-
- - - - Id - Title - Topics - Difficulty - - - - - - - - - {{ question.id }} - {{ question.title }} - {{ question.topics.join(', ') }} - {{ question.difficulty }} - + @if (loading) { + + + } @else { + +
+ @if (isAdmin) { + +
- - - - -
- + (onClick)="openNewQuestion()"/> + +
+ + } @else { +
+ } +
+ + +
+

Questions

+
+
+ + + @if (isAdmin) { + + Id + Title + Topics + Difficulty + + } @else { + Id + Title + Topics + Difficulty + } + + + + + @ if (isAdmin) { + + {{ question.id }} + {{ question.title }} + {{ question.topics.join(', ') }} + {{ question.difficulty }} + + + } @else { + {{ question.id }} + {{ question.title }} + {{ question.topics.join(', ') }} + {{ question.difficulty }} + } + + +
+
+
+
+ } {{ clickedOnQuestion?.title }}

{{ clickedOnQuestion?.description }}

- + \ No newline at end of file diff --git a/frontend/src/app/questions/questions.component.ts b/frontend/src/app/questions/questions.component.ts index 8b411d8a41..7ab25bbe20 100644 --- a/frontend/src/app/questions/questions.component.ts +++ b/frontend/src/app/questions/questions.component.ts @@ -81,6 +81,7 @@ export class QuestionsComponent implements OnInit { editQuestion(question: Question) { this.question = question; this.isDialogVisible = true; + this.isPanelVisible = false; } deleteSelectedQuestions() { @@ -135,7 +136,9 @@ export class QuestionsComponent implements OnInit { onRowSelect(question: Question) { this.clickedOnQuestion = question; - this.isPanelVisible = true; + if (!this.isDialogVisible) { + this.isPanelVisible = true; + } } closePanel() {