import { Component, EventEmitter, Injector, ViewChild, Output, Input } from '@angular/core'; import { AppComponentBase } from '@shared/common/app-component-base'; import { VehicleListDto } 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'; @Component({ templateUrl: './view-vehicle-modal.component.html', selector: 'viewVehicleModal', }) export class ViewVehicleModalComponent extends AppComponentBase { @ViewChild('viewVehicle', {static: true }) modal: ModalDirective; active = false; hide: boolean = false; txtFilter: any; item: VehicleListDto; driverName : string; vehicleName : string; licenseNumber : string; vehicleMarker : string; @Input('inputs') inputs: { locationId: number; loadDate: any; } = {}; constructor( injector: Injector, ) { super(injector); } ngOnInit(){ } show(item: VehicleListDto) { console.log(item); this.item = item; this.vehicleName = item.name; this.driverName = item.user.name + " " + item.user.surname; this.licenseNumber = item.licenseNumber; // this.vehicleMarker = item.color; $("#showColor").css("color" , item.color ); this.active = true; this.modal.show(); } onShown(): void { $('.kt-select2').select2(); } close(): void { this.active = false; this.modal.hide(); } }