Contract reminder email endpoint #270
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#270
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — discovered during contract signing push for April 2 deadline. Sandra Apaisa fee negotiation ($175/mo for 3 girls) already applied to DB.
Repo
forgejo_admin/basketball-apiUser Story
As Marcus,
I want to send contract reminder emails to parents who haven't signed,
So that we can finalize rosters by April 2nd.
Context
16 of 52 rostered players have signed contracts (29%). 17U Elite Queens is at 0%. Season starts April 6. Need a reusable endpoint to send reminder emails — this will be used multiple times as the deadline approaches.
The jersey-reminder endpoint (
POST /email/jersey-reminderat admin.py:847) is the pattern to follow. Same test_email param, same email_log audit trail, same gmail_sdk send path.Contract link format:
https://westside-contracts.tail5b443a.ts.net/contract/{contract_token}Template tone: friendly nudge — "we noticed you haven't signed yet, let us know what we can do to help." Include April 2 deadline. Match existing Westside dark branding (dark bg, pink accents, rgb(233,30,140)).
Multi-player parents (e.g. Sandra Apaisa with 3 girls) must receive ONE email listing all unsigned players with individual contract links.
File Targets
Files the agent should modify or create:
src/basketball_api/routes/admin.py— addPOST /email/contract-reminderendpoint following jersey-reminder patternsrc/basketball_api/services/email.py— addsend_contract_reminder_email()function, use existingload_email_template()patterndata/email-templates/contract-reminder.html— HTML email template matching Westside dark brandingtests/test_contract_reminder.py— endpoint and email function testsFiles the agent should NOT touch:
src/basketball_api/routes/jersey.py— unrelatedsrc/basketball_api/routes/checkout.py— unrelatedAcceptance Criteria
POST /email/contract-reminder?test_email=draneylucas@gmail.comsends test email to specified addressPOST /email/contract-reminder(no param) sends to all parents of unsigned rostered playerscontract_tokenemail_logtableTest Expectations
pytest tests/test_contract_reminder.py -vConstraints
gmail_sdkfor sending (same as all other emails)load_email_template()pattern for template loadingemail_logwith typecontract_reminderChecklist
Related
westside-basketball— project this affects