Skip to content

Frontend/cosmo settings updates#1309

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

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

Conversation

@jsandoval81
Copy link
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 #

Summary by CodeRabbit

  • New Features

    • Added license number search/filter and Cosmetology-specific search field.
    • App-mode-aware UI: fields and actions now show or hide based on operation mode.
    • Added Cosmetologist and Esthetician license types.
  • Improvements

    • Improved license/privilege list sorting for deterministic ordering.
    • Better license card layout wrapping on smaller screens.
  • Documentation

    • Added English and Spanish labels for state license number.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2026

Warning

Rate limit exceeded

@jsandoval81 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 5 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 15978db0-6ec0-4b01-a4e8-794af9259c00

📥 Commits

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

📒 Files selected for processing (6)
  • webroot/src/components/Licensee/LicenseeList/LicenseeList.ts
  • webroot/src/components/Licensee/LicenseeListLegacy/LicenseeListLegacy.ts
  • 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
📝 Walkthrough

Walkthrough

Adds application-mode (JCC vs Cosmetology) awareness across the UI, store, network, and models: new store getters, mode-driven component getters and template conditionals, licenseNumber search plumbing, sorting for licenses/privileges, compact-selection mode setting, and related model/localization/mock updates.

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 based on 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 in many 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 now 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 licenseNumber in search interfaces and form data; search submission now conditionally allows licenseNumber for Cosmetology and privilege fields for JCC; network APIs accept and forward licenseNumber.
Licensee list/row header changes & sorting hooks
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); ssnMaskedPartial removed; new columns (practicing-locations, license-number) with sort wiring and accessibility handling.
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; privilege list insertion of break-wrap separators; MilitaryAffiliationInfoBlock gated to JCC.
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 and per-app-mode branches (JCC-specific fee/transaction/jurisprudence fields are conditional); CSS selectors generalized to :not(:first-of-type).
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; new stateLicenseNumber locale keys; added jurisdictions in mock permissions; license search state includes licenseNumber; tests updated.
Lint rule
webroot/.eslintrc.js
Disabled vue/no-v-for-template-key rule.
Other
webroot/src/components/CompactSelector/CompactSelector.ts
Removed dispatch of setAppMode from selector component (moved to store action).

Sequence Diagram(s)

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

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

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly Related PRs

Suggested Reviewers

  • jlkravitz
  • rmolinares
  • isabeleliassen

"I nibble code with ear twitch bright,
toggling modes from day to night,
license numbers peek, privileges hide,
templates hop where getters guide,
a rabbit cheers: the UI's polite 🐇"

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Frontend/cosmo settings updates' is partially related to the changeset, referring to cosmetology/cosmetics settings updates, but is broad and lacks specificity about the main change (conditional hiding of JCC-only fields). Consider a more specific title that captures the primary change, such as 'Conditionally hide JCC-specific settings in Cosmetology mode' or 'Add app-mode-based visibility for Compact and State config fields'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description includes Requirements, Description, TODO, and Testing lists with relevant details, matching the template structure. However, the PR description is incomplete with 'Closes #' left blank and TODO items unchecked, though core testing instructions and objectives are present.
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
  • Post copyable unit tests in a comment

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

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.

1 participant