-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Resolve @ts-expect-error comments related to OnyxUpdate changes - first batch
#82255
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
d7a0231
0c51a22
5097362
78aacfc
9c896df
f1d6970
8ab0366
f5dc884
fd288e5
732f2b5
9900cf2
7579598
48079c5
e2ee140
b5650d2
b337b37
c81a98a
eba5878
0c39f96
6ab13cb
b10dca2
0f84000
2e467bc
ac1fdb5
4384667
a3c9028
20ee419
1d0a782
751fc58
897b7ed
af2dc94
5e7eb64
c07504c
d6d914b
911a469
a3742c6
cc777df
7495f4f
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 |
|---|---|---|
|
|
@@ -3660,8 +3660,7 @@ function buildNewReportOptimisticData( | |
| { | ||
| onyxMethod: Onyx.METHOD.MERGE, | ||
| key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, | ||
| // @ts-expect-error - will be solved in https://github.com/Expensify/App/issues/73830 | ||
| value: {[reportActionID]: {errorFields: {createReport: getMicroSecondOnyxErrorWithTranslationKey('report.genericCreateReportFailureMessage')}}}, | ||
| value: {[reportActionID]: {errors: {createReport: getMicroSecondOnyxErrorWithTranslationKey('report.genericCreateReportFailureMessage')}}}, | ||
| }, | ||
|
|
||
| { | ||
|
|
@@ -3690,8 +3689,7 @@ function buildNewReportOptimisticData( | |
| value: { | ||
| [reportActionID]: { | ||
| pendingAction: null, | ||
| // @ts-expect-error - will be solved in https://github.com/Expensify/App/issues/73830 | ||
| errorFields: null, | ||
| errors: null, | ||
| }, | ||
| }, | ||
| }, | ||
|
|
@@ -3701,8 +3699,7 @@ function buildNewReportOptimisticData( | |
| value: { | ||
| [reportPreviewReportActionID]: { | ||
| pendingAction: null, | ||
| // @ts-expect-error - will be solved in https://github.com/Expensify/App/issues/73830 | ||
| errorFields: null, | ||
|
OlGierd03 marked this conversation as resolved.
|
||
| errors: null, | ||
| }, | ||
| }, | ||
| }, | ||
|
|
@@ -5973,11 +5970,10 @@ function deleteAppReport({ | |
| value: null, | ||
| }); | ||
|
|
||
| // @ts-expect-error - will be solved in https://github.com/Expensify/App/issues/73830 | ||
| failureData.push({ | ||
| onyxMethod: Onyx.METHOD.MERGE, | ||
| key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, | ||
| value: reportActionsForReport, | ||
| value: reportActionsForReport ?? null, | ||
| }); | ||
|
|
||
| // 7. Mark the iouReport as being deleted and then delete it | ||
|
|
@@ -6471,12 +6467,11 @@ function dismissChangePolicyModal() { | |
| value: { | ||
| [CONST.CHANGE_POLICY_TRAINING_MODAL]: { | ||
| timestamp: DateUtils.getDBTime(date.valueOf()), | ||
| dismissedMethod: 'click', | ||
| dismissedMethod: 'click' as const, | ||
| }, | ||
| }, | ||
| }, | ||
| ]; | ||
| // @ts-expect-error - will be solved in https://github.com/Expensify/App/issues/73830 | ||
| API.write(WRITE_COMMANDS.DISMISS_PRODUCT_TRAINING, {name: CONST.CHANGE_POLICY_TRAINING_MODAL, dismissedMethod: 'click'}, {optimisticData}); | ||
| } | ||
|
|
||
|
|
@@ -6722,11 +6717,10 @@ function buildOptimisticChangePolicyData( | |
| }, | ||
| }); | ||
|
|
||
| // @ts-expect-error - will be solved in https://github.com/Expensify/App/issues/73830 | ||
| failureData.push({ | ||
| onyxMethod: Onyx.METHOD.MERGE, | ||
| key: `${ONYXKEYS.COLLECTION.NEXT_STEP}${reportID}`, | ||
| value: reportNextStep, | ||
| value: reportNextStep ?? null, | ||
|
OlGierd03 marked this conversation as resolved.
|
||
| }); | ||
| failureData.push({ | ||
| onyxMethod: Onyx.METHOD.MERGE, | ||
|
|
@@ -7100,6 +7094,7 @@ function changeReportPolicyAndInviteSubmitter({ | |
| employeeList, | ||
| formatPhoneNumber, | ||
| isReportLastVisibleArchived, | ||
| reportNextStep, | ||
| }: { | ||
| report: Report; | ||
| parentReport: OnyxEntry<Report>; | ||
|
|
@@ -7112,6 +7107,7 @@ function changeReportPolicyAndInviteSubmitter({ | |
| employeeList: PolicyEmployeeList | undefined; | ||
| formatPhoneNumber: LocaleContextProps['formatPhoneNumber']; | ||
| isReportLastVisibleArchived: boolean | undefined; | ||
| reportNextStep: OnyxEntry<ReportNextStepDeprecated>; | ||
| }) { | ||
| if (!report.reportID || !policy?.id || report.policyID === policy.id || !isExpenseReport(report) || !report.ownerAccountID) { | ||
| return; | ||
|
|
@@ -7159,7 +7155,7 @@ function changeReportPolicyAndInviteSubmitter({ | |
| hasViolationsParam, | ||
| isASAPSubmitBetaEnabled, | ||
| isReportLastVisibleArchived, | ||
| undefined, | ||
| reportNextStep, | ||
|
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. i agree on the change, but i think it might change the behaviour .. is it a part of the TS changes?
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. This is indeed a behavioral change, but it's a bug fix that was necessary to make the Previously, passing |
||
| membersChats.reportCreationData[submitterEmail], | ||
| ); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.