diff --git a/client/src/Routes.tsx b/client/src/Routes.tsx index c74b908..4a4d276 100644 --- a/client/src/Routes.tsx +++ b/client/src/Routes.tsx @@ -1,5 +1,13 @@ import { Outlet, RouterProvider, createBrowserRouter } from "react-router-dom"; -import { DealerLayout, DealersList, LoginPage, LogoutPage, SettingsPage, StartPage } from "./app"; +import { + DealerLayout, + DealersList, + LoginPage, + LogoutPage, + SettingsEditor, + SettingsLayout, + StartPage, +} from "./app"; import { CatalogLayout, CatalogList } from "./app/catalog"; import { DashboardPage } from "./app/dashboard"; import { QuotesList } from "./app/quotes/list"; @@ -68,9 +76,17 @@ export const Routes = () => { path: "/settings", element: ( - + + + ), + children: [ + { + index: true, + element: , + }, + ], }, { path: "/logout", diff --git a/client/src/app/catalog/components/CatalogDataTable.tsx b/client/src/app/catalog/components/CatalogDataTable.tsx index 3948d77..5925145 100644 --- a/client/src/app/catalog/components/CatalogDataTable.tsx +++ b/client/src/app/catalog/components/CatalogDataTable.tsx @@ -15,7 +15,6 @@ import { useCatalogList } from "../hooks"; export const CatalogDataTable = () => { const navigate = useNavigate(); const { pagination, globalFilter, isFiltered } = useDataTableContext(); - console.log("pagination PADRE => ", pagination); const { data, isPending, isError, error } = useCatalogList({ pagination: { @@ -27,12 +26,30 @@ export const CatalogDataTable = () => { const columns = useMemo[]>( () => [ + { + id: "id" as const, + accessorKey: "id", + enableResizing: false, + size: 10, + }, + { + id: "article_id" as const, + accessorKey: "id_article", + enableResizing: false, + size: 10, + }, + { + id: "catalog_name" as const, + accessorKey: "catalog_name", + enableResizing: false, + size: 10, + }, { id: "description" as const, accessorKey: "description", header: () => <>{t("catalog.list.columns.description")}, enableResizing: false, - size: 300, + size: 100, }, { id: "points" as const, diff --git a/client/src/app/catalog/layout.tsx b/client/src/app/catalog/layout.tsx index 8d3982b..e7c9438 100644 --- a/client/src/app/catalog/layout.tsx +++ b/client/src/app/catalog/layout.tsx @@ -16,7 +16,6 @@ export const CatalogLayout = ({ children }: PropsWithChildren) => { {children} - 1 ); diff --git a/client/src/app/settings/edit.tsx b/client/src/app/settings/edit.tsx new file mode 100644 index 0000000..584c419 --- /dev/null +++ b/client/src/app/settings/edit.tsx @@ -0,0 +1,72 @@ +import { + Button, + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, + Input, +} from "@/ui"; + +import { Checkbox } from "@radix-ui/react-checkbox"; + +import { Link } from "react-router-dom"; + +export const SettingsEditor = () => { + return ( +
+ +
+ + + Store Name + Used to identify your store in the marketplace. + + +
+ +
+
+ + + +
+ + + Plugins Directory + + The directory within your project, in which your plugins are located. + + + +
+ +
+ + +
+
+
+ + + +
+
+
+ ); +}; diff --git a/client/src/app/settings/index.tsx b/client/src/app/settings/index.tsx index a6c113d..6e2b7b9 100644 --- a/client/src/app/settings/index.tsx +++ b/client/src/app/settings/index.tsx @@ -1,81 +1,2 @@ -import { Layout, LayoutHeader } from "@/components"; -import { - Button, - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, - Input, -} from "@/ui"; - -import { Checkbox } from "@radix-ui/react-checkbox"; - -import { Link } from "react-router-dom"; - -export const SettingsPage = () => { - return ( - - -
-
-

Settings

-
-
- -
- - - Store Name - Used to identify your store in the marketplace. - - -
- -
-
- - - -
- - - Plugins Directory - - The directory within your project, in which your plugins are located. - - - -
- -
- - -
-
-
- - - -
-
-
-
-
- ); -}; +export * from "./edit"; +export * from "./layout"; diff --git a/client/src/app/settings/layout.tsx b/client/src/app/settings/layout.tsx new file mode 100644 index 0000000..b5a968c --- /dev/null +++ b/client/src/app/settings/layout.tsx @@ -0,0 +1,19 @@ +import { Layout, LayoutContent, LayoutHeader } from "@/components"; +import { PropsWithChildren } from "react"; +import { Trans } from "react-i18next"; + +export const SettingsLayout = ({ children }: PropsWithChildren) => { + return ( + + + +
+

+ +

+
+ {children} +
+
+ ); +}; diff --git a/client/src/components/DataTable/DataTablePagination.tsx b/client/src/components/DataTable/DataTablePagination.tsx index 39adbdc..0d2f69f 100644 --- a/client/src/components/DataTable/DataTablePagination.tsx +++ b/client/src/components/DataTable/DataTablePagination.tsx @@ -1,6 +1,7 @@ -import { DEFAULT_PAGE_SIZES, INITIAL_PAGE_INDEX } from "@/lib/hooks"; +import { DEFAULT_PAGE_SIZES } from "@/lib/hooks"; import { cn } from "@/lib/utils"; import { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/ui"; +import { INITIAL_PAGE_INDEX } from "@shared/contexts"; import { Table } from "@tanstack/react-table"; import { t } from "i18next"; import { diff --git a/client/src/components/Layout/LayoutHeader.tsx b/client/src/components/Layout/LayoutHeader.tsx index e40f07b..5990a20 100644 --- a/client/src/components/Layout/LayoutHeader.tsx +++ b/client/src/components/Layout/LayoutHeader.tsx @@ -9,7 +9,7 @@ import { UserButton } from "./components/UserButton"; export const LayoutHeader = () => { return ( -
+