diff --git a/src/components/TokenContent/index.tsx b/src/components/TokenContent/index.tsx index 06921aa..5e0603d 100644 --- a/src/components/TokenContent/index.tsx +++ b/src/components/TokenContent/index.tsx @@ -1,20 +1,22 @@ import { CopyOutlined, DeleteOutlined } from '@ant-design/icons' -import { Button, message, Popconfirm, Spin, Table } from 'antd' +import { Button, message, Popconfirm, Spin, Table, Tooltip } from 'antd' import { ColumnsType } from 'antd/es/table' import ClipboardJS from 'clipboard' import dayjs from 'dayjs' import 'dayjs/locale/ru' import duration from 'dayjs/plugin/duration' import relativeTime from 'dayjs/plugin/relativeTime' -import { Layout, FormComponents } from 'isp-ui-kit' +import { FormComponents, Layout } from 'isp-ui-kit' import { useEffect, useState } from 'react' import { useForm } from 'react-hook-form' +import { dateFormats } from '@constants/date.ts' import { ValidationRules } from '@constants/form/validationRules.ts' import Modal from '@widgets/Modal' -// import CanEdit from '@components/CanEdit' +import CanEdit from '@components/CanEdit' + import { ApplicationTokenType, NewApplicationTokenType @@ -22,9 +24,10 @@ import { import tokensApi from '@services/tokensService.ts' -import './tokens.scss' -import CanEdit from '@components/CanEdit' -import { dateFormats } from '@constants/date.ts' + + +import './tokens.scss'; + const { FormSelect } = FormComponents const { EmptyData } = Layout @@ -110,6 +113,11 @@ const TokenContent = ({ id }: TokenPropTypes) => { } const columns: ColumnsType = [ + { + title: 'ID', + dataIndex: 'appId', + key: 'appId' + }, { title: 'Токен', dataIndex: 'token', @@ -121,7 +129,9 @@ const TokenContent = ({ id }: TokenPropTypes) => { dataIndex: 'createdAt', key: 'createdAt', render: (record) => { - const formatTime = dayjs(record.createdAt).format(dateFormats.fullFormat) + const formatTime = dayjs(record.createdAt).format( + dateFormats.fullFormat + ) return
{formatTime}
} }, @@ -150,33 +160,24 @@ const TokenContent = ({ id }: TokenPropTypes) => { } }, { - title: 'Скопировать', + title: 'Действия', dataIndex: 'token', - key: 'copyToken', - align: 'center', - render: (record) => { + key: 'actions', + render: (value) => { return ( - - ) - } - }, - { - title: 'Отозвать', - dataIndex: 'appId', - key: 'recall', - align: 'center', - render: (_, record) => { - return ( - handleRevokeToken(record)} - > - - + + +