mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
[HIMA-1113] on product details to enable or dessable the add to cart button also status codes are checked the same as the popup
This commit is contained in:
@@ -219,14 +219,21 @@ export class ProductDetailsComponent implements OnInit, OnDestroy {
|
||||
if (isDownload && this.downloadError) {
|
||||
return true;
|
||||
}
|
||||
if (isDownload && this.downloadLoaded && this.availability.filter(t => t.type === CheckoutType.donwload && t.quantity > 0).length < 1) {
|
||||
if (
|
||||
isDownload &&
|
||||
this.downloadLoaded &&
|
||||
this.availability.filter(t => t.type === CheckoutType.donwload && t.quantity > 0 && allowedAvailabilityStatusCodes(t.status)).length <
|
||||
1
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
// TODO: add logic here
|
||||
if (
|
||||
!isDownload &&
|
||||
this.storeAvLoaded &&
|
||||
this.shippingAvLoaded &&
|
||||
this.availability.filter(t => t.type !== CheckoutType.donwload && t.quantity > 0).length < 1
|
||||
this.availability.filter(t => t.type !== CheckoutType.donwload && t.quantity > 0 && allowedAvailabilityStatusCodes(t.status)).length <
|
||||
1
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user