Merge pull request #15 from OpenSignLabs/staging

sync fork
This commit is contained in:
prafull-opensignlabs
2023-11-13 15:59:51 +05:30
committed by GitHub
3 changed files with 28 additions and 23 deletions
+11 -11
View File
@@ -129,7 +129,7 @@ function Login(props) {
);
if (rolesfiltered.length > 0) {
_currentRole = rolesfiltered[0];
}
}
} else {
const rolesfiltered = userRoles.filter(
(x) => !valuesToExclude.includes(x)
@@ -472,7 +472,7 @@ function Login(props) {
);
if (rolesfiltered.length > 0) {
_currentRole = rolesfiltered[0];
}
}
} else {
const rolesfiltered = userRoles.filter(
(x) => !valuesToExclude.includes(x)
@@ -655,7 +655,6 @@ function Login(props) {
} else {
setThirdpartyLoader(false);
setState({ ...state, loading: false });
}
})
.catch((err) => {
@@ -1171,7 +1170,7 @@ function Login(props) {
<div className="modal-dialog" role="document">
<div className="modal-content">
<div className="modal-header">
<h5 className="modal-title">Login form</h5>
<h5 className="modal-title font-semibold">Additional Info</h5>
<span>
<span></span>
</span>
@@ -1227,18 +1226,19 @@ function Login(props) {
<div className="mt-4">
<button
type="button"
className="bg-[#6c757d] text-sm p-2 text-white rounded uppercase"
onClick={handleCloseModal}
style={{ marginRight: 10, width: 90 }}
className="bg-[#17a2b8] text-sm p-2 text-white rounded uppercase"
onClick={(e) => handleSubmitbtn(e)}
style={{ marginRight: 10 }}
>
Cancel
Login
</button>
<button
type="button"
className="bg-[#17a2b8] text-sm p-2 text-white rounded uppercase"
onClick={(e) => handleSubmitbtn(e)}
className="bg-[#6c757d] text-sm p-2 text-white rounded uppercase"
onClick={handleCloseModal}
style={{ width: 90 }}
>
Login
Cancel
</button>
</div>
</form>
+1 -1
View File
@@ -118,7 +118,7 @@ const Signup = (props) => {
await Parse.User.requestPasswordReset(email).then(
async function (res1) {
if (res1.data === undefined) {
alert("Email has been sent to your mail!");
alert("Verification mail has been sent to your E-mail!");
}
}
);
@@ -500,7 +500,6 @@ function SignYourSelf() {
removeBase64Fromjpeg,
""
);
//function for call to embed signature in pdf and get digital signature pdf
signPdfFun(newImgUrl, documentId, data, pdfBase64, pageNo);
})
@@ -575,14 +574,18 @@ function SignYourSelf() {
const scale = isMobile ? pdfOriginalWidth / newWidth : 1;
const posY = () => {
if (id === 0) {
return (
page.getHeight() -
imgUrlList[id].yPosition * scale -
imgHeight
);
} else if (id > 0) {
return page.getHeight() - imgUrlList[id].yPosition * scale;
if (isMobile) {
if (id === 0) {
return (
page.getHeight() -
imgUrlList[id].yPosition * scale -
imgHeight
);
} else if (id > 0) {
return page.getHeight() - imgUrlList[id].yPosition * scale;
}
} else {
return page.getHeight() - imgUrlList[id].yPosition - imgHeight;
}
};
page.drawImage(img, {
@@ -596,7 +599,6 @@ function SignYourSelf() {
});
}
const pdfBytes = await pdfDoc.saveAsBase64({ useObjectStreams: false });
signPdfFun(pdfBytes, documentId);
}
setIsSignPad(false);
@@ -615,10 +617,11 @@ function SignYourSelf() {
pageNo
) => {
let singleSign;
const isMobile = window.innerWidth < 767;
const newWidth = window.innerWidth;
const scale = isMobile ? pdfOriginalWidth / newWidth : 1;
const imgWidth = xyPosData.Width.Width ? xyPosData.Width.Width : 150;
const imgWidth = xyPosData ? xyPosData.Width : 150;
if (xyPostion.length === 1 && xyPostion[0].pos.length === 1) {
const height = xyPosData.Height ? xyPosData.Height : 60;
const bottomY = xyPosData.isDrag
@@ -1115,6 +1118,8 @@ function SignYourSelf() {
pdfDetails={pdfDetails}
isShowHeader={true}
currentSigner={true}
alreadySign={pdfUrl ? true : false}
isSignYourself={true}
/>
{/* className="hidePdf" */}