Fixing incorrect inequality when fetching schedulable reservations
This commit is contained in:
parent
94ddf55639
commit
01a6013093
1 changed files with 7 additions and 6 deletions
|
|
@ -48,12 +48,13 @@ export class ReservationsService {
|
|||
async getSchedulable() {
|
||||
const query = this.reservationsRepository
|
||||
.createQueryBuilder()
|
||||
.where(`DATE(dateRangeStart) >= DATE(:startDate)`, {
|
||||
startDate: dayjs().add(1, 'days').toISOString(),
|
||||
})
|
||||
.andWhere(`DATE(dateRangeStart) <= DATE(:endDate)`, {
|
||||
endDate: dayjs().add(7, 'days').toISOString(),
|
||||
})
|
||||
.where(
|
||||
`(DATE(dateRangeStart) >= DATE(:startDate) OR DATE(dateRangeStart) <= DATE(:endDate))`,
|
||||
{
|
||||
startDate: dayjs().add(1, 'days').toISOString(),
|
||||
endDate: dayjs().add(7, 'days').toISOString(),
|
||||
},
|
||||
)
|
||||
.andWhere('status = :status', {
|
||||
statuses: ReservationStatus.Pending,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue