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

feat 22876 allow users to update the card address via update address link #28907

Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
3114d6b
feat: update address link
MrMuzyk Sep 13, 2023
d7c7289
add right icon press handler and accessibilityLabel to MenuItem
JKobrynski Sep 5, 2023
8b12931
add translations for CardDetails
JKobrynski Sep 5, 2023
9b263f2
create CardDetails component
JKobrynski Sep 5, 2023
cc5a296
format code
JKobrynski Sep 5, 2023
ab44a6f
remove unused prop type
JKobrynski Sep 5, 2023
36c331b
improve comments grammar
JKobrynski Sep 6, 2023
7b8fbf4
simplify accessibilityLabel
JKobrynski Sep 6, 2023
34f5c7f
lint code
JKobrynski Sep 6, 2023
d626f6f
Fix translation of copy requested money action messages
rayane-djouah Sep 11, 2023
b5b03db
Copy email with text when iou message is copied
huzaifa-99 Aug 29, 2023
df153d1
Fix lint
huzaifa-99 Sep 11, 2023
1a9bdc5
Show payer name for paid iou/expense msg in LHN
huzaifa-99 Sep 13, 2023
0f075e8
upgrade to rn 0.72.4 + fix patches
fabOnReact Sep 10, 2023
c96e864
commit package-lock.json
fabOnReact Sep 10, 2023
21df891
add back package.json over-rides
fabOnReact Sep 13, 2023
5f80b41
commit Podfile.lock and package-lock.json
fabOnReact Sep 14, 2023
6fb080b
add back material-top-tabs patch
fabOnReact Sep 14, 2023
5e3ac2a
use attachmentmodal in reportActionItemImage
luacmartins Sep 5, 2023
04faad8
Revert "use attachmentmodal in reportActionItemImage"
luacmartins Sep 5, 2023
193b950
create route const, add onSubmit callback, navigate to correct route
luacmartins Sep 5, 2023
614f6f7
stash work
Szymon20000 Sep 11, 2023
46c5060
remove console.logs
Szymon20000 Sep 12, 2023
0acb3d6
clean up
Szymon20000 Sep 14, 2023
fd7d76a
rename to waitForNetworkPromises and waitForBatchedUpdates
Szymon20000 Sep 14, 2023
d93bd89
add rightComponent support to MenuItem
JKobrynski Sep 21, 2023
07d3aa4
add CardDetails to ExpensifyCardPage
JKobrynski Sep 21, 2023
96ec68c
implement address editing functionality
JKobrynski Sep 21, 2023
d2d1330
remove redundant imports
JKobrynski Sep 21, 2023
cfafc00
apply minor fixes
JKobrynski Sep 21, 2023
501c897
revert OptionsListUtils changes
JKobrynski Sep 21, 2023
824ba47
revert ReportTest changes
JKobrynski Sep 21, 2023
accf327
revert APITest changes
JKobrynski Sep 21, 2023
1ddd4a7
bring back react-native-image-manipulator patch
JKobrynski Sep 21, 2023
566e598
bring back react-native-image-manipulator patch
JKobrynski Sep 21, 2023
18f6ed2
bring back react-native-image-manipulator patch
JKobrynski Sep 21, 2023
21f0d74
fix patch typo
JKobrynski Sep 21, 2023
6280522
bring back react-native-sdk patch
JKobrynski Sep 21, 2023
9299d97
bring back @react-navigation/native patch
JKobrynski Sep 21, 2023
a2c2b6a
Merge branch 'feature/expensify-card' of https://github.com/pasyukevi…
MrMuzyk Sep 22, 2023
1eb3e9c
change useMemo to regular function
JKobrynski Sep 22, 2023
16755eb
move formatPiece outside component definition
JKobrynski Sep 22, 2023
cada4ef
remove update address button
JKobrynski Sep 22, 2023
4793d43
remove unnecessary style
JKobrynski Sep 22, 2023
3fe5b96
feat: stash changes
MrMuzyk Sep 22, 2023
ecfaa73
Merge branch 'addRevealDetails' of https://github.com/JKobrynski/Expe…
MrMuzyk Sep 22, 2023
1bffdb7
Merge remote-tracking branch 'eugene/feature/expensify-card' into add…
JKobrynski Sep 25, 2023
6b54548
format address with reduce
JKobrynski Sep 25, 2023
19d5d6c
remove formatPiece funciton
JKobrynski Sep 25, 2023
357410a
remove pointerEvents style for pressable variants
JKobrynski Sep 25, 2023
d96baec
Merge branch 'addRevealDetails' of https://github.com/JKobrynski/Expe…
MrMuzyk Sep 25, 2023
9aa4682
feat: connect with card page
MrMuzyk Sep 25, 2023
defdd1b
feat: remove test data
MrMuzyk Sep 25, 2023
6ae0b78
Merge branch 'addRevealDetails' of https://github.com/JKobrynski/Expe…
MrMuzyk Sep 28, 2023
ae177fc
fix: remove doubled translations
MrMuzyk Sep 28, 2023
0332f5f
fix: revert translation changes
MrMuzyk Sep 28, 2023
665011a
fix: translations
MrMuzyk Sep 28, 2023
8de2074
fix: config fix
MrMuzyk Sep 28, 2023
678d070
Merge branch 'main' of github.com:MrMuzyk/App into feat-22876-allow-u…
MrMuzyk Sep 29, 2023
2ba05ee
Merge branch 'addRevealDetails' of https://github.com/JKobrynski/Expe…
MrMuzyk Oct 3, 2023
c58c2f4
Merge branch 'main' of github.com:MrMuzyk/App into feat-22876-allow-u…
MrMuzyk Oct 5, 2023
32978b7
fix: update key in personal details initial page
MrMuzyk Oct 9, 2023
3616cb0
Merge branch 'main' of github.com:MrMuzyk/App into feat-22876-allow-u…
MrMuzyk Oct 12, 2023
8004a76
fix: rename pages to be consistent
MrMuzyk Oct 13, 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
4 changes: 4 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export default {
SETTINGS_ADD_DEBIT_CARD: 'settings/wallet/add-debit-card',
SETTINGS_ADD_BANK_ACCOUNT: 'settings/wallet/add-bank-account',
SETTINGS_ENABLE_PAYMENTS: 'settings/wallet/enable-payments',
SETTINGS_WALLET_CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS: {
route: 'settings/wallet/cards/:domain/digital-details/update-address',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I think it should be card and not cards. Maybe it would help to use the prefix here for consistency:

App/src/ROUTES.ts

Lines 74 to 75 in cb883e8

SETTINGS_WALLET_DOMAINCARDS: {
route: '/settings/wallet/card/:domain',

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch Marc, I agree. @MrMuzyk

Copy link
Contributor Author

@MrMuzyk MrMuzyk Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing that! There was a mistake in docs then for multiple pages
image

Copy link
Contributor Author

@MrMuzyk MrMuzyk Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcaaron @grgia
looking at the codebase we actually have more cases of /cards than /card ATM. Should I change all of them to /card?

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd go head and update them. Would be good to be consistent about this one.

getRoute: (domain: string) => `settings/wallet/cards/${domain}/digital-details/update-address`,
},
SETTINGS_WALLET_TRANSFER_BALANCE: 'settings/wallet/transfer-balance',
SETTINGS_WALLET_CHOOSE_TRANSFER_ACCOUNT: 'settings/wallet/choose-transfer-account',
SETTINGS_PERSONAL_DETAILS: 'settings/profile/personal-details',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ export default {
address: 'Address',
revealDetails: 'Reveal details',
copyCardNumber: 'Copy card number',
updateAddress: 'Update address',
},
},
transferAmountPage: {
Expand Down Expand Up @@ -981,7 +982,7 @@ export default {
legalName: 'Legal name',
legalFirstName: 'Legal first name',
legalLastName: 'Legal last name',
homeAddress: 'Home address',
address: 'Address',
error: {
dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Date should be before ${dateString}.`,
dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Date should be after ${dateString}.`,
Expand Down
3 changes: 2 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ export default {
address: 'Dirección',
revealDetails: 'Revelar detalles',
copyCardNumber: 'Copiar número de la tarjeta',
updateAddress: 'Actualizar dirección',
},
},
transferAmountPage: {
Expand Down Expand Up @@ -978,7 +979,7 @@ export default {
legalName: 'Nombre completo',
legalFirstName: 'Nombre legal',
legalLastName: 'Apellidos legales',
homeAddress: 'Domicilio',
address: 'Dirección',
error: {
dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La fecha debe ser anterior a ${dateString}.`,
dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La fecha debe ser posterior a ${dateString}.`,
Expand Down
1 change: 1 addition & 0 deletions src/libs/Navigation/AppNavigator/ModalStackNavigators.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const SettingsModalStackNavigator = createModalStackNavigator({
Settings_App_Download_Links: () => require('../../../pages/settings/AppDownloadLinks').default,
Settings_Lounge_Access: () => require('../../../pages/settings/Profile/LoungeAccessPage').default,
Settings_Wallet: () => require('../../../pages/settings/Wallet/WalletPage').default,
Settings_Wallet_Cards_Digital_Details_Update_Address: () => require('../../../pages/settings/Profile/PersonalDetails/AddressPage').default,
Settings_Wallet_DomainCards: () => require('../../../pages/settings/Wallet/ExpensifyCardPage').default,
Settings_Wallet_Transfer_Balance: () => require('../../../pages/settings/Wallet/TransferBalancePage').default,
Settings_Wallet_Choose_Transfer_Account: () => require('../../../pages/settings/Wallet/ChooseTransferAccountPage').default,
Expand Down
4 changes: 4 additions & 0 deletions src/libs/Navigation/linkingConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export default {
path: ROUTES.SETTINGS_WALLET_CHOOSE_TRANSFER_ACCOUNT,
exact: true,
},
Settings_Wallet_Cards_Digital_Details_Update_Address: {
path: ROUTES.SETTINGS_WALLET_CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS.route,
exact: true,
},
Settings_Add_Debit_Card: {
path: ROUTES.SETTINGS_ADD_DEBIT_CARD,
exact: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function AddressPage({privatePersonalDetails, route}) {
testID={AddressPage.displayName}
>
<HeaderWithBackButton
title={translate('privatePersonalDetails.homeAddress')}
title={translate('privatePersonalDetails.address')}
shouldShowBackButton
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_PERSONAL_DETAILS)}
/>
Expand Down
1 change: 1 addition & 0 deletions src/pages/settings/Wallet/ExpensifyCardPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function ExpensifyCardPage({
pan="1234123412341234"
expiration="11/02/2024"
cvv="321"
domain={domain}
/>
) : (
<MenuItemWithTopDescription
Expand Down
14 changes: 13 additions & 1 deletion src/pages/settings/Wallet/WalletPage/CardDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import ONYXKEYS from '../../../../ONYXKEYS';
import * as PersonalDetailsUtils from '../../../../libs/PersonalDetailsUtils';
import PressableWithDelayToggle from '../../../../components/Pressable/PressableWithDelayToggle';
import styles from '../../../../styles/styles';
import TextLink from '../../../../components/TextLink';
import Navigation from '../../../../libs/Navigation/Navigation';
import ROUTES from '../../../../ROUTES';

const propTypes = {
/** Card number */
Expand All @@ -33,6 +36,9 @@ const propTypes = {
country: PropTypes.string,
}),
}),

/** Domain name */
domain: PropTypes.string.isRequired,
};

const defaultProps = {
Expand All @@ -51,7 +57,7 @@ const defaultProps = {
},
};

function CardDetails({pan, expiration, cvv, privatePersonalDetails}) {
function CardDetails({pan, expiration, cvv, privatePersonalDetails, domain}) {
usePrivatePersonalDetails();
const {translate} = useLocalize();

Expand Down Expand Up @@ -92,6 +98,12 @@ function CardDetails({pan, expiration, cvv, privatePersonalDetails}) {
title={PersonalDetailsUtils.getFormattedAddress(privatePersonalDetails)}
interactive={false}
/>
<TextLink
style={[styles.link, styles.mh5, styles.mb3]}
onPress={() => Navigation.navigate(ROUTES.SETTINGS_WALLET_CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS.getRoute(domain))}
>
{translate('cardPage.cardDetails.updateAddress')}
</TextLink>
</>
);
}
Expand Down
Loading