Skip to content

Commit

Permalink
fix cofirmation type bug
Browse files Browse the repository at this point in the history
  • Loading branch information
udaysingh236 committed Jul 30, 2023
1 parent 72cec7d commit ac2aa41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/controllers/reservation.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export async function createRes(hotelId: number, resInfo: IReservationsPayload)
...rateShopResponse.rateShopResponse!,
guestId: '',
currentStatus: '',
confirmationType: '',
confirmationType: 'grey',
paymentDetails: {
advancePayment: 0,
advancePaymentMode: ''
Expand Down Expand Up @@ -291,7 +291,7 @@ export async function createRes(hotelId: number, resInfo: IReservationsPayload)
reservationSchema.paymentDetails.advancePayment = resInfo.paymentDetails.advancePayment;
reservationSchema.paymentDetails.advancePaymentMode =
resInfo.paymentDetails.advancePaymentMode;
reservationSchema.confirmationType = 'GREEN';
reservationSchema.confirmationType = 'green';
}
reservationSchema.currentStatus = 'ACTIVE';

Expand Down
2 changes: 1 addition & 1 deletion src/models/bookings.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const bookingsSchema: Schema = new Schema(
hotelId: { type: Number, required: true },
roomId: { type: Number, required: true },
currentStatus: { type: String, required: true },
confirmationType: { type: String, required: true },
confirmationType: { type: String, required: true, default: 'grey' },
checkIn: { type: Date, required: true },
checkOut: { type: Date, required: true },
totalNumDays: { type: Number, required: true },
Expand Down

0 comments on commit ac2aa41

Please sign in to comment.