mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
use dateRange formatter in FE
This commit is contained in:
@@ -7,7 +7,7 @@ import { AdditionalCost, Bill } from '../../../../db/bill'
|
||||
import { Booking } from '../../../../db/booking'
|
||||
import { BILL_STATUS, MILAGE_TARIFS } from '../../../../db/enums'
|
||||
import { getMilageMax } from '../../../../db/index'
|
||||
import { dateFormatFrontend } from '../../../../helpers/date'
|
||||
import { daysFormatFrontend } from '../../../../helpers/date'
|
||||
import { getBillTotal } from '../../../../helpers/bill'
|
||||
import { getBookingStatus } from '../../../../helpers/booking'
|
||||
import withSession, {
|
||||
@@ -181,8 +181,7 @@ export default function BookingBillPage({
|
||||
<form className="form" onSubmit={onSubmit}>
|
||||
<div>
|
||||
<strong>Buchungszeitraum:</strong>{' '}
|
||||
{dateFormatFrontend(new Date(booking.startDate))} -{' '}
|
||||
{dateFormatFrontend(new Date(booking.endDate))}
|
||||
{daysFormatFrontend(booking.days)}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Bucher:</strong> {booking.booker.name}
|
||||
|
||||
@@ -10,7 +10,7 @@ import withSession, {
|
||||
import { getServerSideBooking } from '../../../../lib/getServerSideProps'
|
||||
import { Booking } from '../../../../db/booking'
|
||||
import { getBookingStatus } from '../../../../helpers/booking'
|
||||
import { dateFormatFrontend } from '../../../../helpers/date'
|
||||
import { daysFormatFrontend } from '../../../../helpers/date'
|
||||
import { BOOKING_STATUS } from '../../../../db/enums'
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = withSession(
|
||||
@@ -83,9 +83,7 @@ export default function ShowBookingAdmin({
|
||||
<h2 className="text-3xl">Buchung {booking.uuid}</h2>
|
||||
<Calendar start={booking.startDate} end={booking.endDate} />
|
||||
<div>
|
||||
<strong>Buchungszeitraum:</strong>{' '}
|
||||
{dateFormatFrontend(new Date(booking.startDate))} -{' '}
|
||||
{dateFormatFrontend(new Date(booking.endDate))}
|
||||
<strong>Buchungszeitraum:</strong> {daysFormatFrontend(booking.days)}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Bucher:</strong> {booking.booker.name}
|
||||
|
||||
Reference in New Issue
Block a user