Initial commit: dashboard

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-10-03 23:17:36 +03:30
co-authored by Cursor
commit 3db32212ad
177 changed files with 29988 additions and 0 deletions
@@ -0,0 +1,23 @@
"use client";
import { useParams } from "next/navigation";
import ManageCategoriesPage from "@/components/catalog/ManageCategoriesPage";
import { en } from "@/lib/i18n/en";
export default function ManageProductCategoriesPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const listHref = `/manage/${encodeURIComponent(meshkeeId)}/products`;
return (
<ManageCategoriesPage
meshkeeId={meshkeeId}
entityType="product"
title={en.products.categoriesTitle}
lead={en.products.categoriesLead}
homeHref={`/manage/${encodeURIComponent(meshkeeId)}`}
listHref={listHref}
listLabel={en.products.title}
/>
);
}
@@ -0,0 +1,20 @@
"use client";
import { useParams } from "next/navigation";
import AddProductForm from "@/components/catalog/AddProductForm";
import { en } from "@/lib/i18n/en";
export default function ManageAddProductPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const listHref = `/manage/${encodeURIComponent(meshkeeId)}/products`;
return (
<AddProductForm
meshkeeId={meshkeeId}
listHref={listHref}
title={en.products.addTitle}
lead={en.products.addLead}
/>
);
}
+41
View File
@@ -0,0 +1,41 @@
"use client";
import Link from "next/link";
import { useParams } from "next/navigation";
import { BusinessListHeader } from "@/components/business/BusinessPageChrome";
import ProductsPanel from "@/components/catalog/ProductsPanel";
import { en } from "@/lib/i18n/en";
import styles from "@/components/BusinessDetailsPage.module.css";
export default function ManageBusinessProductsPage() {
const params = useParams<{ meshkeeId: string }>();
const meshkeeId = String(params.meshkeeId ?? "");
const base = `/manage/${encodeURIComponent(meshkeeId)}/products`;
return (
<>
<BusinessListHeader
title={en.products.title}
lead={en.products.lead}
action={
<>
<Link
href={`${base}/categories`}
className={`outline-btn ${styles.actionBtn}`}
>
{en.products.manageCategories}
</Link>
<Link href={`${base}/new`} className={`outline-btn ${styles.actionBtn}`}>
{en.products.add}
</Link>
</>
}
/>
<ProductsPanel
meshkeeId={meshkeeId}
emptyLabel={en.products.empty}
addHref={`${base}/new`}
/>
</>
);
}