diff --git a/crowdin/messages.json b/crowdin/messages.json index 55797fc1fb7..94f0190d71c 100644 --- a/crowdin/messages.json +++ b/crowdin/messages.json @@ -4266,7 +4266,6 @@ "-1474274516": "State/province*", "-1253349870": "Town/city*", "-490553914": "Postal/Zip code", - "-597462351": "${item.label}", "-1120954663": "First name*", "-1929304521": "Website/social media URL*", "-1113902570": "Details", diff --git a/themes/gatsby-theme-deriv/src/common/country-base.ts b/themes/gatsby-theme-deriv/src/common/country-base.ts index e10ae139670..ea007ab2f72 100644 --- a/themes/gatsby-theme-deriv/src/common/country-base.ts +++ b/themes/gatsby-theme-deriv/src/common/country-base.ts @@ -134,7 +134,7 @@ export const african_countries = [ ] // special partnership payments for this countries -export const cpa_plan_countries = ['za', 'ec', 'br', 'lk', 'uy'] +export const cpa_plan_countries = ['za', 'ec', 'br', 'lk', 'uy', 'ch'] export const isEuCountry = (clients_country: (typeof eu_countries)[number]): boolean => eu_countries.includes(clients_country) diff --git a/themes/gatsby-theme-deriv/src/pages/signup-affiliates/components/_account-address.tsx b/themes/gatsby-theme-deriv/src/pages/signup-affiliates/components/_account-address.tsx index dc65812bb05..5e6c997aec6 100644 --- a/themes/gatsby-theme-deriv/src/pages/signup-affiliates/components/_account-address.tsx +++ b/themes/gatsby-theme-deriv/src/pages/signup-affiliates/components/_account-address.tsx @@ -7,6 +7,11 @@ import { useStatesList } from 'features/hooks/use-states-list' import { DropdownSearch } from 'components/elements' import { localize } from 'components/localization' import { TString } from 'types/generics' +import { cpa_plan_countries, eu_countries } from 'common/country-base' + +type AccountAddressProps = WizardStepProps<'account_address'> & { + setIsCpaPlanAff: React.Dispatch> +} const AccountAddress = ({ is_individual, @@ -14,7 +19,8 @@ const AccountAddress = ({ residence_list, updateData, onValidate, -}: WizardStepProps<'account_address'>) => { + setIsCpaPlanAff, +}: AccountAddressProps) => { const [form_data, setFormData] = useState(affiliate_account.account_address) const [form_errors, setFormErrors] = useState({ country_error_msg: affiliate_validation['country'](form_data['country']) ?? '', @@ -40,6 +46,13 @@ const AccountAddress = ({ state_error_msg: 'State is not valid for this country', }) } + setIsCpaPlanAff( + changed_country + ? cpa_plan_countries.includes(changed_country.symbol) || + eu_countries.includes(changed_country.symbol) + : false, + ) + setFormData({ ...form_data, country: changed_country }) } const handleState = (changed_state) => { @@ -111,7 +124,6 @@ const AccountAddress = ({ const { name, value } = e.target setFormData((prev) => ({ ...prev, [name]: value })) - if (affiliate_validation[name]) { const error_msg = affiliate_validation[name](value) setFormErrors((errors) => ({ @@ -145,7 +157,6 @@ const AccountAddress = ({ error={form_errors[`${item.name}_error_msg`]} onChange={item.handler} style={{ marginTop: '16px' }} - placeholder={localize(`_t_${item.label}_t_`)} /> ) } else { diff --git a/themes/gatsby-theme-deriv/src/pages/signup-affiliates/components/_account-plan.tsx b/themes/gatsby-theme-deriv/src/pages/signup-affiliates/components/_account-plan.tsx index 310b2e6d399..59672470679 100644 --- a/themes/gatsby-theme-deriv/src/pages/signup-affiliates/components/_account-plan.tsx +++ b/themes/gatsby-theme-deriv/src/pages/signup-affiliates/components/_account-plan.tsx @@ -4,13 +4,12 @@ import { StyledHeader } from '../utils/_affiliate-header' import AccountCard, { AccountCardProps, MainWrapper } from '../utils/_account-card' import { Localize } from 'components/localization' import { useIsRtl } from 'components/hooks/use-isrtl' -import useRegion from 'components/hooks/use-region' import Revenue from 'images/svg/signup-affiliates/revenue.svg' import Turnover from 'images/svg/signup-affiliates/turnover.svg' import CPA from 'images/svg/signup-affiliates/cpa.svg' import useBuildVariant from 'features/hooks/use-build-variant' -const getPlans = (is_eu: boolean, is_cpa_plan: boolean): AccountCardProps[] => { +const getPlans = (is_cpa_plan_aff: boolean): AccountCardProps[] => { const plans: AccountCardProps[] = [ { value: 2, @@ -27,7 +26,7 @@ const getPlans = (is_eu: boolean, is_cpa_plan: boolean): AccountCardProps[] => { "_t_Earn based on each contract's payout probability or client's trade. <0>Learn more_t_", }, ] - if (is_eu || is_cpa_plan) { + if (is_cpa_plan_aff) { plans.push({ value: 6, icon: CPA, @@ -39,22 +38,23 @@ const getPlans = (is_eu: boolean, is_cpa_plan: boolean): AccountCardProps[] => { return plans } +type AccountPlanProps = WizardStepProps<'account_plan'> & { + is_cpa_plan_aff: boolean +} + const AccountPlan = ({ affiliate_account, updateData, onValidate, -}: WizardStepProps<'account_plan'>) => { - const { region } = useBuildVariant() + is_cpa_plan_aff, +}: AccountPlanProps) => { const [account_plan, setAccountPlan] = useState(affiliate_account.account_plan) - const { is_cpa_plan } = useRegion() const is_rtl = useIsRtl() - const plans = getPlans(region === "eu", is_cpa_plan) - + const plans = getPlans(is_cpa_plan_aff) useEffect(() => { updateData(account_plan) onValidate(!!account_plan) }, [account_plan]) - return ( { updateAffiliateValues<'account_plan'>(value, 'account_plan') }} diff --git a/themes/gatsby-theme-deriv/src/translations/ach.json b/themes/gatsby-theme-deriv/src/translations/ach.json index d7786d230c4..30e31999fa2 100644 --- a/themes/gatsby-theme-deriv/src/translations/ach.json +++ b/themes/gatsby-theme-deriv/src/translations/ach.json @@ -4626,4 +4626,4 @@ "-1165835520": "crwdns5019034:0crwdne5019034:0", "-651384976": "crwdns5019036:0crwdne5019036:0", "-1033881248": "crwdns5019038:0crwdne5019038:0" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/ar.json b/themes/gatsby-theme-deriv/src/translations/ar.json index ec8517b7b3f..704f80e1c58 100644 --- a/themes/gatsby-theme-deriv/src/translations/ar.json +++ b/themes/gatsby-theme-deriv/src/translations/ar.json @@ -4626,4 +4626,4 @@ "-1165835520": "موظف", "-651384976": "الجنسيات", "-1033881248": "شاهد صفقاتنا المفتوحة" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/bn.json b/themes/gatsby-theme-deriv/src/translations/bn.json index 5d5143df886..553b1e8e597 100644 --- a/themes/gatsby-theme-deriv/src/translations/bn.json +++ b/themes/gatsby-theme-deriv/src/translations/bn.json @@ -4626,4 +4626,4 @@ "-1165835520": "কর্মচারী", "-651384976": "জাতীয়তা", "-1033881248": "আমাদের ওপেন পজিশন দেখুন" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/de.json b/themes/gatsby-theme-deriv/src/translations/de.json index cf9d54af430..3037518892f 100644 --- a/themes/gatsby-theme-deriv/src/translations/de.json +++ b/themes/gatsby-theme-deriv/src/translations/de.json @@ -4626,4 +4626,4 @@ "-1165835520": "Mitarbeiter", "-651384976": "Nationalitäten", "-1033881248": "Sehen Sie unsere offenen Stellen" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/es.json b/themes/gatsby-theme-deriv/src/translations/es.json index 15c950a1dcd..0375316badf 100644 --- a/themes/gatsby-theme-deriv/src/translations/es.json +++ b/themes/gatsby-theme-deriv/src/translations/es.json @@ -4626,4 +4626,4 @@ "-1165835520": "empleados", "-651384976": "nacionalidades", "-1033881248": "Vea nuestros puestos disponibles" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/fr.json b/themes/gatsby-theme-deriv/src/translations/fr.json index e4e3d027deb..b4021029374 100644 --- a/themes/gatsby-theme-deriv/src/translations/fr.json +++ b/themes/gatsby-theme-deriv/src/translations/fr.json @@ -4626,4 +4626,4 @@ "-1165835520": "employés", "-651384976": "nationalités", "-1033881248": "Voir nos postes vacants" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/it.json b/themes/gatsby-theme-deriv/src/translations/it.json index 9691723c54f..a7986b38a5b 100644 --- a/themes/gatsby-theme-deriv/src/translations/it.json +++ b/themes/gatsby-theme-deriv/src/translations/it.json @@ -4626,4 +4626,4 @@ "-1165835520": "dipendenti", "-651384976": "nazionalità", "-1033881248": "Vedi le posizioni aperte" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/ko.json b/themes/gatsby-theme-deriv/src/translations/ko.json index e3a839eec49..25fb4bfc8d1 100644 --- a/themes/gatsby-theme-deriv/src/translations/ko.json +++ b/themes/gatsby-theme-deriv/src/translations/ko.json @@ -4626,4 +4626,4 @@ "-1165835520": "직원", "-651384976": "출신 국적", "-1033881248": "채용 정보 보기" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/mn.json b/themes/gatsby-theme-deriv/src/translations/mn.json index 0e3651509bc..58f74ff83d1 100644 --- a/themes/gatsby-theme-deriv/src/translations/mn.json +++ b/themes/gatsby-theme-deriv/src/translations/mn.json @@ -4626,4 +4626,4 @@ "-1165835520": "ажилчид", "-651384976": "үндэстэн", "-1033881248": "Манай нээлттэй байр суурийг үзнэ үү" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/pl.json b/themes/gatsby-theme-deriv/src/translations/pl.json index 19b909af0df..5dbd0e3f5d8 100644 --- a/themes/gatsby-theme-deriv/src/translations/pl.json +++ b/themes/gatsby-theme-deriv/src/translations/pl.json @@ -4626,4 +4626,4 @@ "-1165835520": "pracowników", "-651384976": "narodowości", "-1033881248": "Zobacz nasze otwarte pozycje" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/pt.json b/themes/gatsby-theme-deriv/src/translations/pt.json index b6fff2cdd68..8b122de6abe 100644 --- a/themes/gatsby-theme-deriv/src/translations/pt.json +++ b/themes/gatsby-theme-deriv/src/translations/pt.json @@ -4626,4 +4626,4 @@ "-1165835520": "funcionários", "-651384976": "nacionalidades", "-1033881248": "Consulte as nossas vagas" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/ru.json b/themes/gatsby-theme-deriv/src/translations/ru.json index 9c43d1a25af..e8122e6c8ef 100644 --- a/themes/gatsby-theme-deriv/src/translations/ru.json +++ b/themes/gatsby-theme-deriv/src/translations/ru.json @@ -4626,4 +4626,4 @@ "-1165835520": "сотрудников", "-651384976": "национальностей", "-1033881248": "Смотреть вакансии" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/si.json b/themes/gatsby-theme-deriv/src/translations/si.json index d66a4fd9726..1b93eec1625 100644 --- a/themes/gatsby-theme-deriv/src/translations/si.json +++ b/themes/gatsby-theme-deriv/src/translations/si.json @@ -4626,4 +4626,4 @@ "-1165835520": "සේවකයින්", "-651384976": "ජාතීන්", "-1033881248": "අපගේ විවෘත ස්ථාන බලන්න" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/sw.json b/themes/gatsby-theme-deriv/src/translations/sw.json index 184509363c8..c75be775d05 100644 --- a/themes/gatsby-theme-deriv/src/translations/sw.json +++ b/themes/gatsby-theme-deriv/src/translations/sw.json @@ -4626,4 +4626,4 @@ "-1165835520": "wafanyakazi", "-651384976": "mataifa", "-1033881248": "Tazama nafasi zetu za kazi zilizo wazi" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/th.json b/themes/gatsby-theme-deriv/src/translations/th.json index 1deb1215a69..75ad650aee4 100644 --- a/themes/gatsby-theme-deriv/src/translations/th.json +++ b/themes/gatsby-theme-deriv/src/translations/th.json @@ -4626,4 +4626,4 @@ "-1165835520": "พนักงาน", "-651384976": "สัญชาติ", "-1033881248": "ดูตำแหน่งงานที่เปิดรับ" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/tr.json b/themes/gatsby-theme-deriv/src/translations/tr.json index 005dcdeeebb..6b16d0038dd 100644 --- a/themes/gatsby-theme-deriv/src/translations/tr.json +++ b/themes/gatsby-theme-deriv/src/translations/tr.json @@ -4626,4 +4626,4 @@ "-1165835520": "çalışanlar", "-651384976": "milliyetler", "-1033881248": "Açık pozisyonlarımızı görün" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/vi.json b/themes/gatsby-theme-deriv/src/translations/vi.json index a846b964879..b0ecb26b419 100644 --- a/themes/gatsby-theme-deriv/src/translations/vi.json +++ b/themes/gatsby-theme-deriv/src/translations/vi.json @@ -4626,4 +4626,4 @@ "-1165835520": "nhân viên", "-651384976": "dân tộc", "-1033881248": "Xem các vị trí đang tuyển" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/zh_cn.json b/themes/gatsby-theme-deriv/src/translations/zh_cn.json index e23002e35c4..c7675268064 100644 --- a/themes/gatsby-theme-deriv/src/translations/zh_cn.json +++ b/themes/gatsby-theme-deriv/src/translations/zh_cn.json @@ -4626,4 +4626,4 @@ "-1165835520": "雇员", "-651384976": "国籍", "-1033881248": "查看空缺职位" -} \ No newline at end of file +} diff --git a/themes/gatsby-theme-deriv/src/translations/zh_tw.json b/themes/gatsby-theme-deriv/src/translations/zh_tw.json index 6397db4a1cd..44dd93a866d 100644 --- a/themes/gatsby-theme-deriv/src/translations/zh_tw.json +++ b/themes/gatsby-theme-deriv/src/translations/zh_tw.json @@ -4626,4 +4626,4 @@ "-1165835520": "僱員", "-651384976": "國籍", "-1033881248": "查看空缺職位" -} \ No newline at end of file +}