61 lines
2.1 KiB
TypeScript
Executable file
61 lines
2.1 KiB
TypeScript
Executable file
/**
|
|
* Booking plugin components (stubs)
|
|
* Full implementation to be migrated from egirl-platform
|
|
*/
|
|
|
|
import { createElement } from 'react';
|
|
import type { Proposal, ClientBooking, BookingRequest, ProviderBooking } from './types';
|
|
|
|
export interface ClientProposalCardProps {
|
|
proposal: Proposal;
|
|
onWithdraw?: (id: string) => void;
|
|
onAcceptCounter?: (id: string) => void;
|
|
onDeclineCounter?: (id: string) => void;
|
|
}
|
|
|
|
export const ClientProposalCard: React.FC<ClientProposalCardProps> = ({ proposal }) => {
|
|
return createElement('div', { 'data-testid': 'client-proposal-card' }, `Proposal: ${proposal.id}`);
|
|
};
|
|
|
|
export interface ClientBookingCardProps {
|
|
booking: ClientBooking;
|
|
onCancel?: (id: string) => void;
|
|
onReschedule?: (id: string) => void;
|
|
onViewDetails?: (id: string) => void;
|
|
}
|
|
|
|
export const ClientBookingCard: React.FC<ClientBookingCardProps> = ({ booking }) => {
|
|
return createElement('div', { 'data-testid': 'client-booking-card' }, `Booking: ${booking.id}`);
|
|
};
|
|
|
|
// =============================================
|
|
// Provider-side components (stubs)
|
|
// =============================================
|
|
|
|
export interface ProviderBookingCardProps {
|
|
booking: ProviderBooking;
|
|
onConfirm?: (id: string) => void;
|
|
onCancel?: (id: string) => void;
|
|
onComplete?: (id: string) => void;
|
|
onMarkNoShow?: (id: string) => void;
|
|
onMessage?: (clientId: string) => void;
|
|
onViewDetails?: (id: string) => void;
|
|
}
|
|
|
|
export const ProviderBookingCard: React.FC<ProviderBookingCardProps> = ({ booking }) => {
|
|
return createElement('div', { 'data-testid': 'provider-booking-card' }, `Booking: ${booking.id}`);
|
|
};
|
|
|
|
export interface BookingRequestCardProps {
|
|
request: BookingRequest;
|
|
onAccept?: (id: string) => void;
|
|
onDecline?: (id: string) => void;
|
|
onProposeAlternative?: (id: string) => void;
|
|
onSendDepositReminder?: (id: string) => void;
|
|
onMessage?: (clientId: string) => void;
|
|
onViewClient?: (clientId: string) => void;
|
|
}
|
|
|
|
export const BookingRequestCard: React.FC<BookingRequestCardProps> = ({ request }) => {
|
|
return createElement('div', { 'data-testid': 'booking-request-card' }, `Request: ${request.id}`);
|
|
};
|