diff --git a/client/src/Routes.tsx b/client/src/Routes.tsx index 9200db3..cadcdd5 100644 --- a/client/src/Routes.tsx +++ b/client/src/Routes.tsx @@ -1,7 +1,9 @@ import { RouterProvider, createBrowserRouter } from "react-router-dom"; -import { LoginPage, LogoutPage, StartPage } from "./app"; +import { LoginPage, LogoutPage, SettingsPage, StartPage } from "./app"; import { CatalogList } from "./app/catalog"; import { DashboardPage } from "./app/dashboard"; +import { DealersList } from "./app/dealers/list"; +import { QuotesList } from "./app/quotes/list"; import { ProtectedRoute } from "./components"; export const Routes = () => { @@ -17,17 +19,41 @@ export const Routes = () => { const routesForAuthenticatedOnly = [ { path: "/home", - Component: DashboardPage, + element: ( + + + + ), }, { path: "/catalog", - Component: CatalogList, - }, - { - path: "/profile", element: ( -

Profile

+ +
+ ), + }, + { + path: "/dealers", + element: ( + + + + ), + }, + { + path: "/quotes", + element: ( + + + + ), + }, + { + path: "/settings", + element: ( + + ), }, @@ -39,16 +65,6 @@ export const Routes = () => { ), }, - { - path: "/admin", - element: , // Wrap the component in ProtectedRoute - children: [ - { - path: "", - element:
Dashboard
, - }, - ], - }, ]; // Define routes accessible only to non-authenticated users diff --git a/client/src/app/LoginPage.tsx b/client/src/app/auth/LoginPage.tsx similarity index 98% rename from client/src/app/LoginPage.tsx rename to client/src/app/auth/LoginPage.tsx index b683644..bffaa77 100644 --- a/client/src/app/LoginPage.tsx +++ b/client/src/app/auth/LoginPage.tsx @@ -21,7 +21,7 @@ import { useState } from "react"; import { SubmitHandler, useForm } from "react-hook-form"; import { Trans, useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; -import SpanishJoiMessages from "../spanish-joi-messages.json"; +import SpanishJoiMessages from "../../spanish-joi-messages.json"; type LoginDataForm = ILogin_DTO; diff --git a/client/src/app/LogoutPage.tsx b/client/src/app/auth/LogoutPage.tsx similarity index 100% rename from client/src/app/LogoutPage.tsx rename to client/src/app/auth/LogoutPage.tsx diff --git a/client/src/app/auth/index.ts b/client/src/app/auth/index.ts new file mode 100644 index 0000000..7eba1aa --- /dev/null +++ b/client/src/app/auth/index.ts @@ -0,0 +1,2 @@ +export * from "./LoginPage"; +export * from "./LogoutPage"; diff --git a/client/src/app/catalog/list.tsx b/client/src/app/catalog/list.tsx index 52f8af0..9834599 100644 --- a/client/src/app/catalog/list.tsx +++ b/client/src/app/catalog/list.tsx @@ -30,11 +30,15 @@ import { File, ListFilter, MoreHorizontal, PlusCircle } from "lucide-react"; import { Layout, LayoutContent, LayoutHeader } from "@/components"; -export const CatalogList = ({ children }) => { +export const CatalogList = () => { return ( +
+

Catalog

+
+
diff --git a/client/src/app/dashboard/index.tsx b/client/src/app/dashboard/index.tsx index 3236f15..fc68baa 100644 --- a/client/src/app/dashboard/index.tsx +++ b/client/src/app/dashboard/index.tsx @@ -1,5 +1,17 @@ -import { Layout, LayoutHeader } from "@/components"; import { + ChevronLeft, + ChevronRight, + Copy, + CreditCard, + File, + ListFilter, + MoreVertical, + Truck, +} from "lucide-react"; + +import { Layout, LayoutContent, LayoutHeader } from "@/components"; +import { + Badge, Button, Card, CardContent, @@ -7,90 +19,408 @@ import { CardFooter, CardHeader, CardTitle, - Input, + DropdownMenu, + DropdownMenuCheckboxItem, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuTrigger, + Pagination, + PaginationContent, + PaginationItem, + Progress, + Separator, + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, + Tabs, + TabsContent, + TabsList, + TabsTrigger, } from "@/ui"; -import { Checkbox } from "@radix-ui/react-checkbox"; - -import { SyntheticEvent, useState } from "react"; -import { Link } from "react-router-dom"; - export const DashboardPage = () => { - const [logoutAlertVisible, setLogoutAlertVisible] = useState(false); - - const openLogoutAlert = (event: Event) => { - event.preventDefault(); - setLogoutAlertVisible(true); - return; - }; - - const closeLogoutAlert = (event: SyntheticEvent) => { - event.preventDefault(); - setLogoutAlertVisible(false); - return; - }; - 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. + +
+
+ + + Tus Cotizaciones + + Introducing Our Dynamic Orders Dashboard for Seamless Management and Insightful + Analysis. + + + + + + + This Week + $1,329 + -
- -
- - -
-
+
+25% from last week
- - + + + +
+ + + This Month + $5,329 + + +
+10% from last month
+
+ +
+ +
+ + Week + Month + Year + +
+ + + + + + Filter by + + Fulfilled + Declined + Refunded + + + +
+
+ + + + Orders + Recent orders from your store. + + + + + + Customer + Type + Status + Date + Amount + + + + + +
Liam Johnson
+
+ liam@example.com +
+
+ Sale + + + Fulfilled + + + 2023-06-23 + $250.00 +
+ + +
Olivia Smith
+
+ olivia@example.com +
+
+ Refund + + + Declined + + + 2023-06-24 + $150.00 +
+ + +
Noah Williams
+
+ noah@example.com +
+
+ Subscription + + + Fulfilled + + + 2023-06-25 + $350.00 +
+ + +
Emma Brown
+
+ emma@example.com +
+
+ Sale + + + Fulfilled + + + 2023-06-26 + $450.00 +
+ + +
Liam Johnson
+
+ liam@example.com +
+
+ Sale + + + Fulfilled + + + 2023-06-23 + $250.00 +
+ + +
Liam Johnson
+
+ liam@example.com +
+
+ Sale + + + Fulfilled + + + 2023-06-23 + $250.00 +
+ + +
Olivia Smith
+
+ olivia@example.com +
+
+ Refund + + + Declined + + + 2023-06-24 + $150.00 +
+ + +
Emma Brown
+
+ emma@example.com +
+
+ Sale + + + Fulfilled + + + 2023-06-26 + $450.00 +
+
+
+
+
+
+
-
+
+ + +
+ + Order Oe31b70H + + + Date: November 23, 2023 +
+
+ + + + + + + Edit + Export + + Trash + + +
+
+ +
+
Order Details
+
    +
  • + + Glimmer Lamps x 2 + + $250.00 +
  • +
  • + + Aqua Filters x 1 + + $49.00 +
  • +
+ +
    +
  • + Subtotal + $299.00 +
  • +
  • + Shipping + $5.00 +
  • +
  • + Tax + $25.00 +
  • +
  • + Total + $329.00 +
  • +
+
+ +
+
+
Shipping Information
+
+ Liam Johnson + 1234 Main St. + Anytown, CA 12345 +
+
+
+
Billing Information
+
Same as shipping address
+
+
+ +
+
Customer Information
+
+
+
Customer
+
Liam Johnson
+
+
+
Email
+
+ liam@acme.com +
+
+
+
Phone
+
+ +1 234 567 890 +
+
+
+
+ +
+
Payment Information
+
+
+
+ + Visa +
+
**** **** **** 4532
+
+
+
+
+ +
+ Updated +
+ + + + + + + + + + +
+
+
+
); }; diff --git a/client/src/app/dealers/list.tsx b/client/src/app/dealers/list.tsx new file mode 100644 index 0000000..067efcd --- /dev/null +++ b/client/src/app/dealers/list.tsx @@ -0,0 +1,14 @@ +import { Layout, LayoutContent, LayoutHeader } from "@/components"; + +export const DealersList = () => { + return ( + + + +
+

Dealers

+
+
+
+ ); +}; diff --git a/client/src/app/index.ts b/client/src/app/index.ts index 41053fe..3f54d3e 100644 --- a/client/src/app/index.ts +++ b/client/src/app/index.ts @@ -1,8 +1,8 @@ export * from "./ErrorPage"; -export * from "./LoginPage"; -export * from "./LogoutPage"; export * from "./StartPage"; +export * from "./auth"; export * from "./catalog"; export * from "./dashboard"; -//export * from "./dealers"; -//export * from "./quotes"; +export * from "./dealers"; +export * from "./quotes"; +export * from "./settings"; diff --git a/client/src/app/quotes/list.tsx b/client/src/app/quotes/list.tsx new file mode 100644 index 0000000..71d2f9b --- /dev/null +++ b/client/src/app/quotes/list.tsx @@ -0,0 +1,14 @@ +import { Layout, LayoutContent, LayoutHeader } from "@/components"; + +export const QuotesList = () => { + return ( + + + +
+

Quotes

+
+
+
+ ); +}; diff --git a/client/src/app/settings/index.tsx b/client/src/app/settings/index.tsx new file mode 100644 index 0000000..a6c113d --- /dev/null +++ b/client/src/app/settings/index.tsx @@ -0,0 +1,81 @@ +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. + + + +
+ +
+ + +
+
+
+ + + +
+
+
+
+
+ ); +}; diff --git a/client/src/components/Layout/LayoutContent.tsx b/client/src/components/Layout/LayoutContent.tsx index 8c70fa7..dd96c3d 100644 --- a/client/src/components/Layout/LayoutContent.tsx +++ b/client/src/components/Layout/LayoutContent.tsx @@ -1,8 +1,19 @@ +import { cn } from "@/lib/utils"; import { PropsWithChildren } from "react"; -export const LayoutContent = ({ children }: PropsWithChildren) => { +export const LayoutContent = ({ + className, + children, +}: PropsWithChildren<{ + className?: string; +}>) => { return ( -
+
{children}
);