diff --git a/src/components/ReceiptAudit.tsx b/src/components/ReceiptAudit.tsx index 0c387ff0ae79..3ec5e7f8e6de 100644 --- a/src/components/ReceiptAudit.tsx +++ b/src/components/ReceiptAudit.tsx @@ -7,24 +7,29 @@ import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; import Text from './Text'; -function ReceiptAuditHeader({notes = []}: {notes?: string[]}) { +function ReceiptAuditHeader({notes = [], showAuditMessage = false}: {notes?: string[]; showAuditMessage?: boolean}) { const styles = useThemeStyles(); const theme = useTheme(); const {translate} = useLocalize(); - const issuesFoundText = notes.length > 0 ? translate('iou.receiptIssuesFound', notes.length) : translate('iou.receiptNoIssuesFound'); + const issuesFoundText = notes.length > 0 ? translate('iou.receiptIssuesFound', notes.length) : translate('common.verified'); return ( - + {translate('common.receipt')} - {` • ${issuesFoundText}`} - 0 ? Expensicons.DotIndicator : Expensicons.Checkmark} - fill={notes.length ? theme.danger : theme.success} - additionalStyles={styles.ml2} - /> + {showAuditMessage && ( + <> + {' • '} + {`${issuesFoundText}`} + 0 ? Expensicons.DotIndicator : Expensicons.Checkmark} + fill={notes.length ? theme.danger : theme.success} + additionalStyles={styles.ml1} + /> + + )} ); @@ -32,7 +37,7 @@ function ReceiptAuditHeader({notes = []}: {notes?: string[]}) { function ReceiptAuditMessages({notes = []}: {notes?: string[]}) { const styles = useThemeStyles(); - return {notes.length > 0 && notes.map((message) => {message})}; + return {notes.length > 0 && notes.map((message) => {message})}; } export {ReceiptAuditHeader, ReceiptAuditMessages}; diff --git a/src/components/ReportActionItem/MoneyRequestView.tsx b/src/components/ReportActionItem/MoneyRequestView.tsx index 47a193946083..7fd5fec6d2b9 100644 --- a/src/components/ReportActionItem/MoneyRequestView.tsx +++ b/src/components/ReportActionItem/MoneyRequestView.tsx @@ -244,8 +244,12 @@ function MoneyRequestView({ - {shouldShowNotesViolations && } - {/* eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing */} + {hasReceipt && ( + + )} {(showMapAsImage || hasReceipt) && ( )} {shouldShowNotesViolations && } - {canUseViolations && } + `${count} ${count === 1 ? 'issue' : 'issues'} found`, + receiptIssuesFound: (count: number) => `${count === 1 ? 'Issue' : 'Issues'} found`, receiptScanning: 'Scan in progress…', receiptMissingDetails: 'Receipt missing details', missingAmount: 'Missing amount', diff --git a/src/languages/es.ts b/src/languages/es.ts index 9097bf1b1370..9dbaa2eadd79 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -281,6 +281,7 @@ export default { nonBillable: 'No facturable', tag: 'Etiqueta', receipt: 'Recibo', + verified: `Verificado`, replace: 'Sustituir', distance: 'Distancia', mile: 'milla', @@ -595,10 +596,7 @@ export default { posted: 'Contabilizado', deleteReceipt: 'Eliminar recibo', routePending: 'Ruta pendiente...', - receiptAudit: 'Auditoría de recibos', - receiptVerified: 'Recibo verificado', - receiptNoIssuesFound: 'No se encontraron problemas', - receiptIssuesFound: (count: number) => `Se encontró ${count} ${count === 1 ? 'problema' : 'problemas'}`, + receiptIssuesFound: (count: number) => `${count === 1 ? 'Problema' : 'Problemas'}`, receiptScanning: 'Escaneo en curso…', receiptMissingDetails: 'Recibo con campos vacíos', missingAmount: 'Falta importe', diff --git a/src/styles/index.ts b/src/styles/index.ts index f25b349cba60..8a91291a0c71 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -4225,19 +4225,6 @@ const styles = (theme: ThemeColors) => borderWidth: 1, }, - receiptAuditTitleContainer: { - flexDirection: 'row', - gap: 4, - padding: 4, - paddingHorizontal: 8, - height: variables.inputHeightSmall, - borderRadius: variables.componentBorderRadiusSmall, - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - backgroundColor: theme.border, - }, - mapViewContainer: { ...flex.flex1, minHeight: 300,