@nocobase/plugin-workflow-manual 1.9.0-beta.7 → 1.9.0-beta.8
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.
- package/dist/externalVersion.js +10 -10
- package/dist/server/Plugin.js +1 -20
- package/dist/server/actions.js +16 -15
- package/package.json +2 -2
package/dist/externalVersion.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.9.0-beta.
|
|
11
|
+
"@nocobase/client": "1.9.0-beta.8",
|
|
12
12
|
"react": "18.2.0",
|
|
13
13
|
"react-router-dom": "6.28.1",
|
|
14
14
|
"@formily/react": "2.3.0",
|
|
@@ -19,15 +19,15 @@ module.exports = {
|
|
|
19
19
|
"dayjs": "1.11.13",
|
|
20
20
|
"react-i18next": "11.18.6",
|
|
21
21
|
"lodash": "4.17.21",
|
|
22
|
-
"@nocobase/plugin-workflow": "1.9.0-beta.
|
|
23
|
-
"@nocobase/plugin-mobile": "1.9.0-beta.
|
|
24
|
-
"@nocobase/utils": "1.9.0-beta.
|
|
25
|
-
"@nocobase/server": "1.9.0-beta.
|
|
26
|
-
"@nocobase/database": "1.9.0-beta.
|
|
27
|
-
"@nocobase/actions": "1.9.0-beta.
|
|
28
|
-
"@nocobase/resourcer": "1.9.0-beta.
|
|
29
|
-
"@nocobase/test": "1.9.0-beta.
|
|
30
|
-
"@nocobase/plugin-workflow-test": "1.9.0-beta.
|
|
22
|
+
"@nocobase/plugin-workflow": "1.9.0-beta.8",
|
|
23
|
+
"@nocobase/plugin-mobile": "1.9.0-beta.8",
|
|
24
|
+
"@nocobase/utils": "1.9.0-beta.8",
|
|
25
|
+
"@nocobase/server": "1.9.0-beta.8",
|
|
26
|
+
"@nocobase/database": "1.9.0-beta.8",
|
|
27
|
+
"@nocobase/actions": "1.9.0-beta.8",
|
|
28
|
+
"@nocobase/resourcer": "1.9.0-beta.8",
|
|
29
|
+
"@nocobase/test": "1.9.0-beta.8",
|
|
30
|
+
"@nocobase/plugin-workflow-test": "1.9.0-beta.8",
|
|
31
31
|
"@formily/core": "2.3.0",
|
|
32
32
|
"sequelize": "6.35.2"
|
|
33
33
|
};
|
package/dist/server/Plugin.js
CHANGED
|
@@ -40,7 +40,6 @@ __export(Plugin_exports, {
|
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(Plugin_exports);
|
|
42
42
|
var import_server = require("@nocobase/server");
|
|
43
|
-
var import_actions = __toESM(require("@nocobase/actions"));
|
|
44
43
|
var import_plugin_workflow = __toESM(require("@nocobase/plugin-workflow"));
|
|
45
44
|
var jobActions = __toESM(require("./actions"));
|
|
46
45
|
var import_ManualInstruction = __toESM(require("./ManualInstruction"));
|
|
@@ -260,25 +259,7 @@ class Plugin_default extends import_server.Plugin {
|
|
|
260
259
|
async load() {
|
|
261
260
|
this.app.resourceManager.define({
|
|
262
261
|
name: "workflowManualTasks",
|
|
263
|
-
actions:
|
|
264
|
-
list: {
|
|
265
|
-
filter: {
|
|
266
|
-
$or: [
|
|
267
|
-
{
|
|
268
|
-
"workflow.enabled": true
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"workflow.enabled": false,
|
|
272
|
-
status: {
|
|
273
|
-
$ne: import_plugin_workflow.JOB_STATUS.PENDING
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
]
|
|
277
|
-
},
|
|
278
|
-
handler: import_actions.default.list
|
|
279
|
-
},
|
|
280
|
-
...jobActions
|
|
281
|
-
}
|
|
262
|
+
actions: jobActions
|
|
282
263
|
});
|
|
283
264
|
this.app.acl.allow("workflowManualTasks", ["list", "listMine", "get", "submit"], "loggedIn");
|
|
284
265
|
const workflowPlugin = this.app.pm.get(import_plugin_workflow.default);
|
package/dist/server/actions.js
CHANGED
|
@@ -67,7 +67,8 @@ async function submit(context, next) {
|
|
|
67
67
|
const [formKey] = Object.keys(values.result ?? {}).filter((key) => key !== "_");
|
|
68
68
|
const actionKey = (_a = values.result) == null ? void 0 : _a._;
|
|
69
69
|
const actionItem = (_c = (_b = forms[formKey]) == null ? void 0 : _b.actions) == null ? void 0 : _c.find((item) => item.key === actionKey);
|
|
70
|
-
if (task.status !== import_plugin_workflow.JOB_STATUS.PENDING || task.job.status !== import_plugin_workflow.JOB_STATUS.PENDING || task.execution.status !== import_plugin_workflow.EXECUTION_STATUS.STARTED || !task.workflow.enabled ||
|
|
70
|
+
if (task.status !== import_plugin_workflow.JOB_STATUS.PENDING || task.job.status !== import_plugin_workflow.JOB_STATUS.PENDING || task.execution.status !== import_plugin_workflow.EXECUTION_STATUS.STARTED || // !task.workflow.enabled ||
|
|
71
|
+
!actionKey || (actionItem == null ? void 0 : actionItem.status) == null) {
|
|
71
72
|
return context.throw(400);
|
|
72
73
|
}
|
|
73
74
|
task.execution.workflow = task.workflow;
|
|
@@ -114,20 +115,20 @@ async function listMine(context, next) {
|
|
|
114
115
|
context.action.mergeParams({
|
|
115
116
|
filter: {
|
|
116
117
|
$and: [
|
|
117
|
-
{ userId: context.state.currentUser.id }
|
|
118
|
-
{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
118
|
+
{ userId: context.state.currentUser.id }
|
|
119
|
+
// {
|
|
120
|
+
// $or: [
|
|
121
|
+
// {
|
|
122
|
+
// 'workflow.enabled': true,
|
|
123
|
+
// },
|
|
124
|
+
// {
|
|
125
|
+
// 'workflow.enabled': false,
|
|
126
|
+
// status: {
|
|
127
|
+
// $ne: JOB_STATUS.PENDING,
|
|
128
|
+
// },
|
|
129
|
+
// },
|
|
130
|
+
// ],
|
|
131
|
+
// },
|
|
131
132
|
]
|
|
132
133
|
}
|
|
133
134
|
});
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "工作流:人工处理节点",
|
|
5
5
|
"description": "Could be used for workflows which some of decisions are made by users.",
|
|
6
6
|
"description.zh-CN": "用于人工控制部分决策的流程。",
|
|
7
|
-
"version": "1.9.0-beta.
|
|
7
|
+
"version": "1.9.0-beta.8",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/workflow-manual",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@nocobase/test": "1.x",
|
|
31
31
|
"@nocobase/utils": "1.x"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "f3d4f3d1ba7adbf4d4c60e656c23da45565769c8",
|
|
34
34
|
"keywords": [
|
|
35
35
|
"Workflow"
|
|
36
36
|
]
|