@operato/dataset 2.0.0-alpha.8 → 2.0.0-alpha.81
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 +418 -0
- package/demo/favicon.ico +0 -0
- package/demo/index.html +349 -0
- package/demo/ox-data-ooc-brief-view-test.html +349 -0
- package/dist/src/grist-editor/ox-grist-editor-data-item-spec.d.ts +1 -1
- package/dist/src/grist-editor/ox-popup-data-item-spec.d.ts +2 -1
- package/dist/src/grist-editor/ox-popup-data-item-spec.js +7 -8
- package/dist/src/grist-editor/ox-popup-data-item-spec.js.map +1 -1
- package/dist/src/ox-data-entry-form.js +49 -37
- package/dist/src/ox-data-entry-form.js.map +1 -1
- package/dist/src/ox-data-entry-subgroup-form.d.ts +1 -1
- package/dist/src/ox-data-entry-subgroup-form.js +2 -0
- package/dist/src/ox-data-entry-subgroup-form.js.map +1 -1
- package/dist/src/ox-data-entry-view.d.ts +3 -3
- package/dist/src/ox-data-entry-view.js +17 -7
- package/dist/src/ox-data-entry-view.js.map +1 -1
- package/dist/src/ox-data-item-spec.d.ts +1 -1
- package/dist/src/ox-data-item-spec.js +6 -6
- package/dist/src/ox-data-item-spec.js.map +1 -1
- package/dist/src/ox-data-ooc-badge.d.ts +9 -0
- package/dist/src/ox-data-ooc-badge.js +67 -0
- package/dist/src/ox-data-ooc-badge.js.map +1 -0
- package/dist/src/ox-data-ooc-brief-view.d.ts +4 -2
- package/dist/src/ox-data-ooc-brief-view.js +9 -111
- 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 +99 -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 +3 -2
- package/dist/src/ox-data-ooc-view.js +7 -90
- package/dist/src/ox-data-ooc-view.js.map +1 -1
- package/dist/src/ox-data-sample-subgroup-view.d.ts +1 -1
- package/dist/src/ox-data-sample-subgroup-view.js +9 -9
- package/dist/src/ox-data-sample-subgroup-view.js.map +1 -1
- package/dist/src/ox-data-sample-view.d.ts +1 -1
- package/dist/src/ox-data-sample-view.js +52 -35
- package/dist/src/ox-data-sample-view.js.map +1 -1
- package/dist/src/ox-data-summary-view.d.ts +1 -1
- package/dist/src/ox-data-summary-view.js +10 -4
- package/dist/src/ox-data-summary-view.js.map +1 -1
- package/dist/src/types.d.ts +57 -9
- package/dist/src/types.js.map +1 -1
- package/dist/src/usecase/ccp/ox-input-ccp-limits.d.ts +1 -1
- package/dist/src/usecase/qc/ox-input-qc-limits.d.ts +1 -1
- package/dist/src/usecase/spc/index.d.ts +1 -0
- package/dist/src/usecase/spc/index.js +8 -0
- package/dist/src/usecase/spc/index.js.map +1 -0
- package/dist/src/usecase/spc/ox-data-use-case-spc.d.ts +7 -0
- package/dist/src/usecase/spc/ox-data-use-case-spc.js +102 -0
- package/dist/src/usecase/spc/ox-data-use-case-spc.js.map +1 -0
- package/dist/src/usecase/spc/ox-input-spc-limits.d.ts +44 -0
- package/dist/src/usecase/spc/ox-input-spc-limits.js +193 -0
- package/dist/src/usecase/spc/ox-input-spc-limits.js.map +1 -0
- package/dist/src/usecase/spc/ox-property-editor-spc-limits.d.ts +6 -0
- package/dist/src/usecase/spc/ox-property-editor-spc-limits.js +24 -0
- package/dist/src/usecase/spc/ox-property-editor-spc-limits.js.map +1 -0
- package/dist/stories/ox-data-entry-form.stories.d.ts +1 -1
- package/dist/stories/ox-data-entry-form.stories.js +73 -17
- package/dist/stories/ox-data-entry-form.stories.js.map +1 -1
- package/dist/stories/ox-data-item-spec.stories.d.ts +1 -1
- package/dist/stories/ox-data-item-spec.stories.js +14 -2
- package/dist/stories/ox-data-item-spec.stories.js.map +1 -1
- package/dist/stories/ox-data-ooc-brief-view.stories.d.ts +1 -1
- package/dist/stories/ox-data-ooc-brief-view.stories.js +25 -13
- package/dist/stories/ox-data-ooc-brief-view.stories.js.map +1 -1
- package/dist/stories/ox-data-ooc-view.stories.d.ts +1 -1
- package/dist/stories/ox-data-ooc-view.stories.js +27 -13
- package/dist/stories/ox-data-ooc-view.stories.js.map +1 -1
- package/dist/stories/ox-data-sample-view.stories.d.ts +1 -1
- package/dist/stories/ox-data-sample-view.stories.js +21 -9
- package/dist/stories/ox-data-sample-view.stories.js.map +1 -1
- package/dist/stories/ox-grist-editor-data-item-spec.stories.d.ts +1 -1
- package/dist/stories/ox-grist-editor-data-item-spec.stories.js +66 -54
- package/dist/stories/ox-grist-editor-data-item-spec.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -26
- package/src/grist-editor/ox-popup-data-item-spec.ts +7 -8
- package/src/ox-data-entry-form.ts +66 -47
- package/src/ox-data-entry-subgroup-form.ts +2 -0
- package/src/ox-data-entry-view.ts +18 -7
- package/src/ox-data-item-spec.ts +8 -7
- package/src/ox-data-ooc-badge.ts +65 -0
- package/src/ox-data-ooc-brief-view.ts +10 -121
- package/src/ox-data-ooc-correction-part.ts +107 -0
- package/src/ox-data-ooc-history.ts +74 -0
- package/src/ox-data-ooc-view.ts +7 -92
- package/src/ox-data-sample-subgroup-view.ts +16 -17
- package/src/ox-data-sample-view.ts +52 -35
- package/src/ox-data-summary-view.ts +10 -4
- package/src/types.ts +76 -27
- package/src/usecase/spc/index.ts +10 -0
- package/src/usecase/spc/ox-data-use-case-spc.ts +147 -0
- package/src/usecase/spc/ox-input-spc-limits.ts +182 -0
- package/src/usecase/spc/ox-property-editor-spc-limits.ts +23 -0
- package/stories/ox-data-entry-form.stories.ts +78 -22
- package/stories/ox-data-item-spec.stories.ts +14 -2
- package/stories/ox-data-ooc-brief-view.stories.ts +26 -15
- package/stories/ox-data-ooc-view.stories.ts +28 -15
- package/stories/ox-data-sample-view.stories.ts +22 -11
- package/stories/ox-grist-editor-data-item-spec.stories.ts +67 -56
- package/themes/grist-theme.css +1 -1
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +142 -70
- package/translations/zh.json +146 -75
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import '@operato/input/ox-input-file.js'
|
|
2
2
|
import './ox-data-sample-view'
|
|
3
|
-
import '
|
|
3
|
+
import './ox-data-ooc-badge'
|
|
4
|
+
import './ox-data-ooc-correction-part'
|
|
5
|
+
import '@material/web/icon/icon.js'
|
|
4
6
|
|
|
5
|
-
import { css, html, LitElement
|
|
7
|
+
import { css, html, LitElement } from 'lit'
|
|
6
8
|
import { customElement, property } from 'lit/decorators.js'
|
|
7
9
|
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { DataOoc, DataSet } from './types.js'
|
|
10
|
+
import { DataOoc } from './types.js'
|
|
11
11
|
|
|
12
12
|
@customElement('ox-data-ooc-brief-view')
|
|
13
13
|
export class OxDataOocBriefView extends LitElement {
|
|
@@ -15,140 +15,29 @@ export class OxDataOocBriefView extends LitElement {
|
|
|
15
15
|
:host {
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-direction: column;
|
|
18
|
-
background-color: var(--main-section-background-color);
|
|
19
18
|
|
|
20
19
|
position: relative;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
margin: var(--title-margin);
|
|
25
|
-
padding-top: 12px;
|
|
26
|
-
font: var(--title-font);
|
|
27
|
-
color: var(--title-text-color);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
h3[state] {
|
|
22
|
+
ox-data-ooc-badge {
|
|
31
23
|
position: absolute;
|
|
24
|
+
|
|
32
25
|
margin: 0;
|
|
33
26
|
padding: 0;
|
|
34
27
|
right: 10px;
|
|
35
28
|
width: 90px;
|
|
36
|
-
text-align: center;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
h3[corrective] {
|
|
40
|
-
font-size: 20px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
mwc-icon {
|
|
44
|
-
font-size: 16px;
|
|
45
|
-
}
|
|
46
|
-
[state] mwc-icon {
|
|
47
|
-
font-size: 80px;
|
|
48
|
-
opacity: 0.4;
|
|
49
|
-
color: var(--primary-background-color);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
[state] div {
|
|
53
|
-
position: absolute;
|
|
54
|
-
top: 22px;
|
|
55
|
-
left: 0;
|
|
56
|
-
right: 0;
|
|
57
|
-
font-size: 10px;
|
|
58
|
-
color: var(--theme-white-color);
|
|
59
|
-
}
|
|
60
|
-
[state] [field-state] {
|
|
61
|
-
display: block;
|
|
62
|
-
border-radius: 4px;
|
|
63
|
-
background-color: var(--primary-color);
|
|
64
|
-
box-shadow: var(--box-shadow);
|
|
65
|
-
margin-top: var(--margin-narrow);
|
|
66
|
-
padding: 1px 3px;
|
|
67
|
-
font-size: 0.8rem;
|
|
68
|
-
}
|
|
69
|
-
[danger] [field-state] {
|
|
70
|
-
background-color: var(--status-danger-color);
|
|
71
|
-
}
|
|
72
|
-
[complete] [field-state] {
|
|
73
|
-
background-color: var(--status-info-color);
|
|
74
|
-
}
|
|
75
|
-
|
|
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);
|
|
83
|
-
}
|
|
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);
|
|
92
|
-
}
|
|
93
|
-
[corrective-content] mwc-icon {
|
|
94
|
-
position: relative;
|
|
95
|
-
top: 3px;
|
|
96
|
-
margin: 0 2px 0 10px;
|
|
97
|
-
}
|
|
98
|
-
[field-info] {
|
|
99
|
-
opacity: 0.7;
|
|
100
|
-
}
|
|
101
|
-
[corrective-content] strong {
|
|
102
|
-
display: block;
|
|
103
|
-
font-weight: bold;
|
|
104
|
-
font-size: 0.9rem;
|
|
105
29
|
}
|
|
106
30
|
`
|
|
107
31
|
|
|
108
32
|
@property({ type: Object }) dataOoc?: DataOoc
|
|
109
33
|
|
|
110
34
|
render() {
|
|
111
|
-
const {
|
|
112
|
-
correctiveInstruction = '',
|
|
113
|
-
correctiveAction = '',
|
|
114
|
-
reviewer,
|
|
115
|
-
reviewedAt,
|
|
116
|
-
corrector,
|
|
117
|
-
correctedAt,
|
|
118
|
-
state
|
|
119
|
-
} = this.dataOoc || {}
|
|
120
|
-
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
35
|
+
const { state } = this.dataOoc || {}
|
|
121
36
|
|
|
122
37
|
return html`
|
|
123
38
|
<ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
<mwc-icon>shield</mwc-icon>
|
|
127
|
-
<div>DATA OOC <span field-state>${state || ''}</span></div>
|
|
128
|
-
</h3>
|
|
129
|
-
|
|
130
|
-
${reviewer
|
|
131
|
-
? html`
|
|
132
|
-
<h3 corrective>${i18next.t('label.corrective instruction')}</h3>
|
|
133
|
-
<p corrective-content>
|
|
134
|
-
<span field-info
|
|
135
|
-
>${formatter.format(new Date(reviewedAt!))} <mwc-icon>account_circle</mwc-icon>${reviewer.name}</span
|
|
136
|
-
>
|
|
137
|
-
<strong>${correctiveInstruction}</strong>
|
|
138
|
-
</p>
|
|
139
|
-
`
|
|
140
|
-
: nothing}
|
|
141
|
-
${corrector
|
|
142
|
-
? html`
|
|
143
|
-
<h3 corrective>${i18next.t('label.corrective action')}</h3>
|
|
144
|
-
<p corrective-content>
|
|
145
|
-
<span field-info
|
|
146
|
-
>${formatter.format(new Date(correctedAt!))} <mwc-icon>account_circle</mwc-icon>${corrector.name}</span
|
|
147
|
-
>
|
|
148
|
-
<strong>${correctiveAction}</strong>
|
|
149
|
-
</p>
|
|
150
|
-
`
|
|
151
|
-
: nothing}
|
|
39
|
+
<ox-data-ooc-badge .state=${state}></ox-data-ooc-badge>
|
|
40
|
+
<ox-data-ooc-correction-part .dataOoc=${this.dataOoc}></ox-data-ooc-correction-part>
|
|
152
41
|
`
|
|
153
42
|
}
|
|
154
43
|
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import '@operato/input/ox-input-file.js'
|
|
2
|
+
import '@material/web/icon/icon.js'
|
|
3
|
+
|
|
4
|
+
import { css, html, LitElement, nothing } from 'lit'
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
6
|
+
|
|
7
|
+
import { i18next } from '@operato/i18n'
|
|
8
|
+
|
|
9
|
+
import { DataOoc } from './types.js'
|
|
10
|
+
|
|
11
|
+
@customElement('ox-data-ooc-correction-part')
|
|
12
|
+
export class OxDataOocCorrectionPart extends LitElement {
|
|
13
|
+
static styles = css`
|
|
14
|
+
:host {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
|
|
18
|
+
position: relative;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
h3 {
|
|
22
|
+
margin: var(--title-margin);
|
|
23
|
+
padding-top: 12px;
|
|
24
|
+
font: var(--title-font);
|
|
25
|
+
color: var(--title-text-color);
|
|
26
|
+
font-size: 20px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
md-icon {
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[field-state] {
|
|
34
|
+
border-radius: 2px;
|
|
35
|
+
background-color: var(--primary-color);
|
|
36
|
+
margin-left: var(--margin-default);
|
|
37
|
+
padding: 1px 2px;
|
|
38
|
+
font-size: 0.7rem;
|
|
39
|
+
color: var(--theme-white-color);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
p {
|
|
43
|
+
background-color: var(--theme-white-color);
|
|
44
|
+
box-shadow: var(--box-shadow);
|
|
45
|
+
border-radius: var(--border-radius);
|
|
46
|
+
margin: var(--page-description-margin);
|
|
47
|
+
padding: var(--padding-default);
|
|
48
|
+
font: var(--page-description-font);
|
|
49
|
+
color: var(--secondary-color);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
md-icon {
|
|
53
|
+
position: relative;
|
|
54
|
+
top: 3px;
|
|
55
|
+
margin: 0 2px 0 10px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[field-info] {
|
|
59
|
+
opacity: 0.7;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
strong {
|
|
63
|
+
display: block;
|
|
64
|
+
font-weight: bold;
|
|
65
|
+
font-size: 0.9rem;
|
|
66
|
+
}
|
|
67
|
+
`
|
|
68
|
+
|
|
69
|
+
@property({ type: Object }) dataOoc?: DataOoc
|
|
70
|
+
|
|
71
|
+
render() {
|
|
72
|
+
const {
|
|
73
|
+
correctiveInstruction = '',
|
|
74
|
+
correctiveAction = '',
|
|
75
|
+
reviewer,
|
|
76
|
+
reviewedAt,
|
|
77
|
+
corrector,
|
|
78
|
+
correctedAt
|
|
79
|
+
} = this.dataOoc || {}
|
|
80
|
+
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
81
|
+
|
|
82
|
+
return html`
|
|
83
|
+
${reviewer
|
|
84
|
+
? html`
|
|
85
|
+
<h3>${i18next.t('label.corrective instruction')}</h3>
|
|
86
|
+
<p>
|
|
87
|
+
<span field-info
|
|
88
|
+
>${formatter.format(new Date(reviewedAt!))} <md-icon>account_circle</md-icon>${reviewer.name}</span
|
|
89
|
+
>
|
|
90
|
+
<strong>${correctiveInstruction}</strong>
|
|
91
|
+
</p>
|
|
92
|
+
`
|
|
93
|
+
: nothing}
|
|
94
|
+
${corrector
|
|
95
|
+
? html`
|
|
96
|
+
<h3>${i18next.t('label.corrective action')}</h3>
|
|
97
|
+
<p>
|
|
98
|
+
<span field-info
|
|
99
|
+
>${formatter.format(new Date(correctedAt!))} <md-icon>account_circle</md-icon>${corrector.name}</span
|
|
100
|
+
>
|
|
101
|
+
<strong>${correctiveAction}</strong>
|
|
102
|
+
</p>
|
|
103
|
+
`
|
|
104
|
+
: nothing}
|
|
105
|
+
`
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import '@operato/input/ox-input-file.js'
|
|
2
|
+
import './ox-data-sample-view'
|
|
3
|
+
import '@material/web/icon/icon.js'
|
|
4
|
+
|
|
5
|
+
import { css, html, LitElement } from 'lit'
|
|
6
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
7
|
+
|
|
8
|
+
import { DataOoc } from './types.js'
|
|
9
|
+
|
|
10
|
+
@customElement('ox-data-ooc-history')
|
|
11
|
+
export class OxDataOocHistory extends LitElement {
|
|
12
|
+
static styles = css`
|
|
13
|
+
md-icon {
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[field-state] {
|
|
18
|
+
border-radius: 2px;
|
|
19
|
+
background-color: var(--primary-color);
|
|
20
|
+
margin-left: var(--margin-default);
|
|
21
|
+
padding: 1px 2px;
|
|
22
|
+
font-size: 0.7rem;
|
|
23
|
+
color: var(--theme-white-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
p {
|
|
27
|
+
background-color: var(--theme-white-color);
|
|
28
|
+
box-shadow: var(--box-shadow);
|
|
29
|
+
border-radius: var(--border-radius);
|
|
30
|
+
margin: var(--page-description-margin);
|
|
31
|
+
padding: var(--padding-default);
|
|
32
|
+
font: var(--page-description-font);
|
|
33
|
+
color: var(--secondary-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
md-icon {
|
|
37
|
+
position: relative;
|
|
38
|
+
top: 3px;
|
|
39
|
+
margin: 0 2px 0 10px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[field-info] {
|
|
43
|
+
opacity: 0.7;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
strong {
|
|
47
|
+
display: block;
|
|
48
|
+
font-weight: bold;
|
|
49
|
+
font-size: 0.9rem;
|
|
50
|
+
}
|
|
51
|
+
`
|
|
52
|
+
|
|
53
|
+
@property({ type: Object }) dataOoc?: DataOoc
|
|
54
|
+
|
|
55
|
+
render() {
|
|
56
|
+
const { history = [] } = this.dataOoc || {}
|
|
57
|
+
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
58
|
+
|
|
59
|
+
return html`
|
|
60
|
+
${history.map(
|
|
61
|
+
({ user, state, comment, timestamp }) => html`
|
|
62
|
+
<p page-history>
|
|
63
|
+
<!--상태에 따라 추가로 danger, complete를 어트리뷰트로 추가시 배경컬러 변경되도록 해두었습니다-->
|
|
64
|
+
<span field-info
|
|
65
|
+
>${formatter.format(new Date(timestamp))} <md-icon>account_circle</md-icon>${user.name}</span
|
|
66
|
+
>
|
|
67
|
+
<span field-state>${state}</span>
|
|
68
|
+
<strong>${comment}</strong>
|
|
69
|
+
</p>
|
|
70
|
+
`
|
|
71
|
+
)}
|
|
72
|
+
`
|
|
73
|
+
}
|
|
74
|
+
}
|
package/src/ox-data-ooc-view.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '@operato/input/ox-input-file.js'
|
|
2
2
|
import './ox-data-sample-view'
|
|
3
|
-
import '
|
|
3
|
+
import './ox-data-ooc-history'
|
|
4
|
+
import '@material/web/icon/icon.js'
|
|
4
5
|
|
|
5
6
|
import { css, html, LitElement } from 'lit'
|
|
6
7
|
import { customElement, property } from 'lit/decorators.js'
|
|
@@ -18,88 +19,17 @@ export class OxDataOocView extends LitElement {
|
|
|
18
19
|
:host {
|
|
19
20
|
display: flex;
|
|
20
21
|
flex-direction: column;
|
|
21
|
-
background-color: var(--main-section-background-color);
|
|
22
22
|
|
|
23
23
|
position: relative;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
margin: var(--title-margin);
|
|
28
|
-
padding-top: 12px;
|
|
29
|
-
font: var(--title-font);
|
|
30
|
-
color: var(--title-text-color);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
h3[state] {
|
|
26
|
+
ox-data-ooc-badge {
|
|
34
27
|
position: absolute;
|
|
28
|
+
|
|
35
29
|
margin: 0;
|
|
36
30
|
padding: 0;
|
|
37
31
|
right: 10px;
|
|
38
32
|
width: 90px;
|
|
39
|
-
text-align: center;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
mwc-icon {
|
|
43
|
-
font-size: 16px;
|
|
44
|
-
}
|
|
45
|
-
[state] mwc-icon {
|
|
46
|
-
font-size: 80px;
|
|
47
|
-
opacity: 0.4;
|
|
48
|
-
color: var(--primary-background-color);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
[state] div {
|
|
52
|
-
position: absolute;
|
|
53
|
-
top: 22px;
|
|
54
|
-
left: 0;
|
|
55
|
-
right: 0;
|
|
56
|
-
font-size: 10px;
|
|
57
|
-
color: var(--theme-white-color);
|
|
58
|
-
}
|
|
59
|
-
[state] [field-state] {
|
|
60
|
-
display: block;
|
|
61
|
-
border-radius: 4px;
|
|
62
|
-
background-color: var(--primary-color);
|
|
63
|
-
box-shadow: var(--box-shadow);
|
|
64
|
-
margin-top: var(--margin-narrow);
|
|
65
|
-
padding: 1px 3px;
|
|
66
|
-
font-size: 0.8rem;
|
|
67
|
-
}
|
|
68
|
-
[danger] [field-state] {
|
|
69
|
-
background-color: var(--status-danger-color);
|
|
70
|
-
}
|
|
71
|
-
[complete] [field-state] {
|
|
72
|
-
background-color: var(--status-info-color);
|
|
73
|
-
}
|
|
74
|
-
[page-history] [field-state] {
|
|
75
|
-
border-radius: 2px;
|
|
76
|
-
background-color: var(--primary-color);
|
|
77
|
-
margin-left: var(--margin-default);
|
|
78
|
-
padding: 1px 2px;
|
|
79
|
-
font-size: 0.7rem;
|
|
80
|
-
color: var(--theme-white-color);
|
|
81
|
-
}
|
|
82
|
-
[page-history] {
|
|
83
|
-
background-color: var(--theme-white-color);
|
|
84
|
-
box-shadow: var(--box-shadow);
|
|
85
|
-
border-radius: var(--border-radius);
|
|
86
|
-
margin: var(--page-description-margin);
|
|
87
|
-
padding: var(--padding-default);
|
|
88
|
-
font: var(--page-description-font);
|
|
89
|
-
color: var(--secondary-color);
|
|
90
|
-
}
|
|
91
|
-
[page-history] mwc-icon {
|
|
92
|
-
position: relative;
|
|
93
|
-
top: 3px;
|
|
94
|
-
margin: 0 2px 0 10px;
|
|
95
|
-
}
|
|
96
|
-
[field-info] {
|
|
97
|
-
opacity: 0.7;
|
|
98
|
-
}
|
|
99
|
-
[page-history] strong {
|
|
100
|
-
display: block;
|
|
101
|
-
font-weight: bold;
|
|
102
|
-
font-size: 0.9rem;
|
|
103
33
|
}
|
|
104
34
|
`
|
|
105
35
|
|
|
@@ -107,30 +37,15 @@ export class OxDataOocView extends LitElement {
|
|
|
107
37
|
@property({ type: Object }) dataOoc?: DataOoc
|
|
108
38
|
|
|
109
39
|
render() {
|
|
110
|
-
const {
|
|
111
|
-
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
40
|
+
const { state } = this.dataOoc || {}
|
|
112
41
|
|
|
113
42
|
return html`
|
|
114
43
|
<ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>
|
|
115
44
|
|
|
116
|
-
<
|
|
117
|
-
<mwc-icon>shield</mwc-icon>
|
|
118
|
-
<div>DATA OOC <span field-state>${state || ''}</span></div>
|
|
119
|
-
</h3>
|
|
45
|
+
<ox-data-ooc-badge .state=${state}></ox-data-ooc-badge>
|
|
120
46
|
|
|
121
47
|
<h3>${i18next.t('title.history')}</h3>
|
|
122
|
-
|
|
123
|
-
({ user, state, comment, timestamp }) => html`
|
|
124
|
-
<p page-history>
|
|
125
|
-
<!--상태에 따라 추가로 danger, complete를 어트리뷰트로 추가시 배경컬러 변경되도록 해두었습니다-->
|
|
126
|
-
<span field-info
|
|
127
|
-
>${formatter.format(new Date(timestamp))} <mwc-icon>account_circle</mwc-icon>${user.name}</span
|
|
128
|
-
>
|
|
129
|
-
<span field-state>${state}</span>
|
|
130
|
-
<strong>${comment}</strong>
|
|
131
|
-
</p>
|
|
132
|
-
`
|
|
133
|
-
)}
|
|
48
|
+
<ox-data-ooc-history .dataOoc=${this.dataOoc}></ox-data-ooc-history>
|
|
134
49
|
`
|
|
135
50
|
}
|
|
136
51
|
}
|
|
@@ -39,6 +39,7 @@ export class OxDataSampleSubgroupView extends LitElement {
|
|
|
39
39
|
font-weight: bold;
|
|
40
40
|
color: var(--th-color);
|
|
41
41
|
text-align: center;
|
|
42
|
+
white-space: nowrap;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
th.label,
|
|
@@ -69,13 +70,12 @@ export class OxDataSampleSubgroupView extends LitElement {
|
|
|
69
70
|
border-left: none;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
td
|
|
73
|
+
td md-icon {
|
|
73
74
|
color: var(--status-danger-color);
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
pre {
|
|
77
78
|
tab-size: 2;
|
|
78
|
-
text-wrap: wrap;
|
|
79
79
|
text-align: left;
|
|
80
80
|
}
|
|
81
81
|
`
|
|
@@ -109,19 +109,18 @@ export class OxDataSampleSubgroupView extends LitElement {
|
|
|
109
109
|
${subgroupDataItems.map(dataItem => html` <td>${dataItem.description}</td> `)}
|
|
110
110
|
</tr>
|
|
111
111
|
${Array.from({ length: records }, (_, index) => index).map(
|
|
112
|
-
index =>
|
|
113
|
-
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
`
|
|
112
|
+
index => html`
|
|
113
|
+
<tr>
|
|
114
|
+
<td class="label">${records > 1 ? index + 1 : i18next.t('field.value')}</td>
|
|
115
|
+
${subgroupDataItems.map(dataItem => {
|
|
116
|
+
const { tag = '', type } = dataItem
|
|
117
|
+
const valueArray = data[tag]
|
|
118
|
+
const value = Array.isArray(valueArray) ? valueArray[index] : index == 0 ? valueArray : undefined
|
|
119
|
+
|
|
120
|
+
return html` <td>${this.buildValue(type, value)}</td> `
|
|
121
|
+
})}
|
|
122
|
+
</tr>
|
|
123
|
+
`
|
|
125
124
|
)}
|
|
126
125
|
<tr>
|
|
127
126
|
<td class="label">${i18next.t('field.spec')}</td>
|
|
@@ -132,13 +131,13 @@ export class OxDataSampleSubgroupView extends LitElement {
|
|
|
132
131
|
<tr>
|
|
133
132
|
<td class="label">${i18next.t('field.ooc')}</td>
|
|
134
133
|
${subgroupDataItems.map(
|
|
135
|
-
dataItem => html` <td>${judgment?.[dataItem.tag]?.ooc ? html`<
|
|
134
|
+
dataItem => html` <td>${judgment?.[dataItem.tag]?.ooc ? html`<md-icon>done</md-icon>` : nothing}</td> `
|
|
136
135
|
)}
|
|
137
136
|
</tr>
|
|
138
137
|
<tr>
|
|
139
138
|
<td class="label">${i18next.t('field.oos')}</td>
|
|
140
139
|
${subgroupDataItems.map(
|
|
141
|
-
dataItem => html` <td>${judgment?.[dataItem.tag]?.oos ? html`<
|
|
140
|
+
dataItem => html` <td>${judgment?.[dataItem.tag]?.oos ? html`<md-icon>done</md-icon>` : nothing}</td> `
|
|
142
141
|
)}
|
|
143
142
|
</tr>
|
|
144
143
|
</table>`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@operato/input/ox-input-file.js'
|
|
2
2
|
import './ox-data-sample-subgroup-view.js'
|
|
3
3
|
|
|
4
|
-
import { css, html, LitElement } from 'lit'
|
|
4
|
+
import { css, html, LitElement, nothing } from 'lit'
|
|
5
5
|
import { customElement, property } from 'lit/decorators.js'
|
|
6
6
|
|
|
7
7
|
import { i18next } from '@operato/i18n'
|
|
@@ -40,7 +40,7 @@ export class OxDataSampleView extends LitElement {
|
|
|
40
40
|
[page-description] * {
|
|
41
41
|
vertical-align: middle;
|
|
42
42
|
}
|
|
43
|
-
[page-description]
|
|
43
|
+
[page-description] md-icon {
|
|
44
44
|
margin-top: -2px;
|
|
45
45
|
font-size: 0.9rem;
|
|
46
46
|
color: var(--page-description-color);
|
|
@@ -58,6 +58,7 @@ export class OxDataSampleView extends LitElement {
|
|
|
58
58
|
font: var(--th-font);
|
|
59
59
|
color: var(--th-color);
|
|
60
60
|
text-align: left;
|
|
61
|
+
white-space: nowrap;
|
|
61
62
|
}
|
|
62
63
|
th[item] {
|
|
63
64
|
min-width: 100px;
|
|
@@ -87,13 +88,25 @@ export class OxDataSampleView extends LitElement {
|
|
|
87
88
|
td[name] {
|
|
88
89
|
font-weight: bold;
|
|
89
90
|
}
|
|
90
|
-
td
|
|
91
|
+
td md-icon {
|
|
91
92
|
color: var(--status-danger-color);
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
pre {
|
|
95
96
|
tab-size: 2;
|
|
96
97
|
}
|
|
98
|
+
|
|
99
|
+
@media print {
|
|
100
|
+
:host {
|
|
101
|
+
display: block;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media screen and (max-width: 480px) {
|
|
106
|
+
th {
|
|
107
|
+
min-width: 50px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
97
110
|
`
|
|
98
111
|
|
|
99
112
|
@property({ type: Object }) dataSample?: DataSample
|
|
@@ -121,43 +134,47 @@ export class OxDataSampleView extends LitElement {
|
|
|
121
134
|
|
|
122
135
|
return html` <h2>${name}</h2>
|
|
123
136
|
<p page-description>
|
|
124
|
-
<
|
|
125
|
-
<
|
|
126
|
-
<
|
|
137
|
+
<md-icon>info</md-icon> ${description}<br />
|
|
138
|
+
<md-icon>alarm</md-icon> ${i18next.t('field.work-date')}: ${workDate} ${workShift} |
|
|
139
|
+
<md-icon>pending_actions</md-icon> ${i18next.t('field.collected-at')}:
|
|
127
140
|
${formatter.format(new Date(collectedAt!))}
|
|
128
141
|
</p>
|
|
129
142
|
|
|
130
143
|
<form>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
144
|
+
${nonGroupDataItems.length > 0
|
|
145
|
+
? html`
|
|
146
|
+
<table>
|
|
147
|
+
<tr>
|
|
148
|
+
<th item>${i18next.t('field.item')}</th>
|
|
149
|
+
<th>${i18next.t('field.description')}</th>
|
|
150
|
+
<th>${i18next.t('field.finalizing-function')}</th>
|
|
151
|
+
<th>${i18next.t('field.unit')}</th>
|
|
152
|
+
<th value>${i18next.t('field.value')}</th>
|
|
153
|
+
<th>${i18next.t('field.spec')}</th>
|
|
154
|
+
<th>${i18next.t('field.ooc')}</th>
|
|
155
|
+
<th>${i18next.t('field.oos')}</th>
|
|
156
|
+
</tr>
|
|
157
|
+
${nonGroupDataItems.map(dataItem => {
|
|
158
|
+
const { name = '', tag = '', description = '', stat, unit = '', spec = {}, type } = dataItem
|
|
159
|
+
const value = data[tag]
|
|
160
|
+
const { ooc, oos } = judgment?.[tag] || {}
|
|
161
|
+
|
|
162
|
+
return html`
|
|
163
|
+
<tr ?ooc=${ooc} ?oos=${oos}>
|
|
164
|
+
<td name>${name}</td>
|
|
165
|
+
<td>${description}</td>
|
|
166
|
+
<td>${stat}</td>
|
|
167
|
+
<td>${unit}</td>
|
|
168
|
+
<td>${this.buildValue(type, value)}</td>
|
|
169
|
+
<td><pre>${this.buildSpec(useCaseNames, spec)}</pre></td>
|
|
170
|
+
<td>${ooc ? html`<md-icon>done</md-icon>` : ''}</td>
|
|
171
|
+
<td>${oos ? html`<md-icon>done</md-icon>` : ''}</td>
|
|
172
|
+
</tr>
|
|
173
|
+
`
|
|
174
|
+
})}
|
|
175
|
+
</table>
|
|
158
176
|
`
|
|
159
|
-
}
|
|
160
|
-
</table>
|
|
177
|
+
: nothing}
|
|
161
178
|
${Object.keys(dataItemSubgroups).map(subgroup => {
|
|
162
179
|
return html`
|
|
163
180
|
<ox-data-sample-subgroup-view
|