58 lines
1.9 KiB
React
58 lines
1.9 KiB
React
/*
|
||
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 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;
|