updates
This commit is contained in:
@@ -14,6 +14,10 @@ export interface BookingData {
|
||||
email: string;
|
||||
phone: string;
|
||||
};
|
||||
services?: Array<{
|
||||
service_id: number;
|
||||
quantity: number;
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface Booking {
|
||||
|
||||
29
Frontend/src/services/api/contactService.ts
Normal file
29
Frontend/src/services/api/contactService.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import apiClient from './apiClient';
|
||||
|
||||
/**
|
||||
* Contact API Service
|
||||
*/
|
||||
|
||||
export interface ContactFormData {
|
||||
name: string;
|
||||
email: string;
|
||||
subject: string;
|
||||
message: string;
|
||||
phone?: string;
|
||||
}
|
||||
|
||||
export interface ContactResponse {
|
||||
status: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit contact form
|
||||
*/
|
||||
export const submitContactForm = async (
|
||||
formData: ContactFormData
|
||||
): Promise<ContactResponse> => {
|
||||
const response = await apiClient.post('/contact/submit', formData);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
@@ -100,6 +100,16 @@ export const getRoomById = async (
|
||||
return response.data;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get booked dates for a specific room
|
||||
*/
|
||||
export const getRoomBookedDates = async (
|
||||
roomId: number
|
||||
): Promise<{ success: boolean; data: { room_id: number; booked_dates: string[] } }> => {
|
||||
const response = await apiClient.get(`/rooms/${roomId}/booked-dates`);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get room by room number
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user