Skip to content

Frontend/cosmo settings updates#1309

Open
jsandoval81 wants to merge 19 commits intocsg-org:mainfrom
InspiringApps:frontend/cosmo-settings-updates
Open

Frontend/cosmo settings updates#1309
jsandoval81 wants to merge 19 commits intocsg-org:mainfrom
InspiringApps:frontend/cosmo-settings-updates

Conversation

@jsandoval81
Copy link
Copy Markdown
Collaborator

@jsandoval81 jsandoval81 commented Mar 5, 2026

Requirements List

Description List

  • Remove Compact config settings that aren't used for cosmetology
  • Remove State config settings that aren't used for cosmetology

TODO

  • Wait for backend changes to be merged
  • Wait for tickets to be broken out on board and assign Closed # below
  • Wait for PR Frontend/cosmo search updates #1308 to be merged
  • Merge main into this branch

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
    • Login as a Compact Admin for JCC (ASLP / OT / COUN)
      • Navigate to Settings
      • Confirm that all of the expected compact config fields are still present & available (no regressions)
        • E.g. Fees, Summary Report notification email
      • Confirm that the authorize .net card is still present
    • Login as a State Admin for JCC (ASLP / OT / COUN)
      • Navigate to Settings
      • Confirm that all of the expected state config fields are still present & available (no regressions)
        • E.g. Fees, Jurisprudence, Summary Report notification email
    • Login as a Compact Admin for Cosmetology
      • Navigate to Settings
      • Confirm that all of the expected compact config fields match the designs
        • E.g. Does not show Fees, Summary Report notification email
      • Confirm that the authorize .net card is not present
    • Login as a State Admin for Cosmetology
      • Navigate to Settings
      • Confirm that all of the expected state config fields match the designs
        • E.g. Does not show Fees, Jurisprudence, Summary Report notification email

Closes #1307

Summary by CodeRabbit

  • New Features

    • License-number and date-of-birth search/filter; Cosmetology-specific search fields and UI.
    • Added Cosmetologist and Esthetician license types.
  • Improvements

    • App-mode-aware UI: mode-specific fields, headers and actions now show/hide per mode.
    • Deterministic sorting for license and privilege lists; improved card wrapping on small screens.
    • Settings and privilege sections conditionally render per mode; mock jurisdiction entries added.
  • Tests

    • Updated tests to cover compact/app-mode behavior.
  • Chores

    • Adjusted lint rule configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0bb8772d-6869-4bac-a39a-6b9d01faa40d

📥 Commits

Reviewing files that changed from the base of the PR and between 9ee57b1 and 7613562.

📒 Files selected for processing (1)
  • webroot/src/components/PrivilegeCard/PrivilegeCard.vue
✅ Files skipped from review due to trivial changes (1)
  • webroot/src/components/PrivilegeCard/PrivilegeCard.vue

📝 Walkthrough

Walkthrough

Adds application-mode (JCC vs Cosmetology) awareness across store, components, templates, network, models, locales, mocks, and tests; introduces mode-specific getters, conditional rendering/validation/payloads, licenseNumber/dob search plumbing, deterministic sorting, and small styling and lint tweaks.

Changes

Cohort / File(s) Summary
Store & Compact selection
webroot/src/store/global/global.getters.ts, webroot/src/store/user/user.actions.ts, webroot/src/store/user/user.spec.ts
New getters isAppModeJcc / isAppModeCosmetology; setCurrentCompact now sets app mode from compact type and dispatches getCompactStatesRequest; tests updated.
Component mode accessors
webroot/src/components/.../CompactSettingsConfig.ts, webroot/src/components/.../StateSettingsConfig.ts, webroot/src/components/.../PrivilegeCard.ts, webroot/src/components/Licensee/.../LicenseeRow.ts, webroot/src/components/Licensee/.../LicenseeList.ts, webroot/src/components/Licensee/.../LicenseeListLegacy.ts, webroot/src/pages/LicensingDetail/LicensingDetail.ts
Added computed getters exposing store app-mode flags used by templates and logic across multiple components/pages.
Mode-gated templates & inputs
webroot/src/components/CompactSettingsConfig/CompactSettingsConfig.vue, webroot/src/components/StateSettingsConfig/StateSettingsConfig.vue, webroot/src/components/PrivilegeCard/PrivilegeCard.vue, webroot/src/components/Licensee/LicenseeSearch/LicenseeSearch.vue, webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.vue
UI elements (privilege fees, jurisprudence, summary emails, license number, NPI, etc.) are conditionally rendered based on isAppModeJcc / isAppModeCosmetology.
Licensee search & params
webroot/src/components/Licensee/LicenseeSearch/LicenseeSearch.ts, webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.ts, webroot/src/network/searchApi/data.api.ts, webroot/src/network/licenseApi/data.api.ts
Introduced dob and licenseNumber in search interfaces/forms; submission builds allowed-props per app mode; network APIs accept/forward licenseNumber and dob.
Licensee list/row header & columns
webroot/src/components/Licensee/LicenseeList/LicenseeList.ts, webroot/src/components/Licensee/LicenseeListLegacy/LicenseeListLegacy.ts, webroot/src/components/Licensee/LicenseeRow/LicenseeRow.ts, webroot/src/components/Licensee/LicenseeRow/LicenseeRow.vue
headerRecord now conditionally includes licenseNumber (Cosmetology) or privilegeStatesDisplay (JCC); search display fields extended (dob, licenseNumber); new license-number column with sorting/accessibility; practicing-locations shown only in JCC.
Licensing detail sorting & layout
webroot/src/pages/LicensingDetail/LicensingDetail.ts, webroot/src/pages/LicensingDetail/LicensingDetail.vue, webroot/src/pages/LicensingDetail/LicensingDetail.less
Added deterministic sorting helpers for licenses/privileges and inserted break-wrap separators between privilege items; MilitaryAffiliationInfoBlock gated to JCC; layout wrap rule added.
Compact/State settings per-mode payloads & validation
webroot/src/components/CompactSettingsConfig/CompactSettingsConfig.ts, webroot/src/components/StateSettingsConfig/StateSettingsConfig.ts, webroot/src/components/.../CompactSettingsConfig.less, webroot/src/components/.../StateSettingsConfig.less
Form validation and payload assembly split into common vs per-app-mode branches (JCC-only fee/transaction/jurisprudence fields are conditional); CSS selectors generalized to apply to subsequent sections.
Models, locales, mocks, tests
webroot/src/models/License/License.model.ts, webroot/src/models/Licensee/Licensee.model.ts, webroot/src/locales/en.json, webroot/src/locales/es.json, webroot/src/network/mocks/mock.data.ts, webroot/src/store/license/license.mutations.ts, webroot/src/store/license/license.spec.ts
Added COSMETOLOGIST and ESTHETICIAN license types; added stateLicenseNumber locale keys; expanded mock permissions with jurisdictions; license search state includes licenseNumber; tests adjusted.
Search plumbing & API
webroot/src/network/searchApi/data.api.ts, webroot/src/network/licenseApi/data.api.ts
Search request builders accept licenseNumber and dob; these are included in search DSL and remote query when present.
Lint & small component tweak
webroot/.eslintrc.js, webroot/src/components/CompactSelector/CompactSelector.ts
Disabled vue/no-v-for-template-key; removed app mode dispatch from CompactSelector (moved into store action).

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant CompactSelector as CompactSelector (component)
  participant Store
  participant API as getCompactStatesRequest (action/API)
  participant UI as Mode-aware Components

  User->>CompactSelector: select compact
  CompactSelector->>Store: dispatch setCurrentCompact(compact)
  Store->>Store: commit current compact
  Store->>Store: determine AppMode (COSMETOLOGY / JCC)
  Store->>Store: commit setAppMode(AppMode)
  Store->>API: dispatch getCompactStatesRequest(compact.type)
  API-->>Store: return states
  Store-->>UI: state updated (appMode, compactStates)
  UI->>UI: components re-evaluate getters (isAppModeJcc/isAppModeCosmetology)
  UI-->>User: render mode-conditional UI (search fields, fees, columns)
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly Related PRs

Suggested Reviewers

  • jlkravitz
  • isabeleliassen
  • rmolinares

"I nibble code with ear twitch bright,
toggling modes from day to night,
license numbers peek while privileges hide,
getters guide templates where views reside,
a rabbit hops — the UI feels right 🐇"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Frontend/cosmo settings updates' is a high-level descriptor but doesn't clearly convey the main change scope. Consider a more specific title like 'Hide JCC-only settings in Cosmetology mode' or 'Conditionally render compact/state settings by app mode' to better convey the primary change.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The PR description follows the template structure with Requirements, Description, and Testing sections completed.
Linked Issues check ✅ Passed Changes implement conditional app-mode-aware UI rendering and state management for Cosmetology vs JCC modes as required by #1307.
Out of Scope Changes check ✅ Passed All changes directly support the core objective of removing/hiding JCC-only settings in Cosmetology mode; minor CSS tweaks and mock data additions align with implementation needs.
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 unit tests (beta)
  • Create PR with unit tests

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: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
webroot/src/store/license/license.mutations.ts (1)

107-127: ⚠️ Potential issue | 🟡 Minor

Add licenseNumber: '' to the initial search state in license.state.ts.

The mutations reset licenseNumber to an empty string, but the initial state (lines 29-34 in license.state.ts) doesn't include this field, creating an inconsistency. On initial load, state.search.licenseNumber is undefined, but after reset it becomes ''. To maintain a consistent state shape, add licenseNumber: '' to the initial search object alongside the other search fields.

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

In `@webroot/src/store/license/license.mutations.ts` around lines 107 - 127, The
initial search state object is missing the licenseNumber key so
state.search.licenseNumber is undefined on load; update the initial state (the
exported state object / initialState used in license.state.ts where search is
defined) to include licenseNumber: '' alongside compact, firstName, lastName,
and state so the shape matches the reset mutations
(MutationTypes.STORE_RESET_SEARCH and MutationTypes.STORE_RESET_LICENSE).
webroot/src/components/CompactSettingsConfig/CompactSettingsConfig.vue (1)

18-38: ⚠️ Potential issue | 🟠 Major

Hidden JCC-specific fields have required/min validation that blocks Cosmetology mode form submission.

The fields compactFee and summaryReportNotificationEmails are hidden when isAppModeJcc is false (Cosmetology mode), but their FormInput declarations include validation rules that will fail:

  • compactFee: Joi.number().required() — fails if undefined
  • summaryReportNotificationEmails: Joi.array().min(1) — fails on empty array

Since validateAll() in the form mixin validates all form inputs regardless of CSS visibility, Cosmetology admins cannot save settings. Additionally, the always-visible email fields (opsNotificationEmails, adverseActionNotificationEmails) also have .min(1) validation but initialize as empty arrays, creating the same blocking issue.

Fix by:

  1. Conditionally initialize fields only when isAppModeJcc is true, or
  2. Make validation rules conditional based on app mode, or
  3. Populate empty arrays with placeholder values before validation for visible fields
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@webroot/src/components/CompactSettingsConfig/CompactSettingsConfig.vue`
around lines 18 - 38, Hidden JCC-only fields (formData.compactFee and
formData.summaryReportNotificationEmails) are being validated even when
isAppModeJcc is false, blocking Cosmetology saves; update the component so these
fields are only initialized and/or validated when isAppModeJcc is true and
loosen .min(1)/.required() rules for always-visible email lists: change data()
so compactFee and summaryReportNotificationEmails are added to formData only
when isAppModeJcc is true (or set to null/no-op), and update the Joi validation
schema used by validateAll (or the form mixin) to conditionally require
Joi.number().required() and Joi.array().min(1) only when isAppModeJcc is true
(e.g., use Joi.when('isAppModeJcc', ...) or branch the schema creation), or
alternatively allow empty arrays for
opsNotificationEmails/adverseActionNotificationEmails unless the UI shows they
must be populated.
webroot/src/network/licenseApi/data.api.ts (1)

127-146: ⚠️ Potential issue | 🟠 Major

licenseNumber not included in hasSearchTerms, may cause search-only-by-license-number to fail.

The hasSearchTerms check on line 127 does not include licenseNumber:

const hasSearchTerms = Boolean(licenseeId || licenseeFirstName || licenseeLastName);

This means if a user searches only by licenseNumber (without providing any other search terms), hasSearchTerms will be false, and the licenseNumber will never be added to the query (lines 144-146 are inside the if (hasSearchTerms) block).

🐛 Proposed fix to include licenseNumber in hasSearchTerms
-        const hasSearchTerms = Boolean(licenseeId || licenseeFirstName || licenseeLastName);
+        const hasSearchTerms = Boolean(licenseeId || licenseeFirstName || licenseeLastName || licenseNumber);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@webroot/src/network/licenseApi/data.api.ts` around lines 127 - 146, The
hasSearchTerms boolean currently omits licenseNumber so searches by
licenseNumber alone won't populate requestParams.query; update the
hasSearchTerms definition (used around requestParams/query population) to
include licenseNumber (e.g., include licenseNumber in the Boolean expression
that defines hasSearchTerms) so that the subsequent block which sets
requestParams.query.licenseNumber executes when only a license number is
provided.
🧹 Nitpick comments (1)
webroot/src/models/License/License.model.ts (1)

33-34: Add mock data mappings for new license types when they are used in features.

The new COSMETOLOGIST and ESTHETICIAN enum values are correctly defined. However, licenseTypeMap in webroot/src/network/mocks/mock.data.api.ts only includes mappings for ot and ota. When these new license types are used in actual features, add corresponding abbreviation mappings to licenseTypeMap and test data entries to mockPrivilegeHistoryResponses to ensure mock API calls work correctly.

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

In `@webroot/src/models/License/License.model.ts` around lines 33 - 34,
licenseTypeMap is missing mappings for the new enum values COSMETOLOGIST and
ESTHETICIAN and mockPrivilegeHistoryResponses lacks test entries for them; add
entries in the licenseTypeMap (e.g., map the string values 'cosmetologist' and
'esthetician' or the enum LicenseType.COSMETOLOGIST / LicenseType.ESTHETICIAN to
the same abbreviation style used for 'ot'/'ota') and add corresponding mock
objects in mockPrivilegeHistoryResponses so API tests and UI features that
reference COSMETOLOGIST and ESTHETICIAN return realistic mock data; ensure keys
match the enum values and the mock entries include the same fields/shape as
existing privilege history responses.
🤖 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/.eslintrc.js`:
- Line 100: Remove the global disable of the vue/no-v-for-template-key rule and
fix the single violation in LicensingDetail.vue by moving the :key from the
<template v-for="(privilege, index) in licenseePrivileges" :key="index"> to the
child element (e.g., the inner <div>) so the key is applied to the rendered
element, keeping the rule enabled for future checks; if necessary as a minimal
alternative, add an inline eslint-disable-next-line comment immediately above
that template line instead of turning the rule off globally.

In `@webroot/src/components/Licensee/LicenseeList/LicenseeList.ts`:
- Around line 388-390: searchDisplayAll is being left empty when only
searchParams.licenseNumber is set, which triggers the edge-case that reopens the
search modal later; update the code that builds the search summary (the logic
that composes searchDisplayAll in the LicenseeList component) to include
licenseNumber whenever requestConfig.licenseNumber or searchParams.licenseNumber
is present. Specifically, when you set requestConfig.licenseNumber (in the same
block using searchParams), append a human-readable entry for licenseNumber into
the searchDisplayAll aggregation so the component recognizes the search as
non-empty and avoids the modal-reopen edge-case.

In `@webroot/src/components/Licensee/LicenseeListLegacy/LicenseeListLegacy.ts`:
- Around line 324-326: Update the legacy summary and modal-reopen logic to
account for license-number-only searches by including searchParams.licenseNumber
when composing the legacy summary string (the same place you set
requestConfig.licenseNumber) and by changing the modal-reopen condition that
currently only checks searchDisplayAll to also treat a non-empty
searchParams.licenseNumber as a valid search; i.e., when deciding whether to
reopen the search modal, consider both searchDisplayAll and
searchParams.licenseNumber so a license-number-only search does not incorrectly
reopen the modal.

In `@webroot/src/components/StateSettingsConfig/StateSettingsConfig.vue`:
- Around line 18-46: The summaryReportNotificationEmails field defaults to []
but uses Joi.array().min(1) and is always validated by validateAll() even when
hidden via v-if="isAppModeJcc", causing Cosmetology submissions to fail; fix by
making validation conditional: either remove or exclude
summaryReportNotificationEmails from the formInputs list when isAppModeJcc is
false (so validateAll() won't iterate it), or update validateAll() to skip
validation for fields not currently rendered (check isAppModeJcc / the component
visibility flag before validating), and ensure references to
summaryReportNotificationEmails, validateAll(), formInputs, InputEmailList and
isAppModeJcc are updated accordingly.

---

Outside diff comments:
In `@webroot/src/components/CompactSettingsConfig/CompactSettingsConfig.vue`:
- Around line 18-38: Hidden JCC-only fields (formData.compactFee and
formData.summaryReportNotificationEmails) are being validated even when
isAppModeJcc is false, blocking Cosmetology saves; update the component so these
fields are only initialized and/or validated when isAppModeJcc is true and
loosen .min(1)/.required() rules for always-visible email lists: change data()
so compactFee and summaryReportNotificationEmails are added to formData only
when isAppModeJcc is true (or set to null/no-op), and update the Joi validation
schema used by validateAll (or the form mixin) to conditionally require
Joi.number().required() and Joi.array().min(1) only when isAppModeJcc is true
(e.g., use Joi.when('isAppModeJcc', ...) or branch the schema creation), or
alternatively allow empty arrays for
opsNotificationEmails/adverseActionNotificationEmails unless the UI shows they
must be populated.

In `@webroot/src/network/licenseApi/data.api.ts`:
- Around line 127-146: The hasSearchTerms boolean currently omits licenseNumber
so searches by licenseNumber alone won't populate requestParams.query; update
the hasSearchTerms definition (used around requestParams/query population) to
include licenseNumber (e.g., include licenseNumber in the Boolean expression
that defines hasSearchTerms) so that the subsequent block which sets
requestParams.query.licenseNumber executes when only a license number is
provided.

In `@webroot/src/store/license/license.mutations.ts`:
- Around line 107-127: The initial search state object is missing the
licenseNumber key so state.search.licenseNumber is undefined on load; update the
initial state (the exported state object / initialState used in license.state.ts
where search is defined) to include licenseNumber: '' alongside compact,
firstName, lastName, and state so the shape matches the reset mutations
(MutationTypes.STORE_RESET_SEARCH and MutationTypes.STORE_RESET_LICENSE).

---

Nitpick comments:
In `@webroot/src/models/License/License.model.ts`:
- Around line 33-34: licenseTypeMap is missing mappings for the new enum values
COSMETOLOGIST and ESTHETICIAN and mockPrivilegeHistoryResponses lacks test
entries for them; add entries in the licenseTypeMap (e.g., map the string values
'cosmetologist' and 'esthetician' or the enum LicenseType.COSMETOLOGIST /
LicenseType.ESTHETICIAN to the same abbreviation style used for 'ot'/'ota') and
add corresponding mock objects in mockPrivilegeHistoryResponses so API tests and
UI features that reference COSMETOLOGIST and ESTHETICIAN return realistic mock
data; ensure keys match the enum values and the mock entries include the same
fields/shape as existing privilege history responses.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b5ec9f66-bf2a-4bce-871f-0e24eb7fc578

📥 Commits

Reviewing files that changed from the base of the PR and between d1c77a3 and ba5b532.

📒 Files selected for processing (33)
  • webroot/.eslintrc.js
  • webroot/src/components/CompactSelector/CompactSelector.ts
  • webroot/src/components/CompactSettingsConfig/CompactSettingsConfig.less
  • webroot/src/components/CompactSettingsConfig/CompactSettingsConfig.ts
  • webroot/src/components/CompactSettingsConfig/CompactSettingsConfig.vue
  • webroot/src/components/Licensee/LicenseeList/LicenseeList.ts
  • webroot/src/components/Licensee/LicenseeListLegacy/LicenseeListLegacy.ts
  • webroot/src/components/Licensee/LicenseeRow/LicenseeRow.ts
  • webroot/src/components/Licensee/LicenseeRow/LicenseeRow.vue
  • webroot/src/components/Licensee/LicenseeSearch/LicenseeSearch.ts
  • webroot/src/components/Licensee/LicenseeSearch/LicenseeSearch.vue
  • webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.ts
  • webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.vue
  • webroot/src/components/PrivilegeCard/PrivilegeCard.ts
  • webroot/src/components/PrivilegeCard/PrivilegeCard.vue
  • webroot/src/components/StateSettingsConfig/StateSettingsConfig.less
  • webroot/src/components/StateSettingsConfig/StateSettingsConfig.ts
  • webroot/src/components/StateSettingsConfig/StateSettingsConfig.vue
  • webroot/src/locales/en.json
  • webroot/src/locales/es.json
  • webroot/src/models/License/License.model.ts
  • webroot/src/models/Licensee/Licensee.model.ts
  • webroot/src/network/licenseApi/data.api.ts
  • webroot/src/network/mocks/mock.data.ts
  • webroot/src/network/searchApi/data.api.ts
  • webroot/src/pages/LicensingDetail/LicensingDetail.less
  • webroot/src/pages/LicensingDetail/LicensingDetail.ts
  • webroot/src/pages/LicensingDetail/LicensingDetail.vue
  • webroot/src/store/global/global.getters.ts
  • webroot/src/store/license/license.mutations.ts
  • webroot/src/store/license/license.spec.ts
  • webroot/src/store/user/user.actions.ts
  • webroot/src/store/user/user.spec.ts

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

🤖 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/components/CompactSettingsConfig/CompactSettingsConfig.ts`:
- Around line 255-261: The payload builder in CompactSettingsConfig is
unconditionally setting configuredStates to
this.initialCompactConfig?.configuredStates || [], which will wipe configured
states if initialCompactConfig is missing or malformed; change the logic so
configuredStates is only included on the payload when
this.initialCompactConfig?.configuredStates is defined (or valid), otherwise
omit configuredStates from the CompactConfig payload (or preserve the current
form value/source) to avoid accidentally clearing stored states; update the code
that constructs payload (referencing payload, configuredStates,
this.initialCompactConfig, and getCompactConfig) to perform this presence check
before assigning.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4695b966-2c70-4a4b-99f6-dc75f75a26ed

📥 Commits

Reviewing files that changed from the base of the PR and between ba5b532 and d86014c.

📒 Files selected for processing (3)
  • webroot/src/components/CompactSettingsConfig/CompactSettingsConfig.ts
  • webroot/src/components/StateSettingsConfig/StateSettingsConfig.ts
  • webroot/src/models/Compact/Compact.model.ts

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.

🧹 Nitpick comments (1)
webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.vue (1)

15-29: Gate the dev-only wrapper rows with isMockPopulateEnabled.

The controls themselves are mock-mode only, but the two .search-form-row wrappers still render unconditionally. Moving the condition to the wrappers keeps the production form DOM/layout identical when mock mode is off.

♻️ Suggested template cleanup
-            <div class="search-form-row">
+            <div v-if="isMockPopulateEnabled" class="search-form-row">
                 <MockPopulate
                     :isEnabled="isMockPopulateEnabled"
                     `@selected`="mockPopulate"
                     class="mock-populate search-input"
                 />
             </div>
-            <div class="search-form-row">
-                <a
-                    v-if="isMockPopulateEnabled"
+            <div v-if="isMockPopulateEnabled" class="search-form-row">
+                <a
                     `@click`="resetForm()"
                     `@keyup.enter`="resetForm()"
                     class="clear-form search-input"
                 >{{ $t('common.clear') }}</a>
             </div>
Based on learnings, the mock-populate and clear controls are intended to render only in local development mock mode.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.vue`
around lines 15 - 29, The two wrapper divs with class "search-form-row" are
rendered even when mock mode is off; move the mock-mode guard to those wrappers
so the MockPopulate component and the clear link are not present in production
DOM. Concretely, add v-if="isMockPopulateEnabled" to the outer divs that contain
<MockPopulate ... /> and the <a ...> that calls resetForm(), removing or no
longer needing the v-if on the <a> itself, while keeping the existing
props/events (MockPopulate, isMockPopulateEnabled, mockPopulate, resetForm)
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.vue`:
- Around line 15-29: The two wrapper divs with class "search-form-row" are
rendered even when mock mode is off; move the mock-mode guard to those wrappers
so the MockPopulate component and the clear link are not present in production
DOM. Concretely, add v-if="isMockPopulateEnabled" to the outer divs that contain
<MockPopulate ... /> and the <a ...> that calls resetForm(), removing or no
longer needing the v-if on the <a> itself, while keeping the existing
props/events (MockPopulate, isMockPopulateEnabled, mockPopulate, resetForm)
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2755fe26-e048-472a-812e-344d984e0e02

📥 Commits

Reviewing files that changed from the base of the PR and between d86014c and 9ee57b1.

📒 Files selected for processing (10)
  • webroot/src/components/Licensee/LicenseeList/LicenseeList.ts
  • webroot/src/components/Licensee/LicenseeListLegacy/LicenseeListLegacy.ts
  • webroot/src/components/Licensee/LicenseeRow/LicenseeRow.vue
  • webroot/src/components/Licensee/LicenseeSearch/LicenseeSearch.ts
  • webroot/src/components/Licensee/LicenseeSearch/LicenseeSearch.vue
  • webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.less
  • webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.ts
  • webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.vue
  • webroot/src/network/licenseApi/data.api.ts
  • webroot/src/network/searchApi/data.api.ts
✅ Files skipped from review due to trivial changes (1)
  • webroot/src/components/Licensee/LicenseeSearchLegacy/LicenseeSearchLegacy.less
🚧 Files skipped from review as they are similar to previous changes (3)
  • webroot/src/components/Licensee/LicenseeSearch/LicenseeSearch.vue
  • webroot/src/network/searchApi/data.api.ts
  • webroot/src/components/Licensee/LicenseeList/LicenseeList.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FE config changes (compact and state)

1 participant