@things-factory/worklist 6.1.2 → 6.1.7

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.1.2",
3
+ "version": "6.1.7",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -29,14 +29,14 @@
29
29
  "@operato/event-view": "^1.0.0",
30
30
  "@operato/graphql": "^1.0.0",
31
31
  "@operato/grist-editor": "^1.0.0",
32
- "@things-factory/attachment-base": "^6.1.2",
33
- "@things-factory/auth-base": "^6.1.2",
34
- "@things-factory/board-service": "^6.1.2",
35
- "@things-factory/context-ui": "^6.1.2",
36
- "@things-factory/organization": "^6.1.2",
37
- "@things-factory/scheduler-client": "^6.1.2",
38
- "@things-factory/shell": "^6.1.2",
32
+ "@things-factory/attachment-base": "^6.1.7",
33
+ "@things-factory/auth-base": "^6.1.7",
34
+ "@things-factory/board-service": "^6.1.7",
35
+ "@things-factory/context-ui": "^6.1.7",
36
+ "@things-factory/organization": "^6.1.7",
37
+ "@things-factory/scheduler-client": "^6.1.7",
38
+ "@things-factory/shell": "^6.1.7",
39
39
  "moment-timezone": "^0.5.40"
40
40
  },
41
- "gitHead": "f237e856ae21fc8c09b7bbbcc4f50282c7e7856d"
41
+ "gitHead": "b7d7932f4585d09d45ac09696f102b8f1ce73cce"
42
42
  }
@@ -77,4 +77,24 @@ export class ActivityInstanceMutation {
77
77
  ): Promise<ActivityInstance> {
78
78
  return await abort({ id, reason }, context)
79
79
  }
80
+
81
+ @Directive('@transaction')
82
+ @Mutation(returns => ActivityInstance, { description: 'To modify ActivityInstance Output Data' })
83
+ async updateActivityInstanceOutput(
84
+ @Arg('id') id: string,
85
+ @Arg('output', { nullable: false }) output: string,
86
+ @Ctx() context: any
87
+ ): Promise<ActivityInstance> {
88
+ const { domain, user, tx } = context.state
89
+
90
+ const actInstRepository = tx.getRepository(ActivityInstance)
91
+ const actInst = await actInstRepository.findOne(
92
+ {
93
+ where: { domain: { id: domain.id }, id },
94
+ relations: ['domain','updater','creator']
95
+ }
96
+ )
97
+ actInst.output = output;
98
+ return await actInstRepository.save(actInst);
99
+ }
80
100
  }