diff --git a/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx b/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx index 5e05b594..c67f9600 100644 --- a/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx +++ b/src/views/catalog/views/page/layout/badge-display/CatalogLayoutBadgeDisplayView.tsx @@ -5,6 +5,7 @@ import { InventoryBadgesRequestEvent } from '../../../../../../events/inventory/ import { dispatchUiEvent, useUiEvent } from '../../../../../../hooks'; import { NitroCardGridItemView } from '../../../../../../layout/card/grid/item/NitroCardGridItemView'; import { NitroCardGridView } from '../../../../../../layout/card/grid/NitroCardGridView'; +import { LocalizeText } from '../../../../../../utils/LocalizeText'; import { BadgeImageView } from '../../../../../shared/badge-image/BadgeImageView'; import { GetOfferName } from '../../../../common/CatalogUtilities'; import { useCatalogContext } from '../../../../context/CatalogContext'; @@ -18,8 +19,8 @@ export const CatalogLayoutBadgeDisplayView: FC(null); const [ badges, setBadges ] = useState([]); + const [ currentBadge, setCurrentBadge ] = useState(null); const product = ((activeOffer && activeOffer.products[0]) || null); @@ -63,7 +64,8 @@ export const CatalogLayoutBadgeDisplayView: FC
-
+
+
{ LocalizeText('catalog_selectbadge') }
{ badgeElements } @@ -73,7 +75,7 @@ export const CatalogLayoutBadgeDisplayView: FC
{ GetOfferName(activeOffer) }
- +
}
); diff --git a/src/views/catalog/views/page/purchase/CatalogPurchaseView.tsx b/src/views/catalog/views/page/purchase/CatalogPurchaseView.tsx index e2275968..ba6b4dd6 100644 --- a/src/views/catalog/views/page/purchase/CatalogPurchaseView.tsx +++ b/src/views/catalog/views/page/purchase/CatalogPurchaseView.tsx @@ -7,7 +7,7 @@ import { CatalogPurchaseGiftButtonView } from './purchase-gift-button/CatalogPur export const CatalogPurchaseView: FC = props => { - const { offer = null, pageId = -1, extra = '' } = props; + const { offer = null, pageId = -1, extra = '', disabled = false } = props; const [ quantity, setQuantity ] = useState(1); useEffect(() => @@ -70,7 +70,7 @@ export const CatalogPurchaseView: FC = props =>
- + { offer.giftable && }
diff --git a/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts b/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts index 075b4f22..72be56a3 100644 --- a/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts +++ b/src/views/catalog/views/page/purchase/CatalogPurchaseView.types.ts @@ -5,4 +5,5 @@ export interface CatalogPurchaseViewProps offer: CatalogPageOfferData; pageId: number; extra?: string; + disabled?: boolean; } diff --git a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx index 2ae147b9..ed8d728a 100644 --- a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx +++ b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.tsx @@ -10,7 +10,7 @@ import { CatalogPurchaseButtonViewProps, CatalogPurchaseState } from './CatalogP export const CatalogPurchaseButtonView: FC = props => { - const { className = '', offer = null, pageId = -1, extra = null, quantity = 1, isPurchaseAllowed = true, beforePurchase = null } = props; + const { className = '', offer = null, pageId = -1, extra = null, quantity = 1, isPurchaseAllowed = true, disabled = false, beforePurchase = null } = props; const [ purchaseState, setPurchaseState ] = useState(CatalogPurchaseState.NONE); const [ pendingApproval, setPendingApproval ] = useState(false); @@ -96,6 +96,6 @@ export const CatalogPurchaseButtonView: FC = pro return ; case CatalogPurchaseState.NONE: default: - return + return } } diff --git a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts index 0abc0ef3..008d8d8e 100644 --- a/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts +++ b/src/views/catalog/views/page/purchase/purchase-button/CatalogPurchaseButtonView.types.ts @@ -8,6 +8,7 @@ export interface CatalogPurchaseButtonViewProps extra?: string; quantity?: number; isPurchaseAllowed?: boolean; + disabled?: boolean; beforePurchase?: () => void; }