Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Jan 27, 2023
2 parents 80a8611 + e1055f2 commit 5ed0d47
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
9 changes: 1 addition & 8 deletions apps/web/src/components/templates/TemplateFormProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const schema = z
content: z.any(),
subject: z.any(),
title: z.any(),
layoutId: z.any(),
layoutId: z.any().optional(),
})
.passthrough()
.superRefine((template: any, ctx) => {
Expand Down Expand Up @@ -79,13 +79,6 @@ const schema = z
path: ['subject'],
});
}
if (!template.layoutId) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: 'Required - Layout',
path: ['layoutId'],
});
}
}

if (template.type === ChannelTypeEnum.PUSH && !template.title) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ export const EmailInboxContent = ({
return (
<Select
{...field}
label="Layouts"
label="Email Layout"
data-test-id="templates-layout"
loading={isLoading}
disabled={readonly}
required
required={(layouts || [])?.length > 0}
error={errors?.steps ? errors?.steps[index]?.template?.layoutId?.message : undefined}
searchable
placeholder="Select layout"
Expand Down
4 changes: 3 additions & 1 deletion libs/testing/src/user.session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ const queue = new Queue('trigger-handler', {
},
});

queue.obliterate({ force: true });
if (process.env.NODE_ENV === 'test') {
queue.obliterate({ force: true });
}

const EMAIL_BLOCK: IEmailBlock[] = [
{
Expand Down

0 comments on commit 5ed0d47

Please sign in to comment.