diff --git a/modules/customers/src/web/list/ui/pages/list-customers-page.tsx b/modules/customers/src/web/list/ui/pages/list-customers-page.tsx index 437d2608..7d575cd1 100644 --- a/modules/customers/src/web/list/ui/pages/list-customers-page.tsx +++ b/modules/customers/src/web/list/ui/pages/list-customers-page.tsx @@ -1,6 +1,11 @@ import { PageHeader, SimpleSearchInput } from "@erp/core/components"; import { AppContent, AppHeader, BackHistoryButton } from "@repo/rdx-ui/components"; -import { Button } from "@repo/shadcn-ui/components"; +import { + Button, + ResizableHandle, + ResizablePanel, + ResizablePanelGroup, +} from "@repo/shadcn-ui/components"; import { PlusIcon } from "lucide-react"; import { useNavigate } from "react-router-dom"; @@ -22,6 +27,31 @@ export const ListCustomersPage = () => { //onDeleteClick: (customer) => null, //confirmDelete(inv.id), }); + const isPanelOpen = panelCtrl.panelState.isOpen; + + const listContent = ( +
+
+ +
+ + +
+ ); + if (listCtrl.isError) { return ( @@ -51,43 +81,45 @@ export const ListCustomersPage = () => { title={t("pages.list.title")} /> + -
-
-
- -
+ {isPanelOpen ? ( + + + {listContent} + - null} - pageIndex={listCtrl.pageIndex} - pageSize={listCtrl.pageSize} - /> -
+ - navigate(`/customers/${customer.id}/edit`)} - onOpenChange={(open) => { - if (open) panelCtrl.panelState.onOpenChange(true); - else panelCtrl.closePanel(); - }} - onTogglePinned={panelCtrl.panelState.togglePinned} - open={panelCtrl.panelState.isOpen} - visibility={panelCtrl.panelState.visibility} - /> -
+ +
+ navigate(`/customers/${customer.id}/edit`)} + onOpenChange={(open) => { + if (!open) { + panelCtrl.closePanel(); + return; + } + + panelCtrl.panelState.onOpenChange(true); + }} + onTogglePinned={panelCtrl.panelState.togglePinned} + open={panelCtrl.panelState.isOpen} + visibility={panelCtrl.panelState.visibility} + /> +
+
+ + ) : ( +
{listContent}
+ )}
); diff --git a/packages/rdx-ui/src/components/right-panel/right-panel.tsx b/packages/rdx-ui/src/components/right-panel/right-panel.tsx index 33deacd4..be4a5d88 100644 --- a/packages/rdx-ui/src/components/right-panel/right-panel.tsx +++ b/packages/rdx-ui/src/components/right-panel/right-panel.tsx @@ -17,37 +17,30 @@ export const RightPanel = ({ return ( ); }; diff --git a/packages/shadcn-ui/src/styles/globals.css b/packages/shadcn-ui/src/styles/globals.css index 1d1e32ea..4020d10b 100644 --- a/packages/shadcn-ui/src/styles/globals.css +++ b/packages/shadcn-ui/src/styles/globals.css @@ -149,7 +149,7 @@ --sidebar-border: oklch(0.6427 0.1407 253.94); --sidebar-ring: oklch(1 0 0); - --radius: 0.25rem; + --radius: 0.325rem; --shadow-x: 0; --shadow-y: 1px; --shadow-blur: 3px; @@ -200,7 +200,7 @@ --sidebar-accent-foreground: oklch(0.9851 0 0); --sidebar-border: oklch(1 0 0); --sidebar-ring: oklch(0.4915 0.2776 263.8724); - --radius: 0.25rem; + --radius: 0.325rem; --shadow-2xs: 1px 1px 6px 0px hsl(0 0% 0% / 0.05); --shadow-xs: 1px 1px 6px 0px hsl(0 0% 0% / 0.05); --shadow-sm: 1px 1px 6px 0px hsl(0 0% 0% / 0.1), 1px 1px 2px -1px hsl(0 0% 0% / 0.1);