diff --git a/example.env.local b/example.env
similarity index 83%
rename from example.env.local
rename to example.env
index a5122ce..6959864 100644
--- a/example.env.local
+++ b/example.env
@@ -1,4 +1,4 @@
-NEXT_PUBLIC_VERSION = "2.2.1"
+NEXT_PUBLIC_VERSION = "2.3.0"
NEXT_PUBLIC_API_URL = "https://crm.witel.ir/server"
NEXT_PUBLIC_SERVER_SOCKET_URL = "wss://crm.witel.ir"
diff --git a/src/app/(withAuth)/(dashboardLayout)/dashboard/page.js b/src/app/(withAuth)/(dashboardLayout)/dashboard/page.js
index ed0df92..3178277 100644
--- a/src/app/(withAuth)/(dashboardLayout)/dashboard/page.js
+++ b/src/app/(withAuth)/(dashboardLayout)/dashboard/page.js
@@ -1,9 +1,11 @@
+import DashboardPage from "@/components/dashboard/dashboard";
+
export const metadata = {
title: "پیشخوان",
};
const Page = () => {
- return <>>;
+ return ;
};
export default Page;
diff --git a/src/app/(withAuth)/(dashboardLayout)/layout.js b/src/app/(withAuth)/(dashboardLayout)/layout.js
index 54c6ee0..544ff61 100644
--- a/src/app/(withAuth)/(dashboardLayout)/layout.js
+++ b/src/app/(withAuth)/(dashboardLayout)/layout.js
@@ -5,6 +5,7 @@ import WithWidgetMiddleware from "@/core/middlewares/withWidget";
import { SocketProvider } from "@/lib/contexts/socket";
import { usePermissions } from "@/lib/hooks/usePermissions";
import { Stack } from "@mui/material";
+import { SWRConfig } from "swr";
const Layout = ({ children }) => {
const { data: permissions } = usePermissions();
@@ -14,9 +15,11 @@ const Layout = ({ children }) => {
return (
-
- {children}
-
+ new Map() }}>
+
+ {children}
+
+
diff --git a/src/components/dashboard/Users/DataTable.jsx b/src/components/dashboard/Users/DataTable.jsx
index 65e4837..71da3fe 100644
--- a/src/components/dashboard/Users/DataTable.jsx
+++ b/src/components/dashboard/Users/DataTable.jsx
@@ -27,6 +27,43 @@ const DataTable = () => {
grow: false,
size: 100,
},
+ {
+ accessorKey: "full_name",
+ header: "نام و نام خانوادگی",
+ id: "full_name",
+ enableColumnFilter: true,
+ datatype: "text",
+ filterMode: "equals",
+ sortDescFirst: false,
+ columnFilterModeOptions: ["equals", "contains"],
+ grow: false,
+ size: 100,
+ },
+ {
+ header: "شماره تماس داخلی",
+ id: "telephone_id",
+ enableColumnFilter: true,
+ datatype: "text",
+ filterMode: "equals",
+ sortDescFirst: false,
+ columnFilterModeOptions: ["equals", "contains"],
+ grow: false,
+ size: 100,
+ Cell: ({ row }) => ,
+ },
+ {
+ accessorKey: "is_online",
+ header: "وضعیت برخط",
+ id: "is_online",
+ enableColumnFilter: true,
+ datatype: "text",
+ filterMode: "equals",
+ sortDescFirst: false,
+ columnFilterModeOptions: ["equals", "contains"],
+ grow: false,
+ size: 100,
+ Cell: ({ row }) => ,
+ },
{
header: "استان",
id: "province_id",
@@ -65,18 +102,6 @@ const DataTable = () => {
},
Cell: ({ renderedCellValue, row }) => <>{row.original.province_fa}>,
},
- {
- header: "شماره تماس داخلی",
- id: "telephone_id",
- enableColumnFilter: true,
- datatype: "text",
- filterMode: "equals",
- sortDescFirst: false,
- columnFilterModeOptions: ["equals", "contains"],
- grow: false,
- size: 100,
- Cell: ({ row }) => ,
- },
{
accessorKey: "username",
header: "نام کاربری",
@@ -155,19 +180,6 @@ const DataTable = () => {
grow: false,
size: 100,
},
- {
- accessorKey: "is_online",
- header: "وضعیت برخط",
- id: "is_online",
- enableColumnFilter: true,
- datatype: "text",
- filterMode: "equals",
- sortDescFirst: false,
- columnFilterModeOptions: ["equals", "contains"],
- grow: false,
- size: 100,
- Cell: ({ row }) => ,
- },
{
accessorKey: "gender",
header: "جنسیت",
diff --git a/src/components/dashboard/dashboard/OnlineUsersReport/index.jsx b/src/components/dashboard/dashboard/OnlineUsersReport/index.jsx
new file mode 100644
index 0000000..ee62cbc
--- /dev/null
+++ b/src/components/dashboard/dashboard/OnlineUsersReport/index.jsx
@@ -0,0 +1,12 @@
+import { useSocket } from "@/lib/contexts/socket";
+import { Stack } from "@mui/material";
+
+const OnlineUsersReport = () => {
+ const { clientsOnline } = useSocket();
+ return (
+
+ clientsOnline: {clientsOnline.length}
+
+ )
+}
+export default OnlineUsersReport;
\ No newline at end of file
diff --git a/src/components/dashboard/dashboard/index.jsx b/src/components/dashboard/dashboard/index.jsx
new file mode 100644
index 0000000..ca6dc5b
--- /dev/null
+++ b/src/components/dashboard/dashboard/index.jsx
@@ -0,0 +1,12 @@
+"use client"
+import { Stack } from "@mui/material";
+import OnlineUsersReport from "./OnlineUsersReport";
+
+const DashboardPage = () => {
+ return (
+
+
+
+ )
+}
+export default DashboardPage;
\ No newline at end of file