feat(portal-ui): enhance user and device information display in admin and user devices tables

This commit is contained in:
2025-06-30 22:58:44 +05:00
parent 01b064aee7
commit 3cd3bbad16
5 changed files with 29 additions and 14 deletions

View File

@ -18,7 +18,6 @@ export default async function Devices({
const query = (await searchParams)?.query || "";
const page = (await searchParams)?.page || 1;
const session = await getServerSession(authOptions);
if (session?.user?.is_admin) return redirect("/user-devices");
return (
<div>
<div className="flex justify-between items-center border rounded-md border-dashed font-bold title-bg py-4 px-2 mb-4">

View File

@ -1,7 +1,6 @@
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,
@ -38,14 +37,20 @@ export default async function UserDevices({
name: "mac",
label: "MAC Address",
type: "string",
placeholder: "Enter MAC address",
placeholder: "Enter device MAC address",
},
{
name: "vendor",
label: "Vendor",
type: "string",
placeholder: "Enter vendor name",
placeholder: "Enter device vendor name",
},
{
name: "user",
label: "Device User",
type: "string",
placeholder: "User name or id card",
}
]}
/>
</div>