updated management service
This commit is contained in:
parent
28c1cd9d63
commit
1560d6e68b
|
|
@ -1,103 +1,32 @@
|
|||
import Image from "next/image";
|
||||
"use server";
|
||||
import Link from "next/link";
|
||||
|
||||
export default async function Home() {
|
||||
const currentDate = new Date().toLocaleString("tr-TR", { timeZone: "Europe/Istanbul" });
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
|
||||
<main className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start">
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="/next.svg"
|
||||
alt="Next.js logo"
|
||||
width={180}
|
||||
height={38}
|
||||
priority
|
||||
/>
|
||||
<ol className="list-inside list-decimal text-sm/6 text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
|
||||
<li className="mb-2 tracking-[-.01em]">
|
||||
Get started by editing{" "}
|
||||
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-[family-name:var(--font-geist-mono)] font-semibold">
|
||||
src/app/page.tsx
|
||||
</code>
|
||||
.
|
||||
</li>
|
||||
<li className="tracking-[-.01em]">
|
||||
Save and see your changes instantly.
|
||||
</li>
|
||||
</ol>
|
||||
<div className="flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-blue-50 to-white p-8">
|
||||
<div className="w-full max-w-4xl bg-white rounded-xl shadow-lg overflow-hidden">
|
||||
|
||||
<div className="flex gap-4 items-center flex-col sm:flex-row">
|
||||
<a
|
||||
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:w-auto"
|
||||
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="/vercel.svg"
|
||||
alt="Vercel logomark"
|
||||
width={20}
|
||||
height={20}
|
||||
/>
|
||||
Deploy now
|
||||
</a>
|
||||
<a
|
||||
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 w-full sm:w-auto md:w-[158px]"
|
||||
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Read our docs
|
||||
</a>
|
||||
<div className="bg-blue-600 text-white p-8 text-center">
|
||||
<h1 className="text-4xl font-bold mb-2">Welcome to EVYOS</h1>
|
||||
<p className="text-xl">Enterprise Management System</p>
|
||||
<p className="text-sm mt-4">Server Time: {currentDate}</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer className="row-start-3 flex gap-[24px] flex-wrap items-center justify-center">
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="/file.svg"
|
||||
alt="File icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Learn
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="/window.svg"
|
||||
alt="Window icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Examples
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="/globe.svg"
|
||||
alt="Globe icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Go to nextjs.org →
|
||||
</a>
|
||||
</footer>
|
||||
|
||||
<div className="p-8">
|
||||
<div className="bg-white rounded-lg p-6 border border-gray-200">
|
||||
<Link
|
||||
href="/auth/en/login"
|
||||
className="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors"
|
||||
>Go to Sign In</Link>
|
||||
</div>
|
||||
|
||||
<div className="mt-6 text-center text-sm text-gray-600">
|
||||
<p>© {new Date().getFullYear()} EVYOS. All rights reserved.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import Link from "next/link"
|
||||
|
||||
const renderLastRowComponent = (reDirectUrl: string, IconToWrap: any, key: string) => {
|
||||
return <Link key={key} className="flex items-center gap-2" replace href={reDirectUrl} ><IconToWrap /></Link>
|
||||
}
|
||||
|
||||
export { renderLastRowComponent }
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { LanguageTypes } from "@/validations/mutual/language/validations";
|
||||
import { DynamicPage } from "@/schemas/custom/menu/type";
|
||||
import { DynamicPage } from "@/validations/mutual/menu/menu";
|
||||
import { managementAccountTenantMain } from "./management/account/tenantSomething/index";
|
||||
import { managementAccountTenantMainSecond } from "./management/account/tenantSomethingSecond/index";
|
||||
import { buildingPartsTenantSomething } from "./building/parts/tenantSomething/index";
|
||||
|
|
|
|||
|
|
@ -1,103 +1,32 @@
|
|||
import Image from "next/image";
|
||||
"use server";
|
||||
import Link from "next/link";
|
||||
|
||||
export default async function Home() {
|
||||
const currentDate = new Date().toLocaleString("tr-TR", { timeZone: "Europe/Istanbul" });
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
|
||||
<main className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start">
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="/next.svg"
|
||||
alt="Next.js logo"
|
||||
width={180}
|
||||
height={38}
|
||||
priority
|
||||
/>
|
||||
<ol className="list-inside list-decimal text-sm/6 text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
|
||||
<li className="mb-2 tracking-[-.01em]">
|
||||
Get started by editing{" "}
|
||||
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-[family-name:var(--font-geist-mono)] font-semibold">
|
||||
src/app/page.tsx
|
||||
</code>
|
||||
.
|
||||
</li>
|
||||
<li className="tracking-[-.01em]">
|
||||
Save and see your changes instantly.
|
||||
</li>
|
||||
</ol>
|
||||
<div className="flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-blue-50 to-white p-8">
|
||||
<div className="w-full max-w-4xl bg-white rounded-xl shadow-lg overflow-hidden">
|
||||
|
||||
<div className="flex gap-4 items-center flex-col sm:flex-row">
|
||||
<a
|
||||
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:w-auto"
|
||||
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="/vercel.svg"
|
||||
alt="Vercel logomark"
|
||||
width={20}
|
||||
height={20}
|
||||
/>
|
||||
Deploy now
|
||||
</a>
|
||||
<a
|
||||
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 w-full sm:w-auto md:w-[158px]"
|
||||
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Read our docs
|
||||
</a>
|
||||
<div className="bg-blue-600 text-white p-8 text-center">
|
||||
<h1 className="text-4xl font-bold mb-2">Welcome to EVYOS</h1>
|
||||
<p className="text-xl">Enterprise Management System</p>
|
||||
<p className="text-sm mt-4">Server Time: {currentDate}</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer className="row-start-3 flex gap-[24px] flex-wrap items-center justify-center">
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="/file.svg"
|
||||
alt="File icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Learn
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="/window.svg"
|
||||
alt="Window icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Examples
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="/globe.svg"
|
||||
alt="Globe icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Go to nextjs.org →
|
||||
</a>
|
||||
</footer>
|
||||
|
||||
<div className="p-8">
|
||||
<div className="bg-white rounded-lg p-6 border border-gray-200">
|
||||
<Link
|
||||
href="/auth/en/login"
|
||||
className="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors"
|
||||
>Go to Sign In</Link>
|
||||
</div>
|
||||
|
||||
<div className="mt-6 text-center text-sm text-gray-600">
|
||||
<p>© {new Date().getFullYear()} EVYOS. All rights reserved.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -11,9 +11,7 @@ const ContentComponent: FC<ContentProps> = async ({ lang, translations, activePa
|
|||
const PageToBeChildrend = isMulti ? PageToBeChildrendMulti : PageToBeChildrendSingle
|
||||
const loadingContent = <LoadingContent height="h-16" size="w-36 h-48" plane="h-full w-full" />
|
||||
const classNameDiv = "fixed top-24 left-80 right-0 py-10 px-15 border-emerald-150 border-l-2 overflow-y-auto h-[calc(100vh-64px)]"
|
||||
return (
|
||||
<div className={classNameDiv}><Suspense fallback={loadingContent}><PageToBeChildrend {...renderProps} /></Suspense></div>
|
||||
);
|
||||
return <div className={classNameDiv}><Suspense fallback={loadingContent}><PageToBeChildrend {...renderProps} /></Suspense></div>;
|
||||
};
|
||||
|
||||
export default ContentComponent;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
'use client';
|
||||
import Link from "next/link";
|
||||
|
||||
import { FC } from "react";
|
||||
import { MenuSingleProps, SingleLayerItemProps } from "@/validations/mutual/dashboard/props";
|
||||
import { langGetKey } from "@/lib/langGet";
|
||||
|
||||
const SingleLayerItem: FC<SingleLayerItemProps> = ({ isActive, innerText, url }) => {
|
||||
let className = "py-3 px-4 text-sm rounded-xl cursor-pointer transition-colors duration-200 flex justify-between items-center w-full";
|
||||
if (isActive) { className += " bg-emerald-700 text-white font-medium" }
|
||||
else { className += " bg-emerald-800 text-white hover:bg-emerald-700" }
|
||||
return <Link href={url} replace className={className}><span>{innerText}</span></Link>
|
||||
};
|
||||
|
||||
const MenuComponent: FC<MenuSingleProps> = ({ lang, activePageUrl, translations, menuItems }) => {
|
||||
|
||||
const renderMenuItems = () => {
|
||||
return menuItems.map((key) => {
|
||||
const url = `/${lang}/${key}`;
|
||||
const isActive = activePageUrl === key;
|
||||
return <div key={`${key}-item`} className="mb-2"><SingleLayerItem isActive={isActive} innerText={langGetKey(translations, key)} url={url} /></div>
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed top-24 p-5 left-0 right-0 w-80 border-emerald-150 border-r-2 overflow-y-auto h-[calc(100vh-6rem)]">
|
||||
<div className="flex flex-col">{renderMenuItems()}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default MenuComponent;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
const buildingEn = {
|
||||
building: "Building First Layer Label",
|
||||
};
|
||||
|
||||
const buildingPartsEn = {
|
||||
...buildingEn,
|
||||
parts: "Parts Second Layer Label",
|
||||
};
|
||||
|
||||
const buildingPartsFieldsEn = {
|
||||
"Users.uuid": "UUID",
|
||||
"Users.firstName": "First Name",
|
||||
"Users.lastName": "Last Name",
|
||||
"Users.email": "Email",
|
||||
"Users.phoneNumber": "Phone Number",
|
||||
"Users.country": "Country",
|
||||
"Users.description": "Description",
|
||||
"Users.isDeleted": "Is Deleted",
|
||||
"Users.isConfirmed": "Is Confirmed",
|
||||
"Users.createdAt": "Created At",
|
||||
"Users.updatedAt": "Updated At",
|
||||
};
|
||||
|
||||
export { buildingEn, buildingPartsEn, buildingPartsFieldsEn };
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
const buildingTr = {
|
||||
building: "Bina Birinci Seviye",
|
||||
};
|
||||
const buildingPartsTr = {
|
||||
...buildingTr,
|
||||
parts: "Parçalar İkinci Seviye",
|
||||
};
|
||||
|
||||
const buildingPartsFieldsTr = {
|
||||
"Users.uuid": "UUID",
|
||||
"Users.firstName": "Ad",
|
||||
"Users.lastName": "Soyad",
|
||||
"Users.email": "Email",
|
||||
"Users.phoneNumber": "Telefon Numarası",
|
||||
"Users.country": "Ülke",
|
||||
"Users.description": "Açıklama",
|
||||
"Users.isDeleted": "Silindi",
|
||||
"Users.isConfirmed": "Onaylandı",
|
||||
"Users.createdAt": "Oluşturulma Tarihi",
|
||||
"Users.updatedAt": "Güncellenme Tarihi",
|
||||
};
|
||||
|
||||
export { buildingTr, buildingPartsTr, buildingPartsFieldsTr };
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
import { LanguageTypes } from "@/validations/mutual/language/validations";
|
||||
import { DynamicPage } from "@/validations/mutual/menu/menu";
|
||||
import { managementAccountTenantMain } from "./management/account/tenantSomething/index";
|
||||
import { managementAccountTenantMainSecond } from "./management/account/tenantSomethingSecond/index";
|
||||
|
||||
const dynamicPagesIndex: Record<string, Record<LanguageTypes, DynamicPage>> = {
|
||||
application: managementAccountTenantMain,
|
||||
services: managementAccountTenantMainSecond,
|
||||
};
|
||||
|
||||
export { dynamicPagesIndex };
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
import { footerDefaultEn } from "@/languages/mutual/footer/english";
|
||||
import { headerDefaultEn } from "@/languages/mutual/header/english";
|
||||
import { managementAccountEn, managementAccountFieldsEn } from "../../english";
|
||||
import { contentDefaultEn } from "@/languages/mutual/content/english";
|
||||
|
||||
const contentManagementAccountTenantSomethingEn = {
|
||||
...managementAccountFieldsEn,
|
||||
title: "Management Account Tenant Something",
|
||||
content: "Management Account Tenant Something Content",
|
||||
button: "Management Account Tenant Something Button",
|
||||
};
|
||||
const footerManagementAccountTenantSomethingEn = {
|
||||
...footerDefaultEn,
|
||||
page: "Management Account Tenant Something Footer",
|
||||
};
|
||||
const headerManagementAccountTenantSomethingEn = {
|
||||
...headerDefaultEn,
|
||||
page: "Management Account Tenant Something Header",
|
||||
};
|
||||
|
||||
const menuManagementAccountTenantSomethingEn = {
|
||||
...managementAccountEn,
|
||||
"tenant/something": "Tenant Info",
|
||||
};
|
||||
|
||||
const managementAccountTenantMainEn = {
|
||||
header: headerManagementAccountTenantSomethingEn,
|
||||
menu: menuManagementAccountTenantSomethingEn,
|
||||
content: contentManagementAccountTenantSomethingEn,
|
||||
footer: footerManagementAccountTenantSomethingEn,
|
||||
};
|
||||
|
||||
export {
|
||||
contentManagementAccountTenantSomethingEn,
|
||||
footerManagementAccountTenantSomethingEn,
|
||||
headerManagementAccountTenantSomethingEn,
|
||||
menuManagementAccountTenantSomethingEn,
|
||||
managementAccountTenantMainEn,
|
||||
};
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import { managementAccountTenantMainTr } from "./turkish";
|
||||
import { managementAccountTenantMainEn } from "./english";
|
||||
|
||||
const managementAccountTenantMain = {
|
||||
tr: managementAccountTenantMainTr,
|
||||
en: managementAccountTenantMainEn,
|
||||
}
|
||||
|
||||
export { managementAccountTenantMain }
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
import { footerDefaultTr } from "@/languages/mutual/footer/turkish";
|
||||
import { headerDefaultTr } from "@/languages/mutual/header/turkish";
|
||||
import { managementAccountTr } from "../../turkish";
|
||||
|
||||
const contentManagementAccountTenantSomethingTr = {
|
||||
title: "Yönetim Hesap Kiracı Bilgileri",
|
||||
description: "Yönetim Hesap Kiracı Bilgileri",
|
||||
button: "Yönetim Hesap Kiracı Bilgileri Buton",
|
||||
};
|
||||
const footerManagementAccountTenantSomethingTr = {
|
||||
...footerDefaultTr,
|
||||
page: "Yönetim Hesap Kiracı Bilgileri Footer",
|
||||
};
|
||||
const headerManagementAccountTenantSomethingTr = {
|
||||
...headerDefaultTr,
|
||||
page: "Yönetim Hesap Kiracı Bilgileri Header",
|
||||
};
|
||||
|
||||
const menuManagementAccountTenantSomethingTr = {
|
||||
...managementAccountTr,
|
||||
"tenant/something": "Kiracı Bilgileri",
|
||||
};
|
||||
const managementAccountTenantMainTr = {
|
||||
header: headerManagementAccountTenantSomethingTr,
|
||||
menu: menuManagementAccountTenantSomethingTr,
|
||||
content: contentManagementAccountTenantSomethingTr,
|
||||
footer: footerManagementAccountTenantSomethingTr,
|
||||
};
|
||||
|
||||
export {
|
||||
contentManagementAccountTenantSomethingTr,
|
||||
footerManagementAccountTenantSomethingTr,
|
||||
headerManagementAccountTenantSomethingTr,
|
||||
menuManagementAccountTenantSomethingTr,
|
||||
managementAccountTenantMainTr,
|
||||
};
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
import { footerDefaultEn } from "@/languages/mutual/footer/english";
|
||||
import { headerDefaultEn } from "@/languages/mutual/header/english";
|
||||
import { contentDefaultEn } from "@/languages/mutual/content/english";
|
||||
import { managementAccountEn, managementAccountFieldsEn } from "../../english";
|
||||
|
||||
const contentManagementAccountTenantSomethingSecondEn = {
|
||||
...contentDefaultEn,
|
||||
...managementAccountFieldsEn,
|
||||
title: "Management Account Tenant Something",
|
||||
content: "Management Account Tenant Something Content",
|
||||
button: "Management Account Tenant Something Button",
|
||||
};
|
||||
const footerManagementAccountTenantSomethingSecondEn = {
|
||||
...footerDefaultEn,
|
||||
page: "Management Account Tenant Something Second Footer",
|
||||
};
|
||||
const headerManagementAccountTenantSomethingSecondEn = {
|
||||
...headerDefaultEn,
|
||||
page: "Management Account Tenant Something Second Header",
|
||||
};
|
||||
|
||||
const menuManagementAccountTenantSomethingSecondEn = {
|
||||
...managementAccountEn,
|
||||
"tenant/somethingSecond": "Tenant Info Second",
|
||||
};
|
||||
|
||||
const managementAccountTenantMainSecondEn = {
|
||||
header: headerManagementAccountTenantSomethingSecondEn,
|
||||
menu: menuManagementAccountTenantSomethingSecondEn,
|
||||
content: contentManagementAccountTenantSomethingSecondEn,
|
||||
footer: footerManagementAccountTenantSomethingSecondEn,
|
||||
};
|
||||
|
||||
export {
|
||||
contentManagementAccountTenantSomethingSecondEn,
|
||||
footerManagementAccountTenantSomethingSecondEn,
|
||||
headerManagementAccountTenantSomethingSecondEn,
|
||||
menuManagementAccountTenantSomethingSecondEn,
|
||||
managementAccountTenantMainSecondEn,
|
||||
};
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import { managementAccountTenantMainSecondTr } from "./turkish";
|
||||
import { managementAccountTenantMainSecondEn } from "./english";
|
||||
|
||||
const managementAccountTenantMainSecond = {
|
||||
tr: managementAccountTenantMainSecondTr,
|
||||
en: managementAccountTenantMainSecondEn,
|
||||
};
|
||||
|
||||
export { managementAccountTenantMainSecond };
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
import { footerDefaultTr } from "@/languages/mutual/footer/turkish";
|
||||
import { headerDefaultTr } from "@/languages/mutual/header/turkish";
|
||||
import { managementAccountTr, managementAccountFieldsTr } from "../../turkish";
|
||||
|
||||
const contentManagementAccountTenantSomethingSecondTr = {
|
||||
...managementAccountFieldsTr,
|
||||
title: "Yönetim Hesap Kiracı Bilgileri",
|
||||
description: "Yönetim Hesap Kiracı Bilgileri",
|
||||
button: "Yönetim Hesap Kiracı Bilgileri Buton",
|
||||
};
|
||||
const footerManagementAccountTenantSomethingSecondTr = {
|
||||
...footerDefaultTr,
|
||||
page: "Yönetim Hesap Kiracı Bilgileri Footer",
|
||||
};
|
||||
const headerManagementAccountTenantSomethingSecondTr = {
|
||||
...headerDefaultTr,
|
||||
page: "Yönetim Hesap Kiracı Bilgileri Header",
|
||||
};
|
||||
|
||||
const menuManagementAccountTenantSomethingSecondTr = {
|
||||
...managementAccountTr,
|
||||
"tenant/somethingSecond": "İkinci Kiracı Bilgileri",
|
||||
};
|
||||
const managementAccountTenantMainSecondTr = {
|
||||
header: headerManagementAccountTenantSomethingSecondTr,
|
||||
menu: menuManagementAccountTenantSomethingSecondTr,
|
||||
content: contentManagementAccountTenantSomethingSecondTr,
|
||||
footer: footerManagementAccountTenantSomethingSecondTr,
|
||||
};
|
||||
|
||||
export {
|
||||
contentManagementAccountTenantSomethingSecondTr,
|
||||
footerManagementAccountTenantSomethingSecondTr,
|
||||
headerManagementAccountTenantSomethingSecondTr,
|
||||
menuManagementAccountTenantSomethingSecondTr,
|
||||
managementAccountTenantMainSecondTr,
|
||||
};
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
const managementEn = {
|
||||
management: "Management First Layer Label",
|
||||
};
|
||||
|
||||
const managementAccountEn = {
|
||||
...managementEn,
|
||||
account: "Account Second Layer Label",
|
||||
};
|
||||
|
||||
const managementAccountFieldsEn = {
|
||||
"User.firstName": "First Name",
|
||||
"User.lastName": "Last Name",
|
||||
"User.email": "Email",
|
||||
"User.phoneNumber": "Phone Number",
|
||||
"User.country": "Country",
|
||||
"User.description": "Description",
|
||||
"User.isDeleted": "Is Deleted",
|
||||
"User.isConfirmed": "Is Confirmed",
|
||||
"User.createdAt": "Created At",
|
||||
"User.updatedAt": "Updated At",
|
||||
};
|
||||
|
||||
export { managementEn, managementAccountEn, managementAccountFieldsEn };
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
const managementTr = {
|
||||
management: "Management Birinci Seviye",
|
||||
};
|
||||
const managementAccountTr = {
|
||||
...managementTr,
|
||||
account: "Account İkinci Seviye",
|
||||
};
|
||||
|
||||
const managementAccountFieldsTr = {
|
||||
"User.firstName": "Ad",
|
||||
"User.lastName": "Soyad",
|
||||
"User.email": "Email",
|
||||
"User.phoneNumber": "Telefon Numarası",
|
||||
"User.country": "Ülke",
|
||||
"User.description": "Açıklama",
|
||||
"User.isDeleted": "Silindi",
|
||||
"User.isConfirmed": "Onaylandı",
|
||||
"User.createdAt": "Oluşturulma Tarihi",
|
||||
"User.updatedAt": "Güncellenme Tarihi",
|
||||
};
|
||||
|
||||
export { managementTr, managementAccountTr, managementAccountFieldsTr };
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
const contentDefaultEn = {
|
||||
title: "Content Default",
|
||||
content: "Content Default",
|
||||
button: "Content Default",
|
||||
rows: "Rows",
|
||||
};
|
||||
|
||||
export { contentDefaultEn };
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import { contentDefaultTr } from "./turkish";
|
||||
import { contentDefaultEn } from "./english";
|
||||
|
||||
const contentDefault = {
|
||||
tr: contentDefaultTr,
|
||||
en: contentDefaultEn,
|
||||
};
|
||||
|
||||
export { contentDefault };
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
const contentDefaultTr = {
|
||||
title: "İçerik Varsayılan",
|
||||
content: "İçerik Varsayılan",
|
||||
button: "İçerik Varsayılan",
|
||||
rows: "Satır",
|
||||
};
|
||||
|
||||
export { contentDefaultTr };
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
const dashboardTranslationEn = {
|
||||
title: "Dashboard Panel",
|
||||
};
|
||||
|
||||
export { dashboardTranslationEn };
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import { dashboardTranslationEn } from "./english";
|
||||
import { dashboardTranslationTr } from "./turkish";
|
||||
|
||||
export const dashboardTranslation = {
|
||||
en: dashboardTranslationEn,
|
||||
tr: dashboardTranslationTr,
|
||||
};
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
const dashboardTranslationTr = {
|
||||
title: "Yönetim Panosu",
|
||||
};
|
||||
|
||||
export { dashboardTranslationTr };
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
const footerDefaultEn = {
|
||||
description: "Footer Default",
|
||||
footer: "Footer Info",
|
||||
};
|
||||
|
||||
export { footerDefaultEn };
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
const footerDefaultTr = {
|
||||
description: "Footer Bilgi",
|
||||
footer: "Alt Bilgi",
|
||||
};
|
||||
|
||||
export { footerDefaultTr };
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
const headerDefaultEn = {
|
||||
selectedPage: "Selected Page",
|
||||
};
|
||||
|
||||
export { headerDefaultEn };
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
const headerDefaultTr = {
|
||||
selectedPage: "Seçili Sayfa",
|
||||
};
|
||||
|
||||
export { headerDefaultTr };
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
const languageSelectionTranslationEn = {
|
||||
title: "Language Selection",
|
||||
english: "English",
|
||||
turkish: "Turkish",
|
||||
};
|
||||
|
||||
export { languageSelectionTranslationEn };
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import { languageSelectionTranslationEn } from "./english";
|
||||
import { languageSelectionTranslationTr } from "./turkish";
|
||||
|
||||
export const languageSelectionTranslation = {
|
||||
en: languageSelectionTranslationEn,
|
||||
tr: languageSelectionTranslationTr
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
const languageSelectionTranslationTr = {
|
||||
title: "Dil Seçimi",
|
||||
english: "İngilizce",
|
||||
turkish: "Türkçe",
|
||||
};
|
||||
|
||||
export { languageSelectionTranslationTr };
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
const menuTranslationEn = {
|
||||
"/management/account/something/something/something": "Account Third Layer",
|
||||
"/management/account": "Account Second Layer",
|
||||
"/management": "Management First Layer",
|
||||
};
|
||||
const menuIndex = ["/application", "/services"];
|
||||
|
||||
export { menuTranslationEn, menuIndex };
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import { menuTranslationEn } from "./english";
|
||||
import { menuTranslationTr } from "./turkish";
|
||||
|
||||
export const menuTranslation = {
|
||||
en: menuTranslationEn,
|
||||
tr: menuTranslationTr,
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
const menuTranslationTr = {};
|
||||
|
||||
export { menuTranslationTr };
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
const dashboardTranslationEn = {
|
||||
title: "Dashboard Panel",
|
||||
};
|
||||
|
||||
export { dashboardTranslationEn };
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import { dashboardTranslationEn } from "./english";
|
||||
import { dashboardTranslationTr } from "./turkish";
|
||||
|
||||
export const dashboardTranslation = {
|
||||
en: dashboardTranslationEn,
|
||||
tr: dashboardTranslationTr,
|
||||
};
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
const dashboardTranslationTr = {
|
||||
title: "Yönetim Panosu",
|
||||
};
|
||||
|
||||
export { dashboardTranslationTr };
|
||||
|
|
@ -1,27 +1,22 @@
|
|||
'use server';
|
||||
import { FC } from "react";
|
||||
import { joinPageUrlFromLayersArray, retrieveLayersOfUrlFromParams } from "@/lib/menuGet";
|
||||
import { dynamicPagesIndex } from "@/languages/custom";
|
||||
import { dynamicPageMenuWithLayersGet, dynamicRetrieveMenuFlattenGet, langDynamicPagesGet, langGet } from "@/lib/langGet";
|
||||
import { langDynamicPagesGet, langGet } from "@/lib/langGet";
|
||||
import { DashboardLayoutProps, ModeTypes } from "@/validations/mutual/dashboard/props";
|
||||
import { dynamicPagesIndex } from "@/languages/custom";
|
||||
|
||||
import HeaderComponent from "@/components/custom/header/component";
|
||||
import MenuComponent from "@/components/custom/menu/component";
|
||||
import MenuComponent from "@/components/custom/menu/single/component";
|
||||
import ContentComponent from "@/components/custom/content/component";
|
||||
import FooterComponent from "@/components/custom/footer/component";
|
||||
import { menuTranslation } from "@/languages/mutual/menu";
|
||||
|
||||
const DashboardLayout: FC<DashboardLayoutProps> = async ({ params, searchParams, lang }) => {
|
||||
const layersItems = retrieveLayersOfUrlFromParams(params.page);
|
||||
const activePageUrl = joinPageUrlFromLayersArray(layersItems.data);
|
||||
const activePageUrl = `/${lang}/${params?.page?.join("/")}`;
|
||||
const mode = (searchParams?.mode as ModeTypes) || 'shortList';
|
||||
|
||||
const menuItems = await dynamicPageMenuWithLayersGet(lang);
|
||||
const translations = langGet(lang, langDynamicPagesGet(activePageUrl, dynamicPagesIndex));
|
||||
const menuTranslationsFlatten = dynamicRetrieveMenuFlattenGet(menuItems);
|
||||
|
||||
const headerProps = { translations: translations.header, lang, activePageUrl }
|
||||
const menuProps = { lang, activePageUrl, menuTranslationsFlatten, menuItems }
|
||||
const contentProps = { translations: translations.content, lang, activePageUrl, mode, isMulti: true }
|
||||
const menuProps = { lang, activePageUrl, translations: menuTranslation[lang], menuItems: Object.keys(translations.menu) }
|
||||
const contentProps = { translations: translations.content, lang, activePageUrl, mode, isMulti: false }
|
||||
|
||||
return (
|
||||
<div className="flex flex-col min-w-screen">
|
||||
|
|
|
|||
|
|
@ -31,6 +31,13 @@ interface MenuProps {
|
|||
menuTranslationsFlatten: Record<string, Record<string, any>>;
|
||||
}
|
||||
|
||||
interface MenuSingleProps {
|
||||
lang: LanguageTypes;
|
||||
activePageUrl: string;
|
||||
translations: Record<string, any>;
|
||||
menuItems: string[];
|
||||
}
|
||||
|
||||
interface FooterProps {
|
||||
translations: Record<string, string>;
|
||||
}
|
||||
|
|
@ -41,11 +48,19 @@ interface HeaderProps {
|
|||
activePageUrl: string;
|
||||
}
|
||||
|
||||
interface SingleLayerItemProps {
|
||||
isActive: boolean;
|
||||
innerText: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
export type {
|
||||
MaindasboardPageProps,
|
||||
DashboardLayoutProps,
|
||||
ContentProps,
|
||||
MenuProps,
|
||||
SingleLayerItemProps,
|
||||
MenuSingleProps,
|
||||
FooterProps,
|
||||
HeaderProps,
|
||||
ModeTypes,
|
||||
|
|
|
|||
Loading…
Reference in New Issue