распределил методы апи по папкам

This commit is contained in:
Андрей Дувакин 2025-02-10 19:28:48 +05:00
parent f5f9cac37e
commit 0ca1978c81
5 changed files with 6 additions and 5 deletions

View File

@ -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);

View File

@ -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 {

View File

@ -1,5 +1,5 @@
import axios from "axios";
import CONFIG from "../core/Config.jsx";
import CONFIG from "../../core/Config.jsx";
const getAllPatients = async (token) => {

View File

@ -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"

View File

@ -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"; // Подключаем модальное окно