mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
chore: add more field types (#1141)
Adds a number of new field types and capabilities to existing fields. A massive change with far too many moving pieces to document in a single commit.
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { type TFieldMetaSchema as FieldMeta } from '@documenso/lib/types/field-meta';
|
||||
import { prisma } from '@documenso/prisma';
|
||||
import type { FieldType, Team } from '@documenso/prisma/client';
|
||||
|
||||
@ -18,6 +19,7 @@ export type UpdateFieldOptions = {
|
||||
pageWidth?: number;
|
||||
pageHeight?: number;
|
||||
requestMetadata?: RequestMetadata;
|
||||
fieldMeta?: FieldMeta;
|
||||
};
|
||||
|
||||
export const updateField = async ({
|
||||
@ -33,6 +35,7 @@ export const updateField = async ({
|
||||
pageWidth,
|
||||
pageHeight,
|
||||
requestMetadata,
|
||||
fieldMeta,
|
||||
}: UpdateFieldOptions) => {
|
||||
const oldField = await prisma.field.findFirstOrThrow({
|
||||
where: {
|
||||
@ -71,6 +74,7 @@ export const updateField = async ({
|
||||
positionY: pageY,
|
||||
width: pageWidth,
|
||||
height: pageHeight,
|
||||
fieldMeta,
|
||||
},
|
||||
include: {
|
||||
Recipient: true,
|
||||
|
||||
Reference in New Issue
Block a user