feat: allow partial matching on totalPaid field
This commit is contained in:
@@ -41,7 +41,15 @@ export async function listPayments(
|
||||
$or: [
|
||||
{ permitNumber: { $regex: regex } },
|
||||
{ "address.full_address": { $regex: regex } },
|
||||
{ totalPaid: { $regex: regex } },
|
||||
{
|
||||
$expr: {
|
||||
$regexMatch: {
|
||||
input: { $toString: "$totalPaid" },
|
||||
regex: params.searchToken,
|
||||
options: "i",
|
||||
},
|
||||
},
|
||||
},
|
||||
...(isNaN(numericSearch) ? [] : [{ totalPaid: numericSearch }]),
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user