diff --git a/web-app/src/hooks/ui/useIssuesUI.js b/web-app/src/hooks/ui/useIssuesUI.js index 3cc5b97..e79a796 100644 --- a/web-app/src/hooks/ui/useIssuesUI.js +++ b/web-app/src/hooks/ui/useIssuesUI.js @@ -39,6 +39,16 @@ const useIssuesUI = (issues) => { const filterDates = [startFilterDateConverted, endFilterDateConverted]; const isFilterDates = startFilterDate && endFilterDate; + const containerStyle = { padding: 20 }; + const filterBarStyle = { marginBottom: 20 }; + const formItemStyle = { width: "100%" }; + const viewModIconStyle = { marginRight: 8 }; + const advancedSearchCardStyle = { + marginBottom: 20, + boxShadow: "0 1px 6px rgba(0, 0, 0, 0.15)", + borderRadius: 8 + }; + const handleSetSearchText = (value) => dispatch(setSearchText(value)); const handleSetViewMode = (mode) => dispatch(setViewMode(mode)); const handleSetCurrentPage = (page) => dispatch(setCurrentPage(page)); @@ -114,6 +124,11 @@ const useIssuesUI = (issues) => { pageSize, filterDates, isFilterDates, + containerStyle, + filterBarStyle, + formItemStyle, + viewModIconStyle, + advancedSearchCardStyle, handleAddIssue, handlePaginationChange, handleSetSearchText, diff --git a/web-app/src/hooks/ui/useLensesUI.js b/web-app/src/hooks/ui/useLensesUI.js index d57cb9d..510ecd5 100644 --- a/web-app/src/hooks/ui/useLensesUI.js +++ b/web-app/src/hooks/ui/useLensesUI.js @@ -33,6 +33,8 @@ const useLensesUI = (lenses) => { const containerStyle = { padding: 20 }; const filterBarStyle = { marginBottom: 20 }; const formItemStyle = { width: "100%" }; + const viewModIconStyle = { marginRight: 8 }; + const tableActionButtonsStyle = {display: "flex", gap: "8px"}; const handleSetSearchText = (value) => dispatch(setSearchText(value)); const handleCloseModal = () => dispatch(closeModal()); @@ -108,6 +110,8 @@ const useLensesUI = (lenses) => { containerStyle, filterBarStyle, formItemStyle, + viewModIconStyle, + tableActionButtonsStyle, filteredLenses: filteredLenses.map(lens => ({...lens, key: lens.id})), handleSetSearchText, handleAddLens, diff --git a/web-app/src/hooks/ui/usePatientsUI.js b/web-app/src/hooks/ui/usePatientsUI.js index 8077c01..dcfdc6a 100644 --- a/web-app/src/hooks/ui/usePatientsUI.js +++ b/web-app/src/hooks/ui/usePatientsUI.js @@ -33,6 +33,7 @@ const usePatientsUI = (patients) => { const containerStyle = { padding: 20 }; const filterBarStyle = { marginBottom: 20 }; const formItemStyle = { width: "100%" }; + const viewModIconStyle = { marginRight: 8 }; const handleSetSearchText = (value) => dispatch(setSearchText(value)); const handleSetSortOrder = (value) => dispatch(setSortOrder(value)); @@ -93,6 +94,7 @@ const usePatientsUI = (patients) => { containerStyle, filterBarStyle, formItemStyle, + viewModIconStyle, pagination, filteredPatients: filteredPatients.map(p => ({ ...p, key: p.id })), handleSetSearchText, diff --git a/web-app/src/pages/IssuesPage.jsx b/web-app/src/pages/IssuesPage.jsx index 5a48499..5b6d791 100644 --- a/web-app/src/pages/IssuesPage.jsx +++ b/web-app/src/pages/IssuesPage.jsx @@ -10,7 +10,7 @@ import { Typography, Timeline, Grid, - Pagination + Pagination, Result } from "antd"; import {DatabaseOutlined, PlusOutlined, UnorderedListOutlined} from "@ant-design/icons"; import LensIssueViewModal from "../components/lens_issues/LensIssueViewModal.jsx"; @@ -34,12 +34,12 @@ const IssuesPage = () => { { value: "table", label: "Таблица", - icon: , + icon: , }, { value: "timeline", label: "Лента", - icon: , + icon: , }, ]; @@ -144,15 +144,23 @@ const IssuesPage = () => { ); }; + if (issuesData.isError) return ( + + ); + return ( -
+
<DatabaseOutlined/> Выдача линз - + issuesUI.handleSetSearchText(e.target.value)} - style={{width: "100%"}} + style={issuesUI.formItemStyle} allowClear /> @@ -169,7 +177,7 @@ const IssuesPage = () => { > { { value: "tile", label: "Плитка", - icon: + icon: }, { value: "table", label: "Таблица", - icon: + icon: } ]; diff --git a/web-app/src/pages/lenses_layout/LensesPage.jsx b/web-app/src/pages/lenses_layout/LensesPage.jsx index af68ff7..d0b8000 100644 --- a/web-app/src/pages/lenses_layout/LensesPage.jsx +++ b/web-app/src/pages/lenses_layout/LensesPage.jsx @@ -43,12 +43,12 @@ const LensesPage = () => { { value: "tile", label: "Плитка", - icon: + icon: }, { value: "table", label: "Таблица", - icon: + icon: } ]; @@ -115,7 +115,7 @@ const LensesPage = () => { key: "actions", fixed: 'right', render: (text, record) => ( -
+
{ ); return ( -
+
<FolderViewOutlined/> Линзы - + lensesUI.handleSetSearchText(e.target.value)} - style={{width: "100%"}} + style={lensesUI.formItemStyle} allowClear /> @@ -175,11 +175,7 @@ const LensesPage = () => { {lensesUI.showAdvancedSearch && ( @@ -188,7 +184,7 @@ const LensesPage = () => { lensesUI.handleParamChange("tor", value)} - style={{width: "100%"}} + style={lensesUI.formItemStyle} defaultValue={0} step={0.1} /> @@ -198,7 +194,7 @@ const LensesPage = () => { lensesUI.handleParamChange("diameter", value)} - style={{width: "100%"}} + style={lensesUI.formItemStyle} defaultValue={0} step={0.1} /> @@ -208,7 +204,7 @@ const LensesPage = () => { lensesUI.handleParamChange("preset_refraction", value)} - style={{width: "100%"}} + style={lensesUI.formItemStyle} defaultValue={0} step={0.1} /> @@ -218,7 +214,7 @@ const LensesPage = () => { lensesUI.handleParamChange("periphery_toricity", value)} - style={{width: "100%"}} + style={lensesUI.formItemStyle} defaultValue={0} step={0.1} /> @@ -232,7 +228,7 @@ const LensesPage = () => { lensesUI.handleParamChange("issued", value)} - style={{width: "100%"}} + style={lensesUI.formItemStyle} > @@ -256,7 +252,7 @@ const LensesPage = () => { lensesUI.handleParamChange("trial", value)} - style={{width: "100%"}} + style={lensesUI.formItemStyle} defaultValue={0} step={0.1} /> @@ -322,7 +318,6 @@ const LensesPage = () => { } type="primary" - style={{position: "fixed", bottom: 40, right: 40}} onClick={lensesUI.handleAddLens} tooltip="Добавить линзу" /> diff --git a/web-app/src/pages/lenses_layout/SetLensesPage.jsx b/web-app/src/pages/lenses_layout/SetLensesPage.jsx index 5a125e5..b33ac48 100644 --- a/web-app/src/pages/lenses_layout/SetLensesPage.jsx +++ b/web-app/src/pages/lenses_layout/SetLensesPage.jsx @@ -1,4 +1,4 @@ -import {FloatButton, Input, List, Row, Typography} from "antd"; +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"; @@ -13,6 +13,14 @@ const SetLensesPage = () => { const setsData = useSets(); const setsUI = useSetsUI(setsData.sets); + if (setsData.isError) return ( + + ); + return (
<SwitcherOutlined/> Наборы линз