@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,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
|
|
@@ -46,23 +46,12 @@ const showEntryView = async (columns, data, column, record, rowIndex) => {
|
|
46
46
|
const board = {
|
47
47
|
id: entryView
|
48
48
|
}
|
49
|
-
openPopup(
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
hide-fullscreen
|
56
|
-
hide-navigation
|
57
|
-
></ox-board-viewer>
|
58
|
-
`,
|
59
|
-
{
|
60
|
-
closable: true,
|
61
|
-
backdrop: true,
|
62
|
-
size: 'large',
|
63
|
-
title
|
64
|
-
}
|
65
|
-
)
|
49
|
+
openPopup(html` <ox-board-viewer style="background-color: white;" .board=${board} .provider=${provider} hide-fullscreen hide-navigation></ox-board-viewer> `, {
|
50
|
+
closable: true,
|
51
|
+
backdrop: true,
|
52
|
+
size: 'large',
|
53
|
+
title
|
54
|
+
})
|
66
55
|
|
67
56
|
// navigate(`board-viewer/${entryView}?interactive=true&title=${title}`)
|
68
57
|
break
|
@@ -129,12 +118,7 @@ export class DataEntryListPage extends connect(store)(localize(i18next)(PageView
|
|
129
118
|
const mode = 'CARD'
|
130
119
|
|
131
120
|
return html`
|
132
|
-
<ox-grist
|
133
|
-
.mode=${mode}
|
134
|
-
.config=${this.gristConfig}
|
135
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
136
|
-
?url-params-sensitive=${this.active}
|
137
|
-
>
|
121
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${this.active}>
|
138
122
|
<div slot="headroom" class="header">
|
139
123
|
<div class="title">
|
140
124
|
<mwc-icon>summarize</mwc-icon>
|
@@ -300,6 +284,7 @@ export class DataEntryListPage extends connect(store)(localize(i18next)(PageView
|
|
300
284
|
],
|
301
285
|
rows: {
|
302
286
|
appendable: false,
|
287
|
+
editable: false,
|
303
288
|
selectable: {
|
304
289
|
multiple: false
|
305
290
|
},
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import '@operato/data-grist'
|
2
2
|
import '@operato/context/ox-context-page-toolbar.js'
|
3
3
|
import '@operato/input/ox-input-select-buttons.js'
|
4
|
+
|
4
5
|
import './data-ooc-view.js'
|
5
6
|
|
6
7
|
import gql from 'graphql-tag'
|
@@ -8,6 +9,8 @@ import { css, html } from 'lit'
|
|
8
9
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
9
10
|
import { connect } from 'pwa-helpers/connect-mixin'
|
10
11
|
|
12
|
+
import { GhostPrint } from '@operato/ghost-print'
|
13
|
+
|
11
14
|
function getOocStatus() {
|
12
15
|
return [
|
13
16
|
{
|
@@ -44,6 +47,8 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
44
47
|
flex-direction: column;
|
45
48
|
|
46
49
|
overflow: hidden;
|
50
|
+
|
51
|
+
--grid-header-padding: 2px 0 2px 9px;
|
47
52
|
}
|
48
53
|
|
49
54
|
ox-grist {
|
@@ -74,6 +79,13 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
74
79
|
}
|
75
80
|
},
|
76
81
|
help: 'dataset/data-ooc',
|
82
|
+
actions: [
|
83
|
+
{
|
84
|
+
title: i18next.t('button.print'),
|
85
|
+
action: this.printOocs.bind(this),
|
86
|
+
icon: 'print'
|
87
|
+
}
|
88
|
+
],
|
77
89
|
exportable: {
|
78
90
|
name: i18next.t('title.data-ooc list'),
|
79
91
|
data: this._exportableData.bind(this)
|
@@ -126,14 +138,11 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
126
138
|
title: i18next.t('title.view detail ooc data'),
|
127
139
|
handlers: {
|
128
140
|
click: (columns, data, column, record, rowIndex) => {
|
129
|
-
const popup = openPopup(
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
title: i18next.t('title.data-ooc view')
|
135
|
-
}
|
136
|
-
)
|
141
|
+
const popup = openPopup(html` <data-ooc-view data-ooc-id=${record.id} style="background-color: white;"></data-ooc-view> `, {
|
142
|
+
backdrop: true,
|
143
|
+
size: 'large',
|
144
|
+
title: i18next.t('title.data-ooc view')
|
145
|
+
})
|
137
146
|
popup.onclosed = () => {
|
138
147
|
this.grist.fetch()
|
139
148
|
}
|
@@ -147,7 +156,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
147
156
|
label: true,
|
148
157
|
header: i18next.t('field.name'),
|
149
158
|
record: {
|
150
|
-
editable:
|
159
|
+
editable: false
|
151
160
|
},
|
152
161
|
filter: 'search',
|
153
162
|
sortable: true,
|
@@ -160,7 +169,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
160
169
|
label: true,
|
161
170
|
header: i18next.t('field.description'),
|
162
171
|
record: {
|
163
|
-
editable:
|
172
|
+
editable: false
|
164
173
|
},
|
165
174
|
filter: 'search',
|
166
175
|
width: 150,
|
@@ -203,13 +212,25 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
203
212
|
filter: true,
|
204
213
|
imex: true
|
205
214
|
},
|
215
|
+
{
|
216
|
+
type: 'textarea',
|
217
|
+
name: 'correctiveInstruction',
|
218
|
+
label: true,
|
219
|
+
header: i18next.t('field.corrective-instruction'),
|
220
|
+
record: {
|
221
|
+
editable: false,
|
222
|
+
language: 'text'
|
223
|
+
},
|
224
|
+
width: 150,
|
225
|
+
imex: true
|
226
|
+
},
|
206
227
|
{
|
207
228
|
type: 'textarea',
|
208
229
|
name: 'correctiveAction',
|
209
230
|
label: true,
|
210
231
|
header: i18next.t('field.corrective-action'),
|
211
232
|
record: {
|
212
|
-
editable:
|
233
|
+
editable: false,
|
213
234
|
language: 'text'
|
214
235
|
},
|
215
236
|
width: 150,
|
@@ -226,7 +247,10 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
226
247
|
{
|
227
248
|
type: 'string',
|
228
249
|
name: 'key01',
|
229
|
-
header:
|
250
|
+
header: {
|
251
|
+
renderer: i18next.t('field.key-01'),
|
252
|
+
group: i18next.t('field.key')
|
253
|
+
},
|
230
254
|
record: {
|
231
255
|
editable: false
|
232
256
|
},
|
@@ -237,7 +261,10 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
237
261
|
{
|
238
262
|
type: 'string',
|
239
263
|
name: 'key02',
|
240
|
-
header:
|
264
|
+
header: {
|
265
|
+
renderer: i18next.t('field.key-02'),
|
266
|
+
group: i18next.t('field.key')
|
267
|
+
},
|
241
268
|
record: {
|
242
269
|
editable: false
|
243
270
|
},
|
@@ -248,7 +275,10 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
248
275
|
{
|
249
276
|
type: 'string',
|
250
277
|
name: 'key03',
|
251
|
-
header:
|
278
|
+
header: {
|
279
|
+
renderer: i18next.t('field.key-03'),
|
280
|
+
group: i18next.t('field.key')
|
281
|
+
},
|
252
282
|
record: {
|
253
283
|
editable: false
|
254
284
|
},
|
@@ -259,7 +289,10 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
259
289
|
{
|
260
290
|
type: 'string',
|
261
291
|
name: 'key04',
|
262
|
-
header:
|
292
|
+
header: {
|
293
|
+
renderer: i18next.t('field.key-04'),
|
294
|
+
group: i18next.t('field.key')
|
295
|
+
},
|
263
296
|
record: {
|
264
297
|
editable: false
|
265
298
|
},
|
@@ -270,7 +303,10 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
270
303
|
{
|
271
304
|
type: 'string',
|
272
305
|
name: 'key05',
|
273
|
-
header:
|
306
|
+
header: {
|
307
|
+
renderer: i18next.t('field.key-05'),
|
308
|
+
group: i18next.t('field.key')
|
309
|
+
},
|
274
310
|
record: {
|
275
311
|
editable: false
|
276
312
|
},
|
@@ -479,9 +515,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
479
515
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
480
516
|
.reduce((record, column) => {
|
481
517
|
const key = column.imex === true ? column.name : column.imex.key
|
482
|
-
record[key] = key
|
483
|
-
.split('.')
|
484
|
-
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
518
|
+
record[key] = key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
485
519
|
return record
|
486
520
|
}, {})
|
487
521
|
}
|
@@ -489,4 +523,14 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
489
523
|
|
490
524
|
return { header: headerSetting, data: data }
|
491
525
|
}
|
526
|
+
|
527
|
+
printOocs() {
|
528
|
+
const selected = this.grist.selected
|
529
|
+
const ids = selected.map(record => record.id).join('|')
|
530
|
+
|
531
|
+
GhostPrint.print({
|
532
|
+
src: `./data-oocs?ids=${ids}`
|
533
|
+
// pending: 200 * selected.length
|
534
|
+
})
|
535
|
+
}
|
492
536
|
}
|
@@ -8,7 +8,7 @@ import { client } from '@operato/graphql'
|
|
8
8
|
|
9
9
|
import './data-ooc-view.js'
|
10
10
|
|
11
|
-
@customElement('data-ooc-
|
11
|
+
@customElement('data-ooc-page')
|
12
12
|
export class DataOocViewPage extends localize(i18next)(PageView) {
|
13
13
|
static styles = [
|
14
14
|
css`
|
@@ -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
|
`,
|