-
-
+
);
}
diff --git a/apps/web/src/app/[lang]/app/[type]/management/[domain]/layout.tsx b/apps/web/src/app/[lang]/app/[type]/management/[domain]/layout.tsx
deleted file mode 100644
index 619b40f77..000000000
--- a/apps/web/src/app/[lang]/app/[type]/management/[domain]/layout.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument -- TODO: we need to fix this*/
-"use client";
-
-import {
- SectionLayout,
- SectionLayoutContent,
-} from "@repo/ayasofyazilim-ui/templates/section-layout-v2";
-import Link from "next/link";
-import { usePathname } from "next/navigation";
-import { useEffect, useState } from "react";
-import { PageHeader } from "@repo/ayasofyazilim-ui/molecules/page-header";
-import { getResourceDataClient } from "src/language-data/SettingService";
-import { useLocale } from "src/providers/locale";
-import { getBaseLink } from "src/utils";
-import { dataConfigOfManagement } from "../data";
-
-interface LayoutProps {
- children: JSX.Element;
- params?: any;
-}
-
-export default function Layout({ children, params }: LayoutProps) {
- const [navbarItems, setNavbarItems] = useState
([]);
- const { resources } = useLocale();
-
- const languageData = getResourceDataClient(resources, params.lang);
- const pathname = usePathname();
- const path = pathname.split("management/")[1];
- const activePage = path.split("/")[1];
-
- function pageHeaderData() {
- if (activePage === "vats") {
- return {
- title: languageData.Vat,
- description: languageData["Vat.Description"],
- };
- }
- if (activePage === "productGroups") {
- return {
- title: languageData.ProductGroup,
- description: languageData["ProductGroup.Description"],
- };
- }
- return {
- title: languageData.ProductGroupVAT,
- description: languageData["ProductGroupVAT.Description"],
- };
- }
-
- const { title, description } = pageHeaderData();
- useEffect(() => {
- const tempNavbarItems = Object.entries(
- dataConfigOfManagement[params.domain],
- )
- .filter(([e]) => e !== "displayName" && e !== "default")
- .map(([key, value]: [string, unknown]) => {
- let name = "";
- if (
- value &&
- typeof value === "object" &&
- "title" in value &&
- typeof value.title === "string"
- ) {
- name =
- languageData[
- value.title.replaceAll(" ", "") as keyof typeof languageData
- ];
- }
- return {
- id: `${params.domain}/${key}`,
- name: name || key,
- link: getBaseLink(
- `management/${params.domain}/${key}`,
- true,
- params.lang,
- true,
- params.type,
- ),
- };
- });
- setNavbarItems(tempNavbarItems);
- }, []);
-
- return (
- <>
-
- {navbarItems.length > 0 && (
-
-
- {children}
-
-
- )}
- >
- );
-}
diff --git a/apps/web/src/app/[lang]/app/[type]/management/data.ts b/apps/web/src/app/[lang]/app/[type]/management/data.ts
index c9dc08eb7..9b974d0fc 100644
--- a/apps/web/src/app/[lang]/app/[type]/management/data.ts
+++ b/apps/web/src/app/[lang]/app/[type]/management/data.ts
@@ -76,7 +76,7 @@ export const dataConfigOfManagement: Record = {
schema: $UniRefund_SettingService_Vats_VatDetailDto,
},
},
- productGroups: {
+ "product-groups": {
title: "Product Group",
createFormSchema: {
formPositions: [
@@ -124,7 +124,7 @@ export const dataConfigOfManagement: Record = {
},
},
},
- productGroupsVats: {
+ "product-groups-vats": {
title: "Product Group VAT",
filterBy: "",
createFormSchema: {
@@ -135,7 +135,9 @@ export const dataConfigOfManagement: Record = {
productGroupId: {
data: () => {
return fetch(
- getBaseLink("api/management/productGroups?maxResultCount=1000"),
+ getBaseLink(
+ "api/management/product-groups?maxResultCount=1000",
+ ),
)
.then((data) => data.json())
.then(
diff --git a/apps/web/src/app/[lang]/app/[type]/management/tenant-settings/[group]/group.tsx b/apps/web/src/app/[lang]/app/[type]/management/tenant-settings/[group]/group.tsx
index 3af1e8b37..ba673eea2 100644
--- a/apps/web/src/app/[lang]/app/[type]/management/tenant-settings/[group]/group.tsx
+++ b/apps/web/src/app/[lang]/app/[type]/management/tenant-settings/[group]/group.tsx
@@ -1,5 +1,4 @@
"use client";
-import { Card } from "@/components/ui/card";
import type { UniRefund_SettingService_CountrySettings_CountrySettingDto } from "@ayasofyazilim/saas/SettingService";
import { SettingsView } from "@repo/ui/settings-view";
import type { ResourceResult } from "src/utils";
@@ -21,13 +20,11 @@ export default function TenantSettingsPage({
);
}
return (
-
-
-
+
);
}
diff --git a/apps/web/src/app/[lang]/app/[type]/management/tenant-settings/[group]/page.tsx b/apps/web/src/app/[lang]/app/[type]/management/tenant-settings/[group]/page.tsx
index 4003c7cf7..170bef417 100644
--- a/apps/web/src/app/[lang]/app/[type]/management/tenant-settings/[group]/page.tsx
+++ b/apps/web/src/app/[lang]/app/[type]/management/tenant-settings/[group]/page.tsx
@@ -1,7 +1,6 @@
"use server";
import type { UniRefund_SettingService_CountrySettings_CountrySettingDto } from "@ayasofyazilim/saas/SettingService";
-import { PageHeader } from "@repo/ayasofyazilim-ui/molecules/page-header";
import { getResourceData } from "src/language-data/SettingService";
import { getSettingServiceClient } from "src/lib";
import TenantSettingsPage from "./group";
@@ -23,18 +22,12 @@ export default async function Page({
tenantSettings = mockSettingsResponse;
}
- const { languageData, resources } = await getResourceData(params.lang);
+ const { resources } = await getResourceData(params.lang);
return (
- <>
-
-
- >
+
);
}
diff --git a/apps/web/src/app/[lang]/app/[type]/menu-data.tsx b/apps/web/src/app/[lang]/app/[type]/menu-data.tsx
deleted file mode 100644
index c658be1f2..000000000
--- a/apps/web/src/app/[lang]/app/[type]/menu-data.tsx
+++ /dev/null
@@ -1,327 +0,0 @@
-import type { NavigationItem } from "@repo/ui/main-layout";
-import {
- Presentation,
- AlertCircle,
- Settings,
- BarChart,
- Layers,
- FileText,
- ClipboardList,
- Book,
- File,
- Database,
- Network,
- Globe,
-} from "lucide-react";
-import { getBaseLink } from "src/utils";
-
-export type NavigationItmes = NavigationItem & {
- type: string | string[];
- appType?: string;
-};
-
-export const navigationItemsTemp: NavigationItmes[] = [
- {
- key: "operations",
- title: "Operations",
- href: "/operations",
- type: "admin",
- appType: "unirefund",
- icon: ,
- submenu: [
- {
- key: "tax_free_tags",
- title: "Tax Free Tags",
- href: getBaseLink("app/admin/operations/details", true),
- icon: ,
- },
- {
- key: "issue",
- wip: true,
- title: "Issue",
- href: "/operation/issue",
- icon: ,
- },
- {
- key: "settings",
- wip: true,
- title: "Settings",
- href: "/operation/settings",
- icon: ,
- },
- ],
- },
- {
- key: "devices",
- wip: true,
- title: "Devices",
- href: "/devices",
- type: "admin",
- appType: "unirefund",
- icon: ,
- },
- {
- key: "registered_errors",
- wip: true,
- title: "Registered Errors",
- href: "/registered-errors",
- type: "admin",
- appType: "unirefund",
- icon: ,
- },
- {
- key: "config",
- wip: true,
- title: "Config",
- href: "/config",
- type: "admin",
- appType: "unirefund",
- icon: ,
- },
- {
- key: "groups",
- wip: true,
- title: "Groups",
- href: "/groups",
- type: "admin",
- appType: "unirefund",
- icon: ,
- },
- {
- key: "finance",
- wip: true,
- title: "Finance",
- href: "/finance",
- type: "admin",
- appType: "unirefund",
- icon: ,
- submenu: [
- {
- key: "reports",
- wip: true,
- title: "Reports",
- href: "/finance/reports",
- icon: ,
- },
- {
- key: "invoices",
- wip: true,
- title: "Invoices",
- href: "/finance/invoices",
- icon: ,
- },
- {
- key: "import_payments",
- wip: true,
- title: "Import Payments",
- href: "/finance/import-payments",
- icon: ,
- },
- {
- key: "rebates",
- wip: true,
- title: "Rebates",
- href: "/finance/rebates",
- icon: ,
- },
- {
- key: "bookkeeping",
- wip: true,
- title: "Bookkeeping",
- href: "/finance/bookkeeping",
- icon: ,
- },
- {
- key: "age",
- wip: true,
- title: "Age",
- href: "/finance/age",
- icon: ,
- },
- {
- key: "balance",
- wip: true,
- title: "Balance",
- href: "/finance/balance",
- icon: ,
- },
- {
- key: "invoicing_management",
- wip: true,
- title: "Invoicing Management",
- href: "/finance/invoicing-management",
- icon: ,
- },
- ],
- },
- {
- key: "settings",
- wip: true,
- title: "Settings",
- href: "/settings",
- type: "admin",
- appType: "unirefund",
- icon: ,
- },
- {
- key: "logs",
- wip: true,
- title: "Logs",
- href: "/logs",
- type: "admin",
- appType: "unirefund",
- icon: ,
- },
- {
- key: "api_logs",
- wip: true,
- title: "API Logs",
- href: "/api-logs",
- type: "admin",
- appType: "unirefund",
- icon: ,
- },
- {
- key: "systems",
- wip: true,
- title: "Systems",
- href: "/systems",
- type: "admin",
- appType: "unirefund",
- icon: ,
- },
- {
- key: "reports",
- wip: true,
- title: "Reports",
- href: "/operation/reports",
- icon: ,
- type: "admin",
- appType: "unirefund",
- submenu: [
- {
- key: "daily_report",
- wip: true,
- title: "Daily Report",
- href: "/operation/reports/daily-report",
- icon: ,
- },
- {
- key: "dashboard",
- wip: true,
- title: "Dashboard",
- href: "/operation/reports/dashboard",
- icon: ,
- },
- {
- key: "issued",
- wip: true,
- title: "Issued",
- href: "/operation/reports/issued",
- icon: ,
- },
- {
- key: "by_store",
- wip: true,
- title: "By Store",
- href: "/operation/reports/by-store",
- icon: ,
- },
- {
- key: "validation",
- wip: true,
- title: "Validation",
- href: "/operation/reports/validation",
- icon: ,
- },
- {
- key: "invoice",
- wip: true,
- title: "Invoice",
- href: "/operation/reports/invoice",
- icon: ,
- },
- {
- key: "travellers",
- wip: true,
- title: "Travellers",
- href: "/operation/reports/travellers",
- icon: ,
- },
- {
- key: "validation_rules_hits",
- wip: true,
- title: "Validation Rules Hits",
- href: "/operation/reports/validation-rules-hits",
- icon: ,
- },
- {
- key: "others",
- wip: true,
- title: "Others",
- href: "/operation/reports/others",
- icon: ,
- },
- {
- key: "change_report",
- wip: true,
- title: "Change Report",
- href: "/operation/reports/change-report",
- icon: ,
- },
- ],
- },
- {
- key: "refund",
- wip: true,
- title: "Refund",
- href: "/operation/refund",
- icon: ,
- type: "admin",
- appType: "unirefund",
- submenu: [
- {
- key: "refunds",
- wip: true,
- title: "Refunds",
- href: "/operation/refund/refunds",
- icon: ,
- },
- {
- key: "travellers",
- wip: true,
- title: "Travellers",
- href: "/operation/refund/travellers",
- icon: ,
- },
- {
- key: "sticker_status",
- wip: true,
- title: "Sticker Status",
- href: "/operation/refund/sticker-status",
- icon: ,
- },
- {
- key: "reconciliation",
- wip: true,
- title: "Reconciliation",
- href: "/operation/refund/reconciliation",
- icon: ,
- },
- {
- key: "card_payments",
- wip: true,
- title: "Card Payments",
- href: "/operation/refund/card-payments",
- icon: ,
- },
- {
- key: "payment_requests",
- wip: true,
- title: "Payment Requests",
- href: "/operation/refund/payment-requests",
- icon: ,
- },
- ],
- },
-];
diff --git a/apps/web/src/app/[lang]/app/[type]/navbar-data.tsx b/apps/web/src/app/[lang]/app/[type]/navbar-data.tsx
deleted file mode 100644
index 8b54a01f4..000000000
--- a/apps/web/src/app/[lang]/app/[type]/navbar-data.tsx
+++ /dev/null
@@ -1,497 +0,0 @@
-import type { NavbarItemType } from "@repo/ui/theme/types";
-import type { AbpUiNavigationResource } from "src/language-data/AbpUiNavigation";
-
-export function getNavbarFromDB(
- prefix: string,
- languageData: AbpUiNavigationResource,
-) {
- const navbarDataFromDB: NavbarItemType[] = [
- {
- key: "/",
- displayName: "Home",
- description: "Description",
- href: "",
- icon: "home",
- parentNavbarItemKey: null,
- subNavbarItems: [
- {
- key: "home",
- displayName: "Home",
- description: "Description",
- href: "/home",
- icon: "home",
- parentNavbarItemKey: "home",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "dashboard",
- displayName: "Dashboard",
- description: "Description",
- href: "dashboard/openiddict/applications",
- icon: "dashboard",
- parentNavbarItemKey: null,
- subNavbarItems: [
- {
- key: "dashboard/openiddict",
- displayName: "Open Id Dict",
- description: "Description",
- href: "dashboard/openiddict/applications",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard",
- subNavbarItems: [
- {
- key: "dashboard/openiddict/applications",
- displayName: "Applications",
- description: "Description",
- href: "dashboard/openiddict/applications",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/openiddict",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "dashboard/openiddict/scopes",
- displayName: "Scopes",
- description: "Description",
- href: "dashboard/openiddict/scopes",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/openiddict",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "dashboard/admin",
- displayName: "Admin Management",
- description: "Description",
- href: "dashboard/admin/languages",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard",
- subNavbarItems: [
- {
- key: "dashboard/admin/languages",
- displayName: "Languages",
- description: "Description",
- href: "dashboard/admin/languages",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/admin",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "dashboard/admin/languageTexts",
- displayName: "Language Texts",
- description: "Description",
- href: "dashboard/admin/languageTexts",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/admin",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "dashboard/saas",
- displayName: "Saas Management",
- description: "Description",
- href: "dashboard/saas/edition",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard",
- subNavbarItems: [
- {
- key: "dashboard/saas/edition",
- displayName: "Edition",
- description: "Description",
- href: "dashboard/saas/edition",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/saas",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "dashboard/saas/tenant",
- displayName: "Tenant",
- description: "Description",
- href: "dashboard/saas/tenant",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/saas",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "dashboard/identity",
- displayName: "Identity Management",
- description: "Description",
- href: "dashboard/identity/role",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard",
- subNavbarItems: [
- {
- key: "dashboard/identity/role",
- displayName: "Role",
- description: "Description",
- href: "dashboard/identity/role",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/identity",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "dashboard/identity/user",
- displayName: "User",
- description: "Description",
- href: "dashboard/identity/user",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/identity",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "dashboard/identity/claimType",
- displayName: "Claim Type",
- description: "Description",
- href: "dashboard/identity/claimType",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/identity",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "dashboard/identity/securityLogs",
- displayName: "Security Logs",
- description: "Description",
- href: "dashboard/identity/securityLogs",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/identity",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "dashboard/identity/organization",
- displayName: "Organization",
- description: "Description",
- href: "dashboard/identity/organization",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/identity",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "dashboard/auditLogs",
- displayName: "Audit Logs",
- description: "Description",
- href: "dashboard/auditLogs/auditLogs",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard",
- subNavbarItems: [
- {
- key: "dashboard/auditLogs",
- displayName: "Audit Logs",
- description: "Description",
- href: "dashboard/auditLogs/auditLogs",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/auditLogs",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "dashboard/textTemplates",
- displayName: "Text Templates",
- description: "Description",
- href: "dashboard/textTemplates/textTemplates",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard",
- subNavbarItems: [
- {
- key: "dashboard/textTemplates",
- displayName: "Text Templates",
- description: "Description",
- href: "dashboard/textTemplates/textTemplates",
- icon: "dashboard",
- parentNavbarItemKey: "dashboard/textTemplates",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "management",
- displayName: "Management",
- description: "Description",
- href: "management/setting/vats",
- icon: "dashboard",
- parentNavbarItemKey: null,
- subNavbarItems: [
- {
- key: "management/setting",
- displayName: "VAT Settings",
- description: "Description",
- href: "management/setting/vats",
- icon: "dashboard",
- parentNavbarItemKey: "management",
- subNavbarItems: [
- {
- key: "management/setting/vats",
- displayName: "VAT",
- description: "Description",
- href: "management/setting/vats",
- icon: "dashboard",
- parentNavbarItemKey: "management/setting",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "management/setting/productGroups",
- displayName: "Product Group",
- description: "Description",
- href: "management/setting/productGroups",
- icon: "dashboard",
- parentNavbarItemKey: "management/setting",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "management/setting/productGroupsVats",
- displayName: "Product Group VAT",
- description: "Description",
- href: "management/setting/productGroupsVats",
- icon: "dashboard",
- parentNavbarItemKey: "management/setting",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "management/tenant-settings",
- displayName: "Tenant Settings",
- description: "Description",
- href: "management/tenant-settings",
- icon: "dashboard",
- parentNavbarItemKey: "management",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "crm",
- displayName: "CRM",
- description: "Description",
- href: "crm/merchants",
- icon: "dashboard",
- parentNavbarItemKey: null,
- subNavbarItems: [
- {
- key: "crm/merchants",
- displayName: "Merchants",
- description: "Description",
- href: "crm/merchants",
- icon: "dashboard",
- parentNavbarItemKey: "crm",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "crm/refund-points",
- displayName: "Refund Points",
- description: "Description",
- href: "crm/refund-points",
- icon: "dashboard",
- parentNavbarItemKey: "crm",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "crm/customs",
- displayName: "Customs",
- description: "Description",
- href: "crm/customs",
- icon: "dashboard",
- parentNavbarItemKey: "crm",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "crm/tax-free",
- displayName: "Tax Free",
- description: "Description",
- href: "crm/tax-free",
- icon: "dashboard",
- parentNavbarItemKey: "crm",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "crm/tax-offices",
- displayName: "Tax Offices",
- description: "Description",
- href: "crm/tax-offices",
- icon: "dashboard",
- parentNavbarItemKey: "crm",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "traveller",
- displayName: "Traveller",
- description: "Description",
- href: "traveller",
- icon: "dashboard",
- parentNavbarItemKey: null,
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "contracts",
- displayName: "Contracts",
- description: "Description",
- href: "contracts/contracts",
- icon: "dashboard",
- parentNavbarItemKey: null,
- subNavbarItems: [
- {
- key: "contracts/contracts",
- displayName: "Contracts",
- description: "Description",
- href: "contracts/contracts",
- icon: "dashboard",
- parentNavbarItemKey: "contracts",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "contracts/rebate",
- displayName: "Rebate",
- description: "Description",
- href: "contracts/rebate/company-settings",
- icon: "dashboard",
- parentNavbarItemKey: "contracts",
- subNavbarItems: [
- {
- key: "contracts/rebate/company-settings",
- displayName: "Company Settings",
- description: "Description",
- href: "contracts/rebate/company-settings",
- icon: "dashboard",
- parentNavbarItemKey: "contracts/rebate",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "contracts/rebate/templates",
- displayName: "Templates",
- description: "Description",
- href: "contracts/rebate/templates",
- icon: "dashboard",
- parentNavbarItemKey: "contracts/rebate",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "contracts/refund",
- displayName: "Refund",
- description: "Description",
- href: "contracts/refund/refund-tables",
- icon: "dashboard",
- parentNavbarItemKey: "contracts",
- subNavbarItems: [
- {
- key: "contracts/refund/refund-tables",
- displayName: "Refund Tables",
- description: "Description",
- href: "contracts/refund/refund-tables",
- icon: "dashboard",
- parentNavbarItemKey: "contracts/refund",
- subNavbarItems: null,
- displayOrder: 1,
- },
- {
- key: "contracts/refund/refund-fees",
- displayName: "Refund Fees",
- description: "Description",
- href: "contracts/refund/refund-fees",
- icon: "dashboard",
- parentNavbarItemKey: "contracts/refund",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- {
- key: "operations",
- displayName: "Operations",
- description: "Description",
- href: "operations/details",
- icon: "dashboard",
- parentNavbarItemKey: null,
- subNavbarItems: [
- {
- key: "operations/details",
- displayName: "Tax Free Tags",
- description: "Description",
- href: "operations/details",
- icon: "dashboard",
- parentNavbarItemKey: "operations",
- subNavbarItems: null,
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- ],
- displayOrder: 1,
- },
- ];
- function processItems(items: NavbarItemType[]) {
- items.forEach((item) => {
- item.href = `${prefix}/${item.href}`;
- if (item.key !== "/") {
- item.key = `${prefix}/${item.key}`;
- }
-
- //İleride displayname'in veritabanından çevrili gelmiş olmasını bekliyoruz.
- item.displayName =
- languageData[
- (
- item.displayName[0].toUpperCase() + item.displayName.slice(1)
- ).replaceAll(" ", "") as keyof typeof languageData
- ] || `**${item.displayName}`;
- if (item.subNavbarItems) {
- processItems(item.subNavbarItems);
- }
- });
- }
-
- processItems(navbarDataFromDB);
- return navbarDataFromDB;
-}
diff --git a/apps/web/src/app/[lang]/app/[type]/navbar/groups.tsx b/apps/web/src/app/[lang]/app/[type]/navbar/groups.tsx
new file mode 100644
index 000000000..4b2879ce3
--- /dev/null
+++ b/apps/web/src/app/[lang]/app/[type]/navbar/groups.tsx
@@ -0,0 +1,345 @@
+import type { NavbarItemsFromDB } from "@repo/ui/theme/types";
+
+export const dashboard: NavbarItemsFromDB[] = [
+ {
+ key: "dashboard",
+ displayName: "Dashboard",
+ description: "View and manage your dashboard settings.",
+ href: "dashboard/openiddict/applications",
+ icon: "dashboard",
+ parentNavbarItemKey: "/",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/openiddict",
+ displayName: "Open Id Dict",
+ description: "Manage Open ID dict settings.",
+ href: "dashboard/openiddict/applications",
+ icon: "id",
+ parentNavbarItemKey: "dashboard",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/openiddict/applications",
+ displayName: "Applications",
+ description: "Manage applications within Open Id Dict.",
+ href: "dashboard/openiddict/applications",
+ icon: "app",
+ parentNavbarItemKey: "dashboard/openiddict",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/openiddict/scopes",
+ displayName: "Scopes",
+ description: "View and manage scopes for Open Id Dict.",
+ href: "dashboard/openiddict/scopes",
+ icon: "scope",
+ parentNavbarItemKey: "dashboard/openiddict",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/admin",
+ displayName: "Admin Management",
+ description: "Access administrative tools and settings.",
+ href: "dashboard/admin/languages",
+ icon: "management",
+ parentNavbarItemKey: "dashboard",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/admin/languages",
+ displayName: "Languages",
+ description: "Manage language settings and translations.",
+ href: "dashboard/admin/languages",
+ icon: "language",
+ parentNavbarItemKey: "dashboard/admin",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/admin/language-texts",
+ displayName: "Language Texts",
+ description: "Edit and review language texts.",
+ href: "dashboard/admin/language-texts",
+ icon: "book",
+ parentNavbarItemKey: "dashboard/admin",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/saas",
+ displayName: "Saas Management",
+ description: "Manage SaaS configurations and settings.",
+ href: "dashboard/saas/edition",
+ icon: "management",
+ parentNavbarItemKey: "dashboard",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/saas/edition",
+ displayName: "Edition",
+ description: "Manage SaaS editions and plans.",
+ href: "dashboard/saas/edition",
+ icon: "edition",
+ parentNavbarItemKey: "dashboard/saas",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/saas/tenant",
+ displayName: "Tenant",
+ description: "Manage SaaS tenant settings and configurations.",
+ href: "dashboard/saas/tenant",
+ icon: "globe",
+ parentNavbarItemKey: "dashboard/saas",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/identity",
+ displayName: "Identity Management",
+ description: "Manage user identities and roles.",
+ href: "dashboard/identity/role",
+ icon: "management",
+ parentNavbarItemKey: "dashboard",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/identity/role",
+ displayName: "Role",
+ description: "Manage user roles and permissions.",
+ href: "dashboard/identity/role",
+ icon: "role",
+ parentNavbarItemKey: "dashboard/identity",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/identity/user",
+ displayName: "User",
+ description: "Manage user accounts and profiles.",
+ href: "dashboard/identity/user",
+ icon: "identity",
+ parentNavbarItemKey: "dashboard/identity",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/identity/claim-type",
+ displayName: "Claim Type",
+ description: "Manage claim types for user identities.",
+ href: "dashboard/identity/claim-type",
+ icon: "scan",
+ parentNavbarItemKey: "dashboard/identity",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/identity/security-logs",
+ displayName: "Security Logs",
+ description: "View security logs and audit trails.",
+ href: "dashboard/identity/security-logs",
+ icon: "lock",
+ parentNavbarItemKey: "dashboard/identity",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/identity/organization",
+ displayName: "Organization",
+ description: "Manage organizational settings and structure.",
+ href: "dashboard/identity/organization",
+ icon: "building",
+ parentNavbarItemKey: "dashboard/identity",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/audit-logs/audit-logs",
+ displayName: "Audit Logs",
+ description: "View and analyze audit logs.",
+ href: "dashboard/audit-logs/audit-logs",
+ icon: "log",
+ parentNavbarItemKey: "dashboard",
+ displayOrder: 1,
+ },
+ {
+ key: "dashboard/text-templates/text-templates",
+ displayName: "Text Templates",
+ description: "Manage and create text templates.",
+ href: "dashboard/text-templates/text-templates",
+ icon: "text",
+ parentNavbarItemKey: "dashboard",
+ displayOrder: 1,
+ },
+];
+export const management: NavbarItemsFromDB[] = [
+ {
+ key: "management",
+ displayName: "Management",
+ description: "Access management settings and tools.",
+ href: "management/setting/vats",
+ icon: "management",
+ parentNavbarItemKey: "/",
+ displayOrder: 1,
+ },
+ {
+ key: "management/setting",
+ displayName: "VAT Settings",
+ description: "Configure VAT settings and rules.",
+ href: "management/setting/vats",
+ icon: "settings",
+ parentNavbarItemKey: "management",
+ displayOrder: 1,
+ },
+ {
+ key: "management/setting/vats",
+ displayName: "VAT",
+ description: "Manage VAT settings and rates.",
+ href: "management/setting/vats",
+ icon: "vat",
+ parentNavbarItemKey: "management/setting",
+ displayOrder: 1,
+ },
+ {
+ key: "management/setting/product-groups",
+ displayName: "Product Group",
+ description: "Manage product groups and categories.",
+ href: "management/setting/product-groups",
+ icon: "product",
+ parentNavbarItemKey: "management/setting",
+ displayOrder: 1,
+ },
+ {
+ key: "management/setting/product-groups-vats",
+ displayName: "Product Group VAT",
+ description: "Manage VAT settings for product groups.",
+ href: "management/setting/product-groups-vats",
+ icon: "productGroup",
+ parentNavbarItemKey: "management/setting",
+ displayOrder: 1,
+ },
+ {
+ key: "management/tenant-settings",
+ displayName: "Tenant Settings",
+ description: "Manage settings for tenants.",
+ href: "management/tenant-settings",
+ icon: "settings",
+ parentNavbarItemKey: "management",
+ displayOrder: 1,
+ },
+];
+
+export const crm: NavbarItemsFromDB[] = [
+ {
+ key: "crm",
+ displayName: "CRM",
+ description: "Manage customer relationship management settings.",
+ href: "crm/merchants",
+ icon: "layer",
+ parentNavbarItemKey: "/",
+ displayOrder: 1,
+ },
+ {
+ key: "crm/merchants",
+ displayName: "Merchants",
+ description: "Manage merchant accounts and details.",
+ href: "crm/merchants",
+ icon: "shop",
+ parentNavbarItemKey: "crm",
+ displayOrder: 1,
+ },
+ {
+ key: "crm/refund-points",
+ displayName: "Refund Points",
+ description: "Manage refund points and settings.",
+ href: "crm/refund-points",
+ icon: "refund",
+ parentNavbarItemKey: "crm",
+ displayOrder: 1,
+ },
+ {
+ key: "crm/customs",
+ displayName: "Customs",
+ description: "Manage customs settings and configurations.",
+ href: "crm/customs",
+ icon: "container",
+ parentNavbarItemKey: "crm",
+ displayOrder: 1,
+ },
+ {
+ key: "crm/tax-free",
+ displayName: "Tax Free",
+ description: "Manage tax-free settings and exemptions.",
+ href: "crm/tax-free",
+ icon: "tax",
+ parentNavbarItemKey: "crm",
+ displayOrder: 1,
+ },
+ {
+ key: "crm/tax-offices",
+ displayName: "Tax Offices",
+ description: "Manage tax office details and settings.",
+ href: "crm/tax-offices",
+ icon: "taxOffice",
+ parentNavbarItemKey: "crm",
+ displayOrder: 1,
+ },
+];
+
+export const contracts: NavbarItemsFromDB[] = [
+ {
+ key: "contracts/contracts",
+ displayName: "Contracts",
+ description: "View and manage contract details.",
+ href: "contracts/contracts",
+ icon: "dashboard",
+ parentNavbarItemKey: "contracts",
+ displayOrder: 1,
+ },
+ {
+ key: "contracts/rebate",
+ displayName: "Rebate",
+ description: "Manage rebate settings and configurations.",
+ href: "contracts/rebate/company-settings",
+ icon: "percent",
+ parentNavbarItemKey: "contracts",
+ displayOrder: 1,
+ },
+ {
+ key: "contracts/rebate/company-settings",
+ displayName: "Company Settings",
+ description: "Manage company-specific rebate settings.",
+ href: "contracts/rebate/company-settings",
+ icon: "settings",
+ parentNavbarItemKey: "contracts/rebate",
+ displayOrder: 1,
+ },
+ {
+ key: "contracts/rebate/templates",
+ displayName: "Templates",
+ description: "Manage rebate templates and configurations.",
+ href: "contracts/rebate/templates",
+ icon: "template",
+ parentNavbarItemKey: "contracts/rebate",
+ displayOrder: 1,
+ },
+ {
+ key: "contracts/refund",
+ displayName: "Refund",
+ description: "Manage refund settings and details.",
+ href: "contracts/refund/refund-tables",
+ icon: "refund",
+ parentNavbarItemKey: "contracts",
+ displayOrder: 1,
+ },
+ {
+ key: "contracts/refund/refund-tables",
+ displayName: "Refund Tables",
+ description: "Manage refund tables and configurations.",
+ href: "contracts/refund/refund-tables",
+ icon: "table",
+ parentNavbarItemKey: "contracts/refund",
+ displayOrder: 1,
+ },
+ {
+ key: "contracts/refund/refund-fees",
+ displayName: "Refund Fees",
+ description: "Manage refund fees and settings.",
+ href: "contracts/refund/refund-fees",
+ icon: "refund",
+ parentNavbarItemKey: "contracts/refund",
+ displayOrder: 1,
+ },
+];
diff --git a/apps/web/src/app/[lang]/app/[type]/navbar/navbar-data.tsx b/apps/web/src/app/[lang]/app/[type]/navbar/navbar-data.tsx
new file mode 100644
index 000000000..5909ce2d9
--- /dev/null
+++ b/apps/web/src/app/[lang]/app/[type]/navbar/navbar-data.tsx
@@ -0,0 +1,51 @@
+import type { NavbarItemsFromDB } from "@repo/ui/theme/types";
+import type { AbpUiNavigationResource } from "src/language-data/AbpUiNavigation";
+import { unirefundNavbarDataFromDB } from "./projects/unirefund";
+import { ayshopgoNavbarDataFromDB } from "./projects/ayshopgo";
+
+const dbData = {
+ UNIREFUND: unirefundNavbarDataFromDB,
+ UPWITHCROWD: unirefundNavbarDataFromDB,
+ TAHSILET: unirefundNavbarDataFromDB,
+ AYSHOPGO: ayshopgoNavbarDataFromDB,
+};
+
+export function getNavbarFromDB(
+ prefix: string,
+ languageData: AbpUiNavigationResource,
+ appName: string,
+) {
+ const navbarDataFromDB: NavbarItemsFromDB[] =
+ dbData[appName as keyof typeof dbData];
+
+ function processItems(items: NavbarItemsFromDB[]) {
+ items.forEach((item) => {
+ if (item.href) {
+ item.href = `${prefix}/${item.href}`;
+ }
+
+ if (item.parentNavbarItemKey === "/") {
+ item.parentNavbarItemKey = prefix;
+ } else {
+ item.parentNavbarItemKey = `${prefix}/${item.parentNavbarItemKey}`;
+ }
+
+ if (item.key && item.key !== "/") {
+ item.key = `${prefix}/${item.key}`;
+ } else {
+ item.key = prefix;
+ }
+
+ //İleride displayname'in veritabanından çevrili gelmiş olmasını bekliyoruz.
+ item.displayName =
+ languageData[
+ (
+ item.displayName[0].toUpperCase() + item.displayName.slice(1)
+ ).replaceAll(" ", "") as keyof typeof languageData
+ ] || `**${item.displayName}`;
+ });
+ }
+
+ processItems(navbarDataFromDB);
+ return navbarDataFromDB;
+}
diff --git a/apps/web/src/app/[lang]/app/[type]/navbar/navbar-profile-data.tsx b/apps/web/src/app/[lang]/app/[type]/navbar/navbar-profile-data.tsx
new file mode 100644
index 000000000..73e0ea3cc
--- /dev/null
+++ b/apps/web/src/app/[lang]/app/[type]/navbar/navbar-profile-data.tsx
@@ -0,0 +1,48 @@
+import { HeartFilledIcon } from "@radix-ui/react-icons";
+import type { ProfileMenuProps } from "@repo/ui/theme/types";
+import { Layers, Settings, User } from "lucide-react";
+import type { AbpUiNavigationResource } from "src/language-data/AbpUiNavigation";
+
+export function getProfileMenuFromDB(languageData: AbpUiNavigationResource) {
+ const profileMenu: ProfileMenuProps = {
+ info: {
+ name: "Neil Sims",
+ email: "name@flowbite.com",
+ image: "https://flowbite.com/docs/images/people/profile-picture-5.jpg",
+ },
+ menuTitle: languageData.Profile,
+ menu: {
+ account: [
+ {
+ icon: ,
+ href: "#",
+ onClick: undefined,
+ name: languageData.Profile,
+ },
+ {
+ href: "#",
+ onClick: undefined,
+ name: languageData.UserSettings,
+ icon: ,
+ },
+ ],
+ primary: [
+ {
+ href: "#",
+ onClick: undefined,
+ name: languageData.OurTeam,
+ icon: ,
+ },
+ {
+ href: "#",
+ onClick: undefined,
+ name: languageData.Management,
+ icon: ,
+ },
+ ],
+ secondary: [],
+ },
+ };
+
+ return profileMenu;
+}
diff --git a/apps/web/src/app/[lang]/app/[type]/navbar/projects/ayshopgo.tsx b/apps/web/src/app/[lang]/app/[type]/navbar/projects/ayshopgo.tsx
new file mode 100644
index 000000000..5fc6dc89a
--- /dev/null
+++ b/apps/web/src/app/[lang]/app/[type]/navbar/projects/ayshopgo.tsx
@@ -0,0 +1,33 @@
+import type { NavbarItemsFromDB } from "@repo/ui/theme/types";
+import { dashboard } from "../groups";
+
+export const ayshopgoNavbarDataFromDB: NavbarItemsFromDB[] = [
+ {
+ key: "/",
+ displayName: "Home",
+ description: "Go back to the home page.",
+ href: "home",
+ icon: "home",
+ parentNavbarItemKey: null,
+ displayOrder: 1,
+ },
+ {
+ key: "home",
+ displayName: "Home",
+ description: "Go back to the home page.",
+ href: "/home",
+ icon: "home",
+ parentNavbarItemKey: "/",
+ displayOrder: 1,
+ },
+ ...dashboard,
+ {
+ key: "customers",
+ displayName: "Customers",
+ description: "Access management settings and tools.",
+ href: "customers",
+ icon: "management",
+ parentNavbarItemKey: "/",
+ displayOrder: 1,
+ },
+];
diff --git a/apps/web/src/app/[lang]/app/[type]/navbar/projects/unirefund.tsx b/apps/web/src/app/[lang]/app/[type]/navbar/projects/unirefund.tsx
new file mode 100644
index 000000000..d7b174092
--- /dev/null
+++ b/apps/web/src/app/[lang]/app/[type]/navbar/projects/unirefund.tsx
@@ -0,0 +1,54 @@
+import type { NavbarItemsFromDB } from "@repo/ui/theme/types";
+import { contracts, crm, dashboard, management } from "../groups";
+
+export const unirefundNavbarDataFromDB: NavbarItemsFromDB[] = [
+ {
+ key: "/",
+ displayName: "Home",
+ description: "Go back to the home page.",
+ href: "home",
+ icon: "home",
+ parentNavbarItemKey: null,
+ displayOrder: 1,
+ },
+ {
+ key: "home",
+ displayName: "Home",
+ description: "Go back to the home page.",
+ href: "/home",
+ icon: "home",
+ parentNavbarItemKey: "/",
+ displayOrder: 1,
+ },
+ ...dashboard,
+ ...management,
+ ...crm,
+ ...contracts,
+ {
+ key: "traveller",
+ displayName: "Traveller",
+ description: "Manage traveller-related settings.",
+ href: "traveller",
+ icon: "plane",
+ parentNavbarItemKey: "/",
+ displayOrder: 1,
+ },
+ {
+ key: "operations",
+ displayName: "Operations",
+ description: "Access and manage operational settings.",
+ href: "operations/details",
+ icon: "operation",
+ parentNavbarItemKey: "/",
+ displayOrder: 1,
+ },
+ {
+ key: "operations/details",
+ displayName: "Tax Free Tags",
+ description: "Manage tax-free tags and settings.",
+ href: "operations/details",
+ icon: "dashboard",
+ parentNavbarItemKey: "operations",
+ displayOrder: 1,
+ },
+];
diff --git a/apps/web/src/app/[lang]/app/[type]/operations/details/add/page.tsx b/apps/web/src/app/[lang]/app/[type]/operations/details/add/page.tsx
index 1a075086a..39e90eca2 100644
--- a/apps/web/src/app/[lang]/app/[type]/operations/details/add/page.tsx
+++ b/apps/web/src/app/[lang]/app/[type]/operations/details/add/page.tsx
@@ -53,14 +53,8 @@ export default function Page() {
];
return (
-
+
+
+
);
}
diff --git a/apps/web/src/app/[lang]/app/[type]/operations/details/layout.tsx b/apps/web/src/app/[lang]/app/[type]/operations/details/layout.tsx
deleted file mode 100644
index 406e011fe..000000000
--- a/apps/web/src/app/[lang]/app/[type]/operations/details/layout.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-"use client";
-import { Card } from "@/components/ui/card";
-import { PageHeader } from "@repo/ayasofyazilim-ui/molecules/page-header";
-import Link from "next/link";
-import { usePathname } from "next/navigation";
-import { getBaseLink } from "src/utils";
-
-interface LayoutProps {
- children: JSX.Element;
-}
-
-export default function Layout({ children }: LayoutProps): JSX.Element {
- const pathname = usePathname();
- const path = pathname.split("en/app/admin/details")[1];
-
- return (
- <>
-
- {children}
- >
- );
-}
diff --git a/apps/web/src/app/[lang]/app/[type]/projects/@admin/[projectId]/details/form.tsx b/apps/web/src/app/[lang]/app/[type]/projects/@admin/[projectId]/details/form.tsx
index aa84c0e28..d29d21013 100644
--- a/apps/web/src/app/[lang]/app/[type]/projects/@admin/[projectId]/details/form.tsx
+++ b/apps/web/src/app/[lang]/app/[type]/projects/@admin/[projectId]/details/form.tsx
@@ -34,7 +34,6 @@ export default function ProjectForm({ sectionData }: ProjectFormProps) {
return (
diff --git a/apps/web/src/app/[lang]/app/[type]/projects/@entrepreneur/[projectId]/details/form.tsx b/apps/web/src/app/[lang]/app/[type]/projects/@entrepreneur/[projectId]/details/form.tsx
index 6c479476e..0b48c72b6 100644
--- a/apps/web/src/app/[lang]/app/[type]/projects/@entrepreneur/[projectId]/details/form.tsx
+++ b/apps/web/src/app/[lang]/app/[type]/projects/@entrepreneur/[projectId]/details/form.tsx
@@ -64,7 +64,6 @@ export default function ProjectForm({
return (
diff --git a/apps/web/src/app/[lang]/app/[type]/traveller/page.tsx b/apps/web/src/app/[lang]/app/[type]/traveller/page.tsx
index 42f644c17..03e884d89 100644
--- a/apps/web/src/app/[lang]/app/[type]/traveller/page.tsx
+++ b/apps/web/src/app/[lang]/app/[type]/traveller/page.tsx
@@ -1,21 +1,8 @@
"use server";
-import React from "react";
-import { Card } from "@/components/ui/card";
-import { PageHeader } from "@repo/ayasofyazilim-ui/molecules/page-header";
import { getResourceData } from "src/language-data/TravellerService";
import Table from "./table";
export default async function Page({ params }: { params: { lang: string } }) {
const { languageData } = await getResourceData(params.lang);
- return (
- <>
-
-
-
-
- >
- );
+ return ;
}
diff --git a/apps/web/src/app/api/admin/[data]/route.ts b/apps/web/src/app/api/admin/[data]/route.ts
index a14ee5db0..2c2ba7622 100644
--- a/apps/web/src/app/api/admin/[data]/route.ts
+++ b/apps/web/src/app/api/admin/[data]/route.ts
@@ -85,7 +85,7 @@ const clients: Clients = {
delete: async (id: string) => tenant.deleteApiSaasTenantsById({ id }),
};
},
- claimType: async () => {
+ "claim-type": async () => {
const client = await getIdentityServiceClient();
const claimType = client.claimType;
@@ -196,7 +196,7 @@ const clients: Clients = {
},
};
},
- securityLogs: async () => {
+ "security-logs": async () => {
const client = await getIdentityServiceClient();
const securityLogs = client.securityLog;
@@ -225,7 +225,7 @@ const clients: Clients = {
};
},
- auditLogs: async () => {
+ "audit-logs": async () => {
const client = await getAdministrationServiceClient();
const auditLogs = client.auditLogs;
@@ -260,7 +260,7 @@ const clients: Clients = {
};
},
- textTemplates: async () => {
+ "text-templates": async () => {
const client = await getAdministrationServiceClient();
const textTemplates = client.textTemplateDefinitions;
return {
@@ -273,7 +273,7 @@ const clients: Clients = {
};
},
- languageTexts: async () => {
+ "language-texts": async () => {
const client = await getAdministrationServiceClient();
const languageTexts = client.languageTexts;
diff --git a/apps/web/src/app/api/management/[data]/route.ts b/apps/web/src/app/api/management/[data]/route.ts
index 6caca8f9f..bd969b22f 100644
--- a/apps/web/src/app/api/management/[data]/route.ts
+++ b/apps/web/src/app/api/management/[data]/route.ts
@@ -27,7 +27,7 @@ const clients: Clients = {
delete: async (id: string) => vats.deleteApiSettingServiceVatById({ id }),
};
},
- productGroups: async () => {
+ "product-groups": async () => {
const client = await getSettingServiceClient();
const productGroups = client.productGroup;
return {
@@ -49,7 +49,7 @@ const clients: Clients = {
};
},
- productGroupsVats: async () => {
+ "product-groups-vats": async () => {
const client = await getSettingServiceClient();
const productGroupVats = client.productGroupVat;
return {
diff --git a/packages/ayasofyazilim-ui b/packages/ayasofyazilim-ui
index cfde1c940..ce12d2e2b 160000
--- a/packages/ayasofyazilim-ui
+++ b/packages/ayasofyazilim-ui
@@ -1 +1 @@
-Subproject commit cfde1c9402a5bb9536f3a6a7d42018eaaf7f461a
+Subproject commit ce12d2e2bff4d7ed0dcaaf3200ebb9975dfff06c
diff --git a/packages/ui/src/theme/main-admin-layout/components/profile-menu/index.tsx b/packages/ui/src/theme/main-admin-layout/components/profile-menu/index.tsx
index 671346811..5d40299e2 100644
--- a/packages/ui/src/theme/main-admin-layout/components/profile-menu/index.tsx
+++ b/packages/ui/src/theme/main-admin-layout/components/profile-menu/index.tsx
@@ -36,13 +36,24 @@ function ProfileMenu() {
@@ -55,13 +66,24 @@ function ProfileMenu() {
@@ -74,13 +96,24 @@ function ProfileMenu() {
diff --git a/packages/ui/src/theme/main-admin-layout/header-section.tsx b/packages/ui/src/theme/main-admin-layout/header-section.tsx
index 22ff93c8a..6ec091f2c 100644
--- a/packages/ui/src/theme/main-admin-layout/header-section.tsx
+++ b/packages/ui/src/theme/main-admin-layout/header-section.tsx
@@ -75,14 +75,14 @@ export function HeaderSection() {
const sectionLayoutItems = breadcrumbItems[
breadcrumbItems.length - 1
- ].subNavbarItems.map((item) => ({
+ ]?.subNavbarItems?.map((item) => ({
id: item.key,
name: item.displayName,
link: item.href ? "/" + item.href : undefined,
}));
const activeSectionLayoutItem =
- breadcrumbItems[breadcrumbItems.length - 1].key;
+ breadcrumbItems[breadcrumbItems.length - 1]?.key;
return {
activeNavItem: item,
diff --git a/packages/ui/src/theme/types/index.tsx b/packages/ui/src/theme/types/index.tsx
index 26e1d5421..143b59e51 100644
--- a/packages/ui/src/theme/types/index.tsx
+++ b/packages/ui/src/theme/types/index.tsx
@@ -14,7 +14,10 @@ export type BreadcrumbItemType = NavbarItemsFromDB & {
export type NavbarItemType = NavbarItemsFromDB & {
subNavbarItems: NavbarItemType[] | null;
};
-type ProfileMenuLink = { name: string; href: string; icon: JSX.Element };
+type ProfileMenuLink = { name: string; icon: JSX.Element } & (
+ | { onClick: () => void | Promise; href: undefined }
+ | { href: string; onClick: undefined }
+);
export type ProfileMenuProps = {
info: {