@nocobase/plugin-workflow-manual 1.7.0-alpha.1 → 1.7.0-beta.2

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.
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.7.0-alpha.1",
11
+ "@nocobase/client": "1.7.0-beta.2",
12
12
  "react": "18.2.0",
13
13
  "@formily/react": "2.3.0",
14
14
  "@formily/antd-v5": "1.1.9",
@@ -18,13 +18,13 @@ module.exports = {
18
18
  "dayjs": "1.11.10",
19
19
  "react-i18next": "11.18.6",
20
20
  "lodash": "4.17.21",
21
- "@nocobase/plugin-workflow": "1.7.0-alpha.1",
22
- "@nocobase/utils": "1.7.0-alpha.1",
23
- "@nocobase/server": "1.7.0-alpha.1",
24
- "@nocobase/actions": "1.7.0-alpha.1",
25
- "@nocobase/resourcer": "1.7.0-alpha.1",
26
- "@nocobase/test": "1.7.0-alpha.1",
27
- "@nocobase/plugin-workflow-test": "1.7.0-alpha.1",
21
+ "@nocobase/plugin-workflow": "1.7.0-beta.2",
22
+ "@nocobase/utils": "1.7.0-beta.2",
23
+ "@nocobase/server": "1.7.0-beta.2",
24
+ "@nocobase/actions": "1.7.0-beta.2",
25
+ "@nocobase/resourcer": "1.7.0-beta.2",
26
+ "@nocobase/test": "1.7.0-beta.2",
27
+ "@nocobase/plugin-workflow-test": "1.7.0-beta.2",
28
28
  "@formily/core": "2.3.0",
29
- "@nocobase/database": "1.7.0-alpha.1"
29
+ "@nocobase/database": "1.7.0-beta.2"
30
30
  };
@@ -0,0 +1,36 @@
1
+ {
2
+ "Manual": "Manuell",
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.": "Kann für die manuelle Übermittlung von Daten verwendet werden und bestimmt, ob fortgefahren oder beendet werden soll. Der Workflow generiert ein To-Do-Element für den zugewiesenen Benutzer, wenn er einen manuellen Knoten erreicht, und setzt die Verarbeitung fort, nachdem der Benutzer das Formular abgesendet hat.",
4
+ "Values preset in this form will override user submitted ones when continue or reject.": "Die in diesem Formular voreingestellten Werte überschreiben die vom Benutzer übermittelten Werte beim Fortfahren oder Ablehnen.",
5
+ "Assignee": "Beauftragter",
6
+ "Assignees": "Beauftragte",
7
+ "User interface": "Benutzeroberfläche",
8
+ "Configure user interface": "Benutzeroberfläche konfigurieren",
9
+ "View user interface": "Benutzeroberfläche anzeigen",
10
+ "Separately": "Getrennt",
11
+ "Each user has own task": "Jeder Benutzer hat eine eigene Aufgabe",
12
+ "Collaboratively": "Kollaborativ",
13
+ "Everyone shares one task": "Alle teilen sich eine Aufgabe",
14
+ "Negotiation": "Verhandlung",
15
+ "All pass": "Alle bestehen",
16
+ "Everyone should pass": "Jeder sollte bestehen",
17
+ "Any pass": "Beliebiger Bestehen",
18
+ "Anyone pass": "Jeder kann bestehen",
19
+ "Field name existed in form": "Feldname existiert bereits im Formular",
20
+ "Continue the process": "Den Prozess fortsetzen",
21
+ "Terminate the process": "Den Prozess beenden",
22
+ "Save temporarily": "Temporär speichern",
23
+ "Custom form": "Benutzerdefiniertes Formular",
24
+ "Data record": "Datensatz",
25
+ "Create record form": "Formular zum Erstellen von Datensätzen",
26
+ "Update record form": "Formular zum Aktualisieren von Datensätzen",
27
+ "Filter settings": "Filtereinstellungen",
28
+ "Workflow todos": "Workflow-Aufgaben",
29
+ "Task node": "Aufgabenknoten",
30
+ "Unprocessed": "Unbearbeitet",
31
+ "Please check one of your update record form, and add at least one filter condition in form settings.": "Bitte überprüfen Sie eines Ihrer Formulare zur Aktualisierung von Datensätzen und fügen Sie in den Formulareinstellungen mindestens eine Filterbedingung hinzu.",
32
+ "My manual tasks": "Meine manuellen Aufgaben",
33
+ "Task title": "Aufgabentitel",
34
+ "Title of each task item. Default to node title.": "Titel jedes Aufgabenelements. Standardmäßig der Knotentitel.",
35
+ "Task": "Aufgabe"
36
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "Manual": "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.": "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.": "Values preset in this form will override user submitted ones when continue or reject.",
5
+ "Assignee": "Assignee",
6
+ "Assignees": "Assignees",
7
+ "User interface": "User interface",
8
+ "Configure user interface": "Configure user interface",
9
+ "View user interface": "View user interface",
10
+ "Separately": "Separately",
11
+ "Each user has own task": "Each user has own task",
12
+ "Collaboratively": "Collaboratively",
13
+ "Everyone shares one task": "Everyone shares one task",
14
+ "Negotiation": "Negotiation",
15
+ "All pass": "All pass",
16
+ "Everyone should pass": "Everyone should pass",
17
+ "Any pass": "Any pass",
18
+ "Anyone pass": "Anyone pass",
19
+ "Field name existed in form": "Field name existed in form",
20
+ "Continue the process": "Continue the process",
21
+ "Terminate the process": "Terminate the process",
22
+ "Save temporarily": "Save temporarily",
23
+ "Custom form": "Custom form",
24
+ "Data record": "Data record",
25
+ "Create record form": "Create record form",
26
+ "Update record form": "Update record form",
27
+ "Filter settings": "Filter settings",
28
+ "Workflow todos": "Workflow todos",
29
+ "Task": "Task"
30
+ }
@@ -31,29 +31,55 @@ __export(change_table_name_exports, {
31
31
  module.exports = __toCommonJS(change_table_name_exports);
32
32
  var import_server = require("@nocobase/server");
33
33
  class change_table_name_default extends import_server.Migration {
34
- appVersion = "<1.6.0";
34
+ appVersion = "<1.7.0";
35
35
  on = "beforeLoad";
36
36
  async up() {
37
37
  const { db } = this.context;
38
38
  const queryInterface = db.sequelize.getQueryInterface();
39
+ const usersJobsCollection = db.collection({
40
+ name: "users_jobs",
41
+ fields: [{ name: "id", type: "bigInt" }]
42
+ });
43
+ const workflowManualTasksCollection = db.collection({
44
+ name: "workflowManualTasks",
45
+ fields: [{ name: "id", type: "bigInt" }]
46
+ });
47
+ const oldTableName = usersJobsCollection.getTableNameWithSchema();
48
+ const oldTableNameWithQuotes = usersJobsCollection.getRealTableName(true);
49
+ const newTableName = workflowManualTasksCollection.getTableNameWithSchema();
50
+ const newTableNameWithQuotes = workflowManualTasksCollection.getRealTableName(true);
39
51
  await db.sequelize.transaction(async (transaction) => {
40
- const exists = await queryInterface.tableExists("users_jobs", { transaction });
52
+ const exists = await queryInterface.tableExists(oldTableName, { transaction });
41
53
  if (exists) {
42
- const newTableName = db.options.underscored ? "workflow_manual_tasks" : "workflowManualTasks";
43
- await queryInterface.renameTable("users_jobs", newTableName, { transaction });
54
+ const newExists = await queryInterface.tableExists(newTableName, { transaction });
55
+ if (newExists) {
56
+ await queryInterface.dropTable(newTableName, { transaction });
57
+ }
58
+ if (this.db.isPostgresCompatibleDialect()) {
59
+ await db.sequelize.query(
60
+ `ALTER TABLE ${oldTableNameWithQuotes} RENAME TO "${db.options.tablePrefix || ""}${db.options.underscored ? "workflow_manual_tasks" : "workflowManualTasks"}";`,
61
+ {
62
+ transaction
63
+ }
64
+ );
65
+ } else {
66
+ await queryInterface.renameTable(oldTableName, newTableName, { transaction });
67
+ }
44
68
  const indexes = await queryInterface.showIndex(newTableName, { transaction });
69
+ const oldIndexPrefix = `${db.options.tablePrefix || ""}users_jobs`;
70
+ const newIndexPrefix = `${db.options.tablePrefix || ""}workflow_manual_tasks`;
45
71
  for (const item of indexes) {
46
- if (item.name.startsWith("users_jobs")) {
72
+ if (item.name.startsWith(oldIndexPrefix)) {
47
73
  if (this.db.isPostgresCompatibleDialect()) {
48
74
  await db.sequelize.query(
49
- `ALTER INDEX "${item.name}" RENAME TO "${item.name.replace("users_jobs", "workflow_manual_tasks")}";`,
75
+ `ALTER INDEX ${db.options.schema ? `"${db.options.schema}".` : ""}"${item.name}" RENAME TO "${item.name.replace(oldIndexPrefix, newIndexPrefix)}";`,
50
76
  { transaction }
51
77
  );
52
78
  } else if (this.db.isMySQLCompatibleDialect()) {
53
79
  await db.sequelize.query(
54
- `ALTER TABLE ${newTableName} RENAME INDEX ${item.name} TO ${item.name.replace(
55
- "users_jobs",
56
- "workflow_manual_tasks"
80
+ `ALTER TABLE ${newTableNameWithQuotes} RENAME INDEX ${item.name} TO ${item.name.replace(
81
+ oldIndexPrefix,
82
+ newIndexPrefix
57
83
  )};`,
58
84
  { transaction }
59
85
  );
@@ -62,5 +88,7 @@ class change_table_name_default extends import_server.Migration {
62
88
  }
63
89
  }
64
90
  });
91
+ db.removeCollection("users_jobs");
92
+ db.removeCollection("workflowManualTasks");
65
93
  }
66
94
  }
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.7.0-alpha.1",
7
+ "version": "1.7.0-beta.2",
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": "e411c9728b4d1f16b0beac16e40dd3499352b052",
33
+ "gitHead": "58b206bdfca521e79a69989ca55dd19075dca523",
34
34
  "keywords": [
35
35
  "Workflow"
36
36
  ]