@things-factory/dataset 7.0.7 → 7.0.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/create-data-sample.js +9 -9
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/server/controllers/create-data-sample.ts +11 -11
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/dataset",
|
3
|
-
"version": "7.0.
|
3
|
+
"version": "7.0.13",
|
4
4
|
"main": "dist-server/index.js",
|
5
5
|
"browser": "dist-client/index.js",
|
6
6
|
"things-factory": true,
|
@@ -40,21 +40,21 @@
|
|
40
40
|
"@operato/shell": "^7.0.0",
|
41
41
|
"@operato/styles": "^7.0.0",
|
42
42
|
"@operato/utils": "^7.0.0",
|
43
|
-
"@things-factory/auth-base": "^7.0.
|
44
|
-
"@things-factory/aws-base": "^7.0.
|
45
|
-
"@things-factory/board-service": "^7.0.
|
43
|
+
"@things-factory/auth-base": "^7.0.10",
|
44
|
+
"@things-factory/aws-base": "^7.0.10",
|
45
|
+
"@things-factory/board-service": "^7.0.13",
|
46
46
|
"@things-factory/env": "^7.0.0",
|
47
|
-
"@things-factory/integration-base": "^7.0.
|
48
|
-
"@things-factory/organization": "^7.0.
|
49
|
-
"@things-factory/personalization": "^7.0.
|
50
|
-
"@things-factory/scheduler-client": "^7.0.
|
51
|
-
"@things-factory/shell": "^7.0.
|
52
|
-
"@things-factory/work-shift": "^7.0.
|
53
|
-
"@things-factory/worklist": "^7.0.
|
47
|
+
"@things-factory/integration-base": "^7.0.13",
|
48
|
+
"@things-factory/organization": "^7.0.10",
|
49
|
+
"@things-factory/personalization": "^7.0.10",
|
50
|
+
"@things-factory/scheduler-client": "^7.0.10",
|
51
|
+
"@things-factory/shell": "^7.0.10",
|
52
|
+
"@things-factory/work-shift": "^7.0.10",
|
53
|
+
"@things-factory/worklist": "^7.0.13",
|
54
54
|
"cron-parser": "^4.3.0",
|
55
55
|
"moment-timezone": "^0.5.45",
|
56
56
|
"simple-statistics": "^7.8.3",
|
57
57
|
"statistics": "^3.3.0"
|
58
58
|
},
|
59
|
-
"gitHead": "
|
59
|
+
"gitHead": "2bcab979adf08e9561cb6ba2506afa4770b90bbc"
|
60
60
|
}
|
@@ -6,7 +6,7 @@ import { Role } from '@things-factory/auth-base'
|
|
6
6
|
import { logger } from '@things-factory/env'
|
7
7
|
import { getRedirectSubdomainPath, pubsub } from '@things-factory/shell'
|
8
8
|
import { getWorkDateAndShift } from '@things-factory/work-shift'
|
9
|
-
import { Scenario } from '@things-factory/integration-base'
|
9
|
+
import { Scenario, publishData } from '@things-factory/integration-base'
|
10
10
|
import { Activity } from '@things-factory/worklist'
|
11
11
|
import { issue } from '@things-factory/worklist/dist-server/controllers/activity-instance/issue'
|
12
12
|
|
@@ -186,13 +186,7 @@ export async function createDataSample(newDataSample: NewDataSample, context: Re
|
|
186
186
|
})
|
187
187
|
|
188
188
|
if (publishTag) {
|
189
|
-
|
190
|
-
data: {
|
191
|
-
domain,
|
192
|
-
tag: publishTag,
|
193
|
-
data
|
194
|
-
}
|
195
|
-
})
|
189
|
+
publishData(publishTag, data, { domain, user })
|
196
190
|
}
|
197
191
|
|
198
192
|
/* post-process for for file attachment. */
|
@@ -268,7 +262,10 @@ export async function createDataSample(newDataSample: NewDataSample, context: Re
|
|
268
262
|
if (activity) {
|
269
263
|
const assignee =
|
270
264
|
dataSet.supervisoryRoleId &&
|
271
|
-
(await tx.getRepository(Role).findOneBy({
|
265
|
+
(await tx.getRepository(Role).findOneBy({
|
266
|
+
domain: { id: In([domain.id, domain.parentId].filter(Boolean)) },
|
267
|
+
id: dataSet.supervisoryRoleId
|
268
|
+
}))
|
272
269
|
|
273
270
|
const assignees = dataSet.supervisoryRoleId ? [{ type: 'Role', value: dataSet.supervisoryRoleId, assignee }] : []
|
274
271
|
|
@@ -328,7 +325,7 @@ export async function createDataSample(newDataSample: NewDataSample, context: Re
|
|
328
325
|
|
329
326
|
if (scenario) {
|
330
327
|
scenario.start({
|
331
|
-
instanceName: scenario.name + ':' + dataSet.name + ':' + dataSample.id,
|
328
|
+
instanceName: scenario.name + ':' + dataSet.name + ':' + dataSample.id,
|
332
329
|
domain,
|
333
330
|
user,
|
334
331
|
variables: {
|
@@ -367,7 +364,10 @@ export async function createDataSample(newDataSample: NewDataSample, context: Re
|
|
367
364
|
if (activity) {
|
368
365
|
const assignee =
|
369
366
|
dataSet.supervisoryRoleId &&
|
370
|
-
(await tx.getRepository(Role).findOneBy({
|
367
|
+
(await tx.getRepository(Role).findOneBy({
|
368
|
+
domain: { id: In([domain.id, domain.parentId].filter(Boolean)) },
|
369
|
+
id: dataSet.supervisoryRoleId
|
370
|
+
}))
|
371
371
|
|
372
372
|
const assignees = dataSet.supervisoryRoleId
|
373
373
|
? [{ type: 'Role', value: dataSet.supervisoryRoleId, assignee }]
|