forked from Yara724/api
fix: harden claim review and inquiry workflows
Preserve damage history and current vehicle price, restore depreciation mapping, normalize inquiry/report output, and support resumable expert review with paginated case retrieval.
This commit is contained in:
@@ -85,6 +85,7 @@ import {
|
||||
localizeTimelineMetadata,
|
||||
} from "./helper/timeline-fa-labels";
|
||||
import { buildEnrichedDamagedParts } from "src/expert-claim/dto/claim-damaged-part.enricher";
|
||||
import { serializeDamagedPartSelectionHistory } from "src/helpers/claim-damaged-part-audit";
|
||||
|
||||
@Injectable()
|
||||
export class ExpertInsurerService {
|
||||
@@ -524,6 +525,8 @@ export class ExpertInsurerService {
|
||||
const d = { ...(damage as Record<string, unknown>) };
|
||||
delete d.selectedOuterParts;
|
||||
delete d.selectedPartIds;
|
||||
// Expose the stable, URL-enriched contract instead of raw audit storage.
|
||||
delete d.partSelectionHistory;
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -677,6 +680,10 @@ export class ExpertInsurerService {
|
||||
catalogLikeKeyFromPart,
|
||||
buildFileLink,
|
||||
});
|
||||
const damagedPartsHistory = serializeDamagedPartSelectionHistory({
|
||||
history: (claim as any).damage?.partSelectionHistory,
|
||||
currentSelectedParts: selectedNorm,
|
||||
});
|
||||
|
||||
// Then add damagedParts to the return object
|
||||
const requiredDocs = claim.requiredDocuments as any;
|
||||
@@ -797,6 +804,7 @@ export class ExpertInsurerService {
|
||||
: undefined,
|
||||
carAngles,
|
||||
damagedParts,
|
||||
damagedPartsHistory,
|
||||
videoCapture,
|
||||
evaluation: evaluationEnriched,
|
||||
userRating: claim.userRating,
|
||||
|
||||
Reference in New Issue
Block a user