edit admin
This commit is contained in:
@@ -134,7 +134,6 @@ export class BusinessServiceRequestsService {
|
||||
title: request.title,
|
||||
categoryId: business.categoryId,
|
||||
description: request.description ?? undefined,
|
||||
defaultDurationMinutes: request.durationMinutes ?? undefined,
|
||||
isActive: true,
|
||||
});
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ export class CreateBusinessServiceDto {
|
||||
@Min(0)
|
||||
price!: number;
|
||||
|
||||
/** اگر خالی باشد از template.defaultDurationMinutes استفاده میشود */
|
||||
/** مدت خدمت به دقیقه — توسط کسبوکار تعیین میشود */
|
||||
@ApiPropertyOptional({ example: 30, nullable: true })
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import {
|
||||
IsBoolean,
|
||||
IsInt,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
Matches,
|
||||
Max,
|
||||
MaxLength,
|
||||
Min,
|
||||
} from 'class-validator';
|
||||
|
||||
export class CreateServiceTemplateDto {
|
||||
@@ -36,13 +33,6 @@ export class CreateServiceTemplateDto {
|
||||
@MaxLength(500)
|
||||
description?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 30 })
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(1440)
|
||||
defaultDurationMinutes?: number;
|
||||
|
||||
@ApiPropertyOptional({ example: true })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import {
|
||||
IsBoolean,
|
||||
IsInt,
|
||||
IsOptional,
|
||||
IsString,
|
||||
IsUUID,
|
||||
Matches,
|
||||
Max,
|
||||
MaxLength,
|
||||
Min,
|
||||
} from 'class-validator';
|
||||
|
||||
export class UpdateServiceTemplateDto {
|
||||
@@ -38,13 +35,6 @@ export class UpdateServiceTemplateDto {
|
||||
@MaxLength(500)
|
||||
description?: string | null;
|
||||
|
||||
@ApiPropertyOptional({ example: 30 })
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(1440)
|
||||
defaultDurationMinutes?: number;
|
||||
|
||||
@ApiPropertyOptional({ example: true })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
|
||||
@@ -81,7 +81,7 @@ export class ServiceTemplatesService {
|
||||
slug,
|
||||
categoryId: p.categoryId,
|
||||
description: p.description ?? null,
|
||||
defaultDurationMinutes: p.defaultDurationMinutes ?? 30,
|
||||
defaultDurationMinutes: null,
|
||||
isActive: p.isActive ?? true,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user