diff --git a/cspell.json b/cspell.json index 07b8cebe6eb5..43d210721c86 100644 --- a/cspell.json +++ b/cspell.json @@ -1111,6 +1111,7 @@ "unflushed", "unheld", "unhold", + "unholding", "unimodules", "uninstallations", "unminified", diff --git a/src/CONST/index.ts b/src/CONST/index.ts index a295f031849a..7ab16821953b 100644 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -646,6 +646,14 @@ const CONST = { RECEIPTS: 'receipts', }, }, + BULK_ACTION: { + STATE: { + RUNNING: 'running', + DONE: 'done', + FAILED: 'failed', + }, + DELETE_EXPENSES: 'deleteExpenses', + }, SECURE_DOWNLOAD_TYPE: { CSV_EXPORT: 'csvexport', diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index 3e1c1496626d..e5e98b03b665 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -955,6 +955,7 @@ const ONYXKEYS = { DOMAIN: 'domain_', DOWNLOAD: 'download_', EXPORT_DOWNLOAD: 'nvp_exportDownload_', + BULK_ACTION: 'nvp_bulkAction_', POLICY: 'policy_', POLICY_DRAFTS: 'policyDrafts_', POLICY_JOIN_MEMBER: 'policyJoinMember_', @@ -1613,6 +1614,7 @@ type OnyxCollectionValuesMapping = { [ONYXKEYS.COLLECTION.DOMAIN]: OnyxTypes.Domain; [ONYXKEYS.COLLECTION.DOWNLOAD]: OnyxTypes.Download; [ONYXKEYS.COLLECTION.EXPORT_DOWNLOAD]: OnyxTypes.ExportDownload; + [ONYXKEYS.COLLECTION.BULK_ACTION]: OnyxTypes.BulkAction; [ONYXKEYS.COLLECTION.POLICY]: OnyxTypes.Policy; [ONYXKEYS.COLLECTION.POLICY_DRAFTS]: OnyxTypes.Policy; [ONYXKEYS.COLLECTION.RULE]: OnyxTypes.Rule; diff --git a/src/components/BulkActionStatusManager.tsx b/src/components/BulkActionStatusManager.tsx new file mode 100644 index 000000000000..2902f39e6671 --- /dev/null +++ b/src/components/BulkActionStatusManager.tsx @@ -0,0 +1,75 @@ +import useOnyx from '@hooks/useOnyx'; + +import {clearBulkAction, wasBulkActionInitiatedLocally} from '@libs/actions/BulkAction'; + +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; + +import {isModalActiveSelector} from '@selectors/Modal'; +import React, {useState} from 'react'; + +import BulkActionStatusModal from './BulkActionStatusModal'; + +/** Shows the status modal for a bulk action started from Search "Select all", and brings it back after a reload. */ +function BulkActionStatusManager() { + const [bulkActions, bulkActionsMetadata] = useOnyx(ONYXKEYS.COLLECTION.BULK_ACTION); + const [openBulkActionID, setOpenBulkActionID] = useState(); + const [isAnyOtherModalActive] = useOnyx(ONYXKEYS.MODAL, {selector: isModalActiveSelector}); + + // A record that already existed when this tab loaded resurfaces after a reload. One started in another tab + // after that doesn't pop open here until this tab reloads. + const [recordKeysAtLoad, setRecordKeysAtLoad] = useState | undefined>(undefined); + if (recordKeysAtLoad === undefined && bulkActionsMetadata.status === 'loaded') { + setRecordKeysAtLoad(new Set(Object.keys(bulkActions ?? {}))); + } + + const [surfaceableKey] = + Object.entries(bulkActions ?? {}).find(([key, bulkAction]) => { + // Concierge messages the result, so there is nothing to show here. + if (!bulkAction || bulkAction.shouldSendFromConcierge) { + return false; + } + return !!recordKeysAtLoad?.has(key) || wasBulkActionInitiatedLocally(key.replace(ONYXKEYS.COLLECTION.BULK_ACTION, '')); + }) ?? []; + const surfaceableBulkActionID = surfaceableKey?.replace(ONYXKEYS.COLLECTION.BULK_ACTION, ''); + + // Keep the modal open through the switch to shouldSendFromConcierge, and close it once the record is gone. + // The menu that started the bulk action may still be closing, and iOS can't open a modal on top of it. + if (!openBulkActionID && surfaceableBulkActionID && !isAnyOtherModalActive) { + setOpenBulkActionID(surfaceableBulkActionID); + } + if (openBulkActionID && !bulkActions?.[`${ONYXKEYS.COLLECTION.BULK_ACTION}${openBulkActionID}`]) { + setOpenBulkActionID(undefined); + } + + if (!openBulkActionID) { + return null; + } + + const bulkAction = bulkActions?.[`${ONYXKEYS.COLLECTION.BULK_ACTION}${openBulkActionID}`]; + if (!bulkAction) { + return null; + } + + const handleClose = () => { + if (bulkAction.shouldSendFromConcierge) { + setOpenBulkActionID(undefined); + return; + } + if (bulkAction.state === CONST.BULK_ACTION.STATE.RUNNING) { + return; + } + clearBulkAction(openBulkActionID, bulkAction); + setOpenBulkActionID(undefined); + }; + + return ( + + ); +} + +export default BulkActionStatusManager; diff --git a/src/components/BulkActionStatusModal.tsx b/src/components/BulkActionStatusModal.tsx new file mode 100644 index 000000000000..fa3b64b8ba94 --- /dev/null +++ b/src/components/BulkActionStatusModal.tsx @@ -0,0 +1,264 @@ +import useBottomSafeSafeAreaPaddingStyle from '@hooks/useBottomSafeSafeAreaPaddingStyle'; +import useLocalize from '@hooks/useLocalize'; +import useOnyx from '@hooks/useOnyx'; +import useOpenConciergeAnywhere from '@hooks/useOpenConciergeAnywhere'; +import usePreviousDefined from '@hooks/usePreviousDefined'; +import useResponsiveLayout from '@hooks/useResponsiveLayout'; +import useThemeStyles from '@hooks/useThemeStyles'; + +import Navigation from '@libs/Navigation/Navigation'; +import {buildSearchQueryJSON, buildSearchQueryString} from '@libs/SearchQueryUtils'; + +import {sendBulkActionSummaryFromConcierge} from '@userActions/BulkAction'; +import {close} from '@userActions/Modal'; + +import CONST from '@src/CONST'; +import type {TranslationPaths} from '@src/languages/types'; +import ONYXKEYS from '@src/ONYXKEYS'; +import ROUTES from '@src/ROUTES'; +import type {BulkActionType} from '@src/types/onyx/BulkAction'; + +import React from 'react'; +import {View} from 'react-native'; + +import ActivityIndicator from './ActivityIndicator'; +import Button from './Button'; +import Modal from './Modal'; +import Text from './Text'; + +const RUNNING_TITLES = { + [CONST.SEARCH.BULK_ACTION_TYPES.APPROVE]: 'bulkAction.approvingTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.SUBMIT]: 'bulkAction.submittingTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.PAY]: 'bulkAction.payingTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.HOLD]: 'bulkAction.holdingTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.UNHOLD]: 'bulkAction.unholdingTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.REJECT]: 'bulkAction.rejectingTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.DELETE]: 'bulkAction.deletingTitle', + [CONST.BULK_ACTION.DELETE_EXPENSES]: 'bulkAction.deletingExpensesTitle', +} as const satisfies Record; + +const DONE_TITLES = { + [CONST.SEARCH.BULK_ACTION_TYPES.APPROVE]: 'bulkAction.approvedTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.SUBMIT]: 'bulkAction.submittedTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.PAY]: 'bulkAction.paidTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.HOLD]: 'bulkAction.heldTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.UNHOLD]: 'bulkAction.unheldTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.REJECT]: 'bulkAction.rejectedTitle', + [CONST.SEARCH.BULK_ACTION_TYPES.DELETE]: 'bulkAction.deletedTitle', + [CONST.BULK_ACTION.DELETE_EXPENSES]: 'bulkAction.deletedExpensesTitle', +} as const satisfies Record; + +const FAILED_BODIES = { + [CONST.SEARCH.BULK_ACTION_TYPES.APPROVE]: 'bulkAction.notApprovedBody', + [CONST.SEARCH.BULK_ACTION_TYPES.SUBMIT]: 'bulkAction.notSubmittedBody', + [CONST.SEARCH.BULK_ACTION_TYPES.PAY]: 'bulkAction.notPaidBody', + [CONST.SEARCH.BULK_ACTION_TYPES.HOLD]: 'bulkAction.notHeldBody', + [CONST.SEARCH.BULK_ACTION_TYPES.UNHOLD]: 'bulkAction.notUnheldBody', + [CONST.SEARCH.BULK_ACTION_TYPES.REJECT]: 'bulkAction.notRejectedBody', + [CONST.SEARCH.BULK_ACTION_TYPES.DELETE]: 'bulkAction.notDeletedBody', + [CONST.BULK_ACTION.DELETE_EXPENSES]: 'bulkAction.expensesNotDeletedBody', +} as const satisfies Record; + +type BulkActionRunningProps = { + /** The action that is running */ + action: BulkActionType | undefined; + + /** Callback when the user asks Concierge to send the result */ + onSendFromConcierge: () => void; +}; + +function BulkActionRunning({action, onSendFromConcierge}: BulkActionRunningProps) { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + + return ( + <> + + {translate(RUNNING_TITLES[action ?? CONST.SEARCH.BULK_ACTION_TYPES.PAY])} + + + {translate('bulkAction.runningBody')} + + + ); +} + +type BulkActionConciergeProps = { + /** Callback when the modal is closed */ + onClose: () => void; +}; + +function BulkActionConcierge({onClose}: BulkActionConciergeProps) { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + const {openConciergeAnywhere} = useOpenConciergeAnywhere(); + + return ( + <> + {translate('bulkAction.conciergeTitle')} + {translate('bulkAction.conciergeBody')} + + + + ); +} + +type BulkActionDoneProps = { + /** The action that finished */ + action: BulkActionType | undefined; + + /** How many reports the action ran on */ + total: number; + + /** The reports the action couldn't update */ + failedReportIDs: string[]; + + /** Callback when the modal is closed */ + onClose: () => void; +}; + +function BulkActionDone({action, total, failedReportIDs, onClose}: BulkActionDoneProps) { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + const doneTitle = + total === 0 + ? translate('bulkAction.noReportsTitle') + : translate(DONE_TITLES[action ?? CONST.SEARCH.BULK_ACTION_TYPES.PAY], {doneCount: total - failedReportIDs.length, count: total}); + + const viewFailedReports = () => { + const queryJSON = buildSearchQueryJSON(`type:${CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT} ${CONST.SEARCH.SYNTAX_FILTER_KEYS.REPORT_ID}:${failedReportIDs.join(',')}`); + if (!queryJSON) { + onClose(); + return; + } + + // close() runs the modal's onClose, which clears the record. + close(() => Navigation.navigate(ROUTES.SEARCH_ROOT.getRoute({query: buildSearchQueryString(queryJSON)}))); + }; + + return ( + <> + 0 ? styles.mb2 : styles.mb5]}>{doneTitle} + {total === 0 && {translate('bulkAction.noReportsBody')}} + {failedReportIDs.length > 0 && ( + <> + {translate(FAILED_BODIES[action ?? CONST.SEARCH.BULK_ACTION_TYPES.PAY], {count: failedReportIDs.length})} + + + )} + + + ); +} + +type BulkActionFailedProps = { + /** Callback when the modal is closed */ + onClose: () => void; +}; + +function BulkActionFailed({onClose}: BulkActionFailedProps) { + const styles = useThemeStyles(); + const {translate} = useLocalize(); + + return ( + <> + {translate('bulkAction.failedTitle')} + {translate('bulkAction.failedBody')} + + + ); +} + +type BulkActionStatusModalProps = { + /** The bulk action ID to subscribe to */ + bulkActionID: string; + + /** Callback when the modal is closed */ + onClose: () => void; +}; + +/** Shows the progress and result of a bulk action started from Search "Select all". */ +function BulkActionStatusModal({bulkActionID, onClose}: BulkActionStatusModalProps) { + const styles = useThemeStyles(); + // isSmallScreenWidth is needed here because the modal type depends on actual screen width, not layout mode + // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth + const {isSmallScreenWidth} = useResponsiveLayout(); + const bottomSafeAreaPaddingStyle = useBottomSafeSafeAreaPaddingStyle({addBottomSafeAreaPadding: isSmallScreenWidth, addOfflineIndicatorBottomSafeAreaPadding: false, style: styles.m5}); + + const [bulkAction] = useOnyx(`${ONYXKEYS.COLLECTION.BULK_ACTION}${bulkActionID}`); + const displayedBulkAction = usePreviousDefined(bulkAction); + if (!bulkAction && !!displayedBulkAction) { + return null; + } + + const state = displayedBulkAction?.state; + const action = displayedBulkAction?.action; + const shouldSendFromConcierge = !!displayedBulkAction?.shouldSendFromConcierge; + const isRunning = state === CONST.BULK_ACTION.STATE.RUNNING && !shouldSendFromConcierge; + const isConcierge = shouldSendFromConcierge && state !== CONST.BULK_ACTION.STATE.DONE; + + return ( + {} : onClose} + onBackdropPress={isRunning ? () => {} : undefined} + shouldTreatModalAsCovering + type={isSmallScreenWidth ? CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED : CONST.MODAL.MODAL_TYPE.CONFIRM} + innerContainerStyle={styles.pv0} + enableEdgeToEdgeBottomSafeAreaPadding + > + + {isRunning && ( + sendBulkActionSummaryFromConcierge(bulkActionID, displayedBulkAction ?? undefined)} + /> + )} + {isConcierge && } + {state === CONST.BULK_ACTION.STATE.DONE && ( + + )} + {!isConcierge && state === CONST.BULK_ACTION.STATE.FAILED && } + + + ); +} + +export default BulkActionStatusModal; diff --git a/src/languages/de.ts b/src/languages/de.ts index aff85e69838e..91bbdece84d2 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -12126,6 +12126,90 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`, errorTitle: 'Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut', errorPrompt: 'Anscheinend hat etwas nicht funktioniert. Bitte versuchen Sie es erneut. Wenn das Problem weiterhin besteht, wenden Sie sich bitte an Concierge.', }, + bulkAction: { + approvingTitle: 'Berichte werden genehmigt …', + submittingTitle: 'Berichte werden eingereicht …', + payingTitle: 'Berichte werden als bezahlt markiert …', + holdingTitle: 'Ausgaben werden zurückgehalten …', + unholdingTitle: 'Zurückhalten von Ausgaben wird aufgehoben …', + rejectingTitle: 'Ausgaben werden abgelehnt …', + deletingTitle: 'Berichte werden gelöscht …', + deletingExpensesTitle: 'Ausgaben werden gelöscht …', + runningBody: 'Warten Sie ein paar Minuten, oder Concierge kann Sie benachrichtigen, wenn es fertig ist.', + sendFromConcierge: 'Mir eine Nachricht senden, wenn es fertig ist', + conciergeTitle: 'Auf jeden Fall!', + conciergeBody: 'Concierge wird Ihnen eine Nachricht senden, sobald es fertig ist.', + goToConcierge: 'Zu Concierge', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${doneCount} von ${count} Bericht genehmigt`, + other: `${doneCount} von ${count} Berichte genehmigt`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${doneCount} von ${count} Bericht eingereicht`, + other: `${doneCount} von ${count} Berichte eingereicht`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${doneCount} von ${count} Bericht als bezahlt markiert`, + other: `${doneCount} von ${count} Berichte als bezahlt markiert`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Ausgaben in ${doneCount} von ${count} Bericht zurückgehalten`, + other: `Ausgaben in ${doneCount} von ${count} Berichten zurückgehalten`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Zurückhalten von Ausgaben in ${doneCount} von ${count} Bericht aufgehoben`, + other: `Zurückhalten von Ausgaben in ${doneCount} von ${count} Berichten aufgehoben`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Ausgaben in ${doneCount} von ${count} Bericht abgelehnt`, + other: `Ausgaben in ${doneCount} von ${count} Berichten abgelehnt`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${doneCount} von ${count} Bericht gelöscht`, + other: `${doneCount} von ${count} Berichte gelöscht`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Ausgaben in ${doneCount} von ${count} Bericht gelöscht`, + other: `Ausgaben in ${doneCount} von ${count} Berichten gelöscht`, + }), + noReportsTitle: 'Keine übereinstimmenden Berichte', + noReportsBody: 'Keiner der von Ihnen ausgewählten Berichte benötigte diese Aktion.', + viewFailedReports: 'Berichte anzeigen', + failedTitle: 'Es ist ein Fehler aufgetreten', + failedBody: 'Diese Aktion konnte nicht gestartet werden. Bitte versuchen Sie es später noch einmal.', + notApprovedBody: ({count}: {count: number}) => ({ + one: '1 Bericht konnte nicht genehmigt werden.', + other: `${count} Berichte konnten nicht genehmigt werden.`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: '1 Bericht konnte nicht eingereicht werden.', + other: `${count} Berichte konnten nicht eingereicht werden.`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: '1 Bericht konnte nicht bezahlt werden.', + other: `${count} Berichte konnten nicht bezahlt werden.`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: 'Ausgaben in 1 Bericht konnten nicht zurückgehalten werden.', + other: `Ausgaben in ${count} Berichten konnten nicht zurückgehalten werden.`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: 'Das Zurückhalten von Ausgaben in 1 Bericht konnte nicht aufgehoben werden.', + other: `Das Zurückhalten von Ausgaben in ${count} Berichten konnte nicht aufgehoben werden.`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: 'Ausgaben in 1 Bericht konnten nicht abgelehnt werden.', + other: `Ausgaben in ${count} Berichten konnten nicht abgelehnt werden.`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: '1 Bericht konnte nicht gelöscht werden.', + other: `${count} Berichte konnten nicht gelöscht werden.`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: 'Ausgaben in 1 Bericht konnten nicht gelöscht werden.', + other: `Ausgaben in ${count} Berichten konnten nicht gelöscht werden.`, + }), + }, earlyRenewal: { confirmationDescription: ({startDate, endDate}: {startDate: string; endDate: string}) => `Verlängern Sie Ihr Abonnement für einen Zeitraum von 12 Monaten, von ${startDate} bis ${endDate}.`, diff --git a/src/languages/el.ts b/src/languages/el.ts index cda27383978a..a11bfd090e80 100644 --- a/src/languages/el.ts +++ b/src/languages/el.ts @@ -12353,6 +12353,90 @@ ${reportName}`, employeePays: 'Ο εργαζόμενος πληρώνει', errorMessage: 'Δεν ήταν δυνατή η αλλαγή της προτίμησης χρέωσης μετατροπής νομίσματος. Παρακαλούμε δοκιμάστε ξανά ή επικοινωνήστε με την υποστήριξη.', }, + bulkAction: { + approvingTitle: 'Γίνεται έγκριση αναφορών...', + submittingTitle: 'Υποβολή αναφορών...', + payingTitle: 'Σημειώνονται οι αναφορές ως πληρωμένες...', + holdingTitle: 'Τα έξοδα τίθενται σε αναμονή...', + unholdingTitle: 'Αφαιρείται η κράτηση των εξόδων...', + rejectingTitle: 'Απόρριψη εξόδων...', + deletingTitle: 'Γίνεται διαγραφή αναφορών...', + deletingExpensesTitle: 'Γίνεται διαγραφή εξόδων...', + runningBody: 'Περιμένετε μερικά λεπτά ή αφήστε το Concierge να σας στείλει μήνυμα όταν ολοκληρωθεί.', + sendFromConcierge: 'Στείλτε μου μήνυμα όταν τελειώσει', + conciergeTitle: 'Βεβαίως!', + conciergeBody: 'Ο Concierge θα σας στείλει μήνυμα όταν ολοκληρωθεί.', + goToConcierge: 'Μετάβαση στο Concierge', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Εγκρίθηκαν ${doneCount} από ${count} αναφορά`, + other: `Εγκρίθηκαν ${doneCount} από ${count} αναφορές`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Υποβλήθηκαν ${doneCount} από ${count} αναφορά`, + other: `Υποβλήθηκαν ${doneCount} από ${count} αναφορές`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Σημειώθηκαν ως πληρωμένες ${doneCount} από ${count} αναφορά`, + other: `Σημειώθηκαν ως πληρωμένες ${doneCount} από ${count} αναφορές`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Τέθηκαν σε αναμονή έξοδα σε ${doneCount} από ${count} αναφορά`, + other: `Τέθηκαν σε αναμονή έξοδα σε ${doneCount} από ${count} αναφορές`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Αφαιρέθηκε η κράτηση εξόδων σε ${doneCount} από ${count} αναφορά`, + other: `Αφαιρέθηκε η κράτηση εξόδων σε ${doneCount} από ${count} αναφορές`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Απορρίφθηκαν έξοδα σε ${doneCount} από ${count} αναφορά`, + other: `Απορρίφθηκαν έξοδα σε ${doneCount} από ${count} αναφορές`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Διαγράφηκαν ${doneCount} από ${count} αναφορά`, + other: `Διαγράφηκαν ${doneCount} από ${count} αναφορές`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Διαγράφηκαν έξοδα σε ${doneCount} από ${count} αναφορά`, + other: `Διαγράφηκαν έξοδα σε ${doneCount} από ${count} αναφορές`, + }), + noReportsTitle: 'Δεν υπάρχουν αντιστοιχίες αναφορών', + noReportsBody: 'Καμία από τις αναφορές που επιλέξατε δεν χρειαζόταν αυτή την ενέργεια.', + viewFailedReports: 'Προβολή αναφορών', + failedTitle: 'Κάτι πήγε στραβά', + failedBody: 'Αυτή η ενέργεια δεν μπόρεσε να ξεκινήσει. Παρακαλούμε δοκιμάστε ξανά αργότερα.', + notApprovedBody: ({count}: {count: number}) => ({ + one: '1 αναφορά δεν μπόρεσε να εγκριθεί.', + other: `${count} αναφορές δεν ήταν δυνατό να εγκριθούν.`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: '1 αναφορά δεν μπόρεσε να υποβληθεί.', + other: `${count} αναφορές δεν ήταν δυνατό να υποβληθούν.`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: '1 αναφορά δεν μπόρεσε να πληρωθεί.', + other: `${count} αναφορές δεν ήταν δυνατό να πληρωθούν.`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: 'Τα έξοδα σε 1 αναφορά δεν ήταν δυνατό να τεθούν σε αναμονή.', + other: `Τα έξοδα σε ${count} αναφορές δεν ήταν δυνατό να τεθούν σε αναμονή.`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: 'Τα έξοδα σε 1 αναφορά δεν ήταν δυνατό να αφαιρεθούν από την αναμονή.', + other: `Τα έξοδα σε ${count} αναφορές δεν ήταν δυνατό να αφαιρεθούν από την αναμονή.`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: 'Τα έξοδα σε 1 αναφορά δεν ήταν δυνατό να απορριφθούν.', + other: `Τα έξοδα σε ${count} αναφορές δεν ήταν δυνατό να απορριφθούν.`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: '1 αναφορά δεν μπόρεσε να διαγραφεί.', + other: `${count} αναφορές δεν ήταν δυνατό να διαγραφούν.`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: 'Τα έξοδα σε 1 αναφορά δεν ήταν δυνατό να διαγραφούν.', + other: `Τα έξοδα σε ${count} αναφορές δεν ήταν δυνατό να διαγραφούν.`, + }), + }, emailIssuePage: { title: 'Πρόβλημα email', intro: (login: string) => `Ο πάροχος email μας διέκοψε την αποστολή προς τη διεύθυνση ${login} λόγω προβλημάτων παράδοσης. Για να διορθώσετε αυτό το ζήτημα:`, diff --git a/src/languages/en.ts b/src/languages/en.ts index 237106085e90..030b4e075b98 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -12136,6 +12136,90 @@ const translations = { `${count} of ${total} reports exported. If it didn't automatically download, use the button below. See which reports failed in Concierge.`, close: 'Close', }, + bulkAction: { + approvingTitle: 'Approving reports...', + submittingTitle: 'Submitting reports...', + payingTitle: 'Marking reports as paid...', + holdingTitle: 'Holding expenses...', + unholdingTitle: 'Unholding expenses...', + rejectingTitle: 'Rejecting expenses...', + deletingTitle: 'Deleting reports...', + deletingExpensesTitle: 'Deleting expenses...', + runningBody: "Wait a few minutes, or Concierge can message you when it's done.", + sendFromConcierge: "Message me when it's done", + conciergeTitle: 'You bet!', + conciergeBody: "Concierge will message you when it's done.", + goToConcierge: 'Go to Concierge', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Approved ${doneCount} of ${count} report`, + other: `Approved ${doneCount} of ${count} reports`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Submitted ${doneCount} of ${count} report`, + other: `Submitted ${doneCount} of ${count} reports`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Marked ${doneCount} of ${count} report as paid`, + other: `Marked ${doneCount} of ${count} reports as paid`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Held expenses on ${doneCount} of ${count} report`, + other: `Held expenses on ${doneCount} of ${count} reports`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Unheld expenses on ${doneCount} of ${count} report`, + other: `Unheld expenses on ${doneCount} of ${count} reports`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Rejected expenses on ${doneCount} of ${count} report`, + other: `Rejected expenses on ${doneCount} of ${count} reports`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Deleted ${doneCount} of ${count} report`, + other: `Deleted ${doneCount} of ${count} reports`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Deleted expenses on ${doneCount} of ${count} report`, + other: `Deleted expenses on ${doneCount} of ${count} reports`, + }), + noReportsTitle: 'No matching reports', + noReportsBody: 'None of the reports you selected needed this action.', + notApprovedBody: ({count}: {count: number}) => ({ + one: "1 report couldn't be approved.", + other: `${count} reports couldn't be approved.`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: "1 report couldn't be submitted.", + other: `${count} reports couldn't be submitted.`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: "1 report couldn't be paid.", + other: `${count} reports couldn't be paid.`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: "Expenses on 1 report couldn't be held.", + other: `Expenses on ${count} reports couldn't be held.`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: "Expenses on 1 report couldn't be unheld.", + other: `Expenses on ${count} reports couldn't be unheld.`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: "Expenses on 1 report couldn't be rejected.", + other: `Expenses on ${count} reports couldn't be rejected.`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: "1 report couldn't be deleted.", + other: `${count} reports couldn't be deleted.`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: "Expenses on 1 report couldn't be deleted.", + other: `Expenses on ${count} reports couldn't be deleted.`, + }), + viewFailedReports: 'View reports', + failedTitle: 'Something went wrong', + failedBody: 'This action could not be started. Please try again later.', + }, domain: { notVerified: 'Not verified', retry: 'Retry', diff --git a/src/languages/es.ts b/src/languages/es.ts index d7ad5a7a7bd2..9e0e2df3bb52 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -12389,6 +12389,90 @@ ${reportName}`, errorTitle: 'Algo salió mal. Por favor, inténtalo de nuevo.', errorPrompt: 'Parece que algo no ha funcionado. Por favor, inténtalo de nuevo. Si el problema persiste, ponte en contacto con Concierge.', }, + bulkAction: { + approvingTitle: 'Aprobando informes...', + submittingTitle: 'Enviando informes...', + payingTitle: 'Marcando informes como pagados...', + holdingTitle: 'Reteniendo gastos...', + unholdingTitle: 'Desbloqueando gastos...', + rejectingTitle: 'Rechazando gastos...', + deletingTitle: 'Eliminando informes...', + deletingExpensesTitle: 'Eliminando gastos...', + runningBody: 'Espera unos minutos o deja que Concierge te envíe un mensaje cuando termine.', + sendFromConcierge: 'Envíame un mensaje cuando esté listo', + conciergeTitle: '¡Por supuesto!', + conciergeBody: 'Concierge te enviará un mensaje cuando haya terminado.', + goToConcierge: 'Ir a Concierge', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Aprobados ${doneCount} de ${count} informe`, + other: `Aprobados ${doneCount} de ${count} informes`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Enviados ${doneCount} de ${count} informe`, + other: `Enviados ${doneCount} de ${count} informes`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Marcados ${doneCount} de ${count} informe como pagados`, + other: `Marcados ${doneCount} de ${count} informes como pagados`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Gastos retenidos en ${doneCount} de ${count} informe`, + other: `Gastos retenidos en ${doneCount} de ${count} informes`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Gastos desbloqueados en ${doneCount} de ${count} informe`, + other: `Gastos desbloqueados en ${doneCount} de ${count} informes`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Gastos rechazados en ${doneCount} de ${count} informe`, + other: `Gastos rechazados en ${doneCount} de ${count} informes`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Eliminados ${doneCount} de ${count} informe`, + other: `Eliminados ${doneCount} de ${count} informes`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Gastos eliminados en ${doneCount} de ${count} informe`, + other: `Gastos eliminados en ${doneCount} de ${count} informes`, + }), + noReportsTitle: 'No hay informes coincidentes', + noReportsBody: 'Ninguno de los informes que seleccionaste necesitaba esta acción.', + viewFailedReports: 'Ver informes', + failedTitle: 'Algo salió mal', + failedBody: 'No se pudo iniciar esta acción. Por favor, inténtalo de nuevo más tarde.', + notApprovedBody: ({count}: {count: number}) => ({ + one: 'No se pudo aprobar 1 informe.', + other: `No se pudieron aprobar ${count} informes.`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: 'No se pudo enviar 1 informe.', + other: `No se pudieron enviar ${count} informes.`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: 'No se pudo pagar 1 informe.', + other: `No se pudieron pagar ${count} informes.`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: 'No se pudieron retener los gastos en 1 informe.', + other: `No se pudieron retener los gastos en ${count} informes.`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: 'No se pudieron desbloquear los gastos de 1 informe.', + other: `No se pudieron desbloquear los gastos en ${count} informes.`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: 'No se pudieron rechazar los gastos en 1 informe.', + other: `No se pudieron rechazar los gastos en ${count} informes.`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: 'No se pudo eliminar 1 informe.', + other: `No se pudieron eliminar ${count} informes.`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: 'Los gastos de 1 informe no se pudieron eliminar.', + other: `No se pudieron eliminar los gastos en ${count} informes.`, + }), + }, earlyRenewal: { confirmationDescription: ({startDate, endDate}: {startDate: string; endDate: string}) => `Renueva tu suscripción por un período de 12 meses, desde ${startDate} hasta ${endDate}.`, title: 'Renueva tu suscripción de Expensify', diff --git a/src/languages/fr.ts b/src/languages/fr.ts index a089625e7b51..be48cf878fbd 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -12160,6 +12160,90 @@ Voici un *reçu test* pour vous montrer comment ça fonctionne :`, errorTitle: 'Une erreur s’est produite. Veuillez réessayer.', errorPrompt: "Il semble que quelque chose n'ait pas fonctionné. Veuillez réessayer. Si le problème persiste, veuillez contacter Concierge.", }, + bulkAction: { + approvingTitle: 'Approbation des notes de frais...', + submittingTitle: 'Soumission des notes de frais...', + payingTitle: 'Marquage des notes de frais comme payées...', + holdingTitle: 'Mise en attente des dépenses...', + unholdingTitle: 'Suppression de la mise en attente des dépenses...', + rejectingTitle: 'Rejet des dépenses...', + deletingTitle: 'Suppression des notes de frais...', + deletingExpensesTitle: 'Suppression des dépenses...', + runningBody: 'Patientez quelques minutes, ou laissez Concierge vous envoyer un message lorsque ce sera terminé.', + sendFromConcierge: 'Envoyez-moi un message quand ce sera fait', + conciergeTitle: 'Bien sûr !', + conciergeBody: 'Concierge vous enverra un message lorsque ce sera terminé.', + goToConcierge: 'Aller à Concierge', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Approuvé ${doneCount} sur ${count} note de frais`, + other: `Approuvé ${doneCount} sur ${count} notes de frais`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Soumis ${doneCount} sur ${count} note de frais`, + other: `Soumis ${doneCount} sur ${count} notes de frais`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Marqué ${doneCount} sur ${count} note de frais comme payé`, + other: `Marqué ${doneCount} sur ${count} notes de frais comme payé`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Dépenses mises en attente pour ${doneCount} sur ${count} note de frais`, + other: `Dépenses mises en attente pour ${doneCount} sur ${count} notes de frais`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Mise en attente supprimée pour ${doneCount} sur ${count} note de frais`, + other: `Mise en attente supprimée pour ${doneCount} sur ${count} notes de frais`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Dépenses rejetées pour ${doneCount} sur ${count} note de frais`, + other: `Dépenses rejetées pour ${doneCount} sur ${count} notes de frais`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Supprimé ${doneCount} sur ${count} note de frais`, + other: `Supprimé ${doneCount} sur ${count} notes de frais`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Dépenses supprimées pour ${doneCount} sur ${count} note de frais`, + other: `Dépenses supprimées pour ${doneCount} sur ${count} notes de frais`, + }), + noReportsTitle: 'Aucune note de frais correspondante', + noReportsBody: 'Aucune des notes de frais que vous avez sélectionnées n’avait besoin de cette action.', + viewFailedReports: 'Afficher les notes de frais', + failedTitle: 'Un problème est survenu', + failedBody: 'Cette action n’a pas pu être démarrée. Veuillez réessayer plus tard.', + notApprovedBody: ({count}: {count: number}) => ({ + one: "1 note de frais n'a pas pu être approuvée.", + other: `${count} notes de frais n'ont pas pu être approuvées.`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: "1 note de frais n'a pas pu être soumise.", + other: `${count} notes de frais n'ont pas pu être soumises.`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: "1 note de frais n'a pas pu être payée.", + other: `${count} notes de frais n'ont pas pu être payées.`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: "Les dépenses de 1 note de frais n'ont pas pu être mises en attente.", + other: `Les dépenses de ${count} notes de frais n'ont pas pu être mises en attente.`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: "Les dépenses de 1 note de frais n'ont pas pu être retirées de l'attente.", + other: `Les dépenses de ${count} notes de frais n'ont pas pu être retirées de l'attente.`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: "Les dépenses de 1 note de frais n'ont pas pu être rejetées.", + other: `Les dépenses de ${count} notes de frais n'ont pas pu être rejetées.`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: "1 note de frais n'a pas pu être supprimée.", + other: `${count} notes de frais n'ont pas pu être supprimées.`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: "Les dépenses de 1 note de frais n'ont pas pu être supprimées.", + other: `Les dépenses de ${count} notes de frais n'ont pas pu être supprimées.`, + }), + }, earlyRenewal: { confirmationDescription: ({startDate, endDate}: {startDate: string; endDate: string}) => `Renouvelez votre abonnement pour une durée de 12 mois, du ${startDate} au ${endDate}.`, title: 'Renouvelez votre abonnement Expensify', diff --git a/src/languages/it.ts b/src/languages/it.ts index 6eb2a2e9909e..f568d712d84c 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -12078,6 +12078,90 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`, errorTitle: 'Qualcosa è andato storto. Riprova per favore', errorPrompt: 'Sembra che qualcosa non abbia funzionato. Riprova. Se il problema persiste, contatta Concierge.', }, + bulkAction: { + approvingTitle: 'Approvazione dei report in corso...', + submittingTitle: 'Invio dei report in corso...', + payingTitle: 'Contrassegno dei report come pagati in corso...', + holdingTitle: 'Messa in attesa delle spese in corso...', + unholdingTitle: 'Rimozione del blocco delle spese in corso...', + rejectingTitle: 'Rifiuto delle spese in corso...', + deletingTitle: 'Eliminazione dei report in corso...', + deletingExpensesTitle: 'Eliminazione delle spese in corso...', + runningBody: 'Aspetta qualche minuto oppure lascia che Concierge ti invii un messaggio quando ha finito.', + sendFromConcierge: 'Scrivimi quando hai finito', + conciergeTitle: 'Ci puoi contare!', + conciergeBody: 'Concierge ti manderà un messaggio quando avrà finito.', + goToConcierge: 'Vai a Concierge', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Approvati ${doneCount} su ${count} report`, + other: `Approvati ${doneCount} su ${count} report`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Inviati ${doneCount} su ${count} report`, + other: `Inviati ${doneCount} su ${count} report`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Contrassegnati ${doneCount} su ${count} report come pagati`, + other: `Contrassegnati ${doneCount} su ${count} report come pagati`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Spese messe in attesa in ${doneCount} su ${count} report`, + other: `Spese messe in attesa in ${doneCount} su ${count} report`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Blocco rimosso dalle spese in ${doneCount} su ${count} report`, + other: `Blocco rimosso dalle spese in ${doneCount} su ${count} report`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Spese rifiutate in ${doneCount} su ${count} report`, + other: `Spese rifiutate in ${doneCount} su ${count} report`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Eliminati ${doneCount} su ${count} report`, + other: `Eliminati ${doneCount} su ${count} report`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Spese eliminate in ${doneCount} su ${count} report`, + other: `Spese eliminate in ${doneCount} su ${count} report`, + }), + noReportsTitle: 'Nessun report corrispondente', + noReportsBody: 'Nessuno dei report che hai selezionato richiedeva questa azione.', + viewFailedReports: 'Visualizza report', + failedTitle: 'Qualcosa è andato storto', + failedBody: 'Questa azione non può essere avviata. Riprova più tardi.', + notApprovedBody: ({count}: {count: number}) => ({ + one: '1 report non può essere approvato.', + other: `${count} report non hanno potuto essere approvati.`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: '1 report non può essere inviato.', + other: `${count} report non hanno potuto essere inviati.`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: '1 report non può essere pagato.', + other: `${count} report non hanno potuto essere pagati.`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: 'Le spese di 1 report non hanno potuto essere messe in attesa.', + other: `Le spese di ${count} report non hanno potuto essere messe in attesa.`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: 'Le spese di 1 report non hanno potuto essere sbloccate.', + other: `Le spese di ${count} report non hanno potuto essere sbloccate.`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: 'Le spese di 1 report non hanno potuto essere rifiutate.', + other: `Le spese di ${count} report non hanno potuto essere rifiutate.`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: '1 report non può essere eliminato.', + other: `${count} report non hanno potuto essere eliminati.`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: 'Le spese di 1 report non hanno potuto essere eliminate.', + other: `Le spese di ${count} report non hanno potuto essere eliminate.`, + }), + }, earlyRenewal: { confirmationDescription: ({startDate, endDate}: {startDate: string; endDate: string}) => `Rinnova il tuo abbonamento per un periodo di 12 mesi, dal ${startDate} al ${endDate}.`, title: 'Rinnova il tuo abbonamento Expensify', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 58a13bfcc91e..745b198a98b3 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -11904,6 +11904,90 @@ ${reportName}`, errorTitle: '問題が発生しました。もう一度お試しください。', errorPrompt: '問題が発生したようです。もう一度お試しください。問題が解決しない場合は、Concierge までお問い合わせください。', }, + bulkAction: { + approvingTitle: 'レポートを承認しています…', + submittingTitle: 'レポートを送信しています…', + payingTitle: 'レポートを支払済みにしています…', + holdingTitle: '経費を保留にしています…', + unholdingTitle: '経費の保留を解除しています…', + rejectingTitle: '経費を却下しています…', + deletingTitle: 'レポートを削除しています…', + deletingExpensesTitle: '経費を削除しています…', + runningBody: '数分お待ちいただくか、完了したら Concierge からメッセージをお送りすることもできます。', + sendFromConcierge: '完了したらメッセージを送ってください', + conciergeTitle: 'もちろんです!', + conciergeBody: '完了したら Concierge からメッセージが届きます。', + goToConcierge: 'Concierge に移動', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${count} 件中 ${doneCount} 件のレポートを承認しました`, + other: `${count} 件中 ${doneCount} 件のレポートを承認しました`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${count} 件中 ${doneCount} 件のレポートを提出しました`, + other: `${count} 件中 ${doneCount} 件のレポートを提出しました`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${count} 件中 ${doneCount} 件のレポートを支払済みにしました`, + other: `${count} 件中 ${doneCount} 件のレポートを支払済みにしました`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${count} 件中 ${doneCount} 件のレポートの経費を保留にしました`, + other: `${count} 件中 ${doneCount} 件のレポートの経費を保留にしました`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${count} 件中 ${doneCount} 件のレポートの経費の保留を解除しました`, + other: `${count} 件中 ${doneCount} 件のレポートの経費の保留を解除しました`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${count} 件中 ${doneCount} 件のレポートの経費を却下しました`, + other: `${count} 件中 ${doneCount} 件のレポートの経費を却下しました`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${count} 件中 ${doneCount} 件のレポートを削除しました`, + other: `${count} 件中 ${doneCount} 件のレポートを削除しました`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${count} 件中 ${doneCount} 件のレポートの経費を削除しました`, + other: `${count} 件中 ${doneCount} 件のレポートの経費を削除しました`, + }), + noReportsTitle: '一致するレポートはありません', + noReportsBody: '選択したレポートには、いずれもこの操作は必要ありませんでした。', + viewFailedReports: 'レポートを表示', + failedTitle: '問題が発生しました', + failedBody: 'この操作を開始できませんでした。後でもう一度お試しください。', + notApprovedBody: ({count}: {count: number}) => ({ + one: '1件のレポートを承認できませんでした。', + other: `${count} 件のレポートを承認できませんでした。`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: '1件のレポートを提出できませんでした。', + other: `${count} 件のレポートを提出できませんでした。`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: '1件のレポートを支払済みにできませんでした。', + other: `${count} 件のレポートを支払済みにできませんでした。`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: '1件のレポートの経費を保留にできませんでした。', + other: `${count} 件のレポートの経費を保留にできませんでした。`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: '1件のレポートの経費の保留を解除できませんでした。', + other: `${count} 件のレポートの経費の保留を解除できませんでした。`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: '1件のレポートの経費を却下できませんでした。', + other: `${count} 件のレポートの経費を却下できませんでした。`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: '1件のレポートを削除できませんでした。', + other: `${count} 件のレポートを削除できませんでした。`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: '1件のレポートの経費を削除できませんでした。', + other: `${count} 件のレポートの経費を削除できませんでした。`, + }), + }, earlyRenewal: { confirmationDescription: ({startDate, endDate}: {startDate: string; endDate: string}) => `${startDate} から ${endDate} までの12か月契約でサブスクリプションを更新します。`, title: 'Expensify のサブスクリプションを更新する', diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 55d382cb1f87..c4c6dad4aa14 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -12039,6 +12039,90 @@ Hier is een *proefbon* om je te laten zien hoe het werkt:`, errorTitle: 'Er is iets misgegaan. Probeer het opnieuw.', errorPrompt: 'Het lijkt erop dat er iets misging. Probeer het opnieuw. Als het probleem blijft bestaan, neem dan contact op met Concierge.', }, + bulkAction: { + approvingTitle: 'Rapporten goedkeuren...', + submittingTitle: 'Rapporten worden ingediend...', + payingTitle: 'Rapporten markeren als betaald...', + holdingTitle: 'Uitgaven vasthouden...', + unholdingTitle: 'Blokkering van uitgaven opheffen...', + rejectingTitle: 'Uitgaven afwijzen...', + deletingTitle: 'Rapporten verwijderen...', + deletingExpensesTitle: 'Uitgaven verwijderen...', + runningBody: 'Wacht een paar minuten, of laat Concierge je een bericht sturen zodra het klaar is.', + sendFromConcierge: 'Stuur me een bericht als het klaar is', + conciergeTitle: 'Zeker weten!', + conciergeBody: 'Concierge stuurt je een bericht zodra het klaar is.', + goToConcierge: 'Ga naar Concierge', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${doneCount} van ${count} rapport goedgekeurd`, + other: `${doneCount} van ${count} rapporten goedgekeurd`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${doneCount} van ${count} rapport ingediend`, + other: `${doneCount} van ${count} rapporten ingediend`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${doneCount} van ${count} rapport als betaald gemarkeerd`, + other: `${doneCount} van ${count} rapporten als betaald gemarkeerd`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Uitgaven vastgehouden in ${doneCount} van ${count} rapport`, + other: `Uitgaven vastgehouden in ${doneCount} van ${count} rapporten`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Blokkering van uitgaven opgeheven in ${doneCount} van ${count} rapport`, + other: `Blokkering van uitgaven opgeheven in ${doneCount} van ${count} rapporten`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Uitgaven afgewezen in ${doneCount} van ${count} rapport`, + other: `Uitgaven afgewezen in ${doneCount} van ${count} rapporten`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `${doneCount} van ${count} rapport verwijderd`, + other: `${doneCount} van ${count} rapporten verwijderd`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Uitgaven verwijderd in ${doneCount} van ${count} rapport`, + other: `Uitgaven verwijderd in ${doneCount} van ${count} rapporten`, + }), + noReportsTitle: 'Geen overeenkomende rapporten', + noReportsBody: 'Geen van de rapporten die je hebt geselecteerd had deze actie nodig.', + viewFailedReports: 'Rapporten bekijken', + failedTitle: 'Er is iets misgegaan', + failedBody: 'Deze actie kon niet worden gestart. Probeer het later opnieuw.', + notApprovedBody: ({count}: {count: number}) => ({ + one: '1 rapport kon niet worden goedgekeurd.', + other: `${count} rapporten konden niet worden goedgekeurd.`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: '1 rapport kon niet worden ingediend.', + other: `${count} rapporten konden niet worden ingediend.`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: '1 rapport kon niet worden betaald.', + other: `${count} rapporten konden niet worden betaald.`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: 'Uitgaven in 1 rapport konden niet worden vastgehouden.', + other: `Uitgaven in ${count} rapporten konden niet worden vastgehouden.`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: 'De blokkering van uitgaven in 1 rapport kon niet worden opgeheven.', + other: `De blokkering van uitgaven in ${count} rapporten kon niet worden opgeheven.`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: 'Uitgaven in 1 rapport konden niet worden afgewezen.', + other: `Uitgaven in ${count} rapporten konden niet worden afgewezen.`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: '1 rapport kon niet worden verwijderd.', + other: `${count} rapporten konden niet worden verwijderd.`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: 'Uitgaven in 1 rapport konden niet worden verwijderd.', + other: `Uitgaven in ${count} rapporten konden niet worden verwijderd.`, + }), + }, earlyRenewal: { confirmationDescription: ({startDate, endDate}: {startDate: string; endDate: string}) => `Verleng je abonnement voor een periode van 12 maanden, van ${startDate} tot ${endDate}.`, title: 'Verleng je Expensify-abonnement', diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 17a89282fbea..ee2c9ae4ca54 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -12057,6 +12057,90 @@ Oto *paragon testowy*, żeby pokazać Ci, jak to działa:`, errorTitle: 'Coś poszło nie tak. Spróbuj ponownie.', errorPrompt: 'Wygląda na to, że coś nie zadziałało. Spróbuj ponownie. Jeśli problem będzie się powtarzał, skontaktuj się z Concierge.', }, + bulkAction: { + approvingTitle: 'Zatwierdzanie raportów...', + submittingTitle: 'Wysyłanie raportów...', + payingTitle: 'Oznaczanie raportów jako opłacone...', + holdingTitle: 'Wstrzymywanie wydatków...', + unholdingTitle: 'Usuwanie blokady wydatków...', + rejectingTitle: 'Odrzucanie wydatków...', + deletingTitle: 'Usuwanie raportów...', + deletingExpensesTitle: 'Usuwanie wydatków...', + runningBody: 'Poczekaj kilka minut albo pozwól, by Concierge wysłał ci wiadomość, gdy wszystko będzie gotowe.', + sendFromConcierge: 'Napisz do mnie, kiedy będzie gotowe', + conciergeTitle: 'No jasne!', + conciergeBody: 'Gdy Concierge skończy, wyśle ci wiadomość.', + goToConcierge: 'Przejdź do Concierge', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Zatwierdzono ${doneCount} z ${count} raportu`, + other: `Zatwierdzono ${doneCount} z ${count} raportów`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Przesłano ${doneCount} z ${count} raportu`, + other: `Przesłano ${doneCount} z ${count} raportów`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Oznaczono ${doneCount} z ${count} raportu jako opłacone`, + other: `Oznaczono ${doneCount} z ${count} raportów jako opłacone`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Wstrzymano wydatki w ${doneCount} z ${count} raportu`, + other: `Wstrzymano wydatki w ${doneCount} z ${count} raportów`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Usunięto blokadę wydatków w ${doneCount} z ${count} raportu`, + other: `Usunięto blokadę wydatków w ${doneCount} z ${count} raportów`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Odrzucono wydatki w ${doneCount} z ${count} raportu`, + other: `Odrzucono wydatki w ${doneCount} z ${count} raportów`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Usunięto ${doneCount} z ${count} raportu`, + other: `Usunięto ${doneCount} z ${count} raportów`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Usunięto wydatki w ${doneCount} z ${count} raportu`, + other: `Usunięto wydatki w ${doneCount} z ${count} raportów`, + }), + noReportsTitle: 'Brak pasujących raportów', + noReportsBody: 'Żaden z wybranych raportów nie wymagał tej akcji.', + viewFailedReports: 'Wyświetl raporty', + failedTitle: 'Coś poszło nie tak', + failedBody: 'Nie udało się rozpocząć tej akcji. Spróbuj ponownie później.', + notApprovedBody: ({count}: {count: number}) => ({ + one: 'Nie udało się zatwierdzić 1 raportu.', + other: `Nie udało się zatwierdzić ${count} raportów.`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: 'Nie udało się przesłać 1 raportu.', + other: `Nie udało się przesłać ${count} raportów.`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: 'Nie udało się oznaczyć 1 raportu jako opłaconego.', + other: `Nie udało się oznaczyć ${count} raportów jako opłaconych.`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: 'Nie udało się wstrzymać wydatków w 1 raporcie.', + other: `Nie udało się wstrzymać wydatków w ${count} raportach.`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: 'Nie udało się usunąć blokady wydatków w 1 raporcie.', + other: `Nie udało się usunąć blokady wydatków w ${count} raportach.`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: 'Nie udało się odrzucić wydatków w 1 raporcie.', + other: `Nie udało się odrzucić wydatków w ${count} raportach.`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: 'Nie udało się usunąć 1 raportu.', + other: `Nie udało się usunąć ${count} raportów.`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: 'Nie udało się usunąć wydatków w 1 raporcie.', + other: `Nie udało się usunąć wydatków w ${count} raportach.`, + }), + }, earlyRenewal: { confirmationDescription: ({startDate, endDate}: {startDate: string; endDate: string}) => `Odnów swoją subskrypcję na 12-miesięczny okres, od ${startDate} do ${endDate}.`, title: 'Odnów swoją subskrypcję Expensify', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index 274d62903144..0cc2627773c0 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -12030,6 +12030,90 @@ Aqui está um *comprovante de teste* para mostrar como funciona:`, errorTitle: 'Algo deu errado. Tente novamente.', errorPrompt: 'Parece que algo não funcionou. Tente novamente. Se o problema persistir, entre em contato com a Concierge.', }, + bulkAction: { + approvingTitle: 'Aprovando relatórios...', + submittingTitle: 'Enviando relatórios...', + payingTitle: 'Marcando relatórios como pagos...', + holdingTitle: 'Retendo despesas...', + unholdingTitle: 'Removendo bloqueio das despesas...', + rejectingTitle: 'Rejeitando despesas...', + deletingTitle: 'Excluindo relatórios...', + deletingExpensesTitle: 'Excluindo despesas...', + runningBody: 'Espere alguns minutos ou deixe o Concierge avisar você quando terminar.', + sendFromConcierge: 'Me avise quando terminar', + conciergeTitle: 'Pode apostar!', + conciergeBody: 'O Concierge vai te enviar uma mensagem quando terminar.', + goToConcierge: 'Ir para o Concierge', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Aprovado(s) ${doneCount} de ${count} relatório`, + other: `Aprovado(s) ${doneCount} de ${count} relatórios`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Enviado(s) ${doneCount} de ${count} relatório`, + other: `Enviado(s) ${doneCount} de ${count} relatórios`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Marcado(s) ${doneCount} de ${count} relatório como pago(s)`, + other: `Marcado(s) ${doneCount} de ${count} relatórios como pago(s)`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Despesas retidas em ${doneCount} de ${count} relatório`, + other: `Despesas retidas em ${doneCount} de ${count} relatórios`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Bloqueio removido das despesas em ${doneCount} de ${count} relatório`, + other: `Bloqueio removido das despesas em ${doneCount} de ${count} relatórios`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Despesas rejeitadas em ${doneCount} de ${count} relatório`, + other: `Despesas rejeitadas em ${doneCount} de ${count} relatórios`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Excluído(s) ${doneCount} de ${count} relatório`, + other: `Excluído(s) ${doneCount} de ${count} relatórios`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `Despesas excluídas em ${doneCount} de ${count} relatório`, + other: `Despesas excluídas em ${doneCount} de ${count} relatórios`, + }), + noReportsTitle: 'Nenhum relatório correspondente', + noReportsBody: 'Nenhum dos relatórios que você selecionou precisava dessa ação.', + viewFailedReports: 'Ver relatórios', + failedTitle: 'Algo deu errado', + failedBody: 'Não foi possível iniciar esta ação. Tente novamente mais tarde.', + notApprovedBody: ({count}: {count: number}) => ({ + one: '1 relatório não pôde ser aprovado.', + other: `${count} relatórios não puderam ser aprovados.`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: '1 relatório não pôde ser enviado.', + other: `${count} relatórios não puderam ser enviados.`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: '1 relatório não pôde ser pago.', + other: `${count} relatórios não puderam ser pagos.`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: 'As despesas de 1 relatório não puderam ser retidas.', + other: `As despesas de ${count} relatórios não puderam ser retidas.`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: 'As despesas de 1 relatório não puderam ser desbloqueadas.', + other: `As despesas de ${count} relatórios não puderam ser desbloqueadas.`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: 'As despesas de 1 relatório não puderam ser rejeitadas.', + other: `As despesas de ${count} relatórios não puderam ser rejeitadas.`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: '1 relatório não pôde ser excluído.', + other: `${count} relatórios não puderam ser excluídos.`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: 'As despesas de 1 relatório não puderam ser excluídas.', + other: `As despesas de ${count} relatórios não puderam ser excluídas.`, + }), + }, earlyRenewal: { confirmationDescription: ({startDate, endDate}: {startDate: string; endDate: string}) => `Renove sua assinatura por um período de 12 meses, de ${startDate} a ${endDate}.`, title: 'Renove sua assinatura do Expensify', diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 79dafb4321f5..cfc3e6896dba 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -11596,6 +11596,90 @@ ${reportName}`, errorTitle: '出现问题。请重试', errorPrompt: '好像出了点问题。请重试。如果问题仍然存在,请联系 Concierge。', }, + bulkAction: { + approvingTitle: '正在批准报表…', + submittingTitle: '正在提交报表…', + payingTitle: '正在将报表标记为已支付…', + holdingTitle: '正在暂挂报销费用…', + unholdingTitle: '正在解除报销费用的保留…', + rejectingTitle: '正在拒绝报销费用…', + deletingTitle: '正在删除报表…', + deletingExpensesTitle: '正在删除报销费用…', + runningBody: '请稍等几分钟,或者由 Concierge 在完成后发送消息通知你。', + sendFromConcierge: '完成后给我发消息', + conciergeTitle: '当然!', + conciergeBody: '完成后,Concierge 会给你发送消息。', + goToConcierge: '前往 Concierge', + approvedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `已批准 ${count} 份报表中的 ${doneCount} 份`, + other: `已批准 ${count} 份报表中的 ${doneCount} 份`, + }), + submittedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `已提交 ${count} 份报表中的 ${doneCount} 份`, + other: `已提交 ${count} 份报表中的 ${doneCount} 份`, + }), + paidTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `已将 ${count} 份报表中的 ${doneCount} 份标记为已支付`, + other: `已将 ${count} 份报表中的 ${doneCount} 份标记为已支付`, + }), + heldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `已暂挂 ${count} 份报表中 ${doneCount} 份的报销费用`, + other: `已暂挂 ${count} 份报表中 ${doneCount} 份的报销费用`, + }), + unheldTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `已解除 ${count} 份报表中 ${doneCount} 份的报销费用保留`, + other: `已解除 ${count} 份报表中 ${doneCount} 份的报销费用保留`, + }), + rejectedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `已拒绝 ${count} 份报表中 ${doneCount} 份的报销费用`, + other: `已拒绝 ${count} 份报表中 ${doneCount} 份的报销费用`, + }), + deletedTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `已删除 ${count} 份报表中的 ${doneCount} 份`, + other: `已删除 ${count} 份报表中的 ${doneCount} 份`, + }), + deletedExpensesTitle: ({doneCount, count}: {doneCount: number; count: number}) => ({ + one: `已删除 ${count} 份报表中 ${doneCount} 份的报销费用`, + other: `已删除 ${count} 份报表中 ${doneCount} 份的报销费用`, + }), + noReportsTitle: '没有匹配的报表', + noReportsBody: '您选择的报表都不需要执行此操作。', + viewFailedReports: '查看报表', + failedTitle: '出现问题', + failedBody: '无法开始此操作。请稍后重试。', + notApprovedBody: ({count}: {count: number}) => ({ + one: '1 份报表无法批准。', + other: `${count} 份报表无法批准。`, + }), + notSubmittedBody: ({count}: {count: number}) => ({ + one: '1 份报表无法提交。', + other: `${count} 份报表无法提交。`, + }), + notPaidBody: ({count}: {count: number}) => ({ + one: '1 份报表无法标记为已支付。', + other: `${count} 份报表无法标记为已支付。`, + }), + notHeldBody: ({count}: {count: number}) => ({ + one: '无法暂挂 1 份报表的报销费用。', + other: `无法暂挂 ${count} 份报表的报销费用。`, + }), + notUnheldBody: ({count}: {count: number}) => ({ + one: '无法解除 1 份报表的报销费用保留。', + other: `无法解除 ${count} 份报表的报销费用保留。`, + }), + notRejectedBody: ({count}: {count: number}) => ({ + one: '无法拒绝 1 份报表的报销费用。', + other: `无法拒绝 ${count} 份报表的报销费用。`, + }), + notDeletedBody: ({count}: {count: number}) => ({ + one: '1 份报表无法删除。', + other: `${count} 份报表无法删除。`, + }), + expensesNotDeletedBody: ({count}: {count: number}) => ({ + one: '无法删除 1 份报表的报销费用。', + other: `无法删除 ${count} 份报表的报销费用。`, + }), + }, earlyRenewal: { confirmationDescription: ({startDate, endDate}: {startDate: string; endDate: string}) => `将您的订阅续订为 12 个月期限,自 ${startDate} 至 ${endDate}。`, title: '续订您的 Expensify 订阅', diff --git a/src/libs/API/parameters/ClearBulkActionParams.ts b/src/libs/API/parameters/ClearBulkActionParams.ts new file mode 100644 index 000000000000..0686398c72d9 --- /dev/null +++ b/src/libs/API/parameters/ClearBulkActionParams.ts @@ -0,0 +1,5 @@ +type ClearBulkActionParams = { + bulkActionID: string; +}; + +export default ClearBulkActionParams; diff --git a/src/libs/API/parameters/QueueBulkPayReportsParams.ts b/src/libs/API/parameters/QueueBulkPayReportsParams.ts index 845b2d6a67fd..10a0dbfb5216 100644 --- a/src/libs/API/parameters/QueueBulkPayReportsParams.ts +++ b/src/libs/API/parameters/QueueBulkPayReportsParams.ts @@ -3,6 +3,9 @@ import type {SearchQueryString} from '@components/Search/types'; type QueueBulkPayReportsParams = { /** Serialized search query describing every report to pay, so the backend can page through all matches instead of relying on a client-side list */ jsonQuery: SearchQueryString; + + /** ID of the bulk action record the backend updates as the payments finish */ + bulkActionID: string; }; export default QueueBulkPayReportsParams; diff --git a/src/libs/API/parameters/SendBulkActionSummaryFromConciergeParams.ts b/src/libs/API/parameters/SendBulkActionSummaryFromConciergeParams.ts new file mode 100644 index 000000000000..547c3584cd47 --- /dev/null +++ b/src/libs/API/parameters/SendBulkActionSummaryFromConciergeParams.ts @@ -0,0 +1,5 @@ +type SendBulkActionSummaryFromConciergeParams = { + bulkActionID: string; +}; + +export default SendBulkActionSummaryFromConciergeParams; diff --git a/src/libs/API/parameters/index.ts b/src/libs/API/parameters/index.ts index 2a6acdbc69fd..56d7f60e8595 100644 --- a/src/libs/API/parameters/index.ts +++ b/src/libs/API/parameters/index.ts @@ -721,6 +721,8 @@ export type {default as DeleteAgentParams} from './DeleteAgentParams'; export type {default as ResendValidateCodeParams} from './ResendValidateCodeParams'; export type {default as SendExportFileFromConciergeParams} from './SendExportFileFromConciergeParams'; export type {default as ClearExportDownloadParams} from './ClearExportDownloadParams'; +export type {default as SendBulkActionSummaryFromConciergeParams} from './SendBulkActionSummaryFromConciergeParams'; +export type {default as ClearBulkActionParams} from './ClearBulkActionParams'; export type {default as UpgradeSubmitParams} from './UpgradeSubmitParams'; export type {default as UploadOFXParams} from './UploadOFXParams'; export type {default as UploadUserKYBDocsParams} from './UploadUserKYBDocsParams'; diff --git a/src/libs/API/types.ts b/src/libs/API/types.ts index 93ec38c33a27..14728d8764d0 100644 --- a/src/libs/API/types.ts +++ b/src/libs/API/types.ts @@ -793,6 +793,8 @@ const WRITE_COMMANDS = { DELETE_AGENT: 'DeleteAgent', SEND_EXPORT_FILE_FROM_CONCIERGE: 'SendExportFileFromConcierge', CLEAR_EXPORT_DOWNLOAD: 'ClearExportDownload', + SEND_BULK_ACTION_SUMMARY_FROM_CONCIERGE: 'SendBulkActionSummaryFromConcierge', + CLEAR_BULK_ACTION: 'ClearBulkAction', UPGRADE_SUBMIT: 'UpgradeSubmit', UPLOAD_USER_KYB_DOCS: 'UploadUserKYBDocs', JOIN_REPORT_VIA_SECURE_LINK: 'JoinReportViaSecureLink', @@ -1616,6 +1618,8 @@ type WriteCommandParameters = { [WRITE_COMMANDS.DELETE_AGENT]: Parameters.DeleteAgentParams; [WRITE_COMMANDS.SEND_EXPORT_FILE_FROM_CONCIERGE]: Parameters.SendExportFileFromConciergeParams; [WRITE_COMMANDS.CLEAR_EXPORT_DOWNLOAD]: Parameters.ClearExportDownloadParams; + [WRITE_COMMANDS.SEND_BULK_ACTION_SUMMARY_FROM_CONCIERGE]: Parameters.SendBulkActionSummaryFromConciergeParams; + [WRITE_COMMANDS.CLEAR_BULK_ACTION]: Parameters.ClearBulkActionParams; }; const READ_COMMANDS = { diff --git a/src/libs/ExportOnyxState/masking.ts b/src/libs/ExportOnyxState/masking.ts index 19414a189282..185137ad0f7c 100644 --- a/src/libs/ExportOnyxState/masking.ts +++ b/src/libs/ExportOnyxState/masking.ts @@ -397,6 +397,7 @@ const onyxKeysToMaskFragileData = new Set([ ONYXKEYS.COLLECTION.AGENT, ONYXKEYS.COLLECTION.ATTACHMENT, ONYXKEYS.COLLECTION.BANK_ACCOUNT_SHARE_DETAILS, + ONYXKEYS.COLLECTION.BULK_ACTION, ONYXKEYS.COLLECTION.CODING_RULE_MATCHING_TRANSACTION, ONYXKEYS.COLLECTION.DEPRECATED_POLICY_MEMBER_LIST, ONYXKEYS.COLLECTION.DOMAIN, diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index 21ee4725483c..3fa3462768a5 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -1,3 +1,4 @@ +import BulkActionStatusManager from '@components/BulkActionStatusManager'; import ComposeProviders from '@components/ComposeProviders'; import DelegateNoAccessModalProvider from '@components/DelegateNoAccessModalProvider'; import EnableGlobalReimbursementsPayModal from '@components/EnableGlobalReimbursementsPayModal'; @@ -175,6 +176,7 @@ function AuthScreens() { + (); + +function wasBulkActionInitiatedLocally(bulkActionID: string): boolean { + return locallyInitiatedBulkActionIDs.has(bulkActionID); +} + +/** Starts a bulk action record that the backend moves to done once the action ran on every matching report */ +function buildBulkActionOnyxData(action: BulkActionType) { + const bulkActionID = rand64(); + locallyInitiatedBulkActionIDs.add(bulkActionID); + const onyxKey = `${ONYXKEYS.COLLECTION.BULK_ACTION}${bulkActionID}` as const; + + const optimisticData: AnyOnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.SET, + key: onyxKey, + value: {state: CONST.BULK_ACTION.STATE.RUNNING, action}, + }, + ]; + + const failureData: AnyOnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.SET, + key: onyxKey, + value: {state: CONST.BULK_ACTION.STATE.FAILED, action}, + }, + ]; + + return {bulkActionID, onyxData: {optimisticData, failureData}}; +} + +function sendBulkActionSummaryFromConcierge(bulkActionID: string, bulkAction: OnyxEntry) { + const onyxKey = `${ONYXKEYS.COLLECTION.BULK_ACTION}${bulkActionID}` as const; + + const optimisticData: AnyOnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: onyxKey, + value: {shouldSendFromConcierge: true}, + }, + ]; + + const failureData: AnyOnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: onyxKey, + value: {shouldSendFromConcierge: bulkAction?.shouldSendFromConcierge ?? null}, + }, + ]; + + write(WRITE_COMMANDS.SEND_BULK_ACTION_SUMMARY_FROM_CONCIERGE, {bulkActionID}, {optimisticData, failureData}); +} + +function clearBulkAction(bulkActionID: string, bulkAction: OnyxEntry) { + locallyInitiatedBulkActionIDs.delete(bulkActionID); + const onyxKey = `${ONYXKEYS.COLLECTION.BULK_ACTION}${bulkActionID}` as const; + + // A failed bulk action only exists on this device, since the backend drops it when queuing fails. + if (bulkAction?.state === CONST.BULK_ACTION.STATE.FAILED) { + Onyx.set(onyxKey, null); + return; + } + + const optimisticData: AnyOnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.SET, + key: onyxKey, + value: null, + }, + ]; + + const failureData: AnyOnyxUpdate[] = [ + { + onyxMethod: Onyx.METHOD.SET, + key: onyxKey, + value: bulkAction ?? null, + }, + ]; + + write(WRITE_COMMANDS.CLEAR_BULK_ACTION, {bulkActionID}, {optimisticData, failureData}); +} + +export {buildBulkActionOnyxData, sendBulkActionSummaryFromConcierge, clearBulkAction, wasBulkActionInitiatedLocally}; diff --git a/src/libs/actions/Search.ts b/src/libs/actions/Search.ts index 3573a2d02e64..d57a9238ec80 100644 --- a/src/libs/actions/Search.ts +++ b/src/libs/actions/Search.ts @@ -116,6 +116,7 @@ import Onyx from 'react-native-onyx'; import type {RejectMoneyRequestData} from './IOU/RejectMoneyRequest'; import type AdditionalPayOnyxData from './IOU/types/AdditionalPayOnyxData'; +import {buildBulkActionOnyxData} from './BulkAction'; import {markExportInitiatedLocally} from './Export'; import {payMoneyRequest} from './IOU/PayMoneyRequest'; import {prepareRejectMoneyRequestData, rejectMoneyRequest} from './IOU/RejectMoneyRequest'; @@ -2256,7 +2257,8 @@ function queueExportSearchWithTemplate( * so this covers reports beyond the currently loaded page(s) when "Select all" is checked in Search. */ function queueBulkPayReports(jsonQuery: string) { - write(WRITE_COMMANDS.QUEUE_BULK_PAY_REPORTS, {jsonQuery}); + const {bulkActionID, onyxData} = buildBulkActionOnyxData(CONST.SEARCH.BULK_ACTION_TYPES.PAY); + write(WRITE_COMMANDS.QUEUE_BULK_PAY_REPORTS, {jsonQuery, bulkActionID}, onyxData); } /** diff --git a/src/types/onyx/BulkAction.ts b/src/types/onyx/BulkAction.ts new file mode 100644 index 000000000000..fc141880c2bf --- /dev/null +++ b/src/types/onyx/BulkAction.ts @@ -0,0 +1,37 @@ +import type CONST from '@src/CONST'; + +import type {ValueOf} from 'type-fest'; + +/** Possible states of a bulk action */ +type BulkActionState = ValueOf; + +/** Bulk actions from Search "Select all" that run on the backend */ +type BulkActionType = + | typeof CONST.SEARCH.BULK_ACTION_TYPES.APPROVE + | typeof CONST.SEARCH.BULK_ACTION_TYPES.SUBMIT + | typeof CONST.SEARCH.BULK_ACTION_TYPES.PAY + | typeof CONST.SEARCH.BULK_ACTION_TYPES.HOLD + | typeof CONST.SEARCH.BULK_ACTION_TYPES.UNHOLD + | typeof CONST.SEARCH.BULK_ACTION_TYPES.REJECT + | typeof CONST.SEARCH.BULK_ACTION_TYPES.DELETE + | typeof CONST.BULK_ACTION.DELETE_EXPENSES; + +/** Model of a bulk action started from Search "Select all" */ +type BulkAction = { + state: BulkActionState; + + /** Which action is running on the matching reports */ + action: BulkActionType; + + /** Number of reports the action ran on, set once it is done */ + total?: number; + + /** Reports the action couldn't be done on, set once it is done */ + failedReportIDs?: string[]; + + /** Whether Concierge should message the result instead of showing it here */ + shouldSendFromConcierge?: boolean; +}; + +export default BulkAction; +export type {BulkActionType}; diff --git a/src/types/onyx/index.ts b/src/types/onyx/index.ts index cc3d30c3900f..f13e62c72f27 100644 --- a/src/types/onyx/index.ts +++ b/src/types/onyx/index.ts @@ -23,6 +23,7 @@ import type BillingGraceEndPeriod from './BillingGraceEndPeriod'; import type BillingReceiptDetails from './BillingReceiptDetails'; import type BillingStatus from './BillingStatus'; import type BlockedFromConcierge from './BlockedFromConcierge'; +import type BulkAction from './BulkAction'; import type CancellationDetails from './CancellationDetails'; import type Card from './Card'; import type {CardList, IssueNewCard, ProvisioningCardData, WorkspaceCardsList} from './Card'; @@ -288,6 +289,7 @@ export type { Domain, Download, ExportDownload, + BulkAction, GeneratedRule, DuplicateWorkspace, CopyPolicySettingsNVP, diff --git a/tests/unit/BulkActionActionsTest.ts b/tests/unit/BulkActionActionsTest.ts new file mode 100644 index 000000000000..52fc0c49ba5f --- /dev/null +++ b/tests/unit/BulkActionActionsTest.ts @@ -0,0 +1,60 @@ +import {WRITE_COMMANDS} from '@libs/API/types'; + +import {clearBulkAction} from '@userActions/BulkAction'; + +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; + +import Onyx from 'react-native-onyx'; + +import type {MockFetch} from '../utils/TestHelper'; + +import getOnyxValue from '../utils/getOnyxValue'; +import * as TestHelper from '../utils/TestHelper'; +import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; + +jest.mock('@libs/Navigation/Navigation'); + +describe('BulkAction actions', () => { + let mockFetch: MockFetch; + + beforeAll(() => { + Onyx.init({keys: ONYXKEYS}); + }); + + beforeEach(() => { + mockFetch = TestHelper.getGlobalFetchMock(); + global.fetch = mockFetch; + return Onyx.clear().then(waitForBatchedUpdates); + }); + + test('clearBulkAction removes a failed bulk action without asking the backend', async () => { + // Given a bulk action whose queue request failed, so the backend never kept it + const onyxKey = `${ONYXKEYS.COLLECTION.BULK_ACTION}111` as const; + const failedBulkAction = {state: CONST.BULK_ACTION.STATE.FAILED, action: CONST.SEARCH.BULK_ACTION_TYPES.PAY}; + await Onyx.set(onyxKey, failedBulkAction); + + // When the user closes it + clearBulkAction('111', failedBulkAction); + await waitForBatchedUpdates(); + + // Then it's gone, and no ClearBulkAction request is sent that could fail and bring it back + expect(await getOnyxValue(onyxKey)).toBeUndefined(); + TestHelper.expectAPICommandToHaveBeenCalled(WRITE_COMMANDS.CLEAR_BULK_ACTION, 0); + }); + + test('clearBulkAction asks the backend to clear a finished bulk action', async () => { + // Given a finished bulk action the backend saved + const onyxKey = `${ONYXKEYS.COLLECTION.BULK_ACTION}222` as const; + const doneBulkAction = {state: CONST.BULK_ACTION.STATE.DONE, action: CONST.SEARCH.BULK_ACTION_TYPES.PAY, total: 2, failedReportIDs: []}; + await Onyx.set(onyxKey, doneBulkAction); + + // When the user closes it + clearBulkAction('222', doneBulkAction); + await waitForBatchedUpdates(); + + // Then it's gone here and the backend is asked to drop it too + expect(await getOnyxValue(onyxKey)).toBeUndefined(); + TestHelper.expectAPICommandToHaveBeenCalled(WRITE_COMMANDS.CLEAR_BULK_ACTION, 1); + }); +}); diff --git a/tests/unit/BulkActionStatusManagerTest.tsx b/tests/unit/BulkActionStatusManagerTest.tsx new file mode 100644 index 000000000000..97266eed7017 --- /dev/null +++ b/tests/unit/BulkActionStatusManagerTest.tsx @@ -0,0 +1,181 @@ +import {fireEvent, render, screen} from '@testing-library/react-native'; + +import BulkActionStatusManager from '@components/BulkActionStatusManager'; + +import Navigation from '@libs/Navigation/Navigation'; + +import {clearBulkAction, sendBulkActionSummaryFromConcierge} from '@userActions/BulkAction'; +import type * as Modal from '@userActions/Modal'; + +import CONST from '@src/CONST'; +import ONYXKEYS from '@src/ONYXKEYS'; + +import React from 'react'; +import Onyx from 'react-native-onyx'; + +import waitForBatchedUpdatesWithAct from '../utils/waitForBatchedUpdatesWithAct'; + +jest.mock('@userActions/BulkAction', () => ({ + sendBulkActionSummaryFromConcierge: jest.fn(), + clearBulkAction: jest.fn(), + wasBulkActionInitiatedLocally: jest.fn(() => false), +})); +jest.mock('@userActions/Modal', () => { + const actualModal = jest.requireActual('@userActions/Modal'); + return { + ...actualModal, + // Like the real close(), this runs the open modal's onClose before the callback. + close: jest.fn((cb?: () => void) => { + actualModal.closeTop(); + cb?.(); + }), + }; +}); +jest.mock('@libs/Navigation/Navigation', () => ({ + navigate: jest.fn(), + isNavigationReady: jest.fn(() => Promise.resolve()), + isTopmostRouteModalScreen: jest.fn(() => false), + getActiveRouteWithoutParams: jest.fn(() => ''), +})); +jest.mock('@hooks/useOpenConciergeAnywhere', () => ({ + __esModule: true, + default: () => ({ + openConciergeAnywhere: jest.fn(), + isInSidePanel: false, + }), +})); +jest.mock('@hooks/useLocalize', () => ({ + __esModule: true, + default: () => ({ + translate: (key: string) => key, + }), +})); + +const mockClearBulkAction = jest.mocked(clearBulkAction); +const mockSendFromConcierge = jest.mocked(sendBulkActionSummaryFromConcierge); +const mockNavigate = jest.mocked(Navigation.navigate); + +const BULK_ACTION_ID = 'test-bulk-action-123'; +const BULK_ACTION_KEY = `${ONYXKEYS.COLLECTION.BULK_ACTION}${BULK_ACTION_ID}` as const; + +describe('BulkActionStatusManager', () => { + beforeAll(() => { + Onyx.init({keys: ONYXKEYS}); + }); + + beforeEach(async () => { + jest.clearAllMocks(); + await Onyx.clear(); + }); + + it('shows the running approval with the option to have Concierge message the result', async () => { + // Given a bulk approval that is still running + await Onyx.set(BULK_ACTION_KEY, {state: CONST.BULK_ACTION.STATE.RUNNING, action: CONST.SEARCH.BULK_ACTION_TYPES.APPROVE}); + + render(); + await waitForBatchedUpdatesWithAct(); + + // When the user asks Concierge to message them + expect(screen.getByText('bulkAction.approvingTitle')).toBeTruthy(); + fireEvent.press(screen.getByText('bulkAction.sendFromConcierge')); + + // Then Concierge is asked for the summary and the record stays, because the backend still has to finish it + expect(mockSendFromConcierge).toHaveBeenCalledWith(BULK_ACTION_ID, expect.objectContaining({state: CONST.BULK_ACTION.STATE.RUNNING})); + expect(mockClearBulkAction).not.toHaveBeenCalled(); + }); + + it('does not show a bulk action Concierge will message about', async () => { + // Given a running bulk action the user already handed to Concierge + await Onyx.set(BULK_ACTION_KEY, {state: CONST.BULK_ACTION.STATE.RUNNING, action: CONST.SEARCH.BULK_ACTION_TYPES.PAY, shouldSendFromConcierge: true}); + + // When the app loads + render(); + await waitForBatchedUpdatesWithAct(); + + // Then no modal is shown, because Concierge sends the result + expect(screen.queryByText('bulkAction.payingTitle')).toBeNull(); + expect(screen.queryByText('bulkAction.conciergeTitle')).toBeNull(); + }); + + it('opens the reports that could not be approved in Search', async () => { + // Given a finished bulk approval where two reports could not be approved + await Onyx.set(BULK_ACTION_KEY, {state: CONST.BULK_ACTION.STATE.DONE, action: CONST.SEARCH.BULK_ACTION_TYPES.APPROVE, total: 5, failedReportIDs: ['111', '222']}); + + render(); + await waitForBatchedUpdatesWithAct(); + + // When the user opens those reports + expect(screen.getByText('bulkAction.approvedTitle')).toBeTruthy(); + expect(screen.getByText('bulkAction.notApprovedBody')).toBeTruthy(); + fireEvent.press(screen.getByText('bulkAction.viewFailedReports')); + + // Then Search opens on exactly those reports and the record is cleared + expect(mockNavigate).toHaveBeenCalledWith(expect.stringMatching(/reportID%3A111%2C222/)); + expect(mockClearBulkAction).toHaveBeenCalledTimes(1); + expect(mockClearBulkAction).toHaveBeenCalledWith(BULK_ACTION_ID, expect.objectContaining({state: CONST.BULK_ACTION.STATE.DONE})); + }); + + it('clears a finished bulk submit when it is closed', async () => { + // Given a finished bulk submit where every report was submitted + await Onyx.set(BULK_ACTION_KEY, {state: CONST.BULK_ACTION.STATE.DONE, action: CONST.SEARCH.BULK_ACTION_TYPES.SUBMIT, total: 3, failedReportIDs: []}); + + render(); + await waitForBatchedUpdatesWithAct(); + + // When the user closes the modal + expect(screen.getByText('bulkAction.submittedTitle')).toBeTruthy(); + expect(screen.queryByText('bulkAction.viewFailedReports')).toBeNull(); + fireEvent.press(screen.getByText('common.close')); + + // Then the record is cleared so the modal doesn't come back + expect(mockClearBulkAction).toHaveBeenCalledWith(BULK_ACTION_ID, expect.objectContaining({state: CONST.BULK_ACTION.STATE.DONE})); + }); + + it('shows a bulk hold while it runs and once it is done', async () => { + // Given a bulk hold that is still running + await Onyx.set(BULK_ACTION_KEY, {state: CONST.BULK_ACTION.STATE.RUNNING, action: CONST.SEARCH.BULK_ACTION_TYPES.HOLD}); + + render(); + await waitForBatchedUpdatesWithAct(); + expect(screen.getByText('bulkAction.holdingTitle')).toBeTruthy(); + + // When the backend finishes it + await Onyx.set(BULK_ACTION_KEY, {state: CONST.BULK_ACTION.STATE.DONE, action: CONST.SEARCH.BULK_ACTION_TYPES.HOLD, total: 2, failedReportIDs: []}); + await waitForBatchedUpdatesWithAct(); + + // Then the modal shows the hold result + expect(screen.getByText('bulkAction.heldTitle')).toBeTruthy(); + }); + + it('waits for the menu that started the bulk action to close before showing it', async () => { + // Given a bulk pay that just started while the Pay menu is still closing + await Onyx.set(ONYXKEYS.MODAL, {isVisible: true, isPopover: true}); + await Onyx.set(BULK_ACTION_KEY, {state: CONST.BULK_ACTION.STATE.RUNNING, action: CONST.SEARCH.BULK_ACTION_TYPES.PAY}); + + render(); + await waitForBatchedUpdatesWithAct(); + + // Then nothing opens yet, since iOS can't open a modal on top of one that is closing + expect(screen.queryByText('bulkAction.payingTitle')).toBeNull(); + + // When the menu has closed + await Onyx.set(ONYXKEYS.MODAL, {isVisible: false}); + await waitForBatchedUpdatesWithAct(); + + // Then the bulk pay shows + expect(screen.getByText('bulkAction.payingTitle')).toBeTruthy(); + }); + + it('says so when no report matched', async () => { + // Given a bulk pay that found no report to mark as paid + await Onyx.set(BULK_ACTION_KEY, {state: CONST.BULK_ACTION.STATE.DONE, action: CONST.SEARCH.BULK_ACTION_TYPES.PAY, total: 0}); + + // When the app loads + render(); + await waitForBatchedUpdatesWithAct(); + + // Then the modal says nothing matched instead of "0 of 0" + expect(screen.getByText('bulkAction.noReportsTitle')).toBeTruthy(); + expect(screen.queryByText('bulkAction.paidTitle')).toBeNull(); + }); +});