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