Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated jansen request jobFilter, updated contract update API #55

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading