import { Refine, Authenticated, } from "@refinedev/core"; import { useNotificationProvider, ThemedLayout, ErrorComponent, } from "@refinedev/antd"; import { DashboardOutlined, UserOutlined, SettingOutlined, TeamOutlined, FieldTimeOutlined, ThunderboltOutlined, CopyOutlined, } from "@ant-design/icons"; import routerProvider, { NavigateToResource, CatchAllNavigate, UnsavedChangesNotifier, DocumentTitleHandler, } from "@refinedev/react-router"; import { BrowserRouter, Routes, Route, Outlet } from "react-router"; import { App as AntdApp } from "antd"; import { useTranslation } from "react-i18next"; import "./i18n"; import "@ant-design/v5-patch-for-react-19"; import "@refinedev/antd/dist/reset.css"; import { DashboardPage } from "./pages/dashboard"; import { authProvider, dataProvider, // {NO_CHAT_START} Header, // {NO_CHAT_END} LoginPage, KeycloakLoginPage, AuthCallback, ApplicationUserList, ApplicationUserCreate, ApplicationUserEdit, RoleList, RoleCreate, RoleEdit, ColorModeContextProvider, BackgroundJobList, TriggerRuleList, TriggerRuleCreate, TriggerRuleEdit, TriggerLogList, MirrorTypeMappingConfigList, MirrorTypeMappingConfigCreate, MirrorTypeMappingConfigEdit, CustomSider, } from "@cundi/refine-xaf"; import { accessControlProvider } from "./accessControlProvider"; // {CHAT_START} import { ChatProvider } from "./components/ChatPanel"; import { HeaderWithChat } from "./components/HeaderWithChat"; // {CHAT_END} const API_URL = import.meta.env.VITE_API_URL + "/api/odata"; const InnerApp: React.FC = () => { const { t, i18n } = useTranslation(); const i18nProvider = { translate: (key: string, params: any) => t(key, params) as string, changeLocale: (lang: string) => i18n.changeLanguage(lang), getLocale: () => i18n.language, }; return ( , }, }, { name: "ApplicationUser", list: "/ApplicationUsers", create: "/ApplicationUsers/create", edit: "/ApplicationUsers/edit/:id", meta: { label: t("sider.users"), icon: , parent: "Settings", }, }, { name: "PermissionPolicyRole", list: "/PermissionPolicyRoles", create: "/PermissionPolicyRoles/create", edit: "/PermissionPolicyRoles/edit/:id", meta: { label: t("sider.roles"), parent: "Settings", icon: , }, }, { name: "BackgroundJobs", list: "/background-jobs", meta: { label: t("sider.backgroundJobs"), icon: , parent: "Settings", }, }, { name: "TriggerRule", list: "/TriggerRules", create: "/TriggerRules/create", edit: "/TriggerRules/edit/:id", meta: { label: t("sider.triggerRules"), parent: "Settings", icon: , }, }, { name: "TriggerLog", list: "/TriggerLogs", meta: { label: t("sider.triggerLogs"), parent: "Settings", icon: , }, }, { name: "MirrorTypeMappingConfig", list: "/MirrorTypeMappingConfigs", create: "/MirrorTypeMappingConfigs/create", edit: "/MirrorTypeMappingConfigs/edit/:id", meta: { label: t("sider.mirrorConfigs"), parent: "Settings", icon: , }, }, { name: "Settings", meta: { label: t("sider.settings"), icon: , }, }, ]} notificationProvider={useNotificationProvider} options={{ syncWithLocation: true, warnWhenUnsavedChanges: true, }} > } > { /* {CHAT_START} */} { /* {CHAT_END} */} { /* {NO_CHAT_START} {NO_CHAT_END} */ } } > } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> }> } > } /> } /> } /> { /* {CHAT_START} */} { /* {CHAT_END} */} { /* {NO_CHAT_START} {NO_CHAT_END} */ } } > } /> ); }; const App: React.FC = () => { return ( {/* {CHAT_START} */} {/* {CHAT_END} */} {/* {NO_CHAT_START} {NO_CHAT_END} */} ); }; export default App;