Pages/shows: disable add new show button while loading
This commit is contained in:
parent
193944d55b
commit
42aa436e81
2 changed files with 3 additions and 1 deletions
|
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
<div class="row justify-content-end mt-3">
|
||||
<div class="col-2">
|
||||
<button type="button" class="btn btn-primary" (click)="createNewShow()">Add new show</button>
|
||||
<button type="button" class="btn btn-primary" (click)="createNewShow()" [disabled]="loading">Add new show</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ export class ShowsComponent {
|
|||
private modalService: NgbModal = inject(NgbModal);
|
||||
|
||||
shows: Show[] = [];
|
||||
loading: boolean = true;
|
||||
|
||||
constructor() {
|
||||
let loadToast: Toast = {body: "Loading shows..."};
|
||||
|
|
@ -38,6 +39,7 @@ export class ShowsComponent {
|
|||
htmlClass: "bg-success text-light"
|
||||
}
|
||||
this.toastService.show(successToast);
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue