@things-factory/dataset 7.0.0-alpha.6 → 7.0.0-alpha.8
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/client/activities/activity-data-collect-view.ts +7 -0
- package/client/activities/activity-data-review-edit.ts +66 -4
- package/client/activities/activity-data-review-view.ts +78 -4
- package/client/activities/activity-ooc-resolve-view.ts +12 -0
- package/client/activities/activity-ooc-review-view.ts +12 -0
- package/client/pages/data-ooc/data-ooc-list-page.ts +50 -21
- package/client/pages/data-ooc/data-ooc-page.ts +44 -0
- package/client/pages/data-ooc/data-ooc-view.ts +158 -19
- package/client/pages/data-ooc/data-oocs-page.ts +71 -3
- package/client/pages/data-sample/data-sample-list-page.ts +33 -16
- package/client/pages/data-sample/data-sample-page.ts +7 -0
- package/client/pages/data-sample/data-sample-search-page.ts +12 -12
- package/client/pages/data-sample/data-sample-view.ts +145 -22
- package/client/pages/data-sample/data-samples-page.ts +133 -5
- package/client/pages/data-sensor/data-sensor-list-page.ts +28 -6
- package/client/pages/data-set/data-item-list.ts +2 -2
- package/client/pages/data-summary/data-summary-list-page.ts +12 -24
- package/dist-client/activities/activity-data-collect-view.js +7 -0
- package/dist-client/activities/activity-data-collect-view.js.map +1 -1
- package/dist-client/activities/activity-data-review-edit.d.ts +1 -1
- package/dist-client/activities/activity-data-review-edit.js +63 -5
- package/dist-client/activities/activity-data-review-edit.js.map +1 -1
- package/dist-client/activities/activity-data-review-view.d.ts +1 -1
- package/dist-client/activities/activity-data-review-view.js +75 -5
- package/dist-client/activities/activity-data-review-view.js.map +1 -1
- package/dist-client/activities/activity-ooc-resolve-view.js +12 -0
- package/dist-client/activities/activity-ooc-resolve-view.js.map +1 -1
- package/dist-client/activities/activity-ooc-review-view.js +12 -0
- package/dist-client/activities/activity-ooc-review-view.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-list-page.js +50 -21
- package/dist-client/pages/data-ooc/data-ooc-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-page.js +44 -0
- package/dist-client/pages/data-ooc/data-ooc-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-view.d.ts +6 -3
- package/dist-client/pages/data-ooc/data-ooc-view.js +155 -22
- package/dist-client/pages/data-ooc/data-ooc-view.js.map +1 -1
- package/dist-client/pages/data-ooc/data-oocs-page.d.ts +1 -0
- package/dist-client/pages/data-ooc/data-oocs-page.js +71 -3
- package/dist-client/pages/data-ooc/data-oocs-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-list-page.js +33 -16
- package/dist-client/pages/data-sample/data-sample-list-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-page.js +7 -0
- package/dist-client/pages/data-sample/data-sample-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-search-page.js +12 -12
- package/dist-client/pages/data-sample/data-sample-search-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-view.d.ts +18 -0
- package/dist-client/pages/data-sample/data-sample-view.js +144 -21
- package/dist-client/pages/data-sample/data-sample-view.js.map +1 -1
- package/dist-client/pages/data-sample/data-samples-page.d.ts +2 -0
- package/dist-client/pages/data-sample/data-samples-page.js +134 -5
- package/dist-client/pages/data-sample/data-samples-page.js.map +1 -1
- package/dist-client/pages/data-sensor/data-sensor-list-page.js +28 -6
- package/dist-client/pages/data-sensor/data-sensor-list-page.js.map +1 -1
- package/dist-client/pages/data-set/data-item-list.js +2 -2
- package/dist-client/pages/data-set/data-item-list.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-list-page.js +12 -21
- package/dist-client/pages/data-summary/data-summary-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/activities/activity-data-collect.js.map +1 -1
- package/dist-server/activities/activity-data-review.js.map +1 -1
- package/dist-server/activities/activity-ooc-review.js +3 -2
- package/dist-server/activities/activity-ooc-review.js.map +1 -1
- package/dist-server/controllers/create-data-sample.js +27 -29
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/controllers/issue-collect-data.js +55 -0
- package/dist-server/controllers/issue-collect-data.js.map +1 -0
- package/dist-server/engine/index.js +4 -0
- package/dist-server/engine/index.js.map +1 -0
- package/dist-server/engine/task/create-data-sample.js +80 -0
- package/dist-server/engine/task/create-data-sample.js.map +1 -0
- package/dist-server/engine/task/index.js +5 -0
- package/dist-server/engine/task/index.js.map +1 -0
- package/dist-server/engine/task/issue-collect-data.js +40 -0
- package/dist-server/engine/task/issue-collect-data.js.map +1 -0
- package/dist-server/index.js +1 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/routes.js +36 -65
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-query.js +32 -0
- package/dist-server/service/data-ooc/data-ooc-query.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc.js +15 -26
- package/dist-server/service/data-ooc/data-ooc.js.map +1 -1
- package/dist-server/service/data-sample/data-sample-query.js +24 -0
- package/dist-server/service/data-sample/data-sample-query.js.map +1 -1
- package/dist-server/service/data-sample/data-sample.js +17 -21
- package/dist-server/service/data-sample/data-sample.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor-query.js +16 -1
- package/dist-server/service/data-sensor/data-sensor-query.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor-type.js +8 -0
- package/dist-server/service/data-sensor/data-sensor-type.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor.js +15 -1
- package/dist-server/service/data-sensor/data-sensor.js.map +1 -1
- package/dist-server/service/data-set/data-item-type.js +1 -0
- package/dist-server/service/data-set/data-item-type.js.map +1 -1
- package/dist-server/service/data-set/data-set-query.js +2 -2
- package/dist-server/service/data-set/data-set-query.js.map +1 -1
- package/dist-server/service/data-summary/data-summary.js +8 -8
- package/dist-server/service/data-summary/data-summary.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/dataset/task/create-data-sample.ja.md +28 -0
- package/helps/dataset/task/create-data-sample.ko.md +28 -0
- package/helps/dataset/task/create-data-sample.md +28 -0
- package/helps/dataset/task/create-data-sample.ms.md +30 -0
- package/helps/dataset/task/create-data-sample.zh.md +28 -0
- package/helps/dataset/task/issue-collect-data.ja.md +35 -0
- package/helps/dataset/task/issue-collect-data.ko.md +32 -0
- package/helps/dataset/task/issue-collect-data.md +32 -0
- package/helps/dataset/task/issue-collect-data.ms.md +34 -0
- package/helps/dataset/task/issue-collect-data.zh.md +32 -0
- package/package.json +11 -11
- package/server/activities/activity-data-collect.ts +3 -11
- package/server/activities/activity-data-review.ts +1 -5
- package/server/activities/activity-ooc-review.ts +6 -16
- package/server/controllers/create-data-sample.ts +31 -38
- package/server/controllers/issue-collect-data.ts +61 -0
- package/server/engine/index.ts +1 -0
- package/server/engine/task/create-data-sample.ts +92 -0
- package/server/engine/task/index.ts +2 -0
- package/server/engine/task/issue-collect-data.ts +45 -0
- package/server/index.ts +1 -0
- package/server/routes.ts +47 -76
- package/server/service/data-ooc/data-ooc-query.ts +17 -0
- package/server/service/data-ooc/data-ooc.ts +17 -28
- package/server/service/data-sample/data-sample-query.ts +17 -17
- package/server/service/data-sample/data-sample.ts +18 -23
- package/server/service/data-sensor/data-sensor-query.ts +13 -1
- package/server/service/data-sensor/data-sensor-type.ts +6 -0
- package/server/service/data-sensor/data-sensor.ts +13 -11
- package/server/service/data-set/data-item-type.ts +1 -0
- package/server/service/data-set/data-set-query.ts +7 -7
- package/server/service/data-summary/data-summary.ts +10 -23
- package/translations/en.json +14 -2
- package/translations/ja.json +11 -1
- package/translations/ko.json +13 -1
- package/translations/ms.json +10 -0
- package/translations/zh.json +11 -1
@@ -1,10 +1,12 @@
|
|
1
1
|
import '@operato/dataset/ox-data-entry-form.js'
|
2
2
|
|
3
|
+
import gql from 'graphql-tag'
|
3
4
|
import { css, html, LitElement } from 'lit'
|
4
5
|
import { customElement, property, state } from 'lit/decorators.js'
|
5
6
|
|
6
7
|
import { i18next, localize } from '@operato/i18n'
|
7
8
|
import { ScrollbarStyles } from '@operato/styles'
|
9
|
+
import { client } from '@operato/graphql'
|
8
10
|
|
9
11
|
@customElement('activity-data-review-edit')
|
10
12
|
export class DataReviewActivityEdit extends localize(i18next)(LitElement) {
|
@@ -37,12 +39,12 @@ export class DataReviewActivityEdit extends localize(i18next)(LitElement) {
|
|
37
39
|
@property({ type: Object }) input?: any
|
38
40
|
@property({ type: Object }) output?: any
|
39
41
|
|
40
|
-
@state()
|
42
|
+
@state() dataSample?: any
|
41
43
|
|
42
44
|
render() {
|
43
45
|
return html`
|
44
46
|
<div content>
|
45
|
-
<ox-data-sample-view .dataSample=${this.
|
47
|
+
<ox-data-sample-view .dataSample=${this.dataSample}></ox-data-sample-view>
|
46
48
|
</div>
|
47
49
|
`
|
48
50
|
}
|
@@ -65,7 +67,67 @@ export class DataReviewActivityEdit extends localize(i18next)(LitElement) {
|
|
65
67
|
}
|
66
68
|
|
67
69
|
async fetchDataAssign() {
|
68
|
-
const dataSample = this.input
|
69
|
-
|
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
|
+
}
|
70
132
|
}
|
71
133
|
}
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import '@operato/dataset/ox-data-entry-form.js'
|
2
2
|
|
3
|
+
import gql from 'graphql-tag'
|
3
4
|
import { css, html, LitElement } from 'lit'
|
4
5
|
import { customElement, property, state } from 'lit/decorators.js'
|
5
6
|
|
6
7
|
import { i18next, localize } from '@operato/i18n'
|
7
8
|
import { ScrollbarStyles } from '@operato/styles'
|
9
|
+
import { client } from '@operato/graphql'
|
8
10
|
|
9
11
|
@customElement('activity-data-review-view')
|
10
12
|
export class DataReviewActivityView extends localize(i18next)(LitElement) {
|
@@ -31,18 +33,30 @@ export class DataReviewActivityView extends localize(i18next)(LitElement) {
|
|
31
33
|
padding: var(--padding-wide);
|
32
34
|
overflow: auto;
|
33
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
|
+
}
|
34
48
|
`
|
35
49
|
]
|
36
50
|
|
37
51
|
@property({ type: Object }) input?: any
|
38
52
|
@property({ type: Object }) output?: any
|
39
53
|
|
40
|
-
@state()
|
54
|
+
@state() dataSample?: any
|
41
55
|
|
42
56
|
render() {
|
43
57
|
return html`
|
44
58
|
<div content>
|
45
|
-
<ox-data-sample-view .dataSample=${this.
|
59
|
+
<ox-data-sample-view .dataSample=${this.dataSample}></ox-data-sample-view>
|
46
60
|
</div>
|
47
61
|
`
|
48
62
|
}
|
@@ -65,7 +79,67 @@ export class DataReviewActivityView extends localize(i18next)(LitElement) {
|
|
65
79
|
}
|
66
80
|
|
67
81
|
async fetchDataAssign() {
|
68
|
-
const dataSample = this.input
|
69
|
-
|
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
|
+
}
|
70
144
|
}
|
71
145
|
}
|
@@ -33,6 +33,18 @@ export class OocResolveActivityView extends localize(i18next)(LitElement) {
|
|
33
33
|
padding: var(--padding-wide);
|
34
34
|
overflow: auto;
|
35
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
|
+
}
|
36
48
|
`
|
37
49
|
]
|
38
50
|
|
@@ -33,6 +33,18 @@ class OocReviewActivityView extends localize(i18next)(LitElement) {
|
|
33
33
|
padding: var(--padding-wide);
|
34
34
|
overflow: auto;
|
35
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
|
+
}
|
36
48
|
`
|
37
49
|
]
|
38
50
|
|
@@ -47,6 +47,8 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
47
47
|
flex-direction: column;
|
48
48
|
|
49
49
|
overflow: hidden;
|
50
|
+
|
51
|
+
--grid-header-padding: 2px 0 2px 9px;
|
50
52
|
}
|
51
53
|
|
52
54
|
ox-grist {
|
@@ -133,19 +135,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
133
135
|
gutterName: 'button',
|
134
136
|
fixed: true,
|
135
137
|
icon: 'assignment_turned_in',
|
136
|
-
title: i18next.t('title.view detail ooc data')
|
137
|
-
handlers: {
|
138
|
-
click: (columns, data, column, record, rowIndex) => {
|
139
|
-
const popup = openPopup(html` <data-ooc-view .dataOoc=${record} style="background-color: white;"></data-ooc-view> `, {
|
140
|
-
backdrop: true,
|
141
|
-
size: 'large',
|
142
|
-
title: i18next.t('title.data-ooc view')
|
143
|
-
})
|
144
|
-
popup.onclosed = () => {
|
145
|
-
this.grist.fetch()
|
146
|
-
}
|
147
|
-
}
|
148
|
-
}
|
138
|
+
title: i18next.t('title.view detail ooc data')
|
149
139
|
},
|
150
140
|
{
|
151
141
|
type: 'string',
|
@@ -154,7 +144,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
154
144
|
label: true,
|
155
145
|
header: i18next.t('field.name'),
|
156
146
|
record: {
|
157
|
-
editable:
|
147
|
+
editable: false
|
158
148
|
},
|
159
149
|
filter: 'search',
|
160
150
|
sortable: true,
|
@@ -167,7 +157,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
167
157
|
label: true,
|
168
158
|
header: i18next.t('field.description'),
|
169
159
|
record: {
|
170
|
-
editable:
|
160
|
+
editable: false
|
171
161
|
},
|
172
162
|
filter: 'search',
|
173
163
|
width: 150,
|
@@ -210,13 +200,25 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
210
200
|
filter: true,
|
211
201
|
imex: true
|
212
202
|
},
|
203
|
+
{
|
204
|
+
type: 'textarea',
|
205
|
+
name: 'correctiveInstruction',
|
206
|
+
label: true,
|
207
|
+
header: i18next.t('field.corrective-instruction'),
|
208
|
+
record: {
|
209
|
+
editable: false,
|
210
|
+
language: 'text'
|
211
|
+
},
|
212
|
+
width: 150,
|
213
|
+
imex: true
|
214
|
+
},
|
213
215
|
{
|
214
216
|
type: 'textarea',
|
215
217
|
name: 'correctiveAction',
|
216
218
|
label: true,
|
217
219
|
header: i18next.t('field.corrective-action'),
|
218
220
|
record: {
|
219
|
-
editable:
|
221
|
+
editable: false,
|
220
222
|
language: 'text'
|
221
223
|
},
|
222
224
|
width: 150,
|
@@ -233,7 +235,10 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
233
235
|
{
|
234
236
|
type: 'string',
|
235
237
|
name: 'key01',
|
236
|
-
header:
|
238
|
+
header: {
|
239
|
+
renderer: i18next.t('field.key-01'),
|
240
|
+
group: i18next.t('field.key')
|
241
|
+
},
|
237
242
|
record: {
|
238
243
|
editable: false
|
239
244
|
},
|
@@ -244,7 +249,10 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
244
249
|
{
|
245
250
|
type: 'string',
|
246
251
|
name: 'key02',
|
247
|
-
header:
|
252
|
+
header: {
|
253
|
+
renderer: i18next.t('field.key-02'),
|
254
|
+
group: i18next.t('field.key')
|
255
|
+
},
|
248
256
|
record: {
|
249
257
|
editable: false
|
250
258
|
},
|
@@ -255,7 +263,10 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
255
263
|
{
|
256
264
|
type: 'string',
|
257
265
|
name: 'key03',
|
258
|
-
header:
|
266
|
+
header: {
|
267
|
+
renderer: i18next.t('field.key-03'),
|
268
|
+
group: i18next.t('field.key')
|
269
|
+
},
|
259
270
|
record: {
|
260
271
|
editable: false
|
261
272
|
},
|
@@ -266,7 +277,10 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
266
277
|
{
|
267
278
|
type: 'string',
|
268
279
|
name: 'key04',
|
269
|
-
header:
|
280
|
+
header: {
|
281
|
+
renderer: i18next.t('field.key-04'),
|
282
|
+
group: i18next.t('field.key')
|
283
|
+
},
|
270
284
|
record: {
|
271
285
|
editable: false
|
272
286
|
},
|
@@ -277,7 +291,10 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
277
291
|
{
|
278
292
|
type: 'string',
|
279
293
|
name: 'key05',
|
280
|
-
header:
|
294
|
+
header: {
|
295
|
+
renderer: i18next.t('field.key-05'),
|
296
|
+
group: i18next.t('field.key')
|
297
|
+
},
|
281
298
|
record: {
|
282
299
|
editable: false
|
283
300
|
},
|
@@ -360,6 +377,18 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
360
377
|
appendable: false,
|
361
378
|
selectable: {
|
362
379
|
multiple: true
|
380
|
+
},
|
381
|
+
handlers: {
|
382
|
+
click: (columns, data, column, record, rowIndex) => {
|
383
|
+
const popup = openPopup(html` <data-ooc-view data-ooc-id=${record.id} style="background-color: white;"></data-ooc-view> `, {
|
384
|
+
backdrop: true,
|
385
|
+
size: 'large',
|
386
|
+
title: i18next.t('title.data-ooc view')
|
387
|
+
})
|
388
|
+
popup.onclosed = () => {
|
389
|
+
this.grist.fetch()
|
390
|
+
}
|
391
|
+
}
|
363
392
|
}
|
364
393
|
},
|
365
394
|
sorters: [
|
@@ -19,6 +19,13 @@ export class DataOocViewPage extends localize(i18next)(PageView) {
|
|
19
19
|
data-ooc-view {
|
20
20
|
flex: 1;
|
21
21
|
}
|
22
|
+
|
23
|
+
@media print {
|
24
|
+
:host {
|
25
|
+
display: block;
|
26
|
+
overflow: visible;
|
27
|
+
}
|
28
|
+
}
|
22
29
|
`
|
23
30
|
]
|
24
31
|
|
@@ -72,6 +79,7 @@ export class DataOocViewPage extends localize(i18next)(PageView) {
|
|
72
79
|
name
|
73
80
|
description
|
74
81
|
active
|
82
|
+
hidden
|
75
83
|
tag
|
76
84
|
group
|
77
85
|
type
|
@@ -79,6 +87,7 @@ export class DataOocViewPage extends localize(i18next)(PageView) {
|
|
79
87
|
options
|
80
88
|
quota
|
81
89
|
spec
|
90
|
+
stat
|
82
91
|
}
|
83
92
|
data
|
84
93
|
rawData
|
@@ -107,6 +116,41 @@ export class DataOocViewPage extends localize(i18next)(PageView) {
|
|
107
116
|
}
|
108
117
|
updatedAt
|
109
118
|
collectedAt
|
119
|
+
reviewActivityInstance {
|
120
|
+
...ActivityInstanceFragment
|
121
|
+
}
|
122
|
+
resolveActivityInstance {
|
123
|
+
...ActivityInstanceFragment
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
fragment ActivityInstanceFragment on ActivityInstance {
|
129
|
+
activityThreads {
|
130
|
+
assignee {
|
131
|
+
name
|
132
|
+
}
|
133
|
+
output
|
134
|
+
activityApprovals {
|
135
|
+
judgment
|
136
|
+
approver {
|
137
|
+
name
|
138
|
+
}
|
139
|
+
comment
|
140
|
+
createdAt
|
141
|
+
updatedAt
|
142
|
+
terminatedAt
|
143
|
+
}
|
144
|
+
activityThreadHistories {
|
145
|
+
transaction
|
146
|
+
reason
|
147
|
+
updater {
|
148
|
+
name
|
149
|
+
}
|
150
|
+
updatedAt
|
151
|
+
state
|
152
|
+
output
|
153
|
+
}
|
110
154
|
}
|
111
155
|
}
|
112
156
|
`,
|
@@ -1,9 +1,12 @@
|
|
1
1
|
import '@operato/dataset/ox-data-ooc-brief-view.js'
|
2
2
|
import '@material/mwc-fab'
|
3
|
+
import '@things-factory/worklist/dist-client/components/activity-thread-timeline.js'
|
3
4
|
|
4
|
-
import
|
5
|
-
import {
|
5
|
+
import gql from 'graphql-tag'
|
6
|
+
import { css, html, LitElement, nothing } from 'lit'
|
7
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
6
8
|
|
9
|
+
import { client } from '@operato/graphql'
|
7
10
|
import { i18next, localize } from '@operato/i18n'
|
8
11
|
import { ScrollbarStyles } from '@operato/styles'
|
9
12
|
import { GhostPrint } from '@operato/ghost-print'
|
@@ -14,21 +17,23 @@ export class DataOocView extends localize(i18next)(LitElement) {
|
|
14
17
|
ScrollbarStyles,
|
15
18
|
css`
|
16
19
|
:host {
|
17
|
-
display:
|
18
|
-
flex-direction: column;
|
20
|
+
display: block;
|
19
21
|
position: relative;
|
20
|
-
|
21
22
|
background-color: #fff;
|
23
|
+
|
24
|
+
overflow: auto;
|
22
25
|
}
|
23
26
|
|
24
27
|
ox-data-ooc-brief-view {
|
25
|
-
flex: 1;
|
26
28
|
padding: var(--padding-wide);
|
27
|
-
|
29
|
+
}
|
30
|
+
|
31
|
+
activity-thread-timeline {
|
32
|
+
margin: var(--margin-default);
|
28
33
|
}
|
29
34
|
|
30
35
|
mwc-fab {
|
31
|
-
position:
|
36
|
+
position: fixed;
|
32
37
|
bottom: 15px;
|
33
38
|
right: 16px;
|
34
39
|
text-decoration: auto;
|
@@ -36,15 +41,6 @@ export class DataOocView extends localize(i18next)(LitElement) {
|
|
36
41
|
}
|
37
42
|
|
38
43
|
@media print {
|
39
|
-
:host {
|
40
|
-
display: block;
|
41
|
-
}
|
42
|
-
|
43
|
-
ox-data-ooc-brief-view {
|
44
|
-
flex: unset;
|
45
|
-
overflow: visible;
|
46
|
-
}
|
47
|
-
|
48
44
|
mwc-fab {
|
49
45
|
display: none;
|
50
46
|
}
|
@@ -52,15 +48,44 @@ export class DataOocView extends localize(i18next)(LitElement) {
|
|
52
48
|
`
|
53
49
|
]
|
54
50
|
|
55
|
-
@property({
|
51
|
+
@property({
|
52
|
+
type: String,
|
53
|
+
attribute: 'data-ooc-id'
|
54
|
+
})
|
55
|
+
dataOocId?: string
|
56
56
|
|
57
|
-
@
|
57
|
+
@state() dataOoc?: any
|
58
58
|
|
59
59
|
private printHandler = this.handlePrint.bind(this)
|
60
60
|
|
61
61
|
render() {
|
62
|
+
if (!this.dataOoc) {
|
63
|
+
return nothing
|
64
|
+
}
|
65
|
+
|
66
|
+
const reviewActivityThread = this.dataOoc?.reviewActivityInstance?.activityThreads?.[0]
|
67
|
+
const resolveActivityThread = this.dataOoc?.resolveActivityInstance?.activityThreads?.[0]
|
68
|
+
|
62
69
|
return html`
|
63
70
|
<ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>
|
71
|
+
${reviewActivityThread
|
72
|
+
? html`
|
73
|
+
<activity-thread-timeline
|
74
|
+
subtitle=${String(i18next.t('label.ooc review timeline'))}
|
75
|
+
.activityThread=${reviewActivityThread}
|
76
|
+
short-form
|
77
|
+
></activity-thread-timeline>
|
78
|
+
`
|
79
|
+
: nothing}
|
80
|
+
${resolveActivityThread
|
81
|
+
? html`
|
82
|
+
<activity-thread-timeline
|
83
|
+
subtitle=${String(i18next.t('label.ooc resolve timeline'))}
|
84
|
+
.activityThread=${resolveActivityThread}
|
85
|
+
short-form
|
86
|
+
></activity-thread-timeline>
|
87
|
+
`
|
88
|
+
: nothing}
|
64
89
|
|
65
90
|
<mwc-fab
|
66
91
|
icon="print"
|
@@ -74,6 +99,120 @@ export class DataOocView extends localize(i18next)(LitElement) {
|
|
74
99
|
`
|
75
100
|
}
|
76
101
|
|
102
|
+
updated(changes) {
|
103
|
+
if (changes.has('dataOocId')) {
|
104
|
+
this.fetchDataOoc()
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
async fetchDataOoc() {
|
109
|
+
const id = this.dataOocId
|
110
|
+
|
111
|
+
const response = await client.query({
|
112
|
+
query: gql`
|
113
|
+
query ($id: String!) {
|
114
|
+
dataOoc(id: $id) {
|
115
|
+
id
|
116
|
+
name
|
117
|
+
description
|
118
|
+
useCase
|
119
|
+
dataSet {
|
120
|
+
id
|
121
|
+
name
|
122
|
+
}
|
123
|
+
key01
|
124
|
+
key02
|
125
|
+
key03
|
126
|
+
key04
|
127
|
+
key05
|
128
|
+
partitionKeys
|
129
|
+
dataItems {
|
130
|
+
name
|
131
|
+
description
|
132
|
+
active
|
133
|
+
hidden
|
134
|
+
tag
|
135
|
+
group
|
136
|
+
type
|
137
|
+
unit
|
138
|
+
options
|
139
|
+
quota
|
140
|
+
spec
|
141
|
+
stat
|
142
|
+
}
|
143
|
+
data
|
144
|
+
rawData
|
145
|
+
judgment
|
146
|
+
ooc
|
147
|
+
oos
|
148
|
+
state
|
149
|
+
history
|
150
|
+
workDate
|
151
|
+
workShift
|
152
|
+
correctiveInstruction
|
153
|
+
correctiveAction
|
154
|
+
reviewedAt
|
155
|
+
reviewer {
|
156
|
+
id
|
157
|
+
name
|
158
|
+
}
|
159
|
+
correctedAt
|
160
|
+
corrector {
|
161
|
+
id
|
162
|
+
name
|
163
|
+
}
|
164
|
+
updater {
|
165
|
+
id
|
166
|
+
name
|
167
|
+
}
|
168
|
+
updatedAt
|
169
|
+
collectedAt
|
170
|
+
reviewActivityInstance {
|
171
|
+
...ActivityInstanceFragment
|
172
|
+
}
|
173
|
+
resolveActivityInstance {
|
174
|
+
...ActivityInstanceFragment
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
fragment ActivityInstanceFragment on ActivityInstance {
|
180
|
+
activityThreads {
|
181
|
+
assignee {
|
182
|
+
name
|
183
|
+
}
|
184
|
+
output
|
185
|
+
activityApprovals {
|
186
|
+
judgment
|
187
|
+
approver {
|
188
|
+
name
|
189
|
+
}
|
190
|
+
comment
|
191
|
+
createdAt
|
192
|
+
updatedAt
|
193
|
+
terminatedAt
|
194
|
+
}
|
195
|
+
activityThreadHistories {
|
196
|
+
transaction
|
197
|
+
reason
|
198
|
+
updater {
|
199
|
+
name
|
200
|
+
}
|
201
|
+
updatedAt
|
202
|
+
state
|
203
|
+
output
|
204
|
+
}
|
205
|
+
}
|
206
|
+
}
|
207
|
+
`,
|
208
|
+
variables: {
|
209
|
+
id
|
210
|
+
}
|
211
|
+
})
|
212
|
+
|
213
|
+
this.dataOoc = response.data.dataOoc
|
214
|
+
}
|
215
|
+
|
77
216
|
handlePrint(event) {
|
78
217
|
if ((event.ctrlKey || event.metaKey) && event.key === 'p') {
|
79
218
|
event.preventDefault()
|