fix all the formatting

This commit is contained in:
Thomas Ruoff
2022-04-02 00:42:25 +02:00
parent 8e0648bf0f
commit 3c4f0efdc2
11 changed files with 79 additions and 59 deletions

View File

@@ -1,6 +1,11 @@
import * as mongoose from 'mongoose'
import { v4 as uuidv4 } from 'uuid'
import { dateFormatBackend, getDays, nowInTz, dateParseBackend } from '../helpers/date'
import {
dateFormatBackend,
getDays,
nowInTz,
dateParseBackend,
} from '../helpers/date'
import { createCalendarEvent, deleteCalendarEvent } from '../lib/googlecalendar'
import { Bill } from './bill'
@@ -16,9 +21,9 @@ export type Booking = {
city: string
bill?: Bill
// format YYYY-MM-DD
startDate: string,
startDate: string
// format YYYY-MM-DD
endDate: string,
endDate: string
status?: BOOKING_STATUS
purpose?: string
org?: string
@@ -58,14 +63,14 @@ const BookingSchema = new mongoose.Schema<BookingDocument>(
type: String,
required: true,
validator: function (value: string): boolean {
return !!dateParseBackend(value);
return !!dateParseBackend(value)
},
},
endDate: {
type: String,
required: true,
validator: function (value: string): boolean {
return !!dateParseBackend(value);
return !!dateParseBackend(value)
},
},
days: {
@@ -160,4 +165,4 @@ const BookingModel = (mongoose.models.Booking ||
BookingSchema
)) as BookingModel
export default BookingModel;
export default BookingModel