NTP-70109 | Passed caseRefId in headers (#1465)

This commit is contained in:
Ashish Deo
2025-06-11 12:59:00 +05:30
committed by GitHub
parent 778c7de00e
commit 68d961d632

View File

@@ -18,7 +18,7 @@ type DynamicDocumentRendererProps = {
};
function DynamicDocumentRenderer(document: DynamicDocumentRendererProps) {
const [dynamicDocumentUrlLoading, setDynamicDocumentUrlLoading] = useState(false);
const { loanId = '', customerId = '' } = useParams();
const { loanId = '', customerId = '', caseReferenceId = '' } = useParams();
const handleDownloadDynamicDocument = () => {
addClickstreamEvent(clickStreamConstants.LH_DOCUMENT_DOWNLOAD_CLICKED, {
lan: loanId,
@@ -28,13 +28,17 @@ function DynamicDocumentRenderer(document: DynamicDocumentRendererProps) {
setDynamicDocumentUrlLoading(true);
const dynamicDocumentApiUrl = getApiUrl(ApiKeys.GENERATE_DYNAMIC_DOCUMENT_URL);
axiosInstance
.post(dynamicDocumentApiUrl, {
documentGenerationType: document?.documentType,
loanAccountNumber: loanId,
metaData: {
customerReferenceId: customerId
.post(
dynamicDocumentApiUrl,
{
documentGenerationType: document?.documentType,
loanAccountNumber: loanId,
metaData: { customerReferenceId: customerId }
},
{
headers: { caseReferenceId }
}
})
)
.then(response => {
addClickstreamEvent(clickStreamConstants.LH_DOCUMENT_DOWNLOAD_SUCCESS, {
lan: loanId,