import { Component, EventEmitter, Injector, ViewChild, Output } from '@angular/core'; import { AppComponentBase } from '@shared/common/app-component-base'; import { LocationListDto, VehicleListDto, RouteTemplateListDto } from '@shared/service-proxies/service-proxies'; import { ModalDirective } from 'ngx-bootstrap'; import { PrimengTableHelper } from 'shared/helpers/PrimengTableHelper'; import { finalize } from 'rxjs/operators'; import * as jquery from 'jquery'; import * as moment from 'moment'; // import * as DualListbox from 'dual-listbox'; @Component({ templateUrl: './controller-show-hide-modal.component.html', selector: 'controller-column', styleUrls: ['./controller-show-hide-modal.component.css'] }) export class ControllerShowHideComponent extends AppComponentBase { @ViewChild('createModal', {static: false}) modal: ModalDirective; @Output() modalSave: EventEmitter = new EventEmitter(); active = false; saving = false; filteredLocation: any; filteredVehicle: any; filteredRouteTemplate: any; loadDate: Date; departure: Date; completion: Date; locked = false; public DefaultDateValue: Date = new Date(); constructor( injector: Injector ) { super(injector); } ngOnInit(){ } show() { this.active = true; this.modal.show(); } onShown(): void { //document.getElementById('cityInput').focus(); $('.kt-select2').select2(); } close(): void { this.active = false; this.modal.hide(); } }