-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$500] Web - Expense - Approve button is displayed on the conversation preview, but not on report #34853
Comments
Job added to Upwork: https://www.upwork.com/jobs/~011b6f801c0df1bacc |
Triggered auto assignment to @sonialiap ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
We think that this bug might be related to #wave7-collect-approvers |
ProposalPlease re-state the problem that we are trying to solve in this issue.The Approve button is displayed on the conversation preview, but not on report What is the root cause of that problem?we do not update the What changes do you think we should make in order to solve the problem?
The function would be: function updatePaymentMethod(policyID, paymentMethodType) {
Onyx.merge(ONYXKEYS.NVP_LAST_PAYMENT_METHOD, {[policyID]: paymentMethodType});
}
App/src/components/ButtonWithDropdownMenu.tsx Lines 165 to 180 in 1ae344b
const onUpdatedSelection = (paymentMethodType) => {
IOU.updatePaymentMethod(policyID, paymentMethodType);
};
<ButtonWithDropdownMenu
onUpdatedSelection={onUpdatedSelection)} What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.When selecting a preferred payment method on the settlement button, it's not persisted between screens What is the root cause of that problem?When selecting the option, we do not persist the selected preferred payment method in Onyx. We persist this key only on performing the actual payment or approval. What changes do you think we should make in order to solve the problem?We need to persist the For this, we can add a prop App/src/components/ButtonWithDropdownMenu.tsx Line 168 in 1ae344b
Then, on the What alternative solutions did you explore? (Optional) |
Can you please include steps on how to send a report that requires approval |
ProposalPlease re-state the problem that we are trying to solve in this issue.When selecting a preferred payment method on the settlement button, it's not persisted What is the root cause of that problem?we dont update the What changes do you think we should make in order to solve the problem?we need to add a new prop inside the the this will be triggered whenever the selection is change: here App/src/components/ButtonWithDropdownMenu.tsx Lines 174 to 178 in 1ae344b
onSelected: () => {
onChangeSelection?.(item.value);
setSelectedItemIndex(index);
}, then inside the const onChangeSelection = (paymentMethodType) => {
IOU.setPaymentMethod(policyID, paymentMethodType);
}; the function setPaymentMethod(policyID, paymentMethodType) {
if (!policyID) {
return;
}
Onyx.merge(ONYXKEYS.NVP_LAST_PAYMENT_METHOD, {[policyID]: paymentMethodType});
} finally, use this function as a prop of onChangeSelection={onChangeSelection} and the last step is to remove the resultScreen.Recording.2024-01-20.at.6.36.32.PM.mov |
@codinggeek2023 please make sure to abide the contributing guides where if there is an update in the proposal, contributes should add a comment mentioning that the proposal was updated.
Thanks for you understanding |
Have requested another c+ @allroundexperts to take over this issue. :) |
Thanks for your proposals everyone! @codinggeek2023 I see that you updated your proposal a lot of time after others proposed. @abzokhattab I think your proposal is very similar to what @paultsimura proposed earlier. As such, I think we should go with there proposal. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @marcochavezf, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Thank you @allroundexperts, my proposal was few minutes after the second proposal but it contained the implementation specific details unlike the other proposal which doesnt contain the code implementation. |
Thank you for the explanation but we don't really require concrete implementation details. I think what @paultsimura has proposed is good enough. |
Thanks @allroundexperts and agree with your decision, assigning @paultsimura 🚀 |
📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Hi @paultsimura, let us know when the PR is ready for review :) |
Sure, will be ready today 👌 |
This was deployed to prod, the automation didn't work. |
Hey @sonialiap, a friendly bump here – it was due payment on Feb 12. Thanks 😌 |
Checklist
|
@paultsimura contributor $500 - paid ✔️ |
$500 approved for @allroundexperts based on summary above. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.28-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Pre-requisite: user must have submitted a request to a collect workspace with an employee account.
Expected Result:
The "Approve" button should be displayed also on the report page.
Actual Result:
The "Approve" button is not displayed on the report page even if already selected on the conversation preview.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6348436_1705739592251.bandicam_2024-01-19_17-08-11-609.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: