@things-factory/dataset 7.0.0-alpha.5 → 7.0.0-alpha.7
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-entry/data-entry-list-page.ts +8 -23
- package/client/pages/data-ooc/data-ooc-list-page.ts +63 -19
- package/client/pages/data-ooc/{data-ooc-view-page.ts → data-ooc-page.ts} +43 -1
- package/client/pages/data-ooc/data-ooc-view.ts +198 -41
- package/client/pages/data-ooc/data-oocs-page.ts +198 -0
- package/client/pages/data-sample/data-sample-list-page.ts +48 -26
- package/client/pages/data-sample/{data-sample-view-page.ts → data-sample-page.ts} +8 -1
- package/client/pages/data-sample/data-sample-search-page.ts +25 -20
- package/client/pages/data-sample/data-sample-view.ts +191 -21
- package/client/pages/data-sample/data-samples-page.ts +247 -0
- 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/route.ts +10 -2
- 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-entry/data-entry-list-page.js +3 -15
- package/dist-client/pages/data-entry/data-entry-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-list-page.d.ts +6 -0
- package/dist-client/pages/data-ooc/data-ooc-list-page.js +55 -12
- package/dist-client/pages/data-ooc/data-ooc-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/{data-ooc-view-page.js → data-ooc-page.js} +44 -2
- package/dist-client/pages/data-ooc/data-ooc-page.js.map +1 -0
- package/dist-client/pages/data-ooc/data-ooc-view.d.ts +11 -4
- package/dist-client/pages/data-ooc/data-ooc-view.js +193 -48
- package/dist-client/pages/data-ooc/data-ooc-view.js.map +1 -1
- package/dist-client/pages/data-ooc/data-oocs-page.d.ts +18 -0
- package/dist-client/pages/data-ooc/data-oocs-page.js +198 -0
- package/dist-client/pages/data-ooc/data-oocs-page.js.map +1 -0
- package/dist-client/pages/data-sample/data-sample-list-page.d.ts +6 -1
- package/dist-client/pages/data-sample/data-sample-list-page.js +42 -19
- package/dist-client/pages/data-sample/data-sample-list-page.js.map +1 -1
- package/dist-client/pages/data-sample/{data-sample-view-page.js → data-sample-page.js} +9 -2
- package/dist-client/pages/data-sample/data-sample-page.js.map +1 -0
- package/dist-client/pages/data-sample/data-sample-search-page.d.ts +6 -1
- package/dist-client/pages/data-sample/data-sample-search-page.js +19 -13
- 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 +185 -19
- package/dist-client/pages/data-sample/data-sample-view.js.map +1 -1
- package/dist-client/pages/data-sample/data-samples-page.d.ts +21 -0
- package/dist-client/pages/data-sample/data-samples-page.js +247 -0
- package/dist-client/pages/data-sample/data-samples-page.js.map +1 -0
- 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/route.js +8 -2
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/activities/activity-data-review.js.map +1 -1
- package/dist-server/activities/activity-ooc-review.js +2 -1
- 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/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 +4 -0
- package/dist-server/engine/task/index.js.map +1 -0
- package/dist-server/index.js +1 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/routes.js +35 -27
- 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 +44 -37
- 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 +30 -31
- 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/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/package.json +14 -11
- package/server/activities/activity-data-review.ts +1 -5
- package/server/activities/activity-ooc-review.ts +5 -15
- package/server/controllers/create-data-sample.ts +31 -38
- package/server/engine/index.ts +1 -0
- package/server/engine/task/create-data-sample.ts +92 -0
- package/server/engine/task/index.ts +1 -0
- package/server/index.ts +1 -0
- package/server/routes.ts +47 -31
- package/server/service/data-ooc/data-ooc-query.ts +17 -0
- package/server/service/data-ooc/data-ooc.ts +39 -51
- package/server/service/data-sample/data-sample-query.ts +17 -17
- package/server/service/data-sample/data-sample.ts +29 -52
- 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/things-factory.config.js +10 -2
- package/translations/en.json +15 -2
- package/translations/ja.json +12 -1
- package/translations/ko.json +14 -1
- package/translations/ms.json +11 -0
- package/translations/zh.json +12 -1
- package/dist-client/pages/data-ooc/data-ooc-view-page.js.map +0 -1
- package/dist-client/pages/data-sample/data-sample-view-page.js.map +0 -1
- /package/dist-client/pages/data-ooc/{data-ooc-view-page.d.ts → data-ooc-page.d.ts} +0 -0
- /package/dist-client/pages/data-sample/{data-sample-view-page.d.ts → data-sample-page.d.ts} +0 -0
@@ -1,10 +1,15 @@
|
|
1
1
|
import '@operato/dataset/ox-data-ooc-brief-view.js'
|
2
|
+
import '@material/mwc-fab'
|
3
|
+
import '@things-factory/worklist/dist-client/components/activity-thread-timeline.js'
|
2
4
|
|
3
|
-
import
|
4
|
-
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'
|
5
8
|
|
9
|
+
import { client } from '@operato/graphql'
|
6
10
|
import { i18next, localize } from '@operato/i18n'
|
7
11
|
import { ScrollbarStyles } from '@operato/styles'
|
12
|
+
import { GhostPrint } from '@operato/ghost-print'
|
8
13
|
|
9
14
|
@customElement('data-ooc-view')
|
10
15
|
export class DataOocView extends localize(i18next)(LitElement) {
|
@@ -12,67 +17,219 @@ export class DataOocView extends localize(i18next)(LitElement) {
|
|
12
17
|
ScrollbarStyles,
|
13
18
|
css`
|
14
19
|
:host {
|
15
|
-
display:
|
16
|
-
|
17
|
-
|
20
|
+
display: block;
|
21
|
+
position: relative;
|
18
22
|
background-color: #fff;
|
19
|
-
}
|
20
23
|
|
21
|
-
div[content] {
|
22
|
-
flex: 1;
|
23
|
-
|
24
|
-
display: flex;
|
25
24
|
overflow: auto;
|
26
25
|
}
|
27
26
|
|
28
27
|
ox-data-ooc-brief-view {
|
29
|
-
flex: 1;
|
30
28
|
padding: var(--padding-wide);
|
31
|
-
overflow: auto;
|
32
29
|
}
|
33
30
|
|
34
|
-
|
35
|
-
|
36
|
-
flex-direction: column;
|
37
|
-
|
38
|
-
padding: var(--padding-wide);
|
31
|
+
activity-thread-timeline {
|
32
|
+
margin: var(--margin-default);
|
39
33
|
}
|
40
34
|
|
41
|
-
|
42
|
-
|
35
|
+
mwc-fab {
|
36
|
+
position: fixed;
|
37
|
+
bottom: 15px;
|
38
|
+
right: 16px;
|
39
|
+
text-decoration: auto;
|
40
|
+
opacity: 0.5;
|
43
41
|
}
|
44
42
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
textarea {
|
50
|
-
border: var(--input-field-border);
|
51
|
-
border-radius: var(--input-border-radius);
|
52
|
-
padding: var(--input-field-padding);
|
53
|
-
font: var(--input-field-font);
|
54
|
-
}
|
55
|
-
|
56
|
-
.button-container {
|
57
|
-
display: flex;
|
58
|
-
margin-left: auto;
|
59
|
-
padding: var(--padding-default);
|
43
|
+
@media print {
|
44
|
+
mwc-fab {
|
45
|
+
display: none;
|
46
|
+
}
|
60
47
|
}
|
61
48
|
`
|
62
49
|
]
|
63
50
|
|
64
|
-
@property({
|
51
|
+
@property({
|
52
|
+
type: String,
|
53
|
+
attribute: 'data-ooc-id'
|
54
|
+
})
|
55
|
+
dataOocId?: string
|
65
56
|
|
66
|
-
@
|
67
|
-
|
57
|
+
@state() dataOoc?: any
|
58
|
+
|
59
|
+
private printHandler = this.handlePrint.bind(this)
|
68
60
|
|
69
61
|
render() {
|
70
|
-
|
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]
|
71
68
|
|
72
69
|
return html`
|
73
|
-
<
|
74
|
-
|
75
|
-
|
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}
|
89
|
+
|
90
|
+
<mwc-fab
|
91
|
+
icon="print"
|
92
|
+
title="print"
|
93
|
+
@click=${() =>
|
94
|
+
GhostPrint.print({
|
95
|
+
src: `./data-ooc/${this.dataOoc.id}`
|
96
|
+
})}
|
97
|
+
>print</mwc-fab
|
98
|
+
>
|
76
99
|
`
|
77
100
|
}
|
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
|
+
|
216
|
+
handlePrint(event) {
|
217
|
+
if ((event.ctrlKey || event.metaKey) && event.key === 'p') {
|
218
|
+
event.preventDefault()
|
219
|
+
|
220
|
+
GhostPrint.print({
|
221
|
+
src: `./data-ooc/${this.dataOoc.id}`
|
222
|
+
})
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
connectedCallback(): void {
|
227
|
+
super.connectedCallback()
|
228
|
+
window.addEventListener('keydown', this.printHandler)
|
229
|
+
}
|
230
|
+
|
231
|
+
disconnectedCallback(): void {
|
232
|
+
super.disconnectedCallback()
|
233
|
+
window.removeEventListener('keydown', this.printHandler)
|
234
|
+
}
|
78
235
|
}
|
@@ -0,0 +1,198 @@
|
|
1
|
+
import '@operato/dataset/ox-data-ooc-brief-view.js'
|
2
|
+
import '@things-factory/worklist/dist-client/components/activity-thread-timeline.js'
|
3
|
+
|
4
|
+
import gql from 'graphql-tag'
|
5
|
+
import { PropertyValues, html, css, nothing } from 'lit'
|
6
|
+
import { customElement, state } from 'lit/decorators.js'
|
7
|
+
import { PageView } from '@operato/shell'
|
8
|
+
import { i18next, localize } from '@operato/i18n'
|
9
|
+
import { client } from '@operato/graphql'
|
10
|
+
|
11
|
+
/**
|
12
|
+
* 이 페이지는 여러개의 Data OOC를 한번에 프린트하기 위한 용도로 사용되는 페이지이다.
|
13
|
+
*/
|
14
|
+
@customElement('data-oocs-page')
|
15
|
+
export class DataOocsPage extends localize(i18next)(PageView) {
|
16
|
+
static styles = [
|
17
|
+
css`
|
18
|
+
:host {
|
19
|
+
display: block;
|
20
|
+
overflow: auto;
|
21
|
+
}
|
22
|
+
|
23
|
+
activity-thread-timeline {
|
24
|
+
margin: var(--margin-default);
|
25
|
+
}
|
26
|
+
|
27
|
+
.end {
|
28
|
+
page-break-after: always;
|
29
|
+
break-after: always;
|
30
|
+
}
|
31
|
+
`
|
32
|
+
]
|
33
|
+
|
34
|
+
@state() dataOocs?: any[]
|
35
|
+
|
36
|
+
get context() {
|
37
|
+
return {
|
38
|
+
title: i18next.t('title.data-ooc view')
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
render() {
|
43
|
+
return this.dataOocs?.map(dataOoc => {
|
44
|
+
const reviewActivityThread = dataOoc?.reviewActivityInstance?.activityThreads?.[0]
|
45
|
+
const resolveActivityThread = dataOoc?.resolveActivityInstance?.activityThreads?.[0]
|
46
|
+
|
47
|
+
return html`
|
48
|
+
<ox-data-ooc-brief-view .dataOoc=${dataOoc}></ox-data-ooc-brief-view>
|
49
|
+
${reviewActivityThread
|
50
|
+
? html`
|
51
|
+
<activity-thread-timeline
|
52
|
+
subtitle=${String(i18next.t('label.ooc review timeline'))}
|
53
|
+
.activityThread=${reviewActivityThread}
|
54
|
+
short-form
|
55
|
+
></activity-thread-timeline>
|
56
|
+
`
|
57
|
+
: nothing}
|
58
|
+
${resolveActivityThread
|
59
|
+
? html`
|
60
|
+
<activity-thread-timeline
|
61
|
+
subtitle=${String(i18next.t('label.ooc resolve timeline'))}
|
62
|
+
.activityThread=${resolveActivityThread}
|
63
|
+
short-form
|
64
|
+
></activity-thread-timeline>
|
65
|
+
`
|
66
|
+
: nothing}
|
67
|
+
<div class="end"></div>
|
68
|
+
`
|
69
|
+
})
|
70
|
+
}
|
71
|
+
|
72
|
+
pageUpdated(changes: any, lifecycle: any, before: any) {
|
73
|
+
if (this.active) {
|
74
|
+
/*
|
75
|
+
* this page is activated
|
76
|
+
*/
|
77
|
+
const { ids = '' } = lifecycle.params
|
78
|
+
|
79
|
+
this.fetchOocs(ids.split('|').map(id => id.trim()))
|
80
|
+
} else {
|
81
|
+
/* this page is deactivated */
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
async fetchOocs(ids: string[]) {
|
86
|
+
const filters = [
|
87
|
+
{
|
88
|
+
name: 'id',
|
89
|
+
operator: 'in',
|
90
|
+
value: ids
|
91
|
+
}
|
92
|
+
]
|
93
|
+
|
94
|
+
const response = await client.query({
|
95
|
+
query: gql`
|
96
|
+
query ($filters: [Filter!]) {
|
97
|
+
dataOocs(filters: $filters) {
|
98
|
+
items {
|
99
|
+
id
|
100
|
+
name
|
101
|
+
description
|
102
|
+
useCase
|
103
|
+
dataSet {
|
104
|
+
id
|
105
|
+
name
|
106
|
+
}
|
107
|
+
key01
|
108
|
+
key02
|
109
|
+
key03
|
110
|
+
key04
|
111
|
+
key05
|
112
|
+
partitionKeys
|
113
|
+
dataItems {
|
114
|
+
name
|
115
|
+
description
|
116
|
+
active
|
117
|
+
tag
|
118
|
+
group
|
119
|
+
type
|
120
|
+
unit
|
121
|
+
options
|
122
|
+
quota
|
123
|
+
spec
|
124
|
+
}
|
125
|
+
data
|
126
|
+
rawData
|
127
|
+
judgment
|
128
|
+
ooc
|
129
|
+
oos
|
130
|
+
state
|
131
|
+
history
|
132
|
+
workDate
|
133
|
+
workShift
|
134
|
+
correctiveInstruction
|
135
|
+
correctiveAction
|
136
|
+
reviewedAt
|
137
|
+
reviewer {
|
138
|
+
id
|
139
|
+
name
|
140
|
+
}
|
141
|
+
correctedAt
|
142
|
+
corrector {
|
143
|
+
id
|
144
|
+
name
|
145
|
+
}
|
146
|
+
updater {
|
147
|
+
id
|
148
|
+
name
|
149
|
+
}
|
150
|
+
updatedAt
|
151
|
+
collectedAt
|
152
|
+
reviewActivityInstance {
|
153
|
+
...ActivityInstanceFragment
|
154
|
+
}
|
155
|
+
resolveActivityInstance {
|
156
|
+
...ActivityInstanceFragment
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
fragment ActivityInstanceFragment on ActivityInstance {
|
163
|
+
activityThreads {
|
164
|
+
assignee {
|
165
|
+
name
|
166
|
+
}
|
167
|
+
output
|
168
|
+
activityApprovals {
|
169
|
+
judgment
|
170
|
+
approver {
|
171
|
+
name
|
172
|
+
}
|
173
|
+
comment
|
174
|
+
createdAt
|
175
|
+
updatedAt
|
176
|
+
terminatedAt
|
177
|
+
}
|
178
|
+
activityThreadHistories {
|
179
|
+
transaction
|
180
|
+
reason
|
181
|
+
updater {
|
182
|
+
name
|
183
|
+
}
|
184
|
+
updatedAt
|
185
|
+
state
|
186
|
+
output
|
187
|
+
}
|
188
|
+
}
|
189
|
+
}
|
190
|
+
`,
|
191
|
+
variables: {
|
192
|
+
filters
|
193
|
+
}
|
194
|
+
})
|
195
|
+
|
196
|
+
this.dataOocs = response.data.dataOocs.items
|
197
|
+
}
|
198
|
+
}
|
@@ -15,6 +15,7 @@ import { openPopup } from '@operato/layout'
|
|
15
15
|
import { PageView, store } from '@operato/shell'
|
16
16
|
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
17
17
|
import { isMobileDevice } from '@operato/utils'
|
18
|
+
import { GhostPrint } from '@operato/ghost-print'
|
18
19
|
|
19
20
|
@customElement('data-sample-list-page')
|
20
21
|
export class DataSampleListPage extends connect(store)(localize(i18next)(PageView)) {
|
@@ -27,6 +28,8 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
27
28
|
flex-direction: column;
|
28
29
|
|
29
30
|
overflow: hidden;
|
31
|
+
|
32
|
+
--grid-header-padding: 2px 0 2px 9px;
|
30
33
|
}
|
31
34
|
|
32
35
|
ox-grist {
|
@@ -56,7 +59,13 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
56
59
|
}
|
57
60
|
},
|
58
61
|
help: 'dataset/data-sample',
|
59
|
-
actions: [
|
62
|
+
actions: [
|
63
|
+
{
|
64
|
+
title: i18next.t('button.print'),
|
65
|
+
action: this.printSamples.bind(this),
|
66
|
+
icon: 'print'
|
67
|
+
}
|
68
|
+
],
|
60
69
|
exportable: {
|
61
70
|
name: i18next.t('title.data-sample list'),
|
62
71
|
data: this._exportableData.bind(this)
|
@@ -69,12 +78,7 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
69
78
|
const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')
|
70
79
|
|
71
80
|
return html`
|
72
|
-
<ox-grist
|
73
|
-
.mode=${mode}
|
74
|
-
.config=${this.gristConfig}
|
75
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
76
|
-
?url-params-sensitive=${false /* this.active */}
|
77
|
-
>
|
81
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${false /* this.active */}>
|
78
82
|
<div slot="headroom" class="header">
|
79
83
|
<div class="title">
|
80
84
|
<mwc-icon>summarize</mwc-icon>
|
@@ -108,16 +112,11 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
108
112
|
title: i18next.t('title.open data sample view'),
|
109
113
|
handlers: {
|
110
114
|
click: (columns, data, column, record, rowIndex) => {
|
111
|
-
openPopup(
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
backdrop: true,
|
117
|
-
size: 'large',
|
118
|
-
title: i18next.t('title.data-sample view')
|
119
|
-
}
|
120
|
-
)
|
115
|
+
openPopup(html` <data-sample-view data-sample-id=${record.id} style="background-color: white;"></data-sample-view> `, {
|
116
|
+
backdrop: true,
|
117
|
+
size: 'large',
|
118
|
+
title: i18next.t('title.data-sample view')
|
119
|
+
})
|
121
120
|
}
|
122
121
|
}
|
123
122
|
},
|
@@ -150,7 +149,10 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
150
149
|
{
|
151
150
|
type: 'string',
|
152
151
|
name: 'key01',
|
153
|
-
header:
|
152
|
+
header: {
|
153
|
+
renderer: i18next.t('field.key-01'),
|
154
|
+
group: i18next.t('field.key')
|
155
|
+
},
|
154
156
|
record: {
|
155
157
|
editable: false
|
156
158
|
},
|
@@ -161,7 +163,10 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
161
163
|
{
|
162
164
|
type: 'string',
|
163
165
|
name: 'key02',
|
164
|
-
header:
|
166
|
+
header: {
|
167
|
+
renderer: i18next.t('field.key-02'),
|
168
|
+
group: i18next.t('field.key')
|
169
|
+
},
|
165
170
|
record: {
|
166
171
|
editable: false
|
167
172
|
},
|
@@ -172,7 +177,10 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
172
177
|
{
|
173
178
|
type: 'string',
|
174
179
|
name: 'key03',
|
175
|
-
header:
|
180
|
+
header: {
|
181
|
+
renderer: i18next.t('field.key-03'),
|
182
|
+
group: i18next.t('field.key')
|
183
|
+
},
|
176
184
|
record: {
|
177
185
|
editable: false
|
178
186
|
},
|
@@ -183,7 +191,10 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
183
191
|
{
|
184
192
|
type: 'string',
|
185
193
|
name: 'key04',
|
186
|
-
header:
|
194
|
+
header: {
|
195
|
+
renderer: i18next.t('field.key-04'),
|
196
|
+
group: i18next.t('field.key')
|
197
|
+
},
|
187
198
|
record: {
|
188
199
|
editable: false
|
189
200
|
},
|
@@ -194,7 +205,10 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
194
205
|
{
|
195
206
|
type: 'string',
|
196
207
|
name: 'key05',
|
197
|
-
header:
|
208
|
+
header: {
|
209
|
+
renderer: i18next.t('field.key-05'),
|
210
|
+
group: i18next.t('field.key')
|
211
|
+
},
|
198
212
|
record: {
|
199
213
|
editable: false
|
200
214
|
},
|
@@ -231,7 +245,7 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
231
245
|
imex: true
|
232
246
|
},
|
233
247
|
{
|
234
|
-
type: '
|
248
|
+
type: 'json5',
|
235
249
|
name: 'rawData',
|
236
250
|
header: i18next.t('field.raw-data'),
|
237
251
|
record: {
|
@@ -387,9 +401,7 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
387
401
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
388
402
|
.reduce((record, column) => {
|
389
403
|
const key = column.imex === true ? column.name : column.imex.key
|
390
|
-
record[key] = key
|
391
|
-
.split('.')
|
392
|
-
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
404
|
+
record[key] = key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
393
405
|
return record
|
394
406
|
}, {})
|
395
407
|
}
|
@@ -397,4 +409,14 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
397
409
|
|
398
410
|
return { header: headerSetting, data: data }
|
399
411
|
}
|
412
|
+
|
413
|
+
printSamples() {
|
414
|
+
const selected = this.grist.selected
|
415
|
+
const ids = selected.map(record => record.id).join('|')
|
416
|
+
|
417
|
+
GhostPrint.print({
|
418
|
+
src: `./data-samples?ids=${ids}`
|
419
|
+
// pending: 200 * selected.length
|
420
|
+
})
|
421
|
+
}
|
400
422
|
}
|
@@ -5,7 +5,7 @@ import { i18next, localize } from '@operato/i18n'
|
|
5
5
|
|
6
6
|
import './data-sample-view.js'
|
7
7
|
|
8
|
-
@customElement('data-sample-
|
8
|
+
@customElement('data-sample-page')
|
9
9
|
export class DataSampleViewPage extends localize(i18next)(PageView) {
|
10
10
|
static styles = [
|
11
11
|
css`
|
@@ -16,6 +16,13 @@ export class DataSampleViewPage extends localize(i18next)(PageView) {
|
|
16
16
|
data-sample-view {
|
17
17
|
flex: 1;
|
18
18
|
}
|
19
|
+
|
20
|
+
@media print {
|
21
|
+
:host {
|
22
|
+
display: block;
|
23
|
+
overflow: visible;
|
24
|
+
}
|
25
|
+
}
|
19
26
|
`
|
20
27
|
]
|
21
28
|
|