Initial import of weiyuan frontend
This commit is contained in:
@@ -0,0 +1,654 @@
|
||||
/*
|
||||
Copyright (C) 2025 QuantumNous
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
Modal,
|
||||
Table,
|
||||
Tag,
|
||||
TextArea,
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
import { Code2, FileCheck2, OctagonX, RotateCcw } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, getUserIdFromLocalStorage } from '../../helpers';
|
||||
import { useIsMobile } from '../../hooks/common/useIsMobile';
|
||||
import { SkillEmptyGuide } from '../../components/skill';
|
||||
import {
|
||||
usePageGuide,
|
||||
PageGuideDrawer,
|
||||
PageGuidePill,
|
||||
PageGuideTrigger,
|
||||
} from '../../components/common/PageGuide';
|
||||
import OrgPanel from './components/OrgPanel';
|
||||
import './org-skills.css';
|
||||
|
||||
const { Title, Text, Paragraph } = Typography;
|
||||
const blankSkill = {
|
||||
canonical_id: '',
|
||||
body: '# Method\n\nDescribe a safe, evidence-led method.',
|
||||
name_zh: '',
|
||||
name_en: '',
|
||||
description_zh: '',
|
||||
description_en: '',
|
||||
triggers_zh: '',
|
||||
triggers_en: '',
|
||||
scenarios_zh: '',
|
||||
scenarios_en: '',
|
||||
compact_constraint_zh: '',
|
||||
compact_constraint_en: '',
|
||||
default_output_language: 'auto',
|
||||
capabilities: 'prompt_only',
|
||||
tags: 'internal',
|
||||
change_statement: '',
|
||||
};
|
||||
const split = (value) =>
|
||||
String(value || '')
|
||||
.split(',')
|
||||
.map((item) => item.trim())
|
||||
.filter(Boolean);
|
||||
|
||||
const OrgPrivateSkills = ({ orgId }) => {
|
||||
const { t } = useTranslation();
|
||||
const isMobile = useIsMobile();
|
||||
const headers = useMemo(() => ({ 'X-Org-Id': String(orgId) }), [orgId]);
|
||||
const [items, setItems] = useState([]);
|
||||
// 首次加载完成前进度胶囊不渲染,避免对老用户闪现「0/4」。
|
||||
const [loaded, setLoaded] = useState(false);
|
||||
const [editorVisible, setEditorVisible] = useState(false);
|
||||
const [editingSkill, setEditingSkill] = useState(null);
|
||||
const [form, setForm] = useState(blankSkill);
|
||||
const [evidenceVersion, setEvidenceVersion] = useState(null);
|
||||
const [historySkill, setHistorySkill] = useState(null);
|
||||
const [history, setHistory] = useState([]);
|
||||
const [evidence, setEvidence] = useState({
|
||||
model: '',
|
||||
input: '',
|
||||
});
|
||||
const load = useCallback(async () => {
|
||||
// finally 保证请求失败也置 loaded:拦截器已 toast,此处只需不让
|
||||
// 未捕获 reject 把 loaded 卡在 false。
|
||||
try {
|
||||
const response = await API.get('/api/org/skills/private', { headers });
|
||||
if (response.data?.success) setItems(response.data.data || []);
|
||||
} finally {
|
||||
setLoaded(true);
|
||||
}
|
||||
}, [headers]);
|
||||
useEffect(() => {
|
||||
void load();
|
||||
}, [load]);
|
||||
const payload = () => ({
|
||||
...form,
|
||||
triggers_zh: split(form.triggers_zh),
|
||||
triggers_en: split(form.triggers_en),
|
||||
scenarios_zh: split(form.scenarios_zh),
|
||||
scenarios_en: split(form.scenarios_en),
|
||||
capabilities: split(form.capabilities),
|
||||
tags: split(form.tags),
|
||||
});
|
||||
// Backend business rejections arrive as HTTP 4xx (axios throws); read the
|
||||
// response body so the audited reason reaches the user instead of a generic
|
||||
// "Request failed with status code 409".
|
||||
const backendMessage = (error, fallback) =>
|
||||
error?.response?.data?.message || error?.message || fallback;
|
||||
const save = async () => {
|
||||
const endpoint = editingSkill
|
||||
? `/api/org/skills/private/${editingSkill.id}/versions`
|
||||
: '/api/org/skills/private';
|
||||
try {
|
||||
const response = await API.post(endpoint, payload(), {
|
||||
headers,
|
||||
skipErrorHandler: true,
|
||||
});
|
||||
if (!response.data?.success) {
|
||||
Toast.error(response.data?.message || t('保存失败'));
|
||||
return;
|
||||
}
|
||||
setEditorVisible(false);
|
||||
setEditingSkill(null);
|
||||
setForm(blankSkill);
|
||||
await load();
|
||||
} catch (error) {
|
||||
Toast.error(backendMessage(error, t('保存失败')));
|
||||
}
|
||||
};
|
||||
const recordEvidence = async () => {
|
||||
if (!evidence.model.trim() || !evidence.input.trim()) {
|
||||
Toast.error(t('模型名称与测试输入不能为空'));
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const response = await API.post(
|
||||
`/api/org/skills/private/versions/${evidenceVersion}/test`,
|
||||
{ model: evidence.model, input: evidence.input },
|
||||
{ headers, skipErrorHandler: true },
|
||||
);
|
||||
if (!response.data?.success) {
|
||||
Toast.error(response.data?.message || t('模型实测失败'));
|
||||
return;
|
||||
}
|
||||
Toast.success(t('模型实测完成,证据已落库'));
|
||||
setEvidenceVersion(null);
|
||||
await load();
|
||||
} catch (error) {
|
||||
Toast.error(backendMessage(error, t('模型实测失败')));
|
||||
}
|
||||
};
|
||||
const action = async (endpoint, body = {}) => {
|
||||
try {
|
||||
const response = await API.post(endpoint, body, {
|
||||
headers,
|
||||
skipErrorHandler: true,
|
||||
});
|
||||
if (!response.data?.success) {
|
||||
Toast.error(response.data?.message || t('操作失败'));
|
||||
return;
|
||||
}
|
||||
Toast.success(t('操作完成'));
|
||||
await load();
|
||||
} catch (error) {
|
||||
Toast.error(backendMessage(error, t('操作失败')));
|
||||
}
|
||||
};
|
||||
const openHistory = async (skill) => {
|
||||
try {
|
||||
const response = await API.get(
|
||||
`/api/org/skills/private/${skill.id}/versions`,
|
||||
{ headers, skipErrorHandler: true },
|
||||
);
|
||||
if (!response.data?.success) {
|
||||
Toast.error(response.data?.message || t('历史版本加载失败'));
|
||||
return;
|
||||
}
|
||||
setHistory(response.data.data || []);
|
||||
setHistorySkill(skill);
|
||||
} catch (error) {
|
||||
Toast.error(backendMessage(error, t('历史版本加载失败')));
|
||||
}
|
||||
};
|
||||
const askReason = (title, onOk) => {
|
||||
let reason = '';
|
||||
Modal.confirm({
|
||||
title,
|
||||
content: (
|
||||
<TextArea
|
||||
placeholder={t('请输入可审计原因')}
|
||||
onChange={(value) => {
|
||||
reason = value;
|
||||
}}
|
||||
/>
|
||||
),
|
||||
onOk: () => onOk(reason),
|
||||
});
|
||||
};
|
||||
const renderSkillActions = (row) => {
|
||||
const versionId = row.version?.id;
|
||||
const currentUserId = Number(getUserIdFromLocalStorage()) || 0;
|
||||
// Two-person review is enforced server side; mirror it here so buttons
|
||||
// that are guaranteed to be rejected are not clickable.
|
||||
const isAuthor =
|
||||
currentUserId > 0 && Number(row.version?.created_by) === currentUserId;
|
||||
const isReviewer =
|
||||
currentUserId > 0 && Number(row.review?.reviewer_id) === currentUserId;
|
||||
return (
|
||||
<div className='flex flex-wrap gap-2'>
|
||||
<Button
|
||||
size='small'
|
||||
disabled={row.definition.emergency_stopped}
|
||||
onClick={() => {
|
||||
setEditingSkill(row.definition);
|
||||
setForm({
|
||||
...blankSkill,
|
||||
canonical_id: row.definition.canonical_id,
|
||||
});
|
||||
setEditorVisible(true);
|
||||
}}
|
||||
>
|
||||
{t('新版本')}
|
||||
</Button>
|
||||
<Button size='small' onClick={() => openHistory(row.definition)}>
|
||||
{t('历史版本')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
disabled={!versionId}
|
||||
onClick={() => {
|
||||
// Clear residue from a previous version's test before reopening.
|
||||
setEvidence({ model: '', input: '' });
|
||||
setEvidenceVersion(versionId);
|
||||
}}
|
||||
>
|
||||
{t('执行模型实测')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
disabled={!versionId || row.review?.status !== 'pending' || isAuthor}
|
||||
onClick={() =>
|
||||
action(`/api/org/skills/private/versions/${versionId}/review/start`)
|
||||
}
|
||||
>
|
||||
{isAuthor && row.review?.status === 'pending'
|
||||
? t('待他人审核')
|
||||
: t('领取审核')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
icon={<FileCheck2 size={14} />}
|
||||
disabled={
|
||||
!versionId || row.review?.status !== 'reviewing' || !isReviewer
|
||||
}
|
||||
onClick={() =>
|
||||
action(
|
||||
`/api/org/skills/private/versions/${versionId}/review/decision`,
|
||||
{ approved: true, conclusion: { decision: 'approved' } },
|
||||
)
|
||||
}
|
||||
>
|
||||
{t('通过')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
type='danger'
|
||||
disabled={
|
||||
!versionId || row.review?.status !== 'reviewing' || !isReviewer
|
||||
}
|
||||
onClick={() =>
|
||||
action(
|
||||
`/api/org/skills/private/versions/${versionId}/review/decision`,
|
||||
{ approved: false, conclusion: { decision: 'rejected' } },
|
||||
)
|
||||
}
|
||||
>
|
||||
{t('驳回')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
disabled={!versionId || row.review?.status !== 'approved'}
|
||||
onClick={() =>
|
||||
action(`/api/org/skills/private/versions/${versionId}/publish`)
|
||||
}
|
||||
>
|
||||
{t('发布')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
icon={<RotateCcw size={14} />}
|
||||
disabled={!versionId}
|
||||
onClick={() =>
|
||||
askReason(t('回滚到当前列表版本'), (reason) =>
|
||||
action(
|
||||
`/api/org/skills/private/${row.definition.id}/versions/${versionId}/rollback`,
|
||||
{ reason },
|
||||
),
|
||||
)
|
||||
}
|
||||
>
|
||||
{t('回滚')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
type='danger'
|
||||
icon={<OctagonX size={14} />}
|
||||
disabled={row.definition.emergency_stopped}
|
||||
onClick={() =>
|
||||
askReason(t('紧急停用 Skill'), (reason) =>
|
||||
action(
|
||||
`/api/org/skills/private/${row.definition.id}/emergency-stop`,
|
||||
{ reason },
|
||||
),
|
||||
)
|
||||
}
|
||||
>
|
||||
{t('紧急停用')}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const openCreateEditor = () => {
|
||||
setEditingSkill(null);
|
||||
setForm(blankSkill);
|
||||
setEditorVisible(true);
|
||||
};
|
||||
// 使用指引:自研 Skill 从创建到发布的门禁流程,完成态由列表真实数据驱动。
|
||||
const guide = usePageGuide({
|
||||
guideKey: 'org-private-skills',
|
||||
ready: loaded,
|
||||
title: t('企业自研 Skill · 使用指引'),
|
||||
intro: t('创建 → 模型实测 → 双人审核 → 发布,每一步都留审计'),
|
||||
steps: [
|
||||
{
|
||||
title: t('创建私有 Skill'),
|
||||
detail: t('撰写方法正文与中英文元数据'),
|
||||
done: items.length > 0,
|
||||
cta: t('去创建'),
|
||||
onAction: openCreateEditor,
|
||||
points: [
|
||||
t('Skill Markdown 正文就是方法内容,创建后版本不可变'),
|
||||
t('后续改动走「新版本」,历史版本全部保留可回滚'),
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('执行模型实测'),
|
||||
detail: t('用真实模型跑一遍正文,产生审核证据'),
|
||||
done: items.some((row) => row.runtime?.conclusion === 'pass'),
|
||||
points: [
|
||||
t('「执行模型实测」会实际调用所选模型执行该版本正文'),
|
||||
t('真实响应自动落库为审核证据;扫描列变绿色 pass 即通过'),
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('双人审核'),
|
||||
detail: t('作者不能审核自己的版本'),
|
||||
done: items.some((row) => row.review?.status === 'approved'),
|
||||
points: [
|
||||
t('作者视角按钮显示「待他人审核」;其他管理员「领取审核」'),
|
||||
t('领取后由审核人「通过」或「驳回」,结论进入审计'),
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('发布与治理'),
|
||||
detail: t('审核通过后发布;回滚与紧急停用随时可用'),
|
||||
// 后端 SkillState 发布态只有 'published'(model/skill_supply.go)。
|
||||
done: items.some((row) => row.definition.status === 'published'),
|
||||
points: [
|
||||
t('「发布」后技能按企业分发策略对成员生效,范围在「分发与锁定」配置'),
|
||||
t('「回滚」可退回任一审核通过的历史版本,「紧急停用」立即止血'),
|
||||
t('回滚与紧急停用都必须填写可审计原因'),
|
||||
],
|
||||
},
|
||||
],
|
||||
faq: [
|
||||
{
|
||||
q: t('「领取审核」按钮点不了?'),
|
||||
a: t('你是该版本的作者,双人审核要求由其他管理员领取'),
|
||||
},
|
||||
{
|
||||
q: t('技能被紧急停用后能恢复吗?'),
|
||||
a: t('解除停用前无法创建新版本;恢复操作同样需要可审计原因'),
|
||||
},
|
||||
],
|
||||
});
|
||||
const closeGuide = guide.close;
|
||||
// 抽屉进度是组织私有的:切组织时关闭并复位 loaded,
|
||||
// 否则重取窗口内胶囊会按旧组织数据渲染完成态。
|
||||
useEffect(() => {
|
||||
setLoaded(false);
|
||||
closeGuide();
|
||||
}, [orgId, closeGuide]);
|
||||
return (
|
||||
<div className='org-skills-page'>
|
||||
<header className='org-skills-hero'>
|
||||
<div>
|
||||
<Title heading={3}>{t('企业自研 Skill')}</Title>
|
||||
<Text type='tertiary'>
|
||||
{t(
|
||||
'版本内容不可变;兼容扫描、双人审核、发布、回滚与紧急停用均保留审计。',
|
||||
)}
|
||||
</Text>
|
||||
</div>
|
||||
<div className='org-skills-hero-actions'>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
<Button icon={<Code2 size={16} />} onClick={openCreateEditor}>
|
||||
{t('创建私有 Skill')}
|
||||
</Button>
|
||||
</div>
|
||||
</header>
|
||||
<PageGuidePill guide={guide} />
|
||||
<PageGuideDrawer guide={guide} />
|
||||
<OrgPanel>
|
||||
{items.length === 0 ? (
|
||||
<SkillEmptyGuide
|
||||
title={t('还没有自研 Skill')}
|
||||
description={t(
|
||||
'把企业沉淀的方法写成 Skill,经实测与双人审核后发布给成员使用。',
|
||||
)}
|
||||
actionLabel={t('创建私有 Skill')}
|
||||
onAction={openCreateEditor}
|
||||
/>
|
||||
) : isMobile ? (
|
||||
<div className='org-skill-mobile-list'>
|
||||
{items.map((row) => (
|
||||
<article key={row.definition.id}>
|
||||
<div>
|
||||
<strong>{row.definition.canonical_id}</strong>
|
||||
<Tag
|
||||
color={row.definition.emergency_stopped ? 'red' : 'blue'}
|
||||
>
|
||||
{row.definition.status}
|
||||
</Tag>
|
||||
</div>
|
||||
<span>
|
||||
{t('版本')}: {row.version?.version_no || '-'}
|
||||
</span>
|
||||
<span>
|
||||
{t('扫描')}: {row.runtime?.conclusion || '-'}
|
||||
</span>
|
||||
<span>
|
||||
{t('审核')}: {row.review?.status || '-'}
|
||||
</span>
|
||||
{renderSkillActions(row)}
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<Table
|
||||
pagination={false}
|
||||
dataSource={items}
|
||||
rowKey={(row) => row.definition.id}
|
||||
columns={[
|
||||
{
|
||||
title: t('标识'),
|
||||
render: (_, row) => row.definition.canonical_id,
|
||||
},
|
||||
{
|
||||
title: t('版本'),
|
||||
render: (_, row) => row.version?.version_no || '-',
|
||||
},
|
||||
{
|
||||
title: t('扫描'),
|
||||
render: (_, row) => (
|
||||
<Tag
|
||||
color={
|
||||
row.runtime?.conclusion === 'pass' ? 'green' : 'orange'
|
||||
}
|
||||
>
|
||||
{row.runtime?.conclusion || '-'}
|
||||
</Tag>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: t('审核'),
|
||||
render: (_, row) => <Tag>{row.review?.status || '-'}</Tag>,
|
||||
},
|
||||
{
|
||||
title: t('状态'),
|
||||
render: (_, row) => (
|
||||
<Tag
|
||||
color={row.definition.emergency_stopped ? 'red' : 'blue'}
|
||||
>
|
||||
{row.definition.status}
|
||||
</Tag>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: t('操作'),
|
||||
width: 430,
|
||||
render: (_, row) => renderSkillActions(row),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</OrgPanel>
|
||||
<Modal
|
||||
title={editingSkill ? t('创建不可变新版本') : t('创建企业私有 Skill')}
|
||||
visible={editorVisible}
|
||||
onCancel={() => setEditorVisible(false)}
|
||||
onOk={save}
|
||||
width={820}
|
||||
>
|
||||
<div className='org-private-skill-form'>
|
||||
<Input
|
||||
disabled={!!editingSkill}
|
||||
placeholder='canonical_id'
|
||||
value={form.canonical_id}
|
||||
onChange={(canonical_id) => setForm({ ...form, canonical_id })}
|
||||
/>
|
||||
{[
|
||||
'name_zh',
|
||||
'name_en',
|
||||
'description_zh',
|
||||
'description_en',
|
||||
'triggers_zh',
|
||||
'triggers_en',
|
||||
'scenarios_zh',
|
||||
'scenarios_en',
|
||||
'compact_constraint_zh',
|
||||
'compact_constraint_en',
|
||||
'tags',
|
||||
'change_statement',
|
||||
].map((key) => (
|
||||
<Input
|
||||
key={key}
|
||||
placeholder={key}
|
||||
value={form[key]}
|
||||
onChange={(value) => setForm({ ...form, [key]: value })}
|
||||
/>
|
||||
))}
|
||||
<TextArea
|
||||
rows={10}
|
||||
placeholder='Skill Markdown'
|
||||
value={form.body}
|
||||
onChange={(body) => setForm({ ...form, body })}
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal
|
||||
title={t('执行真实模型测试')}
|
||||
visible={!!evidenceVersion}
|
||||
onCancel={() => setEvidenceVersion(null)}
|
||||
onOk={recordEvidence}
|
||||
>
|
||||
<div className='org-private-skill-form'>
|
||||
<Input
|
||||
placeholder={t('模型名称')}
|
||||
value={evidence.model}
|
||||
onChange={(model) => setEvidence({ ...evidence, model })}
|
||||
/>
|
||||
<TextArea
|
||||
placeholder={t('测试输入')}
|
||||
value={evidence.input}
|
||||
onChange={(input) => setEvidence({ ...evidence, input })}
|
||||
/>
|
||||
<Paragraph type='tertiary'>
|
||||
{t(
|
||||
'提交后将实际调用所选模型执行该版本正文,真实响应自动落库为审核证据。',
|
||||
)}
|
||||
</Paragraph>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal
|
||||
title={t('不可变历史版本')}
|
||||
visible={!!historySkill}
|
||||
onCancel={() => setHistorySkill(null)}
|
||||
footer={null}
|
||||
width={760}
|
||||
>
|
||||
{isMobile ? (
|
||||
<div className='org-skill-mobile-list'>
|
||||
{history.map((row) => (
|
||||
<article key={row.version.id}>
|
||||
<strong>
|
||||
v{row.version.version_no} / #{row.version.id}
|
||||
</strong>
|
||||
<span>
|
||||
{t('扫描')}: {row.runtime?.conclusion || '-'}
|
||||
</span>
|
||||
<span>
|
||||
{t('审核')}: {row.review?.status || '-'}
|
||||
</span>
|
||||
<Button
|
||||
size='small'
|
||||
icon={<RotateCcw size={14} />}
|
||||
disabled={row.review?.status !== 'approved'}
|
||||
onClick={() =>
|
||||
askReason(t('回滚到该历史版本'), async (reason) => {
|
||||
await action(
|
||||
`/api/org/skills/private/${historySkill.id}/versions/${row.version.id}/rollback`,
|
||||
{ reason },
|
||||
);
|
||||
setHistorySkill(null);
|
||||
})
|
||||
}
|
||||
>
|
||||
{t('回滚')}
|
||||
</Button>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<Table
|
||||
pagination={false}
|
||||
dataSource={history}
|
||||
rowKey={(row) => row.version.id}
|
||||
columns={[
|
||||
{
|
||||
title: t('版本'),
|
||||
render: (_, row) => `v${row.version.version_no}`,
|
||||
},
|
||||
{ title: t('版本 ID'), render: (_, row) => row.version.id },
|
||||
{
|
||||
title: t('扫描'),
|
||||
render: (_, row) => row.runtime?.conclusion || '-',
|
||||
},
|
||||
{
|
||||
title: t('审核'),
|
||||
render: (_, row) => row.review?.status || '-',
|
||||
},
|
||||
{
|
||||
title: t('操作'),
|
||||
render: (_, row) => (
|
||||
<Button
|
||||
size='small'
|
||||
icon={<RotateCcw size={14} />}
|
||||
disabled={row.review?.status !== 'approved'}
|
||||
onClick={() =>
|
||||
askReason(t('回滚到该历史版本'), async (reason) => {
|
||||
await action(
|
||||
`/api/org/skills/private/${historySkill.id}/versions/${row.version.id}/rollback`,
|
||||
{ reason },
|
||||
);
|
||||
setHistorySkill(null);
|
||||
})
|
||||
}
|
||||
>
|
||||
{t('回滚')}
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default OrgPrivateSkills;
|
||||
Reference in New Issue
Block a user