diff --git a/package-lock.json b/package-lock.json index 798c734..8e70eaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3215,12 +3215,9 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.1.tgz", - "integrity": "sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.4.tgz", + "integrity": "sha512-t3yaEOuGu9NlIZ+hIeGbBjFtZT7j2cb2tg0fuaJKeGotchRjjLfrBA9Kwf8quhpP1EUuxModQg04q/mBwyg8uA==", "engines": { "node": ">=6.9.0" } @@ -20963,11 +20960,6 @@ "node": ">=4" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" - }, "node_modules/regenerator-transform": { "version": "0.15.2", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", diff --git a/src/components/dashboard/logistics/DeliveryTableCard/DeliveryTableCard.tsx b/src/components/dashboard/logistics/DeliveryTableCard/DeliveryTableCard.tsx index 0402dfa..c84f45b 100644 --- a/src/components/dashboard/logistics/DeliveryTableCard/DeliveryTableCard.tsx +++ b/src/components/dashboard/logistics/DeliveryTableCard/DeliveryTableCard.tsx @@ -37,16 +37,21 @@ const BASIC_COLUMNS: ColumnsType = [ // dataIndex: ['Event', 'RuleName'], // key: 'RuleName', // }, + { + title: 'User', + dataIndex: ['Event', 'User'], + key: 'User', + }, { title: 'Time stamp', dataIndex: ['Event', 'EventHeader', 'TimeStamp'], key: 'TimeStamp', }, - { - title: 'Parent user', - dataIndex: ['Event', 'ParentUser'], - key: 'ParentUser', - }, + // { + // title: 'Parent user', + // dataIndex: ['Event', 'ParentUser'], + // key: 'ParentUser', + // }, { title: 'Thread id', dataIndex: ['Event', 'EventHeader', 'ThreadId'], diff --git a/src/layouts/app/App.tsx b/src/layouts/app/App.tsx index 650cd46..dfe9f95 100644 --- a/src/layouts/app/App.tsx +++ b/src/layouts/app/App.tsx @@ -21,6 +21,7 @@ import { QuestionOutlined, SettingOutlined, UserOutlined, + GlobalOutlined, } from '@ant-design/icons'; import { CSSTransition, @@ -33,6 +34,7 @@ import HeaderNav from './HeaderNav.tsx'; import FooterNav from './FooterNav.tsx'; import { NProgress } from '../../components'; import { PATH_LANDING } from '../../constants'; +import { useTranslation } from './TranslationContext.tsx'; const { Content } = Layout; @@ -48,25 +50,26 @@ export const AppLayout = ({ children }: AppLayoutProps) => { const [collapsed, setCollapsed] = useState(true); const [navFill, setNavFill] = useState(false); const [isLoading, setIsLoading] = useState(false); + const { setLanguage, t, loading } = useTranslation(); const location = useLocation(); const navigate = useNavigate(); const nodeRef = useRef(null); const floatBtnRef = useRef(null); - const items: MenuProps['items'] = [ + const menuItems: MenuProps['items'] = [ { key: 'user-profile-link', - label: 'profile', + label: t('Profile'), icon: , }, { key: 'user-settings-link', - label: 'settings', + label: t('Settings'), icon: , }, { key: 'user-help-link', - label: 'help center', + label: t('Help Center'), icon: , }, { @@ -74,13 +77,13 @@ export const AppLayout = ({ children }: AppLayoutProps) => { }, { key: 'user-logout-link', - label: 'logout', + label: t('Logout'), icon: , danger: true, onClick: () => { message.open({ type: 'loading', - content: 'signing you out', + content: t('Signing you out'), }); setTimeout(() => { @@ -106,9 +109,17 @@ export const AppLayout = ({ children }: AppLayoutProps) => { return () => window.removeEventListener('scroll', handleScroll); }, []); + const changeLanguage = (lang: 'en' | 'uz' | 'ru') => { + setLanguage(lang); + }; + + const sidebarTooltip = collapsed + ? t('Expand Sidebar') + : t('Collapse Sidebar'); + return ( <> - + { }} > - +