feat: add origin filter subject
This commit is contained in:
@@ -5,6 +5,7 @@ import { currencySymbols } from "./currencyData";
|
||||
import {
|
||||
suggestGateways,
|
||||
suggestTarget,
|
||||
suggestOrigin,
|
||||
suggestOwner,
|
||||
suggestCategories,
|
||||
suggestProjects,
|
||||
@@ -190,6 +191,14 @@ const filterSubjects: Record<string, FilterSubject> = {
|
||||
suggest: suggestTarget,
|
||||
allowsMultipleEquals: true,
|
||||
},
|
||||
origin: {
|
||||
key: "origin",
|
||||
type: "string",
|
||||
compatibleOperators: ["equals", "is_any_of"],
|
||||
resources: ["gateway_charges"],
|
||||
suggest: suggestOrigin,
|
||||
allowsMultipleEquals: true,
|
||||
},
|
||||
currency: {
|
||||
key: "currency",
|
||||
param: "money.currency",
|
||||
|
||||
@@ -55,6 +55,10 @@ export async function suggestTarget(q: string): Promise<FilterOption[]> {
|
||||
return options;
|
||||
}
|
||||
|
||||
export async function suggestOrigin(q: string): Promise<FilterOption[]> {
|
||||
return suggestTarget(q);
|
||||
}
|
||||
|
||||
export async function suggestOwner(q: string): Promise<FilterOption[]> {
|
||||
const trimmed = q.trim();
|
||||
if (trimmed.length < 2) return [];
|
||||
|
||||
Reference in New Issue
Block a user