mirror of
https://github.com/documenso/documenso.git
synced 2025-11-16 01:32:06 +10:00
feat: remove console logs and updated the disabled property on input elements
This commit is contained in:
@ -77,7 +77,6 @@ export const AddSignersFormPartial = ({
|
|||||||
const { mutateAsync: addSigners } = trpc.recipient.addSigners.useMutation({
|
const { mutateAsync: addSigners } = trpc.recipient.addSigners.useMutation({
|
||||||
...DO_NOT_INVALIDATE_QUERY_ON_MUTATION,
|
...DO_NOT_INVALIDATE_QUERY_ON_MUTATION,
|
||||||
onSuccess: (newRecipients) => {
|
onSuccess: (newRecipients) => {
|
||||||
console.log('add signer mutation', newRecipients);
|
|
||||||
utils.document.getDocumentWithDetailsById.setData(
|
utils.document.getDocumentWithDetailsById.setData(
|
||||||
{
|
{
|
||||||
id: document.id,
|
id: document.id,
|
||||||
@ -91,7 +90,6 @@ export const AddSignersFormPartial = ({
|
|||||||
const { mutateAsync: deleteSigner } = trpc.recipient.removeSigner.useMutation({
|
const { mutateAsync: deleteSigner } = trpc.recipient.removeSigner.useMutation({
|
||||||
...DO_NOT_INVALIDATE_QUERY_ON_MUTATION,
|
...DO_NOT_INVALIDATE_QUERY_ON_MUTATION,
|
||||||
onSuccess: (deletedRecipient) => {
|
onSuccess: (deletedRecipient) => {
|
||||||
console.log('delete signer mutation', deletedRecipient);
|
|
||||||
utils.document.getDocumentWithDetailsById.setData(
|
utils.document.getDocumentWithDetailsById.setData(
|
||||||
{
|
{
|
||||||
id: document.id,
|
id: document.id,
|
||||||
|
|||||||
@ -209,6 +209,8 @@ export const AddTemplatePlaceholderRecipientsFormPartial = ({
|
|||||||
try {
|
try {
|
||||||
const currentSigner = form.getValues(`signers.${index}`);
|
const currentSigner = form.getValues(`signers.${index}`);
|
||||||
|
|
||||||
|
console.log('currentSigner', currentSigner);
|
||||||
|
|
||||||
if (!currentSigner.email) {
|
if (!currentSigner.email) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -296,12 +298,7 @@ export const AddTemplatePlaceholderRecipientsFormPartial = ({
|
|||||||
type="email"
|
type="email"
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
{...field}
|
{...field}
|
||||||
disabled={
|
disabled={field.disabled || isSubmitting}
|
||||||
field.disabled ||
|
|
||||||
isSubmitting ||
|
|
||||||
signers[index].email === user?.email ||
|
|
||||||
isSignerDirectRecipient(signer)
|
|
||||||
}
|
|
||||||
onBlur={() => void handleOnBlur(index)}
|
onBlur={() => void handleOnBlur(index)}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@ -327,12 +324,7 @@ export const AddTemplatePlaceholderRecipientsFormPartial = ({
|
|||||||
<Input
|
<Input
|
||||||
placeholder="Name"
|
placeholder="Name"
|
||||||
{...field}
|
{...field}
|
||||||
disabled={
|
disabled={field.disabled || isSubmitting}
|
||||||
field.disabled ||
|
|
||||||
isSubmitting ||
|
|
||||||
signers[index].email === user?.email ||
|
|
||||||
isSignerDirectRecipient(signer)
|
|
||||||
}
|
|
||||||
onBlur={() => void handleOnBlur(index)}
|
onBlur={() => void handleOnBlur(index)}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|||||||
Reference in New Issue
Block a user