-
Notifications
You must be signed in to change notification settings - Fork 4k
Add active-workspace-specific fields to Unreported Expenses #71319
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
cristipaval
merged 20 commits into
Expensify:main
from
callstack-internal:fix/70660-enable-unreported-expenses-restore
Sep 29, 2025
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3594cfa
fix: revert revert
koko57 67bebda
fix: do not show category when no categories on the workspace
koko57 20d6916
fix: show the category violation when category removed
koko57 bdf65a8
fix: do not show violation on unreported expense
koko57 8e850fd
fix: prettier
koko57 209eb2a
fix: eslint
koko57 f6367d0
fix: show reports name
koko57 6761a86
fix: show create report button on moving expenses
koko57 0c2698c
fix: prettier + tax amount name
koko57 ebc1372
fix: show NO violations for unreported expense
koko57 ed4ae72
fix: reset categories and tax when choosing another workspace
koko57 427d395
fix: minor fix
koko57 f973f55
fix: enable distance rate field
koko57 16754f8
fix: enable remibursable
koko57 110e327
fix: resolve conflicts
koko57 e63af3c
Merge branch 'main' into fix/70660-enable-unreported-expenses-restore
koko57 61dbac2
fix: distance rate fixes
koko57 7a63800
fix: show attendees field
koko57 19db142
fix: eslint
koko57 1cb5b55
fix: resolve conflicts
koko57 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
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
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
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 |
|---|---|---|
|
|
@@ -43,7 +43,6 @@ import { | |
| isPending, | ||
| isPerDiemRequest, | ||
| isScanning, | ||
| isUnreportedAndHasInvalidDistanceRateTransaction, | ||
| } from './TransactionUtils'; | ||
|
|
||
| const emptyPersonalDetails: OnyxTypes.PersonalDetails = { | ||
|
|
@@ -236,10 +235,6 @@ function getTransactionPreviewTextAndTranslationPaths({ | |
|
|
||
| if (isDistanceRequest(transaction)) { | ||
| previewHeaderText = [{translationPath: 'common.distance'}]; | ||
|
|
||
| if (RBRMessage === undefined && isUnreportedAndHasInvalidDistanceRateTransaction(transaction)) { | ||
| RBRMessage = {translationPath: 'violations.customUnitOutOfPolicy'}; | ||
|
Comment on lines
-240
to
-241
Member
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. Hmm, So we had dedicated code for that case. I smell a regression. But it is fine for now. We go with the plan. |
||
| } | ||
| } else if (isPerDiemRequest(transaction)) { | ||
| previewHeaderText = [{translationPath: 'common.perDiem'}]; | ||
| } else if (isTransactionScanning) { | ||
|
|
@@ -345,11 +340,8 @@ function createTransactionPreviewConditionals({ | |
| const shouldShowCategory = !!categoryForDisplay && isReportAPolicyExpenseChat; | ||
|
|
||
| const hasAnyViolations = | ||
| isUnreportedAndHasInvalidDistanceRateTransaction(transaction) || | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
| hasViolationsOfTypeNotice || | ||
| hasWarningTypeViolation(transaction, violations, true) || | ||
| hasViolation(transaction, violations, true); | ||
| hasViolationsOfTypeNotice || hasWarningTypeViolation(transaction, violations, true) || hasViolation(transaction, violations, true); | ||
| const hasErrorOrOnHold = hasFieldErrors || (!isFullySettled && !isFullyApproved && isTransactionOnHold); | ||
| const hasReportViolationsOrActionErrors = (isReportOwner(iouReport) && hasReportViolations(iouReport?.reportID)) || hasActionWithErrorsForTransaction(iouReport?.reportID, transaction); | ||
| const shouldShowRBR = hasAnyViolations || hasErrorOrOnHold || hasReportViolationsOrActionErrors || hasReceiptError(transaction); | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please simplify this condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you propose, I think I simplified a bit?