mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 23:17:12 +01:00
add booking status to bill
This commit is contained in:
@@ -29,21 +29,6 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||
}
|
||||
}
|
||||
|
||||
function getBookingStatus(booking: BookingDocument) {
|
||||
switch (booking.status) {
|
||||
case BOOKING_STATUS.REQUESTED:
|
||||
return 'In Bearbeitung'
|
||||
case BOOKING_STATUS.CONFIRMED:
|
||||
return 'Bestätigt'
|
||||
case BOOKING_STATUS.REJECTED:
|
||||
return 'Abgewiesen'
|
||||
case BOOKING_STATUS.CANCELED:
|
||||
return 'Storniert'
|
||||
default:
|
||||
return 'Unbekannt - bitte kontaktieren Sie uns!'
|
||||
}
|
||||
}
|
||||
|
||||
async function cancelBooking(booking: BookingDocument) {
|
||||
const response = await fetch(`/api/booking/${booking.uuid}`, {
|
||||
method: 'PATCH',
|
||||
|
||||
Reference in New Issue
Block a user