timeslots API

This commit is contained in:
Asya Vee
2025-08-26 23:36:24 +04:00
parent 47baf8dfe2
commit c0647fe512
47 changed files with 830 additions and 776 deletions

View File

@@ -0,0 +1,15 @@
import { bookingApi } from './pocketbase';
import { BookingType } from '@/types/bookings';
export class BookingService {
static async getBookingTypes(): Promise<BookingType[]> {
try {
const bookingTypes = await bookingApi.getBookingTypes();
return bookingTypes.filter(type => type.is_active);
} catch (error) {
console.error('Failed to fetch booking types:', error);
throw new Error('Unable to load booking options. Please try again later.');
}
}
}