mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-12 12:47:40 +02:00
solved contactbook multiple signers issue
This commit is contained in:
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user