-
Notifications
You must be signed in to change notification settings - Fork 3.9k
add failure message when create a task error #26848
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
Changes from all commits
ac80c64
445b4e0
0ca6752
b88e4db
abff47b
3b1f752
dc17f13
2f3309b
6990da7
da7c3aa
a63d988
07dbcc4
a502733
6159d2d
20319e1
e469980
b2e99ad
4d6c183
fd33516
74c2cf8
8d2d2f2
ce5e88f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ import * as ReportUtils from '@libs/ReportUtils'; | |
| import CONST from '@src/CONST'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
| import ReportAction from '@src/types/onyx/ReportAction'; | ||
| import * as Report from './Report'; | ||
|
|
||
| function clearReportActionErrors(reportID: string, reportAction: ReportAction) { | ||
| const originalReportID = ReportUtils.getOriginalReportID(reportID, reportAction); | ||
|
|
@@ -24,6 +25,11 @@ function clearReportActionErrors(reportID: string, reportAction: ReportAction) { | |
| Onyx.set(`${ONYXKEYS.COLLECTION.TRANSACTION}${linkedTransactionID}`, null); | ||
| } | ||
|
|
||
| // Delete the failed task report too | ||
|
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. This is a generic function so I am trying to test it with other report actions. This might be applicable to money requests. But I am not sure how to get a failed money request error on action. Any idea?
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. I think you can flow steps:
|
||
| const taskReportID = reportAction.message?.[0]?.taskReportID; | ||
| if (taskReportID) { | ||
| Report.deleteReport(taskReportID); | ||
| } | ||
| return; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.