doing add organization page

parent be716b77
Pipeline #400 canceled with stages
This diff is collapsed.
......@@ -10,7 +10,9 @@
"preview": "vite preview"
},
"dependencies": {
"@ant-design/icons": "^5.4.0",
"@types/react-router-dom": "^5.3.3",
"antd": "^5.19.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^6.25.1",
......
......@@ -2,6 +2,7 @@ import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import AuthPage from './pages/AuthPage';
import HomePage from './pages/HomePage';
import AddPage from './pages/AddPage';
import './App.css'
const App: React.FC = () => {
......@@ -10,6 +11,7 @@ const App: React.FC = () => {
<Routes>
<Route path="/auth" element={<AuthPage />} />
<Route path="/" element={<HomePage />} />
<Route path="/add" element={<AddPage />} />
</Routes>
</BrowserRouter>
);
......
import { useNavigate } from 'react-router';
import '../../styles/Home/home.css';
import add from "/public/section_add.png";
import add from "/section_add.png";
const Home = () => {
const navigate = useNavigate();
......
import React from 'react';
import Header from '../components/HomePage/Header';
import { Form, Input, Button } from 'antd';
import "../../src/styles/Home/addPage.css";
const { Item } = Form;
const AddPage: React.FC = () => {
return (
<div className='container'>
<Header />
<Form
layout="vertical"
name="organization_form"
initialValues={{ remember: true }}
// onFinish={(values) => console.log(values)}
className='form'
>
<Item
label="БИН организации"
name="bin"
rules={[{ required: true, message: 'Пожалуйста, введите БИН организации!' }]}
>
<Input maxLength={128} placeholder="Максимальная длина: 128 символов" />
</Item>
<Item
label="Код организации"
name="code"
rules={[{ required: true, message: 'Пожалуйста, введите код организации!' }]}
>
<Input maxLength={128} placeholder="Максимальная длина: 128 символов" />
</Item>
<Item
label="Наименование организации"
name="name"
rules={[{ required: true, message: 'Пожалуйста, введите наименование организации!' }]}
>
<Input maxLength={128} placeholder="Максимальная длина: 128 символов" />
</Item>
<Item
label="Адрес системы/хост"
name="address"
rules={[{ required: true, message: 'Пожалуйста, введите адрес системы/хост!' }]}
>
<Input maxLength={128} placeholder="Максимальная длина: 128 символов" />
</Item>
<Item
label="Логин"
name="login"
rules={[{ required: true, message: 'Пожалуйста, введите логин!' }]}
>
<Input maxLength={128} placeholder="Максимальная длина: 128 символов" />
</Item>
<Item
label="Пароль"
name="password"
rules={[{ required: true, message: 'Пожалуйста, введите пароль!' }]}
>
<Input.Password maxLength={128} placeholder="Максимальная длина: 128 символов" />
</Item>
<hr />
<Item style={{ textAlign: 'right' }}>
<Button type="default" style={{ marginRight: '8px' }}>
Отмена
</Button>
<Button type="primary" htmlType="submit">
Сохранить
</Button>
</Item>
</Form>
</div>
);
};
export default AddPage;
.form{
margin-left: 20px;
margin-right: 20px;
margin-top: 10px;
}
hr{
margin-top: 120px;
}
\ 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