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

fix(samgongustofa): shared vehicle radio form field #16905

Merged
merged 34 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cfcba70
Fix typo
johannaagma Oct 29, 2024
59b5641
Fix mileageReading vs isRequired
johannaagma Oct 29, 2024
415f9f5
Make sure to always use requiresMileageRegistration from currentvehic…
johannaagma Oct 30, 2024
75fed9a
Cleanup
johannaagma Oct 30, 2024
4a439c5
cleanup
johannaagma Oct 30, 2024
9fa6c50
cleanup
johannaagma Oct 30, 2024
6b68cf4
cleanup
johannaagma Oct 30, 2024
4985e5b
Merge branch 'main' into fix/transport-authority-error-messages
johannaagma Oct 30, 2024
6789b3b
Use shared function to extract messages from error body
johannaagma Oct 31, 2024
610ca67
Use dummy mileage value when validating per vehicle (owner/operator c…
johannaagma Oct 31, 2024
5e19e11
Merge branch 'main' into fix/transport-authority-error-handling-warns…
johannaagma Nov 6, 2024
46c87c2
Catch error from mileage api
johannaagma Nov 6, 2024
d8931d0
Fix the way validation errors are displayed in SGS ownerchange
johannaagma Nov 11, 2024
b0b1b2c
Apply same change to change co-owner + change operator
johannaagma Nov 11, 2024
be7760d
Cleanup
johannaagma Nov 12, 2024
595e2a2
Cleanup in LicensePlateRenewal + OrderVehicleLicensePlate
johannaagma Nov 12, 2024
1bdb001
Fix the way vehicle subModel is displayed
johannaagma Nov 12, 2024
e62214c
Merge branch 'main' into fix/transport-authority-error-handling-warns…
johannaagma Nov 12, 2024
0de9aee
Fixes after review
johannaagma Nov 12, 2024
426cfa3
Fix the way errors are displayed for RenewLicensePlate
johannaagma Nov 13, 2024
5c0a342
Add validation for OrderVehicleLicensePlate
johannaagma Nov 13, 2024
8f79b5b
Cleanup
johannaagma Nov 13, 2024
708b791
Fix comment
johannaagma Nov 13, 2024
bca0570
Create RadioFormField
johannaagma Nov 14, 2024
b6bd8bf
Fix field currentVehicleList
johannaagma Nov 15, 2024
f491cae
Use RadioFormField in all SGS applications
johannaagma Nov 15, 2024
536117b
Use RadioFormField in all SGS applications
johannaagma Nov 15, 2024
e2aacdc
Merge branch 'fix/samgongustofa-vehicle-radio-form-field' of https://…
johannaagma Nov 15, 2024
714f5f8
Cleanup
johannaagma Nov 15, 2024
e5afb36
Merge branch 'main' into fix/samgongustofa-vehicle-radio-form-field
johannaagma Nov 18, 2024
0b44fba
cleanup
johannaagma Nov 18, 2024
6d5f553
cleanup field names
johannaagma Nov 18, 2024
c3e946e
Fixes after review
johannaagma Nov 19, 2024
b9459f7
Merge branch 'main' into fix/samgongustofa-vehicle-radio-form-field
kodiakhq[bot] Nov 19, 2024
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import {
import { Box } from '@island.is/island-ui/core'
import { FC, useCallback, useEffect } from 'react'
import { CurrentVehiclesAndRecords } from '../../shared'
import { VehicleRadioField } from './VehicleRadioField'
import { useFormContext } from 'react-hook-form'
import { ApolloQueryResult, useMutation } from '@apollo/client'
import { UPDATE_APPLICATION } from '@island.is/application/graphql'
import { useLocale } from '@island.is/localization'
import { FindVehicleFormField } from '@island.is/application/ui-fields'
import {
FindVehicleFormField,
VehicleRadioFormField,
} from '@island.is/application/ui-fields'
import { applicationCheck, error, information } from '../../lib/messages'
import { useLazyVehicleDetails } from '../../hooks/useLazyVehicleDetails'
import { VehicleSelectField } from './VehicleSelectField'
Expand Down Expand Up @@ -92,9 +94,27 @@ export const VehiclesField: FC<React.PropsWithChildren<FieldBaseProps>> = (
{...props}
/>
) : (
<VehicleRadioField
currentVehicleList={currentVehicleList?.vehicles}
<VehicleRadioFormField
{...props}
field={{
id: 'pickVehicle',
title: information.labels.pickVehicle.title,
description: information.labels.pickVehicle.description,
type: FieldTypes.VEHICLE_RADIO,
component: FieldComponents.VEHICLE_RADIO,
children: undefined,
itemType: 'VEHICLE',
itemList: currentVehicleList?.vehicles,
shouldValidateDebtStatus: true,
alertMessageErrorTitle:
information.labels.pickVehicle.hasErrorTitle,
validationErrorMessages: applicationCheck.validation,
validationErrorFallbackMessage:
applicationCheck.validation.fallbackErrorMessage,
inputErrorMessage: error.requiredValidVehicle,
debtStatusErrorMessage:
information.labels.pickVehicle.isNotDebtLessTag,
}}
/>
)}
</Box>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import {
import { Box } from '@island.is/island-ui/core'
import { FC, useCallback, useEffect } from 'react'
import { CurrentVehiclesAndRecords } from '../../shared'
import { VehicleRadioField } from './VehicleRadioField'
import { useFormContext } from 'react-hook-form'
import { ApolloQueryResult, useMutation } from '@apollo/client'
import { UPDATE_APPLICATION } from '@island.is/application/graphql'
import { useLocale } from '@island.is/localization'
import { FindVehicleFormField } from '@island.is/application/ui-fields'
import {
FindVehicleFormField,
VehicleRadioFormField,
} from '@island.is/application/ui-fields'
import { useLazyVehicleDetails } from '../../hooks/useLazyVehicleDetails'
import { applicationCheck, error, information } from '../../lib/messages'
import { VehicleSelectField } from './VehicleSelectField'
Expand Down Expand Up @@ -97,9 +99,27 @@ export const VehiclesField: FC<React.PropsWithChildren<FieldBaseProps>> = (
{...props}
/>
) : (
<VehicleRadioField
currentVehicleList={currentVehicleList?.vehicles}
<VehicleRadioFormField
{...props}
field={{
id: 'pickVehicle',
title: information.labels.pickVehicle.title,
description: information.labels.pickVehicle.description,
type: FieldTypes.VEHICLE_RADIO,
component: FieldComponents.VEHICLE_RADIO,
children: undefined,
itemType: 'VEHICLE',
itemList: currentVehicleList?.vehicles,
shouldValidateDebtStatus: true,
alertMessageErrorTitle:
information.labels.pickVehicle.hasErrorTitle,
validationErrorMessages: applicationCheck.validation,
validationErrorFallbackMessage:
applicationCheck.validation.fallbackErrorMessage,
inputErrorMessage: error.requiredValidVehicle,
debtStatusErrorMessage:
information.labels.pickVehicle.isNotDebtLessTag,
}}
/>
)}
</Box>
Expand Down
Loading