Skip to content

Frontend/licensee email display#1301

Merged
isabeleliassen merged 3 commits intocsg-org:mainfrom
InspiringApps:frontend/licensee-email-display
Feb 26, 2026
Merged

Frontend/licensee email display#1301
isabeleliassen merged 3 commits intocsg-org:mainfrom
InspiringApps:frontend/licensee-email-display

Conversation

@jsandoval81
Copy link
Copy Markdown
Collaborator

@jsandoval81 jsandoval81 commented Feb 23, 2026

Requirements List

  • None

Description List

  • Statefully cache the user's pre-login compact selection
  • Attempt to honor the user's pre-login compact selection during post-login routing
  • Add email property to the License model
  • Add compact-email property to the Licensee model
  • Display (state) license email and app registration email on the staff licensee detail screen
  • Minor text updates on privilege verification doc
  • Minor value updates to .env.example
  • Minor fix to readSSN permission in mock data

Testing List

  • yarn test:unit:all should run without errors or warnings
  • yarn serve should run without errors or warnings
  • yarn build should run without errors or warnings
  • Code review
  • Testing
    • The selected compact from the pre-login dashboard should be the compact you are routed to post-login IFF you have access to the pre-login selected compact
    • If you select a compact pre-login that you don't have access to, after post-login you should be redirected to a default compact to which you have access
    • When logged in as a Staff user, the licensee detail screen should now have 2 additional fields in the personal information area:
      • Registration email
        • The email the licensee used to register for the CompactConnect app
        • Will only contain a value if the licensee has successfully registered for CompactConnect
      • State email
        • The email sent by the state for the home state license
        • Field is optional when states upload data; will only contain a value if the states provided one
    • When logged in as a Licensee user, the button to get to the verification doc should now have the word "document" fully spelled out (rather than "doc" previously)
    • When logged in as a Licensee user, the text at the bottom of the privilege verification document page should say "CompactConnect" (no space; rather than "Compact Connect" previously)

Closes #1169
Closes #1248
Closes #1296

Summary by CodeRabbit

  • New Features

    • Added state email and registration email fields to licensee information display
    • Enhanced staff login workflow with compact type selection support
  • Style

    • Improved text wrapping and responsive layout for personal information section
  • Chores

    • Updated API endpoint configuration for service routes
    • Updated localization text and branding terminology
    • Refactored mock data structure naming conventions

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 23, 2026

📝 Walkthrough

Walkthrough

This PR adds support for pre-login compact selection persistence and display of email addresses in licensee detail views. Changes include introducing AUTH_LOGIN_GOTO_COMPACT configuration, updating License and Licensee models with email fields, modifying PublicDashboard and App initialization to preserve user's selected compact across login, updating environment endpoints for COSMO, and enhancing the LicensingDetail page with registration and state email display.

Changes

Cohort / File(s) Summary
Environment & Configuration
webroot/.env.example, webroot/src/app.config.ts
Updated COSMO-related API endpoints to new JCC domain and added AUTH_LOGIN_GOTO_COMPACT constant for compact selection persistence.
Model Updates
webroot/src/models/License/License.model.ts, webroot/src/models/License/License.model.spec.ts, webroot/src/models/Licensee/Licensee.model.ts, webroot/src/models/Licensee/Licensee.model.spec.ts
Added email field to License model (maps from server emailAddress) and compactConnectEmail field to Licensee model (maps from server compactConnectRegisteredEmailAddress), with updated tests and serializers.
Application Flow
webroot/src/components/App/App.ts, webroot/src/pages/PublicDashboard/PublicDashboard.ts, webroot/src/pages/PublicDashboard/PublicDashboard.vue
Implemented pre-login compact selection persistence: PublicDashboard now stores selected compact via setGotoCompact(), and App.ts retrieves and applies it to override server-provided default compact during initialization.
Licensing Detail Display
webroot/src/pages/LicensingDetail/LicensingDetail.ts, webroot/src/pages/LicensingDetail/LicensingDetail.vue, webroot/src/pages/LicensingDetail/LicensingDetail.less
Added computed getters for registrationEmail and stateEmail, updated template to display both with localized labels, and enhanced layout with responsive max-width and text-wrapping styles.
Localization
webroot/src/locales/en.json, webroot/src/locales/es.json
Added stateEmail and registrationEmail keys, updated generateVerification label, and changed "Compact Connect" to "CompactConnect" in branding text across both languages.
Mock Data & Testing
webroot/src/network/mocks/mock.data.api.ts, webroot/src/network/mocks/mock.data.ts
Removed conditional permission pruning in mock staff user endpoint, renamed readSsn to readSSN across all permission structures, and added/updated email fields (emailAddress, compactConnectRegisteredEmailAddress) in licensee and license mock entries.

Sequence Diagram

sequenceDiagram
    actor User
    participant PD as PublicDashboard
    participant AS as AuthStorage
    participant Auth as Auth Service
    participant App as App.ts
    participant Server as Backend
    
    User->>PD: Selects compact (e.g., COSMETOLOGY)
    PD->>PD: setGotoCompact(COSMETOLOGY)
    PD->>AS: Stores AUTH_LOGIN_GOTO_COMPACT: COSMETOLOGY
    User->>PD: Initiates mock login
    PD->>Auth: Authenticate user
    Auth->>Server: Fetch user & compacts
    Server-->>Auth: Return user with default compact (e.g., ASLP)
    Auth->>App: Initialize with user data
    App->>AS: Retrieve stored AUTH_LOGIN_GOTO_COMPACT
    AS-->>App: Return COSMETOLOGY
    App->>App: setCurrentCompact(preLoginCompact: COSMETOLOGY)
    App->>App: Override userDefaultCompact to COSMETOLOGY
    App->>User: Redirect to COSMETOLOGY compact
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • jlkravitz
  • rmolinares
  • isabeleliassen

🐰 A compact choice before the login screen,
Now persists through the auth machine,
Emails displayed with such grace,
In the licensee's detail space,
CompactConnect's brand shines serene! 🎯

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Frontend/licensee email display' clearly and specifically describes the main change: adding email display functionality for licensees on the frontend.
Description check ✅ Passed The PR description is comprehensive, including requirements, detailed description of changes, testing list, and issue references that align well with the provided template structure.
Linked Issues check ✅ Passed All code changes directly address the three linked issues: #1169 (email display in licensee detail), #1248 (CompactConnect spacing), and #1296 (pre-login compact selection caching and routing).
Out of Scope Changes check ✅ Passed All changes are scoped to the linked issues: email field additions to models, licensee detail display, compact selection caching, and text/branding updates are all within scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Stylelint (17.3.0)
webroot/src/pages/LicensingDetail/LicensingDetail.less

ConfigurationError: Could not find "stylelint-config-rational-order". Do you need to install the package or use the "configBasedir" option?
at getModulePath (file:///usr/local/lib/node_modules/stylelint/lib/utils/getModulePath.mjs:29:9)
at loadExtendedConfig (file:///usr/local/lib/node_modules/stylelint/lib/augmentConfig.mjs:241:21)
at extendConfig (file:///usr/local/lib/node_modules/stylelint/lib/augmentConfig.mjs:208:25)
at async augmentConfigBasic (file:///usr/local/lib/node_modules/stylelint/lib/augmentConfig.mjs:73:20)
at async augmentConfigFull (file:///usr/local/lib/node_modules/stylelint/lib/augmentConfig.mjs:126:24)
at async getConfigForFile (file:///usr/local/lib/node_modules/stylelint/lib/getConfigForFile.mjs:102:26)
at async resolveOptionValue (file:///usr/local/lib/node_modules/stylelint/lib/utils/resolveOptionValue.mjs:27:24)
at async standalone (file:///usr/local/lib/node_modules/stylelint/lib/standalone.mjs:202:19)

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
webroot/src/pages/LicensingDetail/LicensingDetail.less (1)

173-173: Replace deprecated word-break: break-word with overflow-wrap

word-break: break-word is deprecated per the CSS Text Module Level 3 spec and MDN. The spec defines it as equivalent to word-break: normal combined with overflow-wrap: anywhere. Use overflow-wrap: anywhere for the closest replacement, or overflow-wrap: break-word if the slightly different word-breaking behavior is acceptable.

♻️ Proposed refactor
  .info-item-title {
      font-weight: `@fontWeightBold`;
      font-size: 1.4rem;
      line-height: 2.1rem;
-     word-break: break-word;
+     overflow-wrap: anywhere;
  }

  .info-item {
      font-size: 1.4rem;
      line-height: 2.1rem;
-     word-break: break-word;
+     overflow-wrap: anywhere;
  }

Also applies to: 179-179

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@webroot/src/pages/LicensingDetail/LicensingDetail.less` at line 173, Replace
the deprecated CSS rule "word-break: break-word" in
webroot/src/pages/LicensingDetail/LicensingDetail.less with the modern
equivalent by changing both occurrences of that property to "overflow-wrap:
anywhere" (or "overflow-wrap: break-word" if you prefer the slightly different
behavior); update the rule where "word-break: break-word" appears so the
selector(s) now use "overflow-wrap" to preserve the intended wrapping behavior
across browsers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@webroot/src/pages/LicensingDetail/LicensingDetail.vue`:
- Around line 94-101: Wrap the two email info blocks with v-if guards so they
only render when data exists: add v-if="registrationEmail || isRegistered" (or
v-if="registrationEmail" if there is no isRegistered flag) to the registration
email block that currently shows {{registrationEmail}}, and add
v-if="stateEmail" to the state email block that shows {{stateEmail}}; update the
template around the existing divs containing the info-item-title and info-item
to use these v-if conditions so empty labels do not render.

---

Nitpick comments:
In `@webroot/src/pages/LicensingDetail/LicensingDetail.less`:
- Line 173: Replace the deprecated CSS rule "word-break: break-word" in
webroot/src/pages/LicensingDetail/LicensingDetail.less with the modern
equivalent by changing both occurrences of that property to "overflow-wrap:
anywhere" (or "overflow-wrap: break-word" if you prefer the slightly different
behavior); update the rule where "word-break: break-word" appears so the
selector(s) now use "overflow-wrap" to preserve the intended wrapping behavior
across browsers.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ab2f945 and 2e8f6b8.

📒 Files selected for processing (16)
  • webroot/.env.example
  • webroot/src/app.config.ts
  • webroot/src/components/App/App.ts
  • webroot/src/locales/en.json
  • webroot/src/locales/es.json
  • webroot/src/models/License/License.model.spec.ts
  • webroot/src/models/License/License.model.ts
  • webroot/src/models/Licensee/Licensee.model.spec.ts
  • webroot/src/models/Licensee/Licensee.model.ts
  • webroot/src/network/mocks/mock.data.api.ts
  • webroot/src/network/mocks/mock.data.ts
  • webroot/src/pages/LicensingDetail/LicensingDetail.less
  • webroot/src/pages/LicensingDetail/LicensingDetail.ts
  • webroot/src/pages/LicensingDetail/LicensingDetail.vue
  • webroot/src/pages/PublicDashboard/PublicDashboard.ts
  • webroot/src/pages/PublicDashboard/PublicDashboard.vue

Copy link
Copy Markdown
Collaborator

@rmolinares rmolinares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🚀

@jsandoval81
Copy link
Copy Markdown
Collaborator Author

@jlkravitz This is ready for your review.

Copy link
Copy Markdown
Collaborator

@jlkravitz jlkravitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Tested locally on mock data.

@isabeleliassen Good to merge.

@isabeleliassen isabeleliassen merged commit 4137ec1 into csg-org:main Feb 26, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants