@steedos-labs/plugin-workflow 3.0.78 → 3.0.79

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.
@@ -1,5 +1,5 @@
1
1
  waitForThing(window, 'antd').then(function(){
2
- var v = '3.0.78';
2
+ var v = '3.0.79';
3
3
  loadJs('/amis-renderer/amis-renderer.js?v=' + v);
4
4
  loadCss('/amis-renderer/amis-renderer.css?v=' + v)
5
5
  })
@@ -37,6 +37,7 @@ async function upgradeFlowByForm(flow, formVersionId, options) {
37
37
  'created': now,
38
38
  'created_by': currentUserId,
39
39
  'steps': flow.current.steps,
40
+ 'nextEvents': flow.current.nextEvents || {},
40
41
  '_rev': flow.current._rev + 1,
41
42
  'flow': flow._id,
42
43
  'form_version': formVersionId,
@@ -219,6 +220,7 @@ async function upgradeFlow(flowCome, userId, flowId) {
219
220
  'created': now,
220
221
  'created_by': userId,
221
222
  'steps': flowCome['current']['steps'],
223
+ 'nextEvents': flowCome['current']['nextEvents'] || {},
222
224
  'form_version': flow.current.form_version,
223
225
  '_rev': flow.current._rev,
224
226
  'flow': flowId
@@ -233,7 +235,8 @@ async function upgradeFlow(flowCome, userId, flowId) {
233
235
  updateObj.$set = {
234
236
  'current.modified': now,
235
237
  'current.modified_by': userId,
236
- 'current.steps': flowCome["current"]["steps"]
238
+ 'current.steps': flowCome["current"]["steps"],
239
+ 'current.nextEvents': flowCome["current"]["nextEvents"] || {}
237
240
  };
238
241
  }
239
242
 
@@ -571,7 +574,8 @@ async function workflow(uid, spaceId, form, enabled, company_id, options = {}) {
571
574
  created_by: uid,
572
575
  modified: new Date(),
573
576
  modified_by: uid,
574
- steps: flow.current?.steps || []
577
+ steps: flow.current?.steps || [],
578
+ nextEvents: flow.current?.nextEvents || {}
575
579
  };
576
580
 
577
581
  // Process steps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/plugin-workflow",
3
- "version": "3.0.78",
3
+ "version": "3.0.79",
4
4
  "main": "package.service.js",
5
5
  "license": "MIT",
6
6
  "files": [