diff --git a/react/src/dashboard/props/models/Fund.tsx b/react/src/dashboard/props/models/Fund.tsx index 1c73cfb37..23889e5eb 100644 --- a/react/src/dashboard/props/models/Fund.tsx +++ b/react/src/dashboard/props/models/Fund.tsx @@ -170,4 +170,5 @@ export default interface Fund { fund_request_physical_card_enable?: boolean; fund_request_physical_card_type_id?: number; fund_physical_card_types?: Array; + hide_voucher_amount?: boolean; } diff --git a/react/src/webshop/components/elements/select-control/templates/SelectControlOptionsVouchers.tsx b/react/src/webshop/components/elements/select-control/templates/SelectControlOptionsVouchers.tsx index 85b044cf5..302e8cc25 100644 --- a/react/src/webshop/components/elements/select-control/templates/SelectControlOptionsVouchers.tsx +++ b/react/src/webshop/components/elements/select-control/templates/SelectControlOptionsVouchers.tsx @@ -101,7 +101,11 @@ export default function SelectControlOptionsVouchers({
-
{selectedVoucher?.amount_locale}
+ {!selectedVoucher?.fund?.hide_voucher_amount && ( +
+ {selectedVoucher?.amount_locale} +
+ )}
{selectedVoucher?.expire_at_locale}
diff --git a/react/src/webshop/components/elements/select-control/templates/elements/SelectControlOptionItemVoucher.tsx b/react/src/webshop/components/elements/select-control/templates/elements/SelectControlOptionItemVoucher.tsx index ae8c7902a..6d7376fe8 100644 --- a/react/src/webshop/components/elements/select-control/templates/elements/SelectControlOptionItemVoucher.tsx +++ b/react/src/webshop/components/elements/select-control/templates/elements/SelectControlOptionItemVoucher.tsx @@ -52,7 +52,11 @@ export default function SelectControlOptionItemVoucher({
-
{voucher?.amount_locale}
+ {!voucher?.fund?.hide_voucher_amount && ( +
+ {voucher?.amount_locale} +
+ )}
{voucher?.expire_at_locale}
diff --git a/react/src/webshop/components/modals/modal-product-reserve/ModalProductReserve.tsx b/react/src/webshop/components/modals/modal-product-reserve/ModalProductReserve.tsx index 7f40eaa5c..4474efff7 100644 --- a/react/src/webshop/components/modals/modal-product-reserve/ModalProductReserve.tsx +++ b/react/src/webshop/components/modals/modal-product-reserve/ModalProductReserve.tsx @@ -526,6 +526,7 @@ export default function ModalProductReserve({ onKeyDown={clickOnKeyEnter} aria-label={translate('modal_reserve_product.close')} role="button" + data-dusk="closeModalButton" />
@@ -599,7 +600,11 @@ export default function ModalProductReserve({
-
{voucher?.amount_locale}
+ {!voucher?.fund?.hide_voucher_amount && ( +
+ {voucher?.amount_locale} +
+ )}
{voucher?.expire_at_locale}
@@ -1475,7 +1480,9 @@ export default function ModalProductReserve({
-
{voucher.amount_locale}
+ {!voucher?.fund?.hide_voucher_amount && ( +
{voucher?.amount_locale}
+ )}
{voucher.expire_at_locale}
@@ -1489,12 +1496,14 @@ export default function ModalProductReserve({
{product.price_locale}
-
-
- {translate('modal_reserve_product.extra_payment.remaining_credit')} + {!voucher?.fund?.hide_voucher_amount && ( +
+
+ {translate('modal_reserve_product.extra_payment.remaining_credit')} +
+
{voucher.amount_locale}
-
{voucher.amount_locale}
-
+ )}
diff --git a/react/src/webshop/components/pages/vouchers-show/VouchersShow.tsx b/react/src/webshop/components/pages/vouchers-show/VouchersShow.tsx index 79f466f1a..f9694d1a2 100644 --- a/react/src/webshop/components/pages/vouchers-show/VouchersShow.tsx +++ b/react/src/webshop/components/pages/vouchers-show/VouchersShow.tsx @@ -181,8 +181,10 @@ export default function VouchersShow() { date: voucherCard?.expire_at_locale, })}
- {!voucher?.product && ( -
+ {!voucher?.product && !voucher?.fund?.hide_voucher_amount && ( +
{voucherCard?.amount_locale}
)} diff --git a/react/src/webshop/components/pages/vouchers-show/cards/VoucherDetailsInternalCard.tsx b/react/src/webshop/components/pages/vouchers-show/cards/VoucherDetailsInternalCard.tsx index 03dd36b93..f094f5244 100644 --- a/react/src/webshop/components/pages/vouchers-show/cards/VoucherDetailsInternalCard.tsx +++ b/react/src/webshop/components/pages/vouchers-show/cards/VoucherDetailsInternalCard.tsx @@ -42,7 +42,7 @@ export default function VoucherDetailsInternalCard({
{voucherCard.product.organization.name}
)} - {voucherCard.type === 'regular' && ( + {voucherCard.type === 'regular' && !voucherCard.fund?.hide_voucher_amount && (
{voucherCard.amount_locale}
diff --git a/react/src/webshop/components/pages/vouchers/elements/VoucherCard.tsx b/react/src/webshop/components/pages/vouchers/elements/VoucherCard.tsx index 0e437d174..811bf0da2 100644 --- a/react/src/webshop/components/pages/vouchers/elements/VoucherCard.tsx +++ b/react/src/webshop/components/pages/vouchers/elements/VoucherCard.tsx @@ -89,7 +89,11 @@ export default function VoucherCard({ {type === 'voucher' ? voucherCard.subtitle : voucherCard.physical_card?.code_locale}
- {voucherCard.type === 'regular' &&
{voucherCard.amount_locale}
} + {voucherCard.type === 'regular' && !voucherCard.fund?.hide_voucher_amount && ( +
+ {voucherCard.amount_locale} +
+ )} {!voucher.deactivated && (