feat(frontend): add performance booking form

This commit is contained in:
bisco
2026-04-29 18:14:07 +02:00
parent 56d8c31a0d
commit 144c48c02f
4 changed files with 236 additions and 22 deletions
@@ -30,6 +30,20 @@ export type ShowDetail = ShowListItem & {
performances?: ShowPerformance[];
};
export type ReservationCreatePayload = {
name: string;
email: string;
party_size: number;
};
export type ReservationCreateResponse = {
id: number;
status: string;
performance: number;
party_size: number;
message: string;
};
type ShowListResponse = {
results: ShowListItem[];
};
@@ -58,4 +72,11 @@ export class ShowsApiService {
params: { show: slug },
});
}
createReservation(performanceId: string, payload: ReservationCreatePayload): Observable<ReservationCreateResponse> {
return this.http.post<ReservationCreateResponse>(
`${this.apiBaseUrl}/performances/${performanceId}/reservations/`,
payload,
);
}
}