@operato/dataset 1.0.0-beta.9 → 1.0.0
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 +362 -0
- package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js +1 -1
- package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js.map +1 -1
- package/dist/src/grist-editor/ox-popup-data-item-spec.js +3 -2
- package/dist/src/grist-editor/ox-popup-data-item-spec.js.map +1 -1
- package/dist/src/index.d.ts +1 -5
- package/dist/src/index.js +1 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-data-entry-form.js +24 -4
- package/dist/src/ox-data-entry-form.js.map +1 -1
- package/dist/src/ox-data-item-spec.d.ts +2 -2
- package/dist/src/ox-data-item-spec.js +71 -14
- package/dist/src/ox-data-item-spec.js.map +1 -1
- package/dist/src/ox-data-ooc-view.js +73 -14
- package/dist/src/ox-data-ooc-view.js.map +1 -1
- package/dist/src/ox-data-sample-view.d.ts +1 -3
- package/dist/src/ox-data-sample-view.js +40 -38
- package/dist/src/ox-data-sample-view.js.map +1 -1
- package/dist/src/types.d.ts +25 -6
- package/dist/src/types.js.map +1 -1
- package/dist/src/usecase/ccp/index.d.ts +1 -0
- package/dist/src/usecase/ccp/index.js +8 -0
- package/dist/src/usecase/ccp/index.js.map +1 -0
- package/dist/src/usecase/ccp/ox-data-use-case-ccp.d.ts +7 -0
- package/dist/src/usecase/ccp/ox-data-use-case-ccp.js +102 -0
- package/dist/src/usecase/ccp/ox-data-use-case-ccp.js.map +1 -0
- package/dist/src/usecase/ccp/ox-input-ccp-limits.d.ts +44 -0
- package/dist/src/usecase/ccp/ox-input-ccp-limits.js +171 -0
- package/dist/src/usecase/ccp/ox-input-ccp-limits.js.map +1 -0
- package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.d.ts +5 -0
- package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.js +24 -0
- package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.js.map +1 -0
- package/dist/src/{ox-data-use-case.d.ts → usecase/ox-data-use-case.d.ts} +5 -5
- package/dist/src/{ox-data-use-case.js → usecase/ox-data-use-case.js} +22 -34
- package/dist/src/usecase/ox-data-use-case.js.map +1 -0
- package/dist/src/usecase/qc/index.d.ts +1 -0
- package/dist/src/usecase/qc/index.js +8 -0
- package/dist/src/usecase/qc/index.js.map +1 -0
- package/dist/src/usecase/qc/ox-data-use-case-qc.d.ts +7 -0
- package/dist/src/usecase/qc/ox-data-use-case-qc.js +55 -0
- package/dist/src/usecase/qc/ox-data-use-case-qc.js.map +1 -0
- package/dist/src/usecase/qc/ox-input-qc-limits.d.ts +44 -0
- package/dist/src/usecase/qc/ox-input-qc-limits.js +171 -0
- package/dist/src/usecase/qc/ox-input-qc-limits.js.map +1 -0
- package/dist/src/usecase/qc/ox-property-editor-qc-limits.d.ts +5 -0
- package/dist/src/usecase/qc/ox-property-editor-qc-limits.js +24 -0
- package/dist/src/usecase/qc/ox-property-editor-qc-limits.js.map +1 -0
- package/dist/stories/ox-data-entry-form.stories.d.ts +19 -0
- package/dist/stories/ox-data-entry-form.stories.js +152 -0
- package/dist/stories/ox-data-entry-form.stories.js.map +1 -0
- package/dist/stories/ox-data-item-spec.stories.d.ts +26 -0
- package/dist/stories/ox-data-item-spec.stories.js +102 -0
- package/dist/stories/ox-data-item-spec.stories.js.map +1 -0
- package/dist/stories/ox-data-ooc-view.stories.d.ts +19 -0
- package/dist/stories/ox-data-ooc-view.stories.js +242 -0
- package/dist/stories/ox-data-ooc-view.stories.js.map +1 -0
- package/dist/stories/ox-data-sample-view.stories.d.ts +19 -0
- package/dist/stories/ox-data-sample-view.stories.js +213 -0
- package/dist/stories/ox-data-sample-view.stories.js.map +1 -0
- package/dist/stories/ox-grist-editor-data-item-spec.stories.d.ts +27 -0
- package/dist/stories/ox-grist-editor-data-item-spec.stories.js +389 -0
- package/dist/stories/ox-grist-editor-data-item-spec.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -18
- package/src/grist-editor/ox-grist-editor-data-item-spec.ts +1 -1
- package/src/grist-editor/ox-popup-data-item-spec.ts +3 -2
- package/src/index.ts +1 -5
- package/src/ox-data-entry-form.ts +24 -4
- package/src/ox-data-item-spec.ts +73 -16
- package/src/ox-data-ooc-view.ts +73 -14
- package/src/ox-data-sample-view.ts +43 -39
- package/src/types.ts +31 -6
- package/src/usecase/ccp/index.ts +10 -0
- package/src/usecase/ccp/ox-data-use-case-ccp.ts +147 -0
- package/src/usecase/ccp/ox-input-ccp-limits.ts +161 -0
- package/src/usecase/ccp/ox-property-editor-ccp-limits.ts +23 -0
- package/src/{ox-data-use-case.ts → usecase/ox-data-use-case.ts} +27 -41
- package/src/usecase/qc/index.ts +10 -0
- package/src/usecase/qc/ox-data-use-case-qc.ts +72 -0
- package/src/usecase/qc/ox-input-qc-limits.ts +161 -0
- package/src/usecase/qc/ox-property-editor-qc-limits.ts +23 -0
- package/stories/ox-data-entry-form.stories.ts +165 -0
- package/stories/ox-data-item-spec.stories.ts +121 -0
- package/stories/ox-data-ooc-view.stories.ts +256 -0
- package/stories/ox-data-sample-view.stories.ts +227 -0
- package/stories/ox-grist-editor-data-item-spec.stories.ts +409 -0
- package/translations/en.json +26 -8
- package/translations/ko.json +25 -7
- package/translations/ms.json +26 -8
- package/translations/zh.json +25 -7
- package/demo/index.html +0 -28
- package/demo/ox-data-entry-form.html +0 -118
- package/demo/ox-data-item-spec.html +0 -152
- package/demo/ox-data-ooc-view.html +0 -185
- package/demo/ox-data-sample-view.html +0 -150
- package/demo/ox-grist-editor-data-item-spec.html +0 -476
- package/dist/src/ox-data-use-case.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import './ox-input-qc-limits.js'
|
|
2
|
+
|
|
3
|
+
import { html } from 'lit'
|
|
4
|
+
import { customElement } from 'lit/decorators.js'
|
|
5
|
+
|
|
6
|
+
import { OxPropertyEditor, PropertySpec } from '@operato/property-editor'
|
|
7
|
+
|
|
8
|
+
@customElement('ox-property-editor-qc-limits')
|
|
9
|
+
export class OxPropertyEditorQcLimits extends OxPropertyEditor {
|
|
10
|
+
editorTemplate(value: any, spec: PropertySpec) {
|
|
11
|
+
const { type, options, unit } = spec.property || {}
|
|
12
|
+
|
|
13
|
+
return html`
|
|
14
|
+
<ox-input-qc-limits
|
|
15
|
+
id="editor"
|
|
16
|
+
.value=${value}
|
|
17
|
+
.type=${type}
|
|
18
|
+
.unit=${unit}
|
|
19
|
+
.options=${options}
|
|
20
|
+
></ox-input-qc-limits>
|
|
21
|
+
`
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import '@operato/i18n'
|
|
2
|
+
import '../src/ox-data-entry-form.js'
|
|
3
|
+
import '../src/usecase/ccp' /* register usecase CCP */
|
|
4
|
+
import '@material/mwc-icon'
|
|
5
|
+
|
|
6
|
+
import { html, TemplateResult } from 'lit'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'ox-data-entry-form',
|
|
10
|
+
component: 'ox-data-entry-form',
|
|
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
|
+
useCase: 'CCP',
|
|
26
|
+
dataItems: [
|
|
27
|
+
{
|
|
28
|
+
name: '창고 온도',
|
|
29
|
+
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
30
|
+
sequence: 1,
|
|
31
|
+
tag: 'temp',
|
|
32
|
+
type: 'number',
|
|
33
|
+
quota: 1,
|
|
34
|
+
active: true,
|
|
35
|
+
unit: '℃',
|
|
36
|
+
spec: {
|
|
37
|
+
CCP: {
|
|
38
|
+
criticalLimits: {
|
|
39
|
+
minimum: 100,
|
|
40
|
+
maximum: 200
|
|
41
|
+
},
|
|
42
|
+
targetLimits: {
|
|
43
|
+
minimum: 120,
|
|
44
|
+
maximum: 180
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: '창고 습도',
|
|
51
|
+
description: '창고 습도는 30% 이하로 유지되어야 합니다.',
|
|
52
|
+
sequence: 2,
|
|
53
|
+
tag: 'humid',
|
|
54
|
+
type: 'number',
|
|
55
|
+
quota: 5,
|
|
56
|
+
active: true,
|
|
57
|
+
unit: '%',
|
|
58
|
+
spec: {
|
|
59
|
+
CCP: {
|
|
60
|
+
criticalLimits: {
|
|
61
|
+
minimum: 10,
|
|
62
|
+
maximum: 50
|
|
63
|
+
},
|
|
64
|
+
targetLimits: {
|
|
65
|
+
minimum: 20,
|
|
66
|
+
maximum: 40
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: '육안 검사',
|
|
73
|
+
description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
|
|
74
|
+
sequence: 3,
|
|
75
|
+
tag: 'inspection',
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
quota: 3,
|
|
78
|
+
active: true,
|
|
79
|
+
spec: {
|
|
80
|
+
CCP: {
|
|
81
|
+
criticalLimits: {
|
|
82
|
+
acceptables: true
|
|
83
|
+
},
|
|
84
|
+
targetLimits: {
|
|
85
|
+
acceptables: true
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: '품평',
|
|
92
|
+
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
93
|
+
sequence: 4,
|
|
94
|
+
tag: 'evaluation',
|
|
95
|
+
type: 'select',
|
|
96
|
+
options: {
|
|
97
|
+
options: [
|
|
98
|
+
{ text: '최우수', value: '최우수' },
|
|
99
|
+
{ text: '우수', value: '우수' },
|
|
100
|
+
{ text: '보통', value: '보통' },
|
|
101
|
+
{ text: '미달', value: '미달' }
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
quota: 3,
|
|
105
|
+
active: true,
|
|
106
|
+
spec: {
|
|
107
|
+
CCP: {
|
|
108
|
+
criticalLimits: {
|
|
109
|
+
acceptables: ['최우수', '우수', '보통']
|
|
110
|
+
},
|
|
111
|
+
targetLimits: {
|
|
112
|
+
acceptables: ['최우수', '우수']
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: '코멘트',
|
|
119
|
+
description: '특이사항을 기록함.',
|
|
120
|
+
sequence: 4,
|
|
121
|
+
tag: 'comment',
|
|
122
|
+
type: 'string',
|
|
123
|
+
quota: 1,
|
|
124
|
+
active: true
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: '첨부파일',
|
|
128
|
+
description: '참조 첨부 파일.',
|
|
129
|
+
sequence: 4,
|
|
130
|
+
tag: 'attachment',
|
|
131
|
+
type: 'file',
|
|
132
|
+
quota: 1,
|
|
133
|
+
active: true
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
var value = {
|
|
138
|
+
temp: 1000,
|
|
139
|
+
humid: [20, 23, 21, 26, 27],
|
|
140
|
+
inspection: [true, false, true],
|
|
141
|
+
evaluation: ['최우수', '보통', '우수'],
|
|
142
|
+
comment: '이것이 코멘트입니다.'
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
146
|
+
html`
|
|
147
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
148
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
149
|
+
<style>
|
|
150
|
+
body {
|
|
151
|
+
}
|
|
152
|
+
</style>
|
|
153
|
+
|
|
154
|
+
<ox-data-entry-form
|
|
155
|
+
.dataSet=${dataSet}
|
|
156
|
+
.value=${value}
|
|
157
|
+
@change=${(e: CustomEvent) => {
|
|
158
|
+
value = e.detail
|
|
159
|
+
console.log('change', value)
|
|
160
|
+
}}
|
|
161
|
+
></ox-data-entry-form>
|
|
162
|
+
`
|
|
163
|
+
|
|
164
|
+
export const Regular = Template.bind({})
|
|
165
|
+
Regular.args = {}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import '@operato/i18n'
|
|
2
|
+
import '@material/mwc-icon'
|
|
3
|
+
import '@operato/property-editor/ox-property-editor-checkbox.js'
|
|
4
|
+
import '@operato/property-editor/ox-property-editor-number.js'
|
|
5
|
+
import '@operato/property-editor/ox-property-editor-string.js'
|
|
6
|
+
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
7
|
+
import '../src/ox-data-item-spec.js'
|
|
8
|
+
import '../src/usecase/ccp' /* register usecase CCP */
|
|
9
|
+
import '../src/usecase/qc' /* register usecase QC */
|
|
10
|
+
import '../src/usecase/ccp/ox-property-editor-ccp-limits.js'
|
|
11
|
+
import '../src/usecase/qc/ox-property-editor-qc-limits.js'
|
|
12
|
+
|
|
13
|
+
import { html, TemplateResult } from 'lit'
|
|
14
|
+
|
|
15
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
16
|
+
|
|
17
|
+
OxPropertyEditor.register({
|
|
18
|
+
number: 'ox-property-editor-number',
|
|
19
|
+
string: 'ox-property-editor-string',
|
|
20
|
+
boolean: 'ox-property-editor-checkbox',
|
|
21
|
+
'ccp-limits': 'ox-property-editor-ccp-limits',
|
|
22
|
+
'qc-limits': 'ox-property-editor-qc-limits'
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
title: 'ox-data-item-spec',
|
|
27
|
+
component: 'ox-data-item-spec',
|
|
28
|
+
argTypes: {}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface Story<T> {
|
|
32
|
+
(args: T): TemplateResult
|
|
33
|
+
args?: Partial<T>
|
|
34
|
+
argTypes?: Record<string, unknown>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface ArgTypes {}
|
|
38
|
+
|
|
39
|
+
const dataItemA = {
|
|
40
|
+
name: '창고 온도',
|
|
41
|
+
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
42
|
+
sequence: 1,
|
|
43
|
+
tag: 'temp',
|
|
44
|
+
unit: '℃',
|
|
45
|
+
type: 'number',
|
|
46
|
+
quota: 1
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const dataItemB = {
|
|
50
|
+
name: '품평',
|
|
51
|
+
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
52
|
+
sequence: 4,
|
|
53
|
+
tag: 'evaluation',
|
|
54
|
+
type: 'select',
|
|
55
|
+
options: {
|
|
56
|
+
options: [
|
|
57
|
+
{ text: '최우수', value: '최우수' },
|
|
58
|
+
{ text: '우수', value: '우수' },
|
|
59
|
+
{ text: '보통', value: '보통' },
|
|
60
|
+
{ text: '미달', value: '미달' }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
quota: 3
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const dataItemC = {
|
|
67
|
+
name: '코멘트',
|
|
68
|
+
description: '특이사항을 기록함.',
|
|
69
|
+
sequence: 4,
|
|
70
|
+
tag: 'comment',
|
|
71
|
+
type: 'string',
|
|
72
|
+
quota: 1
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
var specA = {
|
|
76
|
+
CCP: {
|
|
77
|
+
criticalLimits: {
|
|
78
|
+
minimum: 100,
|
|
79
|
+
maximum: 200
|
|
80
|
+
},
|
|
81
|
+
targetLimits: {
|
|
82
|
+
minimum: 120,
|
|
83
|
+
maximum: 180
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
QC: {
|
|
87
|
+
passLimits: {
|
|
88
|
+
minimum: 320,
|
|
89
|
+
maximum: 440
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
var specB = {
|
|
95
|
+
CCP: { accpetables: ['최우수', '우수'] },
|
|
96
|
+
QC: { accpetables: ['최우수', '우수'] }
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
100
|
+
html`
|
|
101
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
102
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
103
|
+
<style>
|
|
104
|
+
body {
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
107
|
+
|
|
108
|
+
<script type="module"></script>
|
|
109
|
+
|
|
110
|
+
<ox-data-item-spec
|
|
111
|
+
.dataItem=${dataItemA}
|
|
112
|
+
.value=${specA}
|
|
113
|
+
@change=${(e: CustomEvent) => {
|
|
114
|
+
specA = e.detail
|
|
115
|
+
console.log('change', specA)
|
|
116
|
+
}}
|
|
117
|
+
></ox-data-item-spec>
|
|
118
|
+
`
|
|
119
|
+
|
|
120
|
+
export const Regular = Template.bind({})
|
|
121
|
+
Regular.args = {}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import '@operato/i18n'
|
|
2
|
+
import '../src/ox-data-ooc-view.js'
|
|
3
|
+
import '../src/usecase/ccp' /* register usecase CCP */
|
|
4
|
+
import '@material/mwc-icon'
|
|
5
|
+
|
|
6
|
+
import { html, TemplateResult } from 'lit'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'ox-data-ooc-view',
|
|
10
|
+
component: 'ox-data-ooc-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
|
+
useCase: 'CCP',
|
|
26
|
+
dataItems: [
|
|
27
|
+
{
|
|
28
|
+
name: '창고 온도',
|
|
29
|
+
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
30
|
+
sequence: 1,
|
|
31
|
+
tag: 'temp',
|
|
32
|
+
type: 'number',
|
|
33
|
+
quota: 1,
|
|
34
|
+
active: true,
|
|
35
|
+
unit: '℃',
|
|
36
|
+
spec: {
|
|
37
|
+
CCP: {
|
|
38
|
+
criticalLimits: {
|
|
39
|
+
minimum: 100,
|
|
40
|
+
maximum: 200
|
|
41
|
+
},
|
|
42
|
+
targetLimits: {
|
|
43
|
+
minimum: 120,
|
|
44
|
+
maximum: 180
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: '창고 습도',
|
|
51
|
+
description: '창고 습도는 30% 이하로 유지되어야 합니다.',
|
|
52
|
+
sequence: 2,
|
|
53
|
+
tag: 'humid',
|
|
54
|
+
type: 'number',
|
|
55
|
+
quota: 5,
|
|
56
|
+
active: true,
|
|
57
|
+
unit: '%',
|
|
58
|
+
spec: {
|
|
59
|
+
CCP: {
|
|
60
|
+
criticalLimits: {
|
|
61
|
+
minimum: 10,
|
|
62
|
+
maximum: 50
|
|
63
|
+
},
|
|
64
|
+
targetLimits: {
|
|
65
|
+
minimum: 20,
|
|
66
|
+
maximum: 40
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: '육안 검사',
|
|
73
|
+
description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
|
|
74
|
+
sequence: 3,
|
|
75
|
+
tag: 'inspection',
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
quota: 3,
|
|
78
|
+
active: true,
|
|
79
|
+
spec: {
|
|
80
|
+
CCP: {
|
|
81
|
+
criticalLimits: {
|
|
82
|
+
acceptables: true
|
|
83
|
+
},
|
|
84
|
+
targetLimits: {
|
|
85
|
+
acceptables: true
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: '품평',
|
|
92
|
+
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
93
|
+
sequence: 4,
|
|
94
|
+
tag: 'evaluation',
|
|
95
|
+
type: 'select',
|
|
96
|
+
options: {
|
|
97
|
+
options: [
|
|
98
|
+
{ text: '최우수', value: '최우수' },
|
|
99
|
+
{ text: '우수', value: '우수' },
|
|
100
|
+
{ text: '보통', value: '보통' },
|
|
101
|
+
{ text: '미달', value: '미달' }
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
quota: 3,
|
|
105
|
+
active: true,
|
|
106
|
+
spec: {
|
|
107
|
+
CCP: {
|
|
108
|
+
criticalLimits: {
|
|
109
|
+
acceptables: ['최우수', '우수', '보통']
|
|
110
|
+
},
|
|
111
|
+
targetLimits: {
|
|
112
|
+
acceptables: ['최우수', '우수']
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: '코멘트',
|
|
119
|
+
description: '특이사항을 기록함.',
|
|
120
|
+
sequence: 4,
|
|
121
|
+
tag: 'comment',
|
|
122
|
+
type: 'string',
|
|
123
|
+
quota: 1,
|
|
124
|
+
active: true
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: '첨부파일',
|
|
128
|
+
description: '참조 첨부 파일.',
|
|
129
|
+
sequence: 4,
|
|
130
|
+
tag: 'attachment',
|
|
131
|
+
type: 'file',
|
|
132
|
+
quota: 1,
|
|
133
|
+
active: true
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
var dataOoc = {
|
|
139
|
+
name: 'Data Sample Name',
|
|
140
|
+
description: 'Data Sample이 어쩌구 저쩌구 그래서 중요합니다. 당연히 그래야죠.',
|
|
141
|
+
useCase: 'CCP',
|
|
142
|
+
data: {
|
|
143
|
+
temp: [1000],
|
|
144
|
+
humid: [20, 23, 21, 26, 27],
|
|
145
|
+
inspection: [true, false, true],
|
|
146
|
+
evaluation: ['최우수', '보통', '우수'],
|
|
147
|
+
comment: '이것은 코멘트입니다.'
|
|
148
|
+
},
|
|
149
|
+
spec: {
|
|
150
|
+
temp: {
|
|
151
|
+
name: '창고 온도',
|
|
152
|
+
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
153
|
+
spec: {
|
|
154
|
+
CCP: {
|
|
155
|
+
criticalLimits: {
|
|
156
|
+
minimum: 100,
|
|
157
|
+
maximum: 200
|
|
158
|
+
},
|
|
159
|
+
targetLimits: {
|
|
160
|
+
minimum: 120,
|
|
161
|
+
maximum: 180
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
humid: {
|
|
167
|
+
name: '창고 습도',
|
|
168
|
+
description: '창고 습도는 30% 이하로 유지되어야 합니다.',
|
|
169
|
+
spec: {
|
|
170
|
+
CCP: {
|
|
171
|
+
criticalLimits: {
|
|
172
|
+
minimum: 10,
|
|
173
|
+
maximum: 50
|
|
174
|
+
},
|
|
175
|
+
targetLimits: {
|
|
176
|
+
minimum: 20,
|
|
177
|
+
maximum: 40
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
inspection: {
|
|
183
|
+
name: '육안 검사',
|
|
184
|
+
description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.'
|
|
185
|
+
},
|
|
186
|
+
evaluation: {
|
|
187
|
+
name: '품평',
|
|
188
|
+
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
189
|
+
spec: {
|
|
190
|
+
CCP: {
|
|
191
|
+
criticalLimits: {
|
|
192
|
+
acceptables: ['최우수', '우수', '보통']
|
|
193
|
+
},
|
|
194
|
+
targetLimits: {
|
|
195
|
+
acceptables: ['최우수', '우수']
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
comment: {
|
|
201
|
+
name: '코멘트',
|
|
202
|
+
description: '특이사항을 기록함.'
|
|
203
|
+
},
|
|
204
|
+
attachment: {
|
|
205
|
+
name: '첨부파일',
|
|
206
|
+
description: '참조 첨부 파일.'
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
collectedAt: Date.now(),
|
|
210
|
+
history: [
|
|
211
|
+
{
|
|
212
|
+
user: {
|
|
213
|
+
id: 0,
|
|
214
|
+
name: 'shnam'
|
|
215
|
+
},
|
|
216
|
+
state: 'CREATED',
|
|
217
|
+
timestamp: Date.now()
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
user: {
|
|
221
|
+
id: 0,
|
|
222
|
+
name: 'shnam'
|
|
223
|
+
},
|
|
224
|
+
state: 'REVIEWED',
|
|
225
|
+
comment: '금일 생산한 제품은 전량 폐기합니다',
|
|
226
|
+
timestamp: Date.now()
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
user: {
|
|
230
|
+
id: 0,
|
|
231
|
+
name: 'shnam'
|
|
232
|
+
},
|
|
233
|
+
state: 'CORRECTED',
|
|
234
|
+
timestamp: Date.now()
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
240
|
+
html`
|
|
241
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
242
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
243
|
+
<style>
|
|
244
|
+
body {
|
|
245
|
+
}
|
|
246
|
+
</style>
|
|
247
|
+
|
|
248
|
+
<ox-data-ooc-view
|
|
249
|
+
.dataSet=${dataSet}
|
|
250
|
+
.dataOoc=${dataOoc}
|
|
251
|
+
@change=${(e: CustomEvent) => console.log(e.detail)}
|
|
252
|
+
></ox-data-ooc-view>
|
|
253
|
+
`
|
|
254
|
+
|
|
255
|
+
export const Regular = Template.bind({})
|
|
256
|
+
Regular.args = {}
|