распределил методы апи по папкам
This commit is contained in:
parent
f5f9cac37e
commit
0ca1978c81
@ -1,6 +1,6 @@
|
|||||||
import {createContext, useState, useContext, useEffect} from "react";
|
import {createContext, useState, useContext, useEffect} from "react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import loginUser from "./api/LoginRequest.jsx";
|
import loginUser from "./api/auth/LoginRequest.jsx";
|
||||||
import {Spin} from "antd";
|
import {Spin} from "antd";
|
||||||
|
|
||||||
const AuthContext = createContext(undefined);
|
const AuthContext = createContext(undefined);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import CONFIG from "../core/Config.jsx";
|
import CONFIG from "../../core/Config.jsx";
|
||||||
|
|
||||||
const loginUser = async (loginData) => {
|
const loginUser = async (loginData) => {
|
||||||
try {
|
try {
|
||||||
@ -1,5 +1,5 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import CONFIG from "../core/Config.jsx";
|
import CONFIG from "../../core/Config.jsx";
|
||||||
|
|
||||||
const getAllPatients = async (token) => {
|
const getAllPatients = async (token) => {
|
||||||
|
|
||||||
@ -2,6 +2,7 @@ import {useEffect} from "react";
|
|||||||
import {Modal, Form, Input, DatePicker} from "antd";
|
import {Modal, Form, Input, DatePicker} from "antd";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
import locale from "antd/es/date-picker/locale/ru_RU";
|
||||||
|
|
||||||
const {TextArea} = Input;
|
const {TextArea} = Input;
|
||||||
|
|
||||||
@ -77,7 +78,7 @@ const PatientModal = ({visible, onCancel, onSubmit, patient}) => {
|
|||||||
label="Дата рождения"
|
label="Дата рождения"
|
||||||
rules={[{required: true, message: "Выберите дату рождения"}]}
|
rules={[{required: true, message: "Выберите дату рождения"}]}
|
||||||
>
|
>
|
||||||
<DatePicker style={{width: "100%"}} format="YYYY-MM-DD"/>
|
<DatePicker style={{width: "100%"}} locale={locale} format="DD.MM.YYYY"/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="address"
|
name="address"
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
|
|||||||
import { Input, Select, List, FloatButton, Row, Col, message } from "antd";
|
import { Input, Select, List, FloatButton, Row, Col, message } from "antd";
|
||||||
import { PlusOutlined } from "@ant-design/icons";
|
import { PlusOutlined } from "@ant-design/icons";
|
||||||
import { useAuth } from "../AuthContext.jsx";
|
import { useAuth } from "../AuthContext.jsx";
|
||||||
import getAllPatients from "../api/GetAllPatients.jsx";
|
import getAllPatients from "../api/patients/GetAllPatients.jsx";
|
||||||
import PatientListCard from "../components/PatientListCard.jsx";
|
import PatientListCard from "../components/PatientListCard.jsx";
|
||||||
import PatientModal from "../components/PatientModal.jsx"; // Подключаем модальное окно
|
import PatientModal from "../components/PatientModal.jsx"; // Подключаем модальное окно
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user