mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 08:44:54 +00:00
fixes
This commit is contained in:
@ -1,5 +1,12 @@
|
|||||||
import { ApiProperty } from '@nestjs/swagger';
|
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 {
|
export class CreateBookingDto {
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
@ -15,6 +22,7 @@ export class CreateBookingDto {
|
|||||||
})
|
})
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@IsDate()
|
@IsDate()
|
||||||
|
@MinDate(new Date())
|
||||||
date: Date;
|
date: Date;
|
||||||
|
|
||||||
@ApiProperty({ example: '09:00' })
|
@ApiProperty({ example: '09:00' })
|
||||||
|
|||||||
@ -54,7 +54,8 @@ export class BookableSpaceService {
|
|||||||
.createQueryBuilder('space')
|
.createQueryBuilder('space')
|
||||||
.leftJoinAndSelect('space.parent', 'parentSpace')
|
.leftJoinAndSelect('space.parent', 'parentSpace')
|
||||||
.leftJoinAndSelect('space.community', 'community')
|
.leftJoinAndSelect('space.community', 'community')
|
||||||
.where('community.project = :project', { project });
|
.where('space.disabled = :disabled', { disabled: false })
|
||||||
|
.andWhere('community.project = :project', { project });
|
||||||
|
|
||||||
if (search) {
|
if (search) {
|
||||||
qb = qb.andWhere(
|
qb = qb.andWhere(
|
||||||
|
|||||||
Reference in New Issue
Block a user