mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1823: #4895 - Add download availability to article details component and update pri...
#4895 - Add download availability to article details component and update price mapping logic
This commit is contained in:
committed by
Nino Righi
parent
a0c8035dbb
commit
17a68b9dbb
@@ -164,6 +164,7 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy {
|
||||
this.store.deliveryAvailability$,
|
||||
this.store.deliveryDigAvailability$,
|
||||
this.store.deliveryB2BAvailability$,
|
||||
this.store.downloadAvailability$,
|
||||
]).pipe(
|
||||
map((availabilities) => {
|
||||
return availabilities?.some((availability) => (availability as any)?.priceMaintained) ?? false;
|
||||
@@ -177,8 +178,9 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy {
|
||||
this.store.deliveryAvailability$,
|
||||
this.store.deliveryDigAvailability$,
|
||||
this.store.deliveryB2BAvailability$,
|
||||
this.store.downloadAvailability$,
|
||||
]).pipe(
|
||||
map(([item, takeAway, pickUp, delivery, deliveryDig, deliveryB2B]) => {
|
||||
map(([item, takeAway, pickUp, delivery, deliveryDig, deliveryB2B, download]) => {
|
||||
const hasPickupOrTakeaway = takeAway?.inStock || pickUp?.inStock;
|
||||
|
||||
if (hasPickupOrTakeaway && item?.catalogAvailability?.price?.value?.value) {
|
||||
@@ -201,6 +203,10 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy {
|
||||
return deliveryB2B.price;
|
||||
}
|
||||
|
||||
if (download?.price?.value?.value) {
|
||||
return download.price;
|
||||
}
|
||||
|
||||
return null;
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user