Repair Duration

This commit is contained in:
2026-09-20 12:06:20 +03:30
parent cf07a33951
commit a8d8df574b
2 changed files with 7 additions and 5 deletions

View File

@@ -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,

View File

@@ -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,