From a3ada8d8b1afe571494fd7842c8039c58b80b1ce Mon Sep 17 00:00:00 2001 From: John Sandoval Date: Wed, 5 Aug 2026 11:42:28 -0600 Subject: [PATCH 1/2] WIP: SW discipline updates --- .../src/components/LicenseCard/LicenseCard.ts | 4 + .../components/LicenseCard/LicenseCard.vue | 2 +- .../components/PrivilegeCard/PrivilegeCard.ts | 4 + .../PrivilegeCard/PrivilegeCard.vue | 2 +- webroot/src/locales/en.json | 1 + webroot/src/locales/es.json | 1 + .../PublicLicensingDetail.less | 89 +++++++++++++++++++ .../PublicLicensingDetail.ts | 60 +++++++++++++ .../PublicLicensingDetail.vue | 44 +++++++++ 9 files changed, 205 insertions(+), 2 deletions(-) diff --git a/webroot/src/components/LicenseCard/LicenseCard.ts b/webroot/src/components/LicenseCard/LicenseCard.ts index 8f9d6e506e..804435e806 100644 --- a/webroot/src/components/LicenseCard/LicenseCard.ts +++ b/webroot/src/components/LicenseCard/LicenseCard.ts @@ -275,6 +275,10 @@ class LicenseCard extends mixins(MixinForm) { return content; } + get shouldShowDiscipline(): boolean { + return !this.isPublicSearch || this.isAppModeSocialWork; + } + get adverseActions(): Array { return this.license?.adverseActions || []; } diff --git a/webroot/src/components/LicenseCard/LicenseCard.vue b/webroot/src/components/LicenseCard/LicenseCard.vue index a69af609f0..e09f523b01 100644 --- a/webroot/src/components/LicenseCard/LicenseCard.vue +++ b/webroot/src/components/LicenseCard/LicenseCard.vue @@ -110,7 +110,7 @@
{{$t('licensing.licenseNumSymbol')}}
{{licenseNumber}}
-
+
{{ $t('licensing.disciplineStatus') }}
{{disciplineContent}}
diff --git a/webroot/src/components/PrivilegeCard/PrivilegeCard.ts b/webroot/src/components/PrivilegeCard/PrivilegeCard.ts index 8c0513fee8..019207f250 100644 --- a/webroot/src/components/PrivilegeCard/PrivilegeCard.ts +++ b/webroot/src/components/PrivilegeCard/PrivilegeCard.ts @@ -226,6 +226,10 @@ class PrivilegeCard extends mixins(MixinForm) { return content; } + get shouldShowDiscipline(): boolean { + return !this.isPublicSearch || this.isAppGroupModePrivilegePurchase || this.isAppModeSocialWork; + } + get adverseActions(): Array { return this.privilege?.adverseActions || []; } diff --git a/webroot/src/components/PrivilegeCard/PrivilegeCard.vue b/webroot/src/components/PrivilegeCard/PrivilegeCard.vue index 0e96db9736..ac7790249f 100644 --- a/webroot/src/components/PrivilegeCard/PrivilegeCard.vue +++ b/webroot/src/components/PrivilegeCard/PrivilegeCard.vue @@ -105,7 +105,7 @@
{{privilegeId}}
{{ $t('licensing.disciplineStatus') }}
diff --git a/webroot/src/locales/en.json b/webroot/src/locales/en.json index 578f92ebed..bcbfc8602c 100644 --- a/webroot/src/locales/en.json +++ b/webroot/src/locales/en.json @@ -672,6 +672,7 @@ "disciplineTitle": "Disciplinary information", "disciplineStatus": "Discipline status", "noDiscipline": "No discipline", + "disciplineDisclaimer": "For further information regarding disciplinary action, please visit the website of the relevant licensing board in the state where the license or privilege is held.", "twoHomeStateErrorMessage": "Two states have you listed as a resident. Please update your information with those states to reflect your current residency status.", "jurisprudenceExplanationText": "I attest I have successfully completed a jurisprudence exam for this state, if required", "scopeAttestTitle": "Scope of practice attestation", diff --git a/webroot/src/locales/es.json b/webroot/src/locales/es.json index c8ddf62d07..8934c511ff 100644 --- a/webroot/src/locales/es.json +++ b/webroot/src/locales/es.json @@ -659,6 +659,7 @@ "scopeAttestTitle": "Alcance de la certificación de práctica", "scopeAttestLabel": "Haga clic aquí para leer y afirmar el alcance de la certificación de práctica.", "noDiscipline": "No disciplina", + "disciplineDisclaimer": "Para obtener más información sobre las medidas disciplinarias, visite el sitio web de la junta de licencias correspondiente en el estado donde se posee la licencia o privilegio.", "houseIcon": "Icono de la casa", "twoHomeStateErrorMessage": "Dos estados lo tienen incluido como residente. Actualice su información con esos estados para reflejar su estado de residencia actual.", "state": "Estado", diff --git a/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.less b/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.less index 0cb979bc0e..dd3c0e305f 100644 --- a/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.less +++ b/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.less @@ -31,6 +31,16 @@ width: 3.2rem; height: 2.8rem; } + + .alert-icon { + width: 3.2rem; + height: 2.8rem; + stroke: @fontColor; + + &:deep(.custom-fill) { + fill: @fontColor; + } + } } :deep(.collapse-caret-button) { @@ -42,6 +52,12 @@ } } + .title-description { + max-width: 56rem; + margin-left: 4rem; + color: darken(@lightTextGrey, 5%); + } + .licensee-header { display: flex; flex-direction: column; @@ -213,6 +229,79 @@ } } + .discipline-section { + margin: @spacingMobile; + padding-top: @spacingMobile; + padding-bottom: 4rem; + border-top: 1px solid @lightGrey; + + @media @tabletWidth { + margin: @spacingMobile @spacingTablet; + padding-top: @spacingMobile; + } + + @media @desktopWidth { + margin: @spacingMobile @spacingDesktop; + padding-top: @spacingMobile; + } + + .discipline-list-container { + display: flex; + width: 100%; + } + + .discipline-list { + display: flex; + flex-direction: column; + width: 100%; + + .discipline-row { + display: flex; + flex-direction: column; + padding: 1.6rem 0; + + &:not(:first-child) { + border-top: 1px solid @lightGrey; + } + + @media @tabletWidth { + flex-direction: row; + } + + &.header { + font-weight: @fontWeightBold; + } + } + + .discipline-cell { + display: flex; + + @media @tabletWidth { + align-items: center; + } + + &.state { + flex-basis: 18%; + } + + &.start-date { + flex-basis: 18%; + } + + &.end-date { + flex-basis: 18%; + } + + .cell-title { + flex-shrink: 0; + width: 14.4rem; + padding-right: 0.4rem; + font-weight: @fontWeightBold; + } + } + } + } + .no-touch-item { margin: 1rem; } diff --git a/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.ts b/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.ts index 2b46440840..ba31534e6c 100644 --- a/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.ts +++ b/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.ts @@ -12,14 +12,17 @@ import PrivilegeCard from '@/components/PrivilegeCard/PrivilegeCard.vue'; import CollapseCaretButton from '@components/CollapseCaretButton/CollapseCaretButton.vue'; import ExpirationExplanationIcon from '@components/Icons/ExpirationExplanationIcon/ExpirationExplanationIcon.vue'; import LicenseIcon from '@components/Icons/LicenseIcon/LicenseIcon.vue'; +import AlertCircleIcon from '@components/Icons/AlertCircle/AlertCircle.vue'; import { Licensee } from '@models/Licensee/Licensee.model'; import { License, LicenseStatus } from '@models/License/License.model'; +import { AdverseAction } from '@models/AdverseAction/AdverseAction.model'; @Component({ name: 'PublicLicensingDetail', components: { LoadingSpinner, LicenseIcon, + AlertCircleIcon, LicenseCard, PrivilegeCard, CollapseCaretButton, @@ -32,6 +35,7 @@ export default class PublicLicensingDetail extends Vue { // isLicensesCollapsed = false; isPrivsCollapsed = false; + isDisciplineCollapsed = false; // // Lifecycle @@ -53,6 +57,10 @@ export default class PublicLicensingDetail extends Vue { return this.$store.state.user; } + get isAppModeSocialWork(): boolean { + return this.$store.getters.isAppModeSocialWork; + } + get isAppGroupModeMultiState(): boolean { return this.$store.getters.isAppGroupModeMultiState; } @@ -121,6 +129,16 @@ export default class PublicLicensingDetail extends Vue { return this.licensee?.homeJurisdiction?.name() || ''; } + get licenseeDiscipline(): Array { + return (this.licensee?.adverseActions || []).slice().sort(this.sortDiscipline); + } + + get disciplineDisclaimer(): string { + const { licenseeDiscipline, isAppModeSocialWork } = this; + + return (licenseeDiscipline.length && isAppModeSocialWork) ? this.$t('licensing.disciplineDisclaimer') : ''; + } + // // Methods // @@ -142,6 +160,10 @@ export default class PublicLicensingDetail extends Vue { this.isPrivsCollapsed = !this.isPrivsCollapsed; } + toggleDisciplineCollapsed(): void { + this.isDisciplineCollapsed = !this.isDisciplineCollapsed; + } + sortLicenses(license1: License, license2: License): number { let sort = this.sortByIssueState(license1, license2); @@ -189,4 +211,42 @@ export default class PublicLicensingDetail extends Vue { return sort; } + + sortDiscipline(action1: AdverseAction, action2: AdverseAction): number { + let sort = this.sortByDisciplineStart(action1, action2); + + if (sort === 0) { + sort = this.sortByDisciplineState(action1, action2); + } + + return sort; + } + + sortByDisciplineStart(action1: AdverseAction, action2: AdverseAction): number { + const startDate1 = action1.startDate || ''; + const startDate2 = action2.startDate || ''; + let sort = 0; + + if (startDate1 < startDate2) { + sort = -1; + } else if (startDate1 > startDate2) { + sort = 1; + } + + return sort; + } + + sortByDisciplineState(action1: AdverseAction, action2: AdverseAction): number { + const state1 = action1.state?.name().toLowerCase() || ''; + const state2 = action2.state?.name().toLowerCase() || ''; + let sort = 0; + + if (state1 < state2) { + sort = -1; + } else if (state1 > state2) { + sort = 1; + } + + return sort; + } } diff --git a/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.vue b/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.vue index f206594799..0863f20781 100644 --- a/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.vue +++ b/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.vue @@ -86,6 +86,50 @@ />
+
+
+
+
+ +
+
{{ $t('licensing.disciplineTitle') }}
+
+ +
+
{{ disciplineDisclaimer }}
+
+
+ {{ $t('licensing.noDiscipline') }} +
+
+
+
{{ $t('common.state') }}
+
{{ $t('common.startDate') }}
+
{{ $t('common.endDate') }}
+
+
+
+ + {{ $t('common.state') }}: + + {{ discipline.state.name() }} +
+
+ + {{ $t('common.startDate') }}: + + {{ discipline.startDateDisplay() }} +
+
+ + {{ $t('common.endDate') }}: + + {{ discipline.endDateDisplay() }} +
+
+
+
+
From 69d5a54511f3d23c74e15eecf38cbbda01b499bc Mon Sep 17 00:00:00 2001 From: John Sandoval Date: Tue, 11 Aug 2026 11:16:06 -0600 Subject: [PATCH 2/2] WIP: SW discipline updates --- .../components/PrivilegeCard/PrivilegeCard.ts | 4 ++- .../PublicLicensingDetail.vue | 31 +++++++++++++------ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/webroot/src/components/PrivilegeCard/PrivilegeCard.ts b/webroot/src/components/PrivilegeCard/PrivilegeCard.ts index 019207f250..7e708a4b11 100644 --- a/webroot/src/components/PrivilegeCard/PrivilegeCard.ts +++ b/webroot/src/components/PrivilegeCard/PrivilegeCard.ts @@ -227,7 +227,9 @@ class PrivilegeCard extends mixins(MixinForm) { } get shouldShowDiscipline(): boolean { - return !this.isPublicSearch || this.isAppGroupModePrivilegePurchase || this.isAppModeSocialWork; + return this.isAppGroupModePrivilegePurchase // JCC compacts public & staff + || this.isAppModeSocialWork // Social Work compact public & staff + || this.isCurrentUserPrivilegeAdmin; // Any compact if staff user is admin of that state } get adverseActions(): Array { diff --git a/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.vue b/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.vue index 0863f20781..762c6c100c 100644 --- a/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.vue +++ b/webroot/src/pages/PublicLicensingDetail/PublicLicensingDetail.vue @@ -92,7 +92,7 @@
-
{{ $t('licensing.disciplineTitle') }}
+
{{ $t('licensing.disciplineTitle') }}
@@ -101,26 +101,37 @@
{{ $t('licensing.noDiscipline') }}
-
-
-
{{ $t('common.state') }}
-
{{ $t('common.startDate') }}
-
{{ $t('common.endDate') }}
+
+
+
+ {{ $t('common.state') }} +
+
+ {{ $t('common.startDate') }} +
+
+ {{ $t('common.endDate') }} +
-
-
+
+
{{ $t('common.state') }}: {{ discipline.state.name() }}
-
+
{{ $t('common.startDate') }}: {{ discipline.startDateDisplay() }}
-
+
{{ $t('common.endDate') }}: