@operato/dataset 1.5.4 → 1.5.5
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/CHANGELOG.md +9 -0
- package/dist/src/ox-data-ooc-brief-view.js +53 -48
- package/dist/src/ox-data-ooc-brief-view.js.map +1 -1
- package/dist/stories/ox-data-ooc-brief-view.stories.d.ts +19 -0
- package/dist/stories/ox-data-ooc-brief-view.stories.js +254 -0
- package/dist/stories/ox-data-ooc-brief-view.stories.js.map +1 -0
- package/dist/stories/ox-data-ooc-view.stories copy.d.ts +19 -0
- package/dist/stories/ox-data-ooc-view.stories copy.js +243 -0
- package/dist/stories/ox-data-ooc-view.stories copy.js.map +1 -0
- package/dist/stories/ox-data-ooc-view.stories.js +1 -0
- package/dist/stories/ox-data-ooc-view.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/ox-data-ooc-brief-view.ts +52 -48
- package/stories/ox-data-ooc-brief-view.stories.ts +268 -0
- package/stories/ox-data-ooc-view.stories.ts +1 -0
- package/translations/en.json +4 -0
|
@@ -2,7 +2,7 @@ import '@operato/input/ox-input-file.js'
|
|
|
2
2
|
import './ox-data-sample-view'
|
|
3
3
|
import '@material/mwc-icon'
|
|
4
4
|
|
|
5
|
-
import { css, html, LitElement } from 'lit'
|
|
5
|
+
import { css, html, LitElement, nothing } from 'lit'
|
|
6
6
|
import { customElement, property } from 'lit/decorators.js'
|
|
7
7
|
|
|
8
8
|
import { i18next } from '@operato/i18n'
|
|
@@ -36,6 +36,10 @@ export class OxDataOocBriefView extends LitElement {
|
|
|
36
36
|
text-align: center;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
h3[corrective] {
|
|
40
|
+
font-size: 20px;
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
mwc-icon {
|
|
40
44
|
font-size: 16px;
|
|
41
45
|
}
|
|
@@ -69,36 +73,35 @@ export class OxDataOocBriefView extends LitElement {
|
|
|
69
73
|
background-color: var(--status-info-color);
|
|
70
74
|
}
|
|
71
75
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
padding:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
div[instruction] div {
|
|
80
|
-
display: flex;
|
|
76
|
+
[corrective-content] [field-state] {
|
|
77
|
+
border-radius: 2px;
|
|
78
|
+
background-color: var(--primary-color);
|
|
79
|
+
margin-left: var(--margin-default);
|
|
80
|
+
padding: 1px 2px;
|
|
81
|
+
font-size: 0.7rem;
|
|
82
|
+
color: var(--theme-white-color);
|
|
81
83
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
[corrective-content] {
|
|
85
|
+
background-color: var(--theme-white-color);
|
|
86
|
+
box-shadow: var(--box-shadow);
|
|
87
|
+
border-radius: var(--border-radius);
|
|
88
|
+
margin: var(--page-description-margin);
|
|
89
|
+
padding: var(--padding-default);
|
|
90
|
+
font: var(--page-description-font);
|
|
91
|
+
color: var(--secondary-color);
|
|
86
92
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
padding: var(--padding-wide);
|
|
93
|
+
[corrective-content] mwc-icon {
|
|
94
|
+
position: relative;
|
|
95
|
+
top: 3px;
|
|
96
|
+
margin: 0 2px 0 10px;
|
|
93
97
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
display: flex;
|
|
98
|
+
[field-info] {
|
|
99
|
+
opacity: 0.7;
|
|
97
100
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
[corrective-content] strong {
|
|
102
|
+
display: block;
|
|
103
|
+
font-weight: bold;
|
|
104
|
+
font-size: 0.9rem;
|
|
102
105
|
}
|
|
103
106
|
`
|
|
104
107
|
|
|
@@ -125,27 +128,28 @@ export class OxDataOocBriefView extends LitElement {
|
|
|
125
128
|
<div>DATA OOC <span field-state>${state || ''}</span></div>
|
|
126
129
|
</h3>
|
|
127
130
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
131
|
+
${reviewer
|
|
132
|
+
? html`
|
|
133
|
+
<h3 corrective>${i18next.t('label.corrective instruction')}</h3>
|
|
134
|
+
<p corrective-content>
|
|
135
|
+
<span field-info
|
|
136
|
+
>${formatter.format(new Date(reviewedAt!))} <mwc-icon>account_circle</mwc-icon>${reviewer.name}</span
|
|
137
|
+
>
|
|
138
|
+
<strong>${correctiveInstruction}</strong>
|
|
139
|
+
</p>
|
|
140
|
+
`
|
|
141
|
+
: nothing}
|
|
142
|
+
${corrector
|
|
143
|
+
? html`
|
|
144
|
+
<h3 corrective>${i18next.t('label.corrective action')}</h3>
|
|
145
|
+
<p corrective-content>
|
|
146
|
+
<span field-info
|
|
147
|
+
>${formatter.format(new Date(correctedAt!))} <mwc-icon>account_circle</mwc-icon>${corrector.name}</span
|
|
148
|
+
>
|
|
149
|
+
<strong>${correctiveAction}</strong>
|
|
150
|
+
</p>
|
|
151
|
+
`
|
|
152
|
+
: nothing}
|
|
149
153
|
`
|
|
150
154
|
}
|
|
151
155
|
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import '@operato/i18n'
|
|
2
|
+
import '../src/ox-data-ooc-brief-view.js'
|
|
3
|
+
import '../src/usecase/ccp/index.js' /* register usecase CCP */
|
|
4
|
+
import '@material/mwc-icon'
|
|
5
|
+
|
|
6
|
+
import { html, TemplateResult } from 'lit'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'ox-data-ooc-brief-view',
|
|
10
|
+
component: 'ox-data-ooc-brief-view',
|
|
11
|
+
argTypes: {}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface Story<T> {
|
|
15
|
+
(args: T): TemplateResult
|
|
16
|
+
args?: Partial<T>
|
|
17
|
+
argTypes?: Record<string, unknown>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface ArgTypes {}
|
|
21
|
+
|
|
22
|
+
const dataSet = {
|
|
23
|
+
name: 'sample',
|
|
24
|
+
description: 'sample description',
|
|
25
|
+
type: 'manual',
|
|
26
|
+
useCase: 'CCP',
|
|
27
|
+
dataItems: [
|
|
28
|
+
{
|
|
29
|
+
name: '창고 온도',
|
|
30
|
+
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
31
|
+
sequence: 1,
|
|
32
|
+
tag: 'temp',
|
|
33
|
+
type: 'number',
|
|
34
|
+
quota: 1,
|
|
35
|
+
active: true,
|
|
36
|
+
unit: '℃',
|
|
37
|
+
spec: {
|
|
38
|
+
CCP: {
|
|
39
|
+
criticalLimits: {
|
|
40
|
+
minimum: 100,
|
|
41
|
+
maximum: 200
|
|
42
|
+
},
|
|
43
|
+
targetLimits: {
|
|
44
|
+
minimum: 120,
|
|
45
|
+
maximum: 180
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: '창고 습도',
|
|
52
|
+
description: '창고 습도는 30% 이하로 유지되어야 합니다.',
|
|
53
|
+
sequence: 2,
|
|
54
|
+
tag: 'humid',
|
|
55
|
+
type: 'number',
|
|
56
|
+
quota: 5,
|
|
57
|
+
active: true,
|
|
58
|
+
unit: '%',
|
|
59
|
+
spec: {
|
|
60
|
+
CCP: {
|
|
61
|
+
criticalLimits: {
|
|
62
|
+
minimum: 10,
|
|
63
|
+
maximum: 50
|
|
64
|
+
},
|
|
65
|
+
targetLimits: {
|
|
66
|
+
minimum: 20,
|
|
67
|
+
maximum: 40
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: '육안 검사',
|
|
74
|
+
description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
|
|
75
|
+
sequence: 3,
|
|
76
|
+
tag: 'inspection',
|
|
77
|
+
type: 'boolean',
|
|
78
|
+
quota: 3,
|
|
79
|
+
active: true,
|
|
80
|
+
spec: {
|
|
81
|
+
CCP: {
|
|
82
|
+
criticalLimits: {
|
|
83
|
+
acceptables: true
|
|
84
|
+
},
|
|
85
|
+
targetLimits: {
|
|
86
|
+
acceptables: true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: '품평',
|
|
93
|
+
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
94
|
+
sequence: 4,
|
|
95
|
+
tag: 'evaluation',
|
|
96
|
+
type: 'select',
|
|
97
|
+
options: {
|
|
98
|
+
options: [
|
|
99
|
+
{ text: '최우수', value: '최우수' },
|
|
100
|
+
{ text: '우수', value: '우수' },
|
|
101
|
+
{ text: '보통', value: '보통' },
|
|
102
|
+
{ text: '미달', value: '미달' }
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
quota: 3,
|
|
106
|
+
active: true,
|
|
107
|
+
spec: {
|
|
108
|
+
CCP: {
|
|
109
|
+
criticalLimits: {
|
|
110
|
+
acceptables: ['최우수', '우수', '보통']
|
|
111
|
+
},
|
|
112
|
+
targetLimits: {
|
|
113
|
+
acceptables: ['최우수', '우수']
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: '코멘트',
|
|
120
|
+
description: '특이사항을 기록함.',
|
|
121
|
+
sequence: 4,
|
|
122
|
+
tag: 'comment',
|
|
123
|
+
type: 'string',
|
|
124
|
+
quota: 1,
|
|
125
|
+
active: true
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: '첨부파일',
|
|
129
|
+
description: '참조 첨부 파일.',
|
|
130
|
+
sequence: 4,
|
|
131
|
+
tag: 'attachment',
|
|
132
|
+
type: 'file',
|
|
133
|
+
quota: 1,
|
|
134
|
+
active: true
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
var dataOoc = {
|
|
140
|
+
name: 'Data Sample Name',
|
|
141
|
+
description: 'Data Sample이 어쩌구 저쩌구 그래서 중요합니다. 당연히 그래야죠.',
|
|
142
|
+
state: 'CORRECTED',
|
|
143
|
+
useCase: 'CCP',
|
|
144
|
+
data: {
|
|
145
|
+
temp: [1000],
|
|
146
|
+
humid: [20, 23, 21, 26, 27],
|
|
147
|
+
inspection: [true, false, true],
|
|
148
|
+
evaluation: ['최우수', '보통', '우수'],
|
|
149
|
+
comment: '이것은 코멘트입니다.'
|
|
150
|
+
},
|
|
151
|
+
spec: {
|
|
152
|
+
temp: {
|
|
153
|
+
name: '창고 온도',
|
|
154
|
+
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
155
|
+
spec: {
|
|
156
|
+
CCP: {
|
|
157
|
+
criticalLimits: {
|
|
158
|
+
minimum: 100,
|
|
159
|
+
maximum: 200
|
|
160
|
+
},
|
|
161
|
+
targetLimits: {
|
|
162
|
+
minimum: 120,
|
|
163
|
+
maximum: 180
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
humid: {
|
|
169
|
+
name: '창고 습도',
|
|
170
|
+
description: '창고 습도는 30% 이하로 유지되어야 합니다.',
|
|
171
|
+
spec: {
|
|
172
|
+
CCP: {
|
|
173
|
+
criticalLimits: {
|
|
174
|
+
minimum: 10,
|
|
175
|
+
maximum: 50
|
|
176
|
+
},
|
|
177
|
+
targetLimits: {
|
|
178
|
+
minimum: 20,
|
|
179
|
+
maximum: 40
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
inspection: {
|
|
185
|
+
name: '육안 검사',
|
|
186
|
+
description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.'
|
|
187
|
+
},
|
|
188
|
+
evaluation: {
|
|
189
|
+
name: '품평',
|
|
190
|
+
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
191
|
+
spec: {
|
|
192
|
+
CCP: {
|
|
193
|
+
criticalLimits: {
|
|
194
|
+
acceptables: ['최우수', '우수', '보통']
|
|
195
|
+
},
|
|
196
|
+
targetLimits: {
|
|
197
|
+
acceptables: ['최우수', '우수']
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
comment: {
|
|
203
|
+
name: '코멘트',
|
|
204
|
+
description: '특이사항을 기록함.'
|
|
205
|
+
},
|
|
206
|
+
attachment: {
|
|
207
|
+
name: '첨부파일',
|
|
208
|
+
description: '참조 첨부 파일.'
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
collectedAt: Date.now(),
|
|
212
|
+
reviewer: {
|
|
213
|
+
name: '남상혁'
|
|
214
|
+
},
|
|
215
|
+
reviewedAt: Date.now(),
|
|
216
|
+
correctiveInstruction: '바지틀고서 만나오리오. 쿠투추파',
|
|
217
|
+
corrector: {
|
|
218
|
+
name: '남상혁'
|
|
219
|
+
},
|
|
220
|
+
correctedAt: Date.now(),
|
|
221
|
+
correctiveAction: '바지틀고서 만나오리오. 쿠투추파',
|
|
222
|
+
history: [
|
|
223
|
+
{
|
|
224
|
+
user: {
|
|
225
|
+
id: 0,
|
|
226
|
+
name: 'shnam'
|
|
227
|
+
},
|
|
228
|
+
state: 'ISSUED',
|
|
229
|
+
timestamp: Date.now()
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
user: {
|
|
233
|
+
id: 0,
|
|
234
|
+
name: 'shnam'
|
|
235
|
+
},
|
|
236
|
+
state: 'REVIEWED',
|
|
237
|
+
comment: '금일 생산한 제품은 전량 폐기합니다',
|
|
238
|
+
timestamp: Date.now()
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
user: {
|
|
242
|
+
id: 0,
|
|
243
|
+
name: 'shnam'
|
|
244
|
+
},
|
|
245
|
+
state: 'CORRECTED',
|
|
246
|
+
timestamp: Date.now()
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
252
|
+
html`
|
|
253
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
254
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
255
|
+
<style>
|
|
256
|
+
body {
|
|
257
|
+
}
|
|
258
|
+
</style>
|
|
259
|
+
|
|
260
|
+
<ox-data-ooc-brief-view
|
|
261
|
+
.dataSet=${dataSet}
|
|
262
|
+
.dataOoc=${dataOoc}
|
|
263
|
+
@change=${(e: CustomEvent) => console.log(e.detail)}
|
|
264
|
+
></ox-data-ooc-brief-view>
|
|
265
|
+
`
|
|
266
|
+
|
|
267
|
+
export const Regular = Template.bind({})
|
|
268
|
+
Regular.args = {}
|
package/translations/en.json
CHANGED
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
"field.work-date": "work date",
|
|
44
44
|
"field.work-shift": "work shift",
|
|
45
45
|
"label.acceptables": "acceptables",
|
|
46
|
+
"label.corrective action": "corrective action",
|
|
47
|
+
"label.corrective instruction": "corrective instruction",
|
|
46
48
|
"label.critical-limits": "critical limits",
|
|
47
49
|
"label.maximum value": "maximum value",
|
|
48
50
|
"label.minimum value": "minimum value",
|
|
@@ -59,6 +61,8 @@
|
|
|
59
61
|
"text.observation": "observation",
|
|
60
62
|
"text.operating limit": "operating limit",
|
|
61
63
|
"text.target limit": "target limit",
|
|
64
|
+
"title.corrective action": "corrective action",
|
|
65
|
+
"title.corrective instruction": "corrective instruction",
|
|
62
66
|
"title.data-entry list": "data entry list",
|
|
63
67
|
"title.data-entry-form": "data entry form",
|
|
64
68
|
"title.data-item list": "data item list",
|