-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix invoice category #49142
fix invoice category #49142
Changes from 1 commit
021d61e
fc706e9
d4007d4
6d9836a
50d7a25
63f8dc3
5e6887e
88b3289
7cd4281
77ae666
8616749
8c0f55a
68e75a0
cffd880
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 | ||||
---|---|---|---|---|---|---|
|
@@ -168,6 +168,10 @@ function IOURequestStepConfirmation({ | |||||
if (policyExpenseChat?.policyID && policy?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD) { | ||||||
openDraftWorkspaceRequest(policyExpenseChat.policyID); | ||||||
} | ||||||
const isSender = participants?.find((participant) => participant.isSender); | ||||||
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.
Suggested change
Nodebrute marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
if (isSender?.policyID && policy?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD) { | ||||||
Nodebrute marked this conversation as resolved.
Show resolved
Hide resolved
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've noticed that when we change the invoice sender policy, the effect runs twice because the
Suggested change
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. Hey @rayane-djouah, Even on the latest main branch, the effect runs three times and the API is called three times when we use submit expense flow. Screen.Recording.2024-09-16.at.3.00.24.AM.movThere 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. @Nodebrute I believe this is a bug. We only need to call the API once when the policy changes, so 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. @rayane-djouah With the recent changes, I tested it again, and it’s working fine now. |
||||||
openDraftWorkspaceRequest(isSender.policyID); | ||||||
Nodebrute marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
} | ||||||
}, [isOffline, participants, transaction?.billable, policy, transactionID]); | ||||||
|
||||||
const defaultBillable = !!policy?.defaultBillable; | ||||||
|
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 property is not used, let's remove 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.
If we remove this property, we get a type error
'isSender' does not exist on type 'OptionData | Participant'. Property 'isSender' does not exist on type 'OptionData'.
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.
@Nodebrute Let's update the condition to:
and remove
isSender
property fromOptionData
type.