поменял архитектуру фронт части

This commit is contained in:
Андрей Дувакин 2025-03-29 20:47:27 +05:00
parent 1b7ddc6d8a
commit a1cf2f7c88
74 changed files with 153 additions and 155 deletions

View File

@ -27,6 +27,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<script type="module" src="/src/App/main.jsx"></script>
</body>
</html>

View File

@ -1,5 +1,5 @@
import {createApi, fetchBaseQuery} from "@reduxjs/toolkit/query/react";
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../Core/сonfig.js";
export const lensIssuesApi = createApi({
@ -15,7 +15,7 @@ export const lensIssuesApi = createApi({
tagTypes: ['LensIssues'],
endpoints: (builder) => ({
getLensIssues: builder.query({
query: () => '/lens_issues/',
query: () => '/LensIssues/',
providesTags: ['LensIssues'],
refetchOnMountOrArgChange: 5
}),

View File

@ -1,5 +1,5 @@
import {createApi, fetchBaseQuery} from "@reduxjs/toolkit/query/react";
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../Core/сonfig.js";
export const lensesApi = createApi({
@ -15,7 +15,7 @@ export const lensesApi = createApi({
tagTypes: ['Lens'],
endpoints: (builder) => ({
getLenses: builder.query({
query: () => '/lenses/',
query: () => '/Lenses/',
providesTags: ['Lens'],
refetchOnMountOrArgChange: 5
}),

View File

@ -1,5 +1,5 @@
import {createApi, fetchBaseQuery} from '@reduxjs/toolkit/query/react'
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../Core/сonfig.js";
export const patientsApi = createApi({
reducerPath: 'patientsApi',
@ -14,7 +14,7 @@ export const patientsApi = createApi({
tagTypes: ['Patient'],
endpoints: (builder) => ({
getPatients: builder.query({
query: () => '/patients/',
query: () => '/Patients/',
providesTags: ['Patient'],
refetchOnMountOrArgChange: 5
}),

View File

@ -1,5 +1,5 @@
import {createApi, fetchBaseQuery} from '@reduxjs/toolkit/query/react';
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../Core/сonfig.js";
export const setContentApi = createApi({
reducerPath: 'setContentApi',

View File

@ -1,5 +1,5 @@
import {createApi, fetchBaseQuery} from '@reduxjs/toolkit/query/react'
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../Core/сonfig.js";
export const setsApi = createApi({
reducerPath: 'setsApi',
@ -14,7 +14,7 @@ export const setsApi = createApi({
tagTypes: ['Set'],
endpoints: (builder) => ({
getSets: builder.query({
query: () => '/sets/',
query: () => '/Sets/',
providesTags: ['Set'],
refetchOnMountOrArgChange: 5
}),

View File

@ -1,9 +1,9 @@
import {BrowserRouter as Router} from "react-router-dom";
import AppRouter from "./AppRouter.jsx";
import {AuthProvider} from "./AuthContext.jsx";
import "/src/styles/app.css";
import {AuthProvider} from "../Hooks/AuthContext.jsx";
import "/src/Styles/app.css";
import {Provider} from "react-redux";
import store from "./redux/store";
import store from "../Redux/store.js";
const App = () => (
<Provider store={store}>

View File

@ -0,0 +1,29 @@
import {Routes, Route, Navigate} from "react-router-dom";
import PrivateRoute from "../Components/PrivateRoute.jsx";
import LoginPage from "../Components/Pages/LoginPage.jsx";
import MainLayout from "../Components/Layouts/MainLayout.jsx";
import PatientsPage from "../Components/Pages/PatientsPage/PatientsPage.jsx";
import HomePage from "../Components/Pages/HomePage.jsx";
import LensesLayout from "../Components/Layouts/LensesLayout.jsx";
import IssuesPage from "../Components/Pages/IssuesPage/IssuesPage.jsx";
import AppointmentsLayout from "../Components/Layouts/AppointmentsLayout.jsx";
const AppRouter = () => (
<Routes>
<Route path="/login" element={<LoginPage/>}/>
<Route element={<PrivateRoute/>}>
<Route element={<MainLayout/>}>
<Route path={"/Patients"} element={<PatientsPage/>}/>
<Route path={"/Lenses"} element={<LensesLayout/>}/>
<Route path={"/issues"} element={<IssuesPage/>}/>
<Route path={"/Appointments"} element={<AppointmentsLayout/>}/>
<Route path={"/"} element={<HomePage/>}/>
</Route>
</Route>
<Route path={"*"} element={<Navigate to={"/"}/>}/>
</Routes>
);
export default AppRouter;

View File

@ -1,29 +0,0 @@
import {Routes, Route, Navigate} from "react-router-dom";
import PrivateRoute from "./components/PrivateRoute.jsx";
import LoginPage from "./pages/LoginPage.jsx";
import MainLayout from "./layouts/MainLayout.jsx";
import PatientsPage from "./pages/PatientsPage.jsx";
import HomePage from "./pages/HomePage.jsx";
import LensesLayout from "./layouts/LensesLayout.jsx";
import IssuesPage from "./pages/IssuesPage.jsx";
import AppointmentsLayout from "./layouts/AppointmentsLayout.jsx";
const AppRouter = () => (
<Routes>
<Route path="/login" element={<LoginPage/>}/>
<Route element={<PrivateRoute/>}>
<Route element={<MainLayout/>}>
<Route path={"/patients"} element={<PatientsPage/>}/>
<Route path={"/lenses"} element={<LensesLayout/>}/>
<Route path={"/issues"} element={<IssuesPage/>}/>
<Route path={"/appointments"} element={<AppointmentsLayout/>}/>
<Route path={"/"} element={<HomePage/>}/>
</Route>
</Route>
<Route path={"*"} element={<Navigate to={"/"}/>}/>
</Routes>
);
export default AppRouter;

View File

@ -2,8 +2,8 @@ import {Card, Popconfirm, Tooltip} from "antd";
import PropTypes from "prop-types";
import {DeleteOutlined, EditOutlined, EyeOutlined} from "@ant-design/icons";
import {useState} from "react";
import LensViewModal from "./LensViewModal.jsx";
import {LensPropType} from "../../types/lensPropType.js";
import LensViewModal from "../Widgets/LensViewModal.jsx";
import {LensPropType} from "../../Types/lensPropType.js";
const LensListCard = ({lens, handleEditLens, handleDeleteLens}) => {
const [showModalInfo, setShowModalInfo] = useState(false);

View File

@ -2,8 +2,8 @@ import {Card, Modal, Popconfirm, Tooltip} from "antd";
import PropTypes from "prop-types";
import {DeleteOutlined, EditOutlined, EyeOutlined} from "@ant-design/icons";
import {useState} from "react";
import PatientViewModal from "./PatientViewModal.jsx";
import {PatientPropType} from "../../types/patientPropType.js";
import PatientViewModal from "../Widgets/PatientViewModal.jsx";
import {PatientPropType} from "../../Types/patientPropType.js";
const PatientListCard = ({patient, handleEditPatient, handleDeletePatient}) => {
const [showModalInfo, setShowModalInfo] = useState(false);

View File

@ -1,7 +1,7 @@
import PropTypes from "prop-types";
import {Card, Modal, Popconfirm, Tooltip} from "antd";
import {DeleteOutlined, EditOutlined, PlusOutlined} from "@ant-design/icons";
import {SetPropType} from "../../types/setPropType.js";
import {SetPropType} from "../../Types/setPropType.js";
const SetListCard = ({set, handleEditSet, handleDeleteSet, handleAppendSet}) => {
const deleteSet = () => {

View File

@ -4,13 +4,13 @@ import {Splitter} from "antd";
import {
CalendarOutlined, TableOutlined, MenuFoldOutlined, MenuUnfoldOutlined,
} from "@ant-design/icons";
import AppointmentsCalendarPage from "../pages/appointments_layout/AppointmentsCalendarPage.jsx";
import AppointmentsTablePage from "../pages/appointments_layout/AppointmentsTablePage.jsx";
import getAllAppointments from "../api/appointments/getAllAppointments.js";
import getAllScheduledAppointments from "../api/scheduled_appointments/getAllScheduledAppointments.js";
import {useAuth} from "../AuthContext.jsx";
import LoadingIndicator from "../components/LoadingIndicator.jsx";
import {cacheInfo, getCachedInfo, getCacheTimestamp} from "../utils/cachedInfoUtils.js";
import AppointmentsCalendarPage from "../Pages/AppointmentsCalendarPage.jsx";
import AppointmentsTablePage from "../Pages/AppointmentsTablePage.jsx";
import getAllAppointments from "../../old_api/appointments/getAllAppointments.js";
import getAllScheduledAppointments from "../../old_api/scheduled_appointments/getAllScheduledAppointments.js";
import {useAuth} from "../../Hooks/AuthContext.jsx";
import LoadingIndicator from "../Widgets/LoadingIndicator.jsx";
import {cacheInfo, getCachedInfo, getCacheTimestamp} from "../../Utils/cachedInfoUtils.js";
const {useBreakpoint} = Grid;

View File

@ -1,9 +1,9 @@
import {
Tabs
} from "antd";
import LensesPage from "../pages/lenses_layout/LensesPage.jsx";
import LensesPage from "../Pages/LensesPage/LensesPage.jsx";
import {FolderViewOutlined, SwitcherOutlined} from "@ant-design/icons";
import SetLensesPage from "../pages/lenses_layout/SetLensesPage.jsx";
import SetsPage from "../Pages/SetsPage/SetsPage.jsx";
const items = [
@ -16,7 +16,7 @@ const items = [
{
key: '2',
label: 'Наборы линз',
children: <SetLensesPage/>,
children: <SetsPage/>,
icon: <SwitcherOutlined/>
}
]

View File

@ -11,7 +11,7 @@ import {
LogoutOutlined,
MessageOutlined
} from "@ant-design/icons";
import {useAuth} from "../AuthContext.jsx";
import {useAuth} from "../../Hooks/AuthContext.jsx";
const {Content, Footer, Sider} = Layout;
@ -28,10 +28,10 @@ const MainLayout = () => {
const menuItems = [
getItem("Главная", "/", <HomeOutlined/>),
getItem("Приёмы", "/appointments", <CalendarOutlined/>),
getItem("Приёмы", "/Appointments", <CalendarOutlined/>),
getItem("Выдачи линз", "/issues", <DatabaseOutlined/>),
getItem("Линзы и наборы", "/lenses", <FolderViewOutlined/>),
getItem("Пациенты", "/patients", <TeamOutlined/>),
getItem("Линзы и наборы", "/Lenses", <FolderViewOutlined/>),
getItem("Пациенты", "/Patients", <TeamOutlined/>),
getItem("Рассылки", "/mailing", <MessageOutlined/>),
{type: "divider"},
getItem("Мой профиль", "profile", <UserOutlined/>, [

View File

@ -5,9 +5,9 @@ import 'dayjs/locale/ru';
import locale from 'antd/es/locale/ru_RU';
import updateLocale from 'dayjs/plugin/updateLocale';
import PropTypes, {arrayOf} from "prop-types";
import CalendarCell from "../../components/appointments/CalendarCell.jsx";
import {AppointmentPropType} from "../../types/appointmentPropType.js";
import {ScheduledAppointmentPropType} from "../../types/scheduledAppointmentPropType.js";
import CalendarCell from "../Widgets/CalendarCell.jsx";
import {AppointmentPropType} from "../../Types/appointmentPropType.js";
import {ScheduledAppointmentPropType} from "../../Types/scheduledAppointmentPropType.js";
const {useBreakpoint} = Grid;

View File

@ -1,6 +1,6 @@
import {useAuth} from "../../AuthContext.jsx";
import {useAuth} from "../../Hooks/AuthContext.jsx";
import {useEffect, useState} from "react";
import getAllAppointments from "../../api/appointments/getAllAppointments.js";
import getAllAppointments from "../../old_api/appointments/getAllAppointments.js";
import {notification} from "antd";

View File

@ -13,13 +13,13 @@ import {
Pagination, Result
} from "antd";
import {DatabaseOutlined, PlusOutlined, UnorderedListOutlined} from "@ant-design/icons";
import LensIssueViewModal from "../components/lens_issues/LensIssueViewModal.jsx";
import LensIssueViewModal from "../../Widgets/LensIssueViewModal.jsx";
import dayjs from "dayjs";
import LensIssueFormModal from "../components/lens_issues/LensIssueFormModal.jsx";
import SelectViewMode from "../components/SelectViewMode.jsx";
import LoadingIndicator from "../components/LoadingIndicator.jsx";
import useIssues from "../hooks/data/useIssues.js";
import useIssuesUI from "../hooks/ui/useIssuesUI.js";
import LensIssueFormModal from "../../Widgets/LensIssueFormModal.jsx";
import SelectViewMode from "../../Widgets/SelectViewMode.jsx";
import LoadingIndicator from "../../Widgets/LoadingIndicator.jsx";
import useIssues from "./useIssues.js";
import useIssuesUI from "./useIssuesUI.js";
const {Title} = Typography;
const {useBreakpoint} = Grid;

View File

@ -1,7 +1,7 @@
import {useDispatch, useSelector} from "react-redux";
import {useAddLensIssuesMutation, useGetLensIssuesQuery} from "../../redux/services/lensIssuesApi.js";
import {useAddLensIssuesMutation, useGetLensIssuesQuery} from "../../../Api/lensIssuesApi.js";
import {notification} from "antd";
import {closeModal} from "../../redux/slices/lensIssuesSlice.js";
import {closeModal} from "../../../Redux/Slices/lensIssuesSlice.js";
const useIssues = () => {

View File

@ -1,5 +1,5 @@
import {useDispatch, useSelector} from "react-redux";
import {getCachedInfo} from "../../utils/cachedInfoUtils.js";
import {getCachedInfo} from "../../../Utils/cachedInfoUtils.js";
import {
closeModal,
openModal,
@ -10,7 +10,7 @@ import {
setSearchText,
setStartFilterDate,
setViewMode
} from "../../redux/slices/lensIssuesSlice.js";
} from "../../../Redux/Slices/lensIssuesSlice.js";
import {useEffect, useMemo} from "react";
import dayjs from "dayjs";

View File

@ -22,12 +22,12 @@ import {
TableOutlined,
BuildOutlined
} from "@ant-design/icons";
import LensCard from "../../components/lenses/LensListCard.jsx";
import LensFormModal from "../../components/lenses/LensFormModal.jsx";
import SelectViewMode from "../../components/SelectViewMode.jsx";
import LoadingIndicator from "../../components/LoadingIndicator.jsx";
import useLenses from "../../hooks/data/useLenses.js";
import useLensesUI from "../../hooks/ui/useLensesUI.js";
import LensCard from "../../Dummies/LensListCard.jsx";
import LensFormModal from "../../Widgets/LensFormModal.jsx";
import SelectViewMode from "../../Widgets/SelectViewMode.jsx";
import LoadingIndicator from "../../Widgets/LoadingIndicator.jsx";
import useLenses from "./useLenses.js";
import useLensesUI from "./useLensesUI.js";
const {Option} = Select;
const {useBreakpoint} = Grid;

View File

@ -4,9 +4,9 @@ import {
useDeleteLensMutation,
useGetLensesQuery,
useUpdateLensMutation
} from "../../redux/services/lensesApi.js";
} from "../../../Api/lensesApi.js";
import {notification} from "antd";
import {closeModal} from "../../redux/slices/lensesSlice.js";
import {closeModal} from "../../../Redux/Slices/lensesSlice.js";
const useLenses = () => {

View File

@ -1,5 +1,5 @@
import {useEffect} from "react";
import {getCachedInfo} from "../../utils/cachedInfoUtils.js";
import {getCachedInfo} from "../../../Utils/cachedInfoUtils.js";
import {
closeModal,
openModal,
@ -7,7 +7,7 @@ import {
setSearchParams,
setSearchText, setShowAdvancedSearch,
setViewMode
} from "../../redux/slices/lensesSlice.js";
} from "../../../Redux/Slices/lensesSlice.js";
import {useDispatch, useSelector} from "react-redux";

View File

@ -1,6 +1,6 @@
import {Form, Input, Button, Row, Col, Typography} from 'antd';
import {useEffect, useState} from 'react';
import {useAuth} from "../AuthContext.jsx";
import {useAuth} from "../../Hooks/AuthContext.jsx";
import {useNavigate} from "react-router-dom";
const {Title} = Typography;

View File

@ -18,12 +18,12 @@ import {
SortDescendingOutlined, TableOutlined,
TeamOutlined
} from "@ant-design/icons";
import PatientListCard from "../components/patients/PatientListCard.jsx";
import PatientFormModal from "../components/patients/PatientFormModal.jsx";
import SelectViewMode from "../components/SelectViewMode.jsx";
import LoadingIndicator from "../components/LoadingIndicator.jsx";
import usePatients from "../hooks/data/usePatients.js";
import usePatientsUI from "../hooks/ui/usePatientsUI.js";
import PatientListCard from "../../Dummies/PatientListCard.jsx";
import PatientFormModal from "../../Widgets/PatientFormModal.jsx";
import SelectViewMode from "../../Widgets/SelectViewMode.jsx";
import LoadingIndicator from "../../Widgets/LoadingIndicator.jsx";
import usePatients from "./usePatients.js";
import usePatientsUI from "./usePatientsUI.js";
const {Option} = Select;
const {Title} = Typography;
@ -195,6 +195,5 @@ const PatientsPage = () => {
</div>
);
};
;
export default PatientsPage;
export default PatientsPage;

View File

@ -5,8 +5,8 @@ import {
useDeletePatientMutation,
useGetPatientsQuery,
useUpdatePatientMutation
} from "../../redux/services/patientsApi.js";
import {closeModal} from "../../redux/slices/patientsSlice.js";
} from "../../../Api/patientsApi.js";
import {closeModal} from "../../../Redux/Slices/patientsSlice.js";
const usePatients = () => {
const dispatch = useDispatch();

View File

@ -9,8 +9,8 @@ import {
setSearchText,
setSortOrder,
setViewMode
} from "../../redux/slices/patientsSlice.js";
import { getCachedInfo } from "../../utils/cachedInfoUtils.js";
} from "../../../Redux/Slices/patientsSlice.js";
import { getCachedInfo } from "../../../Utils/cachedInfoUtils.js";
const usePatientsUI = (patients) => {
const dispatch = useDispatch();

View File

@ -1,15 +1,15 @@
import {FloatButton, Input, List, Result, Row, Typography} from "antd";
import {PlusOutlined, SwitcherOutlined} from "@ant-design/icons";
import SetListCard from "../../components/sets/SetListCard.jsx";
import SetFormModal from "../../components/sets/SetFormModal.jsx";
import LoadingIndicator from "../../components/LoadingIndicator.jsx";
import useSets from "../../hooks/data/useSets.js";
import useSetsUI from "../../hooks/ui/useSetsUI.js";
import SetListCard from "../../Dummies/SetListCard.jsx";
import SetFormModal from "../../Widgets/SetFormModal.jsx";
import LoadingIndicator from "../../Widgets/LoadingIndicator.jsx";
import useSets from "./useSets.js";
import useSetsUI from "./useSetsUI.js";
const {Title} = Typography;
const SetLensesPage = () => {
const SetsPage = () => {
const setsData = useSets();
const setsUI = useSetsUI(setsData.sets);
@ -78,4 +78,4 @@ const SetLensesPage = () => {
);
};
export default SetLensesPage;
export default SetsPage;

View File

@ -5,9 +5,9 @@ import {
useDeleteSetMutation,
useGetSetsQuery,
useUpdateSetMutation
} from "../../redux/services/setsApi.js";
import {closeModal} from "../../redux/slices/setsSlice.js";
import {useAddSetContentMutation, useUpdateSetContentMutation} from "../../redux/services/setContentApi.js";
} from "../../../Api/setsApi.js";
import {closeModal} from "../../../Redux/Slices/setsSlice.js";
import {useAddSetContentMutation, useUpdateSetContentMutation} from "../../../Api/setContentApi.js";
const useSets = () => {

View File

@ -7,7 +7,7 @@ import {
setCurrentPage,
setPageSize,
setSearchText
} from "../../redux/slices/setsSlice.js";
} from "../../../Redux/Slices/setsSlice.js";
const useSetsUI = (sets) => {

View File

@ -1,5 +1,5 @@
import {Navigate, Outlet} from "react-router-dom";
import {useAuth} from "../AuthContext.jsx";
import {useAuth} from "../Hooks/AuthContext.jsx";
const PrivateRoute = () => {
const {user} = useAuth();

View File

@ -1,6 +1,6 @@
import PropTypes from "prop-types";
import {AppointmentPropType} from "../../types/appointmentPropType.js";
import {ScheduledAppointmentPropType} from "../../types/scheduledAppointmentPropType.js";
import {AppointmentPropType} from "../../Types/appointmentPropType.js";
import {ScheduledAppointmentPropType} from "../../Types/scheduledAppointmentPropType.js";
import {Modal} from "antd";

View File

@ -2,8 +2,8 @@ import {useEffect, useRef, useState} from "react";
import {Badge, Col, Tag, Tooltip, Typography} from "antd";
import dayjs from "dayjs";
import PropTypes from "prop-types";
import {AppointmentPropType} from "../../types/appointmentPropType.js";
import {ScheduledAppointmentPropType} from "../../types/scheduledAppointmentPropType.js";
import {AppointmentPropType} from "../../Types/appointmentPropType.js";
import {ScheduledAppointmentPropType} from "../../Types/scheduledAppointmentPropType.js";
const CalendarCell = ({appointments, scheduledAppointments, onCellClick, onItemClick}) => {

View File

@ -1,9 +1,9 @@
import {Col, Form, InputNumber, Modal, notification, Row, Select} from "antd";
import {useEffect, useState} from "react";
import PropTypes from "prop-types";
import getAllLensTypes from "../../api/lens_types/getAllLensTypes.js";
import {useAuth} from "../../AuthContext.jsx";
import {LensPropType} from "../../types/lensPropType.js";
import getAllLensTypes from "../../old_api/lens_types/getAllLensTypes.js";
import {useAuth} from "../../Hooks/AuthContext.jsx";
import {LensPropType} from "../../Types/lensPropType.js";
const LensFormModal = ({visible, onCancel, onSubmit, lens}) => {

View File

@ -3,10 +3,10 @@ import {
Modal, Input, Button, notification, Typography, Collapse, Steps, Row, Alert, Col, DatePicker, Spin, Grid
} from "antd";
import PropTypes from "prop-types";
import getAllPatients from "../../api/patients/getAllPatients.js";
import {useAuth} from "../../AuthContext.jsx";
import getAllPatients from "../../old_api/patients/getAllPatients.js";
import {useAuth} from "../../Hooks/AuthContext.jsx";
import dayjs from "dayjs";
import getNotIssuedLenses from "../../api/lenses/getNotIssuedLenses.js";
import getNotIssuedLenses from "../../old_api/lenses/getNotIssuedLenses.js";
const {useBreakpoint} = Grid;

View File

@ -1,6 +1,6 @@
import {Collapse, Modal} from "antd";
import PropTypes from "prop-types";
import {LensIssuePropType} from "../../types/lensIssuePropType.js";
import {LensIssuePropType} from "../../Types/lensIssuePropType.js";
const LensIssueViewModal = ({visible, onCancel, lensIssue}) => {

View File

@ -1,6 +1,6 @@
import {Button, Col, Modal, Row, Typography} from "antd";
import PropTypes from "prop-types";
import {LensPropType} from "../../types/lensPropType.js";
import {LensPropType} from "../../Types/lensPropType.js";
const {Text, Title} = Typography;

View File

@ -5,7 +5,7 @@ import locale from "antd/es/date-picker/locale/ru_RU";
import validator from "validator";
import {MaskedInput} from "antd-mask-input";
import dayjs from "dayjs";
import {PatientPropType} from "../../types/patientPropType.js";
import {PatientPropType} from "../../Types/patientPropType.js";
const {TextArea} = Input;

View File

@ -1,6 +1,6 @@
import {Button, Col, Modal, Row, Typography, Divider} from "antd";
import PropTypes from "prop-types";
import {PatientPropType} from "../../types/patientPropType.js";
import {PatientPropType} from "../../Types/patientPropType.js";
const { Text, Title } = Typography;

View File

@ -1,8 +1,8 @@
import {BuildOutlined, TableOutlined} from "@ant-design/icons";
import {Select, Tooltip} from "antd";
import PropTypes from "prop-types";
import {cacheInfo} from "../utils/cachedInfoUtils.js";
import {ViewModPropType} from "../types/viewModPropType.js";
import {cacheInfo} from "../../Utils/cachedInfoUtils.js";
import {ViewModPropType} from "../../Types/viewModPropType.js";
const {Option} = Select;

View File

@ -1,11 +1,11 @@
import {useState, useEffect} from "react";
import {Modal, Button, Form, Input, Table, InputNumber, Select, Space, notification} from "antd";
import {PlusOutlined, DeleteOutlined} from "@ant-design/icons";
import getAllLensTypes from "../../api/lens_types/getAllLensTypes.js";
import {useAuth} from "../../AuthContext.jsx";
import getAllLensTypes from "../../old_api/lens_types/getAllLensTypes.js";
import {useAuth} from "../../Hooks/AuthContext.jsx";
import PropTypes from "prop-types";
import getSetContentBySetId from "../../api/set_content/getSetContentBySetId.js";
import {SetPropType} from "../../types/setPropType.js";
import getSetContentBySetId from "../../old_api/set_content/getSetContentBySetId.js";
import {SetPropType} from "../../Types/setPropType.js";
const {Option} = Select;

View File

@ -1,9 +1,9 @@
import {createContext, useState, useContext, useEffect} from "react";
import PropTypes from "prop-types";
import loginUser from "./api/auth/loginRequest.js";
import loginUser from "../old_api/auth/loginRequest.js";
import {Spin} from "antd";
import {useNavigate} from "react-router-dom";
import createApi from "./core/axiosConfig.js";
import createApi from "../Core/axiosConfig.js";
const AuthContext = createContext(undefined);

View File

@ -1,6 +1,5 @@
import {createSlice} from "@reduxjs/toolkit";
import {cacheInfo} from "../../utils/cachedInfoUtils.js";
import dayjs from "dayjs";
import {cacheInfo} from "../../Utils/cachedInfoUtils.js";
const initialState = {
searchText: '',

View File

@ -1,5 +1,5 @@
import {createSlice} from '@reduxjs/toolkit'
import {cacheInfo} from "../../utils/cachedInfoUtils.js";
import {cacheInfo} from "../../Utils/cachedInfoUtils.js";
const initialState = {

View File

@ -1,5 +1,5 @@
import {createSlice} from '@reduxjs/toolkit'
import {cacheInfo} from "../../utils/cachedInfoUtils.js";
import {cacheInfo} from "../../Utils/cachedInfoUtils.js";
const initialState = {
searchText: '',

View File

@ -1,13 +1,13 @@
import {configureStore} from '@reduxjs/toolkit';
import {patientsApi} from './services/patientsApi.js';
import patientsUIReducer from './slices/patientsSlice.js';
import {lensesApi} from './services/lensesApi.js';
import lensesUIReducer from './slices/lensesSlice.js';
import {setsApi} from "./services/setsApi.js";
import setsUIReducer from './slices/setsSlice.js';
import {setContentApi} from "./services/setContentApi.js";
import {lensIssuesApi} from "./services/lensIssuesApi.js";
import lensIssuesReducer from "./slices/lensIssuesSlice.js";
import {patientsApi} from '../Api/patientsApi.js';
import patientsUIReducer from './Slices/patientsSlice.js';
import {lensesApi} from '../Api/lensesApi.js';
import lensesUIReducer from './Slices/lensesSlice.js';
import {setsApi} from "../Api/setsApi.js";
import setsUIReducer from './Slices/setsSlice.js';
import {setContentApi} from "../Api/setContentApi.js";
import {lensIssuesApi} from "../Api/lensIssuesApi.js";
import lensIssuesReducer from "./Slices/lensIssuesSlice.js";
export const store = configureStore({
reducer: {

View File

@ -1,4 +1,4 @@
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../../Core/сonfig.js";
const getAllAppointments = async (api) => {
const response = await api.get(`${CONFIG.BASE_URL}/appointments/`);

View File

@ -1,4 +1,4 @@
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../../Core/сonfig.js";
const loginUser = async (loginData, api) => {
const response = await api.post(`${CONFIG.BASE_URL}/login/`, loginData, {

View File

@ -1,4 +1,4 @@
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../../Core/сonfig.js";
const AddLensIssue = async (api, lens_issue) => {
const response = await api.post(`${CONFIG.BASE_URL}/lens_issues/`, lens_issue);

View File

@ -1,4 +1,4 @@
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../../Core/сonfig.js";
const GetAllLensIssues = async (api) => {
const response = await api.get(`${CONFIG.BASE_URL}/lens_issues/`);

View File

@ -1,4 +1,4 @@
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../../Core/сonfig.js";
const getAllLensTypes = async (api) => {
const response = await api.get(`${CONFIG.BASE_URL}/lens_types/`);

View File

@ -1,4 +1,4 @@
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../../Core/сonfig.js";
const getNotIssuedLenses = async (api) => {
const response = await api.get(`${CONFIG.BASE_URL}/lenses/not_issued/`);

View File

@ -1,4 +1,4 @@
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../../Core/сonfig.js";
const getAllPatients = async (api) => {
const response = await api.get(`${CONFIG.BASE_URL}/patients/`);

View File

@ -1,4 +1,4 @@
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../../Core/сonfig.js";
const getAllScheduledAppointments = async (api) => {
const response = await api.get(`${CONFIG.BASE_URL}/scheduled_appointments/`);

View File

@ -1,4 +1,4 @@
import CONFIG from "../../core/сonfig.js";
import CONFIG from "../../Core/сonfig.js";
const getSetContentBySetId = async (api, set_id) => {
const response = await api.get(`${CONFIG.BASE_URL}/set_content/${set_id}/`);