From 8e6e2168b4ad310b9febb870bd3ccc2cfbe7f034 Mon Sep 17 00:00:00 2001 From: Donnie Darko Date: Wed, 12 May 2021 19:39:48 +0500 Subject: [PATCH 1/8] Add the Recents and Contacts headers to the single-user participants page used in the Request Money and New Chat flows --- src/libs/OptionsListUtils.js | 2 + src/libs/Permissions.js | 3 +- src/pages/NewChatPage.js | 12 +++++- .../IOUParticipantsRequest.js | 23 ++++++++++-- tests/unit/OptionsListUtilsTest.js | 37 ++++++++++--------- 5 files changed, 54 insertions(+), 23 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 4d9007dbf957..619fc4868cfa 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -367,6 +367,8 @@ function getNewChatOptions( searchValue, includePersonalDetails: true, excludeConcierge, + includeRecentReports: true, + maxRecentReportsToShow: 5, }); } diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index 62ee60c5173c..138902b9db89 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -28,7 +28,8 @@ function canUseChronos() { * @returns {Boolean} */ function canUseIOU() { - return _.contains(betas, CONST.BETAS.IOU) || canUseAllBetas(); + // return _.contains(betas, CONST.BETAS.IOU) || canUseAllBetas(); + return true; } export default { diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 2eae67d9f2e6..88b1ac6b8113 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -54,6 +54,7 @@ class NewChatPage extends Component { this.createNewChat = this.createNewChat.bind(this); const { + recentReports, personalDetails, userToInvite, } = getNewChatOptions( @@ -64,6 +65,7 @@ class NewChatPage extends Component { this.state = { searchValue: '', + recentReports, personalDetails, userToInvite, }; @@ -77,6 +79,13 @@ class NewChatPage extends Component { getSections() { const sections = []; + sections.push({ + title: this.props.translate('iou.recents'), + data: this.state.recentReports, + shouldShow: this.state.recentReports.length > 0, + indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), + }); + sections.push({ title: this.props.translate('iou.contacts'), data: this.state.personalDetails, @@ -128,6 +137,7 @@ class NewChatPage extends Component { onSelectRow={this.createNewChat} onChangeText={(searchValue = '') => { const { + recentReports, personalDetails, userToInvite, } = getNewChatOptions( @@ -137,12 +147,12 @@ class NewChatPage extends Component { ); this.setState({ searchValue, + recentReports, userToInvite, personalDetails, }); }} headerMessage={headerMessage} - hideSectionHeaders disableArrowKeysActions hideAdditionalOptionStates forceTextUnreadStyle diff --git a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js index 0eb5e77909c4..419dc243a5b0 100755 --- a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js +++ b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js @@ -44,7 +44,11 @@ class IOUParticipantsRequest extends Component { this.addSingleParticipant = this.addSingleParticipant.bind(this); - const {personalDetails, userToInvite} = getNewChatOptions( + const { + recentReports, + personalDetails, + userToInvite, + } = getNewChatOptions( props.reports, props.personalDetails, '', @@ -52,6 +56,7 @@ class IOUParticipantsRequest extends Component { ); this.state = { + recentReports, personalDetails, userToInvite, searchValue: '', @@ -65,6 +70,14 @@ class IOUParticipantsRequest extends Component { */ getSections() { const sections = []; + + sections.push({ + title: this.props.translate('iou.recents'), + data: this.state.recentReports, + shouldShow: this.state.recentReports.length > 0, + indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), + }); + sections.push({ title: this.props.translate('iou.contacts'), data: this.state.personalDetails, @@ -102,7 +115,11 @@ class IOUParticipantsRequest extends Component { value={this.state.searchValue} onSelectRow={this.addSingleParticipant} onChangeText={(searchValue = '') => { - const {personalDetails, userToInvite} = getNewChatOptions( + const { + recentReports, + personalDetails, + userToInvite, + } = getNewChatOptions( this.props.reports, this.props.personalDetails, searchValue, @@ -110,11 +127,11 @@ class IOUParticipantsRequest extends Component { ); this.setState({ searchValue, + recentReports, userToInvite, personalDetails, }); }} - hideSectionHeaders disableArrowKeysActions hideAdditionalOptionStates forceTextUnreadStyle diff --git a/tests/unit/OptionsListUtilsTest.js b/tests/unit/OptionsListUtilsTest.js index 78f6fab8648a..9e8d552e3969 100644 --- a/tests/unit/OptionsListUtilsTest.js +++ b/tests/unit/OptionsListUtilsTest.js @@ -1,4 +1,4 @@ -import _ from 'underscore'; +import _, {result} from 'underscore'; import Onyx from 'react-native-onyx'; import * as OptionsListUtils from '../../src/libs/OptionsListUtils'; import ONYXKEYS from '../../src/ONYXKEYS'; @@ -199,17 +199,17 @@ describe('OptionsListUtils', () => { // When we call getNewChatOptions() with no search value let results = OptionsListUtils.getNewChatOptions(REPORTS, PERSONAL_DETAILS, ''); - // Then no reports should be returned, only personalDetails and all the personalDetails should be returned - // minus the currently logged in user - expect(results.recentReports.length).toBe(0); - expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS) - 1); + // We should expect maxmimum of 5 recent reports to be returned + // minus the currently logged in user and recent reports count + expect(results.recentReports.length).toBe(5); + expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS) - 1 - 5); // Then the result which has an existing report should also have the reportID attached const personalDetailWithExistingReport = _.find( results.personalDetails, - personalDetail => personalDetail.login === 'reedrichards@expensify.com', + personalDetail => personalDetail.login === 'peterparker@expensify.com', ); - expect(personalDetailWithExistingReport.reportID).toBe(3); + expect(personalDetailWithExistingReport.reportID).toBe(2); // When we provide a search value that does not match any personal details results = OptionsListUtils.getNewChatOptions(REPORTS, PERSONAL_DETAILS, 'magneto'); @@ -221,26 +221,27 @@ describe('OptionsListUtils', () => { results = OptionsListUtils.getNewChatOptions(REPORTS, PERSONAL_DETAILS, 'peterparker@expensify.com'); // Then one option will be returned and it will be the correct option - expect(results.personalDetails.length).toBe(1); - expect(results.personalDetails[0].text).toBe('Spider-Man'); + expect(results.recentReports.length).toBe(1); + expect(results.recentReports[0].text).toBe('Spider-Man'); // When we provide a search value that matches a partial display name or email results = OptionsListUtils.getNewChatOptions(REPORTS, PERSONAL_DETAILS, 'man'); // Then several options will be returned and they will be each have the search string in their email or name // even though the currently logged in user matches they should not show. - expect(results.personalDetails.length).toBe(3); - expect(results.personalDetails[0].text).toBe('Spider-Man'); - expect(results.personalDetails[1].text).toBe('Invisible Woman'); - expect(results.personalDetails[2].login).toBe('natasharomanoff@expensify.com'); + expect(results.personalDetails.length).toBe(1); + expect(results.recentReports.length).toBe(2); + expect(results.personalDetails[0].login).toBe('natasharomanoff@expensify.com'); + expect(results.recentReports[0].text).toBe('Invisible Woman'); + expect(results.recentReports[1].text).toBe('Spider-Man'); // Test for Concierge's existence in chat options results = OptionsListUtils.getNewChatOptions(REPORTS_WITH_CONCIERGE, PERSONAL_DETAILS_WITH_CONCIERGE); - // Concierge is included in the results by default and all the personalDetails should be returned - // minus the currently logged in user - expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS_WITH_CONCIERGE) - 1); - expect(results.personalDetails).toEqual( + // Concierge is included in the results by default. We should expect all the personalDetails to show + // (minus the 5 that are already showing and the currently logged in user) + expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS_WITH_CONCIERGE) - 1 - 5); + expect(results.recentReports).toEqual( expect.arrayContaining([ expect.objectContaining({login: 'concierge@expensify.com'}), ]), @@ -250,7 +251,7 @@ describe('OptionsListUtils', () => { results = OptionsListUtils.getNewChatOptions(REPORTS_WITH_CONCIERGE, PERSONAL_DETAILS_WITH_CONCIERGE, '', true); // All the personalDetails should be returned minus the currently logged in user and Concierge - expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS_WITH_CONCIERGE) - 2); + expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS_WITH_CONCIERGE) - 2 - 5); expect(results.personalDetails).not.toEqual( expect.arrayContaining([ expect.objectContaining({login: 'concierge@expensify.com'}), From e41360afeca049490f1b52ae837cb42b3ca83d7c Mon Sep 17 00:00:00 2001 From: Donnie Darko Date: Mon, 17 May 2021 19:18:11 +0500 Subject: [PATCH 2/8] use underscore isEmpty function to check if we should show the recentReports and the personalDetails --- src/pages/NewChatPage.js | 5 +++-- src/pages/NewGroupPage.js | 4 ++-- .../iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js | 5 +++-- .../iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 88b1ac6b8113..aff51f3da26a 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -2,6 +2,7 @@ import React, {Component} from 'react'; import {View} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; import OptionsSelector from '../components/OptionsSelector'; import {getNewChatOptions, getHeaderMessage} from '../libs/OptionsListUtils'; import ONYXKEYS from '../ONYXKEYS'; @@ -82,14 +83,14 @@ class NewChatPage extends Component { sections.push({ title: this.props.translate('iou.recents'), data: this.state.recentReports, - shouldShow: this.state.recentReports.length > 0, + shouldShow: !_.isEmpty(this.state.recentReports), indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), }); sections.push({ title: this.props.translate('iou.contacts'), data: this.state.personalDetails, - shouldShow: this.state.personalDetails.length > 0, + shouldShow: !_.isEmpty(this.state.personalDetails), indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), }); diff --git a/src/pages/NewGroupPage.js b/src/pages/NewGroupPage.js index f1e83de73ae5..3876f801b209 100755 --- a/src/pages/NewGroupPage.js +++ b/src/pages/NewGroupPage.js @@ -98,14 +98,14 @@ class NewGroupPage extends Component { sections.push({ title: this.props.translate('iou.recents'), data: this.state.recentReports, - shouldShow: this.state.recentReports.length > 0, + shouldShow: !_.isEmpty(this.state.recentReports), indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), }); sections.push({ title: this.props.translate('iou.contacts'), data: this.state.personalDetails, - shouldShow: this.state.personalDetails.length > 0, + shouldShow: !_.isEmpty(this.state.personalDetails), indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), }); diff --git a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js index 419dc243a5b0..da03a780c70e 100755 --- a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js +++ b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js @@ -1,6 +1,7 @@ import React, {Component} from 'react'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; +import _ from 'underscore'; import {getNewChatOptions} from '../../../../libs/OptionsListUtils'; import OptionsSelector from '../../../../components/OptionsSelector'; import ONYXKEYS from '../../../../ONYXKEYS'; @@ -74,14 +75,14 @@ class IOUParticipantsRequest extends Component { sections.push({ title: this.props.translate('iou.recents'), data: this.state.recentReports, - shouldShow: this.state.recentReports.length > 0, + shouldShow: !_.isEmpty(this.state.recentReports), indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), }); sections.push({ title: this.props.translate('iou.contacts'), data: this.state.personalDetails, - shouldShow: this.state.personalDetails.length > 0, + shouldShow: !_.isEmpty(this.state.personalDetails), indexOffset: 0, }); diff --git a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js index 491569a4841f..3a4c4a0c33bf 100755 --- a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js +++ b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js @@ -113,7 +113,7 @@ class IOUParticipantsSplit extends Component { sections.push({ title: this.props.translate('iou.recents'), data: this.state.recentReports, - shouldShow: this.state.recentReports.length > 0, + shouldShow: !_.isEmpty(this.state.recentReports), // takes the sum off the length of all data // (this.state.selectedOptions) in previous sections @@ -123,7 +123,7 @@ class IOUParticipantsSplit extends Component { sections.push({ title: this.props.translate('iou.contacts'), data: this.state.personalDetails, - shouldShow: this.state.personalDetails.length > 0, + shouldShow: !_.isEmpty(this.state.personalDetails), // takes the sum off the length of all data // (this.state.selectedOptions, this.state.recentReports) in previous sections From 43b5932110e28495b82014819a629ca79e186ca1 Mon Sep 17 00:00:00 2001 From: Donnie Darko Date: Mon, 17 May 2021 19:25:33 +0500 Subject: [PATCH 3/8] revert beta permissions --- src/libs/Permissions.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index 138902b9db89..62ee60c5173c 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -28,8 +28,7 @@ function canUseChronos() { * @returns {Boolean} */ function canUseIOU() { - // return _.contains(betas, CONST.BETAS.IOU) || canUseAllBetas(); - return true; + return _.contains(betas, CONST.BETAS.IOU) || canUseAllBetas(); } export default { From 49426e722f47bd458c3ea25bd6e6f95cf0126e02 Mon Sep 17 00:00:00 2001 From: Donnie Darko Date: Mon, 17 May 2021 19:45:09 +0500 Subject: [PATCH 4/8] test OptionsListUtils searching by email --- tests/unit/OptionsListUtilsTest.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/OptionsListUtilsTest.js b/tests/unit/OptionsListUtilsTest.js index 9e8d552e3969..6212255250c3 100644 --- a/tests/unit/OptionsListUtilsTest.js +++ b/tests/unit/OptionsListUtilsTest.js @@ -220,9 +220,11 @@ describe('OptionsListUtils', () => { // When we provide a search value that matches an email results = OptionsListUtils.getNewChatOptions(REPORTS, PERSONAL_DETAILS, 'peterparker@expensify.com'); - // Then one option will be returned and it will be the correct option + // Then one recentReports will be returned and it will be the correct option + // personalDetails should be empty array expect(results.recentReports.length).toBe(1); expect(results.recentReports[0].text).toBe('Spider-Man'); + expect(results.personalDetails.length).toBe(0); // When we provide a search value that matches a partial display name or email results = OptionsListUtils.getNewChatOptions(REPORTS, PERSONAL_DETAILS, 'man'); From 8c05935fd7bba397a31f8e01554a6997010c51ef Mon Sep 17 00:00:00 2001 From: Donnie Darko Date: Mon, 17 May 2021 21:30:22 +0500 Subject: [PATCH 5/8] linter hotfix --- tests/unit/OptionsListUtilsTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/OptionsListUtilsTest.js b/tests/unit/OptionsListUtilsTest.js index 6212255250c3..8b76491f6eb5 100644 --- a/tests/unit/OptionsListUtilsTest.js +++ b/tests/unit/OptionsListUtilsTest.js @@ -1,4 +1,4 @@ -import _, {result} from 'underscore'; +import _ from 'underscore'; import Onyx from 'react-native-onyx'; import * as OptionsListUtils from '../../src/libs/OptionsListUtils'; import ONYXKEYS from '../../src/ONYXKEYS'; From e38ae64b0b3f6bc0509ab57ee6477c2db27de61e Mon Sep 17 00:00:00 2001 From: Donnie Darko Date: Wed, 19 May 2021 23:05:54 +0500 Subject: [PATCH 6/8] retrigger checks From fe3948162826824eb87400901005d8e501317961 Mon Sep 17 00:00:00 2001 From: Donnie Darko Date: Fri, 21 May 2021 08:42:34 +0500 Subject: [PATCH 7/8] create a var for maxRecentReports and make some comments more readable --- tests/unit/OptionsListUtilsTest.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/unit/OptionsListUtilsTest.js b/tests/unit/OptionsListUtilsTest.js index b93fa55f0243..9ce34322cdfb 100644 --- a/tests/unit/OptionsListUtilsTest.js +++ b/tests/unit/OptionsListUtilsTest.js @@ -193,13 +193,18 @@ describe('OptionsListUtils', () => { }); it('getNewChatOptions()', () => { + // maxRecentReportsToShow in src/libs/OptionsListUtils.js + const MAX_RECENT_REPORTS = 5; + // When we call getNewChatOptions() with no search value let results = OptionsListUtils.getNewChatOptions(REPORTS, PERSONAL_DETAILS, ''); - // We should expect maxmimum of 5 recent reports to be returned + // We should expect maximimum of 5 recent reports to be returned + expect(results.recentReports.length).toBe(MAX_RECENT_REPORTS); + + // We should expect all personalDetails to be returned, // minus the currently logged in user and recent reports count - expect(results.recentReports.length).toBe(5); - expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS) - 1 - 5); + expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS) - 1 - MAX_RECENT_REPORTS); // Then the result which has an existing report should also have the reportID attached const personalDetailWithExistingReport = _.find( @@ -239,7 +244,7 @@ describe('OptionsListUtils', () => { // Concierge is included in the results by default. We should expect all the personalDetails to show // (minus the 5 that are already showing and the currently logged in user) - expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS_WITH_CONCIERGE) - 1 - 5); + expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS_WITH_CONCIERGE) - 1 - MAX_RECENT_REPORTS); expect(results.recentReports).toEqual( expect.arrayContaining([ expect.objectContaining({login: 'concierge@expensify.com'}), @@ -250,7 +255,7 @@ describe('OptionsListUtils', () => { results = OptionsListUtils.getNewChatOptions(REPORTS_WITH_CONCIERGE, PERSONAL_DETAILS_WITH_CONCIERGE, '', true); // All the personalDetails should be returned minus the currently logged in user and Concierge - expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS_WITH_CONCIERGE) - 2 - 5); + expect(results.personalDetails.length).toBe(_.size(PERSONAL_DETAILS_WITH_CONCIERGE) - 2 - MAX_RECENT_REPORTS); expect(results.personalDetails).not.toEqual( expect.arrayContaining([ expect.objectContaining({login: 'concierge@expensify.com'}), From 103ebfe3d9b53938a49c1e63ce5493973071138f Mon Sep 17 00:00:00 2001 From: Donnie Darko Date: Sat, 22 May 2021 07:13:54 +0500 Subject: [PATCH 8/8] move iou.recents to common.recents --- src/components/OptionsList.js | 2 +- src/languages/en.js | 4 ++-- src/pages/NewChatPage.js | 4 ++-- src/pages/NewGroupPage.js | 4 ++-- src/pages/SearchPage.js | 2 +- .../iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js | 4 ++-- .../iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js | 4 ++-- src/styles/styles.js | 4 ++++ 8 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/components/OptionsList.js b/src/components/OptionsList.js index 5629831e7f49..96c06425fbb9 100644 --- a/src/components/OptionsList.js +++ b/src/components/OptionsList.js @@ -188,7 +188,7 @@ class OptionsList extends Component { if (title && shouldShow && !this.props.hideSectionHeaders) { return ( - + {title} diff --git a/src/languages/en.js b/src/languages/en.js index ea9b5061e42f..6b1eff6d2840 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -27,6 +27,8 @@ export default { email: 'Email', and: 'and', details: 'Details', + contacts: 'Contacts', + recents: 'Recents', }, attachmentPicker: { cameraPermissionRequired: 'Camera Permission Required', @@ -93,8 +95,6 @@ export default { newGroup: 'New Group', }, iou: { - contacts: 'CONTACTS', - recents: 'RECENTS', amount: 'Amount', participants: 'Participants', confirm: 'Confirm', diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 9a78d5ea22de..6922f9d81cce 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -81,14 +81,14 @@ class NewChatPage extends Component { const sections = []; sections.push({ - title: this.props.translate('iou.recents'), + title: this.props.translate('common.recents'), data: this.state.recentReports, shouldShow: !_.isEmpty(this.state.recentReports), indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), }); sections.push({ - title: this.props.translate('iou.contacts'), + title: this.props.translate('common.contacts'), data: this.state.personalDetails, shouldShow: !_.isEmpty(this.state.personalDetails), indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), diff --git a/src/pages/NewGroupPage.js b/src/pages/NewGroupPage.js index 08a8dd57ec5b..525f286863a2 100755 --- a/src/pages/NewGroupPage.js +++ b/src/pages/NewGroupPage.js @@ -97,14 +97,14 @@ class NewGroupPage extends Component { } sections.push({ - title: this.props.translate('iou.recents'), + title: this.props.translate('common.recents'), data: this.state.recentReports, shouldShow: !_.isEmpty(this.state.recentReports), indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), }); sections.push({ - title: this.props.translate('iou.contacts'), + title: this.props.translate('common.contacts'), data: this.state.personalDetails, shouldShow: !_.isEmpty(this.state.personalDetails), indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), diff --git a/src/pages/SearchPage.js b/src/pages/SearchPage.js index dff19ddea251..9d8a95e326e2 100755 --- a/src/pages/SearchPage.js +++ b/src/pages/SearchPage.js @@ -90,7 +90,7 @@ class SearchPage extends Component { */ getSections() { const sections = [{ - title: this.props.translate('iou.recents'), + title: this.props.translate('common.recents'), data: this.state.recentReports.concat(this.state.personalDetails), shouldShow: true, indexOffset: 0, diff --git a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js index d2f9f002584d..19bdb905ccdf 100755 --- a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js +++ b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsRequest.js @@ -73,14 +73,14 @@ class IOUParticipantsRequest extends Component { const sections = []; sections.push({ - title: this.props.translate('iou.recents'), + title: this.props.translate('common.recents'), data: this.state.recentReports, shouldShow: !_.isEmpty(this.state.recentReports), indexOffset: sections.reduce((prev, {data}) => prev + data.length, 0), }); sections.push({ - title: this.props.translate('iou.contacts'), + title: this.props.translate('common.contacts'), data: this.state.personalDetails, shouldShow: !_.isEmpty(this.state.personalDetails), indexOffset: 0, diff --git a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js index ad681e6dd924..df8b40695799 100755 --- a/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js +++ b/src/pages/iou/steps/IOUParticipantsPage/IOUParticipantsSplit.js @@ -108,7 +108,7 @@ class IOUParticipantsSplit extends Component { } sections.push({ - title: this.props.translate('iou.recents'), + title: this.props.translate('common.recents'), data: this.state.recentReports, shouldShow: !_.isEmpty(this.state.recentReports), @@ -118,7 +118,7 @@ class IOUParticipantsSplit extends Component { }); sections.push({ - title: this.props.translate('iou.contacts'), + title: this.props.translate('common.contacts'), data: this.state.personalDetails, shouldShow: !_.isEmpty(this.state.personalDetails), diff --git a/src/styles/styles.js b/src/styles/styles.js index b6cbb169ef01..940649298cb4 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -89,6 +89,10 @@ const styles = { textDecorationLine: 'none', }, + textUppercase: { + textTransform: 'uppercase', + }, + colorReversed: { color: themeColors.textReversed, },