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>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Link from 'next/link'
|
||||
import { IBooking } from '../../../db/booking'
|
||||
import { loadBookingData, storeBookingData } from '../../../helpers/storage'
|
||||
import { getServerSideBooking } from '../../../lib/getServerSideProps'
|
||||
import Layout from '../../../components/layout'
|
||||
|
||||
export const getServerSideProps = getServerSideBooking
|
||||
|
||||
@@ -18,7 +19,7 @@ export default function ShowBookingStored({ booking }: { booking: IBooking }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Layout>
|
||||
<h3 className="thanks mb-3 mt-6 text-lg">
|
||||
Vielen Dank für die Buchungsanfrage
|
||||
</h3>
|
||||
@@ -51,6 +52,6 @@ export default function ShowBookingStored({ booking }: { booking: IBooking }) {
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user