mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-17 21:25:54 +02:00
Merge pull request #1137 from nxglabs/signers_completed_main
fix: not able update public username and save sign, initials not working
This commit is contained in:
@@ -551,8 +551,8 @@ function WidgetsValueModal(props) {
|
||||
// below code is used to save or update default signature, initials, stamp
|
||||
try {
|
||||
const signCls = new Parse.Object("contracts_Signature");
|
||||
if (props?.saveSignCheckbox?.signId) {
|
||||
signCls.id = props.saveSignCheckbox.signId;
|
||||
if (saveSignCheckbox?.signId) {
|
||||
signCls.id = saveSignCheckbox.signId;
|
||||
}
|
||||
if (currWidgetsDetails?.type === "initials") {
|
||||
signCls.set("Initials", imageUrl);
|
||||
|
||||
@@ -3729,4 +3729,3 @@ export function convertJpegToPng(base64Image, filename) {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,9 +75,6 @@ function PdfRequestFiles(
|
||||
const { t } = useTranslation();
|
||||
const dispatch = useDispatch();
|
||||
const isShowModal = useSelector((state) => state.widget.isShowModal);
|
||||
const saveSignCheckbox = useSelector(
|
||||
(state) => state.widget.saveSignCheckbox
|
||||
);
|
||||
const defaultSignImg = useSelector((state) => state.widget.defaultSignImg);
|
||||
const myInitial = useSelector((state) => state.widget.myInitial);
|
||||
const appName =
|
||||
@@ -484,12 +481,7 @@ function PdfRequestFiles(
|
||||
} else {
|
||||
setRequestSignTour(false);
|
||||
}
|
||||
dispatch(
|
||||
setSaveSignCheckbox({
|
||||
...saveSignCheckbox,
|
||||
isVisible: true
|
||||
})
|
||||
);
|
||||
|
||||
//function to get default signatur of current user from `contracts_Signature` class
|
||||
const defaultSignRes = await getDefaultSignature(
|
||||
jsonSender?.objectId
|
||||
@@ -497,7 +489,6 @@ function PdfRequestFiles(
|
||||
if (defaultSignRes?.status === "success") {
|
||||
dispatch(
|
||||
setSaveSignCheckbox({
|
||||
...saveSignCheckbox,
|
||||
isVisible: true,
|
||||
signId: defaultSignRes?.res?.id
|
||||
})
|
||||
@@ -506,6 +497,8 @@ function PdfRequestFiles(
|
||||
const initials = defaultSignRes?.res?.defaultInitial || "";
|
||||
dispatch(setDefaultSignImg(sign));
|
||||
dispatch(setMyInitial(initials));
|
||||
} else {
|
||||
dispatch(setSaveSignCheckbox({ isVisible: true }));
|
||||
}
|
||||
} else if (res?.length === 0) {
|
||||
const res = await contactBook(currUserId);
|
||||
@@ -642,7 +635,7 @@ function PdfRequestFiles(
|
||||
(data) => data.signerObjId === signerObjectId
|
||||
);
|
||||
if (checkUser && checkUser.length > 0) {
|
||||
const status = handleCheckResponse(checkUser,setminRequiredCount)
|
||||
const status = handleCheckResponse(checkUser, setminRequiredCount);
|
||||
if (status?.showAlert) {
|
||||
setUnSignedWidgetId(status?.widgetKey);
|
||||
setPageNumber(status?.tourPageNumber);
|
||||
@@ -1377,7 +1370,7 @@ function PdfRequestFiles(
|
||||
setIsUiLoading(false);
|
||||
alert(t("expiry-date-error"));
|
||||
}
|
||||
};
|
||||
};
|
||||
// `handleRedirectCancel` is used to cancel redirecting to redirectUrl
|
||||
const handleRedirectCancel = () => {
|
||||
setIsredirectCanceled(true);
|
||||
|
||||
@@ -77,9 +77,6 @@ function SignYourSelf() {
|
||||
const { docId } = useParams();
|
||||
const dispatch = useDispatch();
|
||||
const isShowModal = useSelector((state) => state.widget.isShowModal);
|
||||
const saveSignCheckbox = useSelector(
|
||||
(state) => state.widget.saveSignCheckbox
|
||||
);
|
||||
const appName =
|
||||
"OpenSign™";
|
||||
const divRef = useRef(null);
|
||||
@@ -268,13 +265,14 @@ function SignYourSelf() {
|
||||
if (defaultSignRes?.status === "success") {
|
||||
dispatch(
|
||||
setSaveSignCheckbox({
|
||||
...saveSignCheckbox,
|
||||
isVisible: true,
|
||||
signId: defaultSignRes?.res?.id
|
||||
})
|
||||
);
|
||||
dispatch(setDefaultSignImg(defaultSignRes?.res?.defaultSignature));
|
||||
dispatch(setMyInitial(defaultSignRes?.res?.defaultInitial));
|
||||
} else {
|
||||
dispatch(setSaveSignCheckbox({ isVisible: true }));
|
||||
}
|
||||
const contractUsersRes = await contractUsers();
|
||||
if (contractUsersRes === "Error: Something went wrong!") {
|
||||
@@ -283,8 +281,6 @@ function SignYourSelf() {
|
||||
} else if (contractUsersRes[0] && contractUsersRes.length > 0) {
|
||||
setContractName("_Users");
|
||||
setSignerUserId(contractUsersRes[0].objectId);
|
||||
dispatch(setSaveSignCheckbox({ ...saveSignCheckbox, isVisible: true }));
|
||||
|
||||
const tourstatuss =
|
||||
contractUsersRes[0].TourStatus && contractUsersRes[0].TourStatus;
|
||||
if (tourstatuss && tourstatuss.length > 0 && !isCompleted) {
|
||||
@@ -1046,12 +1042,18 @@ function SignYourSelf() {
|
||||
|
||||
const setCellCount = (key, newCount) => {
|
||||
setXyPosition((prev) => {
|
||||
const getPageNumer = prev.filter((data) => data.pageNumber === pageNumber);
|
||||
const getPageNumer = prev.filter(
|
||||
(data) => data.pageNumber === pageNumber
|
||||
);
|
||||
if (getPageNumer.length > 0) {
|
||||
const updatePos = getPageNumer[0].pos.map((p) =>
|
||||
p.key === key ? { ...p, options: { ...p.options, cellCount: newCount } } : p
|
||||
p.key === key
|
||||
? { ...p, options: { ...p.options, cellCount: newCount } }
|
||||
: p
|
||||
);
|
||||
return prev.map((obj, ind) =>
|
||||
ind === index ? { ...obj, pos: updatePos } : obj
|
||||
);
|
||||
return prev.map((obj, ind) => (ind === index ? { ...obj, pos: updatePos } : obj));
|
||||
}
|
||||
return prev;
|
||||
});
|
||||
@@ -1082,7 +1084,8 @@ function SignYourSelf() {
|
||||
cellCount: count,
|
||||
defaultValue: (defaultdata?.defaultValue || "").slice(0, count),
|
||||
fontSize: newFontSize || position.options?.fontSize || 12,
|
||||
fontColor: newFontColor || position.options?.fontColor || "black"
|
||||
fontColor:
|
||||
newFontColor || position.options?.fontColor || "black"
|
||||
}
|
||||
};
|
||||
} else {
|
||||
|
||||
@@ -286,7 +286,9 @@ function UserProfile() {
|
||||
style={{ width: `${percentage}%` }}
|
||||
></div>
|
||||
</div>
|
||||
<span className="text-base-contentk text-sm">{percentage}%</span>
|
||||
<span className="text-base-contentk text-sm">
|
||||
{percentage}%
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="text-base font-semibold pt-4">
|
||||
|
||||
Reference in New Issue
Block a user