-
Notifications
You must be signed in to change notification settings - Fork 3k
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
remove MoneyRequestCategoryPage and refactor route #35458
Changes from 23 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>; | ||
|
||
|
@@ -299,16 +299,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) { | ||
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 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) { | ||
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 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}); | ||
} | ||
|
@@ -3865,14 +3859,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}); | ||
} | ||
|
@@ -3930,7 +3916,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.
Show resolved
Hide resolved
|
||
} | ||
Navigation.navigate(ROUTES.MONEY_REQUEST_CONFIRMATION.getRoute(iouType, report.reportID)); | ||
return; | ||
|
@@ -4092,13 +4077,10 @@ export { | |
sendMoneyWithWallet, | ||
startMoneyRequest, | ||
startMoneyRequest_temporaryForRefactor, | ||
resetMoneyRequestCategory, | ||
resetMoneyRequestCategory_temporaryForRefactor, | ||
resetMoneyRequestInfo, | ||
clearMoneyRequest, | ||
setMoneyRequestAmount_temporaryForRefactor, | ||
setMoneyRequestBillable_temporaryForRefactor, | ||
setMoneyRequestCategory_temporaryForRefactor, | ||
setMoneyRequestCreated, | ||
setMoneyRequestCurrency_temporaryForRefactor, | ||
setMoneyRequestDescription, | ||
|
This file was deleted.
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's up with this change?
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.
Thanks for your catch. @dukenv0307 It seems you update this in this commit
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.
That's my mistake.