system page
parent
58e5f61a97
commit
f08ba0221b
|
@ -61,6 +61,12 @@
|
||||||
"Advanced": "Advanced"
|
"Advanced": "Advanced"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"System": {
|
||||||
|
"Navigation": {
|
||||||
|
"MainServices": "Main services",
|
||||||
|
"Agents": "Agents"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Settings": {
|
"Settings": {
|
||||||
"Navigation": {
|
"Navigation": {
|
||||||
"Appearance": "Appearance",
|
"Appearance": "Appearance",
|
||||||
|
|
|
@ -52,6 +52,12 @@
|
||||||
"Advanced": "Avansat"
|
"Advanced": "Avansat"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"System": {
|
||||||
|
"Navigation": {
|
||||||
|
"MainServices": "Servicii principale",
|
||||||
|
"Agents": "Agenți"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Settings": {
|
"Settings": {
|
||||||
"Navigation": {
|
"Navigation": {
|
||||||
"Appearance": "Aspect",
|
"Appearance": "Aspect",
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React from "react";
|
||||||
import { Route, Switch } from "react-router-dom";
|
import { Route, Switch } from "react-router-dom";
|
||||||
import PageNotFound from "./PageNotFound";
|
import PageNotFound from "./PageNotFound";
|
||||||
import NetworkContainer from "../../features/network/components/NetworkContainer";
|
import NetworkContainer from "../../features/network/components/NetworkContainer";
|
||||||
|
import SystemContainer from "../../features/system/SystemContainer";
|
||||||
import SettingsContainer from "../../features/settings/SettingsContainer";
|
import SettingsContainer from "../../features/settings/SettingsContainer";
|
||||||
import DashboardContainer from "../../features/dashboard/components/DashboardContainer";
|
import DashboardContainer from "../../features/dashboard/components/DashboardContainer";
|
||||||
import UserProfileContainer from "../../features/user/profile/components/UserProfileContainer";
|
import UserProfileContainer from "../../features/user/profile/components/UserProfileContainer";
|
||||||
|
@ -13,6 +14,7 @@ const AppRoutes = () => {
|
||||||
<Route exact path="/dashboard" component={DashboardContainer} />
|
<Route exact path="/dashboard" component={DashboardContainer} />
|
||||||
<Route exact path="/user-profile" component={UserProfileContainer} />
|
<Route exact path="/user-profile" component={UserProfileContainer} />
|
||||||
<Route exact path="/machines" component={NetworkContainer} />
|
<Route exact path="/machines" component={NetworkContainer} />
|
||||||
|
<Route exact path="/system" component={SystemContainer} />
|
||||||
<Route exact path="/settings" component={SettingsContainer} />
|
<Route exact path="/settings" component={SettingsContainer} />
|
||||||
<Route exact path="/about" component={AboutContainer} />
|
<Route exact path="/about" component={AboutContainer} />
|
||||||
<Route component={PageNotFound} />
|
<Route component={PageNotFound} />
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const MainServicesContainer = () => {
|
||||||
|
return <div>MainServices</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MainServicesContainer;
|
|
@ -0,0 +1,49 @@
|
||||||
|
import React, { useState, useMemo } from "react";
|
||||||
|
import CategoryIcon from "@material-ui/icons/Category";
|
||||||
|
import GrainIcon from "@material-ui/icons/Grain";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import PageTitle from "../../components/common/PageTitle";
|
||||||
|
import NavigationButtons from "../../components/common/NavigationButtons";
|
||||||
|
import MainServicesContainer from "./MainServicesContainer";
|
||||||
|
import AgentsContainer from "./agents/AgentsContainer";
|
||||||
|
|
||||||
|
const NavigationTabs = {
|
||||||
|
MAIN_SERVICES: "System.Navigation.MainServices",
|
||||||
|
AGENTS: "System.Navigation.Agents"
|
||||||
|
};
|
||||||
|
|
||||||
|
const tabs = [
|
||||||
|
{
|
||||||
|
code: NavigationTabs.MAIN_SERVICES,
|
||||||
|
icon: CategoryIcon
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: NavigationTabs.AGENTS,
|
||||||
|
icon: GrainIcon
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const SystemContainer = () => {
|
||||||
|
const [tab, setTab] = useState(NavigationTabs.MAIN_SERVICES);
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const navigationTabs = useMemo(
|
||||||
|
() => tabs.map(z => ({ ...z, tooltip: t(z.code) })),
|
||||||
|
[t]
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<PageTitle
|
||||||
|
text={t(tab)}
|
||||||
|
navigation={
|
||||||
|
<NavigationButtons tabs={navigationTabs} onTabChange={setTab} />
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
{tab === NavigationTabs.MAIN_SERVICES && <MainServicesContainer />}
|
||||||
|
{tab === NavigationTabs.AGENTS && <AgentsContainer />}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SystemContainer;
|
|
@ -0,0 +1,7 @@
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const AgentsContainer = () => {
|
||||||
|
return <div>Agents</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default AgentsContainer;
|
Loading…
Reference in New Issue