fix: align inquiry errors and expert review rules

This commit is contained in:
SepehrYahyaee
2026-09-19 12:11:43 +03:30
parent 45e0ad883a
commit 406b139b3d
21 changed files with 457 additions and 55 deletions

View File

@@ -147,6 +147,13 @@ import {
getInquiryErrorMessage,
} from "src/common/utils/inquiry-error";
function mappedInquiryErrorMessage(value: any): string | undefined {
const message = value?.mapped?.Error?.Message;
return typeof message === "string" && message.trim()
? message.trim()
: undefined;
}
/**
* Formats a compact Jalali date (number or string like 13780624) as YYYY/MM/DD.
* Returns the original value as a string if it cannot be parsed.
@@ -401,6 +408,7 @@ export class RequestManagementService {
!value?.mapped?.Error &&
!!value?.mapped?.CompanyName &&
isMappedPolicyCurrent(value.mapped),
errorMessage: mappedInquiryErrorMessage,
});
return {
...result.value,
@@ -435,6 +443,7 @@ export class RequestManagementService {
value.mapped.CompanyName ||
value.mapped.companyId
),
errorMessage: mappedInquiryErrorMessage,
});
return {
...result.value,