ZEVA 2 - Credit Transfers
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 6
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 32
Description
**Goal**
Enable regulated suppliers to propose, review, and complete credit transfers, and allow government users to track, recommend, and issue these transfers in accordance with legislative and operational requirements.
**User Roles**
• BCeID Users
- Signing Authority: Can submit and approve credit transfer proposals.
- ZEVA User: Can create and edit draft proposals.
• IDIR Users
- Analyst: Can review and recommend credit transfers.
- Director: Can approve and issue credit transfers.
**Functional Elements**
1. Credit Transfer Data Model
• Prisma model defines structure for credit transfers.
• Includes fields for status, parties involved, ZEV unit details, and timestamps.
• Data migration from ZEVA1 ensures continuity.
2. Credit Transfer Lifecycle
• Statuses include:
- DRAFT
- SUBMITTED_TO_SUPPLIER
- APPROVED_BY_SUPPLIER
- SUBMITTED_TO_GOVERNMENT
- APPROVED_BY_GOVERNMENT
- ISSUED
• Transitions are triggered by user actions and permissions.
3. User Actions
• Create: Initiate a new credit transfer proposal.
• Edit: Modify draft proposals.
• Submit: Send to the other party or government for review.
• Approve/Decline: Accept or reject proposals.
• Issue: Finalize the transfer, generate ZEV unit transactions, and notify stakeholders.
4. Interface Components
• Credit Transfer List Page:
- Displays all transfers relevant to the user.
- Built using a modern table library (e.g., TanStack Table or AG Grid).
- Supports pagination, filtering, and sorting.
• Credit Transfer Details Page:
- Displays full details of a selected transfer.
- Includes history, status, and available actions.
5. Authorization and Security
• All actions are gated by role-based access control.
• Uses auth() to validate user permissions before performing actions.
**Workflow Summary**
1. Supplier creates a draft credit transfer.
2. Supplier submits to the counterparty for approval.
3. Once approved, the transfer is submitted to government.
4. Analyst reviews and recommends the transfer.
5. Director issues the transfer, triggering ZEV unit transactions.
6. Notifications are sent to relevant parties.
**Dependencies and Relationships**
• ZEV Units Epic: Issued transfers result in ZEV unit transactions.
• User Management Epic: Role-based permissions determine who can perform each action.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Prisma credit-transfer model and the Credit Transfer List and Details page entry points, then trace auth() checks for each role. Done means the defined lifecycle, role-gated actions, migration continuity, issued ZEV unit transactions, and stakeholder notifications work together.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authorization, backend, database, frontend, full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100