mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
switch to prisma
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { getServerSideBooking } from '../../../lib/getServerSideProps'
|
||||
import { Booking } from '../../../db/booking'
|
||||
import { BOOKING_STATUS } from '../../../db/enums'
|
||||
import { daysFormatFrontend } from '../../../helpers/date'
|
||||
import { Booking, BookingStatus } from '@prisma/client'
|
||||
import { dateFormatFrontend } from '../../../helpers/date'
|
||||
import { log } from '../../../helpers/log'
|
||||
import { getBookingStatus, cancelBooking } from '../../../helpers/booking'
|
||||
|
||||
@@ -45,12 +44,12 @@ export default function ShowBooking({
|
||||
<strong>Buchungsstatus:</strong> {getBookingStatus(booking.status)}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Buchungszeitraum:</strong> {daysFormatFrontend(booking.days)}
|
||||
<strong>Buchungszeitraum:</strong> {dateFormatFrontend(new Date(booking.startDate))}-{dateFormatFrontend(new Date(booking.endDate))}
|
||||
</div>
|
||||
{storingBookingError && (
|
||||
<div className="error-message flex-grow">{storingBookingError}</div>
|
||||
)}
|
||||
{[BOOKING_STATUS.CONFIRMED, BOOKING_STATUS.REQUESTED].includes(
|
||||
{([BookingStatus.CONFIRMED, BookingStatus.REQUESTED] as BookingStatus[]).includes(
|
||||
booking.status
|
||||
) && (
|
||||
<div className="my-6">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import Link from 'next/link'
|
||||
import { Booking } from '../../../db/booking'
|
||||
import { Booking } from '@prisma/client'
|
||||
import { loadBookingData, storeBookingData } from '../../../helpers/storage'
|
||||
import { getServerSideBooking } from '../../../lib/getServerSideProps'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user