Skip to content

Commit

Permalink
include party in search
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Dec 13, 2021
1 parent 8b1b0d5 commit f11e4fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion helpers/contractDB/getContracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export const getContracts = (filters, requestSession) => {
sql += " and (" +
"instr(lower(contractTitle), ?)" +
" or instr(lower(contractDescription), ?)" +
" or instr(lower(contractParty), ?)" +
")";
parameters.push(searchStringPiece, searchStringPiece);
parameters.push(searchStringPiece, searchStringPiece, searchStringPiece);
}
}
if (!filters.includeExpired) {
Expand Down
3 changes: 2 additions & 1 deletion helpers/contractDB/getContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ export const getContracts = (filters: GetContractsFilters, requestSession: expre
sql += " and (" +
"instr(lower(contractTitle), ?)" +
" or instr(lower(contractDescription), ?)" +
" or instr(lower(contractParty), ?)" +
")";

parameters.push(searchStringPiece, searchStringPiece);
parameters.push(searchStringPiece, searchStringPiece, searchStringPiece);
}
}

Expand Down

0 comments on commit f11e4fb

Please sign in to comment.