@things-factory/dataset 7.0.0-alpha.4 → 7.0.0-alpha.6
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-edit.ts +1 -7
- package/client/activities/activity-data-review-edit.ts +0 -28
- package/client/activities/activity-data-review-view.ts +0 -28
- package/client/activities/activity-ooc-resolve-edit.ts +44 -48
- package/client/activities/activity-ooc-resolve-view.ts +16 -38
- package/client/activities/activity-ooc-review-edit.ts +36 -29
- package/client/activities/activity-ooc-review-view.ts +0 -22
- package/client/bootstrap.ts +5 -9
- package/client/pages/data-entry/data-entry-list-page.ts +8 -23
- package/client/pages/data-ooc/data-ooc-list-page.ts +26 -11
- package/client/pages/data-ooc/{data-ooc-view-page.ts → data-ooc-page.ts} +1 -1
- package/client/pages/data-ooc/data-ooc-view.ts +53 -35
- package/client/pages/data-ooc/data-oocs-page.ts +132 -0
- package/client/pages/data-sample/data-sample-list-page.ts +25 -20
- package/client/pages/data-sample/{data-sample-view-page.ts → data-sample-page.ts} +1 -1
- package/client/pages/data-sample/data-sample-search-page.ts +25 -20
- package/client/pages/data-sample/data-sample-view.ts +60 -12
- package/client/pages/data-sample/data-samples-page.ts +121 -0
- package/client/route.ts +10 -2
- package/dist-client/activities/activity-data-collect-edit.js +1 -7
- package/dist-client/activities/activity-data-collect-edit.js.map +1 -1
- package/dist-client/activities/activity-data-review-edit.js +0 -28
- package/dist-client/activities/activity-data-review-edit.js.map +1 -1
- package/dist-client/activities/activity-data-review-view.js +0 -28
- package/dist-client/activities/activity-data-review-view.js.map +1 -1
- package/dist-client/activities/activity-ooc-resolve-edit.d.ts +1 -1
- package/dist-client/activities/activity-ooc-resolve-edit.js +44 -48
- package/dist-client/activities/activity-ooc-resolve-edit.js.map +1 -1
- package/dist-client/activities/activity-ooc-resolve-view.d.ts +13 -0
- package/dist-client/activities/activity-ooc-resolve-view.js +15 -37
- package/dist-client/activities/activity-ooc-resolve-view.js.map +1 -1
- package/dist-client/activities/activity-ooc-review-edit.js +39 -29
- package/dist-client/activities/activity-ooc-review-edit.js.map +1 -1
- package/dist-client/activities/activity-ooc-review-view.js +0 -22
- package/dist-client/activities/activity-ooc-review-view.js.map +1 -1
- package/dist-client/bootstrap.d.ts +4 -4
- package/dist-client/bootstrap.js +4 -4
- package/dist-client/bootstrap.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 +17 -3
- 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} +2 -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 +5 -1
- package/dist-client/pages/data-ooc/data-ooc-view.js +50 -38
- package/dist-client/pages/data-ooc/data-ooc-view.js.map +1 -1
- package/dist-client/pages/data-ooc/data-oocs-page.d.ts +17 -0
- package/dist-client/pages/data-ooc/data-oocs-page.js +132 -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 +19 -13
- 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} +2 -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.js +55 -11
- package/dist-client/pages/data-sample/data-sample-view.js.map +1 -1
- package/dist-client/pages/data-sample/data-samples-page.d.ts +19 -0
- package/dist-client/pages/data-sample/data-samples-page.js +120 -0
- package/dist-client/pages/data-sample/data-samples-page.js.map +1 -0
- 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/service/data-ooc/data-ooc.js +33 -15
- package/dist-server/service/data-ooc/data-ooc.js.map +1 -1
- package/dist-server/service/data-sample/data-sample.js +15 -12
- package/dist-server/service/data-sample/data-sample.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -11
- package/server/service/data-ooc/data-ooc.ts +27 -28
- package/server/service/data-sample/data-sample.ts +14 -32
- package/things-factory.config.js +10 -2
- package/translations/en.json +1 -0
- package/translations/ja.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
- 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
@@ -38,13 +38,7 @@ export class DataCollectActivityEdit extends localize(i18next)(LitElement) {
|
|
38
38
|
@query('ox-data-entry-form') entryForm!: OxDataEntryForm
|
39
39
|
|
40
40
|
render() {
|
41
|
-
return html`
|
42
|
-
<ox-data-entry-form
|
43
|
-
.dataSet=${this.dataSet}
|
44
|
-
.value=${this.output}
|
45
|
-
@change=${this._updateDataItems}
|
46
|
-
></ox-data-entry-form>
|
47
|
-
`
|
41
|
+
return html` <ox-data-entry-form .dataSet=${this.dataSet} .value=${this.output} @change=${this._updateDataItems}></ox-data-entry-form> `
|
48
42
|
}
|
49
43
|
|
50
44
|
async _updateDataItems() {
|
@@ -31,34 +31,6 @@ export class DataReviewActivityEdit extends localize(i18next)(LitElement) {
|
|
31
31
|
padding: var(--padding-wide);
|
32
32
|
overflow: auto;
|
33
33
|
}
|
34
|
-
|
35
|
-
label[instruction] {
|
36
|
-
display: flex;
|
37
|
-
flex-direction: column;
|
38
|
-
|
39
|
-
padding: var(--padding-wide);
|
40
|
-
}
|
41
|
-
|
42
|
-
label[instruction] div {
|
43
|
-
display: flex;
|
44
|
-
}
|
45
|
-
|
46
|
-
mwc-icon {
|
47
|
-
color: var(--status-danger-color);
|
48
|
-
}
|
49
|
-
|
50
|
-
textarea {
|
51
|
-
border: var(--input-field-border);
|
52
|
-
border-radius: var(--input-border-radius);
|
53
|
-
padding: var(--input-field-padding);
|
54
|
-
font: var(--input-field-font);
|
55
|
-
}
|
56
|
-
|
57
|
-
.button-container {
|
58
|
-
display: flex;
|
59
|
-
margin-left: auto;
|
60
|
-
padding: var(--padding-default);
|
61
|
-
}
|
62
34
|
`
|
63
35
|
]
|
64
36
|
|
@@ -31,34 +31,6 @@ export class DataReviewActivityView extends localize(i18next)(LitElement) {
|
|
31
31
|
padding: var(--padding-wide);
|
32
32
|
overflow: auto;
|
33
33
|
}
|
34
|
-
|
35
|
-
label[instruction] {
|
36
|
-
display: flex;
|
37
|
-
flex-direction: column;
|
38
|
-
|
39
|
-
padding: var(--padding-wide);
|
40
|
-
}
|
41
|
-
|
42
|
-
label[instruction] div {
|
43
|
-
display: flex;
|
44
|
-
}
|
45
|
-
|
46
|
-
mwc-icon {
|
47
|
-
color: var(--status-danger-color);
|
48
|
-
}
|
49
|
-
|
50
|
-
textarea {
|
51
|
-
border: var(--input-field-border);
|
52
|
-
border-radius: var(--input-border-radius);
|
53
|
-
padding: var(--input-field-padding);
|
54
|
-
font: var(--input-field-font);
|
55
|
-
}
|
56
|
-
|
57
|
-
.button-container {
|
58
|
-
display: flex;
|
59
|
-
margin-left: auto;
|
60
|
-
padding: var(--padding-default);
|
61
|
-
}
|
62
34
|
`
|
63
35
|
]
|
64
36
|
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import '@operato/dataset/ox-data-
|
1
|
+
import '@operato/dataset/ox-data-ooc-brief-view.js'
|
2
|
+
// import '@operato/dataset/ox-data-ooc-correction-part.js'
|
2
3
|
|
3
4
|
import gql from 'graphql-tag'
|
4
|
-
import { css, html, LitElement } from 'lit'
|
5
|
+
import { css, html, LitElement, nothing } from 'lit'
|
5
6
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
6
7
|
|
7
8
|
import { client } from '@operato/graphql'
|
@@ -28,35 +29,12 @@ class OocResolveActivityEdit extends localize(i18next)(LitElement) {
|
|
28
29
|
overflow: auto;
|
29
30
|
}
|
30
31
|
|
31
|
-
ox-data-
|
32
|
+
ox-data-ooc-brief-view {
|
32
33
|
flex: 1;
|
33
34
|
padding: var(--padding-wide);
|
34
35
|
overflow: auto;
|
35
36
|
}
|
36
37
|
|
37
|
-
div[instruction] {
|
38
|
-
display: flex;
|
39
|
-
flex-direction: column;
|
40
|
-
|
41
|
-
padding: var(--padding-wide);
|
42
|
-
}
|
43
|
-
|
44
|
-
label[instruction] {
|
45
|
-
display: flex;
|
46
|
-
flex-direction: column;
|
47
|
-
|
48
|
-
padding: var(--padding-wide);
|
49
|
-
}
|
50
|
-
|
51
|
-
label[instruction] h2 {
|
52
|
-
display: flex;
|
53
|
-
|
54
|
-
color: var(--title-text-color);
|
55
|
-
text-transform: capitalize;
|
56
|
-
margin: var(--title-margin);
|
57
|
-
align-items: center;
|
58
|
-
}
|
59
|
-
|
60
38
|
label[action] {
|
61
39
|
display: flex;
|
62
40
|
flex-direction: column;
|
@@ -79,25 +57,21 @@ class OocResolveActivityEdit extends localize(i18next)(LitElement) {
|
|
79
57
|
|
80
58
|
textarea {
|
81
59
|
border: var(--input-field-border);
|
82
|
-
border-radius:
|
83
|
-
|
60
|
+
border-radius: 10px;
|
61
|
+
margin: var(--margin-default);
|
62
|
+
padding: var(--input-padding);
|
84
63
|
font: var(--input-field-font);
|
85
64
|
|
86
65
|
resize: none;
|
87
66
|
outline: none;
|
88
67
|
min-height: 200px;
|
89
68
|
}
|
90
|
-
|
91
|
-
.button-container {
|
92
|
-
display: flex;
|
93
|
-
margin-left: auto;
|
94
|
-
padding: var(--padding-default);
|
95
|
-
}
|
96
69
|
`
|
97
70
|
]
|
98
71
|
|
99
72
|
@property({ type: Object }) input?: any
|
100
73
|
@property({ type: Object }) output?: any
|
74
|
+
@property({ type: Object }) activityThread?: any
|
101
75
|
|
102
76
|
@state() dataOoc?: any
|
103
77
|
|
@@ -105,25 +79,24 @@ class OocResolveActivityEdit extends localize(i18next)(LitElement) {
|
|
105
79
|
|
106
80
|
render() {
|
107
81
|
const action = this.output?.action
|
82
|
+
const state = this.activityThread?.state
|
83
|
+
const editable = state == 'assigned' || state == 'started'
|
108
84
|
|
109
85
|
return html`
|
110
86
|
<div content>
|
111
|
-
<ox-data-
|
87
|
+
<ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>
|
112
88
|
</div>
|
113
89
|
|
114
|
-
<
|
115
|
-
<h2><mwc-icon>build_circle</mwc-icon> <span>${i18next.t('label.corrective instruction')}</span></h2>
|
116
|
-
<div content>${this.input?.instruction}</div>
|
117
|
-
</div>
|
90
|
+
<!-- <ox-data-ooc-correction-part .dataOoc=${this.dataOoc}></ox-data-ooc-correction-part> -->
|
118
91
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
92
|
+
${editable
|
93
|
+
? html`
|
94
|
+
<label action>
|
95
|
+
<h2><mwc-icon>build_circle</mwc-icon> <span>${i18next.t('label.corrective action')}</span></h2>
|
96
|
+
<textarea placeholder=${String(i18next.t('text.corrective action placeholder'))} .value=${action || ''} @change=${this.onChangeAction}></textarea>
|
97
|
+
</label>
|
98
|
+
`
|
99
|
+
: nothing}
|
127
100
|
`
|
128
101
|
}
|
129
102
|
|
@@ -162,6 +135,9 @@ class OocResolveActivityEdit extends localize(i18next)(LitElement) {
|
|
162
135
|
useCase
|
163
136
|
data
|
164
137
|
judgment
|
138
|
+
history
|
139
|
+
correctiveAction
|
140
|
+
correctiveInstruction
|
165
141
|
dataItems {
|
166
142
|
name
|
167
143
|
description
|
@@ -178,7 +154,17 @@ class OocResolveActivityEdit extends localize(i18next)(LitElement) {
|
|
178
154
|
}
|
179
155
|
workDate
|
180
156
|
workShift
|
157
|
+
reviewer {
|
158
|
+
id
|
159
|
+
name
|
160
|
+
}
|
161
|
+
corrector {
|
162
|
+
id
|
163
|
+
name
|
164
|
+
}
|
181
165
|
collectedAt
|
166
|
+
reviewedAt
|
167
|
+
correctedAt
|
182
168
|
}
|
183
169
|
}
|
184
170
|
`,
|
@@ -187,7 +173,17 @@ class OocResolveActivityEdit extends localize(i18next)(LitElement) {
|
|
187
173
|
}
|
188
174
|
})
|
189
175
|
|
190
|
-
|
176
|
+
const dataOoc = {
|
177
|
+
...response.data.dataOoc
|
178
|
+
}
|
179
|
+
|
180
|
+
if (this.activityThread?.output) {
|
181
|
+
dataOoc.correctiveAction = this.activityThread.output.action
|
182
|
+
dataOoc.correctedAt = this.activityThread.updatedAt
|
183
|
+
dataOoc.corrector = this.activityThread.assignee
|
184
|
+
}
|
185
|
+
|
186
|
+
this.dataOoc = dataOoc
|
191
187
|
}
|
192
188
|
}
|
193
189
|
}
|
@@ -9,7 +9,7 @@ import { i18next, localize } from '@operato/i18n'
|
|
9
9
|
import { ScrollbarStyles } from '@operato/styles'
|
10
10
|
|
11
11
|
@customElement('activity-ooc-resolve-view')
|
12
|
-
class OocResolveActivityView extends localize(i18next)(LitElement) {
|
12
|
+
export class OocResolveActivityView extends localize(i18next)(LitElement) {
|
13
13
|
static styles = [
|
14
14
|
ScrollbarStyles,
|
15
15
|
css`
|
@@ -33,47 +33,12 @@ class OocResolveActivityView extends localize(i18next)(LitElement) {
|
|
33
33
|
padding: var(--padding-wide);
|
34
34
|
overflow: auto;
|
35
35
|
}
|
36
|
-
|
37
|
-
div[instruction] {
|
38
|
-
display: flex;
|
39
|
-
flex-direction: column;
|
40
|
-
|
41
|
-
padding: var(--padding-wide);
|
42
|
-
}
|
43
|
-
|
44
|
-
div[instruction] div {
|
45
|
-
display: flex;
|
46
|
-
}
|
47
|
-
|
48
|
-
div[instruction] div[content] {
|
49
|
-
display: flex;
|
50
|
-
min-height: 50px;
|
51
|
-
}
|
52
|
-
|
53
|
-
div[action] {
|
54
|
-
display: flex;
|
55
|
-
flex-direction: column;
|
56
|
-
|
57
|
-
padding: var(--padding-wide);
|
58
|
-
}
|
59
|
-
|
60
|
-
div[action] div {
|
61
|
-
display: flex;
|
62
|
-
}
|
63
|
-
|
64
|
-
div[action] div[content] {
|
65
|
-
display: flex;
|
66
|
-
min-height: 50px;
|
67
|
-
}
|
68
|
-
|
69
|
-
mwc-icon {
|
70
|
-
color: var(--status-danger-color);
|
71
|
-
}
|
72
36
|
`
|
73
37
|
]
|
74
38
|
|
75
39
|
@property({ type: Object }) input?: any
|
76
40
|
@property({ type: Object }) output?: any
|
41
|
+
@property({ type: Object }) activityApproval?: any
|
77
42
|
|
78
43
|
@state() dataOoc?: any
|
79
44
|
|
@@ -147,7 +112,20 @@ class OocResolveActivityView extends localize(i18next)(LitElement) {
|
|
147
112
|
}
|
148
113
|
})
|
149
114
|
|
150
|
-
|
115
|
+
const dataOoc = {
|
116
|
+
...response.data.dataOoc
|
117
|
+
}
|
118
|
+
|
119
|
+
const activityThread = this.activityApproval?.activityThread
|
120
|
+
|
121
|
+
if (activityThread?.output) {
|
122
|
+
/* approval 에서 사용되는 경우 corrective 관련정보를 보완한다. - approval과정에서는 아직 dataOoc.correctiveAction 정보는 채워지지 않았기 때문. */
|
123
|
+
dataOoc.correctiveAction = activityThread.output.action
|
124
|
+
dataOoc.correctedAt = activityThread.updatedAt
|
125
|
+
dataOoc.corrector = activityThread.assignee
|
126
|
+
}
|
127
|
+
|
128
|
+
this.dataOoc = dataOoc
|
151
129
|
}
|
152
130
|
}
|
153
131
|
}
|
@@ -39,47 +39,50 @@ class OocReviewActivityEdit extends localize(i18next)(LitElement) {
|
|
39
39
|
flex-direction: column;
|
40
40
|
|
41
41
|
padding: var(--padding-wide);
|
42
|
-
}
|
43
42
|
|
44
|
-
|
45
|
-
|
43
|
+
h2 {
|
44
|
+
display: flex;
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
color: var(--title-text-color);
|
47
|
+
text-transform: capitalize;
|
48
|
+
margin: var(--title-margin);
|
49
|
+
align-items: center;
|
50
|
+
}
|
52
51
|
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
div {
|
53
|
+
padding: var(--padding-wide);
|
54
|
+
font: var(--input-field-font);
|
55
|
+
}
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
padding: var(--input-field-padding);
|
61
|
-
font: var(--input-field-font);
|
57
|
+
mwc-icon {
|
58
|
+
color: var(--status-danger-color);
|
59
|
+
}
|
62
60
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
61
|
+
textarea {
|
62
|
+
border: var(--input-field-border);
|
63
|
+
border-radius: 10px;
|
64
|
+
margin: var(--margin-default);
|
65
|
+
padding: var(--input-padding);
|
66
|
+
font: var(--input-field-font);
|
67
67
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
resize: none;
|
69
|
+
outline: none;
|
70
|
+
min-height: 200px;
|
71
|
+
}
|
72
72
|
}
|
73
73
|
`
|
74
74
|
]
|
75
75
|
|
76
76
|
@property({ type: Object }) input?: any
|
77
77
|
@property({ type: Object }) output?: any
|
78
|
+
@property({ type: Object }) activityThread?: any
|
78
79
|
|
79
80
|
@state() dataOoc?: any
|
80
81
|
|
81
82
|
render() {
|
82
83
|
const instruction = this.output?.instruction
|
84
|
+
const { state } = this.activityThread || {}
|
85
|
+
const editable = state == 'assigned' || state == 'started' || state == 'submitted'
|
83
86
|
|
84
87
|
return html`
|
85
88
|
<div content>
|
@@ -88,11 +91,15 @@ class OocReviewActivityEdit extends localize(i18next)(LitElement) {
|
|
88
91
|
|
89
92
|
<label instruction>
|
90
93
|
<h2><mwc-icon>build_circle</mwc-icon> <span>${i18next.t('label.corrective instruction')}</span></h2>
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
94
|
+
${editable
|
95
|
+
? html`
|
96
|
+
<textarea
|
97
|
+
placeholder=${String(i18next.t('text.corrective instruction placeholder'))}
|
98
|
+
.value=${instruction || ''}
|
99
|
+
@change=${this.onChangeInstruction}
|
100
|
+
></textarea>
|
101
|
+
`
|
102
|
+
: html`<div>${instruction}</div>`}
|
96
103
|
</label>
|
97
104
|
`
|
98
105
|
}
|
@@ -33,26 +33,6 @@ class OocReviewActivityView extends localize(i18next)(LitElement) {
|
|
33
33
|
padding: var(--padding-wide);
|
34
34
|
overflow: auto;
|
35
35
|
}
|
36
|
-
|
37
|
-
div[instruction] {
|
38
|
-
display: flex;
|
39
|
-
flex-direction: column;
|
40
|
-
|
41
|
-
padding: var(--padding-wide);
|
42
|
-
}
|
43
|
-
|
44
|
-
div[instruction] div {
|
45
|
-
display: flex;
|
46
|
-
}
|
47
|
-
|
48
|
-
div[instruction] div[content] {
|
49
|
-
display: flex;
|
50
|
-
min-height: 50px;
|
51
|
-
}
|
52
|
-
|
53
|
-
mwc-icon {
|
54
|
-
color: var(--status-danger-color);
|
55
|
-
}
|
56
36
|
`
|
57
37
|
]
|
58
38
|
|
@@ -62,8 +42,6 @@ class OocReviewActivityView extends localize(i18next)(LitElement) {
|
|
62
42
|
@state() dataOoc?: any
|
63
43
|
|
64
44
|
render() {
|
65
|
-
const instruction = this.output?.instruction
|
66
|
-
|
67
45
|
return html`
|
68
46
|
<div content>
|
69
47
|
<ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>
|
package/client/bootstrap.ts
CHANGED
@@ -1,19 +1,15 @@
|
|
1
1
|
import './activities/activity-data-collect-edit' /* refered by the activity template (activity-data-collect) on server */
|
2
|
-
import './activities/activity-ooc-review-edit' /* refered by the activity template (activity-ooc-review) on server */
|
3
|
-
import './activities/activity-ooc-resolve-edit' /* refered by the activity template (activity-ooc-resolve) on server */
|
4
2
|
import './activities/activity-data-collect-view' /* refered by the activity template (activity-data-collect) on server */
|
5
|
-
import './activities/activity-ooc-review-view' /* refered by the activity template (activity-ooc-review) on server */
|
6
|
-
import './activities/activity-ooc-resolve-view' /* refered by the activity template (activity-ooc-resolve) on server */
|
7
3
|
import './activities/activity-data-review-edit' /* refered by the activity template (activity-data-review) on server */
|
8
4
|
import './activities/activity-data-review-view' /* refered by the activity template (activity-data-review) on server */
|
5
|
+
import './activities/activity-ooc-review-edit' /* refered by the activity template (activity-ooc-review) on server */
|
6
|
+
import './activities/activity-ooc-review-view' /* refered by the activity template (activity-ooc-review) on server */
|
7
|
+
import './activities/activity-ooc-resolve-edit' /* refered by the activity template (activity-ooc-resolve) on server */
|
8
|
+
import './activities/activity-ooc-resolve-view' /* refered by the activity template (activity-ooc-resolve) on server */
|
9
9
|
import '@operato/app/filter-renderer.js' /* register resource-object filter renderer */
|
10
10
|
|
11
11
|
import { OxGristEditorCode } from '@operato/app/grist-editor/ox-grist-editor-code.js'
|
12
|
-
import {
|
13
|
-
OxGristRendererJson5,
|
14
|
-
registerEditor as registerGristEditor,
|
15
|
-
registerRenderer as registerGristRenderer
|
16
|
-
} from '@operato/data-grist'
|
12
|
+
import { OxGristRendererJson5, registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist'
|
17
13
|
import { OxGristEditorDataItemSpec } from '@operato/dataset/grist-editor/ox-grist-editor-data-item-spec.js'
|
18
14
|
import { OxGristEditorPartitionKeys } from '@operato/grist-editor/ox-grist-editor-partition-keys.js'
|
19
15
|
import { OxGristRendererPartitionKeys } from '@operato/grist-editor/ox-grist-renderer-partition-keys.js'
|
@@ -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
|
{
|
@@ -74,6 +77,13 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
74
77
|
}
|
75
78
|
},
|
76
79
|
help: 'dataset/data-ooc',
|
80
|
+
actions: [
|
81
|
+
{
|
82
|
+
title: i18next.t('button.print'),
|
83
|
+
action: this.printOocs.bind(this),
|
84
|
+
icon: 'print'
|
85
|
+
}
|
86
|
+
],
|
77
87
|
exportable: {
|
78
88
|
name: i18next.t('title.data-ooc list'),
|
79
89
|
data: this._exportableData.bind(this)
|
@@ -126,14 +136,11 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
126
136
|
title: i18next.t('title.view detail ooc data'),
|
127
137
|
handlers: {
|
128
138
|
click: (columns, data, column, record, rowIndex) => {
|
129
|
-
const popup = openPopup(
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
title: i18next.t('title.data-ooc view')
|
135
|
-
}
|
136
|
-
)
|
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
|
+
})
|
137
144
|
popup.onclosed = () => {
|
138
145
|
this.grist.fetch()
|
139
146
|
}
|
@@ -479,9 +486,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
479
486
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
480
487
|
.reduce((record, column) => {
|
481
488
|
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)
|
489
|
+
record[key] = key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
485
490
|
return record
|
486
491
|
}, {})
|
487
492
|
}
|
@@ -489,4 +494,14 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
489
494
|
|
490
495
|
return { header: headerSetting, data: data }
|
491
496
|
}
|
497
|
+
|
498
|
+
printOocs() {
|
499
|
+
const selected = this.grist.selected
|
500
|
+
const ids = selected.map(record => record.id).join('|')
|
501
|
+
|
502
|
+
GhostPrint.print({
|
503
|
+
src: `./data-oocs?ids=${ids}`
|
504
|
+
// pending: 200 * selected.length
|
505
|
+
})
|
506
|
+
}
|
492
507
|
}
|