@things-factory/dataset 6.2.104 → 6.2.110
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 +16 -4
- package/client/pages/data-ooc/data-ooc-page.ts +42 -0
- package/client/pages/data-ooc/data-ooc-view.ts +158 -19
- package/client/pages/data-ooc/data-oocs-page.ts +69 -3
- package/client/pages/data-sample/data-sample-page.ts +7 -0
- package/client/pages/data-sample/data-sample-search-page.ts +25 -20
- package/client/pages/data-sample/data-sample-view.ts +144 -22
- package/client/pages/data-sample/data-samples-page.ts +131 -5
- package/client/pages/data-set/data-item-list.ts +2 -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-ooc/data-ooc-list-page.js +16 -4
- package/dist-client/pages/data-ooc/data-ooc-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-page.js +42 -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 +69 -3
- package/dist-client/pages/data-ooc/data-oocs-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.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 +143 -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 +132 -5
- package/dist-client/pages/data-sample/data-samples-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/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/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 +15 -20
- package/dist-server/service/data-sample/data-sample.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/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- 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/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 +14 -0
- package/server/service/data-sample/data-sample.ts +15 -21
- package/server/service/data-set/data-item-type.ts +1 -0
- package/translations/en.json +5 -1
- package/translations/ja.json +5 -1
- package/translations/ko.json +4 -0
- package/translations/ms.json +4 -0
- package/translations/zh.json +5 -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
|
|
@@ -136,7 +136,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
136
136
|
title: i18next.t('title.view detail ooc data'),
|
137
137
|
handlers: {
|
138
138
|
click: (columns, data, column, record, rowIndex) => {
|
139
|
-
const popup = openPopup(html` <data-ooc-view
|
139
|
+
const popup = openPopup(html` <data-ooc-view data-ooc-id=${record.id} style="background-color: white;"></data-ooc-view> `, {
|
140
140
|
backdrop: true,
|
141
141
|
size: 'large',
|
142
142
|
title: i18next.t('title.data-ooc view')
|
@@ -154,7 +154,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
154
154
|
label: true,
|
155
155
|
header: i18next.t('field.name'),
|
156
156
|
record: {
|
157
|
-
editable:
|
157
|
+
editable: false
|
158
158
|
},
|
159
159
|
filter: 'search',
|
160
160
|
sortable: true,
|
@@ -167,7 +167,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
167
167
|
label: true,
|
168
168
|
header: i18next.t('field.description'),
|
169
169
|
record: {
|
170
|
-
editable:
|
170
|
+
editable: false
|
171
171
|
},
|
172
172
|
filter: 'search',
|
173
173
|
width: 150,
|
@@ -210,13 +210,25 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
210
210
|
filter: true,
|
211
211
|
imex: true
|
212
212
|
},
|
213
|
+
{
|
214
|
+
type: 'textarea',
|
215
|
+
name: 'correctiveInstruction',
|
216
|
+
label: true,
|
217
|
+
header: i18next.t('field.corrective-instruction'),
|
218
|
+
record: {
|
219
|
+
editable: false,
|
220
|
+
language: 'text'
|
221
|
+
},
|
222
|
+
width: 150,
|
223
|
+
imex: true
|
224
|
+
},
|
213
225
|
{
|
214
226
|
type: 'textarea',
|
215
227
|
name: 'correctiveAction',
|
216
228
|
label: true,
|
217
229
|
header: i18next.t('field.corrective-action'),
|
218
230
|
record: {
|
219
|
-
editable:
|
231
|
+
editable: false,
|
220
232
|
language: 'text'
|
221
233
|
},
|
222
234
|
width: 150,
|
@@ -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
|
|
@@ -107,6 +114,41 @@ export class DataOocViewPage extends localize(i18next)(PageView) {
|
|
107
114
|
}
|
108
115
|
updatedAt
|
109
116
|
collectedAt
|
117
|
+
reviewActivityInstance {
|
118
|
+
...ActivityInstanceFragment
|
119
|
+
}
|
120
|
+
resolveActivityInstance {
|
121
|
+
...ActivityInstanceFragment
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
fragment ActivityInstanceFragment on ActivityInstance {
|
127
|
+
activityThreads {
|
128
|
+
assignee {
|
129
|
+
name
|
130
|
+
}
|
131
|
+
output
|
132
|
+
activityApprovals {
|
133
|
+
judgment
|
134
|
+
approver {
|
135
|
+
name
|
136
|
+
}
|
137
|
+
comment
|
138
|
+
createdAt
|
139
|
+
updatedAt
|
140
|
+
terminatedAt
|
141
|
+
}
|
142
|
+
activityThreadHistories {
|
143
|
+
transaction
|
144
|
+
reason
|
145
|
+
updater {
|
146
|
+
name
|
147
|
+
}
|
148
|
+
updatedAt
|
149
|
+
state
|
150
|
+
output
|
151
|
+
}
|
110
152
|
}
|
111
153
|
}
|
112
154
|
`,
|
@@ -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()
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import '@operato/dataset/ox-data-ooc-brief-view.js'
|
2
|
+
import '@things-factory/worklist/dist-client/components/activity-thread-timeline.js'
|
2
3
|
|
3
4
|
import gql from 'graphql-tag'
|
4
|
-
import { PropertyValues, html, css } from 'lit'
|
5
|
+
import { PropertyValues, html, css, nothing } from 'lit'
|
5
6
|
import { customElement, state } from 'lit/decorators.js'
|
6
7
|
import { PageView } from '@operato/shell'
|
7
8
|
import { i18next, localize } from '@operato/i18n'
|
@@ -19,7 +20,11 @@ export class DataOocsPage extends localize(i18next)(PageView) {
|
|
19
20
|
overflow: auto;
|
20
21
|
}
|
21
22
|
|
22
|
-
|
23
|
+
activity-thread-timeline {
|
24
|
+
margin: var(--margin-default);
|
25
|
+
}
|
26
|
+
|
27
|
+
.end {
|
23
28
|
page-break-after: always;
|
24
29
|
break-after: always;
|
25
30
|
}
|
@@ -35,7 +40,33 @@ export class DataOocsPage extends localize(i18next)(PageView) {
|
|
35
40
|
}
|
36
41
|
|
37
42
|
render() {
|
38
|
-
return this.dataOocs?.map(dataOoc =>
|
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
|
+
})
|
39
70
|
}
|
40
71
|
|
41
72
|
pageUpdated(changes: any, lifecycle: any, before: any) {
|
@@ -118,6 +149,41 @@ export class DataOocsPage extends localize(i18next)(PageView) {
|
|
118
149
|
}
|
119
150
|
updatedAt
|
120
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
|
121
187
|
}
|
122
188
|
}
|
123
189
|
}
|