Assignment Counting & Honorarium Tracking
Feature Detail
Description
This feature tracks the cumulative count of assignments completed by each peer mentor and determines when honorarium thresholds are reached. For Blindeforbundet, specific thresholds trigger different honorarium rates: a contact honorarium activates at the 3rd assignment and a higher rate applies at the 15th. The system maintains a running count per peer mentor, displays current progress toward thresholds on a dedicated screen, and flags when a new threshold is crossed so coordinators can process payments accordingly.
Analysis
Blindeforbundet's honorarium structure is a contractual obligation tied to grant funding and volunteer compensation rules. Manual tracking of assignment counts using spreadsheets is error-prone and creates disputes between peer mentors and coordinators over payment eligibility. Automating threshold detection eliminates these disputes, ensures peer mentors are compensated correctly and on time, and reduces coordinator workload. Accurate honorarium tracking also supports Bufdir reporting by providing verified assignment counts per peer mentor. This feature is a must-have for Blindeforbundet's participation in the platform and has strong parallels in other organizations that may adopt similar honorarium models.
The Assignment Count Repository maintains a denormalized count field updated via Supabase database triggers on the assignments table inserts, ensuring consistency without expensive aggregate queries. The Honorarium Calculation Service reads organization-specific threshold configurations stored in integration_configs, allowing different thresholds per organization without code changes. The Honorarium Threshold Widget renders a progress indicator showing current count versus next threshold. Notifications should be triggered when a threshold is crossed using the Push Notification Service. The screen must be accessible to screen readers with numeric progress clearly labeled. Configuration of threshold values and rates is managed through the Admin Portal.
Dependencies
Definition of Done
Components (6)
User Stories (8)
As a As a Coordinator
I want I want to view a historical list of honorarium milestones a peer mentor has crossed, including the date each threshold was reached
So that So that I can reconcile payment records, verify that previous honorarium payments were correctly issued, and resolve any disputes about past eligibility
- Given a peer mentor has crossed at least one honorarium threshold, when the coordinator views the Assignment Count Screen, then a milestone history section displays each crossed threshold with the date it was reached
- Given a peer mentor has crossed both the 3rd and 15th assignment thresholds, when the coordinator views the history, then both milestones are shown in chronological order with their respective dates and honorarium rates
- Given a peer mentor has not yet crossed any threshold, when the coordinator views the screen, then the milestone history section indicates no thresholds have been reached yet
- +2 more
As a As a Coordinator
I want I want to see an at-a-glance summary of which peer mentors under my coordination are approaching or have recently crossed an honorarium threshold
So that So that I can proactively prepare payment actions, prioritize follow-up with mentors close to a milestone, and ensure no threshold crossing goes unprocessed
- Given a coordinator opens their dashboard, when peer mentors are within two assignments of a threshold, then those mentors appear in an 'approaching threshold' section with their current count and how many remain
- Given a peer mentor has crossed a threshold since the last processed payment, when the coordinator views the dashboard, then that mentor appears in a 'threshold crossed — action required' section
- Given no peer mentors are approaching or have crossed thresholds, when the coordinator views the relevant dashboard section, then a message indicates all honorarium statuses are up to date
- +2 more
As a As a user
I want I want to view a peer mentor's cumulative assignment count and their progress toward the next honorarium threshold on a dedicated screen
So that So that I can quickly assess honorarium eligibility, understand how many assignments remain before the next threshold, and make informed decisions about payment processing or workload planning
- Given a coordinator or organization administrator navigates to a peer mentor's assignment count screen, when the screen loads, then the current total assignment count is displayed prominently with full screen reader accessibility
- Given the peer mentor has not yet reached any threshold, when the threshold widget renders, then it shows the current count, the next threshold value, and the number of assignments remaining to reach it
- Given the peer mentor has crossed one threshold, when the threshold widget renders, then the crossed threshold is marked as achieved and progress toward the next tier is displayed
- +2 more
As a As a Coordinator
I want I want to automatically receive a push notification the moment a peer mentor's completed assignment count crosses a configured honorarium threshold
So that So that I can promptly initiate the payment process without having to manually monitor individual assignment counts across all peer mentors
- Given a peer mentor completes their 3rd assignment, when the assignment is saved, then the assigned coordinator receives a push notification within 60 seconds identifying the peer mentor and the contact honorarium threshold reached
- Given a peer mentor completes their 15th assignment, when the assignment is saved, then the coordinator receives a push notification identifying the peer mentor and the higher honorarium rate threshold reached
- Given the coordinator taps the push notification, when the app opens, then the peer mentor's Assignment Count Screen is shown with the threshold milestone highlighted
- +2 more
As a As a user
I want I want to view a peer mentor's cumulative assignment count and their progress toward the next honorarium threshold on a dedicated screen
So that So that I can quickly assess honorarium eligibility, understand how many assignments remain before the next threshold, and make informed decisions about payment processing or workload planning
- Given a coordinator or organization administrator navigates to a peer mentor's assignment count screen, when the screen loads, then the current total assignment count is displayed prominently with full screen reader accessibility
- Given the peer mentor has not yet reached any threshold, when the threshold widget renders, then it shows the current count, the next threshold value, and the number of assignments remaining to reach it
- Given the peer mentor has crossed one threshold, when the threshold widget renders, then the crossed threshold is marked as achieved and progress toward the next tier is displayed
- +2 more
As a As a Organization Administrator
I want I want to configure my organization's honorarium threshold values and corresponding payment rates through the Admin Portal without requiring code changes
So that So that the system accurately enforces my organization's contractual honorarium structure and can adapt if thresholds or rates change due to updated grant terms or policy revisions
- Given an organization administrator accesses the honorarium configuration settings, when they add a new threshold tier, then they can specify the assignment count trigger and the corresponding honorarium rate or label
- Given a threshold tier is configured, when a peer mentor's assignment count reaches that value, then the Honorarium Calculation Service evaluates against the saved configuration for that organization
- Given an organization administrator modifies an existing threshold value, when the change is saved, then all future threshold evaluations use the updated value (existing counts already past the old threshold are unaffected)
- +2 more
As a As a user
I want I want the system to automatically increment a peer mentor's assignment count whenever a new assignment is recorded in the database
So that So that the count displayed on the honorarium screen is always accurate and current, and I never need to manually tally or correct counts
- Given a new assignment is inserted into the assignments table for a peer mentor, when the database commit completes, then the peer mentor's denormalized assignment count is incremented by exactly 1
- Given the assignment count is incremented, when the Assignment Count Screen is loaded for that peer mentor, then the newly incremented value is displayed without requiring a manual refresh or cache clear
- Given a concurrent batch of assignments is inserted for the same peer mentor, when all inserts complete, then the final count reflects every inserted assignment with no lost increments
- +2 more
As a As a user
I want I want the system to automatically increment a peer mentor's assignment count whenever a new assignment is recorded in the database
So that So that the count displayed on the honorarium screen is always accurate and current, and I never need to manually tally or correct counts
- Given a new assignment is inserted into the assignments table for a peer mentor, when the database commit completes, then the peer mentor's denormalized assignment count is incremented by exactly 1
- Given the assignment count is incremented, when the Assignment Count Screen is loaded for that peer mentor, then the newly incremented value is displayed without requiring a manual refresh or cache clear
- Given a concurrent batch of assignments is inserted for the same peer mentor, when all inserts complete, then the final count reflects every inserted assignment with no lost increments
- +2 more