fixed eslint bugs
This commit is contained in:
parent
e751c63c32
commit
681697f728
@ -54,8 +54,6 @@ export const CatalogueJurForm: React.FC<Props> = ({ open, onCancel, onOk, jurId
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof ApiError) {
|
if (e instanceof ApiError) {
|
||||||
notification.error({ description: e.message });
|
notification.error({ description: e.message });
|
||||||
} else {
|
|
||||||
console.error(e);
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
setInitialDataLoading(false);
|
setInitialDataLoading(false);
|
||||||
@ -115,8 +113,6 @@ export const CatalogueJurForm: React.FC<Props> = ({ open, onCancel, onOk, jurId
|
|||||||
notification.error({
|
notification.error({
|
||||||
description: e.message,
|
description: e.message,
|
||||||
});
|
});
|
||||||
} else if (e instanceof Error && e.name !== 'ValidationError') {
|
|
||||||
console.error(e);
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
setConfirmLoading(false);
|
setConfirmLoading(false);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ export function CatalogueJurTable({ outside_group, tabsComponent }: CatalogueJur
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return rawRows;
|
return rawRows;
|
||||||
}, [rawRows, relatedGroupFilter]);
|
}, [rawRows, relatedGroupFilter, outside_group]);
|
||||||
|
|
||||||
const { visibleKeys, setVisibleKeys } = useVisibleColumns(catalogueJurConfig);
|
const { visibleKeys, setVisibleKeys } = useVisibleColumns(catalogueJurConfig);
|
||||||
const { rawQuery, setRawQuery, columnFilters, setColumnFilters, sort, setSort, resetAll, hasActiveFilters } =
|
const { rawQuery, setRawQuery, columnFilters, setColumnFilters, sort, setSort, resetAll, hasActiveFilters } =
|
||||||
|
|||||||
@ -52,8 +52,6 @@ export const CompanyGroupForm: React.FC<Props> = ({ open, onCancel, onOk }) => {
|
|||||||
notification.error({
|
notification.error({
|
||||||
description: e.message,
|
description: e.message,
|
||||||
});
|
});
|
||||||
} else if (e instanceof Error && e.name !== 'ValidationError') {
|
|
||||||
console.error(e);
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
setConfirmLoading(false);
|
setConfirmLoading(false);
|
||||||
|
|||||||
@ -39,6 +39,14 @@ export const CompanyGroupsList = () => {
|
|||||||
}
|
}
|
||||||
}, [rawRows, activeCompanyGroup, dispatch]);
|
}, [rawRows, activeCompanyGroup, dispatch]);
|
||||||
|
|
||||||
|
if (loading) {
|
||||||
|
return (
|
||||||
|
<div style={{ textAlign: 'center', padding: 24 }}>
|
||||||
|
<Spin />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@ -60,11 +68,7 @@ export const CompanyGroupsList = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ref={ref} onScroll={onScroll} style={{ flex: 1, overflowY: 'auto', padding: '0 8px 8px' }}>
|
<div ref={ref} onScroll={onScroll} style={{ flex: 1, overflowY: 'auto', padding: '0 8px 8px' }}>
|
||||||
{loading ? (
|
{filtered.length === 0 ? (
|
||||||
<div style={{ textAlign: 'center', padding: 24 }}>
|
|
||||||
<Spin />
|
|
||||||
</div>
|
|
||||||
) : filtered.length === 0 ? (
|
|
||||||
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description='Компании и организации не найдены' style={{ marginTop: 32 }} />
|
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description='Компании и организации не найдены' style={{ marginTop: 32 }} />
|
||||||
) : (
|
) : (
|
||||||
<div style={{ height: totalHeight, position: 'relative' }}>
|
<div style={{ height: totalHeight, position: 'relative' }}>
|
||||||
@ -72,7 +76,7 @@ export const CompanyGroupsList = () => {
|
|||||||
<List
|
<List
|
||||||
dataSource={visibleItems}
|
dataSource={visibleItems}
|
||||||
split={false}
|
split={false}
|
||||||
renderItem={({item}) => {
|
renderItem={({ item }) => {
|
||||||
const active = item.id === activeCompanyGroup?.id;
|
const active = item.id === activeCompanyGroup?.id;
|
||||||
return (
|
return (
|
||||||
<List.Item
|
<List.Item
|
||||||
|
|||||||
@ -2,7 +2,6 @@ import { EllipsisOutlined } from '@ant-design/icons';
|
|||||||
import { Button, Dropdown, Space } from 'antd';
|
import { Button, Dropdown, Space } from 'antd';
|
||||||
import type { ColumnsType } from 'antd/es/table';
|
import type { ColumnsType } from 'antd/es/table';
|
||||||
import { type ReactNode, useMemo, useState } from 'react';
|
import { type ReactNode, useMemo, useState } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
|
||||||
import { ApiError } from '../../api/client';
|
import { ApiError } from '../../api/client';
|
||||||
import { ColumnSettings, DataTable, useFilteredRows, useVisibleColumns } from '../../components/GenericTable';
|
import { ColumnSettings, DataTable, useFilteredRows, useVisibleColumns } from '../../components/GenericTable';
|
||||||
import { useTableFilters } from '../../components/GenericTable/useTableFilters';
|
import { useTableFilters } from '../../components/GenericTable/useTableFilters';
|
||||||
@ -23,7 +22,6 @@ interface RelatedGroupTableI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function RelatedGroupTable({ tabsComponent, data, loading, getData, activeTab }: RelatedGroupTableI) {
|
export function RelatedGroupTable({ tabsComponent, data, loading, getData, activeTab }: RelatedGroupTableI) {
|
||||||
const navigate = useNavigate();
|
|
||||||
const notification = useNotificationApi();
|
const notification = useNotificationApi();
|
||||||
|
|
||||||
const [editFormOpen, setEditFormOpen] = useState(false);
|
const [editFormOpen, setEditFormOpen] = useState(false);
|
||||||
@ -113,7 +111,7 @@ export function RelatedGroupTable({ tabsComponent, data, loading, getData, activ
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[navigate],
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user