Skip to content

Commit

Permalink
Merge pull request #1489 from sriranjan-s/Dev-2.0
Browse files Browse the repository at this point in the history
added esign payload changes
  • Loading branch information
sriranjan-s authored Oct 24, 2024
2 parents f6953bb + 6aa1875 commit b8d45ad
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,27 @@ export const Request = async ({
if (!params["tenantId"] && window?.globalConfigs?.getConfig("ENABLE_SINGLEINSTANCE")) {
params["tenantId"] = tenantInfo;
}

const res = userDownload
console.log("datadata",data,_url)
let Newdata
let res
if(url.includes("/requester-services-dx/eSign/process"))

{
Newdata = {RequestInfo:data?.RequestInfo, Transaction :{fileStoreId:data?.fileStoreId,pdfUrl
:data?.pdfUrl, module:data?.module, tenantId:data?.tenantId,redirectUrl:data?.redirectUrl,consumerCode:data?.consumerCode}}

res = userDownload
? await Axios({ method, url: _url, data:Newdata, params, headers, responseType: "arraybuffer" })
: await Axios({ method, url: _url, data:Newdata, params, headers });

}
else{
res = userDownload
? await Axios({ method, url: _url, data, params, headers, responseType: "arraybuffer" })
: await Axios({ method, url: _url, data, params, headers });

}

if (userDownload) return res;
const returnData = res?.data || res?.response?.data || {};
if (useCache && res?.data && Object.keys(returnData).length !== 0) {
Expand Down Expand Up @@ -197,6 +213,7 @@ export const ServiceRequest = async ({
console.log("resDataresData",preHookName,postHookName)
let reqParams = params;
let reqData = data;
console.log("reqData",reqData,url)
if (window[preHookName] && typeof window[preHookName] === "function") {
let preHookRes = await window[preHookName]({ params, data });
reqParams = preHookRes.params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const DigiLockerService = {
method: "POST",
auth: true,
userService: true,
data:{ "Transaction":{pdfUrl:data?.TokenReq?.pdfUrl,redirectUrl:"",fileStoreId:data?.TokenReq?.fileStoreId,module:data?.TokenReq?.module,tenantId:data?.TokenReq?.tenantId}}
data:{ pdfUrl:data?.TokenReq?.pdfUrl,redirectUrl:"",fileStoreId:data?.TokenReq?.fileStoreId,module:data?.TokenReq?.module,tenantId:data?.TokenReq?.tenantId,consumerCode:data?.TokenReq?.consumerCode}
})
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,16 @@ const ApplicationDetails = () => {
window.open(fileStore[newResponse.filestoreIds[0]], "_blank");
}
};
const fetchDigiLockerDocuments = async (file,id) => {
const fetchDigiLockerDocuments = async (file,id,res) => {
console.log("res",res)

let TokenReq = {
pdfUrl:file,
tenantId: "pg.citya",
module:"TL",
redirectUrl:"",
"fileStoreId":id
"fileStoreId":id,
"consumerCode": res?.Licenses?.[0]?.licenseNumber
}
const res1 = await Digit.DigiLockerService.pdfUrl({TokenReq})
console.log("res1res1res1res1res1",res1)
Expand All @@ -258,7 +260,7 @@ const ApplicationDetails = () => {
let res = await Digit.TLService.TLsearch({ tenantId: applicationDetails?.tenantId, filters: { applicationNumber:applicationDetails?.applicationData?.applicationNumber } });
const TLcertificatefile = await Digit.PaymentService.generatePdf(tenantId, { Licenses: res?.Licenses }, "tlcertificate");
const receiptFile = await Digit.PaymentService.printReciept(tenantId, { fileStoreIds: TLcertificatefile.filestoreIds[0] });
fetchDigiLockerDocuments(receiptFile[TLcertificatefile.filestoreIds[0]],TLcertificatefile.filestoreIds[0])
fetchDigiLockerDocuments(receiptFile[TLcertificatefile.filestoreIds[0]],TLcertificatefile.filestoreIds[0],res)
//window.open(receiptFile[TLcertificatefile.filestoreIds[0]], "_blank");
setIsDisplayDownloadMenu(false)
}
Expand Down

0 comments on commit b8d45ad

Please sign in to comment.