NTP-70109 | Passed caseRefId in headers (#1465)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user