import { Input, Select, List, FloatButton, Row, Col, Table, Button, Popconfirm, Typography, Result, Tooltip } from "antd"; import { BuildOutlined, PlusOutlined, SortAscendingOutlined, SortDescendingOutlined, TableOutlined, TeamOutlined, } from "@ant-design/icons"; import PatientListCard from "../../Dummies/PatientListCard.jsx"; import PatientFormModal from "../../Dummies/PatientFormModal/PatientFormModal.jsx"; import SelectViewMode from "../../Widgets/SelectViewMode/SelectViewMode.jsx"; import LoadingIndicator from "../../Widgets/LoadingIndicator/LoadingIndicator.jsx"; import usePatients from "./usePatients.js"; const {Option} = Select; const {Title} = Typography; const PatientsPage = () => { const patientsData = usePatients(); const columns = [ { title: "Фамилия", dataIndex: "last_name", key: "last_name", sorter: true, }, { title: "Имя", dataIndex: "first_name", key: "first_name", sorter: true, }, { title: "Отчество", dataIndex: "patronymic", key: "patronymic", sorter: true, }, { title: "Дата рождения", dataIndex: "birthday", sorter: true, render: patientsData.formatDate, }, { title: "Телефон", dataIndex: "phone", }, { title: "Email", dataIndex: "email", }, { title: "Действия", fixed: 'right', render: (_, record) => ( patientsData.handleEditPatient(record)}>Изменить patientsData.handleDeletePatient(record.id)} okText="Да, удалить" cancelText="Отмена" > Удалить ), }, ]; const viewModes = [ { value: "tile", label: "Плитка", icon: }, { value: "table", label: "Таблица", icon: } ]; if (patientsData.isError) return ( ); return ( Пациенты patientsData.handleSetSearchText(e.target.value)} onPressEnter={patientsData.handleSearch} style={patientsData.formItemStyle} allowClear onClear={patientsData.handleClearSearch} /> {patientsData.viewMode === "tile" && ( А-Я Я-А )} {patientsData.isLoading ? : patientsData.viewMode === "tile" ? ( ( )} pagination={patientsData.pagination} /> ) : ( )} } type="primary" onClick={patientsData.handleAddPatient} tooltip="Добавить пациента" /> ); }; export default PatientsPage;