diff --git a/src/app/app.component.html b/src/app/app.component.html
index c8c2a5e..10d0c83 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -4,11 +4,13 @@
-
Are you sure you want to delete this show?
-
This cannot be reversed
-
-
-
+
Are you sure you want to delete this show?
+
This cannot be reversed
+
-
diff --git a/src/components/delete-modal/delete-modal.component.spec.ts b/src/components/delete-modal/delete-modal.component.spec.ts
index 7c29c0f..ee8a25e 100644
--- a/src/components/delete-modal/delete-modal.component.spec.ts
+++ b/src/components/delete-modal/delete-modal.component.spec.ts
@@ -1,23 +1,23 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
+import {ComponentFixture, TestBed} from '@angular/core/testing';
-import { DeleteModalComponent } from './delete-modal.component';
+import {DeleteModalComponent} from './delete-modal.component';
describe('DeleteModalComponent', () => {
- let component: DeleteModalComponent;
- let fixture: ComponentFixture
;
+ let component: DeleteModalComponent;
+ let fixture: ComponentFixture;
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- imports: [DeleteModalComponent]
- })
- .compileComponents();
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ imports: [DeleteModalComponent]
+ })
+ .compileComponents();
- fixture = TestBed.createComponent(DeleteModalComponent);
- component = fixture.componentInstance;
- fixture.detectChanges();
- });
+ fixture = TestBed.createComponent(DeleteModalComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
- it('should create', () => {
- expect(component).toBeTruthy();
- });
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
});
diff --git a/src/components/delete-modal/delete-modal.component.ts b/src/components/delete-modal/delete-modal.component.ts
index 759d264..94a76a5 100644
--- a/src/components/delete-modal/delete-modal.component.ts
+++ b/src/components/delete-modal/delete-modal.component.ts
@@ -1,52 +1,46 @@
import {Component, inject} from '@angular/core';
import {NgbActiveModal, NgbCollapse} from '@ng-bootstrap/ng-bootstrap';
-import {
- FormControl,
- FormGroup,
- FormsModule,
- ReactiveFormsModule,
- Validators
-} from '@angular/forms';
+import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from '@angular/forms';
@Component({
- selector: 'app-delete-modal',
- imports: [
- NgbCollapse,
- FormsModule,
- ReactiveFormsModule
- ],
- templateUrl: './delete-modal.component.html',
- styleUrl: './delete-modal.component.css'
+ selector: 'app-delete-modal',
+ imports: [
+ NgbCollapse,
+ FormsModule,
+ ReactiveFormsModule
+ ],
+ templateUrl: './delete-modal.component.html',
+ styleUrl: './delete-modal.component.css'
})
export class DeleteModalComponent {
- protected activeModal: NgbActiveModal = inject(NgbActiveModal)
- showName: string = ""
- formHidden: boolean = true;
- buttonDisabled: boolean = false;
- confirmationForm: FormGroup
+ protected activeModal: NgbActiveModal = inject(NgbActiveModal)
+ showName: string = ""
+ formHidden: boolean = true;
+ buttonDisabled: boolean = false;
+ confirmationForm: FormGroup
- constructor() {
- this.confirmationForm = new FormGroup({
- name: new FormControl("",Validators.required)
- })
- }
-
-
- deletePressed() {
- if (this.formHidden) {
- const regex = new RegExp(this.showName)
- const control = new FormControl("", [Validators.required, Validators.pattern(regex)])
- this.confirmationForm.setControl("name", control)
- this.formHidden = false;
- this.buttonDisabled = true;
- } else {
- this.formSubmitted()
+ constructor() {
+ this.confirmationForm = new FormGroup({
+ name: new FormControl("", Validators.required)
+ })
}
- }
- formSubmitted() {
- if (this.confirmationForm.valid) {
- this.activeModal.close(true)
+
+ deletePressed() {
+ if (this.formHidden) {
+ const regex = new RegExp(this.showName)
+ const control = new FormControl("", [Validators.required, Validators.pattern(regex)])
+ this.confirmationForm.setControl("name", control)
+ this.formHidden = false;
+ this.buttonDisabled = true;
+ } else {
+ this.formSubmitted()
+ }
+ }
+
+ formSubmitted() {
+ if (this.confirmationForm.valid) {
+ this.activeModal.close(true)
+ }
}
- }
}
diff --git a/src/components/toast-container/toast-container/toast-container.component.html b/src/components/toast-container/toast-container/toast-container.component.html
index 35b3224..05ee02a 100644
--- a/src/components/toast-container/toast-container/toast-container.component.html
+++ b/src/components/toast-container/toast-container/toast-container.component.html
@@ -3,5 +3,6 @@
[header]="toast.header || ''" [autohide]="true" [delay]="toast.delay || 5000"
(hidden)="toastService.remove(toast)"
[animation]="true" [class]="toast.htmlClass"
- >{{ toast.body }}
+ >{{ toast.body }}
+
}
diff --git a/src/components/toast-container/toast-container/toast-container.component.spec.ts b/src/components/toast-container/toast-container/toast-container.component.spec.ts
index d052b36..e9df657 100644
--- a/src/components/toast-container/toast-container/toast-container.component.spec.ts
+++ b/src/components/toast-container/toast-container/toast-container.component.spec.ts
@@ -1,6 +1,6 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
+import {ComponentFixture, TestBed} from '@angular/core/testing';
-import { ToastContainerComponent } from './toast-container.component';
+import {ToastContainerComponent} from './toast-container.component';
describe('ToastContainerComponent', () => {
let component: ToastContainerComponent;
@@ -10,7 +10,7 @@ describe('ToastContainerComponent', () => {
await TestBed.configureTestingModule({
imports: [ToastContainerComponent]
})
- .compileComponents();
+ .compileComponents();
fixture = TestBed.createComponent(ToastContainerComponent);
component = fixture.componentInstance;
diff --git a/src/index.html b/src/index.html
index b8f5f32..3d83aaf 100644
--- a/src/index.html
+++ b/src/index.html
@@ -8,6 +8,6 @@
-
+