@steedos-labs/plugin-workflow 3.0.0-beta.19 → 3.0.0-beta.21

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.
@@ -290,6 +290,7 @@ async function objectWorkflow(spaceId, flowId, objectName, doc) {
290
290
  if (oldDoc) {
291
291
  return objectWorkflowsCollection.updateOne({ _id: oldDoc._id }, { $set: docData });
292
292
  } else {
293
+ docData._id = _makeNewID();
293
294
  return objectWorkflowsCollection.insertOne(docData);
294
295
  }
295
296
  }
@@ -37,6 +37,19 @@ fields:
37
37
  readonly: true
38
38
  name: style
39
39
  filterable: true
40
+ mode:
41
+ type: select
42
+ label: Mode
43
+ options:
44
+ - label: Normal
45
+ value: normal
46
+ - label: Horizontal
47
+ value: horizontal
48
+ - label: Inline
49
+ value: inline
50
+ readonly: true
51
+ name: style
52
+ filterable: true
40
53
  description:
41
54
  type: textarea
42
55
  label: Description
@@ -20,11 +20,11 @@ amis_schema: |-
20
20
  "actionType": "dialog",
21
21
  "dialog": {
22
22
  "type": "dialog",
23
- "title": "系统消息",
23
+ "title": "${'CustomLabels.alert_info' | t}",
24
24
  "body": [
25
25
  {
26
26
  "type": "tpl",
27
- "tpl": "确认要删除吗?",
27
+ "tpl": "${'CustomLabels.confirm_delete' | t}",
28
28
  "wrapperComponent": "",
29
29
  "inline": false,
30
30
  "id": "u:0c42a6d112aa"
@@ -38,7 +38,7 @@ amis_schema: |-
38
38
  "actions": [
39
39
  {
40
40
  "type": "button",
41
- "label": "取消",
41
+ "label": "${'Cancel' | t}",
42
42
  "onEvent": {
43
43
  "click": {
44
44
  "actions": [
@@ -53,7 +53,7 @@ amis_schema: |-
53
53
  },
54
54
  {
55
55
  "type": "button",
56
- "label": "确认",
56
+ "label": "${'OK' | t}",
57
57
  "onEvent": {
58
58
  "click": {
59
59
  "actions": [
@@ -180,6 +180,9 @@ router.post('/am/forms', async function (req, res) {
180
180
  config.type = config.data_type
181
181
  }
182
182
  }
183
+ if(config.type === 'autonumber'){
184
+ config.type = "text"
185
+ }
183
186
  return {
184
187
  type: `sfield-${lodash.toLower(lodash.camelCase(field.steedos_field.type))}`,
185
188
  config: config
@@ -11,7 +11,7 @@
11
11
  <script src="/toast/toastr.min.js"></script>
12
12
  <script>
13
13
  window._disabledFields = [
14
- 'formula', 'summary'
14
+ 'autonumber', 'formula', 'summary'
15
15
  ]
16
16
  </script>
17
17
  <style>
@@ -1,6 +1,6 @@
1
1
  CustomApplications:
2
2
  approve_workflow:
3
- name: Approval Workflow
4
- description:
3
+ name: Approval
4
+ description: Provide a graphical form and process design interface to customize the enterprise business approval process.
5
5
  CustomLabels:
6
6
  flows_tabs_form: Form
@@ -525,7 +525,9 @@ module.exports = {
525
525
  form.current.fields = getFinalFormFields(inputFields);
526
526
  form.current.amis_schema = amis_schema;
527
527
  form.current.style = formSchema.style;
528
+ form.current.mode = formSchema.mode;
528
529
  form.style = formSchema.style;
530
+ form.mode = formSchema.mode;
529
531
  form.description = formSchema.description;
530
532
 
531
533
  // 以下为将解析字段存储的功能,为将解析字段存储至数据库forms表的功能
@@ -222,6 +222,7 @@ async function updateForm(formId, form, forms, flows, currentUserId) {
222
222
  current.form_script = form["current"]["form_script"];
223
223
  current.name_forumla = form["current"]["name_forumla"];
224
224
  current.style = form["current"]["style"];
225
+ current.mode = form["current"]["mode"];
225
226
 
226
227
  formUpdateObj.$set = {
227
228
  'current': current,
@@ -230,6 +231,7 @@ async function updateForm(formId, form, forms, flows, currentUserId) {
230
231
  'modified_by': currentUserId,
231
232
  'is_valid': form["is_valid"],
232
233
  'style': form["style"],
234
+ 'mode': form["mode"],
233
235
  'description': form["description"],
234
236
  'help_text': form["help_text"],
235
237
  'error_message': form["error_message"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/plugin-workflow",
3
- "version": "3.0.0-beta.19",
3
+ "version": "3.0.0-beta.21",
4
4
  "main": "package.service.js",
5
5
  "license": "MIT",
6
6
  "scripts": {