fix: multisign signature issue in mobile view

This commit is contained in:
RaktimaNXG
2023-12-11 17:50:36 +05:30
parent e51feaa1fe
commit 47ddac3529
5 changed files with 112 additions and 55 deletions
@@ -1,11 +1,24 @@
import React from "react";
import Modal from "react-bootstrap/Modal";
import ModalHeader from "react-bootstrap/esm/ModalHeader";
import { themeColor } from "../../utils/ThemeColor/backColor";
function AlertComponent({ isShow, alertMessage, setIsAlert }) {
function AlertComponent({
isShow,
alertMessage,
setIsAlert,
isdefaultSign,
addDefaultSignature,
headBG
}) {
return (
<Modal show={isShow}>
<ModalHeader className="bg-danger" style={{ color: "white" }}>
<ModalHeader
style={{
color: "white",
background: headBG ? themeColor() : "#dc3545"
}}
>
<span>Alert</span>
</ModalHeader>
@@ -13,21 +26,51 @@ function AlertComponent({ isShow, alertMessage, setIsAlert }) {
<span>{alertMessage}</span>
</Modal.Body>
<Modal.Footer>
<button
onClick={() => {
setIsAlert({
isShow: false,
alertMessage: ""
});
}}
style={{
color: "black"
}}
type="button"
className="finishBtn"
>
Ok
</button>
{isdefaultSign ? (
<>
<button
onClick={() => addDefaultSignature()}
style={{
background: themeColor()
}}
type="button"
className="finishBtn"
>
Yes
</button>
<button
onClick={() => {
setIsAlert({
isShow: false,
alertMessage: ""
});
}}
style={{
color: "black"
}}
type="button"
className="finishBtn"
>
Close
</button>
</>
) : (
<button
onClick={() => {
setIsAlert({
isShow: false,
alertMessage: ""
});
}}
style={{
color: "black"
}}
type="button"
className="finishBtn"
>
Ok
</button>
)}
</Modal.Footer>
</Modal>
);
@@ -1,20 +1,17 @@
import React from "react";
function DefaultSignature({
themeColor,
defaultSignImg,
setShowAlreadySignDoc,
xyPostion
xyPostion,
setIsAlert
}) {
const confirmToaddDefaultSign = () => {
if (xyPostion.length > 0) {
const alreadySign = {
status: true,
mssg: "Are you sure you want to sign at requested locations?",
sure: true
};
setShowAlreadySignDoc(alreadySign);
setIsAlert({
isShow: true,
alertMessage: "Are you sure you want to sign at requested locations?"
});
} else {
alert("please select position!");
}