add dont show button for reactour and minor bug fix in template flow

This commit is contained in:
prafull-opensignlabs
2024-01-01 10:49:37 +05:30
parent e7bcad80cc
commit 2cb4575db1
9 changed files with 487 additions and 338 deletions
@@ -158,10 +158,10 @@ const AddUser = (props) => {
const res = await contactQuery.save();
const parseData = JSON.parse(JSON.stringify(res));
props.details({
value: parseData[props.valueKey],
label: parseData[props.displayKey]
});
if(props.details){
props.details(parseData);
}
if (props.closePopup) {
props.closePopup();
}
@@ -26,9 +26,9 @@ const SelectSigners = (props) => {
// `handleOptions` is used to set just save from quick form to selected option in dropdown
const handleOptions = (item) => {
setSelected(item);
const userData = userList.filter((x) => x.objectId === item.value);
if (userData.length > 0) {
setUserData(userData[0]);
const userData = userList.find((x) => x.objectId === item.value);
if (userData) {
setUserData(userData);
}
};
const handleAdd = () => {
@@ -0,0 +1,26 @@
import React, { useState } from "react";
export default function TourContentWithBtn({ message, isChecked }) {
const [isCheck, setIsCheck] = useState(false);
const handleCheck = () => {
setIsCheck(!isCheck);
if (isChecked) {
isChecked(!isCheck);
}
};
return (
<div>
<p>{message}</p>
<label style={{ textAlign: "center", display: "flex" }}>
<input
type="checkbox"
style={{ marginRight: 3 }}
checked={isCheck}
onChange={handleCheck}
/>{" "}
<span>Don't show</span>
</label>
</div>
);
}