-
Notifications
You must be signed in to change notification settings - Fork 7
Frontend/adverse action NPDB multi select #1161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
isabeleliassen
merged 39 commits into
csg-org:development
from
InspiringApps:frontend/aa-multi-select
Oct 27, 2025
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
5761f5e
WIP: refactor backend to be multi-service
jusdino 30c31d2
Merge branch 'development' into feat/social-work-reorg
jusdino 88dee92
Docs, common deploy resource stack
jusdino 0b4a1a8
Merge branch 'development' into feat/social-work-reorg
jusdino e2df6c2
Move base pipeline stack to common
jusdino 05e3f1a
Update compact-connect deps
jusdino 29eccc0
Move new frontend tests to frontend app, linting
jusdino 20435f5
Update pipelines to v2
jusdino 600ac63
Remove unsupported commit hook example
jusdino 1794203
Use pipeline role in synth steps
jusdino 6e3b6e6
Merge branch 'development' into feat/social-work-reorg
jusdino 31d208c
Use cross-account role for CodeBuild steps
jusdino b8ad3df
Remove duplicate app_client files
jusdino 322c09b
Remove duplicate app_client files
jusdino f4d5f0f
WIP: refactor backend to be multi-service
jusdino fa7ff53
Docs, common deploy resource stack
jusdino c759a40
Move base pipeline stack to common
jusdino e88f237
Update compact-connect deps
jusdino 7887af2
Move new frontend tests to frontend app, linting
jusdino b2882b5
Update pipelines to v2
jusdino f40792e
Remove unsupported commit hook example
jusdino 7df4820
Use pipeline role in synth steps
jusdino 280307f
Use cross-account role for CodeBuild steps
jusdino 9ead102
Remove duplicate app_client files
jusdino 9322f9f
Merge branch 'tmp' into development
jusdino 3a54823
Merge branch 'development' into feat/social-work-reorg
jusdino 64c80a1
Clean up split nodejs lambda configs
jusdino 038f769
Clean up `cc-ui-app`
jusdino 8560fe7
Split front/back ssm context
jusdino 69a2687
Add ui ssm put script
jusdino a3c2d7a
WIP: adverse action category multi-select
jsandoval81 9b10b79
Merge branch 'development' into frontend/aa-multi-select
jsandoval81 0b56ec5
WIP: adverse action category multi-select
jsandoval81 ef2391c
WIP: adverse action category multi-select
jsandoval81 c168c8f
Merge branch 'development' into frontend/aa-multi-select
jsandoval81 03f56e9
WIP: adverse action category multi-select
jsandoval81 c845560
WIP: adverse action category multi-select
jsandoval81 97ed2d0
WIP: adverse action category multi-select
jsandoval81 7c01b09
WIP: adverse action category multi-select
jsandoval81 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
webroot/src/components/Forms/InputSelectMultiple/InputSelectMultiple.less
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| // | ||
| // InputSelectMultiple.less | ||
| // CompactConnect | ||
| // | ||
| // Created by InspiringApps on 10/2/2025. | ||
| // | ||
|
|
||
| .input-container { | ||
| .multi-select-description { | ||
| display: none; | ||
| font-size: @fontSizeSmaller; | ||
| font-style: italic; | ||
|
|
||
| @media (hover: hover) { | ||
| display: flex; | ||
| } | ||
| } | ||
|
|
||
| .select-dropdown { | ||
| resize: vertical; | ||
| } | ||
|
|
||
| .selected-container { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| width: 100%; | ||
| margin-top: 2rem; | ||
|
|
||
| .selected-value { | ||
| @removeSize: 3.2rem; | ||
|
|
||
| display: flex; | ||
| flex-grow: 0; | ||
| flex-shrink: 1; | ||
| align-items: center; | ||
| width: fit-content; | ||
| min-height: @removeSize; | ||
| margin-bottom: 1rem; | ||
| padding: 0 @removeSize 0 0.8rem; | ||
| border: 1px solid @fontColor; | ||
| border-radius: @borderRadiusPillShape; | ||
| color: @white; | ||
| font-size: @fontSize; | ||
| background-color: @fontColor; | ||
|
|
||
| &:not(:last-child) { | ||
| margin-right: 1rem; | ||
| } | ||
|
|
||
| .remove { | ||
| position: absolute; | ||
| top: 50%; | ||
| right: 0; | ||
| width: @removeSize; | ||
| height: @removeSize; | ||
| margin-left: auto; | ||
| transform: translateY(-50%); | ||
| cursor: pointer; | ||
| stroke: @white; | ||
| } | ||
| } | ||
| } | ||
| } | ||
19 changes: 19 additions & 0 deletions
19
webroot/src/components/Forms/InputSelectMultiple/InputSelectMultiple.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // | ||
| // InputSelectMultiple.spec.ts | ||
| // CompactConnect | ||
| // | ||
| // Created by InspiringApps on 10/2/2025. | ||
| // | ||
|
|
||
| import { expect } from 'chai'; | ||
| import { mountShallow } from '@tests/helpers/setup'; | ||
| import InputSelectMultiple from '@components/Forms/InputSelectMultiple/InputSelectMultiple.vue'; | ||
|
|
||
| describe('InputSelectMultiple component', async () => { | ||
| it('should mount the component', async () => { | ||
| const wrapper = await mountShallow(InputSelectMultiple); | ||
|
|
||
| expect(wrapper.exists()).to.equal(true); | ||
| expect(wrapper.findComponent(InputSelectMultiple).exists()).to.equal(true); | ||
| }); | ||
| }); |
52 changes: 52 additions & 0 deletions
52
webroot/src/components/Forms/InputSelectMultiple/InputSelectMultiple.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| // | ||
| // InputSelectMultiple.ts | ||
| // CompactConnect | ||
| // | ||
| // Created by InspiringApps on 10/2/2025. | ||
| // | ||
|
|
||
| import { | ||
| Component, | ||
| mixins, | ||
| toNative | ||
| } from 'vue-facing-decorator'; | ||
| import { ComputedRef } from 'vue'; | ||
| import MixinInput from '@components/Forms/_mixins/input.mixin'; | ||
| import CloseXIcon from '@components/Icons/CloseX/CloseX.vue'; | ||
|
|
||
| interface SelectOption { | ||
| value: string | number; | ||
| name: string | ComputedRef<string>; | ||
| } | ||
|
|
||
| @Component({ | ||
| name: 'InputSelectMultiple', | ||
| components: { | ||
| CloseXIcon, | ||
| }, | ||
| }) | ||
| class InputSelectMultiple extends mixins(MixinInput) { | ||
| // | ||
| // Methods | ||
| // | ||
| getValueDisplay(value = ''): string | ComputedRef<string> { | ||
| const selectedOption: SelectOption = this.formInput?.valueOptions?.find((option: SelectOption) => | ||
| option.value === value) || { value, name: '' }; | ||
|
|
||
| return selectedOption?.name || ''; | ||
| } | ||
|
|
||
| removeSelectedValue(value): void { | ||
| const { formInput } = this; | ||
|
|
||
| if (Array.isArray(formInput.value)) { | ||
| (formInput.value as Array<string>) = formInput.value.filter((selected) => selected !== value); | ||
| } | ||
|
|
||
| formInput.validate(); | ||
| } | ||
| } | ||
|
|
||
| export default toNative(InputSelectMultiple); | ||
|
|
||
| // export default InputSelectMultiple; |
84 changes: 84 additions & 0 deletions
84
webroot/src/components/Forms/InputSelectMultiple/InputSelectMultiple.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| <!-- | ||
| InputSelectMultiple.vue | ||
| CompactConnect | ||
|
|
||
| Created by InspiringApps on 10/2/2025. | ||
| --> | ||
|
|
||
| <template> | ||
| <div | ||
| class="input-container" | ||
| :class="{ | ||
| 'form-row': formInput.isFormRow, | ||
| 'no-margin': formInput.shouldHideMargin, | ||
| 'has-error': !!formInput.errorMessage | ||
| }" | ||
| > | ||
| <label | ||
| v-if="!formInput.shouldHideLabel" | ||
| :for="formInput.id" | ||
| > | ||
| {{ formInput.label }} | ||
| <span v-if="isRequired" class="required-indicator">*</span> | ||
| </label> | ||
| <div class="multi-select-description">{{ $t('common.selectMultipleKeys') }}</div> | ||
| <select | ||
| multiple="multiple" | ||
| :id="formInput.id" | ||
| :name="formInput.name" | ||
| v-model="formInput.value" | ||
| :aria-label="formInput.label" | ||
| :aria-describedby="`${formInput.id}-error`" | ||
| :aria-errormessage="`${formInput.id}-error`" | ||
| :aria-invalid="!!formInput.errorMessage" | ||
| :autocomplete="formInput.autocomplete" | ||
| @blur="blur(formInput)" | ||
| @change="input(formInput)" | ||
| class="select-dropdown" | ||
| :class="{ | ||
| 'has-error': !!formInput.errorMessage | ||
| }" | ||
| :disabled="formInput.isDisabled" | ||
| > | ||
| <option | ||
| v-for="(option, index) in formInput.valueOptions" | ||
| :key="index" | ||
| :value="option.value" | ||
| :disabled="option.isDisabled" | ||
| > | ||
| {{ option.name }} | ||
| </option> | ||
| </select> | ||
| <span | ||
| v-if="formInput.errorMessage && !formInput.shouldHideErrorMessage" | ||
| :id="`${formInput.id}-error`" | ||
| class="form-field-error" | ||
| role="alert" | ||
| aria-live="assertive" | ||
| > | ||
| {{ formInput.errorMessage }} | ||
| </span> | ||
| <div class="selected-container"> | ||
| <div | ||
| v-for="(value, index) in formInput.value" | ||
| :key="index" | ||
| class="selected-value" | ||
| > | ||
| {{ getValueDisplay(value) }} | ||
| <div | ||
| class="remove" | ||
| :aria-label="`${$t('common.remove')} ${getValueDisplay(value)}`" | ||
| role="button" | ||
| @click="removeSelectedValue(value)" | ||
| @keyup.enter="removeSelectedValue(value)" | ||
| tabindex="0" | ||
| > | ||
| <CloseXIcon /> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
jsandoval81 marked this conversation as resolved.
|
||
| </div> | ||
| </template> | ||
|
|
||
| <script lang="ts" src="./InputSelectMultiple.ts"></script> | ||
| <style scoped lang="less" src="./InputSelectMultiple.less"></style> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.