mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-07 18:27:41 +02:00
feat: bulk send is working for exist contact
This commit is contained in:
@@ -118,8 +118,8 @@ const BulkSendUi = (props) => {
|
||||
// Push a new document object with updated Placeholders into the Documents array
|
||||
Documents.push({ ...props.item, Placeholders: updatedPlaceholders });
|
||||
});
|
||||
console.log("Documents ", Documents);
|
||||
// await batchQuery(Documents);
|
||||
// console.log("Documents ", Documents);
|
||||
await batchQuery(Documents);
|
||||
};
|
||||
|
||||
const batchQuery = async (Documents) => {
|
||||
|
||||
@@ -632,11 +632,27 @@ const ReportTable = (props) => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleBulkSend = (template) => {
|
||||
if (template?.Placeholders?.length > 0) {
|
||||
setPlaceholders(template?.Placeholders);
|
||||
setTemplateDetails(template);
|
||||
setIsBulkSend({ [template.objectId]: true });
|
||||
const handleBulkSend = async (template) => {
|
||||
const params = {
|
||||
templateId: template.objectId,
|
||||
include: ["Placeholders.signerPtr"]
|
||||
};
|
||||
const axiosRes = await axios.post(
|
||||
`${localStorage.getItem("baseUrl")}functions/getTemplate`,
|
||||
params,
|
||||
{
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Parse-Application-Id": localStorage.getItem("parseAppId"),
|
||||
sessionToken: localStorage.getItem("accesstoken")
|
||||
}
|
||||
}
|
||||
);
|
||||
const templateRes = axiosRes.data && axiosRes.data.result;
|
||||
if (templateRes?.Placeholders?.length > 0) {
|
||||
setPlaceholders(templateRes?.Placeholders);
|
||||
setTemplateDetails(templateRes);
|
||||
setIsBulkSend({ [templateRes.objectId]: true });
|
||||
} else {
|
||||
setIsDocErr(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user