From 687c5ff6b4dd4f49dae252bdd7549b7169951a9f Mon Sep 17 00:00:00 2001 From: praveenKDass Date: Thu, 12 Sep 2024 13:12:15 +0530 Subject: [PATCH] bug fixes:certificate lastName issue --- module/userProjects/helper.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/module/userProjects/helper.js b/module/userProjects/helper.js index 3e0f701..9666002 100644 --- a/module/userProjects/helper.js +++ b/module/userProjects/helper.js @@ -2533,12 +2533,17 @@ module.exports = class UserProjectsHelper { } certificateTemplateDetails[0].issuer.kid = CERTIFICATE_ISSUER_KID; } - + let certificateUserName + if(data.userProfile.lastName && data.userProfile.lastName.length > 0){ + certificateUserName = `${data.userProfile.firstName} ${data.userProfile.lastName}` + }else { + certificateUserName = `${data.userProfile.firstName}` + } //create certificate request body let certificateData = { recipient : { id : data.userId, - name : `${data.userProfile.firstName} ${data.userProfile.lastName}`, + name : certificateUserName, type : data.userProfile.profileUserType.type }, templateUrl : data.certificate.templateUrl,