Skip to content
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

Yourgov prefilled employee #1939

Draft
wants to merge 2 commits into
base: usability-testing-feb-25
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/green-peas-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ag.ds-next/yourgov': minor
---

yourgov: Add default employee for usability testing.
5 changes: 5 additions & 0 deletions .changeset/red-sheep-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ag.ds-next/yourgov': patch
---

yourgov: Let vehicle registration field to ignore spaces.
22 changes: 17 additions & 5 deletions yourgov/components/FormMobileFoodVendorPermit/steps/FormState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,15 @@ export type StepBusinessAddressFormSchema = z.infer<
>;

export const stepVehicleRegistrationFormSchema = z.object({
registrationNumber: zodString('Vehicle registration number is required').max(
6,
'Registration number can not be longer than 6 characters'
),
registrationNumber: z
.string()
.transform((value) => value.replace(/\s+/g, ''))
.pipe(
z
.string()
.min(1, { message: 'Vehicle registration number is required' })
.max(6, 'Registration number can not be longer than 6 characters')
),
registrationExpiry: zodDateField('Registration expiry date is required'),
});

Expand Down Expand Up @@ -239,7 +244,14 @@ export const defaultFormState: DeepPartial<FormState> = {
completed: false,
},
stepEmployees: {
employee: [],
employee: [
{
firstName: 'Taj',
lastName: 'Walkley',
email: '[email protected]',
id: 'taj-walkley-employee',
},
],
},
stepUploadDocuments: {
files: {
Expand Down