mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 01:01:49 +10:00
🧹🚧DOC-97 DOC-19
This commit is contained in:
@ -1,10 +1,7 @@
|
||||
import { ResizableBox, ResizeCallbackData } from "react-resizable";
|
||||
import React, { SyntheticEvent, useEffect, useState } from "react";
|
||||
import React, { useState } from "react";
|
||||
import Draggable from "react-draggable";
|
||||
import { CircleStackIcon, TrashIcon } from "@heroicons/react/24/solid";
|
||||
import Logo from "../logo";
|
||||
import { IconButton } from "@documenso/ui";
|
||||
import toast from "react-hot-toast";
|
||||
import { XCircleIcon } from "@heroicons/react/20/solid";
|
||||
const stc = require("string-to-color");
|
||||
|
||||
@ -20,6 +17,7 @@ type FieldPropsType = {
|
||||
};
|
||||
onPositionChanged: any;
|
||||
onDelete: any;
|
||||
hidden: boolean;
|
||||
};
|
||||
|
||||
export default function EditableField(props: FieldPropsType) {
|
||||
@ -52,6 +50,7 @@ export default function EditableField(props: FieldPropsType) {
|
||||
cancel="strong"
|
||||
>
|
||||
<div
|
||||
hidden={props.hidden}
|
||||
ref={nodeRef}
|
||||
className="cursor-move opacity-80 p-2 m-auto w-auto flex-row-reverse text-lg font-bold text-center absolute top-0 left-0 select-none"
|
||||
style={{
|
||||
|
||||
@ -37,7 +37,6 @@ export default function PDFEditor(props: any) {
|
||||
function onDeleteHandler(id: any) {
|
||||
const field = fields.find((e) => e.id == id);
|
||||
const fieldIndex = fields.map((item) => item.id).indexOf(id);
|
||||
console.log(fieldIndex);
|
||||
if (fieldIndex > -1) {
|
||||
const fieldWithoutRemoved = [...fields];
|
||||
const removedField = fieldWithoutRemoved.splice(fieldIndex, 1);
|
||||
|
||||
@ -71,6 +71,7 @@ export default function PDFViewer(props) {
|
||||
></ReadOnlyField>
|
||||
) : (
|
||||
<EditableField
|
||||
hidden={item.Signature}
|
||||
key={item.id}
|
||||
field={item}
|
||||
className="absolute"
|
||||
|
||||
Reference in New Issue
Block a user