opencollective icon indicating copy to clipboard operation
opencollective copied to clipboard

Alert admins when approving an expense if the balance is too low to pay it

Open BenJam opened this issue 4 years ago • 6 comments

User story

As a collective administrator I want to be warned that an approved expense will not be paid if there are not enough funds in the collective, project, or event to pay an expense.

Best solution for this problem

When marking an expese as approved the user should be alerted that there is not enough money in the collective to pay the expense.

Metrics

Reduction in the time between approval and paid expenses

Related issues

https://github.com/opencollective/opencollective/issues/4747

BenJam avatar Nov 24 '21 09:11 BenJam

FYI adding this because of a current issue with a collective that has had an approved, unpaid expense for ~15 days.

BenJam avatar Nov 24 '21 10:11 BenJam

The way the Platform was conceived, having a low/zero balance should not prevent an Expense to be approved by the Collective admin. It will be paid when there is enough money.

znarf avatar Jan 14 '22 12:01 znarf

We need @opencollective/design to make sure we put the warning at the right place & with the right styles

Betree avatar Jul 26 '22 09:07 Betree

Week 3 tasks:

  • [ ] Design the placement of the error message
  • [ ] Share a loom for feedback
  • [ ] Share the production-ready file with the Dev team

aminakazi avatar Aug 08 '22 12:08 aminakazi

Questions:

  1. Currently, can a host admin tap on the 'pay' button if the collective doesn't have any money, or is it disabled?
  2. If yes, what is the current behavior that happens after the host admin taps on the pay button? For example, does it go to the 'processing' stage, does it show a toast error, or does go back to the 'approved' state?
  3. Do we just want to inform the user, or do we also want to allow any actions like 'don't pay now' etc.?

aminakazi avatar Aug 09 '22 13:08 aminakazi

can a host admin tap on the 'pay' button if the collective doesn't have any money

Nope: Screenshot 2022-08-12 at 12 51 00

Do we just want to inform the user

The important thing here (which is missing from the OP, my bad) is just to set the expectation than an approved expense won't be paid immediately. The expectation should probably be pushed down to the submitter too so maybe I'll create a separate issue for that.

BenJam avatar Aug 12 '22 11:08 BenJam

The production-ready Figma files can be found here.

We used the alert banner to inform users and collective admins about the expected behavior.

aminakazi avatar Aug 22 '22 12:08 aminakazi