From 1af222432a17197e4d0df7203648d5c2f24243a6 Mon Sep 17 00:00:00 2001 From: Sachin Chavda Date: Tue, 22 Oct 2024 12:49:57 +0530 Subject: [PATCH 1/5] Changed default visiblity for caret - ListItemRightCaretWithLabel --- .../SelectionList/ListItemRightCaretWithLabel.tsx | 2 +- .../workspace/categories/WorkspaceCategoriesPage.tsx | 2 +- .../workspace/distanceRates/PolicyDistanceRatesPage.tsx | 2 +- .../reportFields/ReportFieldsListValuesPage.tsx | 9 ++------- .../workspace/reportFields/WorkspaceReportFieldsPage.tsx | 9 ++------- src/pages/workspace/tags/WorkspaceTagsPage.tsx | 5 ++--- src/pages/workspace/taxes/WorkspaceTaxesPage.tsx | 2 +- 7 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/components/SelectionList/ListItemRightCaretWithLabel.tsx b/src/components/SelectionList/ListItemRightCaretWithLabel.tsx index f20c4179f0fe..dbe6138eb8f0 100644 --- a/src/components/SelectionList/ListItemRightCaretWithLabel.tsx +++ b/src/components/SelectionList/ListItemRightCaretWithLabel.tsx @@ -11,7 +11,7 @@ type ListItemRightCaretWithLabelProps = { shouldShowCaret?: boolean; }; -function ListItemRightCaretWithLabel({labelText, shouldShowCaret = true}: ListItemRightCaretWithLabelProps) { +function ListItemRightCaretWithLabel({labelText, shouldShowCaret = false}: ListItemRightCaretWithLabelProps) { const styles = useThemeStyles(); const theme = useTheme(); diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index 750e72289ee5..69ebf0fb9117 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -139,7 +139,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { }; const getCustomListHeader = () => ( - + {translate('common.name')} {translate('statusPage.status')} diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index 661388a1657d..134229bc54ee 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -194,7 +194,7 @@ function PolicyDistanceRatesPage({ }; const getCustomListHeader = () => ( - + {translate('workspace.distanceRates.rate')} {translate('statusPage.status')} diff --git a/src/pages/workspace/reportFields/ReportFieldsListValuesPage.tsx b/src/pages/workspace/reportFields/ReportFieldsListValuesPage.tsx index 49c8f391c700..381d50350326 100644 --- a/src/pages/workspace/reportFields/ReportFieldsListValuesPage.tsx +++ b/src/pages/workspace/reportFields/ReportFieldsListValuesPage.tsx @@ -98,12 +98,7 @@ function ReportFieldsListValuesPage({ keyForList: value, isSelected: selectedValues[value] && canSelectMultiple, enabled: !disabledListValues.at(index) ?? true, - rightElement: ( - - ), + rightElement: , })) .sort((a, b) => localeCompare(a.value, b.value)); return [{data, isDisabled: false}]; @@ -164,7 +159,7 @@ function ReportFieldsListValuesPage({ styles.flex1, styles.flexRow, styles.justifyContentBetween, - // Required padding accounting for the checkbox and the right arrow in multi-select mode + // Required padding accounting for the checkbox in multi-select mode canSelectMultiple && styles.pl3, ]} > diff --git a/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx b/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx index fbcaede370f5..acf831a0cafc 100644 --- a/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx +++ b/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx @@ -124,12 +124,7 @@ function WorkspaceReportFieldsPage({ isSelected: selectedReportFields.find((selectedReportField) => selectedReportField.name === reportField.name) !== undefined && canSelectMultiple, isDisabled: reportField.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE, text: reportField.name, - rightElement: ( - - ), + rightElement: , })), isDisabled: false, }, @@ -212,7 +207,7 @@ function WorkspaceReportFieldsPage({ styles.flex1, styles.flexRow, styles.justifyContentBetween, - // Required padding accounting for the checkbox and the right arrow in multi-select mode + // Required padding accounting for the checkbox in multi-select mode canSelectMultiple && styles.pl3, ]} > diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index c798d5096614..95ac56a49f81 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -115,7 +115,6 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { rightElement: ( tag.enabled) ? translate('common.required') : undefined} - shouldShowCaret={false} /> ), })); @@ -163,8 +162,8 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { styles.flex1, styles.flexRow, styles.justifyContentBetween, - // Required padding accounting for the checkbox and the right arrow in multi-select mode - canSelectMultiple && [styles.pl3, styles.pr8], + // Required padding accounting for the checkbox in multi-select mode + canSelectMultiple && styles.pl3, ]} > {translate('common.name')} diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index 44919dd09324..0b695e5e5e2d 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -155,7 +155,7 @@ function WorkspaceTaxesPage({ }; const getCustomListHeader = () => ( - + {translate('common.name')} {translate('statusPage.status')} From e4087b5777db16b1257675d5f7a5f956083ae189 Mon Sep 17 00:00:00 2001 From: Sachin Chavda Date: Tue, 22 Oct 2024 13:40:36 +0530 Subject: [PATCH 2/5] Minor styling change --- .../categories/WorkspaceCategoriesPage.tsx | 26 +++++++++++---- .../distanceRates/PolicyDistanceRatesPage.tsx | 33 +++++++++++++++---- .../workspace/taxes/WorkspaceTaxesPage.tsx | 26 +++++++++++---- 3 files changed, 66 insertions(+), 19 deletions(-) diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index 69ebf0fb9117..9949e438d013 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -138,12 +138,26 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { setSelectedCategories(isAllSelected ? {} : Object.fromEntries(availableCategories.map((item) => [item.keyForList, true]))); }; - const getCustomListHeader = () => ( - - {translate('common.name')} - {translate('statusPage.status')} - - ); + const getCustomListHeader = () => { + const header = ( + + {translate('common.name')} + {translate('statusPage.status')} + + ); + if (canSelectMultiple) { + return header; + } + return {header}; + }; const navigateToCategorySettings = (category: PolicyOption) => { if (backTo) { diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index 134229bc54ee..5c35651f47a6 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -193,13 +193,32 @@ function PolicyDistanceRatesPage({ } }; - const getCustomListHeader = () => ( - - {translate('workspace.distanceRates.rate')} - {translate('statusPage.status')} - - ); - + // const getCustomListHeader = () => ( + // + // {translate('workspace.distanceRates.rate')} + // {translate('statusPage.status')} + // + // ); + const getCustomListHeader = () => { + const header = ( + + {translate('workspace.distanceRates.rate')} + {translate('statusPage.status')} + + ); + if (canSelectMultiple) { + return header; + } + return {header}; + }; const getBulkActionsButtonOptions = () => { const options: Array> = [ { diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index 0b695e5e5e2d..90ef3aeb58b1 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -154,12 +154,26 @@ function WorkspaceTaxesPage({ }); }; - const getCustomListHeader = () => ( - - {translate('common.name')} - {translate('statusPage.status')} - - ); + const getCustomListHeader = () => { + const header = ( + + {translate('common.name')} + {translate('statusPage.status')} + + ); + if (canSelectMultiple) { + return header; + } + return {header}; + }; const deleteTaxes = useCallback(() => { if (!policyID) { From 595915897e3d9ad5ff7b6cdebce2356026264919 Mon Sep 17 00:00:00 2001 From: Chavda Sachin <81917707+ChavdaSachin@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:21:50 +0530 Subject: [PATCH 3/5] Removed extra comments Co-authored-by: Fedi Rajhi --- .../workspace/distanceRates/PolicyDistanceRatesPage.tsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index 5c35651f47a6..cb8c7fb98335 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -193,12 +193,6 @@ function PolicyDistanceRatesPage({ } }; - // const getCustomListHeader = () => ( - // - // {translate('workspace.distanceRates.rate')} - // {translate('statusPage.status')} - // - // ); const getCustomListHeader = () => { const header = ( Date: Wed, 23 Oct 2024 20:01:32 +0530 Subject: [PATCH 4/5] Create and use new component CustomListHeader --- .../ListItemRightCaretWithLabel.tsx | 4 +- .../CustomListHeader.tsx | 40 +++++++++++++++++++ src/pages/workspace/WorkspaceMembersPage.tsx | 20 ++++------ .../categories/WorkspaceCategoriesPage.tsx | 26 ++++-------- .../distanceRates/PolicyDistanceRatesPage.tsx | 31 ++++---------- .../WorkspaceReportFieldsPage.tsx | 26 ++++-------- .../workspace/tags/WorkspaceTagsPage.tsx | 26 ++++-------- .../workspace/taxes/WorkspaceTaxesPage.tsx | 24 ++++------- 8 files changed, 89 insertions(+), 108 deletions(-) create mode 100644 src/components/SelectionListWithModal/CustomListHeader.tsx diff --git a/src/components/SelectionList/ListItemRightCaretWithLabel.tsx b/src/components/SelectionList/ListItemRightCaretWithLabel.tsx index dbe6138eb8f0..74c519333a28 100644 --- a/src/components/SelectionList/ListItemRightCaretWithLabel.tsx +++ b/src/components/SelectionList/ListItemRightCaretWithLabel.tsx @@ -3,6 +3,7 @@ import {View} from 'react-native'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import Text from '@components/Text'; +import useStyleUtils from '@hooks/useStyleUtils'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; @@ -14,10 +15,11 @@ type ListItemRightCaretWithLabelProps = { function ListItemRightCaretWithLabel({labelText, shouldShowCaret = false}: ListItemRightCaretWithLabelProps) { const styles = useThemeStyles(); const theme = useTheme(); + const StyleUtils = useStyleUtils(); return ( - {!!labelText && {labelText}} + {!!labelText && {labelText}} {shouldShowCaret && ( + {leftHeaderText} + + {rightHeaderText} + + + ); + + if (canSelectMultiple) { + return header; + } + return {header}; +} + +export default CustomListHeader; diff --git a/src/pages/workspace/WorkspaceMembersPage.tsx b/src/pages/workspace/WorkspaceMembersPage.tsx index 77f3b7a1a4b0..4048bfef440d 100644 --- a/src/pages/workspace/WorkspaceMembersPage.tsx +++ b/src/pages/workspace/WorkspaceMembersPage.tsx @@ -19,6 +19,7 @@ import MessagesRow from '@components/MessagesRow'; import TableListItem from '@components/SelectionList/TableListItem'; import type {ListItem, SelectionListHandle} from '@components/SelectionList/types'; import SelectionListWithModal from '@components/SelectionListWithModal'; +import CustomListHeader from '@components/SelectionListWithModal/CustomListHeader'; import Text from '@components/Text'; import type {WithCurrentUserPersonalDetailsProps} from '@components/withCurrentUserPersonalDetails'; import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; @@ -452,20 +453,13 @@ function WorkspaceMembersPage({personalDetails, route, policy, currentUserPerson }, [setSelectedEmployees, selectionMode?.isEnabled]); const getCustomListHeader = () => { - const header = ( - - - {translate('common.member')} - - - {translate('common.role')} - - + return ( + ); - if (canSelectMultiple) { - return header; - } - return {header}; }; const changeUserRole = (role: ValueOf) => { diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index 9949e438d013..10b2dc961641 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -19,6 +19,7 @@ import ListItemRightCaretWithLabel from '@components/SelectionList/ListItemRight import TableListItem from '@components/SelectionList/TableListItem'; import type {ListItem} from '@components/SelectionList/types'; import SelectionListWithModal from '@components/SelectionListWithModal'; +import CustomListHeader from '@components/SelectionListWithModal/CustomListHeader'; import TableListItemSkeleton from '@components/Skeletons/TableRowSkeleton'; import Text from '@components/Text'; import TextLink from '@components/TextLink'; @@ -139,26 +140,15 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { }; const getCustomListHeader = () => { - const header = ( - - {translate('common.name')} - {translate('statusPage.status')} - + return ( + ); - if (canSelectMultiple) { - return header; - } - return {header}; }; - + const navigateToCategorySettings = (category: PolicyOption) => { if (backTo) { Navigation.navigate(ROUTES.SETTINGS_CATEGORY_SETTINGS.getRoute(policyId, category.keyForList, backTo)); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index 5c35651f47a6..8a489acebde4 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -13,6 +13,7 @@ import ListItemRightCaretWithLabel from '@components/SelectionList/ListItemRight import TableListItem from '@components/SelectionList/TableListItem'; import type {ListItem} from '@components/SelectionList/types'; import SelectionListWithModal from '@components/SelectionListWithModal'; +import CustomListHeader from '@components/SelectionListWithModal/CustomListHeader'; import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useMobileSelectionMode from '@hooks/useMobileSelectionMode'; @@ -193,32 +194,16 @@ function PolicyDistanceRatesPage({ } }; - // const getCustomListHeader = () => ( - // - // {translate('workspace.distanceRates.rate')} - // {translate('statusPage.status')} - // - // ); const getCustomListHeader = () => { - const header = ( - - {translate('workspace.distanceRates.rate')} - {translate('statusPage.status')} - + return ( + ); - if (canSelectMultiple) { - return header; - } - return {header}; }; + const getBulkActionsButtonOptions = () => { const options: Array> = [ { diff --git a/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx b/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx index acf831a0cafc..ebee546cbb2f 100644 --- a/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx +++ b/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx @@ -18,6 +18,7 @@ import ListItemRightCaretWithLabel from '@components/SelectionList/ListItemRight import TableListItem from '@components/SelectionList/TableListItem'; import type {ListItem} from '@components/SelectionList/types'; import SelectionListWithModal from '@components/SelectionListWithModal'; +import CustomListHeader from '@components/SelectionListWithModal/CustomListHeader'; import TableListItemSkeleton from '@components/Skeletons/TableRowSkeleton'; import Text from '@components/Text'; import TextLink from '@components/TextLink'; @@ -201,26 +202,15 @@ function WorkspaceReportFieldsPage({ }; const getCustomListHeader = () => { - const header = ( - - {translate('common.name')} - {translate('common.type')} - + return ( + ); - if (canSelectMultiple) { - return header; - } - return {header}; }; - + const getHeaderText = () => ( {!hasSyncError && isConnectedToAccounting ? ( diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index 95ac56a49f81..2af7fa74b596 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -19,6 +19,7 @@ import ScreenWrapper from '@components/ScreenWrapper'; import ListItemRightCaretWithLabel from '@components/SelectionList/ListItemRightCaretWithLabel'; import TableListItem from '@components/SelectionList/TableListItem'; import SelectionListWithModal from '@components/SelectionListWithModal'; +import CustomListHeader from '@components/SelectionListWithModal/CustomListHeader'; import TableListItemSkeleton from '@components/Skeletons/TableRowSkeleton'; import Text from '@components/Text'; import TextLink from '@components/TextLink'; @@ -156,26 +157,15 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { }; const getCustomListHeader = () => { - const header = ( - - {translate('common.name')} - {translate('statusPage.status')} - + return ( + ); - if (canSelectMultiple) { - return header; - } - return {header}; }; - + const navigateToTagsSettings = () => { Navigation.navigate(ROUTES.WORKSPACE_TAGS_SETTINGS.getRoute(policyID)); }; diff --git a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx index 90ef3aeb58b1..43f5a522e641 100644 --- a/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx +++ b/src/pages/workspace/taxes/WorkspaceTaxesPage.tsx @@ -15,6 +15,7 @@ import ListItemRightCaretWithLabel from '@components/SelectionList/ListItemRight import TableListItem from '@components/SelectionList/TableListItem'; import type {ListItem} from '@components/SelectionList/types'; import SelectionListWithModal from '@components/SelectionListWithModal'; +import CustomListHeader from '@components/SelectionListWithModal/CustomListHeader'; import Text from '@components/Text'; import TextLink from '@components/TextLink'; import useEnvironment from '@hooks/useEnvironment'; @@ -155,24 +156,13 @@ function WorkspaceTaxesPage({ }; const getCustomListHeader = () => { - const header = ( - - {translate('common.name')} - {translate('statusPage.status')} - + return ( + ); - if (canSelectMultiple) { - return header; - } - return {header}; }; const deleteTaxes = useCallback(() => { From 4eaf05f06f3395efea4754c209577b7a4805de3b Mon Sep 17 00:00:00 2001 From: Sachin Chavda Date: Wed, 23 Oct 2024 20:10:36 +0530 Subject: [PATCH 5/5] prettier, Eslint --- .../SelectionListWithModal/CustomListHeader.tsx | 8 ++++---- src/pages/workspace/WorkspaceMembersPage.tsx | 2 -- .../workspace/categories/WorkspaceCategoriesPage.tsx | 2 +- .../workspace/distanceRates/PolicyDistanceRatesPage.tsx | 2 +- .../workspace/reportFields/WorkspaceReportFieldsPage.tsx | 2 +- src/pages/workspace/tags/WorkspaceTagsPage.tsx | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/components/SelectionListWithModal/CustomListHeader.tsx b/src/components/SelectionListWithModal/CustomListHeader.tsx index 16a903d9e838..30ad32b33a59 100644 --- a/src/components/SelectionListWithModal/CustomListHeader.tsx +++ b/src/components/SelectionListWithModal/CustomListHeader.tsx @@ -5,9 +5,9 @@ import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; type CustomListHeaderProps = { - canSelectMultiple: Boolean | undefined; - leftHeaderText?: String | undefined; - rightHeaderText?: String | undefined; + canSelectMultiple: boolean | undefined; + leftHeaderText?: string | undefined; + rightHeaderText?: string | undefined; }; function CustomListHeader({canSelectMultiple, leftHeaderText = '', rightHeaderText = ''}: CustomListHeaderProps) { @@ -30,7 +30,7 @@ function CustomListHeader({canSelectMultiple, leftHeaderText = '', rightHeaderTe ); - + if (canSelectMultiple) { return header; } diff --git a/src/pages/workspace/WorkspaceMembersPage.tsx b/src/pages/workspace/WorkspaceMembersPage.tsx index 4048bfef440d..96b6d31e5a2e 100644 --- a/src/pages/workspace/WorkspaceMembersPage.tsx +++ b/src/pages/workspace/WorkspaceMembersPage.tsx @@ -28,7 +28,6 @@ import useMobileSelectionMode from '@hooks/useMobileSelectionMode'; import useNetwork from '@hooks/useNetwork'; import usePrevious from '@hooks/usePrevious'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; -import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import {turnOffMobileSelectionMode} from '@libs/actions/MobileSelectionMode'; @@ -69,7 +68,6 @@ type MemberOption = Omit & {accountID: number}; function WorkspaceMembersPage({personalDetails, route, policy, currentUserPersonalDetails}: WorkspaceMembersPageProps) { const policyMemberEmailsToAccountIDs = useMemo(() => PolicyUtils.getMemberAccountIDsForWorkspace(policy?.employeeList, true), [policy?.employeeList]); const styles = useThemeStyles(); - const StyleUtils = useStyleUtils(); const [selectedEmployees, setSelectedEmployees] = useState([]); const [removeMembersConfirmModalVisible, setRemoveMembersConfirmModalVisible] = useState(false); const [errors, setErrors] = useState({}); diff --git a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx index 10b2dc961641..e53ca99ddc40 100644 --- a/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx +++ b/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx @@ -148,7 +148,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) { /> ); }; - + const navigateToCategorySettings = (category: PolicyOption) => { if (backTo) { Navigation.navigate(ROUTES.SETTINGS_CATEGORY_SETTINGS.getRoute(policyId, category.keyForList, backTo)); diff --git a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx index 8a489acebde4..dcb5f574282e 100644 --- a/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx +++ b/src/pages/workspace/distanceRates/PolicyDistanceRatesPage.tsx @@ -203,7 +203,7 @@ function PolicyDistanceRatesPage({ /> ); }; - + const getBulkActionsButtonOptions = () => { const options: Array> = [ { diff --git a/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx b/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx index ebee546cbb2f..a6b7dd8fa48a 100644 --- a/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx +++ b/src/pages/workspace/reportFields/WorkspaceReportFieldsPage.tsx @@ -210,7 +210,7 @@ function WorkspaceReportFieldsPage({ /> ); }; - + const getHeaderText = () => ( {!hasSyncError && isConnectedToAccounting ? ( diff --git a/src/pages/workspace/tags/WorkspaceTagsPage.tsx b/src/pages/workspace/tags/WorkspaceTagsPage.tsx index 2af7fa74b596..a719da348021 100644 --- a/src/pages/workspace/tags/WorkspaceTagsPage.tsx +++ b/src/pages/workspace/tags/WorkspaceTagsPage.tsx @@ -165,7 +165,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) { /> ); }; - + const navigateToTagsSettings = () => { Navigation.navigate(ROUTES.WORKSPACE_TAGS_SETTINGS.getRoute(policyID)); };