Commit fdccf2b2 authored by RAHUL RATHORE's avatar RAHUL RATHORE
Browse files

fix: array filter products issue

parent f3ee366c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4,10 +4,10 @@
			selectedOrder.orderNumber
		}}</span
	>
	<span class="badge badge-primary">{{
	<span class="badge badge-primary mr-1">{{
		getStatus(selectedOrder.warehouseStatusText)
	}}</span>
	<span class="badge badge-secondary">{{
	<span class="badge badge-secondary ml-1">{{
		getStatus(selectedOrder.carrierStatusText)
	}}</span>
</div>
+8 −10
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ import { UserProductsRouter } from '@modules/client.common.angular2/routers/user
import { UserRouter } from '@modules/client.common.angular2/routers/user-router.service';
import ProductInfo from '@modules/server.common/entities/ProductInfo';
import { takeUntil, first } from 'rxjs/operators';
import { Subject } from 'rxjs';
import { firstValueFrom, Subject } from 'rxjs';
import { Store } from '../../services/store.service';
import { Router } from '@angular/router';
import { IOrderCreateInput } from '@modules/server.common/routers/IWarehouseOrdersRouter';
@@ -332,11 +332,9 @@ export class ProductsPage implements OnInit, OnDestroy {
			this.hasPendingOrder &&
			this.store.orderWarehouseId
		) {
			const { status } = await this.ordersService
				.getOrder(this.store.orderId, `{status}`)
				.pipe(first())
				.toPromise();

			const { status } = await firstValueFrom(
				this.ordersService.getOrder(this.store.orderId, `{status}`)
			);
			if (status < OrderStatus.Delivered) {
				merchantIds = [this.store.orderWarehouseId];
			} else {
@@ -487,13 +485,13 @@ export class ProductsPage implements OnInit, OnDestroy {

	private async loadMerchant() {
		if (this.store.inStore) {
			this.merchant = await this.warehouseRouter
				.get(this.store.inStore, false)
				.pipe(first())
				.toPromise();
			this.merchant = await firstValueFrom(
				this.warehouseRouter.get(this.store.inStore, false)
			);
		}
		this.loadProducts();
	}

	toggleSearch() {
		this.isSearchOpened = !this.isSearchOpened;
	}
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ export class GeoLocationProductsService {
			})
			.valueChanges.pipe(
				map((res) =>
					res.data.geoLocationProductsByPaging.filter(
					res.data.geoLocationProductsByPaging.filter(Boolean).filter(
						(p) => p.warehouseProduct.isProductAvailable === true
					)
				),