forked from Yara724/api
Fixed mismatched userId on field expert for claim
This commit is contained in:
@@ -5633,6 +5633,7 @@ export class RequestManagementService {
|
||||
userId: firstPartyUserId,
|
||||
phoneNumber: normalizeIranMobile(formData.firstPartyPhoneNumber) ??
|
||||
formData.firstPartyPhoneNumber,
|
||||
clientId: (client as any)?._id ?? (client as any)?._doc?._id,
|
||||
nationalCodeOfInsurer: firstPartyPlate.nationalCodeOfInsurer,
|
||||
nationalCodeOfDriver: firstPartyPlate.nationalCodeOfDriver,
|
||||
insurerLicense: firstPartyPlate.insurerLicense,
|
||||
@@ -5813,11 +5814,14 @@ export class RequestManagementService {
|
||||
`Client not found for company: ${clientName}`,
|
||||
);
|
||||
}
|
||||
const resolvedClientId =
|
||||
(client as any)?._id ?? (client as any)?._doc?._id;
|
||||
return {
|
||||
role,
|
||||
person: {
|
||||
userId,
|
||||
phoneNumber: normalizeIranMobile(phoneNumber) ?? phoneNumber,
|
||||
...(resolvedClientId ? { clientId: resolvedClientId } : {}),
|
||||
nationalCodeOfInsurer: plateDto.nationalCodeOfInsurer,
|
||||
nationalCodeOfDriver: plateDto.nationalCodeOfDriver,
|
||||
insurerLicense: plateDto.insurerLicense,
|
||||
|
||||
Reference in New Issue
Block a user