mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
make getBookingStatus work without a booking
This commit is contained in:
@@ -48,7 +48,7 @@ const milageTarifOptions = Object.values(MILAGE_TARIFS).map((tarif) => {
|
||||
)
|
||||
})
|
||||
|
||||
const bookingStatusOptions = Object.values(BILL_STATUS).map((status) => {
|
||||
const billStatusOptions = Object.values(BILL_STATUS).map((status) => {
|
||||
return (
|
||||
<option value={status} key={status}>
|
||||
{getBillStatusLabel(status)}
|
||||
@@ -191,7 +191,8 @@ export default function BillPage({
|
||||
<strong>Bucher:</strong> {booking.booker.name}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Buchungsstatus:</strong> {getBookingStatus(booking)}
|
||||
<strong>Buchungsstatus:</strong>{' '}
|
||||
{getBookingStatus(booking.status)}
|
||||
</div>
|
||||
<div>
|
||||
<Input
|
||||
@@ -292,7 +293,7 @@ export default function BillPage({
|
||||
value={status}
|
||||
onChange={(e) => setStatus(e.target.value as BILL_STATUS)}
|
||||
>
|
||||
{bookingStatusOptions}
|
||||
{billStatusOptions}
|
||||
</Select>
|
||||
{storingError && (
|
||||
<div className="error-message flex-grow mt-6">{storingError}</div>
|
||||
|
||||
Reference in New Issue
Block a user