Reformat code
This commit is contained in:
parent
312fedec7b
commit
8f416cc8b4
4 changed files with 12 additions and 15 deletions
|
|
@ -97,7 +97,7 @@ export class CreateEditModalComponent {
|
|||
if (error) {
|
||||
htmlClass = htmlClass.replace("success", "danger")
|
||||
let temp: string
|
||||
switch (action){
|
||||
switch (action) {
|
||||
case "created":
|
||||
temp = "created"
|
||||
break
|
||||
|
|
@ -109,6 +109,6 @@ export class CreateEditModalComponent {
|
|||
} else {
|
||||
body = `Show ${action} successfully!`
|
||||
}
|
||||
this.toastService.show({body,htmlClass})
|
||||
this.toastService.show({body, htmlClass})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
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',
|
||||
|
|
@ -27,7 +21,7 @@ export class DeleteModalComponent {
|
|||
|
||||
constructor() {
|
||||
this.confirmationForm = new FormGroup({
|
||||
name: new FormControl("",Validators.required)
|
||||
name: new FormControl("", Validators.required)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,8 +89,11 @@ export class ShowsComponent {
|
|||
modal.componentInstance.show = show
|
||||
modal.componentInstance.initForm()
|
||||
modal.result.then(
|
||||
(closeResult: Show) => {this.shows[index] = closeResult},
|
||||
(dissmissResult) => {}
|
||||
(closeResult: Show) => {
|
||||
this.shows[index] = closeResult
|
||||
},
|
||||
(dissmissResult) => {
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue