Enhancement: Achievement/Association award types, misc fixes#454
Enhancement: Achievement/Association award types, misc fixes#454baltinerdist wants to merge 5 commits intoamtgard:masterfrom
Conversation
|
Pushed additional changes to this branch: Event RSVP tab
Player profile officer badges
🤖 Generated with Claude Code |
|
Added email spell-checker to the three player email fields. What it does: On blur of any email input, Applied to:
Implementation: The package ( 🤖 Generated with Claude Code |
|
Bugfix: Email prompt modal suggestion banner (just pushed) The email spell-checker suggestion div inside the email-prompt modal was visible with empty content on page load for any page that doesn't load the revised-frontend stylesheet ( Root causes:
Fix: Made the modal completely self-contained — no dependencies on
|
- Add Achievement Titles and Associations as distinct award type tabs in the Player, Kingdom, and Park award entry modals; splits the award option list by optgroup (Knighthoods/Masterhoods/Paragons/Noble Titles → achievements, Associate Titles → associations). Hidden when no options exist. - Award type row changed from flex to 2-col grid with min-height for cleaner layout at all sizes; responsive font-size at ≤400 px. - Associate Titles removed from award recommendation pickers. - Expose awCloseDropdown globally so switching award type closes any open AC. - Seed kingdom-id hidden input from PkConfig/KnConfig on reset and search clear. - Player attendance: guard against empty KingdomName when displaying location. - Ladder tally: deduplicate ranked entries — count distinct ranks + unranked instead of raw entry count, so duplicate-ranked awards don't inflate level. - Add KnConfig guard to Kingdom rec overlay IIFE to prevent JS errors on pages without that section. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ark columns, officer badge fix - Event RSVP tab: add Sign-in Credits input in actions column header (synced with quick check-in and attendance form via localStorage); pulses 3x on tab open - Event RSVP tab: split kingdom/park out of parenthetical into own columns - Event RSVP tab: add Waivered? column (green check / gray circle) with (?) tooltip - model.Event: include m.waivered in get_rsvp_list query - controller.Player (Playernew profile): remove home-park scope restriction from OfficerRoles query so all current offices are shown, not just home park + kingdom Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ayer email fields Integrates @zootools/email-spell-checker (via esbuild IIFE bundle) to surface typo corrections on email inputs in the three player-facing forms: - Kingdomnew / Parknew "Add Player" modals (#kn-addplayer-email, #pk-addplayer-email) - Playernew "Edit Account" section (#pn-acct-email) On blur, if the checker suggests a correction (e.g. gmial.com → gmail.com), a soft blue suggestion banner appears below the field with "Did you mean X? [Use it] [Dismiss]". Clicking "Use it" fills the input; Dismiss hides the banner. - Adds email-spell-checker.min.js (esbuild IIFE bundle, 6.6 KB) to script dir - Adds window.initEmailSpellCheck() helper to revised.js - Adds .esc-suggestion styles to revised.css - Updates package.json: @zootools/email-spell-checker dep, esbuild devDep, postinstall + build-email-spell-checker scripts Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
… file On page load, players who have no email address in ork_mundane are shown a modal asking them to add one. The modal auto-opens after 400ms (so the page settles first), can be skipped for the browser session via sessionStorage, and submits via AJAX to the new PlayerAjax/save_my_email endpoint. - PlayerAjax::save_my_email(): validates with FILTER_VALIDATE_EMAIL, saves via PDO-bound UPDATE on ork_mundane.email for the logged-in user - default.theme: queries email for the logged-in user; renders modal HTML + CSS + JS only when email is empty; lazy-loads email-spell-checker.min.js if not already present on the page (reuses initEmailSpellCheck from revised.js) - "Skip for now" sets sessionStorage flag to suppress for the rest of the session; modal re-appears on next login session until email is saved Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ible on load The suggestion div was using class esc-suggestion (from revised.css, not loaded globally) and wiring via initEmailSpellCheck (from revised.js, also not globally loaded). This caused the banner to render visible with empty content on any page that doesn't load the revised-frontend stylesheet. Fix: rename div class to emp-suggestion with own inline display:none CSS, add explicit IDs to all suggestion elements, inline runSpellCheck() logic directly — no dependency on revised.css or revised.js. Bundle lazy-loaded if EmailSpellChecker not already defined on the page. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
84eacf3 to
ff79678
Compare
Summary
flexto a 2-column CSS grid withmin-height: 44pxfor consistent sizing across 2 or 4 buttons; responsivefont-sizeat ≤400 px.awCloseDropdownexported — Dropdown closes when switching award type mid-flow.kingdom-idinput now seeded fromPkConfig.kingdomId/KnConfig.kingdomIdon modal reset and search clear, fixing missing kingdom on submitted awards.KingdomNameto avoid trailing,when park name is present.distinct ranked entry count + unranked countinstead of raw total, so the displayed level is alwaysmax(highest actual rank, effective count).ork_officeris a current-state table so filtering bymundane_idalone is authoritative.@zootools/email-spell-checker(esbuild IIFE bundle, 6.6 KB) on the email input in the Kingdomnew/Parknew Add Player modals and the Playernew Edit Account section. On blur, if a domain typo is detected (e.g.gmial.com→gmail.com), a soft blue suggestion banner appears with "Did you mean X? [Use it] [Dismiss]". Bundle is committed to the script directory;package.jsonincludes the dep,esbuilddevDep, and abuild-email-spell-checkerpostinstall step.PlayerAjax/save_my_email), client-side validation, spell-checker suggestion banner, and "Skip for now" option (sessionStorage-gated so it doesn't re-prompt within the same session). Modal is fully self-contained — no dependency on revised-frontend stylesheets or scripts.Test plan
[email protected]) and tab out — verify the suggestion banner appears with the corrected address; click "Use it" and confirm the field updates; click Dismiss to hideNotes
amtgard/ork3master as of 2026-04-09 (includes stale session detection, unit page modal dialog improvements, Dragon banner removal)class.Authorization.phpis intentionally excluded from this PR (contains a local dev login bypass)🤖 Generated with Claude Code