Merge pull request #6 from OpenSignLabs/main

sync fork
This commit is contained in:
prafull-opensignlabs
2023-10-31 14:20:59 +05:30
committed by GitHub
10 changed files with 50 additions and 29 deletions
+18
View File
@@ -106,6 +106,24 @@
"contributions": [
"bug"
]
},
{
"login": "pranav514",
"name": "pranav514",
"avatar_url": "https://avatars.githubusercontent.com/u/76992202?v=4",
"profile": "https://github.com/pranav514",
"contributions": [
"code"
]
},
{
"login": "arianxq",
"name": "Aria",
"avatar_url": "https://avatars.githubusercontent.com/u/122199576?v=4",
"profile": "https://github.com/arianxq",
"contributions": [
"code"
]
}
]
}
+2
View File
@@ -119,6 +119,8 @@ We would like to thank all our contributors and users for their support and feed
<td align="center" valign="top" width="14.28%"><a href="https://github.com/HansF"><img src="https://avatars.githubusercontent.com/u/1503?v=4?s=100" width="100px;" alt="Hans Fraiponts"/><br /><sub><b>Hans Fraiponts</b></sub></a><br /><a href="#doc-HansF" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://linktr.ee/monilprajapati"><img src="https://avatars.githubusercontent.com/u/99136041?v=4?s=100" width="100px;" alt="Monil Prajapati"/><br /><sub><b>Monil Prajapati</b></sub></a><br /><a href="#code-Monilprajapati" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://emm-dev0.github.io/portfolio/"><img src="https://avatars.githubusercontent.com/u/97445413?v=4?s=100" width="100px;" alt="Edogbanya Emmanuel"/><br /><sub><b>Edogbanya Emmanuel</b></sub></a><br /><a href="#bug-Emm-dev0" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pranav514"><img src="https://avatars.githubusercontent.com/u/76992202?v=4?s=100" width="100px;" alt="pranav514"/><br /><sub><b>pranav514</b></sub></a><br /><a href="#code-pranav514" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/arianxq"><img src="https://avatars.githubusercontent.com/u/122199576?v=4?s=100" width="100px;" alt="Aria"/><br /><sub><b>Aria</b></sub></a><br /><a href="#code-arianxq" title="Code">💻</a></td>
</tr>
</tbody>
</table>
+9 -4
View File
@@ -4,13 +4,18 @@ import { Helmet } from "react-helmet";
function Title(props) {
return (
<Helmet>
<title>{`${
localStorage.getItem("appTitle") ? localStorage.getItem("appTitle") : ""
} - ${props.title}`}</title>
<title>{`${props.title} - OpenSign™`}</title>
{/* <title>
{`${localStorage.getItem("appTitle") ? localStorage.getItem("appTitle") : ""} - ${props.title}`}
</title> */}
<meta
name="description"
content={`${localStorage.getItem("appTitle")} - ${props.title}`}
content={`${props.title} - OpenSign™`}
/>
{/* <meta
name="description"
content={`${localStorage.getItem("appTitle")} - ${props.title}`}
/> */}
<link
rel="icon"
type="image/png"
+2 -2
View File
@@ -996,9 +996,9 @@ function Login(props) {
onClick={togglePasswordVisibility}
>
{state.passwordVisible ? (
<i className="fa fa-eye-slash" /> // Close eye icon
<i className="fa fa-eye-slash text-xs pb-1" /> // Close eye icon
) : (
<i className="fa fa-eye" /> // Open eye icon
<i className="fa fa-eye text-xs pb-1 " /> // Open eye icon
)}
</span>
</div>
@@ -2,13 +2,11 @@ import React from "react";
import Modal from "react-bootstrap/Modal";
import ModalHeader from "react-bootstrap/esm/ModalHeader";
function ModalComponent({ isShow, type,setIsShowEmail }) {
function ModalComponent({ isShow, type, setIsShowEmail }) {
return (
<Modal show={isShow}>
<ModalHeader className="bg-danger" style={{ color: "white" }}>
{type === "pdfFail" ? (
<span>Failed to load pdf!</span>
) : type === "signersAlert" ? (
{type === "signersAlert" ? (
<span>Select signers</span>
) : (
<span>Document Expired!</span>
@@ -16,27 +14,26 @@ function ModalComponent({ isShow, type,setIsShowEmail }) {
</ModalHeader>
<Modal.Body>
{type === "pdfFail" ? (
<p>Something went wrong failed to load pdf file!</p>
) : type === "signersAlert" ? (
{type === "signersAlert" ? (
<p>Please select signer for add placeholder!</p>
) : (
<p>This Document is no longer available.</p>
)}
</Modal.Body>
<Modal.Footer>
{type === "signersAlert" &&(
<button
onClick={() => {
setIsShowEmail(false)
setIsShowEmail(false);
}}
style={{
color: "black",
color: "black"
}}
type="button"
className="finishBtn"
>
Ok
</button>
Ok
</button>)}
</Modal.Footer>
</Modal>
);
@@ -8,7 +8,7 @@ import { useEffect } from "react";
import { useNavigate } from "react-router-dom";
// import { useHistory } from "react-router-dom/cjs/react-router-dom.min";
function Login() {
const { id, userMail, serverUrl } = useParams();
const { id, userMail,contactBookId, serverUrl } = useParams();
let navigate = useNavigate();
// const history = useHistory();
@@ -137,7 +137,7 @@ function Login() {
setLoading(false);
//navigate user to on signature page
// history.push(`/recipientSignPdf/${id}/${_user.phone}`);
navigate(`/recipientSignPdf/${id}/${_user.phone}`);
navigate(`/recipientSignPdf/${id}/${contactBookId}`);
}
} catch (error) {}
} else {
@@ -740,12 +740,12 @@ function PlaceHolderSign() {
};
const serverUrl = localStorage.getItem("baseUrl");
const newServer = serverUrl.replaceAll("/", "%2F");
const objectId = signerMail[i].objectId;
const serverParams = `${newServer}&${localStorage.getItem(
"parseAppId"
)}&${localStorage.getItem("_appName")}`;
let signPdf = `https://qik-ai-org.github.io/Sign-MicroappV2/#/login/${signersdata.objectId}/${signerMail[i].Email}/${serverParams}`;
let signPdf = `https://qik-ai-org.github.io/Sign-MicroappV2/#/login/${signersdata.objectId}/${signerMail[i].Email}/${objectId}/${serverParams}`;
const themeBGcolor = themeColor();
let params = {
@@ -1025,7 +1025,7 @@ function PlaceHolderSign() {
<a
style={{ color: "white" }}
href={`https://qik-ai-org.github.io/Sign-MicroappV2/#/recipientSignPdf/${documentId}/${currentEmail[0].Phone}`}
href={`https://qik-ai-org.github.io/Sign-MicroappV2/#/recipientSignPdf/${documentId}/${currentEmail[0].objectId}`}
>
<button
style={{
@@ -26,8 +26,7 @@ import Header from "./component/header";
import ModalComponent from "./component/modalComponent";
import RenderPdf from "./component/renderPdf";
function EmbedPdfImage() {
const { id, userPhone } = useParams();
const { id, contactBookId } = useParams();
const [isSignPad, setIsSignPad] = useState(false);
const [pdfUrl, setPdfUrl] = useState();
const [allPages, setAllPages] = useState(null);
@@ -88,7 +87,7 @@ function EmbedPdfImage() {
const getDocumentDetails = async () => {
//aspfUo7wRl
let currUserId, userObjectId;
const json = await contactBookName(userPhone, "_Users");
const json = await contactBookName(contactBookId, "_Users");
if (json !== "Error: Something went wrong!" && json && json.results[0]) {
setContractName("_Users");
@@ -124,7 +123,7 @@ function EmbedPdfImage() {
setHandleError("Error: Something went wrong!");
setIsLoading(loadObj);
} else {
const json = await contactBookName(userPhone, "_Contactbook");
const json = await contactBookName(contactBookId, "_Contactbook");
if (json && json.results[0]) {
setContractName("_Contactbook");
if (json.results[0]) {
+2 -2
View File
@@ -23,7 +23,7 @@ function AppRoutes() {
<Route path="/signaturePdf/:docId" element={<SignYourselfPdf />} />
{/* recipient signature route with no rowlevel data using docId from url */}
<Route
path="/recipientSignPdf/:id/:userPhone"
path="/recipientSignPdf/:id/:contactBookId"
element={<RecipientSignPdf />}
/>
{/* recipient placeholder set route with rowlevel data */}
@@ -33,7 +33,7 @@ function AppRoutes() {
{/*Add default signature of user route */}
<Route path="/managesign" element={<ManageSign />} />
{/* login page route */}
<Route path="/login/:id/:userMail/:serverUrl" element={<Login />} />
<Route path="/login/:id/:userMail/:contactBookId/:serverUrl" element={<Login />} />
{/* draft document route to handle and navigate route page accordiing to document status */}
<Route path="/draftDocument" element={<DraftDocument />} />
{/* for user signature (need your sign route) with row level data */}
@@ -260,7 +260,7 @@ export const contactBookName = async (userPhone, className) => {
.get(
`${localStorage.getItem("baseUrl")}classes/${localStorage.getItem(
"_appName"
)}${className}?where={"Phone":"${userPhone}"}`,
)}${className}?where={"objectId":"${userPhone}"}`,
{
headers: {
"Content-Type": "application/json",