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'; @Component({ templateUrl: './tracking-page-order.component.html', encapsulation: ViewEncapsulation.None, animations: [appModuleAnimation()] }) export class TrackingPageComponent extends AppComponentBase { tagName: string constructor( injector: Injector, private _orderDetailAppService : OrderServiceProxy, private router: Router ) { super(injector); } ngOnInit(){ } getOrderDetails(){ this.spinnerService.show(); this._orderDetailAppService.getTrackingId(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") ); } }) } }