Skip to content

Commit

Permalink
Merge pull request #55 from richard483/fix-1
Browse files Browse the repository at this point in the history
updated jansen request jobFilter, updated contract update API
  • Loading branch information
richard483 authored Jan 16, 2024
2 parents a807578 + 5b6fc5e commit dfba7b7
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backend-8tech",
"version": "4.0.6",
"version": "4.0.7",
"description": "",
"author": "8tech",
"private": true,
Expand Down
14 changes: 11 additions & 3 deletions src/contract/dto/contract-create.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
19 changes: 17 additions & 2 deletions src/contract/dto/contract-update.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export class ContractUpdateDto {
@IsOptional()
readonly jobId: string;

@ApiProperty()
@IsString()
@IsOptional()
readonly paymentId?: string;

@ApiProperty()
@IsString()
@IsOptional()
Expand All @@ -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;
}
3 changes: 3 additions & 0 deletions src/job/job.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit dfba7b7

Please sign in to comment.