Voter email-block status API, voters filter & branded emails - #6
Merged
Merged
Conversation
The voter model already tracks email_blocked (set true on a permanent bounce or
spam complaint by the SNS webhook; cleared on successful delivery), but it was
never surfaced to API consumers, so web_app couldn't show bounced/blocked voters.
- VoterBasic + VoterFull: add email_blocked (bool) and blocked_reason
('bounce' | 'complaint' | null), derived from the voter's most recent hard
delivery failure via a new Voter::blockedReason() helper (reuses the already-
loaded sentMessages relation — no new queries).
- VoterListFull.stats: add voters_blocked count.
Verified: phpstan level 8 clean, full suite (75 passed).
GET /api/voterlist/{id}/voters now accepts ?filter=all|verified|unverified|bounced
so web_app can page through just the bounced (email_blocked) or unverified voters
instead of filtering a single loaded page client-side.
Verified: phpstan level 8 clean, voterlist tests (37 passed).
Lets consumers show when each message was sent (e.g. group a verification's messages by batch to list every send event). Additive field. Verified: phpstan level 8 clean, full suite.
web_sender's published mail theme was still stock Laravel — the verification 'Verify Now' button rendered dark slate (#2d3748) and links generic blue, while web_app's emails (e.g. team invites) use the eGlasovanje brand. - Replace vendor/mail theme CSS with web_app's branded version (button #34b6df / text #053040, links #1b8fb8, brand success/error, zinc neutrals). Selectors are identical between the two — pure color/brand alignment. - Header fallback: the plain 'eGlasovanje' text becomes the branded wordmark (brand 'e' + Poppins/ink), keeping the org personalization-logo branch. Verified by rendering emails.verification: brand color present, wordmark present, no leftover slate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supports the web_app voter-list/verification UX work (SiVoteApp
feature/dashboard-account-home).Changes
VoterBasic/VoterFullnow returnemail_blocked(bool) andblocked_reason(bounce/complaint/null, derived from the voter's most recent hard delivery failure via a newVoter::blockedReason()— reuses the already-loadedsentMessages, no new queries).VoterListFull.statsgainsvoters_blocked.GET /api/voterlist/{id}/voters?filter=all|verified|unverified|bounced, so consumers can page through just the bounced/unverified voters instead of filtering one loaded page client-side.created_atonSentMessageBasicso consumers can show when each message was sent (e.g. group a verification's messages by batch into a send history).vendor/mailtheme was still stock Laravel (slate#2d3748button, generic links). Aligned to the eGlasovanje brand (button#34b6df/text#053040, links#1b8fb8, brand neutrals) and a branded header wordmark, keeping the org personalization-logo branch. Affects all sender emails (verification, ballot invite/result, session invite, test).All additive; no behaviour change to existing fields. PHPStan level 8 clean, full suite green (75 tests).