@nocobase/plugin-workflow-manual 2.0.0-alpha.9 → 2.0.0-beta.10

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.
@@ -0,0 +1,36 @@
1
+ {
2
+ "All pass": "All pass",
3
+ "Any pass": "Any pass",
4
+ "Anyone pass": "Anyone pass",
5
+ "Assignee": "Assignee",
6
+ "Assignees": "Assignees",
7
+ "Collaboratively": "Collaboratively",
8
+ "Configure user interface": "Configure user interface",
9
+ "Continue the process": "Continue the process",
10
+ "Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.": "Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.",
11
+ "Create record form": "Create record form",
12
+ "Custom form": "Custom form",
13
+ "Data record": "Data record",
14
+ "Each user has own task": "Each user has own task",
15
+ "Everyone shares one task": "Everyone shares one task",
16
+ "Everyone should pass": "Everyone should pass",
17
+ "Field name existed in form": "Field name existed in form",
18
+ "Filter settings": "Filter settings",
19
+ "Manual": "Manual",
20
+ "My manual tasks": "My manual tasks",
21
+ "Negotiation": "Negotiation",
22
+ "Please check one of your update record form, and add at least one filter condition in form settings.": "Please check one of your update record form, and add at least one filter condition in form settings.",
23
+ "Save temporarily": "Save temporarily",
24
+ "Separately": "Separately",
25
+ "Task": "Task",
26
+ "Task node": "Task node",
27
+ "Task title": "Task title",
28
+ "Terminate the process": "Terminate the process",
29
+ "Title of each task item. Default to node title.": "Title of each task item. Default to node title.",
30
+ "Unprocessed": "Unprocessed",
31
+ "Update record form": "Update record form",
32
+ "User interface": "User interface",
33
+ "Values preset in this form will override user submitted ones when continue or reject.": "Values preset in this form will override user submitted ones when continue or reject.",
34
+ "View user interface": "View user interface",
35
+ "Workflow todos": "Workflow todos"
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "All pass": "Tất cả thông qua",
3
+ "Any pass": "Bất kỳ thông qua",
4
+ "Anyone pass": "Bất kỳ ai thông qua",
5
+ "Assignee": "Người được giao",
6
+ "Assignees": "Những người được giao",
7
+ "Collaboratively": "Hợp tác",
8
+ "Configure user interface": "Cấu hình giao diện người dùng",
9
+ "Continue the process": "Tiếp tục quy trình",
10
+ "Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.": "Có thể được sử dụng để gửi dữ liệu thủ công và xác định xem có tiếp tục hay thoát. Quy trình sẽ tạo một mục việc cần làm cho người dùng được chỉ định khi đến nút thủ công và tiếp tục xử lý sau khi người dùng gửi biểu mẫu.",
11
+ "Create record form": "Tạo biểu mẫu bản ghi",
12
+ "Custom form": "Biểu mẫu tùy chỉnh",
13
+ "Data record": "Bản ghi dữ liệu",
14
+ "Each user has own task": "Mỗi người dùng có nhiệm vụ riêng",
15
+ "Everyone shares one task": "Mọi người chia sẻ một nhiệm vụ",
16
+ "Everyone should pass": "Mọi người phải thông qua",
17
+ "Field name existed in form": "Tên trường đã tồn tại trong biểu mẫu",
18
+ "Filter settings": "Cài đặt bộ lọc",
19
+ "Manual": "Thủ công",
20
+ "My manual tasks": "Nhiệm vụ thủ công của tôi",
21
+ "Negotiation": "Thương lượng",
22
+ "Please check one of your update record form, and add at least one filter condition in form settings.": "Vui lòng kiểm tra một trong các biểu mẫu cập nhật bản ghi của bạn và thêm ít nhất một điều kiện lọc trong cài đặt biểu mẫu.",
23
+ "Save temporarily": "Lưu tạm thời",
24
+ "Separately": "Riêng biệt",
25
+ "Task": "Nhiệm vụ",
26
+ "Task node": "Nút nhiệm vụ",
27
+ "Task title": "Tiêu đề nhiệm vụ",
28
+ "Terminate the process": "Kết thúc quy trình",
29
+ "Title of each task item. Default to node title.": "Tiêu đề của mỗi mục nhiệm vụ. Mặc định là tiêu đề nút.",
30
+ "Unprocessed": "Chưa xử lý",
31
+ "Update record form": "Cập nhật biểu mẫu bản ghi",
32
+ "User interface": "Giao diện người dùng",
33
+ "Values preset in this form will override user submitted ones when continue or reject.": "Các giá trị đã đặt trước trong biểu mẫu này sẽ ghi đè lên những giá trị người dùng gửi khi tiếp tục hoặc từ chối.",
34
+ "View user interface": "Xem giao diện người dùng",
35
+ "Workflow todos": "Công việc cần làm của quy trình"
36
+ }
@@ -1,35 +1,36 @@
1
1
  {
2
- "Manual": "人工处理",
3
- "Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.": "可用于人工提交数据,并决定是否继续或退出流程。工作流在执行到人工节点时会为被指派的用户生成待办事项,直到用户提交对应表单后继续处理该流程。",
4
- "Values preset in this form will override user submitted ones when continue or reject.": "表单中预设的字段值会在用户提交继续或拒绝时覆盖相应字段的值。",
2
+ "All pass": "全部通过",
3
+ "Any pass": "任意通过",
4
+ "Anyone pass": "任何一人通过即通过",
5
5
  "Assignee": "负责人",
6
6
  "Assignees": "负责人",
7
- "User interface": "操作界面",
7
+ "Collaboratively": "协作处理",
8
8
  "Configure user interface": "配置界面",
9
- "View user interface": "查看界面",
10
- "Separately": "分别处理",
9
+ "Continue the process": "继续流程",
10
+ "Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.": "可用于人工提交数据,并决定是否继续或退出流程。工作流在执行到人工节点时会为被指派的用户生成待办事项,直到用户提交对应表单后继续处理该流程。",
11
+ "Create record form": "新增数据表单",
12
+ "Custom form": "自定义表单",
13
+ "Data record": "数据记录",
11
14
  "Each user has own task": "每个人处理各自的任务",
12
- "Collaboratively": "协作处理",
13
15
  "Everyone shares one task": "所有人共享同一个任务",
14
- "Negotiation": "协商机制",
15
- "All pass": "全部通过",
16
16
  "Everyone should pass": "每个人通过才通过",
17
- "Any pass": "任意通过",
18
- "Anyone pass": "任何一人通过即通过",
19
17
  "Field name existed in form": "表单中已有对应标识的字段",
20
- "Continue the process": "继续流程",
21
- "Terminate the process": "终止流程",
22
- "Save temporarily": "暂存",
23
- "Custom form": "自定义表单",
24
- "Data record": "数据记录",
25
- "Create record form": "新增数据表单",
26
- "Update record form": "更新数据表单",
27
18
  "Filter settings": "筛选设置",
28
- "Workflow todos": "工作流待办",
29
- "Task node": "任务节点",
30
- "Unprocessed": "未处理",
31
- "Please check one of your update record form, and add at least one filter condition in form settings.": "请检查您的其中的更新数据表单,并在表单设置中至少添加一个筛选条件。",
19
+ "Manual": "人工处理",
32
20
  "My manual tasks": "我的人工任务",
21
+ "Negotiation": "协商机制",
22
+ "Please check one of your update record form, and add at least one filter condition in form settings.": "请检查您的其中的更新数据表单,并在表单设置中至少添加一个筛选条件。",
23
+ "Save temporarily": "暂存",
24
+ "Separately": "分别处理",
25
+ "Task": "Task",
26
+ "Task node": "任务节点",
33
27
  "Task title": "任务名称",
34
- "Title of each task item. Default to node title.": "每项任务的名称。默认为节点名称。"
35
- }
28
+ "Terminate the process": "终止流程",
29
+ "Title of each task item. Default to node title.": "每项任务的名称。默认为节点名称。",
30
+ "Unprocessed": "未处理",
31
+ "Update record form": "更新数据表单",
32
+ "User interface": "操作界面",
33
+ "Values preset in this form will override user submitted ones when continue or reject.": "表单中预设的字段值会在用户提交继续或拒绝时覆盖相应字段的值。",
34
+ "View user interface": "查看界面",
35
+ "Workflow todos": "工作流待办"
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "All pass": "All pass",
3
+ "Any pass": "Any pass",
4
+ "Anyone pass": "Anyone pass",
5
+ "Assignee": "Assignee",
6
+ "Assignees": "Assignees",
7
+ "Collaboratively": "Collaboratively",
8
+ "Configure user interface": "Configure user interface",
9
+ "Continue the process": "Continue the process",
10
+ "Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.": "Could be used for manually submitting data, and determine whether to continue or exit. Workflow will generate a todo item for assigned user when it reaches a manual node, and continue processing after user submits the form.",
11
+ "Create record form": "Create record form",
12
+ "Custom form": "Custom form",
13
+ "Data record": "Data record",
14
+ "Each user has own task": "Each user has own task",
15
+ "Everyone shares one task": "Everyone shares one task",
16
+ "Everyone should pass": "Everyone should pass",
17
+ "Field name existed in form": "Field name existed in form",
18
+ "Filter settings": "Filter settings",
19
+ "Manual": "Manual",
20
+ "My manual tasks": "My manual tasks",
21
+ "Negotiation": "Negotiation",
22
+ "Please check one of your update record form, and add at least one filter condition in form settings.": "Please check one of your update record form, and add at least one filter condition in form settings.",
23
+ "Save temporarily": "Save temporarily",
24
+ "Separately": "Separately",
25
+ "Task": "Task",
26
+ "Task node": "Task node",
27
+ "Task title": "Task title",
28
+ "Terminate the process": "Terminate the process",
29
+ "Title of each task item. Default to node title.": "Title of each task item. Default to node title.",
30
+ "Unprocessed": "Unprocessed",
31
+ "Update record form": "Update record form",
32
+ "User interface": "User interface",
33
+ "Values preset in this form will override user submitted ones when continue or reject.": "Values preset in this form will override user submitted ones when continue or reject.",
34
+ "View user interface": "View user interface",
35
+ "Workflow todos": "Workflow todos"
36
+ }
@@ -47,12 +47,10 @@ var import_constants = require("../common/constants");
47
47
  class Plugin_default extends import_server.Plugin {
48
48
  onTaskSave = async (task, { transaction }) => {
49
49
  const workflowPlugin = this.app.pm.get(import_plugin_workflow.default);
50
- const workflowId = Array.from(workflowPlugin.enabledCache.keys());
51
50
  const ModelClass = task.constructor;
52
51
  const pending = await ModelClass.count({
53
52
  where: {
54
53
  userId: task.userId,
55
- workflowId,
56
54
  status: import_constants.TASK_STATUS.PENDING
57
55
  },
58
56
  include: [
@@ -71,8 +69,7 @@ class Plugin_default extends import_server.Plugin {
71
69
  });
72
70
  const all = await ModelClass.count({
73
71
  where: {
74
- userId: task.userId,
75
- workflowId
72
+ userId: task.userId
76
73
  },
77
74
  col: "id",
78
75
  transaction
@@ -87,6 +84,9 @@ class Plugin_default extends import_server.Plugin {
87
84
  if (!execution.workflow) {
88
85
  execution.workflow = workflowPlugin.enabledCache.get(execution.workflowId) || await execution.getWorkflow({ transaction });
89
86
  }
87
+ if (!execution.workflow) {
88
+ return;
89
+ }
90
90
  if (!execution.workflow.nodes) {
91
91
  execution.workflow.nodes = await execution.workflow.getNodes({ transaction });
92
92
  }
@@ -113,8 +113,7 @@ class Plugin_default extends import_server.Plugin {
113
113
  const pendingCounts = await WorkflowManualTaskModel.count({
114
114
  where: {
115
115
  status: import_constants.TASK_STATUS.PENDING,
116
- userId,
117
- workflowId: execution.workflowId
116
+ userId
118
117
  },
119
118
  include: [
120
119
  {
@@ -132,8 +131,7 @@ class Plugin_default extends import_server.Plugin {
132
131
  });
133
132
  const allCounts = await WorkflowManualTaskModel.count({
134
133
  where: {
135
- userId,
136
- workflowId: execution.workflowId
134
+ userId
137
135
  },
138
136
  col: "id",
139
137
  group: ["userId"],
@@ -261,12 +259,11 @@ class Plugin_default extends import_server.Plugin {
261
259
  name: "workflowManualTasks",
262
260
  actions: jobActions
263
261
  });
264
- this.app.acl.allow("workflowManualTasks", ["list", "listMine", "get", "submit"], "loggedIn");
262
+ this.app.acl.allow("workflowManualTasks", ["listMine", "get", "submit"], "loggedIn");
265
263
  const workflowPlugin = this.app.pm.get(import_plugin_workflow.default);
266
264
  workflowPlugin.registerInstruction("manual", import_ManualInstruction.default);
267
265
  this.db.on("workflowManualTasks.afterSave", this.onTaskSave);
268
266
  this.db.on("workflowManualTasks.afterDestroy", this.onTaskSave);
269
267
  this.db.on("executions.afterUpdate", this.onExecutionStatusChange);
270
- this.db.on("workflows.afterUpdate", this.onWorkflowStatusChange);
271
268
  }
272
269
  }
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-workflow-manual",
3
3
  "displayName": "Workflow: Manual node",
4
+ "displayName.ru-RU": "Рабочий процесс: Узел ручной обработки",
4
5
  "displayName.zh-CN": "工作流:人工处理节点",
5
6
  "description": "Could be used for workflows which some of decisions are made by users.",
7
+ "description.ru-RU": "Может использоваться в рабочих процессах, где какие-то решения принимаются пользователями.",
6
8
  "description.zh-CN": "用于人工控制部分决策的流程。",
7
- "version": "2.0.0-alpha.9",
9
+ "version": "2.0.0-beta.10",
8
10
  "license": "AGPL-3.0",
9
11
  "main": "./dist/server/index.js",
10
12
  "homepage": "https://docs.nocobase.com/handbook/workflow-manual",
13
+ "homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/workflow-manual",
11
14
  "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/workflow-manual",
12
15
  "devDependencies": {
13
16
  "@ant-design/icons": "5.x",
@@ -30,7 +33,7 @@
30
33
  "@nocobase/test": "2.x",
31
34
  "@nocobase/utils": "2.x"
32
35
  },
33
- "gitHead": "4a9acf96f21a3aa35bccbd188b942595b09da0a9",
36
+ "gitHead": "9943dc4b0fdedcac3f304714b58635ae441e2560",
34
37
  "keywords": [
35
38
  "Workflow"
36
39
  ]