Skip to content

Commit

Permalink
Merge branch 'main' into ORV2-2682
Browse files Browse the repository at this point in the history
  • Loading branch information
praju-aot authored Sep 9, 2024
2 parents 1da4384 + 2d30e13 commit 8d29a3f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
13 changes: 13 additions & 0 deletions vehicles/src/common/helper/policy-engine.helper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Permit } from "src/modules/permit-application-payment/permit/entities/permit.entity";
import { PolicyApplication } from "../interface/policy-application.interface";
import { PermitData } from "../interface/permit.template.interface";

export const convertToPolicyApplication = (
application: Permit
): PolicyApplication => {
return {
permitType: application.permitType,
permitData: JSON.parse(application.permitData.permitData) as PermitData,
};
};

24 changes: 24 additions & 0 deletions vehicles/src/common/interface/permit.template.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,30 @@ export interface PermitData {
mailingAddress: MailingAddress;
companyName: string;
clientNumber: string;
vehicleConfiguration?: VehicleConfiguration;
applicationNotes?: string;
permittedCommodity?: string;
permittedRoute?: PermittedRoute;
}

interface VehicleConfiguration {
overallLength: number;
overallWidth: number;
overallHeight: number;
frontProjection: number;
rearProjection: number;
trailers: VehicleDetails[];
}

interface PermittedRoute {
routeDetails: string;
manualRoute: ManualRoute;
}

interface ManualRoute {
origin: string;
destination: string;
highwaySequence: string[];
}

interface MailingAddress {
Expand Down
6 changes: 6 additions & 0 deletions vehicles/src/common/interface/policy-application.interface.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { PermitData } from "./permit.template.interface";

export interface PolicyApplication {
permitType: string;
permitData: PermitData;
}

0 comments on commit 8d29a3f

Please sign in to comment.