add deploy stage
This commit is contained in:
@@ -5,7 +5,6 @@ import { useAudit } from '../../hooks/useAudit';
|
||||
import { useAdmin, useAdmins } from '../../hooks/useAdmins';
|
||||
import { useUser } from '../../hooks/useUsers';
|
||||
import { useEvent } from '../../hooks/useEvents';
|
||||
import { useReview } from '../../hooks/useReviews';
|
||||
import { AuditRecord, AuditListParams } from '../../types/api';
|
||||
import type { ColumnsType, SorterResult } from 'antd/es/table/interface';
|
||||
|
||||
@@ -43,7 +42,6 @@ const AuditPage: React.FC = () => {
|
||||
const EntityNameCell: React.FC<{ entityType: string; entityId: string }> = ({ entityType, entityId }) => {
|
||||
const { data: user, isLoading: loadingUser } = useUser(entityType === 'user' ? entityId : '');
|
||||
const { data: event, isLoading: loadingEvent } = useEvent(entityType === 'event' ? entityId : '');
|
||||
const { data: review, isLoading: loadingReview } = useReview(entityType === 'review' ? entityId : '');
|
||||
|
||||
if (entityType === 'user') {
|
||||
if (loadingUser) return <Spin size="small" />;
|
||||
@@ -60,18 +58,16 @@ const AuditPage: React.FC = () => {
|
||||
}
|
||||
|
||||
if (entityType === 'review') {
|
||||
if (loadingReview) return <Spin size="small" />;
|
||||
// Для отзыва показываем ссылку на страницу отзыва
|
||||
// для review показываем ссылку без загрузки, так как нет API для загрузки названия
|
||||
return <Link to={`/reviews/${entityId}`}>{entityId}</Link>;
|
||||
}
|
||||
|
||||
// Для остальных типов (calendar, report, ticket, subscription, admin) пока просто ID
|
||||
return <span>{entityId}</span>;
|
||||
};
|
||||
|
||||
const handleTableChange = (
|
||||
pagination: any,
|
||||
filters: any,
|
||||
_filters: any,
|
||||
sorter: SorterResult<AuditRecord> | SorterResult<AuditRecord>[]
|
||||
) => {
|
||||
const s = Array.isArray(sorter) ? sorter[0] : sorter;
|
||||
|
||||
Reference in New Issue
Block a user