Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote referral program messaging in NewDot Settings > Share code #30436

Merged
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
595cd5d
draft button implementation
rezkiy37 Oct 26, 2023
b31a732
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 30, 2023
f40b4df
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Oct 31, 2023
0e1e3ff
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 17, 2023
7a60aa7
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 17, 2023
3b4f0f1
add share code type
rezkiy37 Nov 17, 2023
916b2ab
add strings
rezkiy37 Nov 17, 2023
021dea5
integrate share code type
rezkiy37 Nov 17, 2023
58baf9e
prettify ReferralDetailsPage
rezkiy37 Nov 18, 2023
0d43984
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 18, 2023
62d3247
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 20, 2023
03d0a66
translate to Spanish
rezkiy37 Nov 20, 2023
fc06300
align title
rezkiy37 Nov 20, 2023
75ffa9b
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 21, 2023
e5003df
pass the fallback
rezkiy37 Nov 21, 2023
1a35980
not allow for anonymous
rezkiy37 Nov 21, 2023
80fe82d
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 24, 2023
3eb2d15
move button down
rezkiy37 Nov 24, 2023
0d9abf7
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
rezkiy37 Nov 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2885,6 +2885,7 @@ const CONST = {
START_CHAT: 'startChat',
SEND_MONEY: 'sendMoney',
REFER_FRIEND: 'referralFriend',
SHARE_CODE: 'shareCode',
},
REVENUE: 250,
LEARN_MORE_LINK: 'https://help.expensify.com/articles/new-expensify/billing-and-plan-types/Referral-Program',
Expand Down
14 changes: 10 additions & 4 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1937,25 +1937,31 @@ export default {
buttonText1: 'Start a chat, ',
buttonText2: `get $${CONST.REFERRAL_PROGRAM.REVENUE}.`,
header: `Start a chat, get $${CONST.REFERRAL_PROGRAM.REVENUE}`,
body: `Start a chat with a new Expensify account. Get $${CONST.REFERRAL_PROGRAM.REVENUE} once they start an annual subscription with two or more active members and make the first two payments toward their Expensify bill.`,
body1: `Start a chat with a new Expensify account. Get $${CONST.REFERRAL_PROGRAM.REVENUE} once they start an annual subscription with two or more active members and make the first two payments toward their Expensify bill.`,
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.MONEY_REQUEST]: {
buttonText1: 'Request money, ',
buttonText2: `get $${CONST.REFERRAL_PROGRAM.REVENUE}.`,
header: `Request money, get $${CONST.REFERRAL_PROGRAM.REVENUE}`,
body: `Request money from a new Expensify account. Get $${CONST.REFERRAL_PROGRAM.REVENUE} once they start an annual subscription with two or more active members and make the first two payments toward their Expensify bill.`,
body1: `Request money from a new Expensify account. Get $${CONST.REFERRAL_PROGRAM.REVENUE} once they start an annual subscription with two or more active members and make the first two payments toward their Expensify bill.`,
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SEND_MONEY]: {
buttonText1: 'Send money, ',
buttonText2: `get $${CONST.REFERRAL_PROGRAM.REVENUE}.`,
header: `Send money, get $${CONST.REFERRAL_PROGRAM.REVENUE}`,
body: `Send money to a new Expensify account. Get $${CONST.REFERRAL_PROGRAM.REVENUE} once they start an annual subscription with two or more active members and make the first two payments toward their Expensify bill.`,
body1: `Send money to a new Expensify account. Get $${CONST.REFERRAL_PROGRAM.REVENUE} once they start an annual subscription with two or more active members and make the first two payments toward their Expensify bill.`,
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
buttonText1: 'Refer a friend, ',
buttonText2: `get $${CONST.REFERRAL_PROGRAM.REVENUE}.`,
header: `Refer a friend, get $${CONST.REFERRAL_PROGRAM.REVENUE}`,
body: `Send your Expensify referral link to a friend or anyone else you know who spends too much time on expenses. When they start an annual subscription, you'll get $${CONST.REFERRAL_PROGRAM.REVENUE}.`,
body1: `Send your Expensify referral link to a friend or anyone else you know who spends too much time on expenses. When they start an annual subscription, you'll get $${CONST.REFERRAL_PROGRAM.REVENUE}.`,
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SHARE_CODE]: {
buttonText1: `Get $${CONST.REFERRAL_PROGRAM.REVENUE}`,
header: `Get $${CONST.REFERRAL_PROGRAM.REVENUE} for every referral`,
body1: 'If you know anyone who’s spending too much time on expenses (literally anyone – your neighbor, your boss, your friend in accounting), send them your Expensify referral link:',
body2: `When they start an annual subscription, you’ll get $${CONST.REFERRAL_PROGRAM.REVENUE}. Easy as that.`,
},
copyReferralLink: 'Copy referral link',
},
Expand Down
14 changes: 10 additions & 4 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2422,25 +2422,31 @@ export default {
buttonText1: 'Inicia un chat y ',
buttonText2: `recibe $${CONST.REFERRAL_PROGRAM.REVENUE}`,
header: `Inicia un chat y recibe $${CONST.REFERRAL_PROGRAM.REVENUE}`,
body: `Inicia un chat con una cuenta nueva de Expensify. Obtiene $${CONST.REFERRAL_PROGRAM.REVENUE} una vez que configuren una suscripción anual con dos o más miembros activos y realicen los dos primeros pagos de su factura Expensify.`,
body1: `Inicia un chat con una cuenta nueva de Expensify. Obtiene $${CONST.REFERRAL_PROGRAM.REVENUE} una vez que configuren una suscripción anual con dos o más miembros activos y realicen los dos primeros pagos de su factura Expensify.`,
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.MONEY_REQUEST]: {
buttonText1: 'Pide dinero, ',
buttonText2: `recibe $${CONST.REFERRAL_PROGRAM.REVENUE}`,
header: `Pide dinero y recibe $${CONST.REFERRAL_PROGRAM.REVENUE}`,
body: `Pide dinero a una cuenta nueva de Expensify. Obtiene $${CONST.REFERRAL_PROGRAM.REVENUE} una vez que configuren una suscripción anual con dos o más miembros activos y realicen los dos primeros pagos de su factura Expensify.`,
body1: `Pide dinero a una cuenta nueva de Expensify. Obtiene $${CONST.REFERRAL_PROGRAM.REVENUE} una vez que configuren una suscripción anual con dos o más miembros activos y realicen los dos primeros pagos de su factura Expensify.`,
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SEND_MONEY]: {
buttonText1: 'Envía dinero, ',
buttonText2: `recibe $${CONST.REFERRAL_PROGRAM.REVENUE}`,
header: `Envía dinero y recibe $${CONST.REFERRAL_PROGRAM.REVENUE}`,
body: `Envía dinero a una cuenta nueva de Expensify. Obtiene $${CONST.REFERRAL_PROGRAM.REVENUE} una vez que configuren una suscripción anual con dos o más miembros activos y realicen los dos primeros pagos de su factura Expensify.`,
body1: `Envía dinero a una cuenta nueva de Expensify. Obtiene $${CONST.REFERRAL_PROGRAM.REVENUE} una vez que configuren una suscripción anual con dos o más miembros activos y realicen los dos primeros pagos de su factura Expensify.`,
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND]: {
buttonText1: 'Recomienda a un amigo y ',
buttonText2: `recibe $${CONST.REFERRAL_PROGRAM.REVENUE}`,
header: `Recomienda a un amigo y recibe $${CONST.REFERRAL_PROGRAM.REVENUE}`,
body: `Envía tu enlace de invitación de Expensify a un amigo o a cualquier otra persona que conozcas que dedique demasiado tiempo a los gastos. Cuando comiencen una suscripción anual, obtendrás $${CONST.REFERRAL_PROGRAM.REVENUE}.`,
body1: `Envía tu enlace de invitación de Expensify a un amigo o a cualquier otra persona que conozcas que dedique demasiado tiempo a los gastos. Cuando comiencen una suscripción anual, obtendrás $${CONST.REFERRAL_PROGRAM.REVENUE}.`,
},
[CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SHARE_CODE]: {
buttonText1: `Recibe $${CONST.REFERRAL_PROGRAM.REVENUE}`,
header: `Recibe $${CONST.REFERRAL_PROGRAM.REVENUE} por cada recomendación`,
body1: 'Si conoces a alguien que dedique demasiado tiempo a los gastos (literalmente cualquiera: tu vecino, tu jefe, tu amigo de contabilidad), envíale tu enlace de invitación de Expensify:',
body2: `Cuando comiencen una suscripción anual, obtendrás $${CONST.REFERRAL_PROGRAM.REVENUE}. Así de fácil.`,
},
copyReferralLink: 'Copiar enlace de invitación',
},
Expand Down
19 changes: 14 additions & 5 deletions src/pages/ReferralDetailsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ function ReferralDetailsPage({route, account}) {
if (!_.includes(_.values(CONST.REFERRAL_PROGRAM.CONTENT_TYPES), contentType)) {
contentType = CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND;
}

const contentHeader = translate(`referralProgram.${contentType}.header`);
const contentBody = translate(`referralProgram.${contentType}.body`);
const contentBody = translate(`referralProgram.${contentType}.body1`);
const isShareCode = contentType === CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SHARE_CODE;
const shouldShowBody2 = isShareCode;
rezkiy37 marked this conversation as resolved.
Show resolved Hide resolved
const shouldShowClipboard = contentType === CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND || isShareCode;

function generateReferralURL(email) {
return `${CONST.REFERRAL_PROGRAM.LINK}/?thanks=${encodeURIComponent(email)}`;
Expand All @@ -60,17 +64,17 @@ function ReferralDetailsPage({route, account}) {
>
<HeaderWithBackButton
title={translate('common.referral')}
onBackButtonPress={() => Navigation.goBack()}
onBackButtonPress={Navigation.goBack}
rezkiy37 marked this conversation as resolved.
Show resolved Hide resolved
/>
<View style={[styles.justifyContentCenter, styles.alignItemsCenter, styles.ph5, styles.flex1]}>
<Icon
src={PaymentHands}
width={178}
height={232}
/>
<Text style={[styles.textHeadline, styles.mb3, styles.mt8]}>{contentHeader}</Text>
<Text style={[styles.textHeadline, styles.textAlignCenter, styles.mb3, styles.mt8]}>{contentHeader}</Text>
<Text style={[styles.textAlignCenter, styles.inlineSystemMessage, styles.mb6]}>{contentBody}</Text>
{contentType === CONST.REFERRAL_PROGRAM.CONTENT_TYPES.REFER_FRIEND && (
{shouldShowClipboard && (
<View style={[styles.border, styles.pv2, styles.ph3, styles.mb6]}>
<CopyTextToClipboard
text={translate('referralProgram.copyReferralLink')}
Expand All @@ -79,14 +83,19 @@ function ReferralDetailsPage({route, account}) {
/>
</View>
)}
{shouldShowBody2 && (
<Text style={[styles.textAlignCenter, styles.inlineSystemMessage, styles.mb6]}>
{translate(`referralProgram.${CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SHARE_CODE}.body2`)}
</Text>
)}
<TextLink href={CONST.REFERRAL_PROGRAM.LEARN_MORE_LINK}>{translate('requestorStep.learnMore')}</TextLink>
</View>
<FixedFooter>
<Button
success
style={[styles.w100]}
text={translate('common.buttonConfirm')}
onPress={() => Navigation.goBack()}
onPress={Navigation.goBack}
rezkiy37 marked this conversation as resolved.
Show resolved Hide resolved
pressOnEnter
enterKeyEventListenerPriority={1}
/>
Expand Down
7 changes: 7 additions & 0 deletions src/pages/ShareCodePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ class ShareCodePage extends React.Component {
</View>

<View style={{marginTop: 36}}>
<MenuItem
isAnonymousAction
rezkiy37 marked this conversation as resolved.
Show resolved Hide resolved
title={this.props.translate(`referralProgram.${CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SHARE_CODE}.buttonText1`)}
icon={Expensicons.Cash}
onPress={() => Navigation.navigate(ROUTES.REFERRAL_DETAILS_MODAL.getRoute(CONST.REFERRAL_PROGRAM.CONTENT_TYPES.SHARE_CODE))}
/>

<ContextMenuItem
isAnonymousAction
text={this.props.translate('qrCodes.copyUrlToClipboard')}
Expand Down
Loading