fix: enableOTP not working properly in template

This commit is contained in:
prafull-opensignlabs
2024-09-19 11:28:13 +05:30
parent ff3c31975e
commit 9ea36f94a7
4 changed files with 12 additions and 6 deletions
@@ -44,7 +44,7 @@ const EditTemplate = ({ template, onSuccess }) => {
e.stopPropagation();
const isChecked = formData.SendinOrder === "true" ? true : false;
const AutoReminder = formData?.AutomaticReminders || false;
const IsEnableOTP = formData.IsEnableOTP === "true" ? true : false;
let reminderDate = {};
if (AutoReminder) {
const RemindOnceInEvery = parseInt(formData?.RemindOnceInEvery);
@@ -52,7 +52,12 @@ const EditTemplate = ({ template, onSuccess }) => {
ReminderDate.setDate(ReminderDate.getDate() + RemindOnceInEvery);
reminderDate = { NextReminderDate: ReminderDate };
}
const data = { ...formData, SendinOrder: isChecked, ...reminderDate };
const data = {
...formData,
SendinOrder: isChecked,
IsEnableOTP: IsEnableOTP,
...reminderDate
};
onSuccess(data);
};
const handleAutoReminder = () => {
+2 -1
View File
@@ -708,7 +708,8 @@ export const createDocument = async (
Signers: signers,
SendinOrder: Doc?.SendinOrder || false,
AutomaticReminders: Doc?.AutomaticReminders || false,
RemindOnceInEvery: parseInt(Doc?.RemindOnceInEvery || 5)
RemindOnceInEvery: parseInt(Doc?.RemindOnceInEvery || 5),
IsEnableOTP: Doc?.IsEnableOTP || false
};
try {
+2 -2
View File
@@ -375,7 +375,7 @@ function PdfRequestFiles(props) {
// `currUserId` will be contactId or extUserId
let currUserId;
//getting document details
const documentData = await contractDocument(documentId || docId);
const documentData = await contractDocument(docId);
if (documentData && documentData.length > 0) {
const url =
documentData[0] &&
@@ -903,7 +903,7 @@ function PdfRequestFiles(props) {
setIsSigned(true);
setSignedSigners([]);
setUnSignedSigners([]);
getDocumentDetails(true);
getDocumentDetails(documentId, true);
const index = pdfDetails?.[0]?.Signers.findIndex(
(x) => x.objectId === signerObjectId
);
@@ -779,7 +779,7 @@ const TemplatePlaceholder = () => {
AutomaticReminders: pdfDetails[0]?.AutomaticReminders,
RemindOnceInEvery: parseInt(pdfDetails[0]?.RemindOnceInEvery),
NextReminderDate: pdfDetails[0]?.NextReminderDate,
IsEnableOTP: pdfDetails[0]?.IsEnableOTP === "true" ? true : false,
IsEnableOTP: pdfDetails[0]?.IsEnableOTP === true ? true : false,
URL: pdfUrl
};
const updateTemplate = new Parse.Object("contracts_Template");