mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
🐛 hide date fields after filling
This commit is contained in:
@ -135,7 +135,7 @@ export default function PDFSigner(props: any) {
|
||||
<PDFViewer
|
||||
style={{
|
||||
cursor:
|
||||
signatureFields === 0
|
||||
signatureFields.length === 0
|
||||
? `url("https://place-hold.it/110x64/37f095/ffffff&text=Signature") 55 32, auto`
|
||||
: "",
|
||||
}}
|
||||
@ -145,7 +145,8 @@ export default function PDFSigner(props: any) {
|
||||
pdfUrl={`${NEXT_PUBLIC_WEBAPP_URL}/api/documents/${router.query.id}?token=${router.query.token}`}
|
||||
onClick={onClick}
|
||||
onMouseDown={function onMouseDown(e: any, page: number) {
|
||||
if (signatureFields === 0) addFreeSignature(e, page, props.recipient);
|
||||
if (signatureFields.length === 0)
|
||||
addFreeSignature(e, page, props.recipient);
|
||||
}}
|
||||
onMouseUp={() => {}}
|
||||
onDelete={onDeleteHandler}
|
||||
|
||||
@ -83,7 +83,7 @@ export default function PDFViewer(props) {
|
||||
></SignableField>
|
||||
) : (
|
||||
<EditableField
|
||||
hidden={item.Signature}
|
||||
hidden={item.Signature || item.inserted}
|
||||
key={item.id}
|
||||
field={item}
|
||||
className="absolute"
|
||||
|
||||
@ -75,6 +75,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
||||
documentId: +documentId,
|
||||
type: body.type,
|
||||
page: +body.page,
|
||||
inserted: false,
|
||||
positionX: +body.positionX,
|
||||
positionY: +body.positionY,
|
||||
customText: body.customText,
|
||||
|
||||
Reference in New Issue
Block a user