Skip to content

Commit

Permalink
fix: #6909 missing join for candidate entities
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-rocket committed Oct 31, 2023
1 parent eabfac1 commit a4045a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 12 additions & 10 deletions apps/gauzy/src/app/pages/candidates/candidates.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,9 @@ export class CandidatesComponent extends PaginationFilterBaseComponent
if (!this.selectedCandidate) {
return;
}
this.router.navigate([
'/pages/employees/candidates/edit/' +
this.selectedCandidate.id +
'/profile'
]);

const candidateId = this.selectedCandidate.id;
this.router.navigate(['/pages/employees/candidates/edit/', candidateId, '/profile']);
}

async archive(selectedItem?: ICandidateViewModel) {
Expand Down Expand Up @@ -324,6 +322,13 @@ export class CandidatesComponent extends PaginationFilterBaseComponent
this.sourceSmartTable = new ServerDataSource(this.http, {
endPoint: API_PREFIX + '/candidate/pagination',
relations: ['user', 'source', 'tags'],
join: {
alias: 'candidate',
leftJoin: {
user: 'candidate.user'
},
...(this.filters.join ? this.filters.join : {})
},
where: {
organizationId,
tenantId,
Expand Down Expand Up @@ -420,11 +425,8 @@ export class CandidatesComponent extends PaginationFilterBaseComponent
type: 'custom',
component: InputFilterComponent
},
filterFunction: (value) => {
this.setFilter({
field: 'user.firstName',
search: value
});
filterFunction: (value: string) => {
this.setFilter({ field: 'user.name', search: value });
}
},
email: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ export class TaskComponent extends PaginationFilterBaseComponent implements OnIn
? { endPoint: `${API_PREFIX}/tasks/me` }
: {}),
relations: [
'members',
'members.user',
'project',
'tags',
'teams',
Expand Down

0 comments on commit a4045a3

Please sign in to comment.