mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-02 09:48:22 +00:00
WIP feat(admin-devices): enhance device management from admin with dynamic filters and improved blocking functionality
This commit is contained in:
@ -51,13 +51,6 @@ export default async function Devices({
|
||||
label: "Vendor",
|
||||
type: "string",
|
||||
placeholder: "Enter vendor name",
|
||||
}, {
|
||||
label: "Amount of Devices",
|
||||
name: "amount",
|
||||
type: "dual-range-slider",
|
||||
min: 1,
|
||||
max: 100,
|
||||
sliderLabel: "MVR"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
|
@ -1,9 +1,7 @@
|
||||
import { AdminDevicesTable } from "@/components/admin/admin-devices-table";
|
||||
import Search from "@/components/search";
|
||||
import { Suspense } from "react";
|
||||
|
||||
|
||||
|
||||
import { AdminDevicesTable } from "@/components/admin/admin-devices-table";
|
||||
import DynamicFilter from "@/components/generic-filter";
|
||||
import Search from "@/components/search";
|
||||
|
||||
export default async function UserDevices({
|
||||
searchParams,
|
||||
@ -19,17 +17,37 @@ export default async function UserDevices({
|
||||
return (
|
||||
<div>
|
||||
<div className="flex justify-between items-center border rounded-md border-dashed font-bold title-bg py-4 px-2 mb-4">
|
||||
<h3 className="text-sarLinkOrange text-2xl">
|
||||
User Devices
|
||||
</h3>
|
||||
<h3 className="text-sarLinkOrange text-2xl">User Devices</h3>
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="user-filters"
|
||||
className=" pb-4 gap-4 flex sm:flex-row flex-col items-start justify-start"
|
||||
>
|
||||
<Search />
|
||||
|
||||
<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={query} fallback={"loading...."}>
|
||||
<AdminDevicesTable parentalControl={true} searchParams={searchParams} />
|
||||
|
Reference in New Issue
Block a user