-
Notifications
You must be signed in to change notification settings - Fork 24
Add CE status column and filter to registrants index #1833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
ea24d2f
Add CE status column and filter to registrants index
maebeale 88a3808
Gate CE surfaces on the registration form, toggle the index column
maebeale bea6023
Gate CE on Event#ce_eligible? instead of a parallel offers_ce?
maebeale 746d281
Polish registrants roster: CE column default-on, layout + density
maebeale 7424023
Tune registrant profile button to a uniform w-40 name-display width
maebeale f534b79
Widen organization chips (truncate at 52)
maebeale b19825f
Size org chips to fit a full agency name; widen profile column to w-44
maebeale 327ebfb
Uniform person column sized to ~30 chars (truncate names at 30)
maebeale 817a0cf
Color the present registration-form icon blue instead of green
maebeale 76b7ae1
Roster toggles: Organization + Scholarship columns, CE label, icon poβ¦
maebeale e6fe4e2
Recolor CE cell states to mirror scholarship
maebeale 1c50ab4
Registrants roster: CE record progression, comment/org filters, eyebrows
maebeale 52c290a
Extract shared events/filter_select partial for roster + reminder filβ¦
maebeale a074f8b
Account-status filter, shared filter layout, yellow highlight fix
maebeale c66eb01
CE chip says 'Filed' once a license is on file (amount due in tooltip)
maebeale cff7047
Safelist ring colors so the highlight builds; CE Filed=blue, Recipienβ¦
maebeale ddeaf5d
Shrink the shout-out textarea to a single row
maebeale 89afc01
Registrants filters: keyword flexes, Payment after Attendance, thinneβ¦
maebeale 9564faf
Keyword uses min-w-0 so row-1 filters stay one row (wrap only when crβ¦
maebeale fd69e3d
Sync recipients filters with the registrants roster
maebeale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
21 changes: 12 additions & 9 deletions
21
app/frontend/javascript/controllers/column_toggle_controller.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,26 @@ | ||
| import { Controller } from "@hotwired/stimulus" | ||
|
|
||
| // Connects to data-controller="column-toggle" | ||
| // Toggles visibility of table columns marked with a data attribute. | ||
| // Each instance is a single slide switch that shows/hides the table columns | ||
| // whose data-column-toggle-col value matches this switch's `group` value, so a | ||
| // table can host several independent column toggles (e.g. "User confirmation", | ||
| // "CE status"). Columns live outside the switch's element, under a shared | ||
| // [data-column-toggle-root] ancestor. | ||
|
|
||
| export default class extends Controller { | ||
| static targets = ["toggle", "track", "knob"] | ||
| static values = { group: String } | ||
|
|
||
| toggle() { | ||
| const checked = this.toggleTarget.checked | ||
| this.element.querySelectorAll("[data-column-toggle-col]").forEach((el) => { | ||
| const root = this.element.closest("[data-column-toggle-root]") || document | ||
|
|
||
| root.querySelectorAll(`[data-column-toggle-col="${this.groupValue}"]`).forEach((el) => { | ||
| el.classList.toggle("hidden", !checked) | ||
| }) | ||
|
|
||
| if (this.hasTrackTarget) { | ||
| this.trackTarget.classList.toggle("bg-gray-300", !checked) | ||
| this.trackTarget.classList.toggle("bg-blue-600", checked) | ||
| } | ||
| if (this.hasKnobTarget) { | ||
| this.knobTarget.style.transform = checked ? "translateX(16px)" : "" | ||
| } | ||
| this.trackTarget.classList.toggle("bg-gray-300", !checked) | ||
| this.trackTarget.classList.toggle("bg-blue-600", checked) | ||
| this.knobTarget.style.transform = checked ? "translateX(16px)" : "" | ||
| } | ||
| } | ||
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π€ From Claude: Generalized to multiple independent switches keyed by
groupvalue, so the same controller drives both "User confirmation" and "CE status". Columns live under a shared[data-column-toggle-root]ancestor and are matched bydata-column-toggle-col="<group>".