@things-factory/dataset 8.0.0 → 9.0.0-beta.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist-client/activities/activity-data-review-edit.d.ts +5 -1
- package/dist-client/activities/activity-data-review-edit.js +143 -5
- package/dist-client/activities/activity-data-review-edit.js.map +1 -1
- package/dist-client/pages/data-entry/data-entry-list-page.js +2 -2
- package/dist-client/pages/data-entry/data-entry-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/activities/activity-data-review.js +18 -5
- package/dist-server/activities/activity-data-review.js.map +1 -1
- package/dist-server/activities/activity-ooc-review.js +13 -52
- package/dist-server/activities/activity-ooc-review.js.map +1 -1
- package/dist-server/controllers/create-data-ooc.d.ts +4 -0
- package/dist-server/controllers/create-data-ooc.js +65 -0
- package/dist-server/controllers/create-data-ooc.js.map +1 -0
- package/dist-server/controllers/create-data-sample.js +4 -94
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/controllers/index.d.ts +3 -0
- package/dist-server/controllers/index.js +3 -0
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/controllers/issue-ooc-resolve.d.ts +3 -0
- package/dist-server/controllers/issue-ooc-resolve.js +49 -0
- package/dist-server/controllers/issue-ooc-resolve.js.map +1 -0
- package/dist-server/controllers/issue-ooc-review.d.ts +3 -0
- package/dist-server/controllers/issue-ooc-review.js +47 -0
- package/dist-server/controllers/issue-ooc-review.js.map +1 -0
- package/dist-server/service/data-sample/data-sample-query.d.ts +1 -1
- package/dist-server/service/data-sample/data-sample-query.js +3 -3
- package/dist-server/service/data-sample/data-sample-query.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/translations/en.json +3 -0
- package/translations/ja.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
- package/client/activities/activity-data-collect-edit.ts +0 -105
- package/client/activities/activity-data-collect-view.ts +0 -91
- package/client/activities/activity-data-review-edit.ts +0 -133
- package/client/activities/activity-data-review-view.ts +0 -145
- package/client/activities/activity-ooc-resolve-edit.ts +0 -195
- package/client/activities/activity-ooc-resolve-view.ts +0 -143
- package/client/activities/activity-ooc-review-edit.ts +0 -173
- package/client/activities/activity-ooc-review-view.ts +0 -129
- package/client/bootstrap.ts +0 -35
- package/client/components/data-entry-form.ts +0 -109
- package/client/index.ts +0 -1
- package/client/pages/data-archive/data-archive-list-page.ts +0 -277
- package/client/pages/data-archive/data-archive-request-popup.ts +0 -177
- package/client/pages/data-entry/data-entry-list-page.ts +0 -464
- package/client/pages/data-key-set/data-key-item-list.ts +0 -183
- package/client/pages/data-key-set/data-key-set-importer.ts +0 -89
- package/client/pages/data-key-set/data-key-set-list-page.ts +0 -413
- package/client/pages/data-ooc/data-ooc-list-page.ts +0 -549
- package/client/pages/data-ooc/data-ooc-page.ts +0 -164
- package/client/pages/data-ooc/data-ooc-view.ts +0 -236
- package/client/pages/data-ooc/data-oocs-page.ts +0 -200
- package/client/pages/data-report/data-report-embed-page.ts +0 -108
- package/client/pages/data-report/data-report-list-page.ts +0 -454
- package/client/pages/data-report/data-report-samples-page.ts +0 -174
- package/client/pages/data-report/jasper-report-oocs-page.ts +0 -110
- package/client/pages/data-report/jasper-report-samples-crosstab-page.ts +0 -110
- package/client/pages/data-report/jasper-report-samples-page.ts +0 -110
- package/client/pages/data-sample/data-sample-list-page.ts +0 -442
- package/client/pages/data-sample/data-sample-page.ts +0 -55
- package/client/pages/data-sample/data-sample-search-page.ts +0 -424
- package/client/pages/data-sample/data-sample-view.ts +0 -292
- package/client/pages/data-sample/data-samples-page.ts +0 -249
- package/client/pages/data-sensor/data-sensor-list-page.ts +0 -456
- package/client/pages/data-set/data-item-list.ts +0 -304
- package/client/pages/data-set/data-set-importer.ts +0 -89
- package/client/pages/data-set/data-set-list-page.ts +0 -1078
- package/client/pages/data-summary/data-summary-list-page.ts +0 -363
- package/client/pages/data-summary/data-summary-period-page.ts +0 -439
- package/client/pages/data-summary/data-summary-search-page.ts +0 -426
- package/client/pages/data-summary/data-summary-view.ts +0 -133
- package/client/route.ts +0 -91
- package/client/tsconfig.json +0 -13
- package/server/activities/activity-data-collect.ts +0 -100
- package/server/activities/activity-data-review.ts +0 -82
- package/server/activities/activity-ooc-resolve.ts +0 -123
- package/server/activities/activity-ooc-review.ts +0 -144
- package/server/activities/index.ts +0 -11
- package/server/controllers/create-data-sample.ts +0 -426
- package/server/controllers/data-use-case.ts +0 -98
- package/server/controllers/finalize-data-collection.ts +0 -388
- package/server/controllers/index.ts +0 -3
- package/server/controllers/issue-data-collection-task.ts +0 -70
- package/server/controllers/jasper-report.ts +0 -186
- package/server/controllers/query-data-summary-by-period.ts +0 -178
- package/server/controllers/shiny-report.ts +0 -54
- package/server/engine/index.ts +0 -1
- package/server/engine/task/create-data-sample.ts +0 -100
- package/server/engine/task/index.ts +0 -2
- package/server/engine/task/issue-collect-data.ts +0 -45
- package/server/index.ts +0 -8
- package/server/routes.ts +0 -188
- package/server/service/data-archive/data-archive-mutation.ts +0 -273
- package/server/service/data-archive/data-archive-query.ts +0 -58
- package/server/service/data-archive/data-archive-type.ts +0 -48
- package/server/service/data-archive/data-archive.ts +0 -69
- package/server/service/data-archive/index.ts +0 -6
- package/server/service/data-key-set/data-key-item-type.ts +0 -31
- package/server/service/data-key-set/data-key-set-mutation.ts +0 -201
- package/server/service/data-key-set/data-key-set-query.ts +0 -68
- package/server/service/data-key-set/data-key-set-type.ts +0 -70
- package/server/service/data-key-set/data-key-set.ts +0 -86
- package/server/service/data-key-set/index.ts +0 -6
- package/server/service/data-ooc/data-ooc-mutation.ts +0 -154
- package/server/service/data-ooc/data-ooc-query.ts +0 -106
- package/server/service/data-ooc/data-ooc-subscription.ts +0 -48
- package/server/service/data-ooc/data-ooc-type.ts +0 -71
- package/server/service/data-ooc/data-ooc.ts +0 -259
- package/server/service/data-ooc/index.ts +0 -7
- package/server/service/data-sample/data-sample-mutation.ts +0 -18
- package/server/service/data-sample/data-sample-query.ts +0 -215
- package/server/service/data-sample/data-sample-type.ts +0 -47
- package/server/service/data-sample/data-sample.ts +0 -193
- package/server/service/data-sample/index.ts +0 -6
- package/server/service/data-sensor/data-sensor-mutation.ts +0 -116
- package/server/service/data-sensor/data-sensor-query.ts +0 -76
- package/server/service/data-sensor/data-sensor-type.ts +0 -104
- package/server/service/data-sensor/data-sensor.ts +0 -126
- package/server/service/data-sensor/index.ts +0 -6
- package/server/service/data-set/data-item-type.ts +0 -155
- package/server/service/data-set/data-set-mutation.ts +0 -552
- package/server/service/data-set/data-set-query.ts +0 -461
- package/server/service/data-set/data-set-type.ts +0 -204
- package/server/service/data-set/data-set.ts +0 -326
- package/server/service/data-set/index.ts +0 -6
- package/server/service/data-set-history/data-set-history-query.ts +0 -126
- package/server/service/data-set-history/data-set-history-type.ts +0 -12
- package/server/service/data-set-history/data-set-history.ts +0 -217
- package/server/service/data-set-history/event-subscriber.ts +0 -17
- package/server/service/data-set-history/index.ts +0 -7
- package/server/service/data-spec/data-spec-manager.ts +0 -21
- package/server/service/data-spec/data-spec-query.ts +0 -21
- package/server/service/data-spec/data-spec.ts +0 -45
- package/server/service/data-spec/index.ts +0 -5
- package/server/service/data-summary/data-summary-mutation.ts +0 -45
- package/server/service/data-summary/data-summary-query.ts +0 -179
- package/server/service/data-summary/data-summary-type.ts +0 -86
- package/server/service/data-summary/data-summary.ts +0 -170
- package/server/service/data-summary/index.ts +0 -7
- package/server/service/index.ts +0 -57
- package/server/tsconfig.json +0 -10
- package/server/utils/config-resolver.ts +0 -29
- package/server/utils/index.ts +0 -1
@@ -1,195 +0,0 @@
|
|
1
|
-
import '@material/web/icon/icon.js'
|
2
|
-
import '@operato/dataset/ox-data-ooc-brief-view.js'
|
3
|
-
|
4
|
-
import gql from 'graphql-tag'
|
5
|
-
import { css, html, LitElement, nothing } from 'lit'
|
6
|
-
import { customElement, property, query, state } from 'lit/decorators.js'
|
7
|
-
|
8
|
-
import { client } from '@operato/graphql'
|
9
|
-
import { i18next, localize } from '@operato/i18n'
|
10
|
-
import { ScrollbarStyles } from '@operato/styles'
|
11
|
-
|
12
|
-
@customElement('activity-ooc-resolve-edit')
|
13
|
-
class OocResolveActivityEdit extends localize(i18next)(LitElement) {
|
14
|
-
static styles = [
|
15
|
-
ScrollbarStyles,
|
16
|
-
css`
|
17
|
-
:host {
|
18
|
-
display: flex;
|
19
|
-
flex-direction: column;
|
20
|
-
|
21
|
-
background-color: var(--md-sys-color-surface);
|
22
|
-
}
|
23
|
-
|
24
|
-
div[content] {
|
25
|
-
flex: 1;
|
26
|
-
flex-direction: column;
|
27
|
-
|
28
|
-
display: flex;
|
29
|
-
overflow: auto;
|
30
|
-
}
|
31
|
-
|
32
|
-
ox-data-ooc-brief-view {
|
33
|
-
flex: 1;
|
34
|
-
padding: var(--spacing-large);
|
35
|
-
overflow: auto;
|
36
|
-
}
|
37
|
-
|
38
|
-
label[action] {
|
39
|
-
display: flex;
|
40
|
-
flex-direction: column;
|
41
|
-
|
42
|
-
padding: var(--spacing-large);
|
43
|
-
}
|
44
|
-
|
45
|
-
label[action] h2 {
|
46
|
-
display: flex;
|
47
|
-
|
48
|
-
color: var(--title-text-color);
|
49
|
-
text-transform: capitalize;
|
50
|
-
margin: var(--title-margin);
|
51
|
-
align-items: center;
|
52
|
-
}
|
53
|
-
|
54
|
-
md-icon {
|
55
|
-
color: var(--status-danger-color);
|
56
|
-
}
|
57
|
-
|
58
|
-
textarea {
|
59
|
-
border: var(--input-field-border);
|
60
|
-
border-radius: var(--spacing-small);
|
61
|
-
margin: var(--spacing-medium);
|
62
|
-
padding: var(--spacing-medium);
|
63
|
-
font: var(--input-field-font);
|
64
|
-
color: var(--md-sys-color-on-surface);
|
65
|
-
background: var(--md-sys-color-surface-variant);
|
66
|
-
|
67
|
-
resize: none;
|
68
|
-
outline: none;
|
69
|
-
min-height: 200px;
|
70
|
-
}
|
71
|
-
`
|
72
|
-
]
|
73
|
-
|
74
|
-
@property({ type: Object }) input?: any
|
75
|
-
@property({ type: Object }) output?: any
|
76
|
-
@property({ type: Object }) activityThread?: any
|
77
|
-
|
78
|
-
@state() dataOoc?: any
|
79
|
-
|
80
|
-
@query('textarea') actionTextArea!: HTMLTextAreaElement
|
81
|
-
|
82
|
-
render() {
|
83
|
-
const action = this.output?.action
|
84
|
-
const state = this.activityThread?.state
|
85
|
-
const editable = state == 'unassigned' || state == 'assigned' || state == 'started'
|
86
|
-
|
87
|
-
return html`
|
88
|
-
<div content>
|
89
|
-
<ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>
|
90
|
-
</div>
|
91
|
-
|
92
|
-
<!-- <ox-data-ooc-correction-part .dataOoc=${this.dataOoc}></ox-data-ooc-correction-part> -->
|
93
|
-
|
94
|
-
${editable
|
95
|
-
? html`
|
96
|
-
<label action>
|
97
|
-
<h2><md-icon>build_circle</md-icon> <span>${i18next.t('label.corrective action')}</span></h2>
|
98
|
-
<textarea
|
99
|
-
placeholder=${String(i18next.t('text.corrective action placeholder'))}
|
100
|
-
.value=${action || ''}
|
101
|
-
@change=${this.onChangeAction}
|
102
|
-
></textarea>
|
103
|
-
</label>
|
104
|
-
`
|
105
|
-
: nothing}
|
106
|
-
`
|
107
|
-
}
|
108
|
-
|
109
|
-
onChangeAction(e: Event) {
|
110
|
-
this.output ||= {}
|
111
|
-
this.output.action = (e.target as HTMLTextAreaElement).value
|
112
|
-
|
113
|
-
this.dispatchEvent(
|
114
|
-
new CustomEvent('change', {
|
115
|
-
detail: this.output
|
116
|
-
})
|
117
|
-
)
|
118
|
-
}
|
119
|
-
|
120
|
-
updated(changes) {
|
121
|
-
if (changes.has('input')) {
|
122
|
-
this.fetchDataOoc()
|
123
|
-
}
|
124
|
-
}
|
125
|
-
|
126
|
-
async fetchDataOoc() {
|
127
|
-
const id = this.input.dataOocId
|
128
|
-
|
129
|
-
if (id) {
|
130
|
-
const response = await client.query({
|
131
|
-
query: gql`
|
132
|
-
query ($id: String!) {
|
133
|
-
dataOoc(id: $id) {
|
134
|
-
id
|
135
|
-
name
|
136
|
-
description
|
137
|
-
ooc
|
138
|
-
oos
|
139
|
-
state
|
140
|
-
type
|
141
|
-
useCase
|
142
|
-
data
|
143
|
-
judgment
|
144
|
-
history
|
145
|
-
correctiveAction
|
146
|
-
correctiveInstruction
|
147
|
-
dataItems {
|
148
|
-
name
|
149
|
-
description
|
150
|
-
active
|
151
|
-
hidden
|
152
|
-
tag
|
153
|
-
group
|
154
|
-
type
|
155
|
-
unit
|
156
|
-
options
|
157
|
-
quota
|
158
|
-
spec
|
159
|
-
stat
|
160
|
-
}
|
161
|
-
workDate
|
162
|
-
workShift
|
163
|
-
reviewer {
|
164
|
-
id
|
165
|
-
name
|
166
|
-
}
|
167
|
-
corrector {
|
168
|
-
id
|
169
|
-
name
|
170
|
-
}
|
171
|
-
collectedAt
|
172
|
-
reviewedAt
|
173
|
-
correctedAt
|
174
|
-
}
|
175
|
-
}
|
176
|
-
`,
|
177
|
-
variables: {
|
178
|
-
id
|
179
|
-
}
|
180
|
-
})
|
181
|
-
|
182
|
-
const dataOoc = {
|
183
|
-
...response.data.dataOoc
|
184
|
-
}
|
185
|
-
|
186
|
-
if (this.activityThread?.output) {
|
187
|
-
dataOoc.correctiveAction = this.activityThread.output.action
|
188
|
-
dataOoc.correctedAt = this.activityThread.updatedAt
|
189
|
-
dataOoc.corrector = this.activityThread.assignee
|
190
|
-
}
|
191
|
-
|
192
|
-
this.dataOoc = dataOoc
|
193
|
-
}
|
194
|
-
}
|
195
|
-
}
|
@@ -1,143 +0,0 @@
|
|
1
|
-
import '@operato/dataset/ox-data-ooc-brief-view.js'
|
2
|
-
|
3
|
-
import gql from 'graphql-tag'
|
4
|
-
import { css, html, LitElement } from 'lit'
|
5
|
-
import { customElement, property, query, state } from 'lit/decorators.js'
|
6
|
-
|
7
|
-
import { client } from '@operato/graphql'
|
8
|
-
import { i18next, localize } from '@operato/i18n'
|
9
|
-
import { ScrollbarStyles } from '@operato/styles'
|
10
|
-
|
11
|
-
@customElement('activity-ooc-resolve-view')
|
12
|
-
export class OocResolveActivityView extends localize(i18next)(LitElement) {
|
13
|
-
static styles = [
|
14
|
-
ScrollbarStyles,
|
15
|
-
css`
|
16
|
-
:host {
|
17
|
-
display: flex;
|
18
|
-
flex-direction: column;
|
19
|
-
|
20
|
-
background-color: var(--md-sys-color-surface);
|
21
|
-
}
|
22
|
-
|
23
|
-
div[content] {
|
24
|
-
flex: 1;
|
25
|
-
flex-direction: column;
|
26
|
-
|
27
|
-
display: flex;
|
28
|
-
overflow: auto;
|
29
|
-
}
|
30
|
-
|
31
|
-
ox-data-ooc-brief-view {
|
32
|
-
flex: 1;
|
33
|
-
padding: var(--spacing-large);
|
34
|
-
overflow: auto;
|
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
|
-
}
|
48
|
-
`
|
49
|
-
]
|
50
|
-
|
51
|
-
@property({ type: Object }) input?: any
|
52
|
-
@property({ type: Object }) output?: any
|
53
|
-
@property({ type: Object }) activityApproval?: any
|
54
|
-
|
55
|
-
@state() dataOoc?: any
|
56
|
-
|
57
|
-
render() {
|
58
|
-
return html`
|
59
|
-
<div content>
|
60
|
-
<ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>
|
61
|
-
</div>
|
62
|
-
`
|
63
|
-
}
|
64
|
-
|
65
|
-
updated(changes) {
|
66
|
-
if (changes.has('input')) {
|
67
|
-
this.fetchDataOoc()
|
68
|
-
}
|
69
|
-
}
|
70
|
-
|
71
|
-
async fetchDataOoc() {
|
72
|
-
const id = this.input.dataOocId
|
73
|
-
|
74
|
-
if (id) {
|
75
|
-
const response = await client.query({
|
76
|
-
query: gql`
|
77
|
-
query ($id: String!) {
|
78
|
-
dataOoc(id: $id) {
|
79
|
-
id
|
80
|
-
name
|
81
|
-
description
|
82
|
-
ooc
|
83
|
-
oos
|
84
|
-
state
|
85
|
-
type
|
86
|
-
useCase
|
87
|
-
data
|
88
|
-
judgment
|
89
|
-
history
|
90
|
-
correctiveAction
|
91
|
-
correctiveInstruction
|
92
|
-
dataItems {
|
93
|
-
name
|
94
|
-
description
|
95
|
-
active
|
96
|
-
hidden
|
97
|
-
tag
|
98
|
-
group
|
99
|
-
type
|
100
|
-
unit
|
101
|
-
options
|
102
|
-
quota
|
103
|
-
spec
|
104
|
-
stat
|
105
|
-
}
|
106
|
-
workDate
|
107
|
-
workShift
|
108
|
-
reviewer {
|
109
|
-
id
|
110
|
-
name
|
111
|
-
}
|
112
|
-
corrector {
|
113
|
-
id
|
114
|
-
name
|
115
|
-
}
|
116
|
-
collectedAt
|
117
|
-
reviewedAt
|
118
|
-
correctedAt
|
119
|
-
}
|
120
|
-
}
|
121
|
-
`,
|
122
|
-
variables: {
|
123
|
-
id
|
124
|
-
}
|
125
|
-
})
|
126
|
-
|
127
|
-
const dataOoc = {
|
128
|
-
...response.data.dataOoc
|
129
|
-
}
|
130
|
-
|
131
|
-
const activityThread = this.activityApproval?.activityThread
|
132
|
-
|
133
|
-
if (activityThread?.output) {
|
134
|
-
/* approval 에서 사용되는 경우 corrective 관련정보를 보완한다. - approval과정에서는 아직 dataOoc.correctiveAction 정보는 채워지지 않았기 때문. */
|
135
|
-
dataOoc.correctiveAction = activityThread.output.action
|
136
|
-
dataOoc.correctedAt = activityThread.updatedAt
|
137
|
-
dataOoc.corrector = activityThread.assignee
|
138
|
-
}
|
139
|
-
|
140
|
-
this.dataOoc = dataOoc
|
141
|
-
}
|
142
|
-
}
|
143
|
-
}
|
@@ -1,173 +0,0 @@
|
|
1
|
-
import '@material/web/icon/icon.js'
|
2
|
-
import '@operato/dataset/ox-data-sample-view.js'
|
3
|
-
|
4
|
-
import gql from 'graphql-tag'
|
5
|
-
import { css, html, LitElement } from 'lit'
|
6
|
-
import { customElement, property, query, state } from 'lit/decorators.js'
|
7
|
-
|
8
|
-
import { client } from '@operato/graphql'
|
9
|
-
import { i18next, localize } from '@operato/i18n'
|
10
|
-
import { ScrollbarStyles } from '@operato/styles'
|
11
|
-
|
12
|
-
@customElement('activity-ooc-review-edit')
|
13
|
-
class OocReviewActivityEdit extends localize(i18next)(LitElement) {
|
14
|
-
static styles = [
|
15
|
-
ScrollbarStyles,
|
16
|
-
css`
|
17
|
-
:host {
|
18
|
-
display: flex;
|
19
|
-
flex-direction: column;
|
20
|
-
|
21
|
-
background-color: var(--md-sys-color-surface);
|
22
|
-
}
|
23
|
-
|
24
|
-
div[content] {
|
25
|
-
flex: 1;
|
26
|
-
flex-direction: column;
|
27
|
-
|
28
|
-
display: flex;
|
29
|
-
overflow: auto;
|
30
|
-
}
|
31
|
-
|
32
|
-
ox-data-sample-view {
|
33
|
-
flex: 1;
|
34
|
-
padding: var(--spacing-large);
|
35
|
-
overflow: auto;
|
36
|
-
}
|
37
|
-
|
38
|
-
label[instruction] {
|
39
|
-
display: flex;
|
40
|
-
flex-direction: column;
|
41
|
-
|
42
|
-
padding: var(--spacing-large);
|
43
|
-
|
44
|
-
h2 {
|
45
|
-
display: flex;
|
46
|
-
|
47
|
-
color: var(--title-text-color);
|
48
|
-
text-transform: capitalize;
|
49
|
-
margin: var(--title-margin);
|
50
|
-
align-items: center;
|
51
|
-
}
|
52
|
-
|
53
|
-
div {
|
54
|
-
padding: var(--spacing-large);
|
55
|
-
font: var(--input-field-font);
|
56
|
-
}
|
57
|
-
|
58
|
-
md-icon {
|
59
|
-
color: var(--status-danger-color);
|
60
|
-
}
|
61
|
-
|
62
|
-
textarea {
|
63
|
-
border: var(--input-field-border);
|
64
|
-
border-radius: var(--spacing-small);
|
65
|
-
margin: var(--spacing-medium);
|
66
|
-
padding: var(--spacing-medium);
|
67
|
-
font: var(--input-field-font);
|
68
|
-
color: var(--md-sys-color-on-surface);
|
69
|
-
background: var(--md-sys-color-surface-variant);
|
70
|
-
|
71
|
-
resize: none;
|
72
|
-
outline: none;
|
73
|
-
min-height: 200px;
|
74
|
-
}
|
75
|
-
}
|
76
|
-
`
|
77
|
-
]
|
78
|
-
|
79
|
-
@property({ type: Object }) input?: any
|
80
|
-
@property({ type: Object }) output?: any
|
81
|
-
@property({ type: Object }) activityThread?: any
|
82
|
-
|
83
|
-
@state() dataOoc?: any
|
84
|
-
|
85
|
-
render() {
|
86
|
-
const instruction = this.output?.instruction
|
87
|
-
const { state } = this.activityThread || {}
|
88
|
-
const editable = state == 'unassigned' || state == 'assigned' || state == 'started' || state == 'submitted'
|
89
|
-
|
90
|
-
return html`
|
91
|
-
<div content>
|
92
|
-
<ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>
|
93
|
-
</div>
|
94
|
-
|
95
|
-
<label instruction>
|
96
|
-
<h2><md-icon>build_circle</md-icon> <span>${i18next.t('label.corrective instruction')}</span></h2>
|
97
|
-
${editable
|
98
|
-
? html`
|
99
|
-
<textarea
|
100
|
-
placeholder=${String(i18next.t('text.corrective instruction placeholder'))}
|
101
|
-
.value=${instruction || ''}
|
102
|
-
@change=${this.onChangeInstruction}
|
103
|
-
></textarea>
|
104
|
-
`
|
105
|
-
: html`<div>${instruction}</div>`}
|
106
|
-
</label>
|
107
|
-
`
|
108
|
-
}
|
109
|
-
|
110
|
-
onChangeInstruction(e: Event) {
|
111
|
-
this.output ||= {}
|
112
|
-
this.output.instruction = (e.target as HTMLTextAreaElement).value
|
113
|
-
|
114
|
-
this.dispatchEvent(
|
115
|
-
new CustomEvent('change', {
|
116
|
-
detail: this.output
|
117
|
-
})
|
118
|
-
)
|
119
|
-
}
|
120
|
-
|
121
|
-
updated(changes) {
|
122
|
-
if (changes.has('input')) {
|
123
|
-
this.fetchDataOoc()
|
124
|
-
}
|
125
|
-
}
|
126
|
-
|
127
|
-
async fetchDataOoc() {
|
128
|
-
const id = this.input?.dataOocId
|
129
|
-
|
130
|
-
if (id) {
|
131
|
-
const response = await client.query({
|
132
|
-
query: gql`
|
133
|
-
query ($id: String!) {
|
134
|
-
dataOoc(id: $id) {
|
135
|
-
id
|
136
|
-
name
|
137
|
-
description
|
138
|
-
ooc
|
139
|
-
oos
|
140
|
-
state
|
141
|
-
type
|
142
|
-
useCase
|
143
|
-
data
|
144
|
-
judgment
|
145
|
-
dataItems {
|
146
|
-
name
|
147
|
-
description
|
148
|
-
active
|
149
|
-
hidden
|
150
|
-
tag
|
151
|
-
group
|
152
|
-
type
|
153
|
-
unit
|
154
|
-
options
|
155
|
-
quota
|
156
|
-
spec
|
157
|
-
stat
|
158
|
-
}
|
159
|
-
workDate
|
160
|
-
workShift
|
161
|
-
collectedAt
|
162
|
-
}
|
163
|
-
}
|
164
|
-
`,
|
165
|
-
variables: {
|
166
|
-
id
|
167
|
-
}
|
168
|
-
})
|
169
|
-
|
170
|
-
this.dataOoc = response.data.dataOoc
|
171
|
-
}
|
172
|
-
}
|
173
|
-
}
|
@@ -1,129 +0,0 @@
|
|
1
|
-
import '@operato/dataset/ox-data-ooc-brief-view.js'
|
2
|
-
|
3
|
-
import gql from 'graphql-tag'
|
4
|
-
import { css, html, LitElement } from 'lit'
|
5
|
-
import { customElement, property, query, state } from 'lit/decorators.js'
|
6
|
-
|
7
|
-
import { client } from '@operato/graphql'
|
8
|
-
import { i18next, localize } from '@operato/i18n'
|
9
|
-
import { ScrollbarStyles } from '@operato/styles'
|
10
|
-
|
11
|
-
@customElement('activity-ooc-review-view')
|
12
|
-
class OocReviewActivityView extends localize(i18next)(LitElement) {
|
13
|
-
static styles = [
|
14
|
-
ScrollbarStyles,
|
15
|
-
css`
|
16
|
-
:host {
|
17
|
-
display: flex;
|
18
|
-
flex-direction: column;
|
19
|
-
|
20
|
-
background-color: var(--md-sys-color-surface);
|
21
|
-
}
|
22
|
-
|
23
|
-
div[content] {
|
24
|
-
flex: 1;
|
25
|
-
flex-direction: column;
|
26
|
-
|
27
|
-
display: flex;
|
28
|
-
overflow: auto;
|
29
|
-
}
|
30
|
-
|
31
|
-
ox-data-ooc-brief-view {
|
32
|
-
flex: 1;
|
33
|
-
padding: var(--spacing-large);
|
34
|
-
overflow: auto;
|
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
|
-
}
|
48
|
-
`
|
49
|
-
]
|
50
|
-
|
51
|
-
@property({ type: Object }) input?: any
|
52
|
-
@property({ type: Object }) output?: any
|
53
|
-
|
54
|
-
@state() dataOoc?: any
|
55
|
-
|
56
|
-
render() {
|
57
|
-
return html`
|
58
|
-
<div content>
|
59
|
-
<ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>
|
60
|
-
</div>
|
61
|
-
`
|
62
|
-
}
|
63
|
-
|
64
|
-
updated(changes) {
|
65
|
-
if (changes.has('input')) {
|
66
|
-
this.fetchDataOoc()
|
67
|
-
}
|
68
|
-
}
|
69
|
-
|
70
|
-
async fetchDataOoc() {
|
71
|
-
const id = this.input?.dataOocId
|
72
|
-
|
73
|
-
if (id) {
|
74
|
-
const response = await client.query({
|
75
|
-
query: gql`
|
76
|
-
query ($id: String!) {
|
77
|
-
dataOoc(id: $id) {
|
78
|
-
id
|
79
|
-
name
|
80
|
-
description
|
81
|
-
ooc
|
82
|
-
oos
|
83
|
-
state
|
84
|
-
type
|
85
|
-
useCase
|
86
|
-
data
|
87
|
-
judgment
|
88
|
-
history
|
89
|
-
correctiveAction
|
90
|
-
correctiveInstruction
|
91
|
-
dataItems {
|
92
|
-
name
|
93
|
-
description
|
94
|
-
active
|
95
|
-
hidden
|
96
|
-
tag
|
97
|
-
group
|
98
|
-
type
|
99
|
-
unit
|
100
|
-
options
|
101
|
-
quota
|
102
|
-
spec
|
103
|
-
stat
|
104
|
-
}
|
105
|
-
workDate
|
106
|
-
workShift
|
107
|
-
reviewer {
|
108
|
-
id
|
109
|
-
name
|
110
|
-
}
|
111
|
-
corrector {
|
112
|
-
id
|
113
|
-
name
|
114
|
-
}
|
115
|
-
collectedAt
|
116
|
-
reviewedAt
|
117
|
-
correctedAt
|
118
|
-
}
|
119
|
-
}
|
120
|
-
`,
|
121
|
-
variables: {
|
122
|
-
id
|
123
|
-
}
|
124
|
-
})
|
125
|
-
|
126
|
-
this.dataOoc = response.data.dataOoc
|
127
|
-
}
|
128
|
-
}
|
129
|
-
}
|
package/client/bootstrap.ts
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
import './activities/activity-data-collect-edit' /* refered by the activity template (activity-data-collect) on server */
|
2
|
-
import './activities/activity-data-collect-view' /* refered by the activity template (activity-data-collect) on server */
|
3
|
-
import './activities/activity-data-review-edit' /* refered by the activity template (activity-data-review) on server */
|
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
|
-
import '@operato/app/filter-renderer.js' /* register resource-object filter renderer */
|
10
|
-
|
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'
|
17
|
-
import { OxGristEditorDataItemSpec } from '@operato/dataset/grist-editor/ox-grist-editor-data-item-spec.js'
|
18
|
-
import { OxGristEditorPartitionKeys } from '@operato/grist-editor/ox-grist-editor-partition-keys.js'
|
19
|
-
import { OxGristRendererPartitionKeys } from '@operato/grist-editor/ox-grist-renderer-partition-keys.js'
|
20
|
-
|
21
|
-
import { OxGristEditorSignature } from '@operato/grist-editor/ox-grist-editor-signature.js'
|
22
|
-
import { OxGristRendererSignature } from '@operato/grist-editor/ox-grist-renderer-signature.js'
|
23
|
-
|
24
|
-
export default function bootstrap() {
|
25
|
-
registerGristEditor('data-item-spec', OxGristEditorDataItemSpec)
|
26
|
-
registerGristRenderer('data-item-spec', OxGristRendererJson5)
|
27
|
-
|
28
|
-
registerGristEditor('script', OxGristEditorCode)
|
29
|
-
|
30
|
-
registerGristEditor('partition-keys', OxGristEditorPartitionKeys)
|
31
|
-
registerGristRenderer('partition-keys', OxGristRendererPartitionKeys)
|
32
|
-
|
33
|
-
registerGristRenderer('signature', OxGristRendererSignature)
|
34
|
-
registerGristEditor('signature', OxGristEditorSignature)
|
35
|
-
}
|