Skip to content

Commit 9866e71

Browse files
committed
fix: button still usable when disabled
1 parent 58bc05f commit 9866e71

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/app/admin-dashboard/admin-dashboard.component.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ <h1 class="text-primary" data-id="adminHeading">{{ 'poll.configure' | translate
4343
<div class="row">
4444
<div class="col col-12">
4545
<button
46+
role="switch"
47+
type="button"
4648
(click)="toggleStatus()"
47-
[attr.aria-disabled]="isStatusDisabled"
48-
[ngClass]="{'disabled': isStatusDisabled}"
49-
class="w-100 btn-circle"
5049
data-id="statusPollButton"
51-
role="switch"
50+
class="w-100 btn-circle"
51+
[attr.aria-disabled]="isStatusDisabled"
5252
[attr.aria-checked]="isStarted"
5353
>
5454
<!--suppress HtmlUnknownTarget no inspection for this dynamic src path -->

src/app/admin-dashboard/admin-dashboard.component.ts

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ export class AdminDashboardComponent implements OnInit {
3939
}
4040

4141
public toggleStatus(): void {
42+
if (this.isStatusDisabled) return;
43+
4244
const statusType = this.isStarted
4345
? AppointmentStatusType.Paused
4446
: AppointmentStatusType.Started;

0 commit comments

Comments
 (0)