Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const GenerateLink = lazy(() => import("./page/GenerateLink"));
const CreateInvoicesBatch = lazy(() => import("./page/CreateInvoicesBatch"));
const BatchPayment = lazy(() => import("./page/BatchPayment"));
const NotFound = lazy(() => import("./page/NotFound"));
const Settings = lazy(() => import("./page/Settings"));

function App() {
return (
Expand Down Expand Up @@ -107,6 +108,7 @@ function App() {
path="batch-invoice"
element={<CreateInvoicesBatch />}
/>
<Route path="settings" element={<Settings />} />
</Route>
<Route path="feature" element={<Feature />} />
<Route path="about" element={<About />} />
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/page/CreateInvoice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import {
} from "@/utils/invoiceValidation";
import toast from "react-hot-toast";

import ProductCatalogImport from "../components/ProductCatalogImport";

import { AmountTypeToggle } from "../components/AmountTypeToggle";
import ProductAutocompleteInput from "@/components/ProductAutocompleteInput";
import { useProductCatalog } from "@/hooks/useProductCatalog";
Expand Down Expand Up @@ -1159,8 +1159,6 @@ function CreateInvoice() {
</div>
</div>

{/* Product Catalog Import Section */}
<ProductCatalogImport />

{/* Invoice Items Section */}
<div className="mb-6 sm:mb-8">
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/page/CreateInvoicesBatch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import {
getClientAddressError,
validateBatchInvoiceData,
} from "@/utils/invoiceValidation";
import ProductCatalogImport from "@/components/ProductCatalogImport";

import ProductAutocompleteInput from "@/components/ProductAutocompleteInput";
import { useProductCatalog } from "@/hooks/useProductCatalog";
import {
Expand Down Expand Up @@ -1056,8 +1056,6 @@ function CreateInvoicesBatch() {
</div>
</div>

<ProductCatalogImport />

{/* Clean Invoice Rows */}
<div className="w-full mb-6 sm:mb-8 space-y-4">
<div className="flex items-center justify-between">
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/page/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import MailOutlineIcon from "@mui/icons-material/MailOutline";
import DraftsIcon from "@mui/icons-material/Drafts";
import AddCircleOutlineIcon from "@mui/icons-material/AddCircleOutline";
import LinkIcon from "@mui/icons-material/Link";
import SettingsIcon from "@mui/icons-material/Settings";
import MenuItem from "@mui/material/MenuItem";
import FormControl from "@mui/material/FormControl";
import Select from "@mui/material/Select";
Expand Down Expand Up @@ -63,6 +64,12 @@ export default function Home() {
route: "pending",
color: "#60a5fa",
},
{
text: "Settings",
icon: <SettingsIcon />,
route: "settings",
color: "#9ca3af",
},
];

return (
Expand Down
32 changes: 32 additions & 0 deletions frontend/src/page/Settings.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from "react";
import ProductCatalogImport from "../components/ProductCatalogImport";

function Settings() {
return (
<div className="w-full max-w-7xl mx-auto px-2 sm:px-4 md:px-6 py-6">
<div className="mb-6 sm:mb-8">
<h2 className="text-2xl sm:text-3xl font-bold text-white mb-2">
Settings
</h2>
<p className="text-sm sm:text-base text-gray-300">
Manage your account settings and product catalog
</p>
</div>

<div className="space-y-6 sm:space-y-8">
{/* Product Catalog Section */}
<section>
<div className="mb-4">
<h3 className="text-xl font-semibold text-white">Product Catalog</h3>
<p className="text-sm text-gray-400">
Manage your products for quick access when creating invoices.
</p>
</div>
<ProductCatalogImport />
</section>
</div>
</div>
);
}

export default Settings;
Loading