Repository navigation
Use error prop for violations for consistent styling #34303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cead22
merged 41 commits into
Expensify:main
from
infinitered:32594-update-style-for-violations
Feb 13, 2024
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
a4844ce
feat(Violations): create useMoneyRequestViewErrors and move violation…
trevor-coleman 67b0987
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman 6dc9f5c
feat(Violations): move hasViolations into useMoneyRequestViewErrors, …
trevor-coleman 36b7dbf
feat(Violations): add comment
trevor-coleman 02fe40d
feat(Violations): add comment
trevor-coleman d3fecfc
feat(Violations): move getErrorForField into MoneyRequestView
trevor-coleman c19d1a8
Merge branch 'cdanwards/violations/transaction-thread-violations' int…
trevor-coleman e12dc9f
feat(Violations): fix import
trevor-coleman 32efefc
feat(Violations): update translation params to match violation data o…
trevor-coleman 70e45a8
feat(Violations): change param names to match violation data prop
trevor-coleman df51b44
feat(Violations): change param names to match violation data prop
trevor-coleman 394caca
feat(Violations): fixes
trevor-coleman b8b7b18
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman 2a624f9
feat(Violations): filter violations by type
trevor-coleman b80bcdd
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman e37a63a
feat(Violations): fix dependency array
trevor-coleman ef959ef
feat(Violations): handle default case for missing tag
trevor-coleman cd807d6
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman 8be0e64
feat(Violations): simplify
trevor-coleman 0adddd0
feat(Violations): fix fields
trevor-coleman a336be8
feat(Violations): reword comment
trevor-coleman 01c552c
feat(Violations): remove redundant check
trevor-coleman 498634a
feat(Violations): add space
trevor-coleman 015764e
feat(Violations): change empty string to single quotes
trevor-coleman b2ba0b6
feat(Violations): make translations consistent
trevor-coleman 3a75337
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman 581f8b0
feat(Violations): rename vars
trevor-coleman c92ee98
feat(Violations): return empty string if variables are missing
trevor-coleman a556d5f
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman c9e75c4
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman 9cdf6ea
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman a828529
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman abf3255
feat(Violations): restore type
trevor-coleman 5498c82
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman e90cf9f
Merge remote-tracking branch 'origin/main' into 32594-update-style-fo…
trevor-coleman 011a08a
feat(Violations): add deps to array
trevor-coleman 519897a
feat(Violations): replace tag field
trevor-coleman 2327c7c
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman df76a09
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman 7eb9560
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman 766ccf3
Merge remote-tracking branch 'upstream/main' into 32594-update-style-…
trevor-coleman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2629,9 +2629,9 @@ export default { | |
| allTagLevelsRequired: 'Todas las etiquetas son obligatorias', | ||
| autoReportedRejectedExpense: ({rejectedBy, rejectReason}: ViolationsAutoReportedRejectedExpenseParams) => `${rejectedBy} rechazó la solicitud y comentó "${rejectReason}"`, | ||
| billableExpense: 'La opción facturable ya no es válida', | ||
| cashExpenseWithNoReceipt: ({amount}: ViolationsCashExpenseWithNoReceiptParams) => `Recibo obligatorio para cantidades mayores de ${amount}`, | ||
| cashExpenseWithNoReceipt: ({formattedLimit}: ViolationsCashExpenseWithNoReceiptParams) => `Recibo obligatorio para cantidades mayores de ${formattedLimit}`, | ||
| categoryOutOfPolicy: 'La categoría ya no es válida', | ||
| conversionSurcharge: ({surcharge}: ViolationsConversionSurchargeParams) => `${surcharge}% de recargo aplicado`, | ||
| conversionSurcharge: ({surcharge}: ViolationsConversionSurchargeParams = {}) => `${surcharge}% de recargo aplicado`, | ||
| customUnitOutOfPolicy: 'La unidad ya no es válida', | ||
| duplicatedTransaction: 'Posible duplicado', | ||
| fieldRequired: 'Los campos del informe son obligatorios', | ||
|
|
@@ -2640,17 +2640,19 @@ export default { | |
| maxAge: ({maxAge}: ViolationsMaxAgeParams) => `Fecha de más de ${maxAge} días`, | ||
| missingCategory: 'Falta categoría', | ||
| missingComment: 'Descripción obligatoria para la categoría seleccionada', | ||
| missingTag: ({tagName}: ViolationsMissingTagParams) => `Falta ${tagName}`, | ||
| missingTag: ({tagName}: ViolationsMissingTagParams = {}) => `Falta ${tagName ?? 'etiqueta'}`, | ||
| modifiedAmount: 'Importe superior al del recibo escaneado', | ||
| modifiedDate: 'Fecha difiere del recibo escaneado', | ||
| nonExpensiworksExpense: 'Gasto no proviene de Expensiworks', | ||
| overAutoApprovalLimit: ({formattedLimitAmount}: ViolationsOverAutoApprovalLimitParams) => `Importe supera el límite de aprobación automática de ${formattedLimitAmount}`, | ||
| overCategoryLimit: ({categoryLimit}: ViolationsOverCategoryLimitParams) => `Importe supera el límite para la categoría de ${categoryLimit}/persona`, | ||
| overLimit: ({amount}: ViolationsOverLimitParams) => `Importe supera el límite de ${amount}/persona`, | ||
| overLimitAttendee: ({amount}: ViolationsOverLimitParams) => `Importe supera el límite de ${amount}/persona`, | ||
| perDayLimit: ({limit}: ViolationsPerDayLimitParams) => `Importe supera el límite diario de la categoría de ${limit}/persona`, | ||
| overAutoApprovalLimit: ({formattedLimit}: ViolationsOverAutoApprovalLimitParams) => | ||
| `Importe supera el límite de aprobación automática${formattedLimit ? ` de ${formattedLimit}` : ''}`, | ||
| overCategoryLimit: ({formattedLimit}: ViolationsOverCategoryLimitParams) => `Importe supera el límite para la categoría${formattedLimit ? ` de ${formattedLimit}/persona` : ''}`, | ||
| overLimit: ({formattedLimit}: ViolationsOverLimitParams) => `Importe supera el límite${formattedLimit ? ` de ${formattedLimit}/persona` : ''}`, | ||
| overLimitAttendee: ({formattedLimit}: ViolationsOverLimitParams) => `Importe supera el límite${formattedLimit ? ` de ${formattedLimit}/persona` : ''}`, | ||
| perDayLimit: ({formattedLimit}: ViolationsPerDayLimitParams) => `Importe supera el límite diario de la categoría${formattedLimit ? ` de ${formattedLimit}/persona` : ''}`, | ||
| receiptNotSmartScanned: 'Recibo no verificado. Por favor, confirma su exactitud', | ||
| receiptRequired: ({amount, category}: ViolationsReceiptRequiredParams) => `Recibo obligatorio para importes sobre ${category ? 'el limite de la categoría de ' : ''}${amount}`, | ||
| receiptRequired: ({formattedLimit, category}: ViolationsReceiptRequiredParams = {}) => | ||
| `Recibo obligatorio${formattedLimit ? ` para importes sobre ${category ? 'el limite de la categoría de ' : ''}${formattedLimit}` : ''}`, | ||
|
Comment on lines
+2647
to
+2655
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are all the translations final and approved?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. |
||
| rter: ({brokenBankConnection, isAdmin, email, isTransactionOlderThan7Days, member}: ViolationsRterParams) => { | ||
| if (brokenBankConnection) { | ||
| return isAdmin | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.