-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[CP Staging] Fixed submit button behavior in search #54012
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
Co-authored-by: Gandalf <[email protected]>
and now conflicts 😞 |
@@ -266,6 +267,10 @@ function TransactionListItemRow({ | |||
const theme = useTheme(); | |||
|
|||
const isOnHold = useMemo(() => TransactionUtils.isOnHold(item), [item]); | |||
const shouldDisableItemAction = useMemo( | |||
() => item.action === CONST.SEARCH.ACTION_TYPES.SUBMIT && !ReportUtils.isAllowedToSubmitDraftExpenseReport(ReportUtils.getReport(item.reportID)), |
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.
This line might fail since the Search data is contained within the snapshot_
key and ReportUtils.getReport
will try to look for data in the report_
key
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.
We need to pass the snapshot data to it
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.
I opened a new PR here that changes the behavior to show View
instead of submit #54056
We can close this PR now |
Explanation of Change
Altered the button submit behaviour in search to mimic the report preview submit button.
Fixed Issues
$ #53989
Tests
Precondition:
Submit button should also be disabled in Search when "Prevent self-approvals" is enabled.n.
--->
// TODO: These must be filled out, or the issue title must include "[No QA]."
Offline tests
QA Steps
Explanation of Change
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop