mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
fix: assistant mode breaks for number fields
This commit is contained in:
@ -181,14 +181,8 @@ export const DocumentSigningNumberField = ({
|
|||||||
|
|
||||||
const onRemove = async () => {
|
const onRemove = async () => {
|
||||||
try {
|
try {
|
||||||
if (isAssistantMode && !targetSigner) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const signingRecipient = isAssistantMode && targetSigner ? targetSigner : recipient;
|
|
||||||
|
|
||||||
const payload: TRemovedSignedFieldWithTokenMutationSchema = {
|
const payload: TRemovedSignedFieldWithTokenMutationSchema = {
|
||||||
token: signingRecipient.token,
|
token: recipient.token,
|
||||||
fieldId: field.id,
|
fieldId: field.id,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -68,26 +68,16 @@ export const DocumentSigningRadioField = ({
|
|||||||
|
|
||||||
const onSign = async (authOptions?: TRecipientActionAuth) => {
|
const onSign = async (authOptions?: TRecipientActionAuth) => {
|
||||||
try {
|
try {
|
||||||
if (isAssistantMode && !targetSigner) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!selectedOption) {
|
if (!selectedOption) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const signingRecipient = isAssistantMode && targetSigner ? targetSigner : recipient;
|
|
||||||
|
|
||||||
const payload: TSignFieldWithTokenMutationSchema = {
|
const payload: TSignFieldWithTokenMutationSchema = {
|
||||||
token: signingRecipient.token,
|
token: recipient.token,
|
||||||
fieldId: field.id,
|
fieldId: field.id,
|
||||||
value: selectedOption,
|
value: selectedOption,
|
||||||
isBase64: true,
|
isBase64: true,
|
||||||
authOptions,
|
authOptions,
|
||||||
...(isAssistantMode && {
|
|
||||||
isAssistantPrefill: true,
|
|
||||||
assistantId: recipient.id,
|
|
||||||
}),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (onSignField) {
|
if (onSignField) {
|
||||||
|
|||||||
Reference in New Issue
Block a user