-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(transport-authority): Handle all warnSever (E, L, W) + dummy mile…
…age in vehicle validation (#16662) * Fix typo * Fix mileageReading vs isRequired Stop using mileageRequired from answers in getSelectedVehicle and always look at the value from externalData (it should not change) * Make sure to always use requiresMileageRegistration from currentvehicleswithmileageandinsp (not basicVehicleInformation) Cleanup make+vehcom (basicVehicleInformation) vs make (currentvehicles) * Cleanup * cleanup * cleanup * cleanup * Use shared function to extract messages from error body Display always E, L and W messages (but E and L first) * Use dummy mileage value when validating per vehicle (owner/operator change) * Catch error from mileage api * Fix the way validation errors are displayed in SGS ownerchange Allow all users to retry submit application if all approvals are finished * Apply same change to change co-owner + change operator Display ValidationErrorMessages always in overview, no matter who is reviewing * Cleanup * Cleanup in LicensePlateRenewal + OrderVehicleLicensePlate Add validation per plate if user has more than 5 * Fix the way vehicle subModel is displayed * Fixes after review * Fix the way errors are displayed for RenewLicensePlate Add MocablePayment * Add validation for OrderVehicleLicensePlate * Cleanup * Fix comment --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b8905ab
commit d89ae9c
Showing
100 changed files
with
1,902 additions
and
1,007 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
40 changes: 40 additions & 0 deletions
40
libs/api/domains/transport-authority/src/lib/graphql/dto/plateOrderAnswers.input.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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Field, InputType } from '@nestjs/graphql' | ||
|
||
@InputType() | ||
export class PlateOrderAnswersPickVehicle { | ||
@Field(() => String, { nullable: false }) | ||
plate!: string | ||
} | ||
|
||
@InputType() | ||
export class PlateOrderAnswersPlateSize { | ||
@Field(() => [String], { nullable: true }) | ||
frontPlateSize?: string[] | ||
|
||
@Field(() => [String], { nullable: true }) | ||
rearPlateSize?: string[] | ||
} | ||
|
||
@InputType() | ||
export class OperatorChangeAnswersPlateDelivery { | ||
@Field(() => String, { nullable: true }) | ||
deliveryMethodIsDeliveryStation?: string | ||
|
||
@Field(() => String, { nullable: true }) | ||
deliveryStationTypeCode?: string | ||
|
||
@Field(() => [String], { nullable: true }) | ||
includeRushFee?: string[] | ||
} | ||
|
||
@InputType() | ||
export class PlateOrderAnswers { | ||
@Field(() => PlateOrderAnswersPickVehicle, { nullable: false }) | ||
pickVehicle!: PlateOrderAnswersPickVehicle | ||
|
||
@Field(() => PlateOrderAnswersPlateSize, { nullable: false }) | ||
plateSize!: PlateOrderAnswersPlateSize | ||
|
||
@Field(() => OperatorChangeAnswersPlateDelivery, { nullable: false }) | ||
plateDelivery!: OperatorChangeAnswersPlateDelivery | ||
} |
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: 19 additions & 0 deletions
19
libs/api/domains/transport-authority/src/lib/graphql/models/plateOrderValidation.model.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Field, ObjectType } from '@nestjs/graphql' | ||
|
||
@ObjectType() | ||
export class PlateOrderValidationMessage { | ||
@Field(() => String, { nullable: true }) | ||
errorNo?: string | null | ||
|
||
@Field(() => String, { nullable: true }) | ||
defaultMessage?: string | null | ||
} | ||
|
||
@ObjectType() | ||
export class PlateOrderValidation { | ||
@Field(() => Boolean) | ||
hasError!: boolean | ||
|
||
@Field(() => [PlateOrderValidationMessage], { nullable: true }) | ||
errorMessages?: PlateOrderValidationMessage[] | null | ||
} |
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
Oops, something went wrong.