diff --git a/src/users/dto/create-supplier.dto.ts b/src/users/dto/create-supplier.dto.ts index 8a2e585..8101ce1 100644 --- a/src/users/dto/create-supplier.dto.ts +++ b/src/users/dto/create-supplier.dto.ts @@ -6,4 +6,7 @@ export class CreateSupplierDto { @IsNotEmpty() code: string; + + @IsNotEmpty() + url: string; } diff --git a/src/users/supplier/supplier.service.ts b/src/users/supplier/supplier.service.ts index e322890..19a93d5 100644 --- a/src/users/supplier/supplier.service.ts +++ b/src/users/supplier/supplier.service.ts @@ -22,7 +22,7 @@ export class SupplierService { ) private coaService: CoaService, private connection: Connection, - ) {} + ) { } async create(createSupplierDto: CreateSupplierDto) { const check = await this.supplierRepository.findOne({ @@ -43,6 +43,7 @@ export class SupplierService { supplierData.id = uuid.v4(); supplierData.name = createSupplierDto.name; supplierData.code = createSupplierDto.code; + supplierData.url = createSupplierDto.url; supplierData.status = false; await this.connection.transaction(async (manager) => { @@ -99,6 +100,7 @@ export class SupplierService { const supplierData = new Supplier(); supplierData.name = updateSupplierDto.name; + supplierData.url = updateSupplierDto.url; supplierData.status = true; await this.connection.transaction(async (manager) => {