@things-factory/dataset 9.1.19 → 10.0.0-beta.2
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/dist-client/pages/data-archive/data-archive-list-page.d.ts +1 -7
- package/dist-client/pages/data-archive/data-archive-list-page.js +42 -77
- package/dist-client/pages/data-archive/data-archive-list-page.js.map +1 -1
- package/dist-client/pages/data-entry/data-entry-list-page.d.ts +1 -7
- package/dist-client/pages/data-entry/data-entry-list-page.js +77 -143
- package/dist-client/pages/data-entry/data-entry-list-page.js.map +1 -1
- package/dist-client/pages/data-key-set/data-key-set-list-page.d.ts +1 -7
- package/dist-client/pages/data-key-set/data-key-set-list-page.js +69 -131
- package/dist-client/pages/data-key-set/data-key-set-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-list-page.d.ts +0 -6
- package/dist-client/pages/data-ooc/data-ooc-list-page.js +87 -166
- package/dist-client/pages/data-ooc/data-ooc-list-page.js.map +1 -1
- package/dist-client/pages/data-report/data-report-list-page.d.ts +1 -7
- package/dist-client/pages/data-report/data-report-list-page.js +71 -132
- package/dist-client/pages/data-report/data-report-list-page.js.map +1 -1
- package/dist-client/pages/data-report/data-report-samples-page.d.ts +1 -7
- package/dist-client/pages/data-report/data-report-samples-page.js +17 -30
- package/dist-client/pages/data-report/data-report-samples-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-list-page.d.ts +0 -6
- package/dist-client/pages/data-sample/data-sample-list-page.js +68 -130
- package/dist-client/pages/data-sample/data-sample-list-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-search-page.d.ts +1 -7
- package/dist-client/pages/data-sample/data-sample-search-page.js +63 -116
- package/dist-client/pages/data-sample/data-sample-search-page.js.map +1 -1
- package/dist-client/pages/data-sensor/data-sensor-list-page.d.ts +0 -6
- package/dist-client/pages/data-sensor/data-sensor-list-page.js +89 -167
- package/dist-client/pages/data-sensor/data-sensor-list-page.js.map +1 -1
- package/dist-client/pages/data-set/data-set-list-page.d.ts +0 -6
- package/dist-client/pages/data-set/data-set-list-page.js +2 -3
- package/dist-client/pages/data-set/data-set-list-page.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-list-page.d.ts +1 -7
- package/dist-client/pages/data-summary/data-summary-list-page.js +56 -105
- package/dist-client/pages/data-summary/data-summary-list-page.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-period-page.d.ts +1 -7
- package/dist-client/pages/data-summary/data-summary-period-page.js +50 -90
- package/dist-client/pages/data-summary/data-summary-period-page.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-search-page.d.ts +1 -7
- package/dist-client/pages/data-summary/data-summary-search-page.js +61 -111
- package/dist-client/pages/data-summary/data-summary-search-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/activities/activity-data-review.js +5 -2
- package/dist-server/activities/activity-data-review.js.map +1 -1
- package/dist-server/activities/activity-ooc-review.js +4 -1
- package/dist-server/activities/activity-ooc-review.js.map +1 -1
- package/dist-server/controllers/create-data-ooc.js +2 -1
- package/dist-server/controllers/create-data-ooc.js.map +1 -1
- package/dist-server/controllers/create-data-sample.js +2 -2
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/controllers/issue-data-collection-task.js +9 -5
- package/dist-server/controllers/issue-data-collection-task.js.map +1 -1
- package/dist-server/controllers/issue-ooc-resolve.js +11 -6
- package/dist-server/controllers/issue-ooc-resolve.js.map +1 -1
- package/dist-server/controllers/issue-ooc-review.js +9 -6
- package/dist-server/controllers/issue-ooc-review.js.map +1 -1
- package/dist-server/service/index.d.ts +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -26
- package/spec/integration/debug.spec.ts +42 -0
- package/spec/integration/ooc-lifecycle.spec.ts +484 -0
- package/spec/integration/ooc-workflow.spec.ts +276 -0
- package/spec/integration/simple.spec.ts +62 -0
- package/spec/unit/controllers/activity-callbacks.spec.ts +609 -0
- package/spec/unit/controllers/create-data-ooc.spec.ts +310 -0
- package/spec/unit/controllers/issue-ooc-resolve.spec.ts +431 -0
- package/spec/unit/controllers/issue-ooc-review.spec.ts +288 -0
- package/spec/unit/data-use-case.spec.ts +150 -0
- package/spec/unit/ooc-state-transition.spec.ts +233 -0
|
@@ -8,20 +8,16 @@ import './data-ooc-view.js';
|
|
|
8
8
|
import gql from 'graphql-tag';
|
|
9
9
|
import { css, html } from 'lit';
|
|
10
10
|
import { customElement, query, state } from 'lit/decorators.js';
|
|
11
|
-
import { connect } from 'pwa-helpers/connect-mixin';
|
|
12
11
|
import { GhostPrint } from '@operato/ghost-print';
|
|
13
12
|
function getOocStatus() {
|
|
14
13
|
return [
|
|
15
|
-
{
|
|
16
|
-
display: i18next.t('label.state-issued'),
|
|
14
|
+
{ display: i18next.t('label.state-issued'),
|
|
17
15
|
value: 'ISSUED'
|
|
18
16
|
},
|
|
19
|
-
{
|
|
20
|
-
display: i18next.t('label.state-reviewed'),
|
|
17
|
+
{ display: i18next.t('label.state-reviewed'),
|
|
21
18
|
value: 'REVIEWED'
|
|
22
19
|
},
|
|
23
|
-
{
|
|
24
|
-
display: i18next.t('label.state-corrected'),
|
|
20
|
+
{ display: i18next.t('label.state-corrected'),
|
|
25
21
|
value: 'CORRECTED'
|
|
26
22
|
}
|
|
27
23
|
];
|
|
@@ -30,10 +26,10 @@ import { DataGrist } from '@operato/data-grist';
|
|
|
30
26
|
import { client } from '@operato/graphql';
|
|
31
27
|
import { i18next, localize } from '@operato/i18n';
|
|
32
28
|
import { openPopup } from '@operato/layout';
|
|
33
|
-
import { PageView
|
|
29
|
+
import { PageView } from '@operato/shell';
|
|
34
30
|
import { CommonGristStyles, CommonHeaderStyles, ScrollbarStyles } from '@operato/styles';
|
|
35
31
|
import { isMobileDevice, adjustFilters } from '@operato/utils';
|
|
36
|
-
let DataOocListPage = class DataOocListPage extends
|
|
32
|
+
let DataOocListPage = class DataOocListPage extends p13n(localize(i18next)(PageView)) {
|
|
37
33
|
constructor() {
|
|
38
34
|
super(...arguments);
|
|
39
35
|
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
|
@@ -43,53 +39,43 @@ let DataOocListPage = class DataOocListPage extends connect(store)(p13n(localize
|
|
|
43
39
|
CommonGristStyles,
|
|
44
40
|
CommonHeaderStyles,
|
|
45
41
|
css `
|
|
46
|
-
:host {
|
|
47
|
-
display: flex;
|
|
42
|
+
:host { display: flex;
|
|
48
43
|
flex-direction: column;
|
|
49
44
|
|
|
50
45
|
overflow: hidden;
|
|
51
46
|
|
|
52
47
|
--grid-header-padding: 2px 0 2px 9px;
|
|
53
|
-
|
|
48
|
+
}
|
|
54
49
|
|
|
55
|
-
ox-grist {
|
|
56
|
-
overflow-y: auto;
|
|
50
|
+
ox-grist { overflow-y: auto;
|
|
57
51
|
flex: 1;
|
|
58
|
-
|
|
52
|
+
}
|
|
59
53
|
|
|
60
|
-
.header {
|
|
61
|
-
|
|
62
|
-
}
|
|
54
|
+
.header { grid-template-areas: 'filters actions';
|
|
55
|
+
}
|
|
63
56
|
`
|
|
64
57
|
]; }
|
|
65
58
|
get context() {
|
|
66
|
-
return {
|
|
67
|
-
|
|
68
|
-
search: {
|
|
69
|
-
handler: (search) => {
|
|
59
|
+
return { title: i18next.t('title.data-ooc list'),
|
|
60
|
+
search: { handler: (search) => {
|
|
70
61
|
this.grist.searchText = search;
|
|
71
62
|
},
|
|
72
|
-
value: this.grist?.searchText || ''
|
|
73
|
-
|
|
74
|
-
filter: {
|
|
75
|
-
handler: () => {
|
|
63
|
+
value: this.grist?.searchText || '' },
|
|
64
|
+
filter: { handler: () => {
|
|
76
65
|
this.grist.toggleHeadroom();
|
|
77
66
|
}
|
|
78
67
|
},
|
|
79
68
|
help: 'dataset/data-ooc',
|
|
80
69
|
actions: [
|
|
81
|
-
{
|
|
82
|
-
title: i18next.t('button.print'),
|
|
70
|
+
{ title: i18next.t('button.print'),
|
|
83
71
|
action: this.printOocs.bind(this),
|
|
84
72
|
icon: 'print'
|
|
85
73
|
}
|
|
86
74
|
],
|
|
87
|
-
exportable: {
|
|
88
|
-
name: i18next.t('title.data-ooc list'),
|
|
75
|
+
exportable: { name: i18next.t('title.data-ooc list'),
|
|
89
76
|
data: this._exportableData.bind(this)
|
|
90
77
|
},
|
|
91
|
-
toolbar: false
|
|
92
|
-
};
|
|
78
|
+
toolbar: false };
|
|
93
79
|
}
|
|
94
80
|
render() {
|
|
95
81
|
const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID');
|
|
@@ -120,15 +106,12 @@ let DataOocListPage = class DataOocListPage extends connect(store)(p13n(localize
|
|
|
120
106
|
`;
|
|
121
107
|
}
|
|
122
108
|
async pageInitialized(lifecycle) {
|
|
123
|
-
this.gristConfig = {
|
|
124
|
-
list: {
|
|
125
|
-
fields: ['dataSet', 'data', 'correctiveAction', 'corrector', 'correctedAt', 'collectedAt', 'creator']
|
|
109
|
+
this.gristConfig = { list: { fields: ['dataSet', 'data', 'correctiveAction', 'corrector', 'correctedAt', 'collectedAt', 'creator']
|
|
126
110
|
},
|
|
127
111
|
columns: [
|
|
128
112
|
{ type: 'gutter', gutterName: 'sequence', fixed: true },
|
|
129
113
|
{ type: 'gutter', gutterName: 'row-selector', multiple: true, fixed: true },
|
|
130
|
-
{
|
|
131
|
-
type: 'gutter',
|
|
114
|
+
{ type: 'gutter',
|
|
132
115
|
gutterName: 'button',
|
|
133
116
|
fixed: true,
|
|
134
117
|
icon: 'assignment_turned_in',
|
|
@@ -136,235 +119,193 @@ let DataOocListPage = class DataOocListPage extends connect(store)(p13n(localize
|
|
|
136
119
|
title: i18next.t('button.detail'),
|
|
137
120
|
width: 72
|
|
138
121
|
},
|
|
139
|
-
{
|
|
140
|
-
type: 'string',
|
|
122
|
+
{ type: 'string',
|
|
141
123
|
name: 'name',
|
|
142
124
|
fixed: true,
|
|
143
125
|
label: true,
|
|
144
126
|
header: i18next.t('field.name'),
|
|
145
|
-
record: {
|
|
146
|
-
editable: false
|
|
127
|
+
record: { editable: false
|
|
147
128
|
},
|
|
148
129
|
filter: 'search',
|
|
149
130
|
sortable: true,
|
|
150
131
|
width: 120,
|
|
151
132
|
imex: true
|
|
152
133
|
},
|
|
153
|
-
{
|
|
154
|
-
type: 'string',
|
|
134
|
+
{ type: 'string',
|
|
155
135
|
name: 'description',
|
|
156
136
|
label: true,
|
|
157
137
|
header: i18next.t('field.description'),
|
|
158
|
-
record: {
|
|
159
|
-
editable: false
|
|
138
|
+
record: { editable: false
|
|
160
139
|
},
|
|
161
140
|
filter: 'search',
|
|
162
141
|
width: 150,
|
|
163
142
|
imex: true
|
|
164
143
|
},
|
|
165
|
-
{
|
|
166
|
-
type: 'string',
|
|
144
|
+
{ type: 'string',
|
|
167
145
|
name: 'history',
|
|
168
146
|
hidden: true,
|
|
169
147
|
imex: true
|
|
170
148
|
},
|
|
171
|
-
{
|
|
172
|
-
type: 'checkbox',
|
|
149
|
+
{ type: 'checkbox',
|
|
173
150
|
name: 'ooc',
|
|
174
151
|
header: i18next.t('field.ooc'),
|
|
175
|
-
record: {
|
|
176
|
-
editable: false
|
|
152
|
+
record: { editable: false
|
|
177
153
|
},
|
|
178
154
|
width: 30
|
|
179
155
|
},
|
|
180
|
-
{
|
|
181
|
-
type: 'checkbox',
|
|
156
|
+
{ type: 'checkbox',
|
|
182
157
|
name: 'oos',
|
|
183
158
|
header: i18next.t('field.oos'),
|
|
184
|
-
record: {
|
|
185
|
-
editable: false
|
|
159
|
+
record: { editable: false
|
|
186
160
|
},
|
|
187
161
|
width: 30
|
|
188
162
|
},
|
|
189
|
-
{
|
|
190
|
-
type: 'select',
|
|
163
|
+
{ type: 'select',
|
|
191
164
|
name: 'state',
|
|
192
165
|
label: true,
|
|
193
166
|
header: i18next.t('field.status'),
|
|
194
|
-
record: {
|
|
195
|
-
editable: false,
|
|
167
|
+
record: { editable: false,
|
|
196
168
|
options: [{ display: '', value: '' }, ...getOocStatus()]
|
|
197
169
|
},
|
|
198
170
|
width: 100,
|
|
199
171
|
filter: true,
|
|
200
172
|
imex: true
|
|
201
173
|
},
|
|
202
|
-
{
|
|
203
|
-
type: 'string',
|
|
174
|
+
{ type: 'string',
|
|
204
175
|
name: 'correctiveInstruction',
|
|
205
176
|
label: true,
|
|
206
177
|
header: i18next.t('field.corrective-instruction'),
|
|
207
|
-
record: {
|
|
208
|
-
editable: false,
|
|
178
|
+
record: { editable: false,
|
|
209
179
|
language: 'text'
|
|
210
180
|
},
|
|
211
181
|
width: 150,
|
|
212
182
|
imex: true
|
|
213
183
|
},
|
|
214
|
-
{
|
|
215
|
-
type: 'string',
|
|
184
|
+
{ type: 'string',
|
|
216
185
|
name: 'correctiveAction',
|
|
217
186
|
label: true,
|
|
218
187
|
header: i18next.t('field.corrective-action'),
|
|
219
|
-
record: {
|
|
220
|
-
editable: false,
|
|
188
|
+
record: { editable: false,
|
|
221
189
|
language: 'text'
|
|
222
190
|
},
|
|
223
191
|
width: 150,
|
|
224
192
|
imex: true
|
|
225
193
|
},
|
|
226
|
-
{
|
|
227
|
-
type: 'resource-object',
|
|
194
|
+
{ type: 'resource-object',
|
|
228
195
|
name: 'dataSet',
|
|
229
196
|
header: i18next.t('field.data-set'),
|
|
230
197
|
sortable: true,
|
|
231
198
|
width: 120,
|
|
232
199
|
imex: true
|
|
233
200
|
},
|
|
234
|
-
{
|
|
235
|
-
type: 'string',
|
|
201
|
+
{ type: 'string',
|
|
236
202
|
name: 'key01',
|
|
237
|
-
header: {
|
|
238
|
-
renderer: i18next.t('field.key-01'),
|
|
203
|
+
header: { renderer: i18next.t('field.key-01'),
|
|
239
204
|
group: i18next.t('field.key')
|
|
240
205
|
},
|
|
241
|
-
record: {
|
|
242
|
-
editable: false
|
|
206
|
+
record: { editable: false
|
|
243
207
|
},
|
|
244
208
|
sortable: true,
|
|
245
209
|
width: 120,
|
|
246
210
|
imex: true
|
|
247
211
|
},
|
|
248
|
-
{
|
|
249
|
-
type: 'string',
|
|
212
|
+
{ type: 'string',
|
|
250
213
|
name: 'key02',
|
|
251
|
-
header: {
|
|
252
|
-
renderer: i18next.t('field.key-02'),
|
|
214
|
+
header: { renderer: i18next.t('field.key-02'),
|
|
253
215
|
group: i18next.t('field.key')
|
|
254
216
|
},
|
|
255
|
-
record: {
|
|
256
|
-
editable: false
|
|
217
|
+
record: { editable: false
|
|
257
218
|
},
|
|
258
219
|
sortable: true,
|
|
259
220
|
width: 120,
|
|
260
221
|
imex: true
|
|
261
222
|
},
|
|
262
|
-
{
|
|
263
|
-
type: 'string',
|
|
223
|
+
{ type: 'string',
|
|
264
224
|
name: 'key03',
|
|
265
|
-
header: {
|
|
266
|
-
renderer: i18next.t('field.key-03'),
|
|
225
|
+
header: { renderer: i18next.t('field.key-03'),
|
|
267
226
|
group: i18next.t('field.key')
|
|
268
227
|
},
|
|
269
|
-
record: {
|
|
270
|
-
editable: false
|
|
228
|
+
record: { editable: false
|
|
271
229
|
},
|
|
272
230
|
sortable: true,
|
|
273
231
|
width: 120,
|
|
274
232
|
imex: true
|
|
275
233
|
},
|
|
276
|
-
{
|
|
277
|
-
type: 'string',
|
|
234
|
+
{ type: 'string',
|
|
278
235
|
name: 'key04',
|
|
279
|
-
header: {
|
|
280
|
-
renderer: i18next.t('field.key-04'),
|
|
236
|
+
header: { renderer: i18next.t('field.key-04'),
|
|
281
237
|
group: i18next.t('field.key')
|
|
282
238
|
},
|
|
283
|
-
record: {
|
|
284
|
-
editable: false
|
|
239
|
+
record: { editable: false
|
|
285
240
|
},
|
|
286
241
|
sortable: true,
|
|
287
242
|
width: 120,
|
|
288
243
|
imex: true
|
|
289
244
|
},
|
|
290
|
-
{
|
|
291
|
-
type: 'string',
|
|
245
|
+
{ type: 'string',
|
|
292
246
|
name: 'key05',
|
|
293
|
-
header: {
|
|
294
|
-
renderer: i18next.t('field.key-05'),
|
|
247
|
+
header: { renderer: i18next.t('field.key-05'),
|
|
295
248
|
group: i18next.t('field.key')
|
|
296
249
|
},
|
|
297
|
-
record: {
|
|
298
|
-
editable: false
|
|
250
|
+
record: { editable: false
|
|
299
251
|
},
|
|
300
252
|
sortable: true,
|
|
301
253
|
width: 120,
|
|
302
254
|
imex: true
|
|
303
255
|
},
|
|
304
|
-
{
|
|
305
|
-
type: 'json5',
|
|
256
|
+
{ type: 'json5',
|
|
306
257
|
name: 'partitionKeys',
|
|
307
258
|
header: i18next.t('field.partition-keys'),
|
|
308
|
-
record: {
|
|
309
|
-
editable: false
|
|
259
|
+
record: { editable: false
|
|
310
260
|
},
|
|
311
261
|
width: 200,
|
|
312
262
|
imex: true
|
|
313
263
|
},
|
|
314
|
-
{
|
|
315
|
-
type: 'json5',
|
|
264
|
+
{ type: 'json5',
|
|
316
265
|
name: 'data',
|
|
317
266
|
header: i18next.t('field.data'),
|
|
318
|
-
record: {
|
|
319
|
-
editable: false
|
|
267
|
+
record: { editable: false
|
|
320
268
|
},
|
|
321
269
|
width: 200,
|
|
322
270
|
imex: true
|
|
323
271
|
},
|
|
324
|
-
{
|
|
325
|
-
type: 'text',
|
|
272
|
+
{ type: 'text',
|
|
326
273
|
name: 'rawData',
|
|
327
274
|
header: i18next.t('field.raw-data'),
|
|
328
|
-
record: {
|
|
329
|
-
editable: false
|
|
275
|
+
record: { editable: false
|
|
330
276
|
},
|
|
331
277
|
width: 200,
|
|
332
278
|
imex: true
|
|
333
279
|
},
|
|
334
|
-
{
|
|
335
|
-
type: 'string',
|
|
280
|
+
{ type: 'string',
|
|
336
281
|
name: 'workDate',
|
|
337
282
|
header: i18next.t('field.work-date'),
|
|
338
283
|
sortable: true,
|
|
339
284
|
width: 80,
|
|
340
285
|
imex: true
|
|
341
286
|
},
|
|
342
|
-
{
|
|
343
|
-
type: 'string',
|
|
287
|
+
{ type: 'string',
|
|
344
288
|
name: 'workShift',
|
|
345
289
|
header: i18next.t('field.work-shift'),
|
|
346
290
|
sortable: true,
|
|
347
291
|
width: 40,
|
|
348
292
|
imex: true
|
|
349
293
|
},
|
|
350
|
-
{
|
|
351
|
-
type: 'datetime',
|
|
294
|
+
{ type: 'datetime',
|
|
352
295
|
name: 'collectedAt',
|
|
353
296
|
header: i18next.t('field.collected-at'),
|
|
354
297
|
sortable: true,
|
|
355
298
|
width: 180,
|
|
356
299
|
imex: true
|
|
357
300
|
},
|
|
358
|
-
{
|
|
359
|
-
type: 'resource-object',
|
|
301
|
+
{ type: 'resource-object',
|
|
360
302
|
name: 'updater',
|
|
361
303
|
header: i18next.t('field.updater'),
|
|
362
304
|
sortable: true,
|
|
363
305
|
width: 120,
|
|
364
306
|
imex: true
|
|
365
307
|
},
|
|
366
|
-
{
|
|
367
|
-
type: 'datetime',
|
|
308
|
+
{ type: 'datetime',
|
|
368
309
|
name: 'updatedAt',
|
|
369
310
|
header: i18next.t('field.updated_at'),
|
|
370
311
|
sortable: true,
|
|
@@ -372,27 +313,21 @@ let DataOocListPage = class DataOocListPage extends connect(store)(p13n(localize
|
|
|
372
313
|
imex: true
|
|
373
314
|
}
|
|
374
315
|
],
|
|
375
|
-
rows: {
|
|
376
|
-
|
|
377
|
-
selectable: {
|
|
378
|
-
multiple: true
|
|
316
|
+
rows: { appendable: false,
|
|
317
|
+
selectable: { multiple: true
|
|
379
318
|
},
|
|
380
|
-
handlers: {
|
|
381
|
-
|
|
382
|
-
const popup = openPopup(html ` <data-ooc-view data-ooc-id=${record.id} style="background-color: white;"></data-ooc-view> `, {
|
|
383
|
-
backdrop: true,
|
|
319
|
+
handlers: { click: (columns, data, column, record, rowIndex) => {
|
|
320
|
+
const popup = openPopup(html ` <data-ooc-view data-ooc-id=${record.id} style="background-color: white;"></data-ooc-view> `, { backdrop: true,
|
|
384
321
|
size: 'large',
|
|
385
322
|
title: i18next.t('title.data-ooc view')
|
|
386
323
|
});
|
|
387
324
|
popup.onclosed = () => {
|
|
388
|
-
// this.grist.fetch()
|
|
389
325
|
};
|
|
390
326
|
}
|
|
391
327
|
}
|
|
392
328
|
},
|
|
393
329
|
sorters: [
|
|
394
|
-
{
|
|
395
|
-
name: 'collectedAt',
|
|
330
|
+
{ name: 'collectedAt',
|
|
396
331
|
desc: true
|
|
397
332
|
}
|
|
398
333
|
]
|
|
@@ -402,27 +337,21 @@ let DataOocListPage = class DataOocListPage extends connect(store)(p13n(localize
|
|
|
402
337
|
if (this.state) {
|
|
403
338
|
filters = adjustFilters(filters, [{ name: 'state', operator: 'eq', value: this.state }]);
|
|
404
339
|
}
|
|
405
|
-
const response = await client.query({
|
|
406
|
-
|
|
407
|
-
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
408
|
-
responses: dataOocs(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
409
|
-
items {
|
|
410
|
-
id
|
|
340
|
+
const response = await client.query({ query: gql `
|
|
341
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) { responses: dataOocs(filters: $filters, pagination: $pagination, sortings: $sortings) { items { id
|
|
411
342
|
name
|
|
412
343
|
description
|
|
413
344
|
useCase
|
|
414
|
-
dataSet {
|
|
415
|
-
id
|
|
345
|
+
dataSet { id
|
|
416
346
|
name
|
|
417
|
-
|
|
347
|
+
}
|
|
418
348
|
key01
|
|
419
349
|
key02
|
|
420
350
|
key03
|
|
421
351
|
key04
|
|
422
352
|
key05
|
|
423
353
|
partitionKeys
|
|
424
|
-
dataItems {
|
|
425
|
-
name
|
|
354
|
+
dataItems { name
|
|
426
355
|
description
|
|
427
356
|
active
|
|
428
357
|
hidden
|
|
@@ -434,7 +363,7 @@ let DataOocListPage = class DataOocListPage extends connect(store)(p13n(localize
|
|
|
434
363
|
quota
|
|
435
364
|
spec
|
|
436
365
|
stat
|
|
437
|
-
|
|
366
|
+
}
|
|
438
367
|
data
|
|
439
368
|
rawData
|
|
440
369
|
judgment
|
|
@@ -447,34 +376,29 @@ let DataOocListPage = class DataOocListPage extends connect(store)(p13n(localize
|
|
|
447
376
|
correctiveInstruction
|
|
448
377
|
correctiveAction
|
|
449
378
|
reviewedAt
|
|
450
|
-
reviewer {
|
|
451
|
-
id
|
|
379
|
+
reviewer { id
|
|
452
380
|
name
|
|
453
|
-
|
|
381
|
+
}
|
|
454
382
|
correctedAt
|
|
455
|
-
corrector {
|
|
456
|
-
id
|
|
383
|
+
corrector { id
|
|
457
384
|
name
|
|
458
|
-
|
|
459
|
-
updater {
|
|
460
|
-
id
|
|
385
|
+
}
|
|
386
|
+
updater { id
|
|
461
387
|
name
|
|
462
|
-
|
|
388
|
+
}
|
|
463
389
|
updatedAt
|
|
464
390
|
collectedAt
|
|
465
|
-
|
|
391
|
+
}
|
|
466
392
|
total
|
|
467
|
-
|
|
468
|
-
|
|
393
|
+
}
|
|
394
|
+
}
|
|
469
395
|
`,
|
|
470
|
-
variables: {
|
|
471
|
-
filters,
|
|
396
|
+
variables: { filters,
|
|
472
397
|
pagination: { page, limit },
|
|
473
398
|
sortings
|
|
474
399
|
}
|
|
475
400
|
});
|
|
476
|
-
return {
|
|
477
|
-
total: response.data.responses.total || 0,
|
|
401
|
+
return { total: response.data.responses.total || 0,
|
|
478
402
|
records: response.data.responses.items || []
|
|
479
403
|
};
|
|
480
404
|
}
|
|
@@ -490,8 +414,7 @@ let DataOocListPage = class DataOocListPage extends connect(store)(p13n(localize
|
|
|
490
414
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
|
491
415
|
.map(column => {
|
|
492
416
|
return column.imex === true
|
|
493
|
-
? {
|
|
494
|
-
header: column.header.renderer(column),
|
|
417
|
+
? { header: column.header.renderer(column),
|
|
495
418
|
key: column.name,
|
|
496
419
|
width: column.width,
|
|
497
420
|
type: column.type
|
|
@@ -499,8 +422,7 @@ let DataOocListPage = class DataOocListPage extends connect(store)(p13n(localize
|
|
|
499
422
|
: column.imex;
|
|
500
423
|
});
|
|
501
424
|
var data = records.map(item => {
|
|
502
|
-
return {
|
|
503
|
-
id: item.id,
|
|
425
|
+
return { id: item.id,
|
|
504
426
|
...this.gristConfig.columns
|
|
505
427
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
|
506
428
|
.reduce((record, column) => {
|
|
@@ -517,8 +439,7 @@ let DataOocListPage = class DataOocListPage extends connect(store)(p13n(localize
|
|
|
517
439
|
printOocs() {
|
|
518
440
|
const selected = this.grist.selected;
|
|
519
441
|
const ids = selected.map(record => record.id).join('|');
|
|
520
|
-
GhostPrint.print({
|
|
521
|
-
src: `./data-oocs?ids=${ids}`
|
|
442
|
+
GhostPrint.print({ src: `./data-oocs?ids=${ids}`
|
|
522
443
|
// pending: 200 * selected.length
|
|
523
444
|
});
|
|
524
445
|
}
|