init commit

This commit is contained in:
Asya Vee
2025-08-26 16:49:54 +04:00
parent b10285d08b
commit d577f6c608
94 changed files with 27785 additions and 526 deletions

View File

@@ -0,0 +1,79 @@
// types/booking.ts
export interface BookingType {
id: string;
name: string;
display_name: string;
requires_payment: boolean;
default_duration: number; // in minutes
description?: string;
resources: string; // relation to resources collection
created: string;
updated: string;
}
export interface Resource {
id: string;
type: 'wheel' | 'workstation';
capacity: number;
is_active: boolean;
created: string;
updated: string;
}
export interface TimeSlot {
id: string;
booking_types: string[]; // relation to booking types
start_time: string;
end_time: string;
is_reccuring: boolean;
max_capacity: number;
is_active: boolean;
recurrence_pattern?: {
type: string;
days: number[];
end_date: string;
};
created: string;
updated: string;
}
export interface Booking {
id: string;
booking_type: string; // relation to booking type
customer_name: string;
customer_email: string;
internal_notes?: string;
start_time: string;
end_time: string;
participants_count: number;
status: 'confirmed' | 'cancelled' | 'completed';
payment_status: 'not_required' | 'paid' | 'refunded' | 'partially_refunded' | 'pending';
payment_required: boolean;
cancellation_token: string;
created: string;
updated: string;
}
export interface BookingFormData {
bookingTypeId: string;
customerName: string;
customerEmail: string;
participantsCount: number;
startTime: Date;
endTime: Date;
}
// For the booking flow state
export interface BookingFlowState {
step: 'booking-type' | 'date-time' | 'customer-details' | 'confirmation';
selectedBookingType?: BookingType;
selectedDate?: Date;
selectedTimeSlot?: string; // time slot ID or time string
customerDetails?: {
name: string;
email: string;
participantsCount: number;
notes?: string;
};
}