mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
improve logging?
This commit is contained in:
committed by
Thomas Ruoff
parent
942066bc7a
commit
00002a62d2
@@ -6,6 +6,7 @@ import { Booking } from '../../../../db/booking'
|
||||
import { BILL_STATUS, MILAGE_TARIFS } from '../../../../db/enums'
|
||||
import { getMilageMax } from '../../../../db/index'
|
||||
import { daysFormatFrontend } from '../../../../helpers/date'
|
||||
import { log } from '../../../../helpers/log'
|
||||
import { getBillTotal, createBill, patchBill } from '../../../../helpers/bill'
|
||||
import { getBookingStatus } from '../../../../helpers/booking'
|
||||
import { getServerSideBooking } from '../../../../lib/getServerSideProps'
|
||||
@@ -109,7 +110,7 @@ function BookingBillPage({
|
||||
setBooking(booking)
|
||||
} catch (error) {
|
||||
setStoringError('Buchung konnte nicht gespeichert werden!')
|
||||
console.error('Failed to store booking', error)
|
||||
log.error('Failed to store booking', error)
|
||||
}
|
||||
setStoringInProgress(false)
|
||||
}
|
||||
@@ -197,9 +198,8 @@ function BookingBillPage({
|
||||
>
|
||||
-
|
||||
</button>
|
||||
<label className="flabel inline">{`Kostenpunkt ${
|
||||
index + 1
|
||||
}`}</label>
|
||||
<label className="flabel inline">{`Kostenpunkt ${index + 1
|
||||
}`}</label>
|
||||
</div>
|
||||
<div className="ml-10 mb-3" key={`input{index}`}>
|
||||
<Input
|
||||
|
||||
@@ -7,6 +7,7 @@ import { getServerSideBooking } from '../../../../lib/getServerSideProps'
|
||||
import { Booking } from '../../../../db/booking'
|
||||
import { getBookingStatus, patchBooking } from '../../../../helpers/booking'
|
||||
import { daysFormatFrontend } from '../../../../helpers/date'
|
||||
import { log } from '../../../../helpers/log'
|
||||
import { BOOKING_STATUS } from '../../../../db/enums'
|
||||
|
||||
export const getServerSideProps = getServerSideBooking
|
||||
@@ -30,7 +31,7 @@ function ShowBookingAdmin({ booking: bookingProp }: { booking: Booking }) {
|
||||
setBooking(updatedBooking)
|
||||
} catch (error) {
|
||||
setStoringBookingError('Buchung konnte nicht gespeichert werden.')
|
||||
console.error('Failed to store booking', error)
|
||||
log.error('Failed to store booking', error)
|
||||
}
|
||||
setStoringBooking(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user