From ea969bb27d7aafacaa2b8080217f680453e59738 Mon Sep 17 00:00:00 2001 From: Mahdi Saadatbakht Date: Mon, 8 Jan 2024 09:55:30 +0330 Subject: [PATCH 1/2] Filter logs also by model in requests api --- pages/api/v1/requests/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/api/v1/requests/index.ts b/pages/api/v1/requests/index.ts index e0475cd..1830404 100644 --- a/pages/api/v1/requests/index.ts +++ b/pages/api/v1/requests/index.ts @@ -129,6 +129,12 @@ export default async function handler( mode: "insensitive", }, }, + { + model: { + contains: `${search}`, + mode: "insensitive", + }, + }, ] as any[], } : {}; From 872843313fa97eb78c54d0ddcdae975267c09c59 Mon Sep 17 00:00:00 2001 From: Mahdi Saadatbakht Date: Mon, 8 Jan 2024 09:56:16 +0330 Subject: [PATCH 2/2] Add models to placeholder of logs page input and increase the min-width of the input --- components/RequestTable.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/RequestTable.tsx b/components/RequestTable.tsx index 3790690..36a6edf 100644 --- a/components/RequestTable.tsx +++ b/components/RequestTable.tsx @@ -758,10 +758,10 @@ export function RequestTable({ userId }: { userId?: string }) {
setSearch(e.target.value)} - className="min-w-[250px]" + className="min-w-[300px]" /> {/* {isFiltered && (