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/452 step 3 validation fe (#697)
* feat: created new component to deal with agency information * feat: separated commom texts to use on the component * feat: adjusting texts * feat: changng type of agency options * fix: fixing form review component * fix: adjusting declaration of states * feat: adjusted types and replaced agency fields * fix: adjusting onblur event * feat: changing useEffect of ownership step * feat: validation for the portion field * feat: adding new handling functions and other minor fixes * fix: small fixes * feat: removing add button from inside accordion * fix: fixing applicant fields component * fix: minor adjustments * feat: update progress bar for ownership step * fix: adjusting multioptobj fields validation * feat: adjusting style of applicant field * feat: adjusting ownership style * fix: fixed location input when creating a new owner * fix: removing unused functions * fix: fixing form review * fix: removing unused entry of the mock server * fix: fixing options size * feat: adjusting type, fixing validation for date fields, adding applicantfield component to step 3 and other minor fixes * fix: removing storage location field * fix: adjusting style and labels * feat: updating ui and removing unused fields * feat: sync collector's agency and interim agency * feat: adjusting fields according with the new changes and other small fixes * fix: adding back stylesheet import * fix: fixing complete status and minor adjustments * fix: removing unnecessary cast
- Loading branch information
Showing
10 changed files
with
326 additions
and
405 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
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
50 changes: 44 additions & 6 deletions
50
frontend/src/components/SeedlotRegistrationSteps/InterimStep/constants.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,10 +1,48 @@ | ||
const pageTexts = { | ||
import AgencyTextPropsType from '../../../types/AgencyTextPropsType'; | ||
|
||
export const DATE_FORMAT = 'Y/m/d'; | ||
|
||
export const agencyFieldsProps: AgencyTextPropsType = { | ||
useDefaultCheckbox: { | ||
name: 'useCollectorAgency', | ||
labelText: 'Use applicant collector agency as interim storage agency' | ||
}, | ||
agencyInput: { | ||
titleText: 'Interim agency', | ||
invalidText: 'Please choose a valid interim agency, filter with agency number, name or acronym' | ||
}, | ||
locationCode: { | ||
helperTextDisabled: 'Please select an interim agency before setting the agency location code', | ||
helperTextEnabled: '2-digit code that identifies the address of operated office or division', | ||
invalidLocationValue: 'Please enter a valid value between 0 and 99', | ||
invalidLocationForSelectedAgency: 'This agency location code is not valid for the selected agency, please enter a valid one or change the agency' | ||
name: 'locationCode', | ||
labelText: 'Interim agency location code' | ||
} | ||
}; | ||
|
||
export default pageTexts; | ||
export const pageTexts = { | ||
interimTitleSection: { | ||
title: 'Interim agency', | ||
subtitle: 'Enter the interim agency and storage information' | ||
}, | ||
storageDate: { | ||
labelTextStart: 'Storage start date', | ||
labelTextEnd: 'Storage end date', | ||
placeholder: 'yyyy/mm/dd', | ||
helperText: 'year/month/day', | ||
invalidText: 'Please enter a valid date' | ||
}, | ||
storageFacility: { | ||
labelText: 'Storage facility type', | ||
outsideLabel: 'Outside covered - OCV', | ||
outsideValue: 'OCV', | ||
ventilatedLabel: 'Ventilated room - VRM', | ||
ventilatedValue: 'VRM', | ||
reeferLabel: 'Reefer - RFR', | ||
reeferValue: 'RFR', | ||
otherLabel: 'Other - OTH', | ||
otherValue: 'OTH', | ||
otherInput: { | ||
placeholder: 'Enter the storage facility type', | ||
helperText: 'Describe the new storage facility used', | ||
invalidText: 'Storage facility type lenght should be <= 50' | ||
} | ||
} | ||
}; |
18 changes: 10 additions & 8 deletions
18
frontend/src/components/SeedlotRegistrationSteps/InterimStep/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,11 +1,13 @@ | ||
export type InterimForm = { | ||
useCollectorAgencyInfo: boolean, | ||
agencyName: string, | ||
locationCode: string, | ||
startDate: string, | ||
endDate: string, | ||
storageLocation: string, | ||
facilityType: string, | ||
import { BooleanInputType, OptionsInputType, StringInputType } from '../../../types/FormInputType'; | ||
|
||
type InterimForm = { | ||
useCollectorAgencyInfo: BooleanInputType, | ||
agencyName: OptionsInputType, | ||
locationCode: StringInputType, | ||
startDate: StringInputType, | ||
endDate: StringInputType, | ||
facilityType: StringInputType, | ||
facilityOtherType: StringInputType | ||
} | ||
|
||
export default InterimForm; |
Oops, something went wrong.