Skip to content

Commit 04c1fbd

Browse files
Merge branch 'main' into perf/lazy-load-heic-to
2 parents 5ecfe27 + 5b9c5e0 commit 04c1fbd

17 files changed

Lines changed: 164 additions & 79 deletions

File tree

Mobile-Expensify

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"@expensify/nitro-utils": "file:./modules/ExpensifyNitroUtils",
8888
"@expensify/react-native-background-task": "file:./modules/background-task",
8989
"@expensify/react-native-hybrid-app": "file:./modules/hybrid-app",
90-
"@expensify/react-native-live-markdown": "0.1.298",
90+
"@expensify/react-native-live-markdown": "0.1.299",
9191
"@expensify/react-native-wallet": "^0.1.5",
9292
"@expo/metro-runtime": "^5.0.4",
9393
"@firebase/app": "^0.13.2",

src/components/MoneyRequestConfirmationListFooter.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import DistanceRequestUtils from '@libs/DistanceRequestUtils';
1515
import {isMovingTransactionFromTrackExpense} from '@libs/IOUUtils';
1616
import Navigation from '@libs/Navigation/Navigation';
1717
import {getDestinationForDisplay, getSubratesFields, getSubratesForDisplay, getTimeDifferenceIntervals, getTimeForDisplay} from '@libs/PerDiemRequestUtils';
18-
import {canSendInvoice, getPerDiemCustomUnit} from '@libs/PolicyUtils';
18+
import {canSendInvoice, getPerDiemCustomUnit, isPaidGroupPolicy} from '@libs/PolicyUtils';
1919
import type {ThumbnailAndImageURI} from '@libs/ReceiptUtils';
2020
import {getThumbnailAndImageURIs} from '@libs/ReceiptUtils';
2121
import {
@@ -332,7 +332,12 @@ function MoneyRequestConfirmationListFooter({
332332
// Determine if the merchant error should be displayed
333333
const shouldDisplayMerchantError = isMerchantRequired && (shouldDisplayFieldError || formError === 'iou.error.invalidMerchant') && isMerchantEmpty;
334334
const shouldDisplayDistanceRateError = formError === 'iou.error.invalidRate';
335-
const shouldShowReceiptEmptyState = (iouType === CONST.IOU.TYPE.SUBMIT || iouType === CONST.IOU.TYPE.TRACK) && !isPerDiemRequest && !isMovingTransactionFromTrackExpense(action);
335+
// Determine when to show the receipt empty state:
336+
// - Show for submit or track expense types
337+
// - Hide for per diem requests
338+
// - Hide when submitting a track expense to a non-paid group policy (personal users)
339+
const shouldShowReceiptEmptyState =
340+
(iouType === CONST.IOU.TYPE.SUBMIT || iouType === CONST.IOU.TYPE.TRACK) && !isPerDiemRequest && (!isMovingTransactionFromTrackExpense(action) || isPaidGroupPolicy(policy));
336341
// The per diem custom unit
337342
const perDiemCustomUnit = getPerDiemCustomUnit(policy);
338343
const {
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import React from 'react';
2+
import {Rect} from 'react-native-svg';
3+
import useResponsiveLayout from '@hooks/useResponsiveLayout';
4+
import useThemeStyles from '@hooks/useThemeStyles';
5+
import useWindowDimensions from '@hooks/useWindowDimensions';
6+
import variables from '@styles/variables';
7+
import ItemListSkeletonView from './ItemListSkeletonView';
8+
9+
const barHeight = 7;
10+
const longBarWidth = 120;
11+
const shortBarWidth = 60;
12+
const leftPaneWidth = variables.navigationTabBarSize;
13+
const gapWidth = 12;
14+
15+
type WorkspaceRowSkeletonProps = {
16+
shouldAnimate?: boolean;
17+
fixedNumItems?: number;
18+
gradientOpacityEnabled?: boolean;
19+
};
20+
21+
function WorkspaceRowSkeleton({shouldAnimate = true, fixedNumItems, gradientOpacityEnabled = false}: WorkspaceRowSkeletonProps) {
22+
const styles = useThemeStyles();
23+
const {windowWidth} = useWindowDimensions();
24+
const {shouldUseNarrowLayout} = useResponsiveLayout();
25+
// We calculate the width of the sections on the skeleton by first calculating the skeleton view width
26+
// Then we subtract the width by 66, which is the x position of the first part.
27+
const partWidth = Math.floor((windowWidth - leftPaneWidth - gapWidth * 2 - 66) / 3);
28+
return (
29+
<ItemListSkeletonView
30+
shouldAnimate={shouldAnimate}
31+
fixedNumItems={fixedNumItems}
32+
gradientOpacityEnabled={gradientOpacityEnabled}
33+
itemViewStyle={[styles.highlightBG, styles.mb2, styles.br3, styles.ml5]}
34+
renderSkeletonItem={() => (
35+
<>
36+
<Rect
37+
x={12}
38+
y={12}
39+
rx={5}
40+
ry={5}
41+
width={36}
42+
height={40}
43+
/>
44+
<Rect
45+
x={66}
46+
y={22}
47+
width={longBarWidth}
48+
height={barHeight}
49+
/>
50+
<Rect
51+
x={66}
52+
y={36}
53+
width={shortBarWidth}
54+
height={barHeight}
55+
/>
56+
{!shouldUseNarrowLayout && (
57+
<>
58+
<Rect
59+
x={66 + partWidth}
60+
y={22}
61+
width={longBarWidth}
62+
height={barHeight}
63+
/>
64+
<Rect
65+
x={66 + partWidth}
66+
y={36}
67+
width={shortBarWidth}
68+
height={barHeight}
69+
/>
70+
<Rect
71+
x={66 + partWidth * 2}
72+
y={22}
73+
width={longBarWidth}
74+
height={barHeight}
75+
/>
76+
<Rect
77+
x={66 + partWidth * 2}
78+
y={36}
79+
width={shortBarWidth}
80+
height={barHeight}
81+
/>
82+
</>
83+
)}
84+
</>
85+
)}
86+
/>
87+
);
88+
}
89+
WorkspaceRowSkeleton.displayName = 'WorkspaceRowSkeleton';
90+
export default WorkspaceRowSkeleton;

src/languages/de.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4882,9 +4882,8 @@ const translations = {
48824882
updateTaxCodeFailureMessage: 'Beim Aktualisieren des Steuercodes ist ein Fehler aufgetreten, bitte versuchen Sie es erneut.',
48834883
},
48844884
emptyWorkspace: {
4885-
title: 'Erstellen Sie einen Arbeitsbereich',
4886-
subtitle:
4887-
'Erstellen Sie einen Arbeitsbereich, um Belege zu verfolgen, Ausgaben zu erstatten, Reisen zu verwalten, Rechnungen zu senden und mehr – alles in der Geschwindigkeit eines Chats.',
4885+
title: 'Sie haben keine Arbeitsbereiche',
4886+
subtitle: 'Verfolgen Sie Belege, erstatten Sie Ausgaben, verwalten Sie Reisen, senden Sie Rechnungen und mehr.',
48884887
createAWorkspaceCTA: 'Loslegen',
48894888
features: {
48904889
trackAndCollect: 'Belege verfolgen und sammeln',
@@ -6530,8 +6529,7 @@ const translations = {
65306529
overTripLimit: ({formattedLimit}: ViolationsOverLimitParams) => `Betrag über ${formattedLimit}/Fahrtgrenze`,
65316530
overLimitAttendee: ({formattedLimit}: ViolationsOverLimitParams) => `Betrag über dem Limit von ${formattedLimit}/Person`,
65326531
perDayLimit: ({formattedLimit}: ViolationsPerDayLimitParams) => `Betrag über dem täglichen ${formattedLimit}/Personen-Kategorielimit`,
6533-
receiptNotSmartScanned:
6534-
'Beleg und Ausgabendetails manuell hinzugefügt. <a href="https://help.expensify.com/articles/expensify-classic/reports/Automatic-Receipt-Audit">Erfahren Sie mehr</a>.',
6532+
receiptNotSmartScanned: 'Beleg und Ausgabendetails manuell hinzugefügt.',
65356533
receiptRequired: ({formattedLimit, category}: ViolationsReceiptRequiredParams) => {
65366534
let message = 'Beleg erforderlich';
65376535
if (formattedLimit ?? category) {

src/languages/en.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4865,8 +4865,8 @@ const translations = {
48654865
updateTaxCodeFailureMessage: 'An error occurred while updating the tax code, please try again',
48664866
},
48674867
emptyWorkspace: {
4868-
title: 'Create a workspace',
4869-
subtitle: 'Create a workspace to track receipts, reimburse expenses, manage travel, send invoices, and more — all at the speed of chat.',
4868+
title: 'You have no workspaces',
4869+
subtitle: 'Track receipts, reimburse expenses, manage travel, send invoices, and more.',
48704870
createAWorkspaceCTA: 'Get Started',
48714871
features: {
48724872
trackAndCollect: 'Track and collect receipts',
@@ -6501,7 +6501,7 @@ const translations = {
65016501
overTripLimit: ({formattedLimit}: ViolationsOverLimitParams) => `Amount over ${formattedLimit}/trip limit`,
65026502
overLimitAttendee: ({formattedLimit}: ViolationsOverLimitParams) => `Amount over ${formattedLimit}/person limit`,
65036503
perDayLimit: ({formattedLimit}: ViolationsPerDayLimitParams) => `Amount over daily ${formattedLimit}/person category limit`,
6504-
receiptNotSmartScanned: 'Receipt and expense details added manually. <a href="https://help.expensify.com/articles/expensify-classic/reports/Automatic-Receipt-Audit">Learn more</a>.',
6504+
receiptNotSmartScanned: 'Receipt and expense details added manually.',
65056505
receiptRequired: ({formattedLimit, category}: ViolationsReceiptRequiredParams) => {
65066506
let message = 'Receipt required';
65076507
if (formattedLimit ?? category) {

src/languages/es.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4875,8 +4875,8 @@ const translations = {
48754875
updateTaxCodeFailureMessage: 'Se produjo un error al actualizar el código tributario, inténtelo nuevamente',
48764876
},
48774877
emptyWorkspace: {
4878-
title: 'Crea un espacio de trabajo',
4879-
subtitle: 'Crea un espacio de trabajo para organizar recibos, reembolsar gastos, gestionar viajes, enviar facturas y mucho más, todo a la velocidad del chat.',
4878+
title: 'No tienes espacios de trabajo',
4879+
subtitle: 'Organiza recibos, reembolsa gastos, gestiona viajes, envía facturas y mucho más.',
48804880
createAWorkspaceCTA: 'Comenzar',
48814881
features: {
48824882
trackAndCollect: 'Organiza recibos',
@@ -6986,8 +6986,7 @@ const translations = {
69866986
overTripLimit: ({formattedLimit}: ViolationsOverLimitParams) => `Importe supera el límite${formattedLimit ? ` de ${formattedLimit}/viaje` : ''}`,
69876987
overLimitAttendee: ({formattedLimit}: ViolationsOverLimitParams) => `Importe supera el límite${formattedLimit ? ` de ${formattedLimit}/persona` : ''}`,
69886988
perDayLimit: ({formattedLimit}: ViolationsPerDayLimitParams) => `Importe supera el límite diario de la categoría${formattedLimit ? ` de ${formattedLimit}/persona` : ''}`,
6989-
receiptNotSmartScanned:
6990-
'Detalles del recibo y del gasto añadidos manualmente. <a href="https://help.expensify.com/articles/expensify-classic/reports/Automatic-Receipt-Audit">Aprende más</a>.',
6989+
receiptNotSmartScanned: 'Detalles del recibo y del gasto añadidos manualmente.',
69916990
receiptRequired: ({formattedLimit, category}: ViolationsReceiptRequiredParams) => {
69926991
let message = 'Recibo obligatorio';
69936992
if (formattedLimit ?? category) {

src/languages/fr.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4898,8 +4898,8 @@ const translations = {
48984898
updateTaxCodeFailureMessage: "Une erreur s'est produite lors de la mise à jour du code fiscal, veuillez réessayer.",
48994899
},
49004900
emptyWorkspace: {
4901-
title: 'Créer un espace de travail',
4902-
subtitle: 'Créez un espace de travail pour suivre les reçus, rembourser les dépenses, gérer les voyages, envoyer des factures, et plus encore — le tout à la vitesse du chat.',
4901+
title: "Vous n'avez aucun espace de travail",
4902+
subtitle: 'Suivez les reçus, remboursez les dépenses, gérez les déplacements, envoyez des factures, et plus encore.',
49034903
createAWorkspaceCTA: 'Commencer',
49044904
features: {
49054905
trackAndCollect: 'Suivre et collecter les reçus',
@@ -6542,8 +6542,7 @@ const translations = {
65426542
overTripLimit: ({formattedLimit}: ViolationsOverLimitParams) => `Montant supérieur à la limite de ${formattedLimit}/voyage`,
65436543
overLimitAttendee: ({formattedLimit}: ViolationsOverLimitParams) => `Montant au-delà de la limite de ${formattedLimit}/personne`,
65446544
perDayLimit: ({formattedLimit}: ViolationsPerDayLimitParams) => `Montant dépassant la limite quotidienne de ${formattedLimit}/personne pour la catégorie`,
6545-
receiptNotSmartScanned:
6546-
'Reçu et détails de la dépense ajoutés manuellement. <a href="https://help.expensify.com/articles/expensify-classic/reports/Automatic-Receipt-Audit">En savoir plus</a>.',
6545+
receiptNotSmartScanned: 'Reçu et détails de la dépense ajoutés manuellement.',
65476546
receiptRequired: ({formattedLimit, category}: ViolationsReceiptRequiredParams) => {
65486547
let message = 'Reçu requis';
65496548
if (formattedLimit ?? category) {

src/languages/it.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4897,8 +4897,8 @@ const translations = {
48974897
updateTaxCodeFailureMessage: "Si è verificato un errore durante l'aggiornamento del codice fiscale, riprova.",
48984898
},
48994899
emptyWorkspace: {
4900-
title: "Crea un'area di lavoro",
4901-
subtitle: 'Crea uno spazio di lavoro per tracciare le ricevute, rimborsare le spese, gestire i viaggi, inviare fatture e altro ancora, tutto alla velocità della chat.',
4900+
title: 'Non hai spazi di lavoro',
4901+
subtitle: 'Traccia ricevute, rimborsa spese, gestisci viaggi, invia fatture e altro ancora.',
49024902
createAWorkspaceCTA: 'Inizia',
49034903
features: {
49044904
trackAndCollect: 'Traccia e raccogli ricevute',
@@ -6544,8 +6544,7 @@ const translations = {
65446544
overTripLimit: ({formattedLimit}: ViolationsOverLimitParams) => `Importo superiore al limite di ${formattedLimit}/viaggio`,
65456545
overLimitAttendee: ({formattedLimit}: ViolationsOverLimitParams) => `Importo oltre il limite di ${formattedLimit}/persona`,
65466546
perDayLimit: ({formattedLimit}: ViolationsPerDayLimitParams) => `Importo oltre il limite giornaliero ${formattedLimit}/persona per categoria`,
6547-
receiptNotSmartScanned:
6548-
'Ricevuta e dettagli della spesa aggiunti manualmente. <a href="https://help.expensify.com/articles/expensify-classic/reports/Automatic-Receipt-Audit">Scopri di più</a>.',
6547+
receiptNotSmartScanned: 'Ricevuta e dettagli della spesa aggiunti manualmente.',
65496548
receiptRequired: ({formattedLimit, category}: ViolationsReceiptRequiredParams) => {
65506549
let message = 'Ricevuta richiesta';
65516550
if (formattedLimit ?? category) {

0 commit comments

Comments
 (0)