@things-factory/dataset 8.0.0 → 9.0.0-beta.3
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/activities/activity-data-review-edit.d.ts +5 -1
- package/dist-client/activities/activity-data-review-edit.js +143 -5
- package/dist-client/activities/activity-data-review-edit.js.map +1 -1
- package/dist-client/pages/data-entry/data-entry-list-page.js +2 -2
- package/dist-client/pages/data-entry/data-entry-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/activities/activity-data-review.js +18 -5
- package/dist-server/activities/activity-data-review.js.map +1 -1
- package/dist-server/activities/activity-ooc-review.js +13 -52
- package/dist-server/activities/activity-ooc-review.js.map +1 -1
- package/dist-server/controllers/create-data-ooc.d.ts +4 -0
- package/dist-server/controllers/create-data-ooc.js +65 -0
- package/dist-server/controllers/create-data-ooc.js.map +1 -0
- package/dist-server/controllers/create-data-sample.js +4 -94
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/controllers/index.d.ts +3 -0
- package/dist-server/controllers/index.js +3 -0
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/controllers/issue-ooc-resolve.d.ts +3 -0
- package/dist-server/controllers/issue-ooc-resolve.js +49 -0
- package/dist-server/controllers/issue-ooc-resolve.js.map +1 -0
- package/dist-server/controllers/issue-ooc-review.d.ts +3 -0
- package/dist-server/controllers/issue-ooc-review.js +47 -0
- package/dist-server/controllers/issue-ooc-review.js.map +1 -0
- package/dist-server/service/data-sample/data-sample-query.d.ts +1 -1
- package/dist-server/service/data-sample/data-sample-query.js +3 -3
- package/dist-server/service/data-sample/data-sample-query.js.map +1 -1
- package/dist-server/service/index.d.ts +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -26
- package/translations/en.json +3 -0
- package/translations/ja.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
- package/client/activities/activity-data-collect-edit.ts +0 -105
- package/client/activities/activity-data-collect-view.ts +0 -91
- package/client/activities/activity-data-review-edit.ts +0 -133
- package/client/activities/activity-data-review-view.ts +0 -145
- package/client/activities/activity-ooc-resolve-edit.ts +0 -195
- package/client/activities/activity-ooc-resolve-view.ts +0 -143
- package/client/activities/activity-ooc-review-edit.ts +0 -173
- package/client/activities/activity-ooc-review-view.ts +0 -129
- package/client/bootstrap.ts +0 -35
- package/client/components/data-entry-form.ts +0 -109
- package/client/index.ts +0 -1
- package/client/pages/data-archive/data-archive-list-page.ts +0 -277
- package/client/pages/data-archive/data-archive-request-popup.ts +0 -177
- package/client/pages/data-entry/data-entry-list-page.ts +0 -464
- package/client/pages/data-key-set/data-key-item-list.ts +0 -183
- package/client/pages/data-key-set/data-key-set-importer.ts +0 -89
- package/client/pages/data-key-set/data-key-set-list-page.ts +0 -413
- package/client/pages/data-ooc/data-ooc-list-page.ts +0 -549
- package/client/pages/data-ooc/data-ooc-page.ts +0 -164
- package/client/pages/data-ooc/data-ooc-view.ts +0 -236
- package/client/pages/data-ooc/data-oocs-page.ts +0 -200
- package/client/pages/data-report/data-report-embed-page.ts +0 -108
- package/client/pages/data-report/data-report-list-page.ts +0 -454
- package/client/pages/data-report/data-report-samples-page.ts +0 -174
- package/client/pages/data-report/jasper-report-oocs-page.ts +0 -110
- package/client/pages/data-report/jasper-report-samples-crosstab-page.ts +0 -110
- package/client/pages/data-report/jasper-report-samples-page.ts +0 -110
- package/client/pages/data-sample/data-sample-list-page.ts +0 -442
- package/client/pages/data-sample/data-sample-page.ts +0 -55
- package/client/pages/data-sample/data-sample-search-page.ts +0 -424
- package/client/pages/data-sample/data-sample-view.ts +0 -292
- package/client/pages/data-sample/data-samples-page.ts +0 -249
- package/client/pages/data-sensor/data-sensor-list-page.ts +0 -456
- package/client/pages/data-set/data-item-list.ts +0 -304
- package/client/pages/data-set/data-set-importer.ts +0 -89
- package/client/pages/data-set/data-set-list-page.ts +0 -1078
- package/client/pages/data-summary/data-summary-list-page.ts +0 -363
- package/client/pages/data-summary/data-summary-period-page.ts +0 -439
- package/client/pages/data-summary/data-summary-search-page.ts +0 -426
- package/client/pages/data-summary/data-summary-view.ts +0 -133
- package/client/route.ts +0 -91
- package/client/tsconfig.json +0 -13
- package/server/activities/activity-data-collect.ts +0 -100
- package/server/activities/activity-data-review.ts +0 -82
- package/server/activities/activity-ooc-resolve.ts +0 -123
- package/server/activities/activity-ooc-review.ts +0 -144
- package/server/activities/index.ts +0 -11
- package/server/controllers/create-data-sample.ts +0 -426
- package/server/controllers/data-use-case.ts +0 -98
- package/server/controllers/finalize-data-collection.ts +0 -388
- package/server/controllers/index.ts +0 -3
- package/server/controllers/issue-data-collection-task.ts +0 -70
- package/server/controllers/jasper-report.ts +0 -186
- package/server/controllers/query-data-summary-by-period.ts +0 -178
- package/server/controllers/shiny-report.ts +0 -54
- package/server/engine/index.ts +0 -1
- package/server/engine/task/create-data-sample.ts +0 -100
- package/server/engine/task/index.ts +0 -2
- package/server/engine/task/issue-collect-data.ts +0 -45
- package/server/index.ts +0 -8
- package/server/routes.ts +0 -188
- package/server/service/data-archive/data-archive-mutation.ts +0 -273
- package/server/service/data-archive/data-archive-query.ts +0 -58
- package/server/service/data-archive/data-archive-type.ts +0 -48
- package/server/service/data-archive/data-archive.ts +0 -69
- package/server/service/data-archive/index.ts +0 -6
- package/server/service/data-key-set/data-key-item-type.ts +0 -31
- package/server/service/data-key-set/data-key-set-mutation.ts +0 -201
- package/server/service/data-key-set/data-key-set-query.ts +0 -68
- package/server/service/data-key-set/data-key-set-type.ts +0 -70
- package/server/service/data-key-set/data-key-set.ts +0 -86
- package/server/service/data-key-set/index.ts +0 -6
- package/server/service/data-ooc/data-ooc-mutation.ts +0 -154
- package/server/service/data-ooc/data-ooc-query.ts +0 -106
- package/server/service/data-ooc/data-ooc-subscription.ts +0 -48
- package/server/service/data-ooc/data-ooc-type.ts +0 -71
- package/server/service/data-ooc/data-ooc.ts +0 -259
- package/server/service/data-ooc/index.ts +0 -7
- package/server/service/data-sample/data-sample-mutation.ts +0 -18
- package/server/service/data-sample/data-sample-query.ts +0 -215
- package/server/service/data-sample/data-sample-type.ts +0 -47
- package/server/service/data-sample/data-sample.ts +0 -193
- package/server/service/data-sample/index.ts +0 -6
- package/server/service/data-sensor/data-sensor-mutation.ts +0 -116
- package/server/service/data-sensor/data-sensor-query.ts +0 -76
- package/server/service/data-sensor/data-sensor-type.ts +0 -104
- package/server/service/data-sensor/data-sensor.ts +0 -126
- package/server/service/data-sensor/index.ts +0 -6
- package/server/service/data-set/data-item-type.ts +0 -155
- package/server/service/data-set/data-set-mutation.ts +0 -552
- package/server/service/data-set/data-set-query.ts +0 -461
- package/server/service/data-set/data-set-type.ts +0 -204
- package/server/service/data-set/data-set.ts +0 -326
- package/server/service/data-set/index.ts +0 -6
- package/server/service/data-set-history/data-set-history-query.ts +0 -126
- package/server/service/data-set-history/data-set-history-type.ts +0 -12
- package/server/service/data-set-history/data-set-history.ts +0 -217
- package/server/service/data-set-history/event-subscriber.ts +0 -17
- package/server/service/data-set-history/index.ts +0 -7
- package/server/service/data-spec/data-spec-manager.ts +0 -21
- package/server/service/data-spec/data-spec-query.ts +0 -21
- package/server/service/data-spec/data-spec.ts +0 -45
- package/server/service/data-spec/index.ts +0 -5
- package/server/service/data-summary/data-summary-mutation.ts +0 -45
- package/server/service/data-summary/data-summary-query.ts +0 -179
- package/server/service/data-summary/data-summary-type.ts +0 -86
- package/server/service/data-summary/data-summary.ts +0 -170
- package/server/service/data-summary/index.ts +0 -7
- package/server/service/index.ts +0 -57
- package/server/tsconfig.json +0 -10
- package/server/utils/config-resolver.ts +0 -29
- package/server/utils/index.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/dataset",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-beta.3",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -27,34 +27,34 @@
|
|
|
27
27
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@operato/app": "^
|
|
31
|
-
"@operato/data-grist": "^
|
|
32
|
-
"@operato/dataset": "^
|
|
33
|
-
"@operato/ghost-print": "^
|
|
34
|
-
"@operato/graphql": "^
|
|
35
|
-
"@operato/grist-editor": "^
|
|
36
|
-
"@operato/i18n": "^
|
|
37
|
-
"@operato/layout": "^
|
|
38
|
-
"@operato/moment-timezone-es": "^
|
|
39
|
-
"@operato/p13n": "^
|
|
40
|
-
"@operato/shell": "^
|
|
41
|
-
"@operato/styles": "^
|
|
42
|
-
"@operato/utils": "^
|
|
43
|
-
"@things-factory/auth-base": "^
|
|
44
|
-
"@things-factory/aws-base": "^
|
|
45
|
-
"@things-factory/board-service": "^
|
|
46
|
-
"@things-factory/env": "^8.0.0",
|
|
47
|
-
"@things-factory/integration-base": "^
|
|
48
|
-
"@things-factory/organization": "^
|
|
49
|
-
"@things-factory/personalization": "^
|
|
50
|
-
"@things-factory/scheduler-client": "^
|
|
51
|
-
"@things-factory/shell": "^
|
|
52
|
-
"@things-factory/work-shift": "^
|
|
53
|
-
"@things-factory/worklist": "^
|
|
30
|
+
"@operato/app": "^9.0.0-beta",
|
|
31
|
+
"@operato/data-grist": "^9.0.0-beta",
|
|
32
|
+
"@operato/dataset": "^9.0.0-beta",
|
|
33
|
+
"@operato/ghost-print": "^9.0.0-beta",
|
|
34
|
+
"@operato/graphql": "^9.0.0-beta",
|
|
35
|
+
"@operato/grist-editor": "^9.0.0-beta",
|
|
36
|
+
"@operato/i18n": "^9.0.0-beta",
|
|
37
|
+
"@operato/layout": "^9.0.0-beta",
|
|
38
|
+
"@operato/moment-timezone-es": "^9.0.0-beta",
|
|
39
|
+
"@operato/p13n": "^9.0.0-beta",
|
|
40
|
+
"@operato/shell": "^9.0.0-beta",
|
|
41
|
+
"@operato/styles": "^9.0.0-beta",
|
|
42
|
+
"@operato/utils": "^9.0.0-beta",
|
|
43
|
+
"@things-factory/auth-base": "^9.0.0-beta.3",
|
|
44
|
+
"@things-factory/aws-base": "^9.0.0-beta.3",
|
|
45
|
+
"@things-factory/board-service": "^9.0.0-beta.3",
|
|
46
|
+
"@things-factory/env": "^8.0.0-beta.4",
|
|
47
|
+
"@things-factory/integration-base": "^9.0.0-beta.3",
|
|
48
|
+
"@things-factory/organization": "^9.0.0-beta.3",
|
|
49
|
+
"@things-factory/personalization": "^9.0.0-beta.3",
|
|
50
|
+
"@things-factory/scheduler-client": "^9.0.0-beta.3",
|
|
51
|
+
"@things-factory/shell": "^9.0.0-beta.0",
|
|
52
|
+
"@things-factory/work-shift": "^9.0.0-beta.3",
|
|
53
|
+
"@things-factory/worklist": "^9.0.0-beta.3",
|
|
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": "1d7e0dd4c88f3c3f3bd311c00e4b1d1542d53634"
|
|
60
60
|
}
|
package/translations/en.json
CHANGED
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
"label.datasample review timeline": "data sample review timeline",
|
|
100
100
|
"label.end-date": "end date",
|
|
101
101
|
"label.group-by data-keys": "group by each data-keys",
|
|
102
|
+
"label.judgment": "judgment",
|
|
103
|
+
"label.judgment-abnormal": "action needed",
|
|
104
|
+
"label.judgment-normal": "normal",
|
|
102
105
|
"label.maximum value": "maximum value",
|
|
103
106
|
"label.minimum value": "minimum value",
|
|
104
107
|
"label.ooc resolve timeline": "OOC resolve timeline",
|
package/translations/ja.json
CHANGED
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
"label.datasample review timeline": "データサンプルレビュータイムライン",
|
|
100
100
|
"label.end-date": "終了日",
|
|
101
101
|
"label.group-by data-keys": "各データキーごとにグループ化",
|
|
102
|
+
"label.judgment": "判定",
|
|
103
|
+
"label.judgment-abnormal": "措置必要",
|
|
104
|
+
"label.judgment-normal": "正常",
|
|
102
105
|
"label.maximum value": "最大値",
|
|
103
106
|
"label.minimum value": "最小値",
|
|
104
107
|
"label.ooc resolve timeline": "OOC 解決タイムライン",
|
package/translations/ko.json
CHANGED
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
"label.datasample review timeline": "데이타샘플 리뷰 타임라인",
|
|
100
100
|
"label.end-date": "종료일",
|
|
101
101
|
"label.group-by data-keys": "각 데이터 키별로 그룹화",
|
|
102
|
+
"label.judgment": "판정",
|
|
103
|
+
"label.judgment-abnormal": "조치필요",
|
|
104
|
+
"label.judgment-normal": "정상",
|
|
102
105
|
"label.maximum value": "최대값",
|
|
103
106
|
"label.minimum value": "최소값",
|
|
104
107
|
"label.ooc resolve timeline": "OOC 조치 타임라인",
|
package/translations/ms.json
CHANGED
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
"label.datasample review timeline": "garis masa ulasan sampel data",
|
|
100
100
|
"label.end-date": "tarikh tamat",
|
|
101
101
|
"label.group-by data-keys": "kumpulkan mengikut setiap data-keys",
|
|
102
|
+
"label.judgment": "penilaian",
|
|
103
|
+
"label.judgment-abnormal": "memerlukan tindakan",
|
|
104
|
+
"label.judgment-normal": "normal",
|
|
102
105
|
"label.maximum value": "nilai maksimum",
|
|
103
106
|
"label.minimum value": "nilai minimum",
|
|
104
107
|
"label.ooc resolve timeline": "garis masa penyelesaian OOC",
|
package/translations/zh.json
CHANGED
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
"label.datasample review timeline": "数据样本审查时间线",
|
|
100
100
|
"label.end-date": "结束日期",
|
|
101
101
|
"label.group-by data-keys": "按每个数据键分组",
|
|
102
|
+
"label.judgment": "判定",
|
|
103
|
+
"label.judgment-abnormal": "需要措施",
|
|
104
|
+
"label.judgment-normal": "正常",
|
|
102
105
|
"label.maximum value": "最大值",
|
|
103
106
|
"label.minimum value": "最小值",
|
|
104
107
|
"label.ooc resolve timeline": "OOC 解决时间线",
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import '@operato/dataset/ox-data-entry-form.js'
|
|
2
|
-
|
|
3
|
-
import gql from 'graphql-tag'
|
|
4
|
-
import { css, html, LitElement } from 'lit'
|
|
5
|
-
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
6
|
-
|
|
7
|
-
import { client } from '@operato/graphql'
|
|
8
|
-
import { i18next, localize } from '@operato/i18n'
|
|
9
|
-
import { ScrollbarStyles } from '@operato/styles'
|
|
10
|
-
import { OxDataEntryForm } from '@operato/dataset/ox-data-entry-form.js'
|
|
11
|
-
import { DataSet } from '@operato/dataset'
|
|
12
|
-
|
|
13
|
-
@customElement('activity-data-collect-edit')
|
|
14
|
-
export class DataCollectActivityEdit extends localize(i18next)(LitElement) {
|
|
15
|
-
static styles = [
|
|
16
|
-
ScrollbarStyles,
|
|
17
|
-
css`
|
|
18
|
-
:host {
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
|
|
22
|
-
background-color: var(--md-sys-color-surface);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
ox-data-entry-form {
|
|
26
|
-
flex: 1;
|
|
27
|
-
padding: 10px;
|
|
28
|
-
overflow: auto;
|
|
29
|
-
}
|
|
30
|
-
`
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
@property({ type: Object }) input?: any
|
|
34
|
-
@property({ type: Object }) output?: any
|
|
35
|
-
|
|
36
|
-
@state() dataSet?: DataSet & { id: string }
|
|
37
|
-
|
|
38
|
-
@query('ox-data-entry-form') entryForm!: OxDataEntryForm
|
|
39
|
-
|
|
40
|
-
render() {
|
|
41
|
-
return html`
|
|
42
|
-
<ox-data-entry-form
|
|
43
|
-
.dataSet=${this.dataSet}
|
|
44
|
-
.value=${this.output}
|
|
45
|
-
@change=${this._updateDataItems}
|
|
46
|
-
></ox-data-entry-form>
|
|
47
|
-
`
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async _updateDataItems(e: CustomEvent) {
|
|
51
|
-
e.stopPropagation()
|
|
52
|
-
|
|
53
|
-
this.output = this.entryForm.value
|
|
54
|
-
|
|
55
|
-
this.dispatchEvent(
|
|
56
|
-
new CustomEvent('change', {
|
|
57
|
-
detail: this.output
|
|
58
|
-
})
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
updated(changes) {
|
|
63
|
-
if (changes.has('input')) {
|
|
64
|
-
this.fetchDataSet()
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
async fetchDataSet() {
|
|
69
|
-
const id = this.input.dataSetId
|
|
70
|
-
|
|
71
|
-
if (id) {
|
|
72
|
-
const response = await client.query({
|
|
73
|
-
query: gql`
|
|
74
|
-
query ($id: String!) {
|
|
75
|
-
dataSet(id: $id) {
|
|
76
|
-
id
|
|
77
|
-
name
|
|
78
|
-
description
|
|
79
|
-
useCase
|
|
80
|
-
dataItems {
|
|
81
|
-
name
|
|
82
|
-
description
|
|
83
|
-
active
|
|
84
|
-
hidden
|
|
85
|
-
tag
|
|
86
|
-
group
|
|
87
|
-
type
|
|
88
|
-
unit
|
|
89
|
-
options
|
|
90
|
-
quota
|
|
91
|
-
spec
|
|
92
|
-
stat
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
`,
|
|
97
|
-
variables: {
|
|
98
|
-
id
|
|
99
|
-
}
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
this.dataSet = response.data.dataSet
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import '@operato/dataset/ox-data-entry-view.js'
|
|
2
|
-
|
|
3
|
-
import gql from 'graphql-tag'
|
|
4
|
-
import { css, html, LitElement } from 'lit'
|
|
5
|
-
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
6
|
-
|
|
7
|
-
import { client } from '@operato/graphql'
|
|
8
|
-
import { i18next, localize } from '@operato/i18n'
|
|
9
|
-
import { ScrollbarStyles } from '@operato/styles'
|
|
10
|
-
import { DataSet } from '@operato/dataset'
|
|
11
|
-
|
|
12
|
-
@customElement('activity-data-collect-view')
|
|
13
|
-
export class DataCollectActivityView extends localize(i18next)(LitElement) {
|
|
14
|
-
static styles = [
|
|
15
|
-
ScrollbarStyles,
|
|
16
|
-
css`
|
|
17
|
-
:host {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
|
|
21
|
-
background-color: var(--md-sys-color-surface);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
ox-data-entry-view {
|
|
25
|
-
flex: 1;
|
|
26
|
-
padding: 10px;
|
|
27
|
-
overflow: auto;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@media print {
|
|
31
|
-
:host {
|
|
32
|
-
display: block;
|
|
33
|
-
overflow: visible;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
`
|
|
37
|
-
]
|
|
38
|
-
|
|
39
|
-
@property({ type: Object }) input?: any
|
|
40
|
-
@property({ type: Object }) output?: any
|
|
41
|
-
|
|
42
|
-
@state() dataSet?: DataSet & { id: string }
|
|
43
|
-
|
|
44
|
-
render() {
|
|
45
|
-
return html` <ox-data-entry-view .dataSet=${this.dataSet} .value=${this.output}></ox-data-entry-view>`
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
updated(changes) {
|
|
49
|
-
if (changes.has('input')) {
|
|
50
|
-
this.fetchDataSet()
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async fetchDataSet() {
|
|
55
|
-
const id = this.input.dataSetId
|
|
56
|
-
|
|
57
|
-
if (id) {
|
|
58
|
-
const response = await client.query({
|
|
59
|
-
query: gql`
|
|
60
|
-
query ($id: String!) {
|
|
61
|
-
dataSet(id: $id) {
|
|
62
|
-
id
|
|
63
|
-
name
|
|
64
|
-
description
|
|
65
|
-
useCase
|
|
66
|
-
dataItems {
|
|
67
|
-
name
|
|
68
|
-
description
|
|
69
|
-
active
|
|
70
|
-
hidden
|
|
71
|
-
tag
|
|
72
|
-
group
|
|
73
|
-
type
|
|
74
|
-
unit
|
|
75
|
-
options
|
|
76
|
-
quota
|
|
77
|
-
spec
|
|
78
|
-
stat
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
`,
|
|
83
|
-
variables: {
|
|
84
|
-
id
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
this.dataSet = response.data.dataSet
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import '@operato/dataset/ox-data-entry-form.js'
|
|
2
|
-
|
|
3
|
-
import gql from 'graphql-tag'
|
|
4
|
-
import { css, html, LitElement } from 'lit'
|
|
5
|
-
import { customElement, property, state } from 'lit/decorators.js'
|
|
6
|
-
|
|
7
|
-
import { i18next, localize } from '@operato/i18n'
|
|
8
|
-
import { ScrollbarStyles } from '@operato/styles'
|
|
9
|
-
import { client } from '@operato/graphql'
|
|
10
|
-
|
|
11
|
-
@customElement('activity-data-review-edit')
|
|
12
|
-
export class DataReviewActivityEdit extends localize(i18next)(LitElement) {
|
|
13
|
-
static styles = [
|
|
14
|
-
ScrollbarStyles,
|
|
15
|
-
css`
|
|
16
|
-
:host {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
|
|
20
|
-
background-color: var(--md-sys-color-surface);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
div[content] {
|
|
24
|
-
flex: 1;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
|
|
27
|
-
display: flex;
|
|
28
|
-
overflow: auto;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
ox-data-sample-view {
|
|
32
|
-
flex: 1;
|
|
33
|
-
padding: var(--spacing-large);
|
|
34
|
-
overflow: auto;
|
|
35
|
-
}
|
|
36
|
-
`
|
|
37
|
-
]
|
|
38
|
-
|
|
39
|
-
@property({ type: Object }) input?: any
|
|
40
|
-
@property({ type: Object }) output?: any
|
|
41
|
-
|
|
42
|
-
@state() dataSample?: any
|
|
43
|
-
|
|
44
|
-
render() {
|
|
45
|
-
return html`
|
|
46
|
-
<div content>
|
|
47
|
-
<ox-data-sample-view .dataSample=${this.dataSample}></ox-data-sample-view>
|
|
48
|
-
</div>
|
|
49
|
-
`
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
onChangeInstruction(e: Event) {
|
|
53
|
-
this.output ||= {}
|
|
54
|
-
this.output.instruction = (e.target as HTMLTextAreaElement).value
|
|
55
|
-
|
|
56
|
-
this.dispatchEvent(
|
|
57
|
-
new CustomEvent('change', {
|
|
58
|
-
detail: this.output
|
|
59
|
-
})
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
updated(changes) {
|
|
64
|
-
if (changes.has('input')) {
|
|
65
|
-
this.fetchDataAssign()
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
async fetchDataAssign() {
|
|
70
|
-
const { dataSampleId, dataSample } = this.input || {}
|
|
71
|
-
|
|
72
|
-
if (dataSample) {
|
|
73
|
-
/* only for backwards compatibility - should be deleted later */
|
|
74
|
-
this.dataSample = dataSample
|
|
75
|
-
} else if (dataSampleId) {
|
|
76
|
-
const response = await client.query({
|
|
77
|
-
query: gql`
|
|
78
|
-
query ($id: String!) {
|
|
79
|
-
dataSample(id: $id) {
|
|
80
|
-
id
|
|
81
|
-
name
|
|
82
|
-
description
|
|
83
|
-
useCase
|
|
84
|
-
key01
|
|
85
|
-
key02
|
|
86
|
-
key03
|
|
87
|
-
key04
|
|
88
|
-
key05
|
|
89
|
-
data
|
|
90
|
-
ooc
|
|
91
|
-
oos
|
|
92
|
-
dataSet {
|
|
93
|
-
id
|
|
94
|
-
name
|
|
95
|
-
description
|
|
96
|
-
}
|
|
97
|
-
dataItems {
|
|
98
|
-
name
|
|
99
|
-
description
|
|
100
|
-
active
|
|
101
|
-
hidden
|
|
102
|
-
tag
|
|
103
|
-
group
|
|
104
|
-
type
|
|
105
|
-
unit
|
|
106
|
-
options
|
|
107
|
-
quota
|
|
108
|
-
spec
|
|
109
|
-
stat
|
|
110
|
-
}
|
|
111
|
-
judgment
|
|
112
|
-
workDate
|
|
113
|
-
workShift
|
|
114
|
-
updater {
|
|
115
|
-
id
|
|
116
|
-
name
|
|
117
|
-
}
|
|
118
|
-
updatedAt
|
|
119
|
-
collectedAt
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
`,
|
|
123
|
-
variables: {
|
|
124
|
-
id: dataSampleId
|
|
125
|
-
}
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
this.dataSample = {
|
|
129
|
-
...response.data.dataSample
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import '@operato/dataset/ox-data-entry-form.js'
|
|
2
|
-
|
|
3
|
-
import gql from 'graphql-tag'
|
|
4
|
-
import { css, html, LitElement } from 'lit'
|
|
5
|
-
import { customElement, property, state } from 'lit/decorators.js'
|
|
6
|
-
|
|
7
|
-
import { i18next, localize } from '@operato/i18n'
|
|
8
|
-
import { ScrollbarStyles } from '@operato/styles'
|
|
9
|
-
import { client } from '@operato/graphql'
|
|
10
|
-
|
|
11
|
-
@customElement('activity-data-review-view')
|
|
12
|
-
export class DataReviewActivityView extends localize(i18next)(LitElement) {
|
|
13
|
-
static styles = [
|
|
14
|
-
ScrollbarStyles,
|
|
15
|
-
css`
|
|
16
|
-
:host {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
|
|
20
|
-
background-color: var(--md-sys-color-surface);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
div[content] {
|
|
24
|
-
flex: 1;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
|
|
27
|
-
display: flex;
|
|
28
|
-
overflow: auto;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
ox-data-sample-view {
|
|
32
|
-
flex: 1;
|
|
33
|
-
padding: var(--spacing-large);
|
|
34
|
-
overflow: auto;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@media print {
|
|
38
|
-
:host {
|
|
39
|
-
display: block;
|
|
40
|
-
overflow: visible;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
div[content] {
|
|
44
|
-
display: block;
|
|
45
|
-
overflow: visible;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
`
|
|
49
|
-
]
|
|
50
|
-
|
|
51
|
-
@property({ type: Object }) input?: any
|
|
52
|
-
@property({ type: Object }) output?: any
|
|
53
|
-
|
|
54
|
-
@state() dataSample?: any
|
|
55
|
-
|
|
56
|
-
render() {
|
|
57
|
-
return html`
|
|
58
|
-
<div content>
|
|
59
|
-
<ox-data-sample-view .dataSample=${this.dataSample}></ox-data-sample-view>
|
|
60
|
-
</div>
|
|
61
|
-
`
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
onChangeInstruction(e: Event) {
|
|
65
|
-
this.output ||= {}
|
|
66
|
-
this.output.instruction = (e.target as HTMLTextAreaElement).value
|
|
67
|
-
|
|
68
|
-
this.dispatchEvent(
|
|
69
|
-
new CustomEvent('change', {
|
|
70
|
-
detail: this.output
|
|
71
|
-
})
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
updated(changes) {
|
|
76
|
-
if (changes.has('input')) {
|
|
77
|
-
this.fetchDataAssign()
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async fetchDataAssign() {
|
|
82
|
-
const { dataSampleId, dataSample } = this.input || {}
|
|
83
|
-
|
|
84
|
-
if (dataSample) {
|
|
85
|
-
/* only for backwards compatibility - should be deleted later */
|
|
86
|
-
this.dataSample = dataSample
|
|
87
|
-
} else if (dataSampleId) {
|
|
88
|
-
const response = await client.query({
|
|
89
|
-
query: gql`
|
|
90
|
-
query ($id: String!) {
|
|
91
|
-
dataSample(id: $id) {
|
|
92
|
-
id
|
|
93
|
-
name
|
|
94
|
-
description
|
|
95
|
-
useCase
|
|
96
|
-
key01
|
|
97
|
-
key02
|
|
98
|
-
key03
|
|
99
|
-
key04
|
|
100
|
-
key05
|
|
101
|
-
data
|
|
102
|
-
ooc
|
|
103
|
-
oos
|
|
104
|
-
dataSet {
|
|
105
|
-
id
|
|
106
|
-
name
|
|
107
|
-
description
|
|
108
|
-
}
|
|
109
|
-
dataItems {
|
|
110
|
-
name
|
|
111
|
-
description
|
|
112
|
-
active
|
|
113
|
-
hidden
|
|
114
|
-
tag
|
|
115
|
-
group
|
|
116
|
-
type
|
|
117
|
-
unit
|
|
118
|
-
options
|
|
119
|
-
quota
|
|
120
|
-
spec
|
|
121
|
-
stat
|
|
122
|
-
}
|
|
123
|
-
judgment
|
|
124
|
-
workDate
|
|
125
|
-
workShift
|
|
126
|
-
updater {
|
|
127
|
-
id
|
|
128
|
-
name
|
|
129
|
-
}
|
|
130
|
-
updatedAt
|
|
131
|
-
collectedAt
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
`,
|
|
135
|
-
variables: {
|
|
136
|
-
id: dataSampleId
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
this.dataSample = {
|
|
141
|
-
...response.data.dataSample
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|