not sure but it seems to work

This commit is contained in:
Thomas Ruoff
2025-03-26 22:10:46 +01:00
parent 0db0339a55
commit eb9a297a09
15 changed files with 1459 additions and 1697 deletions

View File

@@ -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>
)
}
}

View File

@@ -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>
)
}
}