make getBookingStatus work without a booking

This commit is contained in:
Thomas Ruoff
2020-11-02 23:24:30 +01:00
parent 19c8bc7be2
commit 8c252cca2b
3 changed files with 7 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
import { BOOKING_STATUS } from '../db/enums'
export function getBookingStatus(booking: { status: BOOKING_STATUS }) {
switch (booking.status) {
export function getBookingStatus(status: BOOKING_STATUS) {
switch (status) {
case BOOKING_STATUS.REQUESTED:
return 'Angefragt'
case BOOKING_STATUS.CONFIRMED: