feat(filters): replace existing filters with dynamic filters for improved user and device management

This commit is contained in:
2025-07-14 21:39:31 +05:00
parent 8bcf4812be
commit 9926de99d6
4 changed files with 74 additions and 46 deletions

View File

@ -1,5 +1,6 @@
import { Suspense } from "react";
import { DevicesTable } from "@/components/devices-table";
import DynamicFilter from "@/components/generic-filter";
import Search from "@/components/search";
export default async function ParentalControl({
@ -27,8 +28,30 @@ export default async function ParentalControl({
id="user-filters"
className=" pb-4 gap-4 flex sm:flex-row flex-col items-start justify-start"
>
<Search />
</div>
<DynamicFilter
description="Filter devices by name, MAC address, or vendor."
title="Device Filter"
inputs={[
{
name: "name",
label: "Device Name",
type: "string",
placeholder: "Enter device name",
},
{
name: "mac",
label: "MAC Address",
type: "string",
placeholder: "Enter MAC address",
},
{
name: "vendor",
label: "Vendor",
type: "string",
placeholder: "Enter vendor name",
}
]}
/> </div>
<Suspense key={(await searchParams).page} fallback={"loading...."}>
<DevicesTable
parentalControl={true}