forked from Yara724/api
Repair Duration
This commit is contained in:
@@ -66,6 +66,7 @@ import {
|
||||
toFanavaranHullExpertiseDmgSection,
|
||||
toFanavaranHullExpertisePayload,
|
||||
vehicleCurrentValueFromHullPolicyRecord,
|
||||
FANAVARAN_DEFAULT_HULL_REPAIR_DURATION,
|
||||
} from "./fanavaran-hull-expertise";
|
||||
import {
|
||||
asHullDmgAccessoryRows,
|
||||
@@ -4549,10 +4550,7 @@ export class ClaimRequestManagementService {
|
||||
vehicleCurrentValue = vehicleCurrentValueFromHullPolicyRecord(policy);
|
||||
}
|
||||
|
||||
const repairDuration =
|
||||
typeof input.profile.defaults.HullExpertiseRepairDuration === "number"
|
||||
? input.profile.defaults.HullExpertiseRepairDuration
|
||||
: null;
|
||||
const repairDuration = FANAVARAN_DEFAULT_HULL_REPAIR_DURATION;
|
||||
|
||||
return {
|
||||
replyKey: input.replyKey,
|
||||
|
||||
@@ -78,6 +78,9 @@ export {
|
||||
FANAVARAN_HULL_DMG_KIND_CAPTION,
|
||||
} from "./fanavaran-hull-expertise-lookups";
|
||||
|
||||
/** GEN.06 RepairDuration in days for every hull expertise. */
|
||||
export const FANAVARAN_DEFAULT_HULL_REPAIR_DURATION = 3;
|
||||
|
||||
/** GEN.06 VehicleCurrentValue from GET car/vehicle-hull-policies/{PolicyId} → VehicleValue. */
|
||||
export function vehicleCurrentValueFromHullPolicyRecord(
|
||||
policy: Record<string, unknown> | null | undefined,
|
||||
@@ -117,7 +120,8 @@ export function toFanavaranHullExpertisePayload(input: {
|
||||
ComponentReplacementCost: input.componentReplacementCost,
|
||||
WasteValue: input.wasteValue,
|
||||
CarryAndRescueCost: null,
|
||||
RepairDuration: input.repairDuration ?? null,
|
||||
RepairDuration:
|
||||
input.repairDuration ?? FANAVARAN_DEFAULT_HULL_REPAIR_DURATION,
|
||||
VehicleCurrentValue: input.vehicleCurrentValue,
|
||||
WreckHighestValue: null,
|
||||
InspectionDeduction: null,
|
||||
|
||||
Reference in New Issue
Block a user