Skip to content

Commit

Permalink
Merge branch 'main' into 10-7959c-h1
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelclement authored Jan 17, 2025
2 parents 1190e35 + 1cbc541 commit 8c25dfe
Show file tree
Hide file tree
Showing 177 changed files with 4,785 additions and 2,414 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ jobs:
name: Unit Tests
needs: [fetch-allow-lists, tests-prep]
timeout-minutes: 30
runs-on: ubuntu-16-cores-latest
runs-on: ubuntu-16-cores-22.04
outputs:
app_folders: ${{ steps.get-changed-apps.outputs.folders }}
changed-files: ${{ steps.get-changed-apps.outputs.changed_files }}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@
"@babel/runtime": "^7.15.4",
"@datadog/browser-logs": "^5.8.0",
"@datadog/browser-rum": "^4.49.0",
"@department-of-veterans-affairs/component-library": "^48.3.0",
"@department-of-veterans-affairs/css-library": "^0.16.1",
"@department-of-veterans-affairs/component-library": "^48.4.0",
"@department-of-veterans-affairs/css-library": "^0.17.0",
"@department-of-veterans-affairs/react-jsonschema-form": "^1.2.5",
"@department-of-veterans-affairs/va-forms-system-core": "1.6.1",
"@department-of-veterans-affairs/vagov-platform": "^0.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,28 @@ export const uiSchema = {
},
'ui:webComponentField': VaTextInputField,
},

state: {
'ui:title': 'State',
'ui:webComponentField': VaSelectField,
'ui:errorMessages': {
required: 'Select a state',
},
'ui:required': formData =>
!formData?.currentMarriageInformation?.outsideUsa,
'ui:options': {
hideIf: formData => formData?.currentMarriageInformation?.outsideUsa,
},
},
country: {
'ui:title': 'Country',
'ui:webComponentField': VaSelectField,
'ui:errorMessages': {
required: 'Select a state',
required: 'Select a country',
},
'ui:required': formData =>
formData?.currentMarriageInformation?.outsideUsa,
'ui:options': {
hideIf: form => form?.currentMarriageInformation?.outsideUsa,
hideIf: formData => !formData?.currentMarriageInformation?.outsideUsa,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ export const spouseMarriageHistoryOptions = {
!item?.endLocation?.location?.city ||
(item?.startLocation?.outsideUsa === false &&
!item?.startLocation?.location?.state) ||
(item?.startLocation?.outsideUsa === true &&
!item?.startLocation?.location?.country) ||
(item?.endLocation?.outsideUsa === false &&
!item?.endLocation?.location?.state),
!item?.endLocation?.location?.state) ||
(item?.endLocation?.outsideUsa === true &&
!item?.endLocation?.location?.country),
maxItems: 20,
text: {
summaryTitle: 'Review your spouse’s former marriages',
Expand Down Expand Up @@ -195,9 +199,7 @@ export const formerMarriageEndDatePage = {

export const formerMarriageStartLocationPage = {
uiSchema: {
...arrayBuilderItemSubsequentPageTitleUI(() => {
return 'Spouse’s former marriage';
}),
...arrayBuilderItemSubsequentPageTitleUI(() => 'Spouse’s former marriage'),
startLocation: {
'ui:title': 'Where did they get married?',
'ui:options': {
Expand All @@ -220,24 +222,35 @@ export const formerMarriageStartLocationPage = {
state: {
'ui:title': 'State',
'ui:webComponentField': VaSelectField,
'ui:required': (formData, index) => {
// See above comment
const isEditMode = formData?.startLocation?.outsideUsa;
const isAddMode =
formData?.spouseMarriageHistory?.[index]?.startLocation
?.outsideUsa;

return !isAddMode && !isEditMode;
'ui:errorMessages': {
required: 'Select a state',
},
'ui:required': (formData, index) =>
!(
formData?.spouseMarriageHistory?.[index]?.startLocation
?.outsideUsa || formData?.startLocation?.outsideUsa
),
'ui:options': {
hideIf: (formData, index) =>
// See above comment
formData?.startLocation?.outsideUsa ||
formData?.spouseMarriageHistory?.[index]?.startLocation
?.outsideUsa,
?.outsideUsa || formData?.startLocation?.outsideUsa,
},
},
country: {
'ui:title': 'Country',
'ui:webComponentField': VaSelectField,
'ui:errorMessages': {
required: 'Select a state',
required: 'Select a country',
},
'ui:required': (formData, index) =>
formData?.spouseMarriageHistory?.[index]?.startLocation
?.outsideUsa || formData?.startLocation?.outsideUsa,
'ui:options': {
hideIf: (formData, index) =>
!(
formData?.spouseMarriageHistory?.[index]?.startLocation
?.outsideUsa || formData?.startLocation?.outsideUsa
),
},
},
},
Expand All @@ -253,9 +266,7 @@ export const formerMarriageStartLocationPage = {

export const formerMarriageEndLocationPage = {
uiSchema: {
...arrayBuilderItemSubsequentPageTitleUI(() => {
return 'Spouse’s former marriage';
}),
...arrayBuilderItemSubsequentPageTitleUI(() => 'Spouse’s former marriage'),
endLocation: {
'ui:title': 'Where did the marriage end?',
'ui:options': {
Expand All @@ -281,22 +292,35 @@ export const formerMarriageEndLocationPage = {
state: {
'ui:title': 'State',
'ui:webComponentField': VaSelectField,
'ui:required': (formData, index) => {
// See above comment
const isEditMode = formData?.endLocation?.outsideUsa;
const isAddMode =
formData?.spouseMarriageHistory?.[index]?.endLocation?.outsideUsa;

return !isAddMode && !isEditMode;
'ui:errorMessages': {
required: 'Select a state',
},
'ui:required': (formData, index) =>
!(
formData?.spouseMarriageHistory?.[index]?.endLocation
?.outsideUsa || formData?.endLocation?.outsideUsa
),
'ui:options': {
hideIf: (formData, index) =>
// See above comment
formData?.endLocation?.outsideUsa ||
formData?.spouseMarriageHistory?.[index]?.endLocation?.outsideUsa,
formData?.spouseMarriageHistory?.[index]?.endLocation
?.outsideUsa || formData?.endLocation?.outsideUsa,
},
},
country: {
'ui:title': 'Country',
'ui:webComponentField': VaSelectField,
'ui:errorMessages': {
required: 'Select a state',
required: 'Select a country',
},
'ui:required': (formData, index) =>
formData?.spouseMarriageHistory?.[index]?.endLocation?.outsideUsa ||
formData?.endLocation?.outsideUsa,
'ui:options': {
hideIf: (formData, index) =>
!(
formData?.spouseMarriageHistory?.[index]?.endLocation
?.outsideUsa || formData?.endLocation?.outsideUsa
),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ export const veteranMarriageHistoryOptions = {
!item?.endLocation?.location?.city ||
(item?.startLocation?.outsideUsa === false &&
!item?.startLocation?.location?.state) ||
(item?.startLocation?.outsideUsa === true &&
!item?.startLocation?.location?.country) ||
(item?.endLocation?.outsideUsa === false &&
!item?.endLocation?.location?.state),
!item?.endLocation?.location?.state) ||
(item?.endLocation?.outsideUsa === true &&
!item?.endLocation?.location?.country),
maxItems: 20,
text: {
getItemName: item =>
Expand Down Expand Up @@ -194,9 +198,7 @@ export const vetFormerMarriageEndDatePage = {

export const vetFormerMarriageStartLocationPage = {
uiSchema: {
...arrayBuilderItemSubsequentPageTitleUI(() => {
return 'Your former marriage';
}),
...arrayBuilderItemSubsequentPageTitleUI(() => 'Your former marriage'),
startLocation: {
'ui:title': 'Where did they get married?',
'ui:options': {
Expand All @@ -219,24 +221,35 @@ export const vetFormerMarriageStartLocationPage = {
state: {
'ui:title': 'State',
'ui:webComponentField': VaSelectField,
'ui:required': (formData, index) => {
// See above comment
const isEditMode = formData?.startLocation?.outsideUsa;
const isAddMode =
formData?.veteranMarriageHistory?.[index]?.startLocation
?.outsideUsa;

return !isAddMode && !isEditMode;
'ui:errorMessages': {
required: 'Select a state',
},
'ui:required': (formData, index) =>
!(
formData?.veteranMarriageHistory?.[index]?.startLocation
?.outsideUsa || formData?.startLocation?.outsideUsa
),
'ui:options': {
hideIf: (formData, index) =>
// See above comment
formData?.startLocation?.outsideUsa ||
formData?.veteranMarriageHistory?.[index]?.startLocation
?.outsideUsa,
?.outsideUsa || formData?.startLocation?.outsideUsa,
},
},
country: {
'ui:title': 'Country',
'ui:webComponentField': VaSelectField,
'ui:errorMessages': {
required: 'Select a state',
required: 'Select a country',
},
'ui:required': (formData, index) =>
formData?.veteranMarriageHistory?.[index]?.startLocation
?.outsideUsa || formData?.startLocation?.outsideUsa,
'ui:options': {
hideIf: (formData, index) =>
!(
formData?.veteranMarriageHistory?.[index]?.startLocation
?.outsideUsa || formData?.startLocation?.outsideUsa
),
},
},
},
Expand All @@ -252,9 +265,7 @@ export const vetFormerMarriageStartLocationPage = {

export const vetFormerMarriageEndLocationPage = {
uiSchema: {
...arrayBuilderItemSubsequentPageTitleUI(() => {
return 'Your former marriage';
}),
...arrayBuilderItemSubsequentPageTitleUI(() => 'Your former marriage'),
endLocation: {
'ui:title': 'Where did the marriage end?',
'ui:options': {
Expand All @@ -280,24 +291,35 @@ export const vetFormerMarriageEndLocationPage = {
state: {
'ui:title': 'State',
'ui:webComponentField': VaSelectField,
'ui:required': (formData, index) => {
// See above comment
const isEditMode = formData?.endLocation?.outsideUsa;
const isAddMode =
formData?.veteranMarriageHistory?.[index]?.endLocation
?.outsideUsa;

return !isAddMode && !isEditMode;
'ui:errorMessages': {
required: 'Select a state',
},
'ui:required': (formData, index) =>
!(
formData?.veteranMarriageHistory?.[index]?.endLocation
?.outsideUsa || formData?.endLocation?.outsideUsa
),
'ui:options': {
hideIf: (formData, index) =>
// See above comment
formData?.endLocation?.outsideUsa ||
formData?.veteranMarriageHistory?.[index]?.endLocation
?.outsideUsa,
?.outsideUsa || formData?.endLocation?.outsideUsa,
},
},
country: {
'ui:title': 'Country',
'ui:webComponentField': VaSelectField,
'ui:errorMessages': {
required: 'Select a state',
required: 'Select a country',
},
'ui:required': (formData, index) =>
formData?.veteranMarriageHistory?.[index]?.endLocation
?.outsideUsa || formData?.endLocation?.outsideUsa,
'ui:options': {
hideIf: (formData, index) =>
!(
formData?.veteranMarriageHistory?.[index]?.endLocation
?.outsideUsa || formData?.endLocation?.outsideUsa
),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,32 @@ export const placeOfBirth = {
state: {
'ui:title': 'State',
'ui:webComponentField': VaSelectField,
'ui:required': formData => {
return formData?.birthLocation?.outsideUsa;
},
'ui:errorMessages': {
required: 'Select a state',
},
'ui:options': {
hideIf: formData => {
return formData?.birthLocation?.outsideUsa;
},
hideIf: formData => formData?.birthLocation?.outsideUsa,
},
'ui:required': formData => !formData?.birthLocation?.outsideUsa,
},
country: {
'ui:title': 'Country',
'ui:webComponentField': VaSelectField,
'ui:errorMessages': {
required: 'Select a country',
},
'ui:options': {
hideIf: formData => !formData?.birthLocation?.outsideUsa,
},
'ui:required': formData => formData?.birthLocation?.outsideUsa,
},
postalCode: {
'ui:title': 'Postal Code',
'ui:webComponentField': VaTextInputField,
'ui:required': formData => {
return !formData?.birthLocation?.outsideUsa;
},
'ui:errorMessages': {
required: 'Enter a postal code',
},
'ui:required': formData => !formData?.birthLocation?.outsideUsa,
},
},
},
Expand Down
Loading

0 comments on commit 8c25dfe

Please sign in to comment.