mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
switch to prisma
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
import React from 'react'
|
||||
import Link from 'next/link'
|
||||
|
||||
import { daysFormatFrontend } from '../helpers/date'
|
||||
import { BookingDocument } from '../db/booking'
|
||||
import {Booking} from '@prisma/client';
|
||||
import { dateFormatFrontend } from '../helpers/date'
|
||||
|
||||
|
||||
export default function BookingTable({
|
||||
booking,
|
||||
}: {
|
||||
booking: BookingDocument
|
||||
booking: Booking
|
||||
}) {
|
||||
const data = [
|
||||
{ name: 'Status', value: booking.status },
|
||||
{ name: 'Buchungszeitraum', value: daysFormatFrontend(booking.days) },
|
||||
{ name: 'Buchungszeitraum', value: `${dateFormatFrontend(new Date(booking.startDate))}-${dateFormatFrontend(new Date(booking.endDate))}` },
|
||||
{ name: 'Organisation', value: booking.org },
|
||||
{
|
||||
name: 'Addresse',
|
||||
@@ -48,7 +49,7 @@ export default function BookingTable({
|
||||
</h3>
|
||||
<p className="mt-1 max-w-2xl text-sm text-gray-500">
|
||||
Last updated{' '}
|
||||
{new Date(booking.updatedAt as string).toLocaleString(
|
||||
{booking.updatedAt.toLocaleString(
|
||||
new Intl.Locale('de')
|
||||
)}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user