[Grant Overview] Add status filter for grants
- Dominant language
- Ruby
- Stars
- 870
- Forks
- 138
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 208
Description
> [!NOTE]
> This issue has been assigned to @ArushYadlapati
### Describe the problem
A card grant is how an org gives money to a specific person: the org sends a grant of a fixed amount, the recipient accepts an email invitation, and they're issued a virtual card locked to that amount. So a grant moves through states (invitation sent, card activated, spent down), and can also be canceled (returning the remaining balance to the org), expire, or be converted into a reimbursement report.
The grants page lists every grant an org has ever sent in one flat table. If it was possible to filter grants into received vs pending invitations that would be great! Sometimes there are grants with only like $0.30 left in which we can probably cancel and return to the main org.
### Describe the feature/solution (optional)
A status filter on the grants table. It should include the following statuses:
- invited
stripe card is nil
- accepted
stripe card exists and is stripe status active
- frozen
stripe card exists and is frozen
- expired
card grant is expired status
- returned
card grant is canceled status
- converted to reimbursement report
card grant is canceled status and has a reimbursement report
A few of the statuses in the Status column are derived from associated records rather than stored on the grant itself.
We already have a filter UI on other list pages: a dropdown plus removable chips. Please match it rather than adding a bare ``. It should work alongside the existing search box, survive pagination, and keep its state in the URL.
Keep this page performant by ensuring your filter uses ActiveRecord scopes, instead of looping all records to filter by a method call
Contributor guide
Assessment
This issue has not been assessed yet.