Skip to content

[Cosmetology] Add 'surrender of privilege' encumbrance type#1624

Merged
isabeleliassen merged 3 commits into
csg-org:mainfrom
InspiringApps:feat/add-encumbrance-type
Jun 5, 2026
Merged

[Cosmetology] Add 'surrender of privilege' encumbrance type#1624
isabeleliassen merged 3 commits into
csg-org:mainfrom
InspiringApps:feat/add-encumbrance-type

Conversation

@landonshumway-ia

@landonshumway-ia landonshumway-ia commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

During a demo of the Cosmetology features, it was determined that there needs to be a specific encumbrance type to be used when encumbering privileges. This adds the desired discipline action.

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
  • For API configuration changes: CDK tests added/updated in backend/compact-connect/tests/unit/test_api.py
  • For API endpoint changes: OpenAPI spec updated to show latest endpoint configuration run compact-connect/bin/download_oas30.py
  • Code review

Closes #1617

Summary by CodeRabbit

  • New Features
    • Added "surrender of privilege" as an allowed encumbrance type across APIs, request validation, UI discipline options, and English/Spanish translations.
  • Tests
    • Updated JSON schema snapshots to reflect the expanded encumbranceType enum so requests including the new value validate in tests.

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 03f0c0b6-f72a-4788-8e20-bec2242f2a93

📥 Commits

Reviewing files that changed from the base of the PR and between 28ac6d1 and df47426.

📒 Files selected for processing (4)
  • webroot/src/components/LicenseCard/LicenseCard.ts
  • webroot/src/components/PrivilegeCard/PrivilegeCard.ts
  • webroot/src/locales/en.json
  • webroot/src/locales/es.json
✅ Files skipped from review due to trivial changes (1)
  • webroot/src/locales/es.json

📝 Walkthrough

Walkthrough

Adds "surrender of privilege" as an allowed encumbrance type across the backend enum, API validation and OpenAPI spec, updates test snapshots, adjusts frontend encumbrance option filtering, and adds English/Spanish locale entries.

Changes

Encumbrance Type Enum Extension

Layer / File(s) Summary
Data model enum definition
backend/cosmetology-app/lambdas/python/common/cc_common/data_model/schema/common.py
EncumbranceType enum adds the new member SURRENDER_OF_PRIVILEGE with value 'surrender of privilege'.
API validation schema & OpenAPI
backend/cosmetology-app/stacks/api_stack/v1_api/api_model.py, backend/cosmetology-app/docs/internal/api-specification/latest-oas30.json
The _encumbrance_type_schema and four OpenAPI component schemas are updated to include "surrender of privilege" in the encumbranceType enum.
Test schema snapshots
backend/cosmetology-app/tests/resources/snapshots/*_ENCUMBRANCE_REQUEST_SCHEMA.json, PATCH_*_INVESTIGATION_REQUEST_SCHEMA.json
Request validation JSON snapshots updated to reflect the expanded encumbranceType enum for license and privilege investigation contexts.
Frontend encumber option filtering
webroot/src/components/LicenseCard/LicenseCard.ts, webroot/src/components/PrivilegeCard/PrivilegeCard.ts
encumberDisciplineOptions filtering logic adjusted: cosmetology mode and non-cosmetology branches updated to surface or exclude the appropriate surrender values.
Localization
webroot/src/locales/en.json, webroot/src/locales/es.json
Added locale entries for "surrender of privilege" / "Renuncia de privilegio" in English and Spanish licensing discipline lists.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • ChiefStief
  • jsandoval81
  • jlkravitz

Poem

A rabbit hops through code at night,
Adds a new surrender, soft and light,
Enums and UI now agree,
English, Spanish — one more key,
A tiny hop, the feature's right. 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary change: adding 'surrender of privilege' as a new encumbrance type for the Cosmetology app.
Description check ✅ Passed The description includes context for the change and a complete testing checklist, but lacks requirement/objective details and no issue number was initially visible.
Linked Issues check ✅ Passed The PR successfully implements the primary requirement from issue #1617: adding 'surrender of privilege' as a discipline action for Cosmetology across all relevant layers.
Out of Scope Changes check ✅ Passed All changes directly support the core objective of adding the 'surrender of privilege' encumbrance type with no extraneous modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

@ChiefStief ChiefStief left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@landonshumway-ia

Copy link
Copy Markdown
Collaborator Author

@jlkravitz This PR is now ready for your review. Thanks

@jlkravitz jlkravitz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

one nit!

Comment thread webroot/src/components/LicenseCard/LicenseCard.ts

@jlkravitz jlkravitz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@isabeleliassen This is good to merge.

@isabeleliassen isabeleliassen merged commit 92904ee into csg-org:main Jun 5, 2026
5 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

Development

Successfully merging this pull request may close these issues.

Cosmetology--add "surrender of privilege" as a discipline action

5 participants