2aa9d73325
集中保留原版权声明,移除文件头检查和全局测试忽略规则。验证:全量单测、受影响用例复测及静态检查通过。
40 lines
1.1 KiB
React
40 lines
1.1 KiB
React
import React from 'react';
|
||
import { useTranslation } from 'react-i18next';
|
||
import OrgSubpageTabs from './components/OrgSubpageTabs';
|
||
import OrgMySkills from './OrgMySkills';
|
||
import OrgMyConnectors from './OrgMyConnectors';
|
||
|
||
/**
|
||
* 我的 AI 能力:成员自助视图的合并入口(我的技能 + 业务系统授权)。
|
||
*
|
||
* 两个页签都是 isMemberActor 守卫的只读/自助页,各自受不同的企业功能位
|
||
* (skill_market / connector)与站点级模块开关控制,由 showSkills /
|
||
* showConnectors 决定可见性。旧路由 /org/my-skills、/org/my-connectors
|
||
* 重定向到对应页签。
|
||
*/
|
||
const OrgMyCapabilities = ({
|
||
orgId,
|
||
showSkills = true,
|
||
showConnectors = true,
|
||
}) => {
|
||
const { t } = useTranslation();
|
||
return (
|
||
<OrgSubpageTabs
|
||
tabs={[
|
||
showSkills && {
|
||
key: 'skills',
|
||
label: t('我的技能'),
|
||
node: <OrgMySkills orgId={orgId} />,
|
||
},
|
||
showConnectors && {
|
||
key: 'connectors',
|
||
label: t('业务系统授权'),
|
||
node: <OrgMyConnectors orgId={orgId} />,
|
||
},
|
||
]}
|
||
/>
|
||
);
|
||
};
|
||
|
||
export default OrgMyCapabilities;
|