diff --git a/src/pages/AdminPanel/AdminNavigationMenu.jsx b/src/pages/AdminPanel/AdminNavigationMenu.jsx index 7005099..1925703 100644 --- a/src/pages/AdminPanel/AdminNavigationMenu.jsx +++ b/src/pages/AdminPanel/AdminNavigationMenu.jsx @@ -13,6 +13,7 @@ import { } from '@ant-design/icons' import { makeItem, PrivateWellMenu } from '@components/PrivateWellMenu' +import { isDev } from '@asb/utils' const menuItems = [ makeItem('Месторождения', 'deposit', [], ), @@ -28,8 +29,8 @@ const menuItems = [ makeItem('Объединение', 'merger', [], ), ]), makeItem('Журнал посещений', 'visit_log', [], ), - makeItem('API', '/swagger/index.html', [], ), -] + isDev() && makeItem('API', '/swagger/index.html', [], ), +].filter(Boolean) export const AdminNavigationMenu = memo((props) => ( { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_cluster_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/CompanyController.jsx b/src/pages/AdminPanel/CompanyController.jsx index 9a70d85..e7a31d8 100755 --- a/src/pages/AdminPanel/CompanyController.jsx +++ b/src/pages/AdminPanel/CompanyController.jsx @@ -97,6 +97,7 @@ const CompanyController = memo(() => { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_company_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/CompanyTypeController.jsx b/src/pages/AdminPanel/CompanyTypeController.jsx index 1ce4932..eeab683 100755 --- a/src/pages/AdminPanel/CompanyTypeController.jsx +++ b/src/pages/AdminPanel/CompanyTypeController.jsx @@ -75,6 +75,7 @@ const CompanyTypeController = memo(() => { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_company_type_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/DepositController.jsx b/src/pages/AdminPanel/DepositController.jsx index 3c17df4..edf3b46 100755 --- a/src/pages/AdminPanel/DepositController.jsx +++ b/src/pages/AdminPanel/DepositController.jsx @@ -75,6 +75,7 @@ const DepositController = memo(() => { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_deposit_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/PermissionController.jsx b/src/pages/AdminPanel/PermissionController.jsx index 6add2ea..b4d1314 100755 --- a/src/pages/AdminPanel/PermissionController.jsx +++ b/src/pages/AdminPanel/PermissionController.jsx @@ -82,6 +82,7 @@ const PermissionController = memo(() => { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_permission_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/RoleController.jsx b/src/pages/AdminPanel/RoleController.jsx index 8f80a9a..d87a586 100755 --- a/src/pages/AdminPanel/RoleController.jsx +++ b/src/pages/AdminPanel/RoleController.jsx @@ -89,6 +89,7 @@ const RoleController = memo(() => { onRowEdit={tableHandlers.edit} onRowDelete={tableHandlers.delete} tableName={'admin_role_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx b/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx index 111d930..1f040a4 100755 --- a/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx +++ b/src/pages/AdminPanel/Telemetry/TelemetryViewer.jsx @@ -115,6 +115,7 @@ const TelemetryController = memo(() => { pagination={defaultPagination} dataSource={filteredTelemetryData} tableName={'admin_telemetry_controller'} + scroll={{ x: true }} /> ) diff --git a/src/pages/AdminPanel/UserController/index.jsx b/src/pages/AdminPanel/UserController/index.jsx index fc22c7f..2581082 100755 --- a/src/pages/AdminPanel/UserController/index.jsx +++ b/src/pages/AdminPanel/UserController/index.jsx @@ -214,6 +214,7 @@ const UserController = memo(() => { buttonsWidth={120} pagination={defaultPagination} tableName={'admin_user_controller'} + scroll={{ x: true }} /> { dataSource={filteredLogData} pagination={defaultPagination} tableName={'visit_log'} + scroll={{ x: true }} /> ) diff --git a/src/pages/Cluster/ClusterWells.jsx b/src/pages/Cluster/ClusterWells.jsx index 91f877c..7538ec4 100755 --- a/src/pages/Cluster/ClusterWells.jsx +++ b/src/pages/Cluster/ClusterWells.jsx @@ -174,6 +174,7 @@ const ClusterWells = memo(({ statsWells }) => { pagination={false} rowKey={(record) => record.caption} tableName={'cluster'} + scroll={{ x: true }} /> record.id} tableName={tableName ?? `file_${idCategory}`} + scroll={{ x: true }} /> ) diff --git a/src/pages/Well/Reports/DiagramReport/Reports.jsx b/src/pages/Well/Reports/DiagramReport/Reports.jsx index cacdf1d..91fa620 100644 --- a/src/pages/Well/Reports/DiagramReport/Reports.jsx +++ b/src/pages/Well/Reports/DiagramReport/Reports.jsx @@ -4,9 +4,9 @@ import { FilePdfOutlined, FileTextOutlined } from '@ant-design/icons' import { useWell } from '@asb/context' import LoaderPortal from '@components/LoaderPortal' -import { Table, makeDateSorter, makeNumericSorter } from '@components/Table' +import { Table, makeNumericSorter, makeColumn, makeDateColumn } from '@components/Table' import { invokeWebApiWrapperAsync, downloadFile } from '@components/factory' -import { formatDate, periodToString } from '@utils' +import { periodToString } from '@utils' import { ReportService } from '@api' const imgPaths = { @@ -15,10 +15,7 @@ const imgPaths = { } const columns = [ - { - title: 'Название', - dataIndex: 'name', - key: 'name', + makeColumn('Название', 'name', { render: (name, report) => (