diff --git a/client/src/Routes.tsx b/client/src/Routes.tsx
index eac1139..3fee279 100644
--- a/client/src/Routes.tsx
+++ b/client/src/Routes.tsx
@@ -2,6 +2,7 @@ import { Outlet, RouterProvider, createBrowserRouter } from "react-router-dom";
import {
DealerLayout,
DealersList,
+ ErrorPage,
LoginPage,
LogoutPage,
QuoteCreate,
@@ -25,6 +26,13 @@ export const Routes = () => {
},
];
+ const routesForErrors = [
+ {
+ path: "*",
+ Component: ErrorPage,
+ },
+ ];
+
// Define routes accessible only to authenticated users
const routesForAuthenticatedOnly = [
{
@@ -123,7 +131,12 @@ export const Routes = () => {
// Combine and conditionally include routes based on authentication status
const router = createBrowserRouter(
- [...routesForPublic, ...routesForAuthenticatedOnly, ...routesForNotAuthenticatedOnly],
+ [
+ ...routesForPublic,
+ ...routesForAuthenticatedOnly,
+ ...routesForNotAuthenticatedOnly,
+ ...routesForErrors,
+ ],
{
//basename: "/app",
}
diff --git a/client/src/app/ErrorPage.tsx b/client/src/app/ErrorPage.tsx
index f8f38e6..ac753a3 100644
--- a/client/src/app/ErrorPage.tsx
+++ b/client/src/app/ErrorPage.tsx
@@ -25,6 +25,29 @@ export const ErrorPage = (props: ErrorPageProps) => {
try again.
);
+
+ return (
+
+
+
+
+ Oops, page not found!
+
+
+ The page you're looking for doesn't exist or has been moved.
+
+
+
+
+
+
+ );
+
return (
{msg}
diff --git a/client/src/app/quotes/components/AppendCatalogArticleRowButton.tsx b/client/src/app/quotes/components/AppendCatalogArticleRowButton.tsx
new file mode 100644
index 0000000..d675286
--- /dev/null
+++ b/client/src/app/quotes/components/AppendCatalogArticleRowButton.tsx
@@ -0,0 +1,31 @@
+import { cn } from "@/lib/utils";
+import { Button, ButtonProps } from "@/ui";
+import { t } from "i18next";
+import { PackagePlusIcon } from "lucide-react";
+
+export interface AppendCatalogArticleRowButtonProps extends ButtonProps {
+ label?: string;
+ className?: string;
+}
+
+export const AppendCatalogArticleRowButton = ({
+ label = t("common.append_article"),
+ className,
+ ...props
+}: AppendCatalogArticleRowButtonProps): JSX.Element => (
+
+);
+
+AppendCatalogArticleRowButton.displayName = "AddNewRowButton";
diff --git a/client/src/app/quotes/components/AddNewRowButton.tsx b/client/src/app/quotes/components/AppendEmptyRowButton.tsx
similarity index 65%
rename from client/src/app/quotes/components/AddNewRowButton.tsx
rename to client/src/app/quotes/components/AppendEmptyRowButton.tsx
index a314d35..87a2e16 100644
--- a/client/src/app/quotes/components/AddNewRowButton.tsx
+++ b/client/src/app/quotes/components/AppendEmptyRowButton.tsx
@@ -1,17 +1,18 @@
import { cn } from "@/lib/utils";
import { Button, ButtonProps } from "@/ui";
+import { t } from "i18next";
import { PlusCircleIcon } from "lucide-react";
-export interface AddNewRowButtonProps extends ButtonProps {
+export interface AppendEmptyRowButtonProps extends ButtonProps {
label?: string;
className?: string;
}
-export const AddNewRowButton = ({
- label = "Añade nueva fila",
+export const AppendEmptyRowButton = ({
+ label = t("common.append_empty_row"),
className,
...props
-}: AddNewRowButtonProps): JSX.Element => (
+}: AppendEmptyRowButtonProps): JSX.Element => (