@operato/dataset 1.13.13 → 1.13.15
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 +18 -0
- package/dist/src/ox-data-ooc-badge.d.ts +9 -0
- package/dist/src/ox-data-ooc-badge.js +66 -0
- package/dist/src/ox-data-ooc-badge.js.map +1 -0
- package/dist/src/ox-data-ooc-brief-view.d.ts +2 -0
- package/dist/src/ox-data-ooc-brief-view.js +8 -109
- package/dist/src/ox-data-ooc-brief-view.js.map +1 -1
- package/dist/src/ox-data-ooc-correction-part.d.ts +9 -0
- package/dist/src/ox-data-ooc-correction-part.js +100 -0
- package/dist/src/ox-data-ooc-correction-part.js.map +1 -0
- package/dist/src/ox-data-ooc-history.d.ts +10 -0
- package/dist/src/ox-data-ooc-history.js +72 -0
- package/dist/src/ox-data-ooc-history.js.map +1 -0
- package/dist/src/ox-data-ooc-view.d.ts +1 -0
- package/dist/src/ox-data-ooc-view.js +6 -88
- package/dist/src/ox-data-ooc-view.js.map +1 -1
- package/dist/src/types.d.ts +45 -0
- package/dist/src/types.js.map +1 -1
- package/dist/stories/ox-data-ooc-view.stories.js +2 -0
- package/dist/stories/ox-data-ooc-view.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -6
- package/src/ox-data-ooc-badge.ts +64 -0
- package/src/ox-data-ooc-brief-view.ts +9 -119
- package/src/ox-data-ooc-correction-part.ts +108 -0
- package/src/ox-data-ooc-history.ts +74 -0
- package/src/ox-data-ooc-view.ts +6 -90
- package/src/types.ts +47 -0
- package/stories/ox-data-ooc-view.stories.ts +2 -0
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +142 -70
- package/translations/zh.json +146 -75
package/dist/src/types.d.ts
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a selectable option with a text label and a value.
|
|
3
|
+
*/
|
|
1
4
|
export type SelectOption = {
|
|
2
5
|
text: string;
|
|
3
6
|
value: string;
|
|
4
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* An array of selectable options.
|
|
10
|
+
*/
|
|
5
11
|
export type SelectOptions = SelectOption[];
|
|
12
|
+
/**
|
|
13
|
+
* Defines the options and additional properties for a type.
|
|
14
|
+
*/
|
|
6
15
|
export type TypeOptions = {
|
|
7
16
|
options?: SelectOptions;
|
|
8
17
|
[prop: string]: any;
|
|
9
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* Describes the structure and properties of a data item.
|
|
21
|
+
*/
|
|
10
22
|
export type DataItem = {
|
|
11
23
|
name: string;
|
|
12
24
|
description: string;
|
|
@@ -26,6 +38,9 @@ export type DataItem = {
|
|
|
26
38
|
};
|
|
27
39
|
};
|
|
28
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* Defines the structure of a dataset, including its name, description, type, use case, and data items.
|
|
43
|
+
*/
|
|
29
44
|
export type DataSet = {
|
|
30
45
|
name: string;
|
|
31
46
|
description: string;
|
|
@@ -39,6 +54,9 @@ export type DataSet = {
|
|
|
39
54
|
};
|
|
40
55
|
};
|
|
41
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Describes the definition of a data specification, including its type, label, name, and optional properties.
|
|
59
|
+
*/
|
|
42
60
|
export type DataSpecDefinition = {
|
|
43
61
|
type: string;
|
|
44
62
|
label: string;
|
|
@@ -47,27 +65,45 @@ export type DataSpecDefinition = {
|
|
|
47
65
|
[option: string]: any;
|
|
48
66
|
};
|
|
49
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* Describes a use case definition, including its name, description, help text, and specifications.
|
|
70
|
+
*/
|
|
50
71
|
export type UseCaseDefinition = {
|
|
51
72
|
name: string;
|
|
52
73
|
description: string;
|
|
53
74
|
help: string;
|
|
54
75
|
specs: DataSpecDefinition[];
|
|
55
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Represents the limits for a data specification.
|
|
79
|
+
*/
|
|
56
80
|
export type DataSpecLimit = {
|
|
57
81
|
[limit: string]: number | string | string[] | boolean;
|
|
58
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* A set of data specification limits, keyed by use case.
|
|
85
|
+
*/
|
|
59
86
|
export type DataSpecLimitSet = {
|
|
60
87
|
[useCase: string]: DataSpecLimit;
|
|
61
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* Represents a collection of data, keyed by a tag.
|
|
91
|
+
*/
|
|
62
92
|
export type DataCollection = {
|
|
63
93
|
[tag: string]: any;
|
|
64
94
|
};
|
|
95
|
+
/**
|
|
96
|
+
* Represents a judgment on data, indicating if it is out of control or out of specification.
|
|
97
|
+
*/
|
|
65
98
|
export type Judgment = {
|
|
66
99
|
[tag: string]: {
|
|
67
100
|
ooc: boolean;
|
|
68
101
|
oos: boolean;
|
|
69
102
|
};
|
|
70
103
|
};
|
|
104
|
+
/**
|
|
105
|
+
* Describes a data sample, including its name, description, use case, and associated data and judgments.
|
|
106
|
+
*/
|
|
71
107
|
export type DataSample = {
|
|
72
108
|
name: string;
|
|
73
109
|
description: string;
|
|
@@ -81,6 +117,9 @@ export type DataSample = {
|
|
|
81
117
|
collectedAt: Date;
|
|
82
118
|
};
|
|
83
119
|
export type DataOocState = 'ISSUED' | 'REVIEWED' | 'CORRECTED';
|
|
120
|
+
/**
|
|
121
|
+
* Extends DataSample with additional fields specific to an out of control state, including state, corrective actions, and review history.
|
|
122
|
+
*/
|
|
84
123
|
export type DataOoc = DataSample & {
|
|
85
124
|
state: DataOocState;
|
|
86
125
|
correctiveInstruction?: string;
|
|
@@ -105,6 +144,9 @@ export type DataOoc = DataSample & {
|
|
|
105
144
|
timestamp: number;
|
|
106
145
|
}[];
|
|
107
146
|
};
|
|
147
|
+
/**
|
|
148
|
+
* Describes a summary of data, including its name, description, relevant data items, and key metrics.
|
|
149
|
+
*/
|
|
108
150
|
export type DataSummary = {
|
|
109
151
|
name: string;
|
|
110
152
|
description: string;
|
|
@@ -124,6 +166,9 @@ export type DataSummary = {
|
|
|
124
166
|
[key: string]: any;
|
|
125
167
|
};
|
|
126
168
|
};
|
|
169
|
+
/**
|
|
170
|
+
* Represents the result of an evaluation, indicating if data is out of specification or out of control.
|
|
171
|
+
*/
|
|
127
172
|
export type EvaluationResult = {
|
|
128
173
|
oos: boolean;
|
|
129
174
|
ooc: boolean;
|
package/dist/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents a selectable option with a text label and a value.\n */\nexport type SelectOption = { text: string; value: string }\n\n/**\n * An array of selectable options.\n */\nexport type SelectOptions = SelectOption[]\n\n/**\n * Defines the options and additional properties for a type.\n */\nexport type TypeOptions = {\n options?: SelectOptions\n [prop: string]: any\n}\n\n/**\n * Describes the structure and properties of a data item.\n */\nexport type DataItem = {\n name: string\n description: string\n sequence: number\n tag: string\n group: string\n type: string\n stat: string\n active: boolean\n options: TypeOptions\n unit: string\n quota: number\n hidden: boolean\n spec: {\n [useCase: string]: {\n [limit: string]: number | string | string[] | boolean\n }\n }\n}\n\n/**\n * Defines the structure of a dataset, including its name, description, type, use case, and data items.\n */\nexport type DataSet = {\n name: string\n description: string\n type: 'manual' | 'automatic'\n useCase: string\n active: boolean\n dataItems: DataItem[]\n spec: { [dataItem: string]: { [useCase: string]: any } }\n}\n\n/**\n * Describes the definition of a data specification, including its type, label, name, and optional properties.\n */\nexport type DataSpecDefinition = {\n type: string\n label: string\n name: string\n property?: { [option: string]: any }\n}\n\n/**\n * Describes a use case definition, including its name, description, help text, and specifications.\n */\nexport type UseCaseDefinition = {\n name: string\n description: string\n help: string\n specs: DataSpecDefinition[]\n}\n\n/**\n * Represents the limits for a data specification.\n */\nexport type DataSpecLimit = {\n [limit: string]: number | string | string[] | boolean\n}\n\n/**\n * A set of data specification limits, keyed by use case.\n */\nexport type DataSpecLimitSet = {\n [useCase: string]: DataSpecLimit\n}\n\n/**\n * Represents a collection of data, keyed by a tag.\n */\nexport type DataCollection = {\n [tag: string]: any\n}\n\n/**\n * Represents a judgment on data, indicating if it is out of control or out of specification.\n */\nexport type Judgment = {\n [tag: string]: {\n ooc: boolean\n oos: boolean\n }\n}\n\n/**\n * Describes a data sample, including its name, description, use case, and associated data and judgments.\n */\nexport type DataSample = {\n name: string\n description: string\n useCase: string\n data?: DataCollection\n judgment?: Judgment\n dataItems?: DataItem[]\n quota: number\n workDate: string\n workShift: string\n collectedAt: Date\n}\n\nexport type DataOocState = 'ISSUED' | 'REVIEWED' | 'CORRECTED'\n\n/**\n * Extends DataSample with additional fields specific to an out of control state, including state, corrective actions, and review history.\n */\nexport type DataOoc = DataSample & {\n state: DataOocState\n correctiveInstruction?: string\n correctiveAction?: string\n reviewer?: {\n id: string\n name: string\n }\n reviewedAt?: Date\n corrector?: {\n id: string\n name: string\n }\n correctedAt?: Date\n history: {\n user: {\n id: string\n name: string\n }\n state: DataOocState\n comment: string\n timestamp: number\n }[]\n}\n\n/**\n * Describes a summary of data, including its name, description, relevant data items, and key metrics.\n */\nexport type DataSummary = {\n name: string\n description: string\n dataItems?: DataItem[]\n date?: string\n period?: string\n key01?: string\n key02?: string\n key03?: string\n key04?: string\n key05?: string\n count?: number\n countOoc?: number\n countOos?: number\n useCase?: string\n summary?: { [key: string]: any }\n}\n\n/**\n * Represents the result of an evaluation, indicating if data is out of specification or out of control.\n */\nexport type EvaluationResult = { oos: boolean; ooc: boolean }\n"]}
|
|
@@ -132,6 +132,7 @@ var dataOoc = {
|
|
|
132
132
|
name: 'Data Sample Name',
|
|
133
133
|
description: 'Data Sample이 어쩌구 저쩌구 그래서 중요합니다. 당연히 그래야죠.',
|
|
134
134
|
useCase: 'CCP',
|
|
135
|
+
state: 'REVIEWED',
|
|
135
136
|
judgment: {
|
|
136
137
|
temp: {
|
|
137
138
|
ooc: true,
|
|
@@ -235,6 +236,7 @@ var dataOoc = {
|
|
|
235
236
|
name: 'shnam'
|
|
236
237
|
},
|
|
237
238
|
state: 'CORRECTED',
|
|
239
|
+
comment: '전량 폐기하였습니다',
|
|
238
240
|
timestamp: Date.now()
|
|
239
241
|
}
|
|
240
242
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-data-ooc-view.stories.js","sourceRoot":"","sources":["../../stories/ox-data-ooc-view.stories.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAA;AACtB,OAAO,4BAA4B,CAAA;AACnC,OAAO,oBAAoB,CAAA,CAAC,0BAA0B;AACtD,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,kBAAkB;IAC7B,QAAQ,EAAE,EAAE;CACb,CAAA;AAUD,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,oBAAoB;IACjC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,KAAK;IACd,SAAS,EAAE;QACT;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,CAAC;YACX,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,GAAG;YACT,IAAI,EAAE;gBACJ,GAAG,EAAE;oBACH,cAAc,EAAE;wBACd,OAAO,EAAE,GAAG;wBACZ,OAAO,EAAE,GAAG;qBACb;oBACD,YAAY,EAAE;wBACZ,OAAO,EAAE,GAAG;wBACZ,OAAO,EAAE,GAAG;qBACb;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE,CAAC;YACX,GAA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,OAAO,EAAE,qBAAqB;YAC9B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB;QACD;YACE,IAAI,EAAE;gBACJ,EAAE,EAAE,CAAC;gBACL,IAAI,EAAE,OAAO;aACd;YACD,KAAK,EAAE,WAAW;YAClB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB;KACF;CACF,CAAA;AAED,MAAM,QAAQ,GAAoB,CAAC,EAAY,EAAE,EAAE,CACjD,IAAI,CAAA;;;;;;;;;iBASW,OAAO;iBACP,OAAO;gBACR,CAAC,CAAc,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;;GAEtD,CAAA;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@operato/i18n'\nimport '../src/ox-data-ooc-view.js'\nimport '../src/usecase/ccp' /* register usecase CCP */\nimport '@material/mwc-icon'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-data-ooc-view',\n component: 'ox-data-ooc-view',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst dataSet = {\n name: 'sample',\n description: 'sample description',\n type: 'manual',\n useCase: 'CCP',\n dataItems: [\n {\n name: '창고 온도',\n description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',\n sequence: 1,\n tag: 'temp',\n group: '측정데이타',\n type: 'number',\n quota: 1,\n active: true,\n unit: '℃',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 100,\n maximum: 200\n },\n targetLimits: {\n minimum: 120,\n maximum: 180\n }\n }\n }\n },\n {\n name: '창고 습도',\n description: '창고 습도는 30% 이하로 유지되어야 합니다.',\n sequence: 2,\n tag: 'humid',\n group: '측정데이타',\n type: 'number',\n quota: 5,\n active: true,\n unit: '%',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 10,\n maximum: 50\n },\n targetLimits: {\n minimum: 20,\n maximum: 40\n }\n }\n }\n },\n {\n name: '육안 검사',\n description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',\n sequence: 3,\n tag: 'inspection',\n group: '측정데이타',\n type: 'boolean',\n quota: 3,\n active: true,\n spec: {\n CCP: {\n criticalLimits: {\n acceptables: true\n },\n targetLimits: {\n acceptables: true\n }\n }\n }\n },\n {\n name: '품평',\n description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',\n sequence: 4,\n tag: 'evaluation',\n group: '측정데이타',\n type: 'select',\n options: {\n options: [\n { text: '최우수', value: '최우수' },\n { text: '우수', value: '우수' },\n { text: '보통', value: '보통' },\n { text: '미달', value: '미달' }\n ]\n },\n quota: 3,\n active: true,\n spec: {\n CCP: {\n criticalLimits: {\n acceptables: ['최우수', '우수', '보통']\n },\n targetLimits: {\n acceptables: ['최우수', '우수']\n }\n }\n }\n },\n {\n name: '코멘트',\n description: '특이사항을 기록함.',\n sequence: 4,\n tag: 'comment',\n type: 'string',\n quota: 1,\n active: true\n },\n {\n name: '첨부파일',\n description: '참조 첨부 파일.',\n sequence: 4,\n tag: 'attachment',\n type: 'file',\n quota: 1,\n active: true\n }\n ]\n}\n\nvar dataOoc = {\n name: 'Data Sample Name',\n description: 'Data Sample이 어쩌구 저쩌구 그래서 중요합니다. 당연히 그래야죠.',\n useCase: 'CCP',\n judgment: {\n temp: {\n ooc: true,\n oos: false\n },\n humid: {\n ooc: false,\n oos: true\n }\n },\n data: {\n temp: [1000],\n humid: [20, 23, 21, 26, 27],\n inspection: [true, false, true],\n evaluation: ['최우수', '보통', '우수'],\n comment: '이것은 코멘트입니다.'\n },\n dataItems: dataSet.dataItems,\n spec: {\n temp: {\n name: '창고 온도',\n description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 100,\n maximum: 200\n },\n targetLimits: {\n minimum: 120,\n maximum: 180\n }\n }\n }\n },\n humid: {\n name: '창고 습도',\n description: '창고 습도는 30% 이하로 유지되어야 합니다.',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 10,\n maximum: 50\n },\n targetLimits: {\n minimum: 20,\n maximum: 40\n }\n }\n }\n },\n inspection: {\n name: '육안 검사',\n description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.'\n },\n evaluation: {\n name: '품평',\n description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',\n spec: {\n CCP: {\n criticalLimits: {\n acceptables: ['최우수', '우수', '보통']\n },\n targetLimits: {\n acceptables: ['최우수', '우수']\n }\n }\n }\n },\n comment: {\n name: '코멘트',\n description: '특이사항을 기록함.'\n },\n attachment: {\n name: '첨부파일',\n description: '참조 첨부 파일.'\n }\n },\n collectedAt: Date.now(),\n history: [\n {\n user: {\n id: 0,\n name: 'shnam'\n },\n state: 'ISSUED',\n timestamp: Date.now()\n },\n {\n user: {\n id: 0,\n name: 'shnam'\n },\n state: 'REVIEWED',\n comment: '금일 생산한 제품은 전량 폐기합니다',\n timestamp: Date.now()\n },\n {\n user: {\n id: 0,\n name: 'shnam'\n },\n state: 'CORRECTED',\n timestamp: Date.now()\n }\n ]\n}\n\nconst Template: Story<ArgTypes> = ({}: ArgTypes) =>\n html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\n <ox-data-ooc-view\n .dataSet=${dataSet}\n .dataOoc=${dataOoc}\n @change=${(e: CustomEvent) => console.log(e.detail)}\n ></ox-data-ooc-view>\n `\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}
|
|
1
|
+
{"version":3,"file":"ox-data-ooc-view.stories.js","sourceRoot":"","sources":["../../stories/ox-data-ooc-view.stories.ts"],"names":[],"mappings":"AAAA,OAAO,eAA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jD,IAAI,CAAA;;;;;;;;;iBASW,OAAO;iBACP,OAAO;gBACR,CAAC,CAAc,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;;GAEtD,CAAA;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@operato/i18n'\nimport '../src/ox-data-ooc-view.js'\nimport '../src/usecase/ccp' /* register usecase CCP */\nimport '@material/mwc-icon'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-data-ooc-view',\n component: 'ox-data-ooc-view',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst dataSet = {\n name: 'sample',\n description: 'sample description',\n type: 'manual',\n useCase: 'CCP',\n dataItems: [\n {\n name: '창고 온도',\n description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',\n sequence: 1,\n tag: 'temp',\n group: '측정데이타',\n type: 'number',\n quota: 1,\n active: true,\n unit: '℃',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 100,\n maximum: 200\n },\n targetLimits: {\n minimum: 120,\n maximum: 180\n }\n }\n }\n },\n {\n name: '창고 습도',\n description: '창고 습도는 30% 이하로 유지되어야 합니다.',\n sequence: 2,\n tag: 'humid',\n group: '측정데이타',\n type: 'number',\n quota: 5,\n active: true,\n unit: '%',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 10,\n maximum: 50\n },\n targetLimits: {\n minimum: 20,\n maximum: 40\n }\n }\n }\n },\n {\n name: '육안 검사',\n description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',\n sequence: 3,\n tag: 'inspection',\n group: '측정데이타',\n type: 'boolean',\n quota: 3,\n active: true,\n spec: {\n CCP: {\n criticalLimits: {\n acceptables: true\n },\n targetLimits: {\n acceptables: true\n }\n }\n }\n },\n {\n name: '품평',\n description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',\n sequence: 4,\n tag: 'evaluation',\n group: '측정데이타',\n type: 'select',\n options: {\n options: [\n { text: '최우수', value: '최우수' },\n { text: '우수', value: '우수' },\n { text: '보통', value: '보통' },\n { text: '미달', value: '미달' }\n ]\n },\n quota: 3,\n active: true,\n spec: {\n CCP: {\n criticalLimits: {\n acceptables: ['최우수', '우수', '보통']\n },\n targetLimits: {\n acceptables: ['최우수', '우수']\n }\n }\n }\n },\n {\n name: '코멘트',\n description: '특이사항을 기록함.',\n sequence: 4,\n tag: 'comment',\n type: 'string',\n quota: 1,\n active: true\n },\n {\n name: '첨부파일',\n description: '참조 첨부 파일.',\n sequence: 4,\n tag: 'attachment',\n type: 'file',\n quota: 1,\n active: true\n }\n ]\n}\n\nvar dataOoc = {\n name: 'Data Sample Name',\n description: 'Data Sample이 어쩌구 저쩌구 그래서 중요합니다. 당연히 그래야죠.',\n useCase: 'CCP',\n state: 'REVIEWED',\n judgment: {\n temp: {\n ooc: true,\n oos: false\n },\n humid: {\n ooc: false,\n oos: true\n }\n },\n data: {\n temp: [1000],\n humid: [20, 23, 21, 26, 27],\n inspection: [true, false, true],\n evaluation: ['최우수', '보통', '우수'],\n comment: '이것은 코멘트입니다.'\n },\n dataItems: dataSet.dataItems,\n spec: {\n temp: {\n name: '창고 온도',\n description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 100,\n maximum: 200\n },\n targetLimits: {\n minimum: 120,\n maximum: 180\n }\n }\n }\n },\n humid: {\n name: '창고 습도',\n description: '창고 습도는 30% 이하로 유지되어야 합니다.',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 10,\n maximum: 50\n },\n targetLimits: {\n minimum: 20,\n maximum: 40\n }\n }\n }\n },\n inspection: {\n name: '육안 검사',\n description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.'\n },\n evaluation: {\n name: '품평',\n description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',\n spec: {\n CCP: {\n criticalLimits: {\n acceptables: ['최우수', '우수', '보통']\n },\n targetLimits: {\n acceptables: ['최우수', '우수']\n }\n }\n }\n },\n comment: {\n name: '코멘트',\n description: '특이사항을 기록함.'\n },\n attachment: {\n name: '첨부파일',\n description: '참조 첨부 파일.'\n }\n },\n collectedAt: Date.now(),\n history: [\n {\n user: {\n id: 0,\n name: 'shnam'\n },\n state: 'ISSUED',\n timestamp: Date.now()\n },\n {\n user: {\n id: 0,\n name: 'shnam'\n },\n state: 'REVIEWED',\n comment: '금일 생산한 제품은 전량 폐기합니다',\n timestamp: Date.now()\n },\n {\n user: {\n id: 0,\n name: 'shnam'\n },\n state: 'CORRECTED',\n comment: '전량 폐기하였습니다',\n timestamp: Date.now()\n }\n ]\n}\n\nconst Template: Story<ArgTypes> = ({}: ArgTypes) =>\n html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\n <ox-data-ooc-view\n .dataSet=${dataSet}\n .dataOoc=${dataOoc}\n @change=${(e: CustomEvent) => console.log(e.detail)}\n ></ox-data-ooc-view>\n `\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}
|