generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/596 implement edit applicant info screen (#691)
* feat: stashing changes * bug: stuck on useEffect loop * fix: useEffect loop, TODO: add checkbox field back * feat: refactor agency fields * feat: refactor complete, TODO: integrate endpoint * feat: endpoint integration complete * fix: update isInvalid value * fix: resolve conflict * fix: form review * fix: cypress * fix: remove commented out codes * fix: rearranging imports to make mg happy * fix: onblur conditions * fix: typo and style
- Loading branch information
Showing
50 changed files
with
1,469 additions
and
1,122 deletions.
There are no files selected for viewing
This file contains 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 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,62 @@ | ||
[ | ||
{ | ||
"code": "CW", | ||
"label": "CW - Western redcedar", | ||
"description": "Western redcedar" | ||
}, | ||
{ | ||
"code": "DR", | ||
"label": "DR - Red alder", | ||
"description": "Red alder" | ||
}, | ||
{ | ||
"code": "EP", | ||
"label": "EP - Paper birch", | ||
"description": "Paper birch" | ||
}, | ||
{ | ||
"code": "FDC", | ||
"label": "FDC - Coastal Douglas-fir", | ||
"description": "Coastal Douglas-fir" | ||
}, | ||
{ | ||
"code": "FDI", | ||
"label": "FDI - Interior Douglas-fir", | ||
"description": "Interior Douglas-fir" | ||
}, | ||
{ | ||
"code": "HW", | ||
"label": "HW - Western hemlock", | ||
"description": "Western hemlock" | ||
}, | ||
{ | ||
"code": "LW", | ||
"label": "LW - Western larch", | ||
"description": "Western larch" | ||
}, | ||
{ | ||
"code": "PLI", | ||
"label": "PLI - Lodgepole pine", | ||
"description": "Lodgepole pine" | ||
}, | ||
{ | ||
"code": "PW", | ||
"label": "PW - Western white pine", | ||
"description": "Western white pine" | ||
}, | ||
{ | ||
"code": "PY", | ||
"label": "PY - Ponderosa pine", | ||
"description": "Ponderosa pine" | ||
}, | ||
{ | ||
"code": "SS", | ||
"label": "SS - Sitka spruce", | ||
"description": "Sitka spruce" | ||
}, | ||
{ | ||
"code": "SX", | ||
"label": "SX - Spruce hybrid", | ||
"description": "Spruce hybrid" | ||
} | ||
] |
This file contains 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 |
---|---|---|
@@ -1,4 +1,37 @@ | ||
import './commands'; | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') | ||
beforeEach(() => { | ||
cy.intercept( | ||
{ | ||
method: 'GET', | ||
url: '**/api/forest-clients/**' | ||
}, | ||
{ | ||
statusCode: 200 | ||
} | ||
).as('verifyLocationCode'); | ||
|
||
cy.intercept( | ||
{ | ||
method: 'POST', | ||
url: '**/api/seedlots' | ||
}, | ||
{ | ||
statusCode: 201, | ||
body: { | ||
seedlotNumber: '654321' | ||
} | ||
} | ||
).as('submitSeedlot'); | ||
|
||
cy.intercept( | ||
{ | ||
method: 'GET', | ||
url: '**/api/vegetation-codes*' | ||
}, | ||
{ | ||
statusCode: 201, | ||
fixture: 'vegetation-code.json' | ||
} | ||
).as('vegetationCode'); | ||
}); |
This file contains 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 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 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
19 changes: 10 additions & 9 deletions
19
frontend/src/components/ApplicantAgencyFields/definitions.ts
This file contains 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 |
---|---|---|
@@ -1,19 +1,20 @@ | ||
import AgencyTextPropsType from '../../types/AgencyTextPropsType'; | ||
import { FormInputType } from '../../types/FormInputType'; | ||
import { BooleanInputType, OptionsInputType, StringInputType } from '../../types/FormInputType'; | ||
import MultiOptionsObj from '../../types/MultiOptionsObject'; | ||
|
||
interface ApplicantAgencyFieldsProps { | ||
useDefault: FormInputType & { value: boolean }; | ||
agency: FormInputType & { value: string }; | ||
locationCode: FormInputType & { value: string }; | ||
checkboxId: string; | ||
isDefault: BooleanInputType; | ||
agency: OptionsInputType; | ||
locationCode: StringInputType; | ||
fieldsProps: AgencyTextPropsType; | ||
agencyOptions: Array<MultiOptionsObj>; | ||
defaultAgency: string; | ||
defaultCode: string; | ||
setAllValues: Function; | ||
showDefaultCheckbox?: boolean; | ||
inputsColSize?: number; | ||
setAgencyAndCode: Function; | ||
defaultAgency?: MultiOptionsObj; | ||
defaultCode?: string; | ||
showCheckbox?: boolean; | ||
readOnly?: boolean; | ||
maxInputColSize?: number; | ||
} | ||
|
||
export default ApplicantAgencyFieldsProps; |
Oops, something went wrong.