This commit is contained in:
@@ -3097,6 +3097,15 @@
|
||||
"length": 255,
|
||||
"mappedType": "string"
|
||||
},
|
||||
"description": {
|
||||
"name": "description",
|
||||
"type": "text",
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": true,
|
||||
"mappedType": "text"
|
||||
},
|
||||
"type_id": {
|
||||
"name": "type_id",
|
||||
"type": "char(26)",
|
||||
|
||||
@@ -56,7 +56,7 @@ export class CreateOrderAsAdminDto {
|
||||
@IsArray()
|
||||
attachments: IAttachment[];
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@ApiPropertyOptional({ description: 'Order description' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
description?: string;
|
||||
|
||||
@@ -46,6 +46,9 @@ export class Order extends BaseEntity {
|
||||
@Property({ type: 'string', nullable: true })
|
||||
title?: string
|
||||
|
||||
@Property({ type: 'text', nullable: true })
|
||||
description?: string
|
||||
|
||||
@ManyToOne(() => Category)
|
||||
type: Category
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@ export class OrderService {
|
||||
type,
|
||||
product: product ?? null,
|
||||
title: dto.title,
|
||||
description: dto.description,
|
||||
status: OrderStatusEnum.CREATED,
|
||||
estimatedDays: dto.estimatedDays,
|
||||
invoiceItem,
|
||||
@@ -253,6 +254,9 @@ export class OrderService {
|
||||
if (dto.title !== undefined) {
|
||||
order.title = dto.title;
|
||||
}
|
||||
if (dto.description !== undefined) {
|
||||
order.description = dto.description;
|
||||
}
|
||||
if (dto.productId !== undefined) {
|
||||
if (dto.productId == null || dto.productId === '') {
|
||||
order.product = null;
|
||||
|
||||
Reference in New Issue
Block a user