@things-factory/dataset 10.1.256 → 10.1.257
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/activities/activity-data-collect-edit.d.ts +3 -4
- package/dist-client/activities/activity-data-collect-edit.js +36 -49
- package/dist-client/activities/activity-data-collect-edit.js.map +1 -1
- package/dist-client/activities/activity-data-collect-view.d.ts +3 -4
- package/dist-client/activities/activity-data-collect-view.js +33 -46
- package/dist-client/activities/activity-data-collect-view.js.map +1 -1
- package/dist-client/activities/activity-data-review-edit.d.ts +2 -3
- package/dist-client/activities/activity-data-review-edit.js +58 -77
- package/dist-client/activities/activity-data-review-edit.js.map +1 -1
- package/dist-client/activities/activity-data-review-view.d.ts +2 -3
- package/dist-client/activities/activity-data-review-view.js +58 -77
- package/dist-client/activities/activity-data-review-view.js.map +1 -1
- package/dist-client/activities/activity-ooc-resolve-edit.js +72 -83
- package/dist-client/activities/activity-ooc-resolve-edit.js.map +1 -1
- package/dist-client/activities/activity-ooc-resolve-view.d.ts +2 -3
- package/dist-client/activities/activity-ooc-resolve-view.js +72 -85
- package/dist-client/activities/activity-ooc-resolve-view.js.map +1 -1
- package/dist-client/activities/activity-ooc-review-edit.js +49 -62
- package/dist-client/activities/activity-ooc-review-edit.js.map +1 -1
- package/dist-client/activities/activity-ooc-review-view.js +62 -75
- package/dist-client/activities/activity-ooc-review-view.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-list-page.d.ts +5 -3
- package/dist-client/pages/data-ooc/data-ooc-list-page.js +9 -13
- package/dist-client/pages/data-ooc/data-ooc-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-page.d.ts +1 -2
- package/dist-client/pages/data-ooc/data-ooc-page.js +6 -115
- package/dist-client/pages/data-ooc/data-ooc-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-view.d.ts +2 -3
- package/dist-client/pages/data-ooc/data-ooc-view.js +105 -119
- package/dist-client/pages/data-ooc/data-ooc-view.js.map +1 -1
- package/dist-client/pages/data-ooc/data-oocs-page.d.ts +3 -2
- package/dist-client/pages/data-ooc/data-oocs-page.js +70 -79
- package/dist-client/pages/data-ooc/data-oocs-page.js.map +1 -1
- package/dist-client/pages/data-report/data-report-samples-page.d.ts +2 -2
- package/dist-client/pages/data-report/data-report-samples-page.js +25 -31
- package/dist-client/pages/data-report/data-report-samples-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-view.d.ts +2 -3
- package/dist-client/pages/data-sample/data-sample-view.js +152 -166
- package/dist-client/pages/data-sample/data-sample-view.js.map +1 -1
- package/dist-client/pages/data-sample/data-samples-page.d.ts +3 -2
- package/dist-client/pages/data-sample/data-samples-page.js +73 -82
- package/dist-client/pages/data-sample/data-samples-page.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-view.js +51 -62
- package/dist-client/pages/data-summary/data-summary-view.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
|
@@ -3,11 +3,64 @@ import '@operato/dataset/ox-data-entry-form.js';
|
|
|
3
3
|
import '@operato/dataset/ox-checklist-sample-view.js';
|
|
4
4
|
import gql from 'graphql-tag';
|
|
5
5
|
import { css, html, LitElement } from 'lit';
|
|
6
|
-
import { customElement, property
|
|
6
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
7
7
|
import { i18next, localize } from '@operato/i18n';
|
|
8
8
|
import { ScrollbarStyles } from '@operato/styles';
|
|
9
|
-
import {
|
|
9
|
+
import { QueryController } from '@operato/graphql';
|
|
10
10
|
let DataReviewActivityView = class DataReviewActivityView extends localize(i18next)(LitElement) {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
/* The sample the activity's input names; an input that carries the sample itself is shown as it is (ADR-0190). */
|
|
14
|
+
this.dataSampleQuery = new QueryController(this, gql `
|
|
15
|
+
query ($id: String!) {
|
|
16
|
+
dataSample(id: $id) {
|
|
17
|
+
id
|
|
18
|
+
name
|
|
19
|
+
description
|
|
20
|
+
useCase
|
|
21
|
+
key01
|
|
22
|
+
key02
|
|
23
|
+
key03
|
|
24
|
+
key04
|
|
25
|
+
key05
|
|
26
|
+
data
|
|
27
|
+
ooc
|
|
28
|
+
oos
|
|
29
|
+
dataSet {
|
|
30
|
+
id
|
|
31
|
+
name
|
|
32
|
+
description
|
|
33
|
+
monitorType
|
|
34
|
+
monitorView
|
|
35
|
+
}
|
|
36
|
+
dataItems {
|
|
37
|
+
name
|
|
38
|
+
description
|
|
39
|
+
active
|
|
40
|
+
hidden
|
|
41
|
+
tag
|
|
42
|
+
group
|
|
43
|
+
subgroup
|
|
44
|
+
type
|
|
45
|
+
unit
|
|
46
|
+
options
|
|
47
|
+
quota
|
|
48
|
+
spec
|
|
49
|
+
stat
|
|
50
|
+
}
|
|
51
|
+
judgment
|
|
52
|
+
workDate
|
|
53
|
+
workShift
|
|
54
|
+
updater {
|
|
55
|
+
id
|
|
56
|
+
name
|
|
57
|
+
}
|
|
58
|
+
updatedAt
|
|
59
|
+
collectedAt
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`, { variables: () => (!this.input?.dataSample && this.input?.dataSampleId ? { id: this.input.dataSampleId } : undefined) });
|
|
63
|
+
}
|
|
11
64
|
static { this.styles = [
|
|
12
65
|
ScrollbarStyles,
|
|
13
66
|
css `
|
|
@@ -92,6 +145,9 @@ let DataReviewActivityView = class DataReviewActivityView extends localize(i18ne
|
|
|
92
145
|
}
|
|
93
146
|
`
|
|
94
147
|
]; }
|
|
148
|
+
get dataSample() {
|
|
149
|
+
return this.input?.dataSample ?? this.dataSampleQuery.data?.dataSample;
|
|
150
|
+
}
|
|
95
151
|
render() {
|
|
96
152
|
const { judgment, instruction } = this.output || {};
|
|
97
153
|
return html `
|
|
@@ -138,77 +194,6 @@ let DataReviewActivityView = class DataReviewActivityView extends localize(i18ne
|
|
|
138
194
|
detail: this.output
|
|
139
195
|
}));
|
|
140
196
|
}
|
|
141
|
-
updated(changes) {
|
|
142
|
-
if (changes.has('input')) {
|
|
143
|
-
this.fetchDataAssign();
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
async fetchDataAssign() {
|
|
147
|
-
const { dataSampleId, dataSample } = this.input || {};
|
|
148
|
-
if (dataSample) {
|
|
149
|
-
/* only for backwards compatibility - should be deleted later */
|
|
150
|
-
this.dataSample = dataSample;
|
|
151
|
-
}
|
|
152
|
-
else if (dataSampleId) {
|
|
153
|
-
const response = await client.query({
|
|
154
|
-
query: gql `
|
|
155
|
-
query ($id: String!) {
|
|
156
|
-
dataSample(id: $id) {
|
|
157
|
-
id
|
|
158
|
-
name
|
|
159
|
-
description
|
|
160
|
-
useCase
|
|
161
|
-
key01
|
|
162
|
-
key02
|
|
163
|
-
key03
|
|
164
|
-
key04
|
|
165
|
-
key05
|
|
166
|
-
data
|
|
167
|
-
ooc
|
|
168
|
-
oos
|
|
169
|
-
dataSet {
|
|
170
|
-
id
|
|
171
|
-
name
|
|
172
|
-
description
|
|
173
|
-
monitorType
|
|
174
|
-
monitorView
|
|
175
|
-
}
|
|
176
|
-
dataItems {
|
|
177
|
-
name
|
|
178
|
-
description
|
|
179
|
-
active
|
|
180
|
-
hidden
|
|
181
|
-
tag
|
|
182
|
-
group
|
|
183
|
-
subgroup
|
|
184
|
-
type
|
|
185
|
-
unit
|
|
186
|
-
options
|
|
187
|
-
quota
|
|
188
|
-
spec
|
|
189
|
-
stat
|
|
190
|
-
}
|
|
191
|
-
judgment
|
|
192
|
-
workDate
|
|
193
|
-
workShift
|
|
194
|
-
updater {
|
|
195
|
-
id
|
|
196
|
-
name
|
|
197
|
-
}
|
|
198
|
-
updatedAt
|
|
199
|
-
collectedAt
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
`,
|
|
203
|
-
variables: {
|
|
204
|
-
id: dataSampleId
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
this.dataSample = {
|
|
208
|
-
...response.data.dataSample
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
197
|
showDataSampleView() {
|
|
213
198
|
const dataSet = this.dataSample?.dataSet;
|
|
214
199
|
const monitorType = dataSet?.monitorType;
|
|
@@ -236,10 +221,6 @@ __decorate([
|
|
|
236
221
|
property({ type: Object }),
|
|
237
222
|
__metadata("design:type", Object)
|
|
238
223
|
], DataReviewActivityView.prototype, "output", void 0);
|
|
239
|
-
__decorate([
|
|
240
|
-
state(),
|
|
241
|
-
__metadata("design:type", Object)
|
|
242
|
-
], DataReviewActivityView.prototype, "dataSample", void 0);
|
|
243
224
|
DataReviewActivityView = __decorate([
|
|
244
225
|
customElement('activity-data-review-view')
|
|
245
226
|
], DataReviewActivityView);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-data-review-view.js","sourceRoot":"","sources":["../../client/activities/activity-data-review-view.ts"],"names":[],"mappings":";AAAA,OAAO,wCAAwC,CAAA;AAC/C,OAAO,8CAA8C,CAAA;AAErD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"activity-data-review-view.js","sourceRoot":"","sources":["../../client/activities/activity-data-review-view.ts"],"names":[],"mappings":";AAAA,OAAO,wCAAwC,CAAA;AAC/C,OAAO,8CAA8C,CAAA;AAErD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB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ql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { QueryController } from '@operato/graphql'\n\n@customElement('activity-data-review-view')\nexport class DataReviewActivityView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n div[content] {\n flex: 1;\n flex-direction: column;\n\n display: flex;\n overflow: auto;\n }\n\n ox-data-sample-view,\n ox-checklist-sample-view {\n flex: 1;\n padding: var(--spacing-large);\n overflow: auto;\n }\n\n div[role='radiogroup'] {\n display: flex;\n flex-direction: row;\n gap: var(--spacing-medium);\n\n label {\n display: flex;\n flex-direction: row;\n\n gap: var(--spacing-small);\n align-items: center;\n }\n }\n\n label {\n display: flex;\n flex-direction: column;\n\n padding: var(--spacing-large);\n\n h2 {\n display: flex;\n\n color: var(--title-text-color);\n text-transform: capitalize;\n margin: var(--title-margin);\n align-items: center;\n }\n\n div {\n padding: var(--spacing-large);\n font: var(--input-field-font);\n border: var(--md-sys-color-outline) solid 1px;\n border-radius: var(--spacing-small);\n background-color: var(--md-sys-color-surface-variant);\n }\n\n div[instruction] {\n min-height: 200px;\n }\n\n md-icon {\n color: var(--status-danger-color);\n }\n }\n\n @media print {\n :host {\n display: block;\n overflow: visible;\n }\n\n div[content] {\n display: block;\n overflow: visible;\n }\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n /* The sample the activity's input names; an input that carries the sample itself is shown as it is (ADR-0190). */\n private dataSampleQuery = new QueryController(\n this,\n gql`\n query ($id: String!) {\n dataSample(id: $id) {\n id\n name\n description\n useCase\n key01\n key02\n key03\n key04\n key05\n data\n ooc\n oos\n dataSet {\n id\n name\n description\n monitorType\n monitorView\n }\n dataItems {\n name\n description\n active\n hidden\n tag\n group\n subgroup\n type\n unit\n options\n quota\n spec\n stat\n }\n judgment\n workDate\n workShift\n updater {\n id\n name\n }\n updatedAt\n collectedAt\n }\n }\n `,\n { variables: () => (!this.input?.dataSample && this.input?.dataSampleId ? { id: this.input.dataSampleId } : undefined) }\n )\n\n get dataSample(): any {\n return this.input?.dataSample ?? this.dataSampleQuery.data?.dataSample\n }\n\n render() {\n const { judgment, instruction } = this.output || {}\n\n return html`\n <div content>${this.showDataSampleView()}</div>\n\n <form>\n <label>\n <h2><md-icon>build_circle</md-icon> <span>${i18next.t('label.judgment')}</span></h2>\n <div role=\"radiogroup\" aria-label=\"An example group of radio buttons\">\n <label>\n <md-radio\n name=\"judgment\"\n value=\"normal\"\n ?checked=${judgment == 'normal'}\n aria-label=${i18next.t('label.judgment-normal')}\n disabled\n ></md-radio>\n ${i18next.t('label.judgment-normal')}\n </label>\n <label>\n <md-radio\n name=\"judgment\"\n value=\"abnormal\"\n ?checked=${judgment == 'abnormal'}\n aria-label=${i18next.t('label.judgment-abnormal')}\n disabled\n ></md-radio\n >${i18next.t('label.judgment-abnormal')}\n </label>\n </div>\n </label>\n\n <label>\n <h2><md-icon>build_circle</md-icon> <span>${i18next.t('label.corrective instruction')}</span></h2>\n <div instruction>${instruction}</div>\n </label>\n </form>\n `\n }\n\n onChangeInstruction(e: Event) {\n this.output ||= {}\n this.output.instruction = (e.target as HTMLTextAreaElement).value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: this.output\n })\n )\n }\n\n private showDataSampleView() {\n const dataSet = this.dataSample?.dataSet\n const monitorType = dataSet?.monitorType\n const monitorView = dataSet?.monitorView\n\n switch (monitorType) {\n case 'generated':\n return html`<ox-data-sample-view .dataSample=${this.dataSample}></ox-data-sample-view>`\n case 'checklist':\n return html`<ox-checklist-sample-view .dataSample=${this.dataSample}></ox-checklist-sample-view>`\n case 'board':\n break\n case 'page':\n break\n default:\n return html`<ox-data-sample-view .dataSample=${this.dataSample}></ox-data-sample-view>`\n break\n }\n }\n}\n"]}
|
|
@@ -3,11 +3,68 @@ import '@material/web/icon/icon.js';
|
|
|
3
3
|
import '@operato/dataset/ox-data-ooc-brief-view.js';
|
|
4
4
|
import gql from 'graphql-tag';
|
|
5
5
|
import { css, html, LitElement, nothing } from 'lit';
|
|
6
|
-
import { customElement, property, query
|
|
7
|
-
import {
|
|
6
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
7
|
+
import { QueryController } from '@operato/graphql';
|
|
8
8
|
import { i18next, localize } from '@operato/i18n';
|
|
9
9
|
import { ScrollbarStyles } from '@operato/styles';
|
|
10
10
|
let OocResolveActivityEdit = class OocResolveActivityEdit extends localize(i18next)(LitElement) {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
/* The out-of-control record the activity's input names (ADR-0190). */
|
|
14
|
+
this.dataOocQuery = new QueryController(this, gql `
|
|
15
|
+
query ($id: String!) {
|
|
16
|
+
dataOoc(id: $id) {
|
|
17
|
+
id
|
|
18
|
+
name
|
|
19
|
+
description
|
|
20
|
+
ooc
|
|
21
|
+
oos
|
|
22
|
+
state
|
|
23
|
+
type
|
|
24
|
+
useCase
|
|
25
|
+
data
|
|
26
|
+
judgment
|
|
27
|
+
history
|
|
28
|
+
correctiveAction
|
|
29
|
+
correctiveInstruction
|
|
30
|
+
dataSet {
|
|
31
|
+
id
|
|
32
|
+
name
|
|
33
|
+
monitorType
|
|
34
|
+
monitorView
|
|
35
|
+
}
|
|
36
|
+
dataItems {
|
|
37
|
+
name
|
|
38
|
+
description
|
|
39
|
+
active
|
|
40
|
+
hidden
|
|
41
|
+
tag
|
|
42
|
+
group
|
|
43
|
+
subgroup
|
|
44
|
+
type
|
|
45
|
+
unit
|
|
46
|
+
options
|
|
47
|
+
quota
|
|
48
|
+
spec
|
|
49
|
+
stat
|
|
50
|
+
}
|
|
51
|
+
workDate
|
|
52
|
+
workShift
|
|
53
|
+
reviewer {
|
|
54
|
+
id
|
|
55
|
+
name
|
|
56
|
+
}
|
|
57
|
+
corrector {
|
|
58
|
+
id
|
|
59
|
+
name
|
|
60
|
+
}
|
|
61
|
+
collectedAt
|
|
62
|
+
reviewedAt
|
|
63
|
+
correctedAt
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`, { variables: () => (this.input?.dataOocId ? { id: this.input.dataOocId } : undefined) });
|
|
67
|
+
}
|
|
11
68
|
static { this.styles = [
|
|
12
69
|
ScrollbarStyles,
|
|
13
70
|
css `
|
|
@@ -67,6 +124,19 @@ let OocResolveActivityEdit = class OocResolveActivityEdit extends localize(i18ne
|
|
|
67
124
|
}
|
|
68
125
|
`
|
|
69
126
|
]; }
|
|
127
|
+
/* The record does not hold the corrective action yet - the thread does. */
|
|
128
|
+
get dataOoc() {
|
|
129
|
+
const dataOoc = this.dataOocQuery.data?.dataOoc;
|
|
130
|
+
const output = this.activityThread?.output;
|
|
131
|
+
return dataOoc && output
|
|
132
|
+
? {
|
|
133
|
+
...dataOoc,
|
|
134
|
+
correctiveAction: output.action,
|
|
135
|
+
correctedAt: this.activityThread.updatedAt,
|
|
136
|
+
corrector: this.activityThread.assignee
|
|
137
|
+
}
|
|
138
|
+
: dataOoc;
|
|
139
|
+
}
|
|
70
140
|
render() {
|
|
71
141
|
const action = this.output?.action;
|
|
72
142
|
const state = this.activityThread?.state;
|
|
@@ -99,83 +169,6 @@ let OocResolveActivityEdit = class OocResolveActivityEdit extends localize(i18ne
|
|
|
99
169
|
detail: this.output
|
|
100
170
|
}));
|
|
101
171
|
}
|
|
102
|
-
updated(changes) {
|
|
103
|
-
if (changes.has('input')) {
|
|
104
|
-
this.fetchDataOoc();
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
async fetchDataOoc() {
|
|
108
|
-
const id = this.input.dataOocId;
|
|
109
|
-
if (id) {
|
|
110
|
-
const response = await client.query({
|
|
111
|
-
query: gql `
|
|
112
|
-
query ($id: String!) {
|
|
113
|
-
dataOoc(id: $id) {
|
|
114
|
-
id
|
|
115
|
-
name
|
|
116
|
-
description
|
|
117
|
-
ooc
|
|
118
|
-
oos
|
|
119
|
-
state
|
|
120
|
-
type
|
|
121
|
-
useCase
|
|
122
|
-
data
|
|
123
|
-
judgment
|
|
124
|
-
history
|
|
125
|
-
correctiveAction
|
|
126
|
-
correctiveInstruction
|
|
127
|
-
dataSet {
|
|
128
|
-
id
|
|
129
|
-
name
|
|
130
|
-
monitorType
|
|
131
|
-
monitorView
|
|
132
|
-
}
|
|
133
|
-
dataItems {
|
|
134
|
-
name
|
|
135
|
-
description
|
|
136
|
-
active
|
|
137
|
-
hidden
|
|
138
|
-
tag
|
|
139
|
-
group
|
|
140
|
-
subgroup
|
|
141
|
-
type
|
|
142
|
-
unit
|
|
143
|
-
options
|
|
144
|
-
quota
|
|
145
|
-
spec
|
|
146
|
-
stat
|
|
147
|
-
}
|
|
148
|
-
workDate
|
|
149
|
-
workShift
|
|
150
|
-
reviewer {
|
|
151
|
-
id
|
|
152
|
-
name
|
|
153
|
-
}
|
|
154
|
-
corrector {
|
|
155
|
-
id
|
|
156
|
-
name
|
|
157
|
-
}
|
|
158
|
-
collectedAt
|
|
159
|
-
reviewedAt
|
|
160
|
-
correctedAt
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
`,
|
|
164
|
-
variables: {
|
|
165
|
-
id
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
const dataOoc = {
|
|
169
|
-
...response.data.dataOoc
|
|
170
|
-
};
|
|
171
|
-
if (this.activityThread?.output) {
|
|
172
|
-
dataOoc.correctiveAction = this.activityThread.output.action;
|
|
173
|
-
dataOoc.correctedAt = this.activityThread.updatedAt;
|
|
174
|
-
dataOoc.corrector = this.activityThread.assignee;
|
|
175
|
-
}
|
|
176
|
-
this.dataOoc = dataOoc;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
172
|
};
|
|
180
173
|
__decorate([
|
|
181
174
|
property({ type: Object }),
|
|
@@ -189,10 +182,6 @@ __decorate([
|
|
|
189
182
|
property({ type: Object }),
|
|
190
183
|
__metadata("design:type", Object)
|
|
191
184
|
], OocResolveActivityEdit.prototype, "activityThread", void 0);
|
|
192
|
-
__decorate([
|
|
193
|
-
state(),
|
|
194
|
-
__metadata("design:type", Object)
|
|
195
|
-
], OocResolveActivityEdit.prototype, "dataOoc", void 0);
|
|
196
185
|
__decorate([
|
|
197
186
|
query('textarea'),
|
|
198
187
|
__metadata("design:type", HTMLTextAreaElement)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-ooc-resolve-edit.js","sourceRoot":"","sources":["../../client/activities/activity-ooc-resolve-edit.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,4CAA4C,CAAA;AAEnD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"activity-ooc-resolve-edit.js","sourceRoot":"","sources":["../../client/activities/activity-ooc-resolve-edit.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,4CAA4C,CAAA;AAEnD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGjD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAAlE;;QAiEE,sE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;YACR,CAAC,CAAC,IAAI,CAAA;;+DAEiD,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC;;8BAErE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC;yBAC5D,MAAM,IAAI,EAAE;0BACX,IAAI,CAAC,cAAc;;;WAGlC;YACH,CAAC,CAAC,OAAO;KACZ,CAAA;IACH,CAAC;IAED,cAAc,CAAC,CAAQ;QACrB,IAAI,CAAC,MAAM,KAAK,EAAE,CAAA;QAClB,IAAI,CAAC,MAAM,CAAC,MAAM,GAAI,CAAC,CAAC,MAA8B,CAAC,KAAK,CAAA;QAE5D,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,QAAQ,EAAE;YACxB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CACH,CAAA;IACH,CAAC;;AAnH2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAY;AACX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAAa;AACZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8DAAqB;AA2E7B;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAkB,mBAAmB;8DAAA;AA1InD,sBAAsB;IAD3B,aAAa,CAAC,2BAA2B,CAAC;GACrC,sBAAsB,CAiL3B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/dataset/ox-data-ooc-brief-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { QueryController } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('activity-ooc-resolve-edit')\nclass OocResolveActivityEdit extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n div[content] {\n flex: 1;\n flex-direction: column;\n\n display: flex;\n overflow: auto;\n }\n\n ox-data-ooc-brief-view {\n flex: 1;\n padding: var(--spacing-large);\n overflow: auto;\n }\n\n label[action] {\n display: flex;\n flex-direction: column;\n\n padding: var(--spacing-large);\n }\n\n label[action] h2 {\n display: flex;\n\n color: var(--title-text-color);\n text-transform: capitalize;\n margin: var(--title-margin);\n align-items: center;\n }\n\n md-icon {\n color: var(--status-danger-color);\n }\n\n textarea {\n border: var(--input-field-border);\n border-radius: var(--spacing-small);\n margin: var(--spacing-medium);\n padding: var(--spacing-medium);\n font: var(--input-field-font);\n color: var(--md-sys-color-on-surface);\n background: var(--md-sys-color-surface-variant);\n\n resize: none;\n outline: none;\n min-height: 200px;\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n @property({ type: Object }) activityThread?: any\n\n /* The out-of-control record the activity's input names (ADR-0190). */\n private dataOocQuery = new QueryController(\n this,\n gql`\n query ($id: String!) {\n dataOoc(id: $id) {\n id\n name\n description\n ooc\n oos\n state\n type\n useCase\n data\n judgment\n history\n correctiveAction\n correctiveInstruction\n dataSet {\n id\n name\n monitorType\n monitorView\n }\n dataItems {\n name\n description\n active\n hidden\n tag\n group\n subgroup\n type\n unit\n options\n quota\n spec\n stat\n }\n workDate\n workShift\n reviewer {\n id\n name\n }\n corrector {\n id\n name\n }\n collectedAt\n reviewedAt\n correctedAt\n }\n }\n `,\n { variables: () => (this.input?.dataOocId ? { id: this.input.dataOocId } : undefined) }\n )\n\n /* The record does not hold the corrective action yet - the thread does. */\n get dataOoc(): any {\n const dataOoc = this.dataOocQuery.data?.dataOoc\n const output = this.activityThread?.output\n return dataOoc && output\n ? {\n ...dataOoc,\n correctiveAction: output.action,\n correctedAt: this.activityThread.updatedAt,\n corrector: this.activityThread.assignee\n }\n : dataOoc\n }\n\n @query('textarea') actionTextArea!: HTMLTextAreaElement\n\n render() {\n const action = this.output?.action\n const state = this.activityThread?.state\n const editable = state == 'unassigned' || state == 'assigned' || state == 'started'\n\n return html`\n <div content>\n <ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>\n </div>\n\n <!-- <ox-data-ooc-correction-part .dataOoc=${this.dataOoc}></ox-data-ooc-correction-part> -->\n\n ${editable\n ? html`\n <label action>\n <h2><md-icon>build_circle</md-icon> <span>${i18next.t('label.corrective action')}</span></h2>\n <textarea\n placeholder=${String(i18next.t('text.corrective action placeholder'))}\n .value=${action || ''}\n @change=${this.onChangeAction}\n ></textarea>\n </label>\n `\n : nothing}\n `\n }\n\n onChangeAction(e: Event) {\n this.output ||= {}\n this.output.action = (e.target as HTMLTextAreaElement).value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: this.output\n })\n )\n }\n}\n"]}
|
|
@@ -6,9 +6,8 @@ export declare class OocResolveActivityView extends OocResolveActivityView_base
|
|
|
6
6
|
input?: any;
|
|
7
7
|
output?: any;
|
|
8
8
|
activityApproval?: any;
|
|
9
|
-
|
|
9
|
+
private dataOocQuery;
|
|
10
|
+
get dataOoc(): any;
|
|
10
11
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
|
-
updated(changes: any): void;
|
|
12
|
-
fetchDataOoc(): Promise<void>;
|
|
13
12
|
}
|
|
14
13
|
export {};
|
|
@@ -2,11 +2,68 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import '@operato/dataset/ox-data-ooc-brief-view.js';
|
|
3
3
|
import gql from 'graphql-tag';
|
|
4
4
|
import { css, html, LitElement } from 'lit';
|
|
5
|
-
import { customElement, property
|
|
6
|
-
import {
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
6
|
+
import { QueryController } from '@operato/graphql';
|
|
7
7
|
import { i18next, localize } from '@operato/i18n';
|
|
8
8
|
import { ScrollbarStyles } from '@operato/styles';
|
|
9
9
|
let OocResolveActivityView = class OocResolveActivityView extends localize(i18next)(LitElement) {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
/* The out-of-control record the activity's input names (ADR-0190). */
|
|
13
|
+
this.dataOocQuery = new QueryController(this, gql `
|
|
14
|
+
query ($id: String!) {
|
|
15
|
+
dataOoc(id: $id) {
|
|
16
|
+
id
|
|
17
|
+
name
|
|
18
|
+
description
|
|
19
|
+
ooc
|
|
20
|
+
oos
|
|
21
|
+
state
|
|
22
|
+
type
|
|
23
|
+
useCase
|
|
24
|
+
data
|
|
25
|
+
judgment
|
|
26
|
+
history
|
|
27
|
+
correctiveAction
|
|
28
|
+
correctiveInstruction
|
|
29
|
+
dataSet {
|
|
30
|
+
id
|
|
31
|
+
name
|
|
32
|
+
monitorType
|
|
33
|
+
monitorView
|
|
34
|
+
}
|
|
35
|
+
dataItems {
|
|
36
|
+
name
|
|
37
|
+
description
|
|
38
|
+
active
|
|
39
|
+
hidden
|
|
40
|
+
tag
|
|
41
|
+
group
|
|
42
|
+
subgroup
|
|
43
|
+
type
|
|
44
|
+
unit
|
|
45
|
+
options
|
|
46
|
+
quota
|
|
47
|
+
spec
|
|
48
|
+
stat
|
|
49
|
+
}
|
|
50
|
+
workDate
|
|
51
|
+
workShift
|
|
52
|
+
reviewer {
|
|
53
|
+
id
|
|
54
|
+
name
|
|
55
|
+
}
|
|
56
|
+
corrector {
|
|
57
|
+
id
|
|
58
|
+
name
|
|
59
|
+
}
|
|
60
|
+
collectedAt
|
|
61
|
+
reviewedAt
|
|
62
|
+
correctedAt
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`, { variables: () => (this.input?.dataOocId ? { id: this.input.dataOocId } : undefined) });
|
|
66
|
+
}
|
|
10
67
|
static { this.styles = [
|
|
11
68
|
ScrollbarStyles,
|
|
12
69
|
css `
|
|
@@ -44,6 +101,19 @@ let OocResolveActivityView = class OocResolveActivityView extends localize(i18ne
|
|
|
44
101
|
}
|
|
45
102
|
`
|
|
46
103
|
]; }
|
|
104
|
+
/* Used in an approval, the record does not hold the corrective action yet - the thread being approved does. */
|
|
105
|
+
get dataOoc() {
|
|
106
|
+
const dataOoc = this.dataOocQuery.data?.dataOoc;
|
|
107
|
+
const activityThread = this.activityApproval?.activityThread;
|
|
108
|
+
return dataOoc && activityThread?.output
|
|
109
|
+
? {
|
|
110
|
+
...dataOoc,
|
|
111
|
+
correctiveAction: activityThread.output.action,
|
|
112
|
+
correctedAt: activityThread.updatedAt,
|
|
113
|
+
corrector: activityThread.assignee
|
|
114
|
+
}
|
|
115
|
+
: dataOoc;
|
|
116
|
+
}
|
|
47
117
|
render() {
|
|
48
118
|
return html `
|
|
49
119
|
<div content>
|
|
@@ -51,85 +121,6 @@ let OocResolveActivityView = class OocResolveActivityView extends localize(i18ne
|
|
|
51
121
|
</div>
|
|
52
122
|
`;
|
|
53
123
|
}
|
|
54
|
-
updated(changes) {
|
|
55
|
-
if (changes.has('input')) {
|
|
56
|
-
this.fetchDataOoc();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
async fetchDataOoc() {
|
|
60
|
-
const id = this.input.dataOocId;
|
|
61
|
-
if (id) {
|
|
62
|
-
const response = await client.query({
|
|
63
|
-
query: gql `
|
|
64
|
-
query ($id: String!) {
|
|
65
|
-
dataOoc(id: $id) {
|
|
66
|
-
id
|
|
67
|
-
name
|
|
68
|
-
description
|
|
69
|
-
ooc
|
|
70
|
-
oos
|
|
71
|
-
state
|
|
72
|
-
type
|
|
73
|
-
useCase
|
|
74
|
-
data
|
|
75
|
-
judgment
|
|
76
|
-
history
|
|
77
|
-
correctiveAction
|
|
78
|
-
correctiveInstruction
|
|
79
|
-
dataSet {
|
|
80
|
-
id
|
|
81
|
-
name
|
|
82
|
-
monitorType
|
|
83
|
-
monitorView
|
|
84
|
-
}
|
|
85
|
-
dataItems {
|
|
86
|
-
name
|
|
87
|
-
description
|
|
88
|
-
active
|
|
89
|
-
hidden
|
|
90
|
-
tag
|
|
91
|
-
group
|
|
92
|
-
subgroup
|
|
93
|
-
type
|
|
94
|
-
unit
|
|
95
|
-
options
|
|
96
|
-
quota
|
|
97
|
-
spec
|
|
98
|
-
stat
|
|
99
|
-
}
|
|
100
|
-
workDate
|
|
101
|
-
workShift
|
|
102
|
-
reviewer {
|
|
103
|
-
id
|
|
104
|
-
name
|
|
105
|
-
}
|
|
106
|
-
corrector {
|
|
107
|
-
id
|
|
108
|
-
name
|
|
109
|
-
}
|
|
110
|
-
collectedAt
|
|
111
|
-
reviewedAt
|
|
112
|
-
correctedAt
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
`,
|
|
116
|
-
variables: {
|
|
117
|
-
id
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
const dataOoc = {
|
|
121
|
-
...response.data.dataOoc
|
|
122
|
-
};
|
|
123
|
-
const activityThread = this.activityApproval?.activityThread;
|
|
124
|
-
if (activityThread?.output) {
|
|
125
|
-
/* approval 에서 사용되는 경우 corrective 관련정보를 보완한다. - approval과정에서는 아직 dataOoc.correctiveAction 정보는 채워지지 않았기 때문. */
|
|
126
|
-
dataOoc.correctiveAction = activityThread.output.action;
|
|
127
|
-
dataOoc.correctedAt = activityThread.updatedAt;
|
|
128
|
-
dataOoc.corrector = activityThread.assignee;
|
|
129
|
-
}
|
|
130
|
-
this.dataOoc = dataOoc;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
124
|
};
|
|
134
125
|
__decorate([
|
|
135
126
|
property({ type: Object }),
|
|
@@ -143,10 +134,6 @@ __decorate([
|
|
|
143
134
|
property({ type: Object }),
|
|
144
135
|
__metadata("design:type", Object)
|
|
145
136
|
], OocResolveActivityView.prototype, "activityApproval", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
state(),
|
|
148
|
-
__metadata("design:type", Object)
|
|
149
|
-
], OocResolveActivityView.prototype, "dataOoc", void 0);
|
|
150
137
|
OocResolveActivityView = __decorate([
|
|
151
138
|
customElement('activity-ooc-resolve-view')
|
|
152
139
|
], OocResolveActivityView);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-ooc-resolve-view.js","sourceRoot":"","sources":["../../client/activities/activity-ooc-resolve-view.ts"],"names":[],"mappings":";AAAA,OAAO,4CAA4C,CAAA;AAEnD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,
|
|
1
|
+
{"version":3,"file":"activity-ooc-resolve-view.js","sourceRoot":"","sources":["../../client/activities/activity-ooc-resolve-view.ts"],"names":[],"mappings":";AAAA,OAAO,4CAA4C,CAAA;AAEnD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAG1C,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAAlE;;QA2CL,sEAAsE;QAC9D,iBAAY,GAAG,IAAI,eAAe,CACxC,IAAI,EACJ,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoDF,EACD,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CACxF,CAAA;IAuBH,CAAC;aA1HQ,WAAM,GAAG;QACd,eAAe;QACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiCF;KACF,AApCY,CAoCZ;IAiED,+GAA+G;IAC/G,IAAI,OAAO;QACT,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAA;QAC/C,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAA;QAC5D,OAAO,OAAO,IAAI,cAAc,EAAE,MAAM;YACtC,CAAC,CAAC;gBACE,GAAG,OAAO;gBACV,gBAAgB,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM;gBAC9C,WAAW,EAAE,cAAc,CAAC,SAAS;gBACrC,SAAS,EAAE,cAAc,CAAC,QAAQ;aACnC;YACH,CAAC,CAAC,OAAO,CAAA;IACb,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;;2CAE4B,IAAI,CAAC,OAAO;;KAElD,CAAA;IACH,CAAC;;AAnF2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAY;AACX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAAa;AACZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gEAAuB;AAzCvC,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CA2HlC","sourcesContent":["import '@operato/dataset/ox-data-ooc-brief-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { QueryController } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('activity-ooc-resolve-view')\nexport class OocResolveActivityView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n div[content] {\n flex: 1;\n flex-direction: column;\n\n display: flex;\n overflow: auto;\n }\n\n ox-data-ooc-brief-view {\n flex: 1;\n padding: var(--spacing-large);\n overflow: auto;\n }\n\n @media print {\n :host {\n display: block;\n overflow: visible;\n }\n\n div[content] {\n display: block;\n overflow: visible;\n }\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n @property({ type: Object }) activityApproval?: any\n\n /* The out-of-control record the activity's input names (ADR-0190). */\n private dataOocQuery = new QueryController(\n this,\n gql`\n query ($id: String!) {\n dataOoc(id: $id) {\n id\n name\n description\n ooc\n oos\n state\n type\n useCase\n data\n judgment\n history\n correctiveAction\n correctiveInstruction\n dataSet {\n id\n name\n monitorType\n monitorView\n }\n dataItems {\n name\n description\n active\n hidden\n tag\n group\n subgroup\n type\n unit\n options\n quota\n spec\n stat\n }\n workDate\n workShift\n reviewer {\n id\n name\n }\n corrector {\n id\n name\n }\n collectedAt\n reviewedAt\n correctedAt\n }\n }\n `,\n { variables: () => (this.input?.dataOocId ? { id: this.input.dataOocId } : undefined) }\n )\n\n /* Used in an approval, the record does not hold the corrective action yet - the thread being approved does. */\n get dataOoc(): any {\n const dataOoc = this.dataOocQuery.data?.dataOoc\n const activityThread = this.activityApproval?.activityThread\n return dataOoc && activityThread?.output\n ? {\n ...dataOoc,\n correctiveAction: activityThread.output.action,\n correctedAt: activityThread.updatedAt,\n corrector: activityThread.assignee\n }\n : dataOoc\n }\n\n render() {\n return html`\n <div content>\n <ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>\n </div>\n `\n }\n}\n"]}
|