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) {
|
if (error) {
|
||||||
htmlClass = htmlClass.replace("success", "danger")
|
htmlClass = htmlClass.replace("success", "danger")
|
||||||
let temp: string
|
let temp: string
|
||||||
switch (action){
|
switch (action) {
|
||||||
case "created":
|
case "created":
|
||||||
temp = "created"
|
temp = "created"
|
||||||
break
|
break
|
||||||
|
|
@ -109,6 +109,6 @@ export class CreateEditModalComponent {
|
||||||
} else {
|
} else {
|
||||||
body = `Show ${action} successfully!`
|
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', () => {
|
describe('DeleteModalComponent', () => {
|
||||||
let component: DeleteModalComponent;
|
let component: DeleteModalComponent;
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,6 @@
|
||||||
import {Component, inject} from '@angular/core';
|
import {Component, inject} from '@angular/core';
|
||||||
import {NgbActiveModal, NgbCollapse} from '@ng-bootstrap/ng-bootstrap';
|
import {NgbActiveModal, NgbCollapse} from '@ng-bootstrap/ng-bootstrap';
|
||||||
import {
|
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from '@angular/forms';
|
||||||
FormControl,
|
|
||||||
FormGroup,
|
|
||||||
FormsModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
Validators
|
|
||||||
} from '@angular/forms';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-delete-modal',
|
selector: 'app-delete-modal',
|
||||||
|
|
@ -27,7 +21,7 @@ export class DeleteModalComponent {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.confirmationForm = new FormGroup({
|
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.show = show
|
||||||
modal.componentInstance.initForm()
|
modal.componentInstance.initForm()
|
||||||
modal.result.then(
|
modal.result.then(
|
||||||
(closeResult: Show) => {this.shows[index] = closeResult},
|
(closeResult: Show) => {
|
||||||
(dissmissResult) => {}
|
this.shows[index] = closeResult
|
||||||
|
},
|
||||||
|
(dissmissResult) => {
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue