@steedos/standard-process-approval 2.6.1-beta.7 → 2.6.2-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.
@@ -38,7 +38,8 @@ Steedos.ProcessManager.allowSubmit = function(object_name, record_id){
38
38
  if(!object_name || !record_id){
39
39
  return false;
40
40
  }
41
- const object = this.object || window.Creator?.getObject(object_name)
41
+ var _window$Creator;
42
+ const object = this.object || ((_window$Creator = window.Creator) === null || _window$Creator === void 0 ? void 0 : _window$Creator.getObject(object_name));
42
43
  if(!object.enable_process){
43
44
  return false;
44
45
  }
@@ -55,7 +55,7 @@ fields:
55
55
  help:
56
56
  description:
57
57
  initial_submission_workflow_notifications_actions:
58
- label: 工作流通知
58
+ label: 消息提醒
59
59
  help:
60
60
  description:
61
61
  final_approval_record_lock:
@@ -72,7 +72,7 @@ fields:
72
72
  help:
73
73
  description:
74
74
  final_approval_workflow_notifications_actions:
75
- label: 工作流通知
75
+ label: 消息提醒
76
76
  help:
77
77
  description:
78
78
  final_rejection_record_lock:
@@ -89,7 +89,7 @@ fields:
89
89
  help:
90
90
  description:
91
91
  final_rejection_workflow_notifications_actions:
92
- label: 工作流通知
92
+ label: 消息提醒
93
93
  help:
94
94
  description:
95
95
  recall_record_lock:
@@ -106,7 +106,7 @@ fields:
106
106
  help:
107
107
  description:
108
108
  recall_workflow_notifications_actions:
109
- label: 工作流通知
109
+ label: 消息提醒
110
110
  help:
111
111
  description:
112
112
  groups:
@@ -89,7 +89,7 @@ fields:
89
89
  help:
90
90
  description:
91
91
  approval_workflow_notifications_actions:
92
- label: 工作流通知
92
+ label: 消息提醒
93
93
  help:
94
94
  description:
95
95
  rejection_updates_field_actions:
@@ -97,7 +97,7 @@ fields:
97
97
  help:
98
98
  description:
99
99
  rejection_workflow_notifications_actions:
100
- label: 工作流通知
100
+ label: 消息提醒
101
101
  help:
102
102
  description:
103
103
  groups:
@@ -1,5 +1,5 @@
1
1
  name: workflow_notifications
2
- label: 工作流通知
2
+ label: 消息提醒
3
3
  description:
4
4
  fields:
5
5
  name:
@@ -26,7 +26,7 @@ fields:
26
26
  value: onCreateOnly
27
27
  - label: 新建时,和每次编辑时
28
28
  value: onAllChanges
29
- - label: 新建时,或编辑数据导致条件成立
29
+ - label: 新建时,和编辑数据导致条件成立时
30
30
  value: onCreateOrTriggeringUpdate
31
31
  description:
32
32
  formula:
@@ -38,7 +38,7 @@ fields:
38
38
  help:
39
39
  description:
40
40
  workflow_notifications_actions:
41
- label: 工作流通知
41
+ label: 消息提醒
42
42
  help:
43
43
  description:
44
44
  workflow_outbound_messages_actions:
@@ -108,7 +108,7 @@
108
108
  "className": "px-0"
109
109
  }
110
110
  ],
111
- "className": "antd-Tabs antd-Tabs--line bg-white border-slate-300 p-4 sm:border sm:mt-3 sm:rounded sm:shadow",
111
+ "className": "antd-Tabs antd-Tabs--line bg-white border-gray-300 p-4 sm:border sm:mt-3 sm:rounded sm:shadow",
112
112
  "toolbarClassName": "",
113
113
  "contentClassName": ""
114
114
  }
@@ -41,25 +41,25 @@ fields:
41
41
  group: Select Assigned User
42
42
  assigned_user_field:
43
43
  type: lookup
44
+ reference_to: object_fields
45
+ reference_to_field: name
44
46
  multiple: true
45
47
  is_wide: true
46
48
  group: Select Assigned User
47
49
  showIcon: false
48
50
  depend_on:
49
51
  - object_name
50
- optionsFunction: !!js/function |
51
- function (doc){
52
- var object = Creator.getObject(doc.object_name);
53
- var options = [];
54
- if(object){
55
- var userFields = _.filter(object.fields, function(field){
56
- return (field.type === 'lookup' || field.type === 'master_detail') && field.omit != true && (field.reference_to === 'users' || ('space_users' === field.reference_to && 'user' === field.reference_to_field))
57
- });
58
- _.each(userFields, function(field){
59
- options.push({label:field.label, value:field.name});
60
- })
52
+ filtersFunction: !<tag:yaml.org,2002:js/function> |-
53
+ function (filters, values) {
54
+ if(values && values.object_name){
55
+ return [
56
+ ['object', '=', values.object_name],
57
+ ['type','=',['lookup','master_detail']],
58
+ [['reference_to','=','users'],'or',[['reference_to','=','space_users'],['reference_to_field','=','user']]]
59
+ ]
60
+ }else{
61
+ return ['_id', '=', 'no']
61
62
  }
62
- return options;
63
63
  }
64
64
  form:
65
65
  beforeEdit: !!js/function |
@@ -102,11 +102,13 @@ fields:
102
102
  inlineHelpText: Run Time-Dependent Actions if the following filters are met.
103
103
  group: time_dependent_action
104
104
  time_triggers:
105
- type: grid
105
+ type: table
106
106
  label: 时间触发器
107
107
  is_wide: true
108
108
  required: false
109
109
  group: time_dependent_action
110
+ amis:
111
+ columns: ["number", "unit", "type", "date_field"]
110
112
  time_triggers.$:
111
113
  label: Field
112
114
  blackbox: true
@@ -137,30 +139,19 @@ fields:
137
139
  time_triggers.$.date_field:
138
140
  label: 日期字段
139
141
  type: lookup
142
+ reference_to: object_fields
143
+ reference_to_field: name
144
+ enable_enhanced_lookup: false
140
145
  depend_on:
141
146
  - object_name
142
- optionsFunction: !!js/function |
143
- function (values) {
144
- console.log('values: ', values);
145
- const object_name = values.object_name;
146
- const options = [];
147
- if (object_name) {
148
- var object = Creator.getObject(object_name);
149
- var objectLabel = object.label;
150
- var fields = object.fields;
151
- for(const key in fields) {
152
- if (Object.hasOwnProperty.call(fields, key)) {
153
- const f = fields[key]
154
- if (!f.hidden && (f.type == 'datetime' || f.type == 'date')) {
155
- options.push({
156
- label: objectLabel + ': ' + f.label,
157
- value: f.name
158
- })
159
- }
160
- }
161
- }
147
+ filtersFunction: !<tag:yaml.org,2002:js/function> |-
148
+ function (filters, values) {
149
+ const objectName = values.object_name;
150
+ if(objectName){
151
+ return [['object', '=', objectName], ['type', '=', ['datetime','date']]]
152
+ }else{
153
+ return ['_id', '=', 'no']
162
154
  }
163
- return options
164
155
  }
165
156
  time_triggers.$.updates_field_actions:
166
157
  type: lookup
@@ -53,6 +53,7 @@ module.exports = {
53
53
  objectql.checkFormula(this.doc.entry_criteria, this.doc.object_name)
54
54
  },
55
55
  afterFind: async function(){
56
+ let spaceId = this.spaceId;
56
57
  let filters = InternalData.parserFilters(this.query.filters)
57
58
  let approvalProcesses = [];
58
59
  if(filters.name){
@@ -72,6 +73,7 @@ module.exports = {
72
73
 
73
74
  if(approvalProcesses){
74
75
  this.data.values = this.data.values.concat(approvalProcesses)
76
+ this.data.values = objectql.getSteedosSchema().metadataDriver.find(this.data.values, this.query, spaceId);
75
77
  }
76
78
  },
77
79
  afterAggregate: async function(){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-process-approval",
3
- "version": "2.6.1-beta.7",
3
+ "version": "2.6.2-beta.2",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -10,10 +10,10 @@
10
10
  "steedos"
11
11
  ],
12
12
  "dependencies": {
13
- "@steedos/process": "2.6.1-beta.7"
13
+ "@steedos/process": "2.6.2-beta.2"
14
14
  },
15
15
  "description": "steedos package",
16
16
  "repository": {},
17
17
  "license": "MIT",
18
- "gitHead": "b12f271460ef3686face095e875aa38e8ddc4c7f"
18
+ "gitHead": "ddef9fbc34afc7b57c59a31e9ed4f56818dc4c31"
19
19
  }