Compare commits
6 Commits
fix/field-
...
fix/field-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c68eb4f198 | ||
|
|
33c2cbe01d | ||
|
|
db326cb4a9 | ||
|
|
d664f571d6 | ||
|
|
7c38970ee8 | ||
|
|
e08d62c844 |
@@ -62,7 +62,7 @@ export const GenericErrorLayout = ({
|
||||
const team = useOptionalCurrentTeam();
|
||||
|
||||
const { subHeading, heading, message } =
|
||||
errorCodeMap[errorCode || 404] ?? defaultErrorCodeMap[500];
|
||||
errorCodeMap[errorCode || 500] ?? defaultErrorCodeMap[500];
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-0 flex h-screen w-screen items-center justify-center">
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import Plausible from 'plausible-tracker';
|
||||
import posthog from 'posthog-js';
|
||||
import {
|
||||
Links,
|
||||
Meta,
|
||||
@@ -181,7 +180,6 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
|
||||
|
||||
if (errorCode !== 404) {
|
||||
console.error('[RootErrorBoundary]', error);
|
||||
posthog.captureException(error);
|
||||
}
|
||||
|
||||
return <GenericErrorLayout errorCode={errorCode} />;
|
||||
|
||||
@@ -19,18 +19,29 @@ const posthogProxy = async (request: Request) => {
|
||||
const headers = new Headers(request.headers);
|
||||
headers.set('host', hostname);
|
||||
|
||||
const response = await fetch(newUrl, {
|
||||
const fetchOptions: RequestInit = {
|
||||
method: request.method,
|
||||
headers,
|
||||
body: request.body,
|
||||
// @ts-expect-error - Not really sure about this
|
||||
duplex: 'half',
|
||||
});
|
||||
redirect: 'follow',
|
||||
};
|
||||
|
||||
if (!['GET', 'HEAD'].includes(request.method)) {
|
||||
fetchOptions.body = request.body;
|
||||
fetchOptions.duplex = 'half';
|
||||
}
|
||||
|
||||
const response = await fetch(newUrl, fetchOptions);
|
||||
|
||||
const responseHeaders = new Headers(response.headers);
|
||||
responseHeaders.delete('content-encoding');
|
||||
responseHeaders.delete('content-length');
|
||||
responseHeaders.delete('transfer-encoding');
|
||||
responseHeaders.delete('cookie');
|
||||
|
||||
return new Response(response.body, {
|
||||
status: response.status,
|
||||
statusText: response.statusText,
|
||||
headers: response.headers,
|
||||
headers: responseHeaders,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { fetchRequestHandler } from '@ts-rest/serverless/fetch';
|
||||
import { TsRestHttpError, fetchRequestHandler } from '@ts-rest/serverless/fetch';
|
||||
import { Hono } from 'hono';
|
||||
|
||||
import { ApiContractV1 } from '@documenso/api/v1/contract';
|
||||
@@ -29,6 +29,12 @@ tsRestHonoApp.mount('/', async (request) => {
|
||||
request,
|
||||
contract: ApiContractV1,
|
||||
router: ApiContractV1Implementation,
|
||||
options: {},
|
||||
options: {
|
||||
errorHandler: (err) => {
|
||||
if (err instanceof TsRestHttpError && err.statusCode === 500) {
|
||||
console.error(err);
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2804,6 +2804,8 @@ msgid "Field format"
|
||||
msgstr "Feldformat"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Field label"
|
||||
msgstr "Feldbeschriftung"
|
||||
|
||||
@@ -3171,8 +3173,10 @@ msgid "Join {teamName} on Documenso"
|
||||
msgstr "Tritt {teamName} auf Documenso bei"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Label"
|
||||
msgstr "Beschriftung"
|
||||
|
||||
|
||||
@@ -2799,6 +2799,8 @@ msgid "Field format"
|
||||
msgstr "Field format"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Field label"
|
||||
msgstr "Field label"
|
||||
|
||||
@@ -3166,8 +3168,10 @@ msgid "Join {teamName} on Documenso"
|
||||
msgstr "Join {teamName} on Documenso"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Label"
|
||||
msgstr "Label"
|
||||
|
||||
|
||||
@@ -2804,6 +2804,8 @@ msgid "Field format"
|
||||
msgstr "Formato de campo"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Field label"
|
||||
msgstr "Etiqueta de campo"
|
||||
|
||||
@@ -3171,8 +3173,10 @@ msgid "Join {teamName} on Documenso"
|
||||
msgstr "Únete a {teamName} en Documenso"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Label"
|
||||
msgstr "Etiqueta"
|
||||
|
||||
|
||||
@@ -2804,6 +2804,8 @@ msgid "Field format"
|
||||
msgstr "Format du champ"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Field label"
|
||||
msgstr "Étiquette du champ"
|
||||
|
||||
@@ -3171,8 +3173,10 @@ msgid "Join {teamName} on Documenso"
|
||||
msgstr "Rejoindre {teamName} sur Documenso"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Label"
|
||||
msgstr "Étiquette"
|
||||
|
||||
|
||||
@@ -2804,6 +2804,8 @@ msgid "Field format"
|
||||
msgstr "Formato del campo"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Field label"
|
||||
msgstr "Etichetta del campo"
|
||||
|
||||
@@ -3171,8 +3173,10 @@ msgid "Join {teamName} on Documenso"
|
||||
msgstr "Unisci a {teamName} su Documenso"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Label"
|
||||
msgstr "Etichetta"
|
||||
|
||||
|
||||
@@ -2804,6 +2804,8 @@ msgid "Field format"
|
||||
msgstr "Format pola"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Field label"
|
||||
msgstr "Etykieta pola"
|
||||
|
||||
@@ -3171,8 +3173,10 @@ msgid "Join {teamName} on Documenso"
|
||||
msgstr "Dołącz do {teamName} na Documenso"
|
||||
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/text-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/radio-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/number-field.tsx
|
||||
#: packages/ui/primitives/document-flow/field-items-advanced-settings/checkbox-field.tsx
|
||||
msgid "Label"
|
||||
msgstr "Etykieta"
|
||||
|
||||
|
||||
@@ -11,10 +11,11 @@ generator json {
|
||||
}
|
||||
|
||||
generator zod {
|
||||
provider = "zod-prisma-types"
|
||||
createInputTypes = false
|
||||
writeBarrelFiles = false
|
||||
useMultipleFiles = true
|
||||
provider = "zod-prisma-types"
|
||||
createInputTypes = false
|
||||
writeBarrelFiles = false
|
||||
useMultipleFiles = true
|
||||
useDefaultValidators = false
|
||||
}
|
||||
|
||||
datasource db {
|
||||
|
||||
@@ -3,9 +3,8 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { msg } from '@lingui/core/macro';
|
||||
import { useLingui } from '@lingui/react';
|
||||
import { Trans } from '@lingui/react/macro';
|
||||
import { Prisma } from '@prisma/client';
|
||||
import type { Field, Recipient } from '@prisma/client';
|
||||
import { FieldType, RecipientRole, SendStatus } from '@prisma/client';
|
||||
import { FieldType, Prisma, RecipientRole, SendStatus } from '@prisma/client';
|
||||
import {
|
||||
CalendarDays,
|
||||
Check,
|
||||
@@ -430,6 +429,7 @@ export const AddFieldsFormPartial = ({
|
||||
|
||||
const newField: TAddFieldsFormSchema['fields'][0] = {
|
||||
...structuredClone(lastActiveField),
|
||||
nativeId: undefined,
|
||||
formId: nanoid(12),
|
||||
signerEmail: selectedSigner?.email ?? lastActiveField.signerEmail,
|
||||
pageX: lastActiveField.pageX + 3,
|
||||
@@ -451,6 +451,7 @@ export const AddFieldsFormPartial = ({
|
||||
|
||||
append({
|
||||
...copiedField,
|
||||
nativeId: undefined,
|
||||
formId: nanoid(12),
|
||||
signerEmail: selectedSigner?.email ?? copiedField.signerEmail,
|
||||
pageX: copiedField.pageX + 3,
|
||||
@@ -649,6 +650,8 @@ export const AddFieldsFormPartial = ({
|
||||
passive={isFieldWithinBounds && !!selectedField}
|
||||
onFocus={() => setLastActiveField(field)}
|
||||
onBlur={() => setLastActiveField(null)}
|
||||
onMouseEnter={() => setLastActiveField(field)}
|
||||
onMouseLeave={() => setLastActiveField(null)}
|
||||
onResize={(options) => onFieldResize(options, index)}
|
||||
onMove={(options) => onFieldMove(options, index)}
|
||||
onRemove={() => remove(index)}
|
||||
|
||||
@@ -34,6 +34,8 @@ export type FieldItemProps = {
|
||||
onAdvancedSettings?: () => void;
|
||||
onFocus?: () => void;
|
||||
onBlur?: () => void;
|
||||
onMouseEnter?: () => void;
|
||||
onMouseLeave?: () => void;
|
||||
recipientIndex?: number;
|
||||
hideRecipients?: boolean;
|
||||
hasErrors?: boolean;
|
||||
@@ -227,6 +229,8 @@ export const FieldItem = ({
|
||||
bounds={`${PDF_VIEWER_PAGE_SELECTOR}[data-page-number="${field.pageNumber}"]`}
|
||||
onDragStart={() => onFieldActivate?.()}
|
||||
onResizeStart={() => onFieldActivate?.()}
|
||||
onMouseEnter={() => onFocus?.()}
|
||||
onMouseLeave={() => onBlur?.()}
|
||||
enableResizing={!fixedSize}
|
||||
resizeHandleStyles={{
|
||||
bottom: { bottom: -8, cursor: 'ns-resize' },
|
||||
|
||||
@@ -165,6 +165,7 @@ export const AddTemplateFieldsFormPartial = ({
|
||||
const newField: TAddTemplateFieldsFormSchema['fields'][0] = {
|
||||
...structuredClone(lastActiveField),
|
||||
formId: nanoid(12),
|
||||
nativeId: undefined,
|
||||
signerEmail: selectedSigner?.email ?? lastActiveField.signerEmail,
|
||||
signerId: selectedSigner?.id ?? lastActiveField.signerId,
|
||||
signerToken: selectedSigner?.token ?? lastActiveField.signerToken,
|
||||
@@ -195,6 +196,7 @@ export const AddTemplateFieldsFormPartial = ({
|
||||
append({
|
||||
...copiedField,
|
||||
formId: nanoid(12),
|
||||
nativeId: undefined,
|
||||
signerEmail: selectedSigner?.email ?? copiedField.signerEmail,
|
||||
signerId: selectedSigner?.id ?? copiedField.signerId,
|
||||
signerToken: selectedSigner?.token ?? copiedField.signerToken,
|
||||
@@ -483,12 +485,6 @@ export const AddTemplateFieldsFormPartial = ({
|
||||
form.setValue('fields', updatedFields);
|
||||
};
|
||||
|
||||
const isTypedSignatureEnabled = form.watch('typedSignatureEnabled');
|
||||
|
||||
const handleTypedSignatureChange = (value: boolean) => {
|
||||
form.setValue('typedSignatureEnabled', value, { shouldDirty: true });
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{showAdvancedSettings && currentField ? (
|
||||
|
||||
Reference in New Issue
Block a user