mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 23:17:12 +01:00
not sure but it seems to work
This commit is contained in:
@@ -5,6 +5,7 @@ import { BOOKING_STATUS } from '../../../db/enums'
|
||||
import { daysFormatFrontend } from '../../../helpers/date'
|
||||
import { log } from '../../../helpers/log'
|
||||
import { getBookingStatus, cancelBooking } from '../../../helpers/booking'
|
||||
import Layout from '../../../components/layout'
|
||||
|
||||
export const getServerSideProps = getServerSideBooking
|
||||
|
||||
@@ -40,7 +41,7 @@ export default function ShowBooking({
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Layout>
|
||||
<div>
|
||||
<strong>Buchungsstatus:</strong> {getBookingStatus(booking.status)}
|
||||
</div>
|
||||
@@ -53,16 +54,16 @@ export default function ShowBooking({
|
||||
{[BOOKING_STATUS.CONFIRMED, BOOKING_STATUS.REQUESTED].includes(
|
||||
booking.status
|
||||
) && (
|
||||
<div className="my-6">
|
||||
<button
|
||||
onClick={onCancelBooking}
|
||||
className="btn btn-red"
|
||||
disabled={storingBooking}
|
||||
>
|
||||
Buchung Stornieren
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
<div className="my-6">
|
||||
<button
|
||||
onClick={onCancelBooking}
|
||||
className="btn btn-red"
|
||||
disabled={storingBooking}
|
||||
>
|
||||
Buchung Stornieren
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user