@things-factory/dataset 6.2.57 → 6.2.59
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/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/create-data-sample.js +22 -24
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/server/controllers/create-data-sample.ts +23 -25
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/dataset",
|
3
|
-
"version": "6.2.
|
3
|
+
"version": "6.2.59",
|
4
4
|
"main": "dist-server/index.js",
|
5
5
|
"browser": "dist-client/index.js",
|
6
6
|
"things-factory": true,
|
@@ -39,17 +39,17 @@
|
|
39
39
|
"@operato/utils": "^1.0.1",
|
40
40
|
"@things-factory/auth-base": "^6.2.54",
|
41
41
|
"@things-factory/aws-base": "^6.2.54",
|
42
|
-
"@things-factory/board-service": "^6.2.
|
42
|
+
"@things-factory/board-service": "^6.2.58",
|
43
43
|
"@things-factory/env": "^6.2.33",
|
44
44
|
"@things-factory/organization": "^6.2.54",
|
45
45
|
"@things-factory/scheduler-client": "^6.2.54",
|
46
46
|
"@things-factory/shell": "^6.2.52",
|
47
47
|
"@things-factory/work-shift": "^6.2.54",
|
48
|
-
"@things-factory/worklist": "^6.2.
|
48
|
+
"@things-factory/worklist": "^6.2.58",
|
49
49
|
"cron-parser": "^4.3.0",
|
50
50
|
"moment-timezone": "^0.5.40",
|
51
51
|
"simple-statistics": "^7.8.3",
|
52
52
|
"statistics": "^3.3.0"
|
53
53
|
},
|
54
|
-
"gitHead": "
|
54
|
+
"gitHead": "44f0d0609b8db32e387059256d3852c8ec4856ee"
|
55
55
|
}
|
@@ -229,8 +229,7 @@ export async function createDataSample(dataSample: NewDataSample, context: Resol
|
|
229
229
|
dataOocId: dataOoc.id
|
230
230
|
},
|
231
231
|
assignees,
|
232
|
-
approvalLine: []
|
233
|
-
outlierApprovalLine: []
|
232
|
+
approvalLine: []
|
234
233
|
}
|
235
234
|
|
236
235
|
await issue(activityInstance, context)
|
@@ -275,7 +274,7 @@ export async function createDataSample(dataSample: NewDataSample, context: Resol
|
|
275
274
|
|
276
275
|
const assignees = dataSet.supervisoryRoleId ? [{ type: 'Role', value: dataSet.supervisoryRoleId, assignee }] : []
|
277
276
|
|
278
|
-
/* 해당 dataset의 supervisor로 하여금,
|
277
|
+
/* 해당 dataset의 supervisor로 하여금, data를 리뷰하고 instruction을 작성해서, approvalLine을 이용 해서 승인을 한다. */
|
279
278
|
if (assignees && assignees instanceof Array && assignees.length > 0) {
|
280
279
|
result.dataItems = dataItems
|
281
280
|
const activityInstance = {
|
@@ -287,11 +286,30 @@ export async function createDataSample(dataSample: NewDataSample, context: Resol
|
|
287
286
|
dataSample: result
|
288
287
|
},
|
289
288
|
assignees,
|
290
|
-
approvalLine:
|
291
|
-
outlierApprovalLine: []
|
289
|
+
approvalLine: dataSet.reviewApprovalLine
|
292
290
|
}
|
293
291
|
|
294
292
|
await issue(activityInstance, context)
|
293
|
+
|
294
|
+
try {
|
295
|
+
pubsub.publish('data-set', {
|
296
|
+
dataSet,
|
297
|
+
supervisoryRoleId: dataSet.supervisoryRoleId
|
298
|
+
})
|
299
|
+
|
300
|
+
pubsub.publish('notification', {
|
301
|
+
notification: {
|
302
|
+
domain,
|
303
|
+
type: 'info',
|
304
|
+
title: `[Data Review] ${dataSet.name}`,
|
305
|
+
body: `Data Review occurred on '${dataSet.name}'`,
|
306
|
+
url: getRedirectSubdomainPath(context, domain.subdomain, `/data-set/${dataSet.id}`),
|
307
|
+
timestamp: collectedAt
|
308
|
+
}
|
309
|
+
})
|
310
|
+
} catch (err) {
|
311
|
+
logger.error('Notification', err)
|
312
|
+
}
|
295
313
|
} else {
|
296
314
|
console.error(
|
297
315
|
`Assignees are not set. So Data Review task for ${dataSet.name}(${dataSet.id}) could not be issued.`
|
@@ -300,26 +318,6 @@ export async function createDataSample(dataSample: NewDataSample, context: Resol
|
|
300
318
|
} else {
|
301
319
|
console.error('Data Review Activity not installed.')
|
302
320
|
}
|
303
|
-
|
304
|
-
try {
|
305
|
-
pubsub.publish('data-set', {
|
306
|
-
dataSet,
|
307
|
-
supervisoryRoleId: dataSet.supervisoryRoleId
|
308
|
-
})
|
309
|
-
|
310
|
-
pubsub.publish('notification', {
|
311
|
-
notification: {
|
312
|
-
domain,
|
313
|
-
type: 'info',
|
314
|
-
title: `[Data Review] ${dataSet.name}`,
|
315
|
-
body: `Data Review occurred on '${dataSet.name}'`,
|
316
|
-
url: getRedirectSubdomainPath(context, domain.subdomain, `/data-set/${dataSet.id}`),
|
317
|
-
timestamp: collectedAt
|
318
|
-
}
|
319
|
-
})
|
320
|
-
} catch (err) {
|
321
|
-
logger.error('Notification', err)
|
322
|
-
}
|
323
321
|
}
|
324
322
|
|
325
323
|
return result
|