updated tailwind css
This commit is contained in:
parent
3f0b3c8ed2
commit
a48e560ece
|
|
@ -0,0 +1,30 @@
|
|||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /
|
||||
|
||||
# Install system dependencies and Poetry
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends gcc && rm -rf /var/lib/apt/lists/* && pip install --no-cache-dir poetry
|
||||
|
||||
# Copy Poetry configuration
|
||||
COPY /pyproject.toml ./pyproject.toml
|
||||
|
||||
# Configure Poetry and install dependencies with optimizations
|
||||
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-root --only main && pip cache purge && rm -rf ~/.cache/pypoetry
|
||||
|
||||
# Copy application code
|
||||
COPY /ServicesApi/Initializer /Initializer
|
||||
COPY /ServicesApi/Controllers /Controllers
|
||||
COPY /ServicesApi/Validations /Validations
|
||||
COPY /ServicesApi/Schemas /Schemas
|
||||
COPY /ServicesApi/Extensions /Extensions
|
||||
|
||||
COPY /ServicesApi/Builds/Account/Endpoints /Initializer/Endpoints
|
||||
COPY /ServicesApi/Builds/Account/Events /Initializer/Events
|
||||
COPY /ServicesApi/Builds/Account/Validations /Initializer/Validations
|
||||
COPY /ServicesApi/Builds/Account/Index.py /Initializer/index.py
|
||||
|
||||
# Set Python path to include app directory
|
||||
ENV PYTHONPATH=/ PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Run the application using the configured uvicorn server
|
||||
CMD ["poetry", "run", "python", "/Initializer/app.py"]
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
from typing import Any
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from index import endpoints_index
|
||||
from events.account_records.cluster import AccountRecordsRouterCluster
|
||||
|
||||
from api_validations.defaults.validations import CommonHeaders
|
||||
from api_validations.response.pagination import PaginateOnly
|
||||
from api_middlewares.token_provider import TokenProvider
|
||||
|
||||
|
||||
account_records_router = APIRouter(prefix="/account/records", tags=["Account Cluster"])
|
||||
|
||||
|
||||
account_records_list = "AccountRecordsList"
|
||||
@account_records_router.post(
|
||||
path="/list",
|
||||
description="List all account records endpoint",
|
||||
operation_id=endpoints_index[account_records_list],
|
||||
)
|
||||
def people_list_route(data: PaginateOnly, headers: CommonHeaders = Depends(CommonHeaders.as_dependency)):
|
||||
token_object = TokenProvider.get_dict_from_redis(token=headers.token)
|
||||
event_founder_dict = dict(endpoint_code=headers.operation_id, token=token_object)
|
||||
event_key = TokenProvider.retrieve_event_codes(**event_founder_dict)
|
||||
FoundCluster = AccountRecordsRouterCluster.get_event_cluster(account_records_list)
|
||||
event_cluster_matched = FoundCluster.match_event(event_key=event_key)
|
||||
return event_cluster_matched.event_callable(list_options=data, header=headers)
|
||||
|
||||
|
||||
account_records_create = "AccountRecordsCreate"
|
||||
@account_records_router.post(
|
||||
path="/create",
|
||||
description="Create account records endpoint",
|
||||
operation_id=endpoints_index[account_records_create],
|
||||
)
|
||||
def account_records_create_route(data, headers: CommonHeaders = Depends(CommonHeaders.as_dependency)):
|
||||
token_object = TokenProvider.get_dict_from_redis(token=headers.token)
|
||||
event_founder_dict = dict(endpoint_code=headers.operation_id, token=token_object)
|
||||
event_key = TokenProvider.retrieve_event_codes(**event_founder_dict)
|
||||
FoundCluster = AccountRecordsRouterCluster.get_event_cluster(account_records_create)
|
||||
event_cluster_matched = FoundCluster.match_event(event_key=event_key)
|
||||
return event_cluster_matched.event_callable(data=data, header=headers)
|
||||
|
||||
|
||||
account_records_update = "AccountRecordsUpdate"
|
||||
@account_records_router.post(
|
||||
path="/update/{uu_id}",
|
||||
description="Update account records endpoint",
|
||||
operation_id=endpoints_index[account_records_update],
|
||||
)
|
||||
def account_records_update_route(uu_id: str, data, headers: CommonHeaders = Depends(CommonHeaders.as_dependency)):
|
||||
token_object = TokenProvider.get_dict_from_redis(token=headers.token)
|
||||
event_founder_dict = dict(endpoint_code=headers.operation_id, token=token_object)
|
||||
event_key = TokenProvider.retrieve_event_codes(**event_founder_dict)
|
||||
FoundCluster = AccountRecordsRouterCluster.get_event_cluster(account_records_update)
|
||||
event_cluster_matched = FoundCluster.match_event(event_key=event_key)
|
||||
return event_cluster_matched.event_callable(uu_id=uu_id, data=data, header=headers)
|
||||
|
||||
|
||||
account_records_delete = "AccountRecordsDelete"
|
||||
@account_records_router.post(
|
||||
path="/delete/{uu_id}",
|
||||
description="Delete account records endpoint",
|
||||
operation_id=endpoints_index[account_records_delete],
|
||||
)
|
||||
def account_records_delete_route(uu_id: str, headers: CommonHeaders = Depends(CommonHeaders.as_dependency)):
|
||||
token_object = TokenProvider.get_dict_from_redis(token=headers.token)
|
||||
event_founder_dict = dict(endpoint_code=headers.operation_id, token=token_object)
|
||||
event_key = TokenProvider.retrieve_event_codes(**event_founder_dict)
|
||||
FoundCluster = AccountRecordsRouterCluster.get_event_cluster(account_records_delete)
|
||||
event_cluster_matched = FoundCluster.match_event(event_key=event_key)
|
||||
return event_cluster_matched.event_callable(uu_id=uu_id, header=headers)
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
from fastapi import APIRouter
|
||||
from .account_records.router import account_records_router
|
||||
|
||||
def get_routes() -> list[APIRouter]:
|
||||
return [account_records_router]
|
||||
|
||||
|
||||
def get_safe_endpoint_urls() -> list[tuple[str, str]]:
|
||||
return [
|
||||
("/", "GET"),
|
||||
("/docs", "GET"),
|
||||
("/redoc", "GET"),
|
||||
("/openapi.json", "GET"),
|
||||
("/metrics", "GET"),
|
||||
]
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
from .account_records.cluster import AccountRecordsRouterCluster
|
||||
|
||||
__all__ = [
|
||||
"AccountRecordsRouterCluster",
|
||||
]
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
from api_initializer.event_clusters import EventCluster, RouterCluster
|
||||
from index import endpoints_index
|
||||
from .supers_events import (
|
||||
SuperAccountRecordsListEvent,
|
||||
SuperAccountRecordsCreateEvent,
|
||||
SuperAccountRecordsUpdateEvent,
|
||||
SuperAccountRecordsDeleteEvent,
|
||||
)
|
||||
|
||||
AccountRecordsRouterCluster = RouterCluster(name="AccountRecordsRouterCluster")
|
||||
|
||||
AccountRecordsListEventCluster = EventCluster(name="AccountRecordsListEventCluster", endpoint_uu_id=endpoints_index["AccountRecordsList"])
|
||||
AccountRecordsListEventCluster.add_event(SuperAccountRecordsListEvent)
|
||||
|
||||
AccountRecordsCreateEventCluster = EventCluster(name="AccountRecordsCreateEventCluster", endpoint_uu_id=endpoints_index["AccountRecordsCreate"])
|
||||
AccountRecordsCreateEventCluster.add_event(SuperAccountRecordsCreateEvent)
|
||||
|
||||
AccountRecordsUpdateEventCluster = EventCluster(name="AccountRecordsUpdateEventCluster", endpoint_uu_id=endpoints_index["AccountRecordsUpdate"])
|
||||
AccountRecordsUpdateEventCluster.add_event(SuperAccountRecordsUpdateEvent)
|
||||
|
||||
AccountRecordsDeleteEventCluster = EventCluster(name="AccountRecordsDeleteEventCluster", endpoint_uu_id=endpoints_index["AccountRecordsDelete"])
|
||||
AccountRecordsDeleteEventCluster.add_event(SuperAccountRecordsDeleteEvent)
|
||||
|
||||
AccountRecordsRouterCluster.set_event_cluster(AccountRecordsListEventCluster)
|
||||
AccountRecordsRouterCluster.set_event_cluster(AccountRecordsCreateEventCluster)
|
||||
AccountRecordsRouterCluster.set_event_cluster(AccountRecordsUpdateEventCluster)
|
||||
AccountRecordsRouterCluster.set_event_cluster(AccountRecordsDeleteEventCluster)
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
from typing import Any
|
||||
|
||||
from api_initializer.event_clusters import Event
|
||||
from api_validations.response import (
|
||||
PaginateOnly,
|
||||
Pagination,
|
||||
PaginationResult,
|
||||
PostgresResponseSingle,
|
||||
PostgresResponse,
|
||||
EndpointResponse
|
||||
)
|
||||
from api_validations.defaults.validations import CommonHeaders
|
||||
from schemas import AccountRecords
|
||||
|
||||
# List all account records endpoint Super Users
|
||||
SuperAccountRecordsListEvent = Event(
|
||||
name="super_account_records_list",
|
||||
key="c5b6d9c7-9115-4825-bcc1-16f409a7004a",
|
||||
request_validator=None, # TODO: Add request validator
|
||||
response_validator=None, # TODO: Add response validator
|
||||
description="Super Account Records List all flat representative users endpoint",
|
||||
)
|
||||
|
||||
# Create account records endpoint Super Users
|
||||
SuperAccountRecordsCreateEvent = Event(
|
||||
name="super_account_records_create",
|
||||
key="1ab5c778-5a25-49d0-8bf8-799a74f430ad",
|
||||
request_validator=None, # TODO: Add request validator
|
||||
response_validator=None, # TODO: Add response validator
|
||||
description="Super Account Records Create endpoint",
|
||||
)
|
||||
|
||||
# Update account records endpoint Super Users
|
||||
SuperAccountRecordsUpdateEvent = Event(
|
||||
name="super_account_records_update",
|
||||
key="137fca9b-110a-4a28-bddd-36fde7380e89",
|
||||
request_validator=None, # TODO: Add request validator
|
||||
response_validator=None, # TODO: Add response validator
|
||||
description="Super Account Records Update endpoint",
|
||||
)
|
||||
|
||||
# Delete account records endpoint Super Users
|
||||
SuperAccountRecordsDeleteEvent = Event(
|
||||
name="super_account_records_delete",
|
||||
key="8bf399a7-f79e-49d2-b481-f5974676599f",
|
||||
request_validator=None, # TODO: Add request validator
|
||||
response_validator=None, # TODO: Add response validator
|
||||
description="Super Account Records Delete endpoint",
|
||||
)
|
||||
|
||||
|
||||
def super_account_records_list_callable(list_options: PaginateOnly, header: CommonHeaders):
|
||||
return {
|
||||
"message": "MSG0003-LIST",
|
||||
"data": None,
|
||||
"completed": True,
|
||||
}
|
||||
|
||||
|
||||
SuperAccountRecordsListEvent.event_callable = super_account_records_list_callable
|
||||
|
||||
|
||||
def super_account_records_create_callable(data: AccountRecords, header: CommonHeaders):
|
||||
return {
|
||||
"message": "MSG0003-CREATE",
|
||||
"data": None,
|
||||
"completed": True,
|
||||
}
|
||||
|
||||
|
||||
SuperAccountRecordsCreateEvent.event_callable = super_account_records_create_callable
|
||||
|
||||
|
||||
def super_account_records_update_callable(data: AccountRecords, header: CommonHeaders):
|
||||
return {
|
||||
"message": "MSG0003-UPDATE",
|
||||
"data": None,
|
||||
"completed": True,
|
||||
}
|
||||
|
||||
|
||||
SuperAccountRecordsUpdateEvent.event_callable = super_account_records_update_callable
|
||||
|
||||
|
||||
def super_account_records_delete_callable(data: AccountRecords, header: CommonHeaders):
|
||||
return {
|
||||
"message": "MSG0003-DELETE",
|
||||
"data": None,
|
||||
"completed": True,
|
||||
}
|
||||
|
||||
|
||||
SuperAccountRecordsDeleteEvent.event_callable = super_account_records_delete_callable
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
|
||||
endpoints_index: dict = {
|
||||
"AccountRecordsList": "7552d270-0e2a-4a40-bfd5-ec3493bc63ab",
|
||||
"AccountRecordsCreate": "ddb956fb-73ef-4eec-a51b-ff54c3d65552",
|
||||
"AccountRecordsUpdate": "6f120aca-b5a7-43ea-8214-9c17f9333c8a",
|
||||
"AccountRecordsDelete": "5cc1de2d-de11-4bbe-9c19-5b8eec69e4a1",
|
||||
}
|
||||
|
|
@ -18,9 +18,9 @@ const MenuComponent: FC<MenuProps> = ({
|
|||
selectionData, selectionLoading, selectionError,
|
||||
menuData, menuLoading, menuError
|
||||
}) => {
|
||||
if (menuLoading) { return <MenuLoadingState /> } // Render loading state
|
||||
if (menuError) { return <MenuErrorState error={menuError} />; } // Render error state
|
||||
if (availableApplications.length === 0) { return <MenuEmptyState />; } // Render empty state
|
||||
if (menuLoading) { return <MenuLoadingState /> }
|
||||
if (menuError) { return <MenuErrorState error={menuError} />; }
|
||||
if (availableApplications.length === 0) { return <MenuEmptyState />; }
|
||||
function handleClientSelection(client: any) { console.log('Client selected:', client) }
|
||||
const lang = onlineData?.lang as LanguageTypes || 'en';
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -4,20 +4,14 @@ import { menuTranslation } from "@/languages/mutual/menu";
|
|||
import FirstLayerDropdown from "./firstLayerComponent";
|
||||
import SecondLayerDropdown from "./secondLayerComponent";
|
||||
import ThirdLayerDropdown from "./thirdLayerComponent";
|
||||
import {
|
||||
TranslationItem,
|
||||
ThirdLayerItem,
|
||||
SecondLayerItems,
|
||||
MenuStructure,
|
||||
MenuItemsSectionProps,
|
||||
} from "./types";
|
||||
|
||||
type TranslationItem = { value: string; key: string };
|
||||
type ThirdLayerItemData = { path: string; translation: TranslationItem[] };
|
||||
type ThirdLayerItem = Record<string, ThirdLayerItemData>;
|
||||
type SecondLayerItems = Record<string, ThirdLayerItem>;
|
||||
type FirstLayerItems = Record<string, SecondLayerItems>;
|
||||
type MenuStructure = FirstLayerItems;
|
||||
|
||||
interface MenuItemsSectionProps {
|
||||
availableApplications: string[];
|
||||
activePageUrl: string;
|
||||
lang: string;
|
||||
prefix?: string;
|
||||
}
|
||||
|
||||
const menuStaticTranslation = {
|
||||
tr: { menu: "Menü" },
|
||||
|
|
@ -28,40 +22,46 @@ const MenuItemsSection: FC<MenuItemsSectionProps> = ({ availableApplications, ac
|
|||
const [expandedFirstLayer, setExpandedFirstLayer] = useState<string | null>(null);
|
||||
const [expandedSecondLayer, setExpandedSecondLayer] = useState<string | null>(null);
|
||||
const [menuStructure, setMenuStructure] = useState<MenuStructure>({});
|
||||
|
||||
const menuTranslationWLang = menuTranslation[lang as keyof typeof menuTranslation];
|
||||
const activeParsedLayer = (menuTranslationWLang[activePageUrl as keyof typeof menuTranslationWLang] as unknown as TranslationItem[]) || [];
|
||||
const activeFirstLayer = activeParsedLayer[0] ? activeParsedLayer[0].key : null;
|
||||
const activeSecondLayer = activeParsedLayer[1] ? activeParsedLayer[1].key : null;
|
||||
const activeThirdLayer = activeParsedLayer[2] ? activeParsedLayer[2].key : null;
|
||||
const [activeFirstLayer, setActiveFirstLayer] = useState<string | null>(null);
|
||||
const [activeSecondLayer, setActiveSecondLayer] = useState<string | null>(null);
|
||||
const [activeThirdLayer, setActiveThirdLayer] = useState<string | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
const newMenuStructure: MenuStructure = {};
|
||||
const menuTranslationWLang = menuTranslation[lang as keyof typeof menuTranslation];
|
||||
const activeParsedLayer = (menuTranslationWLang[activePageUrl as keyof typeof menuTranslationWLang] as unknown as TranslationItem[]) || [];
|
||||
availableApplications.forEach((appPath: string) => {
|
||||
const pathTranslation = menuTranslationWLang[appPath as keyof typeof menuTranslationWLang] as unknown as TranslationItem[] | undefined;
|
||||
if (pathTranslation && pathTranslation.length >= 3) {
|
||||
const firstLayer = pathTranslation[0] ? pathTranslation[0].key : '';
|
||||
const secondLayer = pathTranslation[1] ? pathTranslation[1].key : '';
|
||||
const thirdLayer = pathTranslation[2] ? pathTranslation[2].key : '';
|
||||
const firstLayer = pathTranslation[0]?.key || '';
|
||||
const secondLayer = pathTranslation[1]?.key || '';
|
||||
const thirdLayer = pathTranslation[2]?.key || '';
|
||||
if (!newMenuStructure[firstLayer]) { newMenuStructure[firstLayer] = {} }
|
||||
if (!newMenuStructure[firstLayer][secondLayer]) { newMenuStructure[firstLayer][secondLayer] = {} }
|
||||
newMenuStructure[firstLayer][secondLayer][thirdLayer] = { path: appPath, translation: pathTranslation };
|
||||
}
|
||||
});
|
||||
setMenuStructure(newMenuStructure);
|
||||
}, [availableApplications, menuTranslationWLang]);
|
||||
|
||||
useEffect(() => { if (activeFirstLayer) { setExpandedFirstLayer(activeFirstLayer); if (activeSecondLayer) { setExpandedSecondLayer(activeSecondLayer) } } }, [activeFirstLayer, activeSecondLayer]);
|
||||
setMenuStructure(newMenuStructure);
|
||||
setActiveFirstLayer(activeParsedLayer[0]?.key || null);
|
||||
setActiveSecondLayer(activeParsedLayer[1]?.key || null);
|
||||
setActiveThirdLayer(activeParsedLayer[2]?.key || null);
|
||||
}, [availableApplications, lang, activePageUrl]);
|
||||
|
||||
useEffect(() => {
|
||||
if (activeFirstLayer) { setExpandedFirstLayer(activeFirstLayer); if (activeSecondLayer) { setExpandedSecondLayer(activeSecondLayer) } }
|
||||
}, [activeFirstLayer, activeSecondLayer]);
|
||||
|
||||
const handleFirstLayerClick = (key: string) => { if (expandedFirstLayer === key) { setExpandedFirstLayer(null); setExpandedSecondLayer(null) } else { setExpandedFirstLayer(key); setExpandedSecondLayer(null) } };
|
||||
const handleSecondLayerClick = (key: string) => { if (expandedSecondLayer === key) { setExpandedSecondLayer(null) } else { setExpandedSecondLayer(key) } };
|
||||
const renderThirdLayerItems = (firstLayerKey: string, secondLayerKey: string, thirdLayerItems: ThirdLayerItem) => {
|
||||
return Object.entries(thirdLayerItems).map(([thirdLayerKey, itemData]) => {
|
||||
const isActive = activeFirstLayer === firstLayerKey && activeSecondLayer === secondLayerKey && activeThirdLayer === thirdLayerKey;
|
||||
const url = itemData ? itemData.path || '' : '';
|
||||
const translation = itemData ? itemData.translation || [] : [];
|
||||
const url = itemData?.path || '';
|
||||
const translation = itemData?.translation || [];
|
||||
const displayText = translation[2]?.value || thirdLayerKey;
|
||||
return <div key={`${thirdLayerKey}-item`} className="ml-2 my-1"><ThirdLayerDropdown isActive={isActive} innerText={displayText} url={`${prefix}${url}`} /></div>;
|
||||
|
||||
return <div key={`${thirdLayerKey}-item`} className="ml-2 my-1"><ThirdLayerDropdown isActive={isActive} innerText={displayText} url={`${prefix || ''}${url}`} /></div>;
|
||||
});
|
||||
};
|
||||
const renderSecondLayerItems = (firstLayerKey: string, secondLayerItems: SecondLayerItems) => {
|
||||
|
|
@ -69,8 +69,9 @@ const MenuItemsSection: FC<MenuItemsSectionProps> = ({ availableApplications, ac
|
|||
const isActive = activeFirstLayer === firstLayerKey && activeSecondLayer === secondLayerKey;
|
||||
const isExpanded = expandedSecondLayer === secondLayerKey;
|
||||
const anyThirdLayerItem = Object.values(thirdLayerItems)[0];
|
||||
const translation = anyThirdLayerItem ? anyThirdLayerItem.translation : [];
|
||||
const translation = anyThirdLayerItem?.translation || [];
|
||||
const displayText = translation[1]?.value || secondLayerKey;
|
||||
|
||||
return (
|
||||
<div key={`${secondLayerKey}-item`} className="ml-2 my-1">
|
||||
<SecondLayerDropdown isActive={isActive} isExpanded={isExpanded} innerText={displayText} onClick={() => handleSecondLayerClick(secondLayerKey)} />
|
||||
|
|
@ -79,14 +80,16 @@ const MenuItemsSection: FC<MenuItemsSectionProps> = ({ availableApplications, ac
|
|||
);
|
||||
});
|
||||
};
|
||||
|
||||
const renderFirstLayerItems = () => {
|
||||
return Object.entries(menuStructure).map(([firstLayerKey, secondLayerItems]) => {
|
||||
const isActive = activeFirstLayer === firstLayerKey;
|
||||
const isExpanded = expandedFirstLayer === firstLayerKey;
|
||||
const anySecondLayer = Object.values(secondLayerItems)[0];
|
||||
const anyThirdLayerItem = anySecondLayer ? Object.values(anySecondLayer)[0] : null;
|
||||
const translation = anyThirdLayerItem ? anyThirdLayerItem.translation : [];
|
||||
const anySecondLayer = Object.values(secondLayerItems)[0] || {};
|
||||
const anyThirdLayerItem = Object.values(anySecondLayer)[0];
|
||||
const translation = anyThirdLayerItem?.translation || [];
|
||||
const displayText = translation[0]?.value || firstLayerKey;
|
||||
|
||||
return (
|
||||
<div key={`${firstLayerKey}-item`} className="mb-2">
|
||||
<FirstLayerDropdown isActive={isActive} isExpanded={isExpanded} innerText={displayText} onClick={() => handleFirstLayerClick(firstLayerKey)} />
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
interface IntrerfaceLayerDropdown {
|
||||
isActive: boolean;
|
||||
innerText: string;
|
||||
onClick: () => void;
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
interface IntrerfaceLayerDropdown {
|
||||
isActive: boolean;
|
||||
innerText: string;
|
||||
onClick: () => void;
|
||||
}
|
||||
|
||||
type TranslationItem = { value: string; key: string };
|
||||
type ThirdLayerItemData = { path: string; translation: TranslationItem[] };
|
||||
type ThirdLayerItem = Record<string, ThirdLayerItemData>;
|
||||
type SecondLayerItems = Record<string, ThirdLayerItem>;
|
||||
type FirstLayerItems = Record<string, SecondLayerItems>;
|
||||
type MenuStructure = FirstLayerItems;
|
||||
|
||||
interface MenuItemsSectionProps {
|
||||
availableApplications: string[];
|
||||
activePageUrl: string;
|
||||
lang: string;
|
||||
prefix?: string;
|
||||
}
|
||||
|
||||
export type {
|
||||
IntrerfaceLayerDropdown,
|
||||
TranslationItem,
|
||||
ThirdLayerItemData,
|
||||
ThirdLayerItem,
|
||||
SecondLayerItems,
|
||||
FirstLayerItems,
|
||||
MenuStructure,
|
||||
MenuItemsSectionProps,
|
||||
};
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
'use client';
|
||||
import { Globe } from "lucide-react";
|
||||
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent } from "@/components/mutual/ui/dropdown-menu";
|
||||
import { Button } from "@/components/mutual/ui/button";
|
||||
import { languageSelectionTranslation } from "@/languages/mutual/languageSelection";
|
||||
|
|
@ -27,7 +28,15 @@ const LanguageSelectionComponent: React.FC<LanguageSelectionComponentProps> = ({
|
|||
<div className="flex items-end justify-end">
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button className="w-48 h-12 text-center text-md">{langGetKey(translations, "title")}</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
className="h-10 w-10 rounded-full border-gray-200 hover:bg-gray-100"
|
||||
title={langGetKey(translations, "title")}
|
||||
>
|
||||
<Globe className="h-5 w-5" />
|
||||
<span className="sr-only">{langGetKey(translations, "title")}</span>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
{languageButtons.map((props, index) => (
|
||||
|
|
|
|||
|
|
@ -20,89 +20,89 @@
|
|||
const menuTranslationTr = {
|
||||
// New menu
|
||||
"/dashboard": [
|
||||
{ value: "Dashboard", key: "dashboard" },
|
||||
{ value: "Dashboard", key: "dashboard" },
|
||||
{ value: "Dashboard", key: "dashboard" },
|
||||
{ value: "Panel", key: "dashboard" },
|
||||
{ value: "Panel", key: "dashboard" },
|
||||
{ value: "Panel", key: "dashboard" },
|
||||
],
|
||||
"/individual": [
|
||||
{ value: "Individual", key: "individual" },
|
||||
{ value: "Individual", key: "individual" },
|
||||
{ value: "Individual", key: "individual" },
|
||||
{ value: "Bireysel", key: "individual" },
|
||||
{ value: "Bireysel", key: "individual" },
|
||||
{ value: "Bireysel", key: "individual" },
|
||||
],
|
||||
"/user": [
|
||||
{ value: "User", key: "user" },
|
||||
{ value: "User", key: "user" },
|
||||
{ value: "User", key: "user" },
|
||||
{ value: "Kullanıcı", key: "user" },
|
||||
{ value: "Kullanıcı", key: "user" },
|
||||
{ value: "Kullanıcı", key: "user" },
|
||||
],
|
||||
"/build": [
|
||||
{ value: "Build", key: "build" },
|
||||
{ value: "Build", key: "build" },
|
||||
{ value: "Build", key: "build" },
|
||||
{ value: "Bina", key: "build" },
|
||||
{ value: "Bina", key: "build" },
|
||||
{ value: "Bina", key: "build" },
|
||||
],
|
||||
"/build/parts": [
|
||||
{ value: "Build", key: "build" },
|
||||
{ value: "Parts", key: "parts" },
|
||||
{ value: "Build", key: "build" },
|
||||
{ value: "Bina", key: "build" },
|
||||
{ value: "Daireler", key: "parts" },
|
||||
{ value: "Daireler", key: "build" },
|
||||
],
|
||||
"/management/budget/actions": [
|
||||
{ value: "Management", key: "management" },
|
||||
{ value: "Budget", key: "budget" },
|
||||
{ value: "Actions", key: "actions" },
|
||||
{ value: "Yönetim", key: "management" },
|
||||
{ value: "Bütçe", key: "budget" },
|
||||
{ value: "Eylemler", key: "actions" },
|
||||
],
|
||||
"/management/budget": [
|
||||
{ value: "Management", key: "management" },
|
||||
{ value: "Budget", key: "budget" },
|
||||
{ value: "Budget", key: "budget" },
|
||||
{ value: "Yönetim", key: "management" },
|
||||
{ value: "Bütçe", key: "budget" },
|
||||
{ value: "Bütçe", key: "budget" },
|
||||
],
|
||||
"/annual/meeting/close": [
|
||||
{ value: "Annual", key: "annual" },
|
||||
{ value: "Meeting", key: "meeting" },
|
||||
{ value: "Close", key: "close" },
|
||||
{ value: "Yıllık", key: "annual" },
|
||||
{ value: "Toplantı", key: "meeting" },
|
||||
{ value: "Kapat", key: "close" },
|
||||
],
|
||||
"/emergency/meeting": [
|
||||
{ value: "Emergency", key: "emergency" },
|
||||
{ value: "Meeting", key: "meeting" },
|
||||
{ value: "Meeting", key: "meeting" },
|
||||
{ value: "Acil", key: "emergency" },
|
||||
{ value: "Toplantı", key: "meeting" },
|
||||
{ value: "Toplantı", key: "meeting" },
|
||||
],
|
||||
"/emergency/meeting/close": [
|
||||
{ value: "Emergency", key: "emergency" },
|
||||
{ value: "Meeting", key: "meeting" },
|
||||
{ value: "Close", key: "close" },
|
||||
{ value: "Acil", key: "emergency" },
|
||||
{ value: "Toplantı", key: "meeting" },
|
||||
{ value: "Kapat", key: "close" },
|
||||
],
|
||||
"/tenant/accounting": [
|
||||
{ value: "Tenant", key: "tenant" },
|
||||
{ value: "Accounting", key: "accounting" },
|
||||
{ value: "Accounting", key: "accounting" },
|
||||
{ value: "Müşteri", key: "tenant" },
|
||||
{ value: "Hesap", key: "accounting" },
|
||||
{ value: "Hesap", key: "accounting" },
|
||||
],
|
||||
"/meeting/participation": [
|
||||
{ value: "Meeting", key: "meeting" },
|
||||
{ value: "Participation", key: "participation" },
|
||||
{ value: "Participation", key: "participation" },
|
||||
{ value: "Toplantı", key: "meeting" },
|
||||
{ value: "Katılım", key: "participation" },
|
||||
{ value: "Katılım", key: "participation" },
|
||||
],
|
||||
"/tenant/messageToBM": [
|
||||
{ value: "Tenant", key: "tenant" },
|
||||
{ value: "Message To BM", key: "messageToBM" },
|
||||
{ value: "Message To BM", key: "messageToBM" },
|
||||
{ value: "Müşteri", key: "tenant" },
|
||||
{ value: "BM Mesajı", key: "messageToBM" },
|
||||
{ value: "BM Mesajı", key: "messageToBM" },
|
||||
],
|
||||
"/tenant/messageToOwner": [
|
||||
{ value: "Tenant", key: "tenant" },
|
||||
{ value: "Message To Owner", key: "messageToOwner" },
|
||||
{ value: "Message To Owner", key: "messageToOwner" },
|
||||
{ value: "Müşteri", key: "tenant" },
|
||||
{ value: "Müdür Mesajı", key: "messageToOwner" },
|
||||
{ value: "Müdür Mesajı", key: "messageToOwner" },
|
||||
],
|
||||
"/management/accounting": [
|
||||
{ value: "Management", key: "management" },
|
||||
{ value: "Accounting", key: "accounting" },
|
||||
{ value: "Accounting", key: "accounting" },
|
||||
{ value: "Yönetim", key: "management" },
|
||||
{ value: "Hesap", key: "accounting" },
|
||||
{ value: "Hesap", key: "accounting" },
|
||||
],
|
||||
"/build/area": [
|
||||
{ value: "Build", key: "build" },
|
||||
{ value: "Area", key: "area" },
|
||||
{ value: "Area", key: "area" },
|
||||
{ value: "Bina", key: "build" },
|
||||
{ value: "Alan", key: "area" },
|
||||
{ value: "Alan", key: "area" },
|
||||
],
|
||||
"/management/budget/status": [
|
||||
{ value: "Management", key: "management" },
|
||||
{ value: "Budget", key: "budget" },
|
||||
{ value: "Status", key: "status" },
|
||||
{ value: "Yönetim", key: "management" },
|
||||
{ value: "Bütçe", key: "budget" },
|
||||
{ value: "Durum", key: "status" },
|
||||
],
|
||||
|
||||
// Early menu
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ const ClientLayout: FC<ClientLayoutProps> = ({ activePageUrl, searchParams }) =>
|
|||
const { configData, isLoading: configLoading, error: configError, refreshConfig, updateConfig } = useConfig();
|
||||
const prefix = "/panel"
|
||||
const mode = (searchParams?.mode as ModeTypes) || 'shortList';
|
||||
console.log("onlineData", onlineData)
|
||||
|
||||
return (
|
||||
<ClientProviders>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,12 @@
|
|||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts",
|
||||
"src/components/custom/menu/types.ts"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue