Unverified Commit 5a832b5e authored by Ruslan Konviser's avatar Ruslan Konviser Committed by GitHub
Browse files

Update carrier-edit.component.ts

parent 83afac5d
Loading
Loading
Loading
Loading
+2 −29
Original line number Diff line number Diff line
@@ -39,12 +39,6 @@ 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());
	// 	})
	// );

	public currentCarrier: Carrier;

	constructor(
@@ -60,27 +54,6 @@ export class CarrierEditComponent implements OnInit {
	}

	ngOnInit() {		
		// this.carrier$
		// 	.withLatestFrom(this.carrierId$)
		// 	.subscribe(([carrier, id]) => {
		// 		if (!carrier) {
		// 			this.toasterService.pop(
		// 				'error',
		// 				`Carrier with id ${id} doesn't exist!`
		// 			);
		// 		}

		// 		this.currentCarrier = carrier;

		// 		// GeoJSON use reversed order for coordinates from our locationForm.
		// 		// we use lat => lng but GeoJSON use lng => lat.
		// 		const geoLocationInput = carrier.geoLocation;
		// 		geoLocationInput.loc.coordinates.reverse();

		// 		this.basicInfoForm.setValue(carrier);
		// 		this.locationForm.setValue(geoLocationInput);
		// 		this.locationForm.setApartment(carrier.apartment);
		// 	});
		const id = this.activatedRoute.snapshot.params.id;

		this.carrierRouter