Commit 3d69cbab authored by Merekeyev Dias's avatar Merekeyev Dias

added local google icons

parent 83bbda80
......@@ -13,9 +13,9 @@
"@types/react-router-dom": "^5.3.3",
"antd": "^5.19.3",
"dayjs": "^1.11.12",
"material-icons": "^1.13.12",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-material-symbols": "^4.4.0",
"react-redux": "^9.1.2",
"react-router": "^6.25.1",
"react-router-dom": "^6.25.1",
......@@ -2970,6 +2970,11 @@
"yallist": "^3.0.2"
}
},
"node_modules/material-icons": {
"version": "1.13.12",
"resolved": "https://registry.npmjs.org/material-icons/-/material-icons-1.13.12.tgz",
"integrity": "sha512-/2YoaB79IjUK2B2JB+vIXXYGtBfHb/XG66LvoKVM5ykHW7yfrV5SP6d7KLX6iijY6/G9GqwgtPQ/sbhFnOURVA=="
},
"node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
......@@ -3831,18 +3836,6 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
"integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="
},
"node_modules/react-material-symbols": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/react-material-symbols/-/react-material-symbols-4.4.0.tgz",
"integrity": "sha512-KKLocA1Fqdgk70Z78PeY4M8yvqIpnvCmHuniXbF52fPD+CNoPrR5DlECq7UVOgvgTpcOQzY0qgMdpvxuw3Ynvg==",
"engines": {
"node": ">=14.0.0"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"node_modules/react-redux": {
"version": "9.1.2",
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.2.tgz",
......
import React, { useEffect, useState } from 'react';
import { MaterialSymbol } from 'react-material-symbols';
import { Link, useNavigate, useLocation } from 'react-router-dom';
import { Menu, Button, Drawer } from 'antd';
import { useDispatch } from 'react-redux';
......@@ -10,8 +9,8 @@ import './Header.css';
type MenuItem = Required<MenuProps>['items'][number];
const MenuItems: MenuItem[] = [
{ key: 'org', icon: <MaterialSymbol icon='list' size={24} color='#fff' />, label: <Link to="/">Список организаций</Link> },
{ key: 'req', icon: <MaterialSymbol icon='info' size={24} color='#fff' />, label: <Link to="/requests">Информация о запросах</Link> },
{ key: 'org', icon: <span className="material-icons" style={{fontSize: 23}}>list</span>, label: <Link to="/">Список организаций</Link> },
{ key: 'req', icon: <span className='material-icons' style={{fontSize: 23}}>info</span>, label: <Link to="/requests">Информация о запросах</Link> },
];
const Header: React.FC = () => {
......@@ -55,7 +54,7 @@ const Header: React.FC = () => {
setOpenMenu(true);
}}
>
<MaterialSymbol icon='menu' size={24} color='#fff' />
<span className='material-icons' style={{fontSize: 24, color: '#fff'}}>menu</span>
</Button>
<Drawer
open={openMenu}
......@@ -78,7 +77,7 @@ const Header: React.FC = () => {
<h1 className="header_title">ЕСУТД</h1>
</div>
<Button type='text' className="header_logout" onClick={handleLogout}>
<MaterialSymbol icon='logout' size={24} color='#fff' />
<span className='material-icons' style={{fontSize: 24, color: '#fff'}}>logout</span>
</Button>
</header>
);
......
......@@ -5,7 +5,7 @@ import { Provider } from 'react-redux';
import './index.css';
import {store, persistor} from '../src/store/store.ts';
import { PersistGate } from 'redux-persist/integration/react';
import '../node_modules/material-icons/iconfont/material-icons.css'
export type RootState = ReturnType<typeof store.getState>;
ReactDOM.createRoot(document.getElementById('root')!).render(
......
......@@ -130,8 +130,16 @@ export const ActionColumn: React.FC<{ data: DataType }> = ({ data }) => {
return (
<Space>
<Button onClick={handleEditClick}>Изменить</Button>
<Button onClick={showDeleteModal} type="primary" danger>Удалить</Button>
<Button
onClick={handleEditClick}
icon={<span className='material-icons' style={{fontSize: 20, color: '#0E2B52'}}>visibility</span>}
type='text'
/>
<Button
onClick={showDeleteModal}
icon={<span className='material-icons' style={{fontSize: 20, color: '#0E2B52'}}>delete</span>}
type='text'
/>
<Modal
open={open}
title={`Вы уверены, что хотите удалить ${data.name}?`}
......
......@@ -101,6 +101,7 @@ const HomePage: React.FC = () => {
<Button
className='add_title'
onClick={handleAddClick}
icon={<span className='material-icons' style={{fontSize: 20, color: '#0E2B52'}}>add_circle</span>}
>
Добавить
</Button>
......@@ -109,6 +110,7 @@ const HomePage: React.FC = () => {
onClick={handleSyncClick}
disabled={syncBtnState}
loading={isSyncLoading}
icon={<span className='material-icons' style={{fontSize: 22, color: '#0E2B52'}}>sync</span>}
type='primary'
>
Синхронизировать справочники
......
......@@ -10,7 +10,7 @@ export const getStatusText = (status: number) => {
export const getStatusColor = (status: number) => {
switch (status) {
case 0: return 'red';
case 1: return 'orange';
case 1: return 'blue';
case 2: return 'green';
default: return 'grey';
}
......
......@@ -88,7 +88,9 @@ export const columns: TableProps<DataType>['columns'] = [
width: 60,
render: (_, record) => {
return (
<ResendColumn data={record} />
<ResendColumn
data={record}
/>
)
}
}
......@@ -116,8 +118,12 @@ export const ResendColumn: React.FC<{ data: DataType }> = ({ data }) => {
};
return (
<Space>
<Button onClick={showResendModal}>Переотправить</Button>
<div style={{textAlign: 'center'}}>
<Button
onClick={showResendModal}
icon={<span className='material-icons' style={{fontSize: 20, color: '#0E2B52'}}>mail</span>}
type='text'
/>
<Modal
open={open}
title={`Вы уверены, что хотите переотправить запрос с id ${data.id}?`}
......@@ -126,6 +132,6 @@ export const ResendColumn: React.FC<{ data: DataType }> = ({ data }) => {
>
<p>Подтвердите переотправку запроса.</p>
</Modal>
</Space>
</div>
)
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment