diff --git a/components/list/ListUI.tsx b/components/list/ListUI.tsx index 3b369cd..86a1757 100644 --- a/components/list/ListUI.tsx +++ b/components/list/ListUI.tsx @@ -3,9 +3,11 @@ import React from "react"; import { useLocal } from "@/lib/utils/use-local"; import get from "lodash.get"; import { ListBetter } from "../tablelist/List"; +import { cn } from "@/lib/utils"; export const ListUI: React.FC = ({ tabHeader, className, + classNameScrollArea, name, modeTab, column, @@ -29,6 +31,7 @@ export const ListUI: React.FC = ({ tab, onTab, breadcrumb, + classNameContainer, content, ready = true, }) => { @@ -50,7 +53,7 @@ export const ListUI: React.FC = ({ } return (
= ({
{ diff --git a/components/partials/SidebarBetter.tsx b/components/partials/SidebarBetter.tsx index 3ff4a76..9c472bc 100644 --- a/components/partials/SidebarBetter.tsx +++ b/components/partials/SidebarBetter.tsx @@ -25,6 +25,9 @@ import { TooltipTrigger, } from "../ui/tooltip"; import ImageBetter from "../ui/Image"; +import { ListUI } from "../list/ListUI"; +import { apix } from "@/lib/utils/apix"; +import { getNumber } from "@/lib/utils/getNumber"; interface TreeMenuItem { title: string; @@ -527,7 +530,7 @@ const SidebarBetterTree: React.FC = ({ = ({ }} open={notification} content={ -
+
Notifications
-
- -
-
- New message from  - - Bonnie Green - - : "Hey, what's up? All set for the presentation?" -
-
- a few moments ago -
-
-
- -
-
- New message from  - - Bonnie Green - - : "Hey, what's up? All set for the presentation?" -
-
- a few moments ago -
-
-
- -
-
- New message from  - - Bonnie Green - - : "Hey, what's up? All set for the presentation?" -
-
- a few moments ago -
-
-
- -
-
- New message from  - - Bonnie Green - - : "Hey, what's up? All set for the presentation?" -
-
- a few moments ago -
-
-
+
+ { + return ( + <> + +
+
+ New message from  + + Bonnie Green + + : "Hey, what's up? All set for the + presentation?" +
+
+ a few moments ago +
+
+
+ + ); + }} + onLoad={async (param: any) => { + const params = await events("onload-param", { + ...param, + }); + const result: any = await apix({ + port: "recruitment", + value: "data.data.job_postings", + path: `/api/job-postings${params}`, + validate: "array", + }); + return result; + }} + onCount={async () => { + const result: any = await apix({ + port: "recruitment", + value: "data.data.total", + path: `/api/job-postings?page=1&page_size=1`, + validate: "object", + }); + return getNumber(result); + }} + />
= ({ + classNameContainer, + classNameScrollArea, autoPagination = true, name, column, @@ -279,7 +282,10 @@ export const ListBetter: React.FC = ({ <>
{!local.ready ? ( @@ -289,7 +295,12 @@ export const ListBetter: React.FC = ({
) : ( -
+
{Array.isArray(local.data) && local.data?.length ? ( local.data?.map((e, idx) => { return (