Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature](CE): Community edition modification #220

Merged
merged 3 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/base/src/locale/en-US/dmsHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export default {
action_1_1: '授权清单',
title_2: '审批流程',
content_2: '根据实际业务流转变更流程模板',
action_2_0: '配置审批流程模板'
action_2_0: '配置审批流程模板',
action_2_1: '查看审批流程模板'
}
},
queryAndModify: {
Expand Down
3 changes: 2 additions & 1 deletion packages/base/src/locale/en-US/dmsSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export default {
confirmCloseConfigTips: '是否确认关闭当前配置?',
confirmResetConfigTips:
'关闭配置后当前的编辑信息将不会被保留,是否确认关闭配置?',

processConnectionCETips:
'如果您使用钉钉、飞书作为协作平台,并且希望在这些外部平台上进行工单审批,您可以启用流程对接功能。通过将工单审批集成到团队的协作平台中,审批过程将变得更加便捷、高效和可追溯,同时提升数据安全和团队协作的效率。',
tabPaneTitle: {
pushNotification: '消息推送',
processConnection: '流程对接',
Expand Down
3 changes: 2 additions & 1 deletion packages/base/src/locale/zh-CN/dmsHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export default {
action_1_1: '授权清单',
title_2: '审批流程',
content_2: '根据实际业务流转变更流程模板',
action_2_0: '配置审批流程模板'
action_2_0: '配置审批流程模板',
action_2_1: '查看审批流程模板'
}
},
queryAndModify: {
Expand Down
3 changes: 2 additions & 1 deletion packages/base/src/locale/zh-CN/dmsSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export default {
confirmCloseConfigTips: '是否确认关闭当前配置?',
confirmResetConfigTips:
'关闭配置后当前的编辑信息将不会被保留,是否确认关闭配置?',

processConnectionCETips:
'如果您使用钉钉、飞书作为协作平台,并且希望在这些外部平台上进行工单审批,您可以启用流程对接功能。通过将工单审批集成到团队的协作平台中,审批过程将变得更加便捷、高效和可追溯,同时提升数据安全和团队协作的效率。',
tabPaneTitle: {
pushNotification: '消息推送',
processConnection: '流程对接',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`test base/DataExport ce should match snapshot 1`] = `
/>
</div>
<section
class="css-569lt7"
class="css-1oy5rw9"
>
<div
class="ant-row common-mode-wrapper css-dev-only-do-not-override-txh9fw"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ exports[`test base/home/CEDefaultScene should match snapshot when role is admin
<div
class="ant-space-item"
>
配置审批流程模板
查看审批流程模板
</div>
</div>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,23 @@ export const getAuditProgressStep: (
title: t('dmsHome.defaultScene.steps.safetyRule.innerContents.title_2'),
content: t('dmsHome.defaultScene.steps.safetyRule.innerContents.content_2'),
buttons: [
// #if [ee]
{
key: 'progress-list',
label: t(
'dmsHome.defaultScene.steps.safetyRule.innerContents.action_2_0'
),
action: () => navigate(`/sqle/project/${projectID}/progress`)
},
// #else
{
key: 'progress-list',
label: t(
'dmsHome.defaultScene.steps.safetyRule.innerContents.action_2_1'
),
action: () => navigate(`/sqle/project/${projectID}/progress`)
}
// #endif
]
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ exports[`test base/page/Home should match snapshot 1`] = `
<div
class="ant-space-item"
>
配置审批流程模板
查看审批流程模板
</div>
</div>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`base/System/LoginConnection/Oauth-ce render snap 1`] = `
class="ant-spin-container"
>
<section
class="css-569lt7"
class="css-1oy5rw9"
>
<section
class="config-mode-wrapper"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ exports[`base/System/LoginConnection-ce render snap 1`] = `
class="ant-spin-container"
>
<section
class="css-569lt7"
class="css-1oy5rw9"
>
<section
class="config-mode-wrapper"
Expand Down Expand Up @@ -2617,7 +2617,7 @@ exports[`base/System/LoginConnection-ce render snap 2`] = `
class="ant-spin-container"
>
<section
class="css-569lt7"
class="css-1oy5rw9"
>
<section
class="config-mode-wrapper"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
import { useTranslation } from 'react-i18next';

import { Typography } from 'antd';
import { EnterpriseFeatureDisplay } from '@actiontech/shared';
import LarkAuditSettingEEIndex from './index.ee';

const LarkAuditSetting: React.FC = () => {
const { t } = useTranslation();

return (
<div className="config-form-wrapper">
<EnterpriseFeatureDisplay
featureName={t('dmsSystem.title.larkAudit')}
eeFeatureDescription={
<Typography.Paragraph className="paragraph">
{t('dmsSystem.larkAudit.ceTips')}
</Typography.Paragraph>
}
isConfigPage={true}
>
<LarkAuditSettingEEIndex />
</EnterpriseFeatureDisplay>
<LarkAuditSettingEEIndex />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`base/System/ProcessConnection/LarkAuditSetting-ce render snap 1`] = `
exports[`base/System/ProcessConnection ce should match snap shots 1`] = `
<body>
<div>
<div
class="config-form-wrapper"
<section
class="system-form-wrapper"
>
<div
class="ant-row ant-row-space-between ant-row-middle config-title-wrapper has-border css-dev-only-do-not-override-txh9fw"
>
<div
class="ant-space css-dev-only-do-not-override-txh9fw ant-space-horizontal ant-space-align-center"
>
<div
class="ant-space-item"
>
流程对接
</div>
</div>
</div>
<section
class="css-569lt7"
class="css-1oy5rw9"
>
<section
class="config-mode-wrapper"
class="config-mode-wrapper none-padding-top"
>
<div
class="title"
hidden=""
>
飞书审批
流程对接
</div>
<div
class="left"
>
<div
class="ant-typography paragraph css-dev-only-do-not-override-txh9fw"
>
如果您使用飞书作为协作平台,并且希望在飞书上进行工单审批,您可以启用飞书审批功能。通过将工单审批集成到团队的协作平台中,审批过程将变得更加便捷、高效和可追溯,同时提升数据安全和团队协作的效率。
如果您使用钉钉、飞书作为协作平台,并且希望在这些外部平台上进行工单审批,您可以启用流程对接功能。通过将工单审批集成到团队的协作平台中,审批过程将变得更加便捷、高效和可追溯,同时提升数据安全和团队协作的效率。
</div>
<div
class="ant-space css-dev-only-do-not-override-txh9fw ant-space-vertical full-width-element version-comparison-wrap css-11wj1aa"
Expand Down Expand Up @@ -1195,7 +1209,7 @@ exports[`base/System/ProcessConnection/LarkAuditSetting-ce render snap 1`] = `
<p
class="cont-tip"
>
飞书审批为企业版功能。如您想使用该功能,可以通过以下链接联系我们。
流程对接为企业版功能。如您想使用该功能,可以通过以下链接联系我们。
</p>
<div
class="ant-space css-dev-only-do-not-override-txh9fw ant-space-horizontal ant-space-align-center button-group-wrapper"
Expand Down Expand Up @@ -1325,7 +1339,7 @@ exports[`base/System/ProcessConnection/LarkAuditSetting-ce render snap 1`] = `
</div>
</section>
</section>
</div>
</section>
</div>
</body>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
*/

import { superRender } from '@actiontech/shared/lib/testUtil/customRender';
import LarkAuditSetting from '.';
import ProcessConnection from '.';

describe('base/System/ProcessConnection/LarkAuditSetting-ce', () => {
describe('base/System/ProcessConnection ce', () => {
const customRender = () => {
return superRender(<LarkAuditSetting />);
return superRender(<ProcessConnection />);
};

it('render snap', () => {
it('should match snap shots', () => {
const { baseElement } = customRender();

expect(baseElement).toMatchSnapshot();
Expand Down
15 changes: 13 additions & 2 deletions packages/base/src/page/System/ProcessConnection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,27 @@ import { useTranslation } from 'react-i18next';
import DingTalkSetting from './DingTalkSetting';
import LarkAuditSetting from './LarkAuditSetting';
import SystemBasicTitle from '../components/BasicTitle';
import { EnterpriseFeatureDisplay } from '@actiontech/shared';
import { Typography } from 'antd';

const ProcessConnection = () => {
const { t } = useTranslation();

return (
<SystemBasicTitle title={t('dmsSystem.tabPaneTitle.processConnection')}>
<>
<EnterpriseFeatureDisplay
featureName={t('dmsSystem.tabPaneTitle.processConnection')}
eeFeatureDescription={
<Typography.Paragraph className="paragraph">
{t('dmsSystem.processConnectionCETips')}
</Typography.Paragraph>
}
isConfigPage={true}
showTitle={false}
>
<DingTalkSetting />
<LarkAuditSetting />
</>
</EnterpriseFeatureDisplay>
</SystemBasicTitle>
);
};
Expand Down
Loading
Loading