Skip to content

Commit

Permalink
update disabled state of button
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayvirS committed Jan 9, 2025
1 parent 32dd52e commit c1065cd
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,31 @@ <h5 class="fw-medium">
</div>

<div class="plagiarism-header-right">
@if (comparison.status !== plagiarismStatus.CONFIRMED && !isLoading && !exercise.teamMode) {
<button class="btn btn-success btn-sm" (click)="confirmPlagiarism()" data-qa="confirm-plagiarism-button" jhiTranslate="artemisApp.plagiarism.confirm"></button>
} @else {
@if (comparison.status === plagiarismStatus.CONFIRMED) {
<button
class="btn btn-primary btn-sm"
data-qa="view-plagiarism-cases-button"
jhiTranslate="artemisApp.plagiarism.viewCases"
[routerLink]="['/course-management', exercise.course?.id, 'plagiarism-cases']"
[queryParams]="{ exerciseId: exercise.id }"
[disabled]="isLoading || exercise.teamMode"
></button>
} @else {
<button
class="btn btn-success btn-sm"
(click)="confirmPlagiarism()"
data-qa="confirm-plagiarism-button"
jhiTranslate="artemisApp.plagiarism.confirm"
[disabled]="isLoading || exercise.teamMode"
></button>
}

<button
[disabled]="comparison.status === plagiarismStatus.DENIED || isLoading || exercise.teamMode"
class="btn btn-danger btn-sm"
(click)="denyPlagiarism()"
data-qa="deny-plagiarism-button"
jhiTranslate="artemisApp.plagiarism.deny"
[disabled]="comparison.status === plagiarismStatus.DENIED || isLoading || exercise.teamMode"
></button>

<div class="vertical-divider"></div>
Expand Down

0 comments on commit c1065cd

Please sign in to comment.