resolve delete user not working properly with placholder

This commit is contained in:
prafull-opensignlabs
2023-12-26 20:04:16 +05:30
parent fd0ec5fd31
commit 6c1d0c712a
7 changed files with 34 additions and 34 deletions
@@ -3,21 +3,20 @@ import "../../css/AddUser.css";
// import SelectFolder from "../../premitives/SelectFolder";
const EditTemplate = ({ template, onSuccess }) => {
const [folder, setFolder] = useState({ ObjectId: "", Name: "" });
// const [folder, setFolder] = useState({ ObjectId: "", Name: "" });
const [formData, setFormData] = useState({
Name: template?.Name || "",
Note: template?.Note || "",
Description: template?.Description || ""
});
console.log("template", template);
const handleStrInput = (e) => {
setFormData({ ...formData, [e.target.name]: e.target.value });
};
const handleFolder = (data) => {
console.log("handleFolder ", data)
setFolder(data);
};
// const handleFolder = (data) => {
// console.log("handleFolder ", data)
// setFolder(data);
// };
// Define a function to handle form submission
const handleSubmit = async (e) => {
@@ -78,18 +78,14 @@ function PlaceholderCopy(props) {
}else{
filterSignerPosition = signerPosition.filter((item)=> item.Id === signerId)
}
console.log("filterSignerPosition ", filterSignerPosition)
//get current pagenumber's all placeholder position data
const placeholderPosition = filterSignerPosition[0].placeHolder.filter(
(data) => data.pageNumber === props.pageNumber
);
console.log("placeholderPosition ", placeholderPosition)
console.log("props.signKey ", props.signKey)
//get current placeholder position data which user want to copy
const currentPlaceholder = placeholderPosition[0].pos.filter(
(position) => position.key === props.signKey
);
console.log("currentPlaceholder ", currentPlaceholder)
const { key, ...rest } = currentPlaceholder[0];
for (let i = 0; i < props.allPages; i++) {
const newId = randomKey();
@@ -310,7 +310,6 @@ function RenderPdf({
<i
className="fa-regular fa-copy signCopy"
onClick={(e) => {
console.log("hello console");
e.stopPropagation();
setIsPageCopy(true);
setSignKey(pos.key);
@@ -738,7 +737,6 @@ function RenderPdf({
);
}}
onTouchEnd={(e) => {
console.log("go here");
if (!isDragging && isMobile) {
setTimeout(() => {
e.stopPropagation();
@@ -753,7 +751,6 @@ function RenderPdf({
<PlaceholderBorder pos={pos} />
<div
onTouchEnd={(e) => {
console.log("go here");
if (!isDragging && isMobile) {
setTimeout(() => {
e.stopPropagation();
@@ -1131,7 +1128,6 @@ function RenderPdf({
onClick={(e) => {
e.stopPropagation();
setIsPageCopy(true);
console.log("pos.key) ", pos.key)
setSignKey(pos.key);
setUniqueId(data.Id)
setSignerObjId(
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useRef, useState } from "react";
import { themeColor } from "../../utils/ThemeColor/backColor";
import "../../css/signerListPlace.css";
@@ -48,6 +48,7 @@ function SignerListPlace({
const [isHover, setIsHover] = useState();
const [isEdit, setIsEdit] = useState(false);
//function for onhover signer name change background color
const inputRef = useRef(null);
const onHoverStyle = (ind, blockColor) => {
const style = {
background: blockColor ? blockColor : color[ind % color.length],
@@ -201,6 +202,7 @@ function SignerListPlace({
>
{isEdit?.[obj.Id] && handleRoleChange ? (
<input
ref={inputRef}
style={{
backgroundColor: "transparent",
width: "inherit"
@@ -211,6 +213,12 @@ function SignerListPlace({
setIsEdit({});
handleOnBlur(obj.Role, obj.Id);
}}
onKeyDown={(e) => {
if (e.key === "Enter") {
e.preventDefault();
inputRef.current.blur();
}
}}
/>
) : (
obj.Role