Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #302 from kmcwebdev/development
Browse files Browse the repository at this point in the history
Add ts_rank as a column in reimbursement get all service
  • Loading branch information
csulit authored Sep 30, 2023
2 parents bcb4e68 + b8e3429 commit 7eddef4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/finance/services/reimbursement.get-all.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ export class ReimbursementGetAllService {
'finance_reimbursement_requests.date_approve',
'finance_reimbursement_requests.date_processed',
'finance_reimbursement_requests.created_at',
sql<number>`ts_rank(to_tsvector('english', finance_reimbursement_requests.reference_no || ' ' || coalesce(users.full_name, '') || ' ' || users.email || ' ' ||
coalesce(users.client_name, '') || ' ' || coalesce(users.hrbp_approver_email, ''), plainto_tsquery(${
filter?.text_search || ''
}))`.as('rank'),
]);

if (reimbursementRequestIds.length) {
Expand Down

0 comments on commit 7eddef4

Please sign in to comment.