ZEVA2 - View ZEV Unit Balance
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 6
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 32
Description
**Description:**
- [x] As a user, I want to view my organization's zev unit balance if I am a supplier, and if I am a government user, so that i can be able to view any organization's balance.
**Wireframe:** See zeva1 for inspiration
**Purpose and benefit to user:**
Being able to see balances allows users to plan their actions.
**Acceptance Criteria:**
- [x] Given I am a supplier user, when I navigate to my balance page (e.g. `/zev-unit-balance`), then I see my balance and its breakdown.
- [x] Given I am a government user, when I navigate to an organization's balance page (e.g. `/zev-unit-balance/[orgId]`), then I see the organization's balance and its breakdown.
**Development Checklist:**
- [x] Create a data.ts file with functions that fetch an organization's zev unit transactions/ending balances; these functions may be implemented so that they take a compliance year as an input; these functions should check whether the user is authorized to access the returned data.
- [ ] Create an action that fetches an organization's transactions by compliance year (an action called from a client component should be able to return database data, but if this is not the case, please let Tim know).
- [x] Create server/client components that call the functions in data.ts, passes the data to the `getBalance()` function in `lib/utils/zevUnit.ts`, and renders the result. The components should also use the action mentioned above. Also, the `getSummedZevUnitRecordsObj()` function in `lib/utils/zevUnit.ts` may be useful as well.
**Notes:**
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.