Skip to content

Commit

Permalink
validation issues (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinMacaulay committed Mar 14, 2024
1 parent 76b36a7 commit e1a6d53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,11 @@ export const CreateEvent = () => {
const handlePrintForms = async (values) => {
await handleModalClose();
if (!incompleteEventID) {
values["form_printed_successfully"] = true;
try {
await db.incompleteEvent
.put({
...values,
form_printed_successfully: true,
created_by: userData.user_guid,
step: values["TwentyFourHour"] || values["TwelveHour"] ? 2 : 4,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ export const validationSchema = Yup.object().shape(

/** eCOS (12h and 24h only) */
document_served: Yup.string().when(
["form_printed_successfully", "TwentyFourHour", "TwelveHour"],
["TwelveHour", "TwentyFourHour", "form_printed_successfully"],
{
is: (TwelveHour, TwentyFourHour, form_printed_successfully) =>
(TwelveHour || TwentyFourHour) && form_printed_successfully,
Expand Down

0 comments on commit e1a6d53

Please sign in to comment.