mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 10:44:55 +00:00
Merge pull request #479 from SyncrowIOT/fix/booking-fixes
SP-1757, SP-1859 fixes
This commit is contained in:
@ -1,5 +1,12 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsDate, IsNotEmpty, IsString, IsUUID, Matches } from 'class-validator';
|
||||
import {
|
||||
IsDate,
|
||||
IsNotEmpty,
|
||||
IsString,
|
||||
IsUUID,
|
||||
Matches,
|
||||
MinDate,
|
||||
} from 'class-validator';
|
||||
|
||||
export class CreateBookingDto {
|
||||
@ApiProperty({
|
||||
@ -15,6 +22,7 @@ export class CreateBookingDto {
|
||||
})
|
||||
@IsNotEmpty()
|
||||
@IsDate()
|
||||
@MinDate(new Date())
|
||||
date: Date;
|
||||
|
||||
@ApiProperty({ example: '09:00' })
|
||||
|
||||
@ -54,7 +54,8 @@ export class BookableSpaceService {
|
||||
.createQueryBuilder('space')
|
||||
.leftJoinAndSelect('space.parent', 'parentSpace')
|
||||
.leftJoinAndSelect('space.community', 'community')
|
||||
.where('community.project = :project', { project });
|
||||
.where('space.disabled = :disabled', { disabled: false })
|
||||
.andWhere('community.project = :project', { project });
|
||||
|
||||
if (search) {
|
||||
qb = qb.andWhere(
|
||||
|
||||
Reference in New Issue
Block a user