refactor: remove notice and approval (#1276)

Reviewed-on: daoyoucloud/tachybase#1276
This commit is contained in:
sealday 2024-07-05 10:44:46 +08:00
parent 7ef5e03b09
commit fbc9ee8e26
34 changed files with 1323 additions and 1200 deletions

View File

@ -0,0 +1,24 @@
import { DataTypes } from '@tachybase/database';
import { Migration } from '../migration';
export default class extends Migration {
on = 'beforeLoad';
appVersion = '<0.21.65';
async up() {
console.log('remove workflow notice');
await this.pm.repository.destroy({
filter: {
name: 'workflow-notice',
},
});
console.log('remove approval');
await this.pm.repository.destroy({
filter: {
name: 'approval',
},
});
}
}

View File

@ -1,2 +0,0 @@
/node_modules
/src

View File

@ -1 +0,0 @@
# @hera/plugin-approval

View File

@ -1,2 +0,0 @@
export * from './dist/client';
export { default } from './dist/client';

View File

@ -1 +0,0 @@
module.exports = require('./dist/client/index.js');

View File

@ -1,34 +0,0 @@
{
"name": "@hera/plugin-approval",
"displayName": "Workflow: Approval Center",
"version": "0.1.59",
"description": "Can configure a universal approval process to complete the complete approval process in the approval center.",
"keywords": [
"Workflow"
],
"main": "dist/server/index.js",
"devDependencies": {
"@ant-design/icons": "~5.3.7",
"@tachybase/actions": "workspace:*",
"@tachybase/components": "workspace:*",
"@tachybase/data-source-manager": "workspace:*",
"@tachybase/database": "workspace:*",
"@tachybase/plugin-ui-schema-storage": "workspace:*",
"@tachybase/schema": "workspace:*",
"@tachybase/utils": "workspace:*",
"@types/lodash": "4.17.5",
"antd": "5.18.3",
"lodash": "^4.17.21",
"react": "~18.3.1",
"react-i18next": "^14.1.2",
"sequelize": "^6.26.0"
},
"peerDependencies": {
"@tachybase/client": "workspace:*",
"@tachybase/plugin-workflow": "workspace:*",
"@tachybase/server": "workspace:*",
"@tachybase/test": "workspace:*"
},
"description.zh-CN": "可配置通用的审批流程,在审批中心完成审批的完整操作。",
"displayName.zh-CN": "工作流:审批中心"
}

View File

@ -1,2 +0,0 @@
export * from './dist/server';
export { default } from './dist/server';

View File

@ -1 +0,0 @@
module.exports = require('./dist/server/index.js');

View File

@ -1,3 +0,0 @@
import { Plugin } from '@tachybase/client';
export default class PluginApproval extends Plugin {}

View File

@ -1,2 +0,0 @@
export * from './server';
export { default } from './server';

View File

@ -1,67 +0,0 @@
{
"Approval": "Approval",
"Approvals": "Approvals",
"Approval blocks": "Approval blocks",
"Launch": "Launch",
"Todos": "Todos",
"Approval applications": "Approval applications",
"Approval todos": "Approval todos",
"Related approvals": "Related approvals",
"Apply new": "Apply new",
"Apply": "Apply",
"Initiator": "Initiator",
"Application content": "Application content",
"Approval process": "Approval process",
"Approval Summary": "Approval Summary",
"History": "History",
"Approval ID": "Approval ID",
"Node": "Node",
"Assignee": "Assignees",
"Assignees": "Assignees",
"Add assignee": "Add assignee",
"Negotiation mode": "Negotiation mode",
"Or": "Or",
"And": "And",
"Voting": "Voting",
"Anyone approve or reject as result.": "Anyone approve or reject as result.",
"Everyone approve as approved, or any one reject as rejected.": "Everyone approve as approved, or any one reject as rejected.",
"Approve when approvals rate greater than the set percentage, reject when rejections rate greater than or equal to (1 - percentage).": "Approve when approvals rate greater than the set percentage, reject when rejections rate greater than or equal to (1 - percentage).",
"Order": "Order",
"Sequentially": "Sequentially",
"Parallelly": "Parallelly",
"Draft": "Draft",
"Withdraw": "Withdraw",
"Are you sure you want to withdraw it?": "Are you sure you want to withdraw it?",
"Returned": "Returned",
"Submitted": "Submitted",
"Processing": "Processing",
"Approved": "Approved",
"Rejected": "Rejected",
"Approve": "Approve",
"Reject": "Reject",
"Return": "Return",
"Canceled": "Canceled",
"Assigned": "Assigned",
"Pending": "Pending",
"Withdrawn": "Withdrawn",
"Unprocessed": "Unprocessed",
"User interface": "User interface",
"View user interface": "View user interface",
"Configure user interface": "Configure user interface",
"Apply form": "Apply form",
"Withdrawable": "Withdrawable",
"Returnable": "Returnable",
"Comment": "Comment",
"Event will be triggered when submitted current workflow bound form action, or new application from approval block.": "Event will be triggered when submitted current workflow bound form action, or new application from approval block.",
"Used to perform manual approval operations within approval workflow, approvers can perform approval action through the to-do list in the approval block, such as approval, rejection or return.": "Used to perform manual approval operations within approval workflow, approvers can perform approval action through the to-do list in the approval block, such as approval, rejection or return.",
"Pass mode": "Pass mode",
"Passthrough mode": "Passthrough mode",
"When rejected or returned, the workflow will be terminated immediately.": "When rejected or returned, the workflow will be terminated immediately.",
"Branch mode": "Branch mode",
"Could run different branch based on result.": "Could run different branch based on result.",
"End on reject": "End on reject",
"If checked, the workflow will be terminated after rejection branch processed.": "If checked, the workflow will be terminated after rejection branch processed.",
"Disabled": "Disabled",
"Trigger data": "Trigger data",
"Select fields to display in the approval summary": "Select fields to display in the approval summary"
}

View File

@ -1,82 +0,0 @@
{
"Approval event": "审批事件",
"Approval": "审批",
"Approvals": "审批",
"Approval blocks": "审批区块",
"Launch": "发起",
"Todos": "待办",
"Approval applications": "审批申请",
"Approval todos": "审批待办",
"Related approvals": "相关审批",
"Apply new": "发起新申请",
"Apply": "发起",
"Initiator": "发起人",
"Application content": "申请内容",
"Approval process": "审批处理",
"Approval Summary": "审批摘要",
"No data yet": "暂无数据",
"Approval ID": "单据编号",
"Current status": "当前状态",
"Task node": "任务节点",
"Assignee": "审批人",
"Assignees": "审批人",
"Add assignee": "添加审批人",
"Select assignees": "选择审批人",
"Query assignees": "查询审批人",
"Negotiation mode": "协商模式",
"Or": "或签",
"And": "会签",
"Voting": "投票",
"The approval or rejection by anyone of them is the result.": "任意一人通过或否决即为结果。",
"If it's approved by all, it's approved. If it's rejected by anyone, it's rejected.": "所有人通过才通过,任意一人否决则否决。",
"Approved if the approval rate is greater than the set percentage, otherwise rejected.": "通过率大于设置的百分比时通过,否则否决。",
"Order": "多人处理顺序",
"Parallelly": "并行",
"Multiple approvers can approve in any order.": "多个审批人可以任意顺序审批。",
"Sequentially": "顺序",
"Multiple approvers in sequential order.": "多个审批人按照排序审批。",
"Save draft": "保存草稿",
"Draft": "草稿",
"Withdraw": "撤回",
"Are you sure you want to withdraw it?": "确定要撤回吗?",
"Returned": "退回",
"Submitted": "提交",
"Processing": "处理中",
"Approved": "通过",
"Rejected": "否决",
"Approve": "通过",
"Reject": "否决",
"Return": "退回",
"Canceled": "取消",
"Assigned": "已分配",
"Pending": "待处理",
"Withdrawn": "撤回",
"Unprocessed": "未处理",
"Where to initiate and approve": "发起和审批的位置",
"Initiate and approve in data blocks only": "仅在数据区块中发起和审批",
"Actions from any form block can be bound to this workflow for initiating approvals, and the approval process can be handled and tracked in the approval block of a single record which is typically applicable to business data.": "可以将任意表单区块的操作绑定到该工作流,用于发起审批,并在单条数据的审批区块里处理和跟踪审批过程,通常适用于业务数据。",
"Initiate and approve in both data blocks and global approval blocks": "在数据区块和审批中心都可以发起和审批",
"In addition to data blocks, a global approval block can also be used to initiates and processes approvals, which typically applies to administrative data.": "除了数据区块,还可以在全局的审批中心发起和处理审批,这通常适用于行政数据。",
"Initiator's interface": "发起人的操作界面",
"Approver's interface": "审批人的操作界面",
"Go to configure": "进入配置",
"For initiating approvals, or viewing and manipulating initiated approvals.": "用于发起审批,或者查看和操作已发起的审批。",
"Apply form": "申请表单",
"Allowed to be withdrawn": "允许撤回",
"Allow the initiator to withdraw the approval before the approval starts.": "在审批开始之前,允许发起人撤回审批。",
"Returnable": "可退回",
"Comment": "意见",
"Triggered when an approval request is initiated through an action button or API. Dedicated to the approval process, with exclusive approval node and block for managing documents and tracking processing processes.": "通过操作按钮或 API 发起审批申请时触发。专用于审批流程,有专属的审批节点和区块用于管理单据和追踪处理过程。",
"Manual approval operations within the approval process, the approver can approve in the global approval block or in the approval block of a single record.": "在审批流程内进行人工审批操作,审批人可以在全局的审批区块里进行审批,也可以在单条数据的审批区块里审批。",
"Pass mode": "通过模式",
"Passthrough mode": "直通模式",
"When rejected or returned, the workflow will be terminated immediately.": "当否决或退回时,工作流将立即终止。",
"Branch mode": "分支模式",
"Could run different branch based on result.": "产生结果后可按结果继续不同的分支。",
"End the workflow after rejection branch": "否决后终止流程",
"When checked, the workflow will terminate when the rejection branch ends.": "勾选后,否决分支结束后工作流将终止。",
"Disabled": "已失效",
"Submission may be withdrawn, please try refresh the list.": "提交可能已被撤回,请尝试刷新列表。",
"Trigger data": "触发器数据",
"Select fields to display in the approval summary": "选择审批摘要显示字段"
}

View File

@ -1 +0,0 @@
export { default } from './plugin';

View File

@ -1,5 +0,0 @@
import { Plugin } from '@tachybase/server';
export class PluginWorkflowApproval extends Plugin {}
export default PluginWorkflowApproval;

View File

@ -1,2 +0,0 @@
/node_modules
/src

View File

@ -1 +0,0 @@
# @tachybase/plugin-workflow-notice

View File

@ -1,2 +0,0 @@
export * from './dist/client';
export { default } from './dist/client';

View File

@ -1 +0,0 @@
module.exports = require('./dist/client/index.js');

View File

@ -1,34 +0,0 @@
{
"name": "@tachybase/plugin-workflow-notice",
"displayName": "Workflow: Notice",
"version": "0.21.65",
"description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.",
"keywords": [
"Workflow",
"Notice"
],
"main": "dist/server/index.js",
"devDependencies": {
"@ant-design/icons": "~5.3.7",
"@tachybase/actions": "workspace:*",
"@tachybase/components": "workspace:*",
"@tachybase/data-source-manager": "workspace:*",
"@tachybase/database": "workspace:*",
"@tachybase/plugin-ui-schema-storage": "workspace:*",
"@tachybase/schema": "workspace:*",
"@tachybase/utils": "workspace:*",
"antd": "5.18.3",
"lodash": "^4.17.21",
"react": "~18.3.1",
"react-i18next": "^14.1.2",
"sequelize": "^6.26.0"
},
"peerDependencies": {
"@tachybase/client": "workspace:*",
"@tachybase/plugin-workflow": "workspace:*",
"@tachybase/server": "workspace:*",
"@tachybase/test": "workspace:*"
},
"description.zh-CN": "工作流节点, 通知。",
"displayName.zh-CN": "工作流: 通知"
}

View File

@ -1,2 +0,0 @@
export * from './dist/server';
export { default } from './dist/server';

View File

@ -1 +0,0 @@
module.exports = require('./dist/server/index.js');

View File

@ -1,5 +0,0 @@
import { Plugin } from '@tachybase/client';
class PluginWorkflowNoticeClient extends Plugin {}
export default PluginWorkflowNoticeClient;

View File

@ -1,2 +0,0 @@
export * from './server';
export { default } from './server';

View File

@ -1,17 +0,0 @@
{
"Notice": "Notice",
"In the workflow, notification messages can be viewed by the notified person in the notification center.":"In the workflow, notification messages can be viewed by the notified person in the notification center.",
"The Notified Person": "The Notified Person",
"Add Notified Person": "Add Notified Person",
"Select Notified Person": "Select Notified Person",
"Query Notified Person": "Query Notified Person",
"Show Notice Detail": "Show Notice Detail",
"Go to configure": "Go to configure",
"The interface of show notice detail": "The interface of show notice detail",
"Notice blocks": "Notice blocks",
"Notice Center": "Notice Center",
"Summary": "Summary",
"Task node": "Task node",
"ID": "ID",
"Content Detail": "Content Detail"
}

View File

@ -1,17 +0,0 @@
{
"Notice": "通知",
"In the workflow, notification messages can be viewed by the notified person in the notification center.":"在工作流程中通知消息, 被通知人可以在通知中心查看到消息.",
"The Notified Person": "被通知人",
"Add Notified Person": "添加被通知人",
"Select Notified Person": "选择被通知人",
"Query Notified Person": "查询被通知人",
"Show Notice Detail":"显示通知详情",
"Go to configure": "进行配置",
"The interface of show notice detail": "显示通知详情界面",
"Notice blocks": "通知区块",
"Notice Center": "工作流:通知中心",
"Summary": "摘要",
"Task node": "任务节点",
"ID": "编号",
"Content Detail": "内容详情"
}

View File

@ -1 +0,0 @@
export { default } from './plugin';

View File

@ -1,5 +0,0 @@
import { Plugin } from '@tachybase/server';
export class PluginWorkflowNoticeServer extends Plugin {}
export default PluginWorkflowNoticeServer;

View File

@ -4,7 +4,6 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/server/index.js", "main": "./lib/server/index.js",
"dependencies": { "dependencies": {
"@hera/plugin-approval": "workspace:*",
"@tachybase/client": "workspace:*", "@tachybase/client": "workspace:*",
"@tachybase/plugin-acl": "workspace:*", "@tachybase/plugin-acl": "workspace:*",
"@tachybase/plugin-action-bulk-edit": "workspace:*", "@tachybase/plugin-action-bulk-edit": "workspace:*",

View File

@ -34,11 +34,8 @@ export class PresetTachyBase extends Plugin {
'kanban', 'kanban',
'logger', 'logger',
'sequence-field', 'sequence-field',
// @tachybase
'workflow', 'workflow',
// hera
'audit-logs', 'audit-logs',
'approval',
]; ];
get builtInPlugins() { get builtInPlugins() {

View File

@ -4,7 +4,6 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/server/index.js", "main": "./lib/server/index.js",
"dependencies": { "dependencies": {
"@hera/plugin-approval": "workspace:*",
"@hera/plugin-core": "workspace:*", "@hera/plugin-core": "workspace:*",
"@hera/plugin-homepage": "workspace:*", "@hera/plugin-homepage": "workspace:*",
"@hera/plugin-rental": "workspace:*", "@hera/plugin-rental": "workspace:*",

View File

@ -4,7 +4,6 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/server/index.js", "main": "./lib/server/index.js",
"dependencies": { "dependencies": {
"@hera/plugin-approval": "workspace:*",
"@hera/plugin-core": "workspace:*", "@hera/plugin-core": "workspace:*",
"@hera/plugin-homepage": "workspace:*", "@hera/plugin-homepage": "workspace:*",
"@hera/plugin-rental": "workspace:*", "@hera/plugin-rental": "workspace:*",

View File

@ -13,7 +13,6 @@ export class PluginRental extends PresetTachyBase {
'rental>=0.21.0', 'rental>=0.21.0',
'field-markdown-vditor>=0.21.31', 'field-markdown-vditor>=0.21.31',
'comments>=0.21.31', 'comments>=0.21.31',
'workflow-notice>=0.21.43',
'approval-mobile>=0.21.43', 'approval-mobile>=0.21.43',
'external-data-source>=0.21.43', 'external-data-source>=0.21.43',
]; ];

View File

@ -4,7 +4,6 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"main": "./lib/server/index.js", "main": "./lib/server/index.js",
"dependencies": { "dependencies": {
"@hera/plugin-approval": "workspace:*",
"@hera/plugin-approval-mobile": "workspace:*", "@hera/plugin-approval-mobile": "workspace:*",
"@hera/plugin-core": "workspace:*", "@hera/plugin-core": "workspace:*",
"@hera/plugin-rental": "workspace:*", "@hera/plugin-rental": "workspace:*",

File diff suppressed because it is too large Load Diff