feat/court-maintenace #14

Merged
jselesan merged 3 commits from feat/court-maintenace into development 2026-06-08 18:47:04 +00:00
13 changed files with 23 additions and 98 deletions
Showing only changes of commit 49d2a13672 - Show all commits

View File

@@ -424,7 +424,7 @@ export async function createAdminBooking(
endTime: selectedSlot.endTime,
customerName: input.customerName.trim(),
customerPhone: input.customerPhone.trim(),
customerEmail: input.customerEmail.trim(),
customerEmail: input.customerEmail?.trim() ?? '',
status: 'CONFIRMED',
},
include: {

View File

@@ -42,7 +42,7 @@ const bookingFormSchema = z.object({
.trim()
.min(6, 'Ingresa un telefono válido.')
.max(30, 'El telefono no puede superar los 30 caracteres.'),
customerEmail: z.string().email('Ingresá un email válido.'),
customerEmail: z.string().email('Ingresá un email válido.').or(z.literal('')),
});
type BookingForm = z.infer<typeof bookingFormSchema>;

View File

@@ -56,7 +56,8 @@ export const createAdminBookingSchema = z.object({
.max(30, 'El telefono no puede superar los 30 caracteres.'),
customerEmail: z
.string()
.email('El email ingresado no es valido.'),
.email('El email ingresado no es valido.')
.or(z.literal('')),
})
export const updateAdminBookingStatusSchema = z.object({