Skip to content
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

Show IOU preview component persistently regardless of state #4135

Closed
Christinadobrzyn opened this issue Jul 19, 2021 · 15 comments
Closed

Show IOU preview component persistently regardless of state #4135

Christinadobrzyn opened this issue Jul 19, 2021 · 15 comments
Assignees
Labels

Comments

@Christinadobrzyn
Copy link
Contributor

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Click the green + icon and select Request Money
  2. Enter an amount and click next
  3. Select an attendee and then Request $x to confirm
  4. Log-in as the other user that received the request, click pay and I'll settle up elsewhere
  5. Observe that there is a preview component on the settled IOU
  6. Send another request
  7. Observe that the preview component is removed from the previously settled IOU and displayed on the most recent request

Expected Result:

Continue displaying the preview component in the chat history when an IOU is in the reimbursed (settled) state, regardless of whether new IOU’s have been created thereafter.

Actual Result:

The preview component window is missing after the first payment to the same recipient. Here's a video from the recipient side.

2021-07-19_08-31-21 (1)

Here's the missing preview component window:

image

Platform:

Where is this issue occurring?

X Web
X iOS
X Android
X Desktop App
X Mobile Web

Version Number: v1.0.68-4
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: SEE ABOVE
Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/166668

View all open jobs on Upwork

@Christinadobrzyn Christinadobrzyn added the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Jul 19, 2021
@MelvinBot
Copy link

Triggered auto assignment to @trjExpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Jul 19, 2021
@Christinadobrzyn
Copy link
Contributor Author

Please ignore @trjExpensify! The label was automatically assigned when I created this post. I've got this one.

@Christinadobrzyn
Copy link
Contributor Author

Posted in Upwork: https://www.upwork.com/jobs/~0144a12bd5dfca5c7e

@Christinadobrzyn Christinadobrzyn added Exported Help Wanted Apply this label when an issue is open to proposals by contributors labels Jul 19, 2021
@MelvinBot
Copy link

Triggered auto assignment to @roryabraham (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@tugbadogan
Copy link
Contributor

Hi,

I would like to work on this issue. I added this component in the first place. Here is my proposal:

https://github.com/Expensify/Expensify.cash/blob/2e81800fdcfd9432141385ca9377494f0ad1a0f4/src/pages/home/report/ReportActionsView.js#L298-L309

@Julesssss
Copy link
Contributor

Julesssss commented Jul 19, 2021

Hey @tugbadogan, thanks for the proposal. While that solution should work, I wonder if it's possible to instead modify this condition:

{isMostRecentIOUReportAction && Boolean(action.originalMessage.IOUReportID) &&

To something like:

{(isMostRecentIOUReportAction && Boolean(action.originalMessage.IOUReportID)
   || the IOU is paid AND total != 0 ) && ...

If it's possible to make this check, then storing an array of recent sequence numbers might not be necessary.

@Julesssss Julesssss assigned Julesssss and unassigned roryabraham Jul 20, 2021
@Julesssss
Copy link
Contributor

Rory is OOO, so I'll handle this one.

@tugbadogan
Copy link
Contributor

Hi @Julesssss

{(isMostRecentIOUReportAction && Boolean(action.originalMessage.IOUReportID)
   || the IOU is paid AND total != 0 ) && ...

Yes we can use (action.originalMessage.type === 'pay') condition to display previously settled IOU reports.
We already check total != 0 condition here. So we don't need to add again.

if (iouReport.total === 0) {
return null;
}

It will look like this:
Screenshot 2021-07-20 at 14 37 50

@Julesssss
Copy link
Contributor

Great! Please feel free to make a start while we get the UpWork issue created.

@Julesssss Julesssss added Weekly KSv2 and removed Daily KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors labels Jul 20, 2021
@tugbadogan
Copy link
Contributor

I have already applied on Upwork. I will send the PR soon.

@Julesssss
Copy link
Contributor

Julesssss commented Jul 20, 2021

Oh right, Christina has already created the Upwork job :)

@Christinadobrzyn
Copy link
Contributor Author

Awesome! Sent an offer to @tugbadogan!

@Christinadobrzyn
Copy link
Contributor Author

PR merged [Hold - for payment on 29th July]

@roryabraham
Copy link
Contributor

Thanks for handling this @Julesssss!

@Christinadobrzyn
Copy link
Contributor Author

7 days after PR merge so paid Fadime in Upwork! Upwork job is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants