Loading packages/admin-web-angular/src/app/pages/+carriers/+carrier/+carrier-edit/carrier-edit.component.html +2 −2 Original line number Diff line number Diff line <toaster-container></toaster-container> <div> <nb-card *ngIf="carrier$ | async as carrier"> <nb-card *ngIf="currentCarrier"> <nb-card-header> <!-- back --> <div class="d-inline-flex"> <svg viewBox="0 0 24 24" class="control-icon control-icon-left" [routerLink]="['/carriers/' + carrier.id]" [routerLink]="['/carriers/' + currentCarrier.id]" > <path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" Loading packages/admin-web-angular/src/app/pages/+carriers/+carrier/+carrier-edit/carrier-edit.component.ts +10 −13 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ import { CarrierRouter } from '@modules/client.common.angular2/routers/carrier-r import Carrier from '@modules/server.common/entities/Carrier'; import IGeoLocation from '@modules/server.common/interfaces/IGeoLocation'; import { ToasterService } from 'angular2-toaster'; import { first, map, switchMap } from 'rxjs/operators'; import { map, first } from 'rxjs/operators'; @Component({ selector: 'ea-carrier-edit', Loading Loading @@ -39,13 +39,7 @@ export class CarrierEditComponent implements OnInit { readonly carrierId$ = this.activatedRoute.params.pipe(map((p) => p['id'])); readonly carrier$ = this.carrierId$.pipe( switchMap((id) => { return this.carrierRouter.get(id).pipe(first()); }) ); private currentCarrier: Carrier; public currentCarrier: Carrier; constructor( private readonly toasterService: ToasterService, Loading @@ -60,9 +54,12 @@ export class CarrierEditComponent implements OnInit { } ngOnInit() { this.carrier$ .withLatestFrom(this.carrierId$) .subscribe(([carrier, id]) => { const id = this.activatedRoute.snapshot.params.id; this.carrierRouter .get(id) .pipe(first()) .subscribe((carrier) => { if (!carrier) { this.toasterService.pop( 'error', Loading Loading
packages/admin-web-angular/src/app/pages/+carriers/+carrier/+carrier-edit/carrier-edit.component.html +2 −2 Original line number Diff line number Diff line <toaster-container></toaster-container> <div> <nb-card *ngIf="carrier$ | async as carrier"> <nb-card *ngIf="currentCarrier"> <nb-card-header> <!-- back --> <div class="d-inline-flex"> <svg viewBox="0 0 24 24" class="control-icon control-icon-left" [routerLink]="['/carriers/' + carrier.id]" [routerLink]="['/carriers/' + currentCarrier.id]" > <path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" Loading
packages/admin-web-angular/src/app/pages/+carriers/+carrier/+carrier-edit/carrier-edit.component.ts +10 −13 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ import { CarrierRouter } from '@modules/client.common.angular2/routers/carrier-r import Carrier from '@modules/server.common/entities/Carrier'; import IGeoLocation from '@modules/server.common/interfaces/IGeoLocation'; import { ToasterService } from 'angular2-toaster'; import { first, map, switchMap } from 'rxjs/operators'; import { map, first } from 'rxjs/operators'; @Component({ selector: 'ea-carrier-edit', Loading Loading @@ -39,13 +39,7 @@ export class CarrierEditComponent implements OnInit { readonly carrierId$ = this.activatedRoute.params.pipe(map((p) => p['id'])); readonly carrier$ = this.carrierId$.pipe( switchMap((id) => { return this.carrierRouter.get(id).pipe(first()); }) ); private currentCarrier: Carrier; public currentCarrier: Carrier; constructor( private readonly toasterService: ToasterService, Loading @@ -60,9 +54,12 @@ export class CarrierEditComponent implements OnInit { } ngOnInit() { this.carrier$ .withLatestFrom(this.carrierId$) .subscribe(([carrier, id]) => { const id = this.activatedRoute.snapshot.params.id; this.carrierRouter .get(id) .pipe(first()) .subscribe((carrier) => { if (!carrier) { this.toasterService.pop( 'error', Loading