import { Component, Injector, ViewEncapsulation, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { TagsServiceProxy, TagDto, TagTypeServiceProxy, CreateOrEditTagDto, OrderServiceProxy} from '@shared/service-proxies/service-proxies'; import { NotifyService } from '@abp/notify/notify.service'; import { AppComponentBase } from '@shared/common/app-component-base'; import { TokenAuthServiceProxy } from '@shared/service-proxies/service-proxies'; import { appModuleAnimation } from '@shared/animations/routerTransition'; import { Table } from 'primeng/components/table/table'; import { Paginator } from 'primeng/components/paginator/paginator'; import { LazyLoadEvent } from 'primeng/components/common/lazyloadevent'; import { FileDownloadService } from '@shared/utils/file-download.service'; import * as _ from 'lodash'; import * as moment from 'moment'; import { Location } from '@angular/common'; @Component({ templateUrl: './customer-tracking.component.html', styleUrls: ['./customer-portal.component.css'], encapsulation: ViewEncapsulation.None, animations: [appModuleAnimation()] }) export class CustomerTrackComponent extends AppComponentBase { tagName: string constructor( injector: Injector, private _orderDetailAppService : OrderServiceProxy, private router: Router, private location: Location, ) { super(injector); } ngOnInit(){ } getOrderDetails(){ this.spinnerService.show(); this._orderDetailAppService.getCustomerTracking(this.tagName) .pipe() .subscribe(result=>{ if(result.orderId != null){ this.router.navigate(['app/sprintship/controller-order-details/'+result.orderId]) this.spinnerService.hide(); } else{ this.spinnerService.hide(); this.message.info( this.l("TrackingIdNotFoundMessage") ); } }) } goBack() { this.location.back(); } }