Skip to content

Commit

Permalink
chore: fix build and packaging (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdicarlo authored Oct 1, 2024
1 parent 8fa8208 commit 973aad5
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 393 deletions.
20 changes: 19 additions & 1 deletion apps/client-server/src/app/submission/dtos/submission.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,31 @@ import {
IWebsiteFormFields,
PostRecordDto,
SubmissionType,
ValidationResult,
WebsiteOptionsDto,
} from '@postybirb/types';
import { IsArray, IsBoolean, IsObject, IsString } from 'class-validator';
import {
IsArray,
IsBoolean,
IsNumber,
IsObject,
IsString,
} from 'class-validator';

export class SubmissionDto<T extends ISubmissionMetadata = ISubmissionMetadata>
implements ISubmissionDto<T>
{
@IsNumber()
order: number;

@IsArray()
validations: ValidationResult[];

/**
* The post records associated with the submission.
* @type {PostRecordDto[]}
*/
@IsArray()
posts: PostRecordDto[];

/**
Expand Down
15 changes: 0 additions & 15 deletions apps/postybirb-ui/src/app/app-layout/app-flyouts.tsx

This file was deleted.

12 changes: 10 additions & 2 deletions apps/postybirb-ui/src/components/form/fields/form-field.type.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { UseFormReturnType } from '@mantine/form';
import { FieldAggregateType } from '@postybirb/form-builder';
import { IWebsiteFormFields, WebsiteOptionsDto } from '@postybirb/types';
import { SubmissionValidationResult } from '../../submissions/submission-edit-form/submission-form-props';
import {
IWebsiteFormFields,
ValidationResult,
WebsiteOptionsDto,
} from '@postybirb/types';

export type SubmissionValidationResult = {
id: string;
result: ValidationResult;
};

export type FormFieldProps<T = FieldAggregateType<never>> = {
defaultOption: WebsiteOptionsDto<IWebsiteFormFields>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export function useValidations(props: FormFieldProps): UseValidationResult {
const validations = validation.find((v) => v.id === option.id);
const warnings: ValidationMessage[] = (
validations?.result.warnings || []
).filter((warning) => warning.field === propKey);
).filter((warning: ValidationMessage) => warning.field === propKey);
const errors: ValidationMessage[] = (
validations?.result.errors || []
).filter((error) => error.field === propKey);
).filter((error: ValidationMessage) => error.field === propKey);

return {
warnings,
Expand Down
51 changes: 0 additions & 51 deletions apps/postybirb-ui/src/hooks/submission/use-submission-options.ts

This file was deleted.

212 changes: 0 additions & 212 deletions apps/postybirb-ui/src/hooks/submission/use-submission.tsx

This file was deleted.

Loading

0 comments on commit 973aad5

Please sign in to comment.