mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-04 16:58:05 +02:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3500883205 | ||
|
|
8f2433fbea | ||
|
|
b671dbac19 | ||
|
|
79cdbc9c8c | ||
|
|
e585b7c943 | ||
|
|
5336e2cb7c | ||
|
|
72401291f8 | ||
|
|
7b34314b9e |
@@ -3081,9 +3081,9 @@ export const updateDateWidgetsRes = (documentData, signerId, journey) => {
|
||||
if (item?.signerObjId === signerId) {
|
||||
return {
|
||||
...item,
|
||||
placeHolder: item.placeHolder.map((ph) => ({
|
||||
placeHolder: item?.placeHolder?.map((ph) => ({
|
||||
...ph,
|
||||
pos: ph.pos.map((widget) => {
|
||||
pos: ph?.pos?.map((widget) => {
|
||||
// only for date widgets *and* missing response
|
||||
if (widget.type === "date" && !widget.options.response) {
|
||||
return {
|
||||
|
||||
@@ -264,7 +264,6 @@ function PdfRequestFiles(
|
||||
docId,
|
||||
isNextUser,
|
||||
isSuccessPage = false,
|
||||
publiccontactId
|
||||
) => {
|
||||
try {
|
||||
let isUpdatedSubscribe;
|
||||
@@ -274,7 +273,9 @@ function PdfRequestFiles(
|
||||
const jsonSender = JSON.parse(senderUser);
|
||||
const contactId = jsonSender?.objectId
|
||||
? ""
|
||||
: contactBookId || publiccontactId || signerObjectId || "";
|
||||
: contactBookId ||
|
||||
signerObjectId ||
|
||||
"";
|
||||
const tenantSignTypes = await fetchTenantDetails(contactId);
|
||||
// `currUserId` will be contactId or extUserId
|
||||
let currUserId;
|
||||
@@ -322,7 +323,9 @@ function PdfRequestFiles(
|
||||
|
||||
currUserId = getCurrentSigner?.objectId
|
||||
? getCurrentSigner.objectId
|
||||
: contactBookId || publiccontactId || signerObjectId || ""; //signerObjectId is contactBookId refer from public template flow
|
||||
: contactBookId ||
|
||||
signerObjectId ||
|
||||
""; //signerObjectId is contactBookId refer from public template flow
|
||||
if (currUserId) {
|
||||
setSignerObjectId(currUserId);
|
||||
}
|
||||
@@ -581,9 +584,12 @@ function PdfRequestFiles(
|
||||
}
|
||||
};
|
||||
//function for embed signature or image url in pdf
|
||||
async function embedWidgetsData(publiccontactId, publicDocId) {
|
||||
let contactId = publiccontactId || signerObjectId;
|
||||
let docId = publicDocId || documentId;
|
||||
async function embedWidgetsData(
|
||||
) {
|
||||
let contactId =
|
||||
signerObjectId;
|
||||
let docId =
|
||||
documentId;
|
||||
const addExtraDays = pdfDetails[0]?.TimeToCompleteDays
|
||||
? pdfDetails[0].TimeToCompleteDays
|
||||
: 15;
|
||||
@@ -1023,30 +1029,7 @@ function PdfRequestFiles(
|
||||
}
|
||||
|
||||
const handleSignPdf = async () => {
|
||||
if (props.templateId) {
|
||||
const params = {
|
||||
...contact,
|
||||
templateid: pdfDetails[0]?.objectId,
|
||||
role: pdfDetails[0]?.PublicRole[0]
|
||||
};
|
||||
const linkRes = await axios.post(
|
||||
`${localStorage.getItem(
|
||||
"baseUrl"
|
||||
)}/functions/publicuserlinkcontacttodoc`,
|
||||
params,
|
||||
{
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-Parse-Application-Id": localStorage.getItem("parseAppId")
|
||||
}
|
||||
}
|
||||
);
|
||||
const contactId = linkRes.data.result?.contactId;
|
||||
const docId = linkRes.data?.result?.docId;
|
||||
await embedWidgetsData(contactId, docId);
|
||||
} else {
|
||||
await embedWidgetsData();
|
||||
}
|
||||
};
|
||||
//function for save x and y position and show signature tab on that position
|
||||
const handleTabDrag = (key) => {
|
||||
@@ -1161,7 +1144,6 @@ function PdfRequestFiles(
|
||||
return obj;
|
||||
});
|
||||
setSignerPos(newUpdateSigner);
|
||||
|
||||
setFontSize();
|
||||
setFontColor();
|
||||
handleTextSettingModal(false);
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import path from "path";
|
||||
import rollupNodePolyFill from "rollup-plugin-node-polyfills";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
define: {
|
||||
"process.env.NODE_ENV": JSON.stringify("production"),
|
||||
process: JSON.stringify({
|
||||
env: {
|
||||
NODE_ENV: "production"
|
||||
}
|
||||
})
|
||||
},
|
||||
build: {
|
||||
lib: {
|
||||
entry: path.resolve(__dirname, "src/ee/script/PublicTemplate.jsx"),
|
||||
name: "PublicTemplate",
|
||||
fileName: () => `public-template.bundle.js`,
|
||||
formats: ["iife"]
|
||||
},
|
||||
outDir: "public/static/js",
|
||||
emptyOutDir: false,
|
||||
assetsInlineLimit: 0,
|
||||
copyPublicDir: false,
|
||||
rollupOptions: {
|
||||
plugins: [rollupNodePolyFill()],
|
||||
output: {
|
||||
// 👇 Controls how asset files (like CSS) are named
|
||||
assetFileNames: (assetInfo) => {
|
||||
if (assetInfo.name && assetInfo.name.endsWith(".css")) {
|
||||
return "public-template.bundle.css"; // Custom CSS filename
|
||||
}
|
||||
return "[name].[ext]";
|
||||
},
|
||||
globals: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user