@things-factory/worklist 6.0.35 → 6.0.36

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/worklist",
3
- "version": "6.0.35",
3
+ "version": "6.0.36",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -36,5 +36,5 @@
36
36
  "@things-factory/shell": "^6.0.34",
37
37
  "moment-timezone": "^0.5.40"
38
38
  },
39
- "gitHead": "2f731189d998bc4a6fb99cd8f4851cc90ef7a748"
39
+ "gitHead": "7a3049f87fca6c58b754b701f97bb41efa1d7424"
40
40
  }
@@ -14,7 +14,23 @@ export async function post(
14
14
  ): Promise<ActivityInstance> {
15
15
  const { domain, user, tx } = context.state
16
16
  const issuedAt = new Date()
17
- var { id, assignees, dueAt, approvalLine, activityId, input } = activityInstance
17
+ var {
18
+ id,
19
+ name,
20
+ description,
21
+ assignees,
22
+ uiType,
23
+ uiSource,
24
+ viewType,
25
+ viewSource,
26
+ dueAt,
27
+ approvalLine,
28
+ activityId,
29
+ activityType,
30
+ assigneeRole,
31
+ supervisoryRole,
32
+ input
33
+ } = activityInstance
18
34
 
19
35
  var origin = id
20
36
  ? await tx.getRepository(ActivityInstance).findOne({
@@ -51,15 +67,15 @@ export async function post(
51
67
  }
52
68
  }
53
69
 
54
- activityInstance.name = activity.name
55
- activityInstance.description = activity.description
56
- activityInstance.activityType = activity.activityType
57
- activityInstance.uiType = activity.uiType
58
- activityInstance.uiSource = activity.uiSource
59
- activityInstance.viewType = activity.viewType
60
- activityInstance.viewSource = activity.viewSource
61
- activityInstance.assigneeRole = activity.assigneeRole
62
- activityInstance.supervisoryRole = activity.supervisoryRole
70
+ activityInstance.name = name || activity.name
71
+ activityInstance.description = description || activity.description
72
+ activityInstance.activityType = activityType || activity.activityType
73
+ activityInstance.uiType = uiType || activity.uiType
74
+ activityInstance.uiSource = uiSource || activity.uiSource
75
+ activityInstance.viewType = viewType || activity.viewType
76
+ activityInstance.viewSource = viewSource || activity.viewSource
77
+ activityInstance.assigneeRole = assigneeRole || activity.assigneeRole
78
+ activityInstance.supervisoryRole = supervisoryRole || activity.supervisoryRole
63
79
 
64
80
  if (!assignees || !approvalLine) {
65
81
  activityInstance.adhocType = 'standard'