From 0cce90adbbc34e8fff1e496166228f9c46011da3 Mon Sep 17 00:00:00 2001 From: richard483 Date: Wed, 17 Jan 2024 01:05:47 +0700 Subject: [PATCH 1/2] updated jansen request jobFilter, updated contract update API --- src/contract/dto/contract-create.dto.ts | 14 +++++++++++--- src/contract/dto/contract-update.dto.ts | 19 +++++++++++++++++-- src/job/job.repository.ts | 3 +++ 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/contract/dto/contract-create.dto.ts b/src/contract/dto/contract-create.dto.ts index e6d0cc0..8855a32 100644 --- a/src/contract/dto/contract-create.dto.ts +++ b/src/contract/dto/contract-create.dto.ts @@ -30,17 +30,25 @@ export class ContractCreateDto { @ApiProperty() @IsString() @IsOptional() - readonly paymentRequestId?: string; + readonly paymentId?: string; @ApiProperty() - @IsNotEmpty() @IsString() @IsOptional() readonly template?: string; @ApiProperty() - @IsNotEmpty() @IsString() @IsOptional() readonly customField?: string; + + @ApiProperty() + @IsString() + @IsOptional() + readonly workSubmission?: string; + + @ApiProperty() + @IsString() + @IsOptional() + readonly ratingId?: string; } diff --git a/src/contract/dto/contract-update.dto.ts b/src/contract/dto/contract-update.dto.ts index 35c9446..3f047a3 100644 --- a/src/contract/dto/contract-update.dto.ts +++ b/src/contract/dto/contract-update.dto.ts @@ -19,6 +19,11 @@ export class ContractUpdateDto { @IsOptional() readonly jobId: string; + @ApiProperty() + @IsString() + @IsOptional() + readonly paymentId?: string; + @ApiProperty() @IsString() @IsOptional() @@ -37,15 +42,25 @@ export class ContractUpdateDto { @ApiProperty() @IsString() @IsOptional() - readonly paymentRequestId?: string; + readonly template?: string; @ApiProperty() @IsString() @IsOptional() - readonly template?: string; + readonly status?: string; @ApiProperty() @IsString() @IsOptional() readonly customField?: string; + + @ApiProperty() + @IsString() + @IsOptional() + readonly workSubmission?: string; + + @ApiProperty() + @IsString() + @IsOptional() + readonly ratingId?: string; } diff --git a/src/job/job.repository.ts b/src/job/job.repository.ts index d35ca5e..3617805 100644 --- a/src/job/job.repository.ts +++ b/src/job/job.repository.ts @@ -123,6 +123,9 @@ export class JobRepository { ? this.field[reqData.field](reqData.keyword) : this.field['description'](reqData.keyword), orderBy: this.orderBy[reqData.sort] || this.orderBy['-createdAt'], + include: { + company: true, + }, }); const total = this.prisma.jobVacancy.count({ From 5b6fc5e7e3902f8e246d1a9fbe977abe6cf683c3 Mon Sep 17 00:00:00 2001 From: richard483 Date: Wed, 17 Jan 2024 01:12:14 +0700 Subject: [PATCH 2/2] up version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e1a177..95ac95d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "backend-8tech", - "version": "4.0.6", + "version": "4.0.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "backend-8tech", - "version": "4.0.6", + "version": "4.0.7", "license": "UNLICENSED", "dependencies": { "@nestjs/common": "^9.4.3", diff --git a/package.json b/package.json index 1d12229..0f753d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "backend-8tech", - "version": "4.0.6", + "version": "4.0.7", "description": "", "author": "8tech", "private": true,