forked from Yara724/api
fix: align inquiry errors and expert review rules
This commit is contained in:
@@ -91,6 +91,7 @@ import {
|
||||
ExpertFileActivityType,
|
||||
ExpertFileKind,
|
||||
} from "src/users/entities/schema/expert-file-activity.schema";
|
||||
import { sanitizeStoredInquiryParticipants } from "src/request-management/inquiry-participant-resolver";
|
||||
|
||||
interface CheckedRequestEntry {
|
||||
CheckedRequest?: {
|
||||
@@ -1250,8 +1251,17 @@ export class ExpertBlameService {
|
||||
doc.createdAtFormatted = `${createdDate} ${createdTime}`;
|
||||
doc.updatedAtFormatted = `${updatedDate} ${updatedTime}`;
|
||||
|
||||
// Keep the normalized blame-party participant contract authoritative for
|
||||
// every expert detail response. Legacy person fields remain for old files,
|
||||
// but new UIs must read participants + participantRoles from the same party.
|
||||
doc.parties = parties.map((party: Record<string, unknown>) => ({
|
||||
...party,
|
||||
participants: sanitizeStoredInquiryParticipants(party.participants),
|
||||
participantRoles: party.participantRoles,
|
||||
}));
|
||||
|
||||
// Strip heavy SandHub inquiry blob
|
||||
for (const party of parties as Array<{
|
||||
for (const party of doc.parties as Array<{
|
||||
vehicle?: Record<string, unknown>;
|
||||
}>) {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user