-
Notifications
You must be signed in to change notification settings - Fork 3.9k
remove MoneyRequestCategoryPage and refactor route #35458
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
0d3a9f4
7b3c742
104f065
826748b
27a668e
7104c7f
388615a
9437006
c19b5ff
339c584
2c9117f
fadfb4c
af9f430
dc0ed31
aec7ec0
af18508
94db212
41e3184
3e3f6f2
6438c07
b5c865f
1786cdb
adf9f13
d9ce687
58a4e27
b5c4658
ce19475
248ebc0
fb86af9
f93dda6
60c559d
c79efb5
ea47735
4b4a005
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 |
|---|---|---|
|
|
@@ -60,7 +60,7 @@ import {isEmptyObject} from '@src/types/utils/EmptyObject'; | |
| import * as Policy from './Policy'; | ||
| import * as Report from './Report'; | ||
|
|
||
| type MoneyRequestRoute = StackScreenProps<MoneyRequestNavigatorParamList, typeof SCREENS.MONEY_REQUEST.CATEGORY | typeof SCREENS.MONEY_REQUEST.CONFIRMATION>['route']; | ||
| type MoneyRequestRoute = StackScreenProps<MoneyRequestNavigatorParamList, typeof SCREENS.MONEY_REQUEST.CONFIRMATION>['route']; | ||
|
|
||
| type IOURequestType = ValueOf<typeof CONST.IOU.REQUEST_TYPE>; | ||
|
|
||
|
|
@@ -304,16 +304,10 @@ function setMoneyRequestPendingFields(transactionID: string, pendingFields: Pend | |
| Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {pendingFields}); | ||
| } | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| function setMoneyRequestCategory_temporaryForRefactor(transactionID: string, category: string) { | ||
|
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. Still seeing one usage of this too on your branch
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. Same as above. |
||
| function setMoneyRequestCategory(transactionID: string, category: string) { | ||
| Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {category}); | ||
| } | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/naming-convention | ||
| function resetMoneyRequestCategory_temporaryForRefactor(transactionID: string) { | ||
|
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'm still seeing an instance of this on your branch locally - perhaps from a merge with
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 updated this to use |
||
| Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {category: null}); | ||
| } | ||
|
|
||
| function setMoneyRequestTag(transactionID: string, tag: string) { | ||
| Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {tag}); | ||
| } | ||
|
|
@@ -3877,14 +3871,6 @@ function setMoneyRequestCurrency(currency: string) { | |
| Onyx.merge(ONYXKEYS.IOU, {currency}); | ||
| } | ||
|
|
||
| function setMoneyRequestCategory(category: string) { | ||
| Onyx.merge(ONYXKEYS.IOU, {category}); | ||
| } | ||
|
|
||
| function resetMoneyRequestCategory() { | ||
| Onyx.merge(ONYXKEYS.IOU, {category: ''}); | ||
| } | ||
|
|
||
| function setMoneyRequestTaxRate(transactionID: string, taxRate: TaxRate) { | ||
| Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {taxRate}); | ||
| } | ||
|
|
@@ -3942,7 +3928,6 @@ function navigateToNextPage(iou: OnyxEntry<OnyxTypes.IOU>, iouType: string, repo | |
| ? [{reportID: chatReport?.reportID, isPolicyExpenseChat: true, selected: true}] | ||
| : (chatReport?.participantAccountIDs ?? []).filter((accountID) => currentUserAccountID !== accountID).map((accountID) => ({accountID, selected: true})); | ||
| setMoneyRequestParticipants(participants); | ||
| resetMoneyRequestCategory(); | ||
|
dukenv0307 marked this conversation as resolved.
|
||
| } | ||
| Navigation.navigate(ROUTES.MONEY_REQUEST_CONFIRMATION.getRoute(iouType, report.reportID)); | ||
| return; | ||
|
|
@@ -4105,12 +4090,9 @@ export { | |
| startMoneyRequest, | ||
| initMoneyRequest, | ||
| startMoneyRequest_temporaryForRefactor, | ||
| resetMoneyRequestCategory, | ||
| resetMoneyRequestCategory_temporaryForRefactor, | ||
| resetMoneyRequestInfo, | ||
| setMoneyRequestAmount_temporaryForRefactor, | ||
| setMoneyRequestBillable_temporaryForRefactor, | ||
| setMoneyRequestCategory_temporaryForRefactor, | ||
| setMoneyRequestCreated, | ||
| setMoneyRequestCurrency_temporaryForRefactor, | ||
| setMoneyRequestDescription, | ||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.