diff --git a/CHANGELOG.md b/CHANGELOG.md index cd05202..5053a67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.11.4 +- Правки для прода ## 0.11.3 - Обновлена версия библиотеки isp-ui-kit ## 0.11.2 diff --git a/package-lock.json b/package-lock.json index aa96a7f..c3e9994 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "isp-admin-ui", - "version": "0.11.2", + "version": "0.11.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "isp-admin-ui", - "version": "0.11.2", + "version": "0.11.3", "dependencies": { "@apidevtools/json-schema-ref-parser": "^9.0.6", "@codemirror/lang-json": "^6.0.1", diff --git a/package.json b/package.json index 6dd0c1a..861dced 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "isp-admin-ui", "private": true, - "version": "0.11.3", + "version": "0.11.4", "type": "module", "scripts": { "start": "vite", diff --git a/src/components/ActiveConfigurationsTable/active-configurations-table.scss b/src/components/ActiveConfigurationsTable/active-configurations-table.scss index 49f287f..abe6085 100644 --- a/src/components/ActiveConfigurationsTable/active-configurations-table.scss +++ b/src/components/ActiveConfigurationsTable/active-configurations-table.scss @@ -41,4 +41,9 @@ background: $blue-color-2 !important; } } + + &__buttons { + display: flex; + justify-content: space-between; + } } diff --git a/src/components/ActiveConfigurationsTable/index.tsx b/src/components/ActiveConfigurationsTable/index.tsx index 40e260f..673abef 100644 --- a/src/components/ActiveConfigurationsTable/index.tsx +++ b/src/components/ActiveConfigurationsTable/index.tsx @@ -151,7 +151,7 @@ const ActiveConfigurationsTable: FC = align: 'center' }, { - title: 'Статус конфигурации', + title: 'Статус', dataIndex: 'valid', key: 'version', align: 'center', @@ -191,9 +191,21 @@ const ActiveConfigurationsTable: FC = const className = `active-configurations-table__table ${isActiveTable ? 'active-config' : ''}` return (
-

- {isActiveTable ? 'Активная конфигурация' : 'Другие конфигурации'} -

+
+

+ {isActiveTable ? 'Активная' : 'Остальные'} +

+ {!isActiveTable && + + } +
record.id} diff --git a/src/components/ApplicationsContent/applications-content.scss b/src/components/ApplicationsContent/applications-content.scss index aef6c57..64e8af8 100644 --- a/src/components/ApplicationsContent/applications-content.scss +++ b/src/components/ApplicationsContent/applications-content.scss @@ -3,7 +3,7 @@ .applications-content { height: 100%; display: grid; - grid-template-columns:300px 1fr; + grid-template-columns:min-content 1fr; width: 100%; .column-content { diff --git a/src/components/ApplicationsContent/index.tsx b/src/components/ApplicationsContent/index.tsx index 37fb126..2c84842 100644 --- a/src/components/ApplicationsContent/index.tsx +++ b/src/components/ApplicationsContent/index.tsx @@ -120,17 +120,20 @@ const ApplicationsContent: FC = ({ createApplicationService(newApplicationApp) .unwrap() - .then(message.success('Элемент сохранен')) - .catch((e) => message.error(e)) - setShowApplicationsModal({ + .then(() => message.success('Элемент сохранен')) + .catch(() => message.error('Ошибка добавления элемента')).finally(()=> setShowApplicationsModal({ ...showApplicationsModal, addModal: false - }) + })) + } const handleRemoveApplicationApp = (id: number) => removeApplicationsService([id]) .unwrap() - .then(() => message.success('Элемент удален')) + .then(() => { + message.success('Элемент удален') + navigate(`${routePaths.applicationsGroup}/${selectedItemId}/${routePaths.application}`) + }) .catch(() => message.error('Ошибка удаления элемента')) const renderColumnItems = (item: ColumnItem) => { diff --git a/src/components/CompareVersionModal/compare-version-modal.scss b/src/components/CompareVersionModal/compare-version-modal.scss index df98ba5..8e98ec2 100644 --- a/src/components/CompareVersionModal/compare-version-modal.scss +++ b/src/components/CompareVersionModal/compare-version-modal.scss @@ -31,6 +31,11 @@ &__row { cursor: pointer; + &.ant-table-row { + &:hover td { + background-color: white !important; + } + } } } } diff --git a/src/components/CompareVersionModal/index.tsx b/src/components/CompareVersionModal/index.tsx index e11dddb..bc0320d 100644 --- a/src/components/CompareVersionModal/index.tsx +++ b/src/components/CompareVersionModal/index.tsx @@ -45,7 +45,7 @@ const CompareVersionModal: FC = ({ const columns: ColumnsType = [ { key: 'configVersion', - title: 'Версия конфигурации', + title: 'Версия', dataIndex: 'configVersion' }, { @@ -71,13 +71,13 @@ const CompareVersionModal: FC = ({ ] return (
- + {selectedItem ? (
Версия: {selectedItem.configVersion} - Текущая версия : {config?.version || config?.configVersion} + {config?.version ? `Текущая версия : ${config?.version}` : `Версия: ${config?.configVersion}`}
= ({ }) => { return (
- +
diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index 635dc2d..10f0f79 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -72,7 +72,7 @@ const LayoutComponent = () => { icon: }, { - label: 'Группы приложений', + label: 'Приложения', key: 'applications_group', className: hideItem([PermissionKeysType.read]), icon: diff --git a/src/components/RolesContent/index.tsx b/src/components/RolesContent/index.tsx index e83357e..b181427 100644 --- a/src/components/RolesContent/index.tsx +++ b/src/components/RolesContent/index.tsx @@ -93,7 +93,7 @@ const RolesContent = ({ dataSource={permissions} pagination={{ pageSize: 10 }} scroll={{ - y: 'calc(100vh - 450px)' + y: 'calc(100vh - 270px)' }} rowSelection={{ selectedRowKeys: value, @@ -140,20 +140,22 @@ const RolesContent = ({ />
- - +
+ + +
{renderFormTable()} diff --git a/src/components/RolesContent/roles-content.scss b/src/components/RolesContent/roles-content.scss index a7a94f2..f0eb845 100644 --- a/src/components/RolesContent/roles-content.scss +++ b/src/components/RolesContent/roles-content.scss @@ -1,11 +1,30 @@ @import "../../constants/style/styleConst"; .roles-content { - padding: $basic-padding*2 $basic-padding*3; + padding: $basic-padding*2 $basic-padding*3 0; min-width: 400px; + height: 100%; &__header { display: flex; justify-content: space-between; } + + &__wrap-input { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 10px; + } + + .ant-pagination { + margin: 8px 0 !important; + } + + .ant-divider-horizontal { + margin: 14px 0; + } + + .ant-form-item { + margin-bottom: 12px; + } } diff --git a/src/components/TokenContent/index.tsx b/src/components/TokenContent/index.tsx index 5e0603d..fbfe515 100644 --- a/src/components/TokenContent/index.tsx +++ b/src/components/TokenContent/index.tsx @@ -163,16 +163,16 @@ const TokenContent = ({ id }: TokenPropTypes) => { title: 'Действия', dataIndex: 'token', key: 'actions', - render: (value) => { + render: (value, record) => { return ( -
) } const columns: ColumnsType = [ { key: 'configVersion', - title: 'Версия конфигурации', + title: 'Версия', dataIndex: 'configVersion' }, { diff --git a/src/pages/AppAccessPage/index.tsx b/src/pages/AppAccessPage/index.tsx index da4bd5a..6b73fbb 100644 --- a/src/pages/AppAccessPage/index.tsx +++ b/src/pages/AppAccessPage/index.tsx @@ -81,6 +81,7 @@ const AppAccessPage = () => { return (
{ data: applicationsGroup = [], isError: isErrorApplicationsGroup, isLoading: isLoadingApplicationsGroup - } = applicationsGroupApi.useGetApplicationsGroupByDomainIdQuery({ id: 2 }) + } = applicationsGroupApi.useGetApplicationsGroupByDomainIdQuery({ id: 1 }) const [createApplicationsGroup] = applicationsGroupApi.useCreateApplicationsGroupMutation() @@ -110,7 +110,7 @@ const ApplicationsPage = () => { const newService: NewApplicationsGroupType = { name: data.name, description: data.description, - domainId: 2 + domainId: 1 } createApplicationsGroup(newService) .unwrap() @@ -134,7 +134,7 @@ const ApplicationsPage = () => { const updateService: UpdateApplicationsGroupType = { name: data.name, description: data.description, - domainId: 2, + domainId: 1, id: Number(selectedItemId) } @@ -150,7 +150,10 @@ const ApplicationsPage = () => { const handleRemoveApplicationsGtoup = () => { deleteApplicationsGroup([Number(selectedItemId)]) .unwrap() - .then(() => message.success('Элемент удален')) + .then(() => { + message.success('Элемент удален') + navigate(routePaths.applicationsGroup) + }) .catch(() => message.error('Ошибка удаления элемента')) } diff --git a/src/pages/ConfigurationsPage/index.tsx b/src/pages/ConfigurationsPage/index.tsx index cb73230..c0c5e78 100644 --- a/src/pages/ConfigurationsPage/index.tsx +++ b/src/pages/ConfigurationsPage/index.tsx @@ -3,7 +3,6 @@ import { useEffect, useMemo, useState } from 'react' import { Outlet, useNavigate, useParams } from 'react-router-dom' import ActiveConfigurationsTable from '@components/ActiveConfigurationsTable' -import CanEdit from '@components/CanEdit' import CompareVersionModal from '@components/CompareVersionModal' import ConfigSchemaModal from '@components/ConfigSchemaModal' import ConfigurationPreviewModal from '@components/ConfigurationPreviewModal' @@ -98,19 +97,8 @@ const Configurations = () => { className="configurations____buttons__show-schema-btn" onClick={() => setIsModalOpen(true)} > - Текущая схема конфигурации + Текущая схема - - - { useEffect(() => { if (!isPageAvailable) { - navigate(routePaths.error) + navigate(routePaths.profile) + message.error('Страница не найдена') } }, [isPageAvailable]) @@ -176,7 +177,7 @@ const ModulesPage = () => { size="small" showZero count={(item.status && item.status.length) || 0} - color={!item.status || !item.status.length ? '' : 'blue'} + color={!item.status || !item.status.length ? '' : 'cyan'} /> } diff --git a/src/pages/UserEditor/index.tsx b/src/pages/UserEditor/index.tsx index c4cd7df..932d959 100644 --- a/src/pages/UserEditor/index.tsx +++ b/src/pages/UserEditor/index.tsx @@ -194,13 +194,6 @@ const UserEditor = () => { name="lastName" /> -
- -
{ />
)} - +
+ +
= return ( <> - + +
) } diff --git a/src/widgets/Header/header.scss b/src/widgets/Header/header.scss index f9d381e..ddb70e2 100644 --- a/src/widgets/Header/header.scss +++ b/src/widgets/Header/header.scss @@ -16,7 +16,8 @@ font-size: 19px; font-weight: 600; font-family: 'PT Sans', sans-serif; - padding-right: 120px; + width: 100%; + padding-left: 28px; } &__text-closed { margin: auto; diff --git a/src/widgets/Modal/modal.scss b/src/widgets/Modal/modal.scss index 2e86643..1c580c4 100644 --- a/src/widgets/Modal/modal.scss +++ b/src/widgets/Modal/modal.scss @@ -39,6 +39,8 @@ } &__title { color: $grey; + font-size: 17px; + padding: 0 10px; } &__content { padding: 10px; @@ -58,7 +60,6 @@ body.modal-open { overflow: hidden; - padding-right: 14px; }