From 8f69f93627da8c6e67d70ae9fec75fa664893b34 Mon Sep 17 00:00:00 2001 From: Chirag Arora Date: Fri, 11 Aug 2023 21:52:56 +0530 Subject: [PATCH 1/7] formatting phone login --- src/libs/OptionsListUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index b574bfd3d00e..9f725c434220 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -897,8 +897,8 @@ function getSearchOptions(reports, personalDetails, searchValue = '', betas) { */ function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail, amountText) { return { - text: personalDetail.displayName ? personalDetail.displayName : personalDetail.login, - alternateText: personalDetail.login || personalDetail.displayName, + text: personalDetail.displayName ? personalDetail.displayName : LocalePhoneNumber.formatPhoneNumber(personalDetail.login), + alternateText: LocalePhoneNumber.formatPhoneNumber(personalDetail.login) || personalDetail.displayName, icons: [ { source: UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID), From 57c1803a34af5e6ad221dc36fa47e199dea8fac6 Mon Sep 17 00:00:00 2001 From: Chirag Arora <54641656+chiragxarora@users.noreply.github.com> Date: Mon, 14 Aug 2023 00:03:44 +0530 Subject: [PATCH 2/7] Update src/libs/OptionsListUtils.js Co-authored-by: Situ Chandra Shil <108292595+situchan@users.noreply.github.com> --- src/libs/OptionsListUtils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 9f725c434220..6dfadcaafc33 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -896,6 +896,7 @@ function getSearchOptions(reports, personalDetails, searchValue = '', betas) { * @returns {Object} */ function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail, amountText) { + const formattedLogin = LocalePhoneNumber.formatPhoneNumber(personalDetail.login); return { text: personalDetail.displayName ? personalDetail.displayName : LocalePhoneNumber.formatPhoneNumber(personalDetail.login), alternateText: LocalePhoneNumber.formatPhoneNumber(personalDetail.login) || personalDetail.displayName, From 16b24665b08613f628cf103de21438e76026ea75 Mon Sep 17 00:00:00 2001 From: Chirag Arora <54641656+chiragxarora@users.noreply.github.com> Date: Mon, 14 Aug 2023 00:03:50 +0530 Subject: [PATCH 3/7] Update src/libs/OptionsListUtils.js Co-authored-by: Situ Chandra Shil <108292595+situchan@users.noreply.github.com> --- src/libs/OptionsListUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 6dfadcaafc33..350aeb3f22c2 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -898,8 +898,8 @@ function getSearchOptions(reports, personalDetails, searchValue = '', betas) { function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail, amountText) { const formattedLogin = LocalePhoneNumber.formatPhoneNumber(personalDetail.login); return { - text: personalDetail.displayName ? personalDetail.displayName : LocalePhoneNumber.formatPhoneNumber(personalDetail.login), - alternateText: LocalePhoneNumber.formatPhoneNumber(personalDetail.login) || personalDetail.displayName, + text: personalDetail.displayName || formattedLogin, + alternateText: formattedLogin || personalDetail.displayName, icons: [ { source: UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID), From a3ddab71dfa68eb86f8541f1aaab834dbc5ae8a7 Mon Sep 17 00:00:00 2001 From: Chirag Arora Date: Mon, 14 Aug 2023 01:04:53 +0530 Subject: [PATCH 4/7] minor changes --- src/libs/OptionsListUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 350aeb3f22c2..bad613a9507a 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -898,7 +898,7 @@ function getSearchOptions(reports, personalDetails, searchValue = '', betas) { function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail, amountText) { const formattedLogin = LocalePhoneNumber.formatPhoneNumber(personalDetail.login); return { - text: personalDetail.displayName || formattedLogin, + text: personalDetail.displayName ? personalDetail.displayName : formattedLogin, alternateText: formattedLogin || personalDetail.displayName, icons: [ { From 5e8948b9c243748de5a312dfd9e70b5707b1567f Mon Sep 17 00:00:00 2001 From: Chirag Arora Date: Mon, 14 Aug 2023 01:09:16 +0530 Subject: [PATCH 5/7] testing --- src/libs/OptionsListUtils.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index bad613a9507a..9f725c434220 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -896,10 +896,9 @@ function getSearchOptions(reports, personalDetails, searchValue = '', betas) { * @returns {Object} */ function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail, amountText) { - const formattedLogin = LocalePhoneNumber.formatPhoneNumber(personalDetail.login); return { - text: personalDetail.displayName ? personalDetail.displayName : formattedLogin, - alternateText: formattedLogin || personalDetail.displayName, + text: personalDetail.displayName ? personalDetail.displayName : LocalePhoneNumber.formatPhoneNumber(personalDetail.login), + alternateText: LocalePhoneNumber.formatPhoneNumber(personalDetail.login) || personalDetail.displayName, icons: [ { source: UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID), From 5dd6bf0367a420cc8f981ea281aba01bc48ebaf6 Mon Sep 17 00:00:00 2001 From: Chirag Arora Date: Mon, 14 Aug 2023 01:18:31 +0530 Subject: [PATCH 6/7] reverting --- src/libs/OptionsListUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 9f725c434220..b574bfd3d00e 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -897,8 +897,8 @@ function getSearchOptions(reports, personalDetails, searchValue = '', betas) { */ function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail, amountText) { return { - text: personalDetail.displayName ? personalDetail.displayName : LocalePhoneNumber.formatPhoneNumber(personalDetail.login), - alternateText: LocalePhoneNumber.formatPhoneNumber(personalDetail.login) || personalDetail.displayName, + text: personalDetail.displayName ? personalDetail.displayName : personalDetail.login, + alternateText: personalDetail.login || personalDetail.displayName, icons: [ { source: UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID), From 2cdcb54e05b5daa1c1d61393cff84b00cb891aca Mon Sep 17 00:00:00 2001 From: Chirag Arora Date: Mon, 14 Aug 2023 01:24:56 +0530 Subject: [PATCH 7/7] re-applying --- src/libs/OptionsListUtils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index b574bfd3d00e..350aeb3f22c2 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -896,9 +896,10 @@ function getSearchOptions(reports, personalDetails, searchValue = '', betas) { * @returns {Object} */ function getIOUConfirmationOptionsFromPayeePersonalDetail(personalDetail, amountText) { + const formattedLogin = LocalePhoneNumber.formatPhoneNumber(personalDetail.login); return { - text: personalDetail.displayName ? personalDetail.displayName : personalDetail.login, - alternateText: personalDetail.login || personalDetail.displayName, + text: personalDetail.displayName || formattedLogin, + alternateText: formattedLogin || personalDetail.displayName, icons: [ { source: UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID),