Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 0 additions & 1 deletion src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3879,7 +3879,6 @@ ${
monthly: 'Monatlich',
},
planType: 'Tarifart',
submitExpense: 'Reiche deine Ausgaben unten ein:',
defaultCategory: 'Standardkategorie',
viewTransactions: 'Transaktionen anzeigen',
policyExpenseChatName: ({displayName}: PolicyExpenseChatNameParams) => `Spesen von ${displayName}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3832,7 +3832,6 @@ const translations = {
monthly: 'Monthly',
},
planType: 'Plan type',
submitExpense: 'Submit your expenses below:',
defaultCategory: 'Default category',
viewTransactions: 'View transactions',
policyExpenseChatName: ({displayName}: PolicyExpenseChatNameParams) => `${displayName}'s expenses`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3520,7 +3520,6 @@ ${amount} para ${merchant} - ${date}`,
monthly: 'Mensual',
},
planType: 'Tipo de plan',
submitExpense: 'Envía tus gastos a continuación:',
defaultCategory: 'Categoría predeterminada',
viewTransactions: 'Ver transacciones',
policyExpenseChatName: ({displayName}) => `${displayName}'s gastos`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3884,7 +3884,6 @@ ${
monthly: 'Mensuel',
},
planType: 'Type d’abonnement',
submitExpense: 'Soumettez vos notes de frais ci-dessous :',
defaultCategory: 'Catégorie par défaut',
viewTransactions: 'Afficher les transactions',
policyExpenseChatName: ({displayName}: PolicyExpenseChatNameParams) => `Notes de frais de ${displayName}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3863,7 +3863,6 @@ ${
monthly: 'Mensile',
},
planType: 'Tipo di piano',
submitExpense: 'Invia le tue spese qui sotto:',
defaultCategory: 'Categoria predefinita',
viewTransactions: 'Visualizza transazioni',
policyExpenseChatName: ({displayName}: PolicyExpenseChatNameParams) => `Spese di ${displayName}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3853,7 +3853,6 @@ ${
monthly: '毎月',
},
planType: 'プランの種類',
submitExpense: '経費を以下から提出してください。',
defaultCategory: 'デフォルトのカテゴリ',
viewTransactions: '取引を表示',
policyExpenseChatName: ({displayName}: PolicyExpenseChatNameParams) => `${displayName} の経費`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3862,7 +3862,6 @@ ${
monthly: 'Maandelijks',
},
planType: 'Abonnementstype',
submitExpense: 'Dien hieronder je declaraties in:',
defaultCategory: 'Standaardcategorie',
viewTransactions: 'Transacties weergeven',
policyExpenseChatName: ({displayName}: PolicyExpenseChatNameParams) => `Declaraties van ${displayName}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3858,7 +3858,6 @@ ${
monthly: 'Miesięcznie',
},
planType: 'Typ planu',
submitExpense: 'Prześlij swoje wydatki poniżej:',
defaultCategory: 'Domyślna kategoria',
viewTransactions: 'Wyświetl transakcje',
policyExpenseChatName: ({displayName}: PolicyExpenseChatNameParams) => `Wydatki użytkownika ${displayName}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3857,7 +3857,6 @@ ${
monthly: 'Mensal',
},
planType: 'Tipo de plano',
submitExpense: 'Envie suas despesas abaixo:',
defaultCategory: 'Categoria padrão',
viewTransactions: 'Ver transações',
policyExpenseChatName: ({displayName}: PolicyExpenseChatNameParams) => `Despesas de ${displayName}`,
Expand Down
1 change: 0 additions & 1 deletion src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3801,7 +3801,6 @@ ${
monthly: '每月',
},
planType: '计划类型',
submitExpense: '请在下方提交您的报销:',
defaultCategory: '默认类别',
viewTransactions: '查看交易',
policyExpenseChatName: ({displayName}: PolicyExpenseChatNameParams) => `${displayName} 的报销`,
Expand Down
30 changes: 2 additions & 28 deletions src/pages/workspace/WorkspaceInitialPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ import type {ValueOf} from 'type-fest';
import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import HighlightableMenuItem from '@components/HighlightableMenuItem';
import MenuItem from '@components/MenuItem';
import NavigationTabBar from '@components/Navigation/NavigationTabBar';
import NAVIGATION_TABS from '@components/Navigation/NavigationTabBar/NAVIGATION_TABS';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import ScreenWrapper from '@components/ScreenWrapper';
import ScrollView from '@components/ScrollView';
import Text from '@components/Text';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useGetReceiptPartnersIntegrationData from '@hooks/useGetReceiptPartnersIntegrationData';
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
Expand Down Expand Up @@ -44,7 +42,7 @@ import {
shouldShowSyncError,
shouldShowTaxRateError,
} from '@libs/PolicyUtils';
import {getDefaultWorkspaceAvatar, getPolicyExpenseChat, getReportName, getReportOfflinePendingActionAndErrors} from '@libs/ReportUtils';
import {getDefaultWorkspaceAvatar} from '@libs/ReportUtils';
import type WORKSPACE_TO_RHP from '@navigation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP';
import type {WorkspaceSplitNavigatorParamList} from '@navigation/types';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -117,7 +115,7 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac
const [connectionSyncProgress] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CONNECTION_SYNC_PROGRESS}${policy?.id}`, {canBeMissing: true});
const [currentUserLogin] = useOnyx(ONYXKEYS.SESSION, {selector: emailSelector, canBeMissing: false});
const [policyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${route.params?.policyID}`, {canBeMissing: true});
const {login, accountID} = useCurrentUserPersonalDetails();
const {login} = useCurrentUserPersonalDetails();
const hasSyncError = shouldShowSyncError(policy, isConnectionInProgress(connectionSyncProgress, policy));
const {shouldShowEnterCredentialsError} = useGetReceiptPartnersIntegrationData(policy?.id);
const waitForNavigate = useWaitForNavigation();
Expand All @@ -129,11 +127,6 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac
const isUberForBusinessEnabled = isBetaEnabled(CONST.BETAS.UBER_FOR_BUSINESS);
const {isOffline} = useNetwork();
const wasRendered = useRef(false);
const [allReports] = useOnyx(ONYXKEYS.COLLECTION.REPORT, {canBeMissing: true});
const currentUserPolicyExpenseChatReportID = getPolicyExpenseChat(accountID, policy?.id, allReports)?.reportID;
const [currentUserPolicyExpenseChat] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${currentUserPolicyExpenseChatReportID}`, {canBeMissing: true});
const {reportPendingAction} = getReportOfflinePendingActionAndErrors(currentUserPolicyExpenseChat);
const isPolicyExpenseChatEnabled = !!policy?.isPolicyExpenseChatEnabled;
const prevPendingFields = usePrevious(policy?.pendingFields);
const shouldDisplayLHB = !shouldUseNarrowLayout;
const policyFeatureStates = useMemo(
Expand Down Expand Up @@ -565,25 +558,6 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, route}: Workspac
))}
</View>
</OfflineWithFeedback>
{isPolicyExpenseChatEnabled && !!currentUserPolicyExpenseChatReportID && (
<View style={[styles.pb4, styles.mh3, styles.mt3]}>
<Text style={[styles.textSupporting, styles.fontSizeLabel, styles.ph2]}>{translate('workspace.common.submitExpense')}</Text>
<OfflineWithFeedback
pendingAction={reportPendingAction}
shouldShowErrorMessages={false}
>
<MenuItem
// eslint-disable-next-line @typescript-eslint/no-deprecated
title={getReportName(currentUserPolicyExpenseChat)}
description={translate('workspace.common.workspace')}
onPress={() => Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(currentUserPolicyExpenseChat?.reportID))}
shouldShowRightIcon
wrapperStyle={[styles.br2, styles.pl2, styles.pr0, styles.pv3, styles.mt1, styles.alignItemsCenter]}
iconReportID={currentUserPolicyExpenseChatReportID}
/>
</OfflineWithFeedback>
</View>
)}
</ScrollView>
{shouldShowNavigationTabBar && shouldDisplayLHB && <NavigationTabBar selectedTab={NAVIGATION_TABS.WORKSPACES} />}
</FullPageNotFoundView>
Expand Down