fixed eslint bugs

This commit is contained in:
Grog 2026-10-19 09:44:27 +03:00
parent e751c63c32
commit 681697f728
5 changed files with 13 additions and 17 deletions

View File

@ -54,9 +54,7 @@ export const CatalogueJurForm: React.FC<Props> = ({ open, onCancel, onOk, jurId
} catch (e) {
if (e instanceof ApiError) {
notification.error({ description: e.message });
} else {
console.error(e);
}
}
} finally {
setInitialDataLoading(false);
}
@ -115,8 +113,6 @@ export const CatalogueJurForm: React.FC<Props> = ({ open, onCancel, onOk, jurId
notification.error({
description: e.message,
});
} else if (e instanceof Error && e.name !== 'ValidationError') {
console.error(e);
}
} finally {
setConfirmLoading(false);

View File

@ -60,7 +60,7 @@ export function CatalogueJurTable({ outside_group, tabsComponent }: CatalogueJur
});
}
return rawRows;
}, [rawRows, relatedGroupFilter]);
}, [rawRows, relatedGroupFilter, outside_group]);
const { visibleKeys, setVisibleKeys } = useVisibleColumns(catalogueJurConfig);
const { rawQuery, setRawQuery, columnFilters, setColumnFilters, sort, setSort, resetAll, hasActiveFilters } =

View File

@ -52,8 +52,6 @@ export const CompanyGroupForm: React.FC<Props> = ({ open, onCancel, onOk }) => {
notification.error({
description: e.message,
});
} else if (e instanceof Error && e.name !== 'ValidationError') {
console.error(e);
}
} finally {
setConfirmLoading(false);

View File

@ -39,6 +39,14 @@ export const CompanyGroupsList = () => {
}
}, [rawRows, activeCompanyGroup, dispatch]);
if (loading) {
return (
<div style={{ textAlign: 'center', padding: 24 }}>
<Spin />
</div>
);
}
return (
<div
style={{
@ -60,11 +68,7 @@ export const CompanyGroupsList = () => {
</div>
<div ref={ref} onScroll={onScroll} style={{ flex: 1, overflowY: 'auto', padding: '0 8px 8px' }}>
{loading ? (
<div style={{ textAlign: 'center', padding: 24 }}>
<Spin />
</div>
) : filtered.length === 0 ? (
{filtered.length === 0 ? (
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description='Компании и организации не найдены' style={{ marginTop: 32 }} />
) : (
<div style={{ height: totalHeight, position: 'relative' }}>
@ -72,7 +76,7 @@ export const CompanyGroupsList = () => {
<List
dataSource={visibleItems}
split={false}
renderItem={({item}) => {
renderItem={({ item }) => {
const active = item.id === activeCompanyGroup?.id;
return (
<List.Item

View File

@ -2,7 +2,6 @@ import { EllipsisOutlined } from '@ant-design/icons';
import { Button, Dropdown, Space } from 'antd';
import type { ColumnsType } from 'antd/es/table';
import { type ReactNode, useMemo, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { ApiError } from '../../api/client';
import { ColumnSettings, DataTable, useFilteredRows, useVisibleColumns } from '../../components/GenericTable';
import { useTableFilters } from '../../components/GenericTable/useTableFilters';
@ -23,7 +22,6 @@ interface RelatedGroupTableI {
}
export function RelatedGroupTable({ tabsComponent, data, loading, getData, activeTab }: RelatedGroupTableI) {
const navigate = useNavigate();
const notification = useNotificationApi();
const [editFormOpen, setEditFormOpen] = useState(false);
@ -113,7 +111,7 @@ export function RelatedGroupTable({ tabsComponent, data, loading, getData, activ
},
},
],
[navigate],
[],
);
return (