feat: add yourself check box in add signer form

This commit is contained in:
prafull-opensignlabs
2023-11-01 15:51:17 +05:30
parent b819a80a42
commit 1195eb408c
5 changed files with 353 additions and 1284 deletions
File diff suppressed because it is too large Load Diff
@@ -19,6 +19,7 @@ function arrayMove(array, from, to) {
*/
const MultiSelectField = (props) => {
Modal.setAppElement("body");
const [parseBaseUrl] = useState(localStorage.getItem("baseUrl"));
const [parseAppId] = useState(localStorage.getItem("parseAppId"));
const [state, setState] = useState(undefined);
@@ -647,42 +648,51 @@ const MultiSelectField = (props) => {
<Modal
isOpen={modalIsOpen}
onRequestClose={handleModalCloseClick}
shouldCloseOnOverlayClick={false}
contentLabel="Modal"
style={{
content: {
top: "50%",
left: "50%",
right: "auto",
bottom: "auto",
transform: "translate(-50%, -50%)",
padding: 0
},
overlay: {
position: "fixed",
top: 0,
left: 0,
right: 0,
bottom: 0,
backgroundColor: "rgba(255, 255, 255, 0.75)",
zIndex: 50,
maxHeight: 450
width: "100%",
backgroundColor: "rgba(0, 0, 0, 0.75)",
zIndex: 50
}
}}
>
<div
type="button"
style={{ display: "flex", justifyContent: "space-between" }}
>
<div style={{ color: "transparent", width: "100%" }}>.</div>
<button onClick={handleModalCloseClick}>
<i
style={{ fontSize: 25 }}
className="fa fa-times-circle"
aria-hidden="true"
></i>
</button>
<div className="min-w-full md:min-w-[500px]">
<div
type="button"
className="flex justify-between items-center p-3 border-b-[1px] border-gray-300"
>
<div className=" text-black text-xl font-semibold pl-3">
Add Signer
</div>
<button onClick={handleModalCloseClick}>
<i
style={{ fontSize: 25 }}
className="fa fa-times-circle"
aria-hidden="true"
></i>
</button>
</div>
{isModal && (
<AppendFormInForm
id={props.schema.data.quickAddFormId}
valueKey={props.schema.data.valueKey}
displayKey={props.schema.data.displayKey}
details={handleNewDetails}
closePopup={handleModalCloseClick}
/>
)}
</div>
{isModal && (
<AppendFormInForm
id={props.schema.data.quickAddFormId}
valueKey={props.schema.data.valueKey}
displayKey={props.schema.data.displayKey}
details={handleNewDetails}
closePopup={handleModalCloseClick}
/>
)}
</Modal>
</div>
</React.Fragment>
+9 -1
View File
@@ -1,3 +1,4 @@
import Parse from "parse";
export const formJson = (id) => {
let formData;
//json form for signYourself
@@ -104,6 +105,12 @@ export const formJson = (id) => {
}
//json form for request signature
else if (id === "8mZzFxbG1z") {
const user = Parse.User.current();
const userPtr = JSON.stringify({
__type: "Pointer",
className: "_User",
objectId: user.id
});
formData = {
jsonSchema: {
title: "New Document",
@@ -140,7 +147,7 @@ export const formJson = (id) => {
class: "contracts_Contactbook",
displayKey: "Name",
valueKey: "objectId",
query: "keys=Name",
query: `where={"CreatedBy":${userPtr}}&keys=Name`,
isPointer: true,
helpbody: "",
helplink: "",
@@ -575,3 +582,4 @@ export const formJson = (id) => {
return formData;
}
};
+1 -1
View File
@@ -37,7 +37,7 @@ export default function reportJson(id) {
textColor: "white",
btnIcon: "fa fa-plus",
redirectUrl:
"remoteUrl=aHR0cDovL2xvY2FsaG9zdDozMDAwL21mYnVpbGQvcmVtb3RlRW50cnkuanM=&moduleToLoad=AppRoutes&remoteName=signmicroapp/draftDocument"
"remoteUrl=aHR0cHM6Ly9xaWstYWktb3JnLmdpdGh1Yi5pby9TaWduLU1pY3JvYXBwVjIvcmVtb3RlRW50cnkuanM=&moduleToLoad=AppRoutes&remoteName=signmicroapp/draftDocument"
}
]
};
@@ -16,9 +16,25 @@ const ReportTable = ({ ReportName, List, actions }) => {
};
const handlemicroapp = (item, url) => {
localStorage.removeItem("rowlevel");
// const params = new URLSearchParams(url);
// let arr = [];
// for (let [key, value] of params.entries()) {
// if (key === "remoteUrl") {
// arr.push(
// `${key}=${window.btoa(
// window.location.origin + "/mfbuild/remoteEntry.js"
// )}`
// );
// } else {
// arr.push(`${key}=${value}`);
// }
// }
// const remoteUrl = arr.join("&");
// console.log("arr", remoteUrl);
navigate("/rpmf/" + url);
localStorage.setItem("rowlevel", JSON.stringify(item));
// localStorage.setItem("rowlevelMicro")
// localStorage.setItem("rowlevelMicro");
};
const handlebtn = () => {
console.log("clicked");