Skip to content

Commit

Permalink
complete merge
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenbrissette committed Feb 18, 2025
1 parent 80dac62 commit 96c363c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
IsNotEmpty,
IsString,
ValidateNested,
IsOptional
IsOptional,
} from 'class-validator';
import { CreateFieldGroupDto } from '../../field-group/dto/create-field-group.dto';
import { Type } from 'class-transformer';
Expand Down
12 changes: 8 additions & 4 deletions apps/web/src/client/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,6 @@ export const UpdateAssignedGroupSignerDtoSchema = {
export const CreateTemplateBoxDtoSchema = {
type: 'object',
properties: {
name: {
type: 'string',
},
type: {
type: 'string',
enum: ['SIGNATURE', 'CHECKBOX', 'TEXT_FIELD'],
Expand Down Expand Up @@ -453,17 +450,21 @@ export const CreateFormTemplateDtoSchema = {
name: {
type: 'string',
},
formDocLink: {
type: 'string',
},
description: {
type: 'string',
},
fieldGroups: {
minItems: 1,
type: 'array',
items: {
$ref: '#/components/schemas/CreateFieldGroupDto',
},
},
},
required: ['name', 'formDocLink', 'description', 'fieldGroups'],
required: ['file', 'name', 'formDocLink', 'description', 'fieldGroups'],
} as const;

export const TemplateBoxBaseEntitySchema = {
Expand Down Expand Up @@ -832,6 +833,9 @@ export const UpdateFormTemplateDtoSchema = {
name: {
type: 'string',
},
formDocLink: {
type: 'string',
},
description: {
type: 'string',
},
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export type CreateFieldGroupDto = {
};

export type CreateFormTemplateDto = {
file: Blob | File;
name: string;
description: string;
fieldGroups: Array<CreateFieldGroupDto>;
Expand Down Expand Up @@ -232,6 +233,7 @@ export type FormTemplateEntity = {
export type UpdateFormTemplateDto = {
file?: Blob | File;
name?: string;
formDocLink?: string;
description?: string;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const FormTemplateButtons = ({
review?: boolean;
}) => {
const router = useRouter();
const { formTemplateName, pdfFile } = useCreateFormTemplate();
const { formTemplateName, pdfFile, formTemplateDescription } =
useCreateFormTemplate();

/**
* Upload and create a form template
Expand Down Expand Up @@ -78,7 +79,7 @@ export const FormTemplateButtons = ({
body: {
name: formTemplateName ? formTemplateName : '',
fieldGroups: fieldGroups,
description: formTemplateDescription,
description: formTemplateDescription ? formTemplateDescription : '',
file: pdfFile,
},
})
Expand Down

0 comments on commit 96c363c

Please sign in to comment.