@tachybase/plugin-workflow-approval 1.6.22 → 1.6.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  module.exports = {
2
- "@tachybase/client": "1.6.22",
3
- "@tego/server": "1.6.13",
4
- "@tachybase/module-workflow": "1.6.22",
2
+ "@tachybase/client": "1.6.23",
3
+ "@tego/server": "1.6.16",
4
+ "@tachybase/module-workflow": "1.6.23",
5
5
  "lodash": "4.17.21",
6
6
  "react": "18.3.1",
7
- "@tachybase/schema": "1.6.13",
7
+ "@tachybase/schema": "1.6.16",
8
8
  "antd": "5.22.5",
9
- "@tachybase/module-ui-schema": "1.6.22",
9
+ "@tachybase/module-ui-schema": "1.6.23",
10
10
  "sequelize": "6.37.5",
11
- "@tego/client": "1.6.13",
11
+ "@tego/client": "1.6.16",
12
12
  "react-i18next": "16.2.1",
13
13
  "react-router-dom": "6.28.1",
14
14
  "@ant-design/icons": "6.1.0",
@@ -80,23 +80,25 @@ const _ApprovalTrigger = class _ApprovalTrigger extends import_module_workflow.T
80
80
  appends: workflow.config.appends,
81
81
  transaction: this.workflow.useDataSourceTransaction(dataSourceName, transaction)
82
82
  });
83
- this.workflow.trigger(
84
- workflow,
85
- {
86
- data: (0, import_module_workflow.toJSON)(data),
87
- approvalId: approval.id,
88
- applicantRoleName: approval.applicantRoleName,
89
- summary: (0, import_tools.getSummary)({
90
- summaryConfig: workflow.config.summary,
91
- data,
92
- collection,
93
- // Fix: type assertion to bypass typing error
94
- app: this.workflow.app
95
- }),
96
- collectionName: approval.collectionName
97
- },
98
- { transaction }
99
- );
83
+ const context = {
84
+ data: (0, import_module_workflow.toJSON)(data),
85
+ approvalId: approval.id,
86
+ applicantRoleName: approval.applicantRoleName,
87
+ summary: (0, import_tools.getSummary)({
88
+ summaryConfig: workflow.config.summary,
89
+ data,
90
+ collection,
91
+ // Fix: type assertion to bypass typing error
92
+ app: this.workflow.app
93
+ }),
94
+ collectionName: approval.collectionName
95
+ };
96
+ const triggerWorkflow = () => this.workflow.trigger(workflow, context);
97
+ if (transaction == null ? void 0 : transaction.afterCommit) {
98
+ transaction.afterCommit(triggerWorkflow);
99
+ } else {
100
+ triggerWorkflow();
101
+ }
100
102
  };
101
103
  this.onExecutionCreate = async (execution, { transaction }) => {
102
104
  const workflow = await execution.getWorkflow({ transaction });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/plugin-workflow-approval",
3
3
  "displayName": "Approval",
4
- "version": "1.6.22",
4
+ "version": "1.6.23",
5
5
  "description": "Approval base in Workflow",
6
6
  "keywords": [
7
7
  "Approval",
@@ -19,10 +19,10 @@
19
19
  "main": "dist/server/index.js",
20
20
  "devDependencies": {
21
21
  "@ant-design/icons": "^6.1.0",
22
- "@tachybase/schema": "1.6.13",
23
- "@tachybase/test": "1.6.13",
24
- "@tego/client": "1.6.13",
25
- "@tego/server": "1.6.13",
22
+ "@tachybase/schema": "1.6.16",
23
+ "@tachybase/test": "1.6.16",
24
+ "@tego/client": "1.6.16",
25
+ "@tego/server": "1.6.16",
26
26
  "@types/file-saver": "^2.0.7",
27
27
  "@types/lodash": "^4.17.20",
28
28
  "ahooks": "^3.9.0",
@@ -36,9 +36,9 @@
36
36
  "react-i18next": "16.2.1",
37
37
  "react-router-dom": "6.28.1",
38
38
  "sequelize": "6.37.5",
39
- "@tachybase/client": "1.6.22",
40
- "@tachybase/module-workflow": "1.6.22",
41
- "@tachybase/module-ui-schema": "1.6.22"
39
+ "@tachybase/client": "1.6.23",
40
+ "@tachybase/module-workflow": "1.6.23",
41
+ "@tachybase/module-ui-schema": "1.6.23"
42
42
  },
43
43
  "description.zh-CN": "审批系统是一个强大的BPM工具,为业务流程自动化提供基础支持,同时具备高度灵活性和可扩展性,确保审批流程的效率和合规性,助力企业释放创新潜力。",
44
44
  "displayName.zh-CN": "审批"