Commit 918a7500 authored by Yavor Grancharov's avatar Yavor Grancharov
Browse files

fix: hide unavailable products in all shops

parent 92ef23c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ export class WarehouseOrderModalComponent implements OnInit, OnDestroy {

	private _loadWarehouseProducts() {
		this._warehouseProductsRouter
			.get(this.warehouseId)
			.getAvailable(this.warehouseId)
			.pipe(takeUntil(this._ngDestroy$))
			.subscribe((p) => {
				Object.assign(this._warehouseProducts, p);
+3 −1
Original line number Diff line number Diff line
@@ -122,7 +122,9 @@ export class WarehousesProductsService
			map((warehouseProducts) =>
				_.filter(
					warehouseProducts,
					(warehouseProduct) => warehouseProduct.count > 0
					(warehouseProduct) =>
						warehouseProduct.count > 0 &&
						warehouseProduct.isProductAvailable === true
				)
			)
		);
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ export class WarehouseProductsService {
							isManufacturing
							isCarrierRequired
							isDeliveryRequired
							isProductAvailable
							isTakeaway
							deliveryTimeMin
							deliveryTimeMax