Issue Details
Where: backend/controllers/referral.controller.js → acceptReferral()
Problem:
After accepting a single applicant, the controller sets:
referral.status = 'filled'
referral.filledAt = new Date()
But your UI/logic includes multiple applicants management (pending/rejected/accepted). This likely makes additional applicants impossible to accept/reject properly once the first accept happens.
Proposed solution:
If the system is supposed to support multiple accepted applicants, do not set filled on accept.
Instead:
Keep referral open until a terminal condition like “all needed seats filled” (requires a “seatsNeeded / maxApplicants” concept).
Or if only one applicant is allowed, enforce it:
Disallow accepting additional applicants when referral is filled
Optionally auto-reject others in acceptReferral.
Issue Details
Where: backend/controllers/referral.controller.js → acceptReferral()
Problem:
After accepting a single applicant, the controller sets:
referral.status = 'filled'
referral.filledAt = new Date()
But your UI/logic includes multiple applicants management (pending/rejected/accepted). This likely makes additional applicants impossible to accept/reject properly once the first accept happens.
Proposed solution:
If the system is supposed to support multiple accepted applicants, do not set filled on accept.
Instead:
Keep referral open until a terminal condition like “all needed seats filled” (requires a “seatsNeeded / maxApplicants” concept).
Or if only one applicant is allowed, enforce it:
Disallow accepting additional applicants when referral is filled
Optionally auto-reject others in acceptReferral.