@things-factory/dataset 6.2.71 → 6.2.73

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/dataset",
3
- "version": "6.2.71",
3
+ "version": "6.2.73",
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.70",
41
41
  "@things-factory/aws-base": "^6.2.70",
42
- "@things-factory/board-service": "^6.2.70",
42
+ "@things-factory/board-service": "^6.2.73",
43
43
  "@things-factory/env": "^6.2.33",
44
- "@things-factory/organization": "^6.2.71",
44
+ "@things-factory/organization": "^6.2.73",
45
45
  "@things-factory/scheduler-client": "^6.2.70",
46
46
  "@things-factory/shell": "^6.2.70",
47
47
  "@things-factory/work-shift": "^6.2.70",
48
- "@things-factory/worklist": "^6.2.71",
48
+ "@things-factory/worklist": "^6.2.73",
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": "f520e62d112d7a9144a3be19ebb1a07beead4f70"
54
+ "gitHead": "eb578bc7a3f5a2301af8ae599d00e929ef3bb6ca"
55
55
  }
@@ -62,7 +62,7 @@ export async function createDataSample(dataSample: NewDataSample, context: Resol
62
62
  relations: ['dataKeySet']
63
63
  })
64
64
 
65
- const dataItems = dataSet.dataItems
65
+ const { dataItems, tag: publishTag } = dataSet
66
66
  const collectedAt = dataSample.collectedAt || new Date()
67
67
 
68
68
  const timezone = dataSet.timezone || domain.timezone || 'UTC'
@@ -184,6 +184,16 @@ export async function createDataSample(dataSample: NewDataSample, context: Resol
184
184
  updater: user
185
185
  })
186
186
 
187
+ if (publishTag) {
188
+ pubsub.publish('data', {
189
+ data: {
190
+ domain,
191
+ tag: publishTag,
192
+ data
193
+ }
194
+ })
195
+ }
196
+
187
197
  /* post-process for for file attachment. */
188
198
  if (attachments.length > 0) {
189
199
  attachments.forEach(attachment => (attachment.refId = result.id))
@@ -274,7 +284,7 @@ export async function createDataSample(dataSample: NewDataSample, context: Resol
274
284
 
275
285
  const assignees = dataSet.supervisoryRoleId ? [{ type: 'Role', value: dataSet.supervisoryRoleId, assignee }] : []
276
286
 
277
- /* 해당 dataset의 supervisor로 하여금, data를 리뷰하고 instruction을 작성해서, approvalLine을 이용 해서 승인을 한다. */
287
+ /* 해당 dataset의 supervisor로 하여금, data를 리뷰하고 instruction을 작성해서, approvalLine을 이용해서 승인을 한다. */
278
288
  if (assignees && assignees instanceof Array && assignees.length > 0) {
279
289
  result.dataItems = dataItems
280
290
  const activityInstance = {
@@ -292,11 +302,6 @@ export async function createDataSample(dataSample: NewDataSample, context: Resol
292
302
  await issue(activityInstance, context)
293
303
 
294
304
  try {
295
- pubsub.publish('data-set', {
296
- dataSet,
297
- supervisoryRoleId: dataSet.supervisoryRoleId
298
- })
299
-
300
305
  pubsub.publish('notification', {
301
306
  notification: {
302
307
  domain,
@@ -48,7 +48,7 @@ export class DataSetQuery {
48
48
  params,
49
49
  domain,
50
50
  alias: 'dataset',
51
- searchables: ['name', 'description', 'supervisoryRole']
51
+ searchables: ['name', 'description', 'tag', 'supervisoryRole']
52
52
  })
53
53
 
54
54
  const [items, total] = await queryBuilder.getManyAndCount()
@@ -17,6 +17,9 @@ export class NewDataSet {
17
17
  @Field({ nullable: true })
18
18
  description?: string
19
19
 
20
+ @Field({ nullable: true, description: 'A tag name of data to be published when a data sample created' })
21
+ tag?: string
22
+
20
23
  @Field(type => ObjectRef, { nullable: true })
21
24
  dataKeySet?: ObjectRef
22
25
 
@@ -95,6 +98,9 @@ export class DataSetPatch {
95
98
  @Field({ nullable: true })
96
99
  description?: string
97
100
 
101
+ @Field({ nullable: true, description: 'A tag name of data to be published when a data sample created' })
102
+ tag?: string
103
+
98
104
  @Field(type => ObjectRef, { nullable: true })
99
105
  dataKeySet?: ObjectRef
100
106
 
@@ -113,6 +113,10 @@ export class DataSet {
113
113
  @Field({ nullable: true, description: 'A description of the dataset' })
114
114
  description?: string
115
115
 
116
+ @Column({ nullable: true })
117
+ @Field({ nullable: true, description: 'A tag name of data to be published when a data sample created' })
118
+ tag?: string
119
+
116
120
  @VersionColumn({ nullable: true, default: 1 })
117
121
  @Field({ nullable: true, description: 'The version of the dataset' })
118
122
  version?: number = 1
@@ -31,6 +31,7 @@
31
31
  "field.entry-view": "entry view",
32
32
  "field.hidden": "hidden",
33
33
  "field.item": "item",
34
+ "field.key": "key",
34
35
  "field.key-01": "key 1",
35
36
  "field.key-02": "key 2",
36
37
  "field.key-03": "key 3",
@@ -58,6 +59,7 @@
58
59
  "field.request-params": "request parameters",
59
60
  "field.requires-review": "requires review",
60
61
  "field.review-approval-line": "review approval line",
62
+ "field.role": "role",
61
63
  "field.serial-no": "serial #",
62
64
  "field.spec": "spec",
63
65
  "field.stat-function": "stat func.",
@@ -71,6 +73,7 @@
71
73
  "field.time-period": "time period",
72
74
  "field.unit": "unit",
73
75
  "field.use-case": "use case",
76
+ "field.view": "view",
74
77
  "field.work-date": "work date",
75
78
  "field.work-shift": "work shift",
76
79
  "label.acceptables": "acceptables",
@@ -31,6 +31,7 @@
31
31
  "field.entry-view": "入力用画面",
32
32
  "field.hidden": "隠し",
33
33
  "field.item": "項目",
34
+ "field.key": "キ",
34
35
  "field.key-01": "キー1",
35
36
  "field.key-02": "キー2",
36
37
  "field.key-03": "キー3",
@@ -58,6 +59,7 @@
58
59
  "field.request-params": "リクエスト パラメータ",
59
60
  "field.requires-review": "見直しが必要",
60
61
  "field.review-approval-line": "決済ライン",
62
+ "field.role": "ロール",
61
63
  "field.serial-no": "シリアル番号",
62
64
  "field.spec": "明細",
63
65
  "field.stat-function": "統計関数",
@@ -71,6 +73,7 @@
71
73
  "field.time-period": "時間単位",
72
74
  "field.unit": "単位",
73
75
  "field.use-case": "使用事例",
76
+ "field.view": "画面",
74
77
  "field.work-date": "作業基準日",
75
78
  "field.work-shift": "交代勤務組",
76
79
  "label.acceptables": "許容値",
@@ -31,6 +31,7 @@
31
31
  "field.entry-view": "입력용 화면",
32
32
  "field.hidden": "숨기기",
33
33
  "field.item": "항목",
34
+ "field.key": "키",
34
35
  "field.key-01": "키 1",
35
36
  "field.key-02": "키 2",
36
37
  "field.key-03": "키 3",
@@ -58,6 +59,7 @@
58
59
  "field.request-params": "요청 매개변수",
59
60
  "field.requires-review": "검토 요청",
60
61
  "field.review-approval-line": "결재라인",
62
+ "field.role": "역할",
61
63
  "field.serial-no": "시리얼번호",
62
64
  "field.spec": "명세",
63
65
  "field.stat-function": "통계함수",
@@ -90,6 +92,7 @@
90
92
  "label.period-today": "오늘",
91
93
  "label.start-date": "시작일",
92
94
  "label.state-corrected": "조치완료",
95
+ "field.view": "화면",
93
96
  "label.state-issued": "발생",
94
97
  "label.state-reviewed": "검토완료",
95
98
  "label.target-limits": "관리 목표범위",
@@ -31,6 +31,7 @@
31
31
  "field.entry-view": "paparan masukan",
32
32
  "field.hidden": "tersembunyi",
33
33
  "field.item": "item",
34
+ "field.key": "kunci",
34
35
  "field.key-01": "kunci 1",
35
36
  "field.key-02": "kunci 2",
36
37
  "field.key-03": "kunci 3",
@@ -58,6 +59,7 @@
58
59
  "field.request-params": "parameter permintaan",
59
60
  "field.requires-review": "memerlukan semakan",
60
61
  "field.review-approval-line": "baris kelulusan",
62
+ "field.role": "peranan",
61
63
  "field.serial-no": "no. siri",
62
64
  "field.spec": "spesifikasi",
63
65
  "field.stat-function": "fungsi stat.",
@@ -71,6 +73,7 @@
71
73
  "field.time-period": "tempoh masa",
72
74
  "field.unit": "unit",
73
75
  "field.use-case": "kes penggunaan",
76
+ "field.view": "skrin",
74
77
  "field.work-date": "tarikh kerja",
75
78
  "field.work-shift": "shift kerja",
76
79
  "label.acceptables": "boleh diterima",
@@ -31,6 +31,7 @@
31
31
  "field.entry-view": "输入界面",
32
32
  "field.hidden": "隐藏",
33
33
  "field.item": "项目",
34
+ "field.key": "键",
34
35
  "field.key-01": "键 1",
35
36
  "field.key-02": "键 2",
36
37
  "field.key-03": "键 3",
@@ -58,6 +59,7 @@
58
59
  "field.request-params": "请求参数",
59
60
  "field.requires-review": "需要审查",
60
61
  "field.review-approval-line": "审批线",
62
+ "field.role": "角色",
61
63
  "field.serial-no": "序列号",
62
64
  "field.spec": "规格",
63
65
  "field.stat-function": "统计函数",
@@ -71,6 +73,7 @@
71
73
  "field.time-period": "时间单位",
72
74
  "field.unit": "单位",
73
75
  "field.use-case": "使用案例",
76
+ "field.view": "屏幕",
74
77
  "field.work-date": "工作基准日",
75
78
  "field.work-shift": "轮班",
76
79
  "label.acceptables": "允许值",