From 99669cce68d507c2ba7df0cd2ddc08e83f5f9daf Mon Sep 17 00:00:00 2001
From: Xavier Abad <77491413+masterprog-cmd@users.noreply.github.com>
Date: Fri, 4 Oct 2024 13:35:29 +0200
Subject: [PATCH 1/3] feat: add renewal label (sub price after first cycle)
---
src/app/i18n/locales/de.json | 1 +
src/app/i18n/locales/en.json | 1 +
src/app/i18n/locales/es.json | 1 +
src/app/i18n/locales/fr.json | 1 +
src/app/i18n/locales/it.json | 1 +
src/app/i18n/locales/ru.json | 1 +
src/app/i18n/locales/tw.json | 1 +
src/app/i18n/locales/zh.json | 1 +
.../checkout/ProductCardComponent.tsx | 18 ++++++++++++------
9 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/src/app/i18n/locales/de.json b/src/app/i18n/locales/de.json
index 2db844231..683388867 100644
--- a/src/app/i18n/locales/de.json
+++ b/src/app/i18n/locales/de.json
@@ -174,6 +174,7 @@
"selectedPlan": "Ausgewählter Plan",
"numberOfUsers": "Anzahl der Benutzer: {{seats}}",
"renewalPeriod": {
+ "renewsAt": "* Verlängert sich am",
"month": "monatlich",
"year": "jährlich",
"lifetime": "lebenslang"
diff --git a/src/app/i18n/locales/en.json b/src/app/i18n/locales/en.json
index 4b193ce5f..0a00c4a9a 100644
--- a/src/app/i18n/locales/en.json
+++ b/src/app/i18n/locales/en.json
@@ -194,6 +194,7 @@
"paymentTitle": "Select a payment method",
"productCard": {
"renewalPeriod": {
+ "renewsAt": "* Renews at",
"month": "month",
"year": "year",
"lifetime": "lifetime"
diff --git a/src/app/i18n/locales/es.json b/src/app/i18n/locales/es.json
index 3f59dc507..7d480bfd2 100644
--- a/src/app/i18n/locales/es.json
+++ b/src/app/i18n/locales/es.json
@@ -176,6 +176,7 @@
"selectedPlan": "Plan seleccionado",
"numberOfUsers": "Número de usuarios: {{seats}}",
"renewalPeriod": {
+ "renewsAt": "* Se renueva en",
"month": "mensual",
"year": "anual",
"lifetime": "lifetime"
diff --git a/src/app/i18n/locales/fr.json b/src/app/i18n/locales/fr.json
index ffbce598d..8a23fc1cd 100644
--- a/src/app/i18n/locales/fr.json
+++ b/src/app/i18n/locales/fr.json
@@ -180,6 +180,7 @@
"selectedPlan": "Plan sélectionné",
"numberOfUsers": "Nombre d'utilisateurs : {{seats}}",
"renewalPeriod": {
+ "renewsAt": "* Se renouvelle le",
"month": "mensuel",
"year": "annuel",
"lifetime": "à vie"
diff --git a/src/app/i18n/locales/it.json b/src/app/i18n/locales/it.json
index 6582b80bf..cab64bae2 100644
--- a/src/app/i18n/locales/it.json
+++ b/src/app/i18n/locales/it.json
@@ -197,6 +197,7 @@
"selectedPlan": "Piano selezionato",
"numberOfUsers": "Numero di utenti: {{seats}}",
"renewalPeriod": {
+ "renewsAt": "* Si rinnova il",
"month": "mensile",
"year": "annuale",
"lifetime": "a vita"
diff --git a/src/app/i18n/locales/ru.json b/src/app/i18n/locales/ru.json
index e09498ae8..d45490de6 100644
--- a/src/app/i18n/locales/ru.json
+++ b/src/app/i18n/locales/ru.json
@@ -180,6 +180,7 @@
"selectedPlan": "Выбранный план",
"numberOfUsers": "Количество пользователей: {{seats}}",
"renewalPeriod": {
+ "renewsAt": "* Продлевается",
"month": "ежемесячный",
"year": "ежегодный",
"lifetime": "пожизненный"
diff --git a/src/app/i18n/locales/tw.json b/src/app/i18n/locales/tw.json
index baef3f6bd..c66f378ed 100644
--- a/src/app/i18n/locales/tw.json
+++ b/src/app/i18n/locales/tw.json
@@ -197,6 +197,7 @@
"selectedPlan": "選擇的計劃",
"numberOfUsers": "用戶數:{{seats}}",
"renewalPeriod": {
+ "renewsAt": "* 續訂日期為",
"month": "每月",
"year": "每年",
"lifetime": "終身"
diff --git a/src/app/i18n/locales/zh.json b/src/app/i18n/locales/zh.json
index 5dbe12544..7343f4253 100644
--- a/src/app/i18n/locales/zh.json
+++ b/src/app/i18n/locales/zh.json
@@ -197,6 +197,7 @@
"selectedPlan": "选择的计划",
"numberOfUsers": "用户数量:{{seats}}",
"renewalPeriod": {
+ "renewsAt": "* 续订日期为",
"month": "每月",
"year": "每年",
"lifetime": "终身"
diff --git a/src/app/payment/components/checkout/ProductCardComponent.tsx b/src/app/payment/components/checkout/ProductCardComponent.tsx
index 1d1b75a9f..ed4a8291f 100644
--- a/src/app/payment/components/checkout/ProductCardComponent.tsx
+++ b/src/app/payment/components/checkout/ProductCardComponent.tsx
@@ -73,6 +73,8 @@ export const ProductFeaturesComponent = ({
const [couponName, setCouponName] = useState
- {Currency[selectedPlan.currency]} + {currencySymbol} {planAmount}
@@ -149,7 +154,7 @@ export const ProductFeaturesComponent = ({- {Currency[selectedPlan.currency]} + {currencySymbol} {normalPriceAmount}
@@ -170,7 +175,7 @@ export const ProductFeaturesComponent = ({{textContent.totalLabel}
- {Currency[selectedPlan.currency]} + {currencySymbol} {totalAmount}
{translate('checkout.productCard.amountSaved')} - {Currency[selectedPlan.currency]} + {currencySymbol} {upsellManager.amountSaved}
- {Currency[selectedPlan.currency]} + {currencySymbol} {upsellPlanAmount}/{translate('views.account.tabs.account.view.subscription.yearly')}
{renewalPeriodLabel}
} ); }; From 5ada2644e5983517654cd21153103acd7fee2180 Mon Sep 17 00:00:00 2001 From: Xavier Abad <77491413+masterprog-cmd@users.noreply.github.com> Date: Fri, 4 Oct 2024 14:48:17 +0200 Subject: [PATCH 2/3] feat: renaming components --- ...ductCardComponent.tsx => CheckoutProductCard.tsx} | 8 ++++---- .../{UserAuthComponent.tsx => CheckoutUserAuth.tsx} | 6 +++--- ...DropdownComponent.tsx => OptionalB2BDropdown.tsx} | 4 ++-- .../views/IntegratedCheckoutView/CheckoutView.tsx | 12 ++++++------ 4 files changed, 15 insertions(+), 15 deletions(-) rename src/app/payment/components/checkout/{ProductCardComponent.tsx => CheckoutProductCard.tsx} (98%) rename src/app/payment/components/checkout/{UserAuthComponent.tsx => CheckoutUserAuth.tsx} (96%) rename src/app/payment/components/checkout/{OptionalB2BDropdownComponent.tsx => OptionalB2BDropdown.tsx} (95%) diff --git a/src/app/payment/components/checkout/ProductCardComponent.tsx b/src/app/payment/components/checkout/CheckoutProductCard.tsx similarity index 98% rename from src/app/payment/components/checkout/ProductCardComponent.tsx rename to src/app/payment/components/checkout/CheckoutProductCard.tsx index ed4a8291f..c173a9cbe 100644 --- a/src/app/payment/components/checkout/ProductCardComponent.tsx +++ b/src/app/payment/components/checkout/CheckoutProductCard.tsx @@ -5,7 +5,7 @@ import { Check, SealPercent, X } from '@phosphor-icons/react'; import { bytesToString } from '../../../drive/services/size.service'; import { useTranslationContext } from '../../../i18n/provider/TranslationProvider'; -import { UpsellManagerProps } from '../../../payment/views/IntegratedCheckoutView/CheckoutViewWrapper'; +import { UpsellManagerProps } from '../../views/IntegratedCheckoutView/CheckoutViewWrapper'; import TextInput from '../../../share/components/ShareItemDialog/components/TextInput'; import Button from '../../../shared/components/Button/Button'; import { useThemeContext } from '../../../theme/ThemeProvider'; @@ -15,7 +15,7 @@ import { CouponCodeData, Currency, RequestedPlanData } from '../../types'; import { SelectSeatsComponent } from './SelectSeatsComponent'; import { getProductAmount } from 'app/payment/utils/getProductAmount'; -interface ProductFeaturesComponentProps { +interface CheckoutProductCardProps { selectedPlan: RequestedPlanData; seatsForBusinessSubscription: number; upsellManager: UpsellManagerProps; @@ -58,7 +58,7 @@ const getTextContent = ( }; }; -export const ProductFeaturesComponent = ({ +export const CheckoutProductCard = ({ selectedPlan, couponCodeData, couponError, @@ -67,7 +67,7 @@ export const ProductFeaturesComponent = ({ onSeatsChange, onRemoveAppliedCouponCode, onCouponInputChange, -}: ProductFeaturesComponentProps) => { +}: CheckoutProductCardProps) => { const { translate, translateList } = useTranslationContext(); const { checkoutTheme } = useThemeContext(); const [couponName, setCouponName] = useState3. {translate('checkout.paymentTitle')}
@@ -135,7 +135,7 @@ const CheckoutView = ({1. {translate(`checkout.authComponent.title.${authMethod}`)}
-