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
|
<PDFViewer
|
||||||
style={{
|
style={{
|
||||||
cursor:
|
cursor:
|
||||||
signatureFields === 0
|
signatureFields.length === 0
|
||||||
? `url("https://place-hold.it/110x64/37f095/ffffff&text=Signature") 55 32, auto`
|
? `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}`}
|
pdfUrl={`${NEXT_PUBLIC_WEBAPP_URL}/api/documents/${router.query.id}?token=${router.query.token}`}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
onMouseDown={function onMouseDown(e: any, page: number) {
|
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={() => {}}
|
onMouseUp={() => {}}
|
||||||
onDelete={onDeleteHandler}
|
onDelete={onDeleteHandler}
|
||||||
|
|||||||
@ -83,7 +83,7 @@ export default function PDFViewer(props) {
|
|||||||
></SignableField>
|
></SignableField>
|
||||||
) : (
|
) : (
|
||||||
<EditableField
|
<EditableField
|
||||||
hidden={item.Signature}
|
hidden={item.Signature || item.inserted}
|
||||||
key={item.id}
|
key={item.id}
|
||||||
field={item}
|
field={item}
|
||||||
className="absolute"
|
className="absolute"
|
||||||
|
|||||||
@ -75,6 +75,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
documentId: +documentId,
|
documentId: +documentId,
|
||||||
type: body.type,
|
type: body.type,
|
||||||
page: +body.page,
|
page: +body.page,
|
||||||
|
inserted: false,
|
||||||
positionX: +body.positionX,
|
positionX: +body.positionX,
|
||||||
positionY: +body.positionY,
|
positionY: +body.positionY,
|
||||||
customText: body.customText,
|
customText: body.customText,
|
||||||
|
|||||||
Reference in New Issue
Block a user