Skip to content

Commit 60455a3

Browse files
Merge pull request #33 from StreetSupport/feature/3013-create-organisation-listing-and-search-interface
3013 - Update AppointmentOnly logic
2 parents 3efd549 + 71e2d43 commit 60455a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/schemas/organisationSchema.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ export const AddressSchema = z.object({
7070
Location: z.preprocess(preprocessJSON, LocationCoordinatesSchema.optional()),
7171
OpeningTimes: z.preprocess(preprocessJSON, z.array(OpeningTimeSchema).default([])),
7272
}).refine((data) => {
73-
// If not open 24/7 and not appointment only, must have at least one opening time
74-
if (!data.IsOpen247 && !data.IsAppointmentOnly) {
73+
// If not open 24/7, must have at least one opening time
74+
if (!data.IsOpen247) {
7575
return data.OpeningTimes.length > 0;
7676
}
7777
return true;
7878
}, {
79-
message: 'At least one opening time is required when location is not open 24/7 and not appointment only',
79+
message: 'At least one opening time is required when location is not open 24/7',
8080
path: ['OpeningTimes']
8181
});
8282

0 commit comments

Comments
 (0)