@things-factory/dataset 8.0.0-beta.9 → 8.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/client/activities/activity-data-collect-edit.ts +105 -0
  2. package/client/activities/activity-data-collect-view.ts +91 -0
  3. package/client/activities/activity-data-review-edit.ts +278 -0
  4. package/client/activities/activity-data-review-view.ts +226 -0
  5. package/client/activities/activity-ooc-resolve-edit.ts +195 -0
  6. package/client/activities/activity-ooc-resolve-view.ts +143 -0
  7. package/client/activities/activity-ooc-review-edit.ts +173 -0
  8. package/client/activities/activity-ooc-review-view.ts +129 -0
  9. package/client/bootstrap.ts +35 -0
  10. package/client/components/data-entry-form.ts +109 -0
  11. package/client/index.ts +1 -0
  12. package/client/pages/data-archive/data-archive-list-page.ts +277 -0
  13. package/client/pages/data-archive/data-archive-request-popup.ts +177 -0
  14. package/client/pages/data-entry/data-entry-list-page.ts +464 -0
  15. package/client/pages/data-key-set/data-key-item-list.ts +183 -0
  16. package/client/pages/data-key-set/data-key-set-importer.ts +89 -0
  17. package/client/pages/data-key-set/data-key-set-list-page.ts +413 -0
  18. package/client/pages/data-ooc/data-ooc-list-page.ts +549 -0
  19. package/client/pages/data-ooc/data-ooc-page.ts +164 -0
  20. package/client/pages/data-ooc/data-ooc-view.ts +236 -0
  21. package/client/pages/data-ooc/data-oocs-page.ts +200 -0
  22. package/client/pages/data-report/data-report-embed-page.ts +108 -0
  23. package/client/pages/data-report/data-report-list-page.ts +454 -0
  24. package/client/pages/data-report/data-report-samples-page.ts +174 -0
  25. package/client/pages/data-report/jasper-report-oocs-page.ts +110 -0
  26. package/client/pages/data-report/jasper-report-samples-crosstab-page.ts +110 -0
  27. package/client/pages/data-report/jasper-report-samples-page.ts +110 -0
  28. package/client/pages/data-sample/data-sample-list-page.ts +442 -0
  29. package/client/pages/data-sample/data-sample-page.ts +55 -0
  30. package/client/pages/data-sample/data-sample-search-page.ts +424 -0
  31. package/client/pages/data-sample/data-sample-view.ts +292 -0
  32. package/client/pages/data-sample/data-samples-page.ts +249 -0
  33. package/client/pages/data-sensor/data-sensor-list-page.ts +456 -0
  34. package/client/pages/data-set/data-item-list.ts +304 -0
  35. package/client/pages/data-set/data-set-importer.ts +89 -0
  36. package/client/pages/data-set/data-set-list-page.ts +1078 -0
  37. package/client/pages/data-summary/data-summary-list-page.ts +363 -0
  38. package/client/pages/data-summary/data-summary-period-page.ts +439 -0
  39. package/client/pages/data-summary/data-summary-search-page.ts +426 -0
  40. package/client/pages/data-summary/data-summary-view.ts +133 -0
  41. package/client/route.ts +91 -0
  42. package/client/tsconfig.json +13 -0
  43. package/dist-client/activities/activity-data-review-edit.js +19 -10
  44. package/dist-client/activities/activity-data-review-edit.js.map +1 -1
  45. package/dist-client/activities/activity-data-review-view.js +80 -0
  46. package/dist-client/activities/activity-data-review-view.js.map +1 -1
  47. package/dist-client/pages/data-entry/data-entry-list-page.js +2 -2
  48. package/dist-client/pages/data-entry/data-entry-list-page.js.map +1 -1
  49. package/dist-client/tsconfig.tsbuildinfo +1 -1
  50. package/dist-server/controllers/create-data-ooc.js +2 -0
  51. package/dist-server/controllers/create-data-ooc.js.map +1 -1
  52. package/dist-server/service/data-archive/index.d.ts +1 -1
  53. package/dist-server/service/data-ooc/index.d.ts +1 -1
  54. package/dist-server/service/data-sample/data-sample-query.d.ts +1 -1
  55. package/dist-server/service/data-sample/data-sample-query.js +3 -3
  56. package/dist-server/service/data-sample/data-sample-query.js.map +1 -1
  57. package/dist-server/service/data-sample/index.d.ts +1 -1
  58. package/dist-server/service/data-set/index.d.ts +1 -1
  59. package/dist-server/service/index.d.ts +2 -2
  60. package/dist-server/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +26 -26
  62. package/server/activities/activity-data-collect.ts +100 -0
  63. package/server/activities/activity-data-review.ts +109 -0
  64. package/server/activities/activity-ooc-resolve.ts +123 -0
  65. package/server/activities/activity-ooc-review.ts +95 -0
  66. package/server/activities/index.ts +11 -0
  67. package/server/controllers/create-data-ooc.ts +80 -0
  68. package/server/controllers/create-data-sample.ts +323 -0
  69. package/server/controllers/data-use-case.ts +98 -0
  70. package/server/controllers/finalize-data-collection.ts +388 -0
  71. package/server/controllers/index.ts +6 -0
  72. package/server/controllers/issue-data-collection-task.ts +70 -0
  73. package/server/controllers/issue-ooc-resolve.ts +58 -0
  74. package/server/controllers/issue-ooc-review.ts +52 -0
  75. package/server/controllers/jasper-report.ts +186 -0
  76. package/server/controllers/query-data-summary-by-period.ts +178 -0
  77. package/server/controllers/shiny-report.ts +54 -0
  78. package/server/engine/index.ts +1 -0
  79. package/server/engine/task/create-data-sample.ts +100 -0
  80. package/server/engine/task/index.ts +2 -0
  81. package/server/engine/task/issue-collect-data.ts +45 -0
  82. package/server/index.ts +8 -0
  83. package/server/routes.ts +188 -0
  84. package/server/service/data-archive/data-archive-mutation.ts +273 -0
  85. package/server/service/data-archive/data-archive-query.ts +58 -0
  86. package/server/service/data-archive/data-archive-type.ts +48 -0
  87. package/server/service/data-archive/data-archive.ts +69 -0
  88. package/server/service/data-archive/index.ts +6 -0
  89. package/server/service/data-key-set/data-key-item-type.ts +31 -0
  90. package/server/service/data-key-set/data-key-set-mutation.ts +201 -0
  91. package/server/service/data-key-set/data-key-set-query.ts +68 -0
  92. package/server/service/data-key-set/data-key-set-type.ts +70 -0
  93. package/server/service/data-key-set/data-key-set.ts +86 -0
  94. package/server/service/data-key-set/index.ts +6 -0
  95. package/server/service/data-ooc/data-ooc-mutation.ts +154 -0
  96. package/server/service/data-ooc/data-ooc-query.ts +106 -0
  97. package/server/service/data-ooc/data-ooc-subscription.ts +48 -0
  98. package/server/service/data-ooc/data-ooc-type.ts +71 -0
  99. package/server/service/data-ooc/data-ooc.ts +259 -0
  100. package/server/service/data-ooc/index.ts +7 -0
  101. package/server/service/data-sample/data-sample-mutation.ts +18 -0
  102. package/server/service/data-sample/data-sample-query.ts +215 -0
  103. package/server/service/data-sample/data-sample-type.ts +47 -0
  104. package/server/service/data-sample/data-sample.ts +193 -0
  105. package/server/service/data-sample/index.ts +6 -0
  106. package/server/service/data-sensor/data-sensor-mutation.ts +116 -0
  107. package/server/service/data-sensor/data-sensor-query.ts +76 -0
  108. package/server/service/data-sensor/data-sensor-type.ts +104 -0
  109. package/server/service/data-sensor/data-sensor.ts +126 -0
  110. package/server/service/data-sensor/index.ts +6 -0
  111. package/server/service/data-set/data-item-type.ts +155 -0
  112. package/server/service/data-set/data-set-mutation.ts +552 -0
  113. package/server/service/data-set/data-set-query.ts +461 -0
  114. package/server/service/data-set/data-set-type.ts +204 -0
  115. package/server/service/data-set/data-set.ts +326 -0
  116. package/server/service/data-set/index.ts +6 -0
  117. package/server/service/data-set-history/data-set-history-query.ts +126 -0
  118. package/server/service/data-set-history/data-set-history-type.ts +12 -0
  119. package/server/service/data-set-history/data-set-history.ts +217 -0
  120. package/server/service/data-set-history/event-subscriber.ts +17 -0
  121. package/server/service/data-set-history/index.ts +7 -0
  122. package/server/service/data-spec/data-spec-manager.ts +21 -0
  123. package/server/service/data-spec/data-spec-query.ts +21 -0
  124. package/server/service/data-spec/data-spec.ts +45 -0
  125. package/server/service/data-spec/index.ts +5 -0
  126. package/server/service/data-summary/data-summary-mutation.ts +45 -0
  127. package/server/service/data-summary/data-summary-query.ts +179 -0
  128. package/server/service/data-summary/data-summary-type.ts +86 -0
  129. package/server/service/data-summary/data-summary.ts +170 -0
  130. package/server/service/data-summary/index.ts +7 -0
  131. package/server/service/index.ts +57 -0
  132. package/server/tsconfig.json +10 -0
  133. package/server/utils/config-resolver.ts +29 -0
  134. package/server/utils/index.ts +1 -0
@@ -0,0 +1,195 @@
1
+ import '@material/web/icon/icon.js'
2
+ import '@operato/dataset/ox-data-ooc-brief-view.js'
3
+
4
+ import gql from 'graphql-tag'
5
+ import { css, html, LitElement, nothing } from 'lit'
6
+ import { customElement, property, query, state } from 'lit/decorators.js'
7
+
8
+ import { client } from '@operato/graphql'
9
+ import { i18next, localize } from '@operato/i18n'
10
+ import { ScrollbarStyles } from '@operato/styles'
11
+
12
+ @customElement('activity-ooc-resolve-edit')
13
+ class OocResolveActivityEdit extends localize(i18next)(LitElement) {
14
+ static styles = [
15
+ ScrollbarStyles,
16
+ css`
17
+ :host {
18
+ display: flex;
19
+ flex-direction: column;
20
+
21
+ background-color: var(--md-sys-color-surface);
22
+ }
23
+
24
+ div[content] {
25
+ flex: 1;
26
+ flex-direction: column;
27
+
28
+ display: flex;
29
+ overflow: auto;
30
+ }
31
+
32
+ ox-data-ooc-brief-view {
33
+ flex: 1;
34
+ padding: var(--spacing-large);
35
+ overflow: auto;
36
+ }
37
+
38
+ label[action] {
39
+ display: flex;
40
+ flex-direction: column;
41
+
42
+ padding: var(--spacing-large);
43
+ }
44
+
45
+ label[action] h2 {
46
+ display: flex;
47
+
48
+ color: var(--title-text-color);
49
+ text-transform: capitalize;
50
+ margin: var(--title-margin);
51
+ align-items: center;
52
+ }
53
+
54
+ md-icon {
55
+ color: var(--status-danger-color);
56
+ }
57
+
58
+ textarea {
59
+ border: var(--input-field-border);
60
+ border-radius: var(--spacing-small);
61
+ margin: var(--spacing-medium);
62
+ padding: var(--spacing-medium);
63
+ font: var(--input-field-font);
64
+ color: var(--md-sys-color-on-surface);
65
+ background: var(--md-sys-color-surface-variant);
66
+
67
+ resize: none;
68
+ outline: none;
69
+ min-height: 200px;
70
+ }
71
+ `
72
+ ]
73
+
74
+ @property({ type: Object }) input?: any
75
+ @property({ type: Object }) output?: any
76
+ @property({ type: Object }) activityThread?: any
77
+
78
+ @state() dataOoc?: any
79
+
80
+ @query('textarea') actionTextArea!: HTMLTextAreaElement
81
+
82
+ render() {
83
+ const action = this.output?.action
84
+ const state = this.activityThread?.state
85
+ const editable = state == 'unassigned' || state == 'assigned' || state == 'started'
86
+
87
+ return html`
88
+ <div content>
89
+ <ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>
90
+ </div>
91
+
92
+ <!-- <ox-data-ooc-correction-part .dataOoc=${this.dataOoc}></ox-data-ooc-correction-part> -->
93
+
94
+ ${editable
95
+ ? html`
96
+ <label action>
97
+ <h2><md-icon>build_circle</md-icon>&nbsp;<span>${i18next.t('label.corrective action')}</span></h2>
98
+ <textarea
99
+ placeholder=${String(i18next.t('text.corrective action placeholder'))}
100
+ .value=${action || ''}
101
+ @change=${this.onChangeAction}
102
+ ></textarea>
103
+ </label>
104
+ `
105
+ : nothing}
106
+ `
107
+ }
108
+
109
+ onChangeAction(e: Event) {
110
+ this.output ||= {}
111
+ this.output.action = (e.target as HTMLTextAreaElement).value
112
+
113
+ this.dispatchEvent(
114
+ new CustomEvent('change', {
115
+ detail: this.output
116
+ })
117
+ )
118
+ }
119
+
120
+ updated(changes) {
121
+ if (changes.has('input')) {
122
+ this.fetchDataOoc()
123
+ }
124
+ }
125
+
126
+ async fetchDataOoc() {
127
+ const id = this.input.dataOocId
128
+
129
+ if (id) {
130
+ const response = await client.query({
131
+ query: gql`
132
+ query ($id: String!) {
133
+ dataOoc(id: $id) {
134
+ id
135
+ name
136
+ description
137
+ ooc
138
+ oos
139
+ state
140
+ type
141
+ useCase
142
+ data
143
+ judgment
144
+ history
145
+ correctiveAction
146
+ correctiveInstruction
147
+ dataItems {
148
+ name
149
+ description
150
+ active
151
+ hidden
152
+ tag
153
+ group
154
+ type
155
+ unit
156
+ options
157
+ quota
158
+ spec
159
+ stat
160
+ }
161
+ workDate
162
+ workShift
163
+ reviewer {
164
+ id
165
+ name
166
+ }
167
+ corrector {
168
+ id
169
+ name
170
+ }
171
+ collectedAt
172
+ reviewedAt
173
+ correctedAt
174
+ }
175
+ }
176
+ `,
177
+ variables: {
178
+ id
179
+ }
180
+ })
181
+
182
+ const dataOoc = {
183
+ ...response.data.dataOoc
184
+ }
185
+
186
+ if (this.activityThread?.output) {
187
+ dataOoc.correctiveAction = this.activityThread.output.action
188
+ dataOoc.correctedAt = this.activityThread.updatedAt
189
+ dataOoc.corrector = this.activityThread.assignee
190
+ }
191
+
192
+ this.dataOoc = dataOoc
193
+ }
194
+ }
195
+ }
@@ -0,0 +1,143 @@
1
+ import '@operato/dataset/ox-data-ooc-brief-view.js'
2
+
3
+ import gql from 'graphql-tag'
4
+ import { css, html, LitElement } from 'lit'
5
+ import { customElement, property, query, state } from 'lit/decorators.js'
6
+
7
+ import { client } from '@operato/graphql'
8
+ import { i18next, localize } from '@operato/i18n'
9
+ import { ScrollbarStyles } from '@operato/styles'
10
+
11
+ @customElement('activity-ooc-resolve-view')
12
+ export class OocResolveActivityView extends localize(i18next)(LitElement) {
13
+ static styles = [
14
+ ScrollbarStyles,
15
+ css`
16
+ :host {
17
+ display: flex;
18
+ flex-direction: column;
19
+
20
+ background-color: var(--md-sys-color-surface);
21
+ }
22
+
23
+ div[content] {
24
+ flex: 1;
25
+ flex-direction: column;
26
+
27
+ display: flex;
28
+ overflow: auto;
29
+ }
30
+
31
+ ox-data-ooc-brief-view {
32
+ flex: 1;
33
+ padding: var(--spacing-large);
34
+ overflow: auto;
35
+ }
36
+
37
+ @media print {
38
+ :host {
39
+ display: block;
40
+ overflow: visible;
41
+ }
42
+
43
+ div[content] {
44
+ display: block;
45
+ overflow: visible;
46
+ }
47
+ }
48
+ `
49
+ ]
50
+
51
+ @property({ type: Object }) input?: any
52
+ @property({ type: Object }) output?: any
53
+ @property({ type: Object }) activityApproval?: any
54
+
55
+ @state() dataOoc?: any
56
+
57
+ render() {
58
+ return html`
59
+ <div content>
60
+ <ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>
61
+ </div>
62
+ `
63
+ }
64
+
65
+ updated(changes) {
66
+ if (changes.has('input')) {
67
+ this.fetchDataOoc()
68
+ }
69
+ }
70
+
71
+ async fetchDataOoc() {
72
+ const id = this.input.dataOocId
73
+
74
+ if (id) {
75
+ const response = await client.query({
76
+ query: gql`
77
+ query ($id: String!) {
78
+ dataOoc(id: $id) {
79
+ id
80
+ name
81
+ description
82
+ ooc
83
+ oos
84
+ state
85
+ type
86
+ useCase
87
+ data
88
+ judgment
89
+ history
90
+ correctiveAction
91
+ correctiveInstruction
92
+ dataItems {
93
+ name
94
+ description
95
+ active
96
+ hidden
97
+ tag
98
+ group
99
+ type
100
+ unit
101
+ options
102
+ quota
103
+ spec
104
+ stat
105
+ }
106
+ workDate
107
+ workShift
108
+ reviewer {
109
+ id
110
+ name
111
+ }
112
+ corrector {
113
+ id
114
+ name
115
+ }
116
+ collectedAt
117
+ reviewedAt
118
+ correctedAt
119
+ }
120
+ }
121
+ `,
122
+ variables: {
123
+ id
124
+ }
125
+ })
126
+
127
+ const dataOoc = {
128
+ ...response.data.dataOoc
129
+ }
130
+
131
+ const activityThread = this.activityApproval?.activityThread
132
+
133
+ if (activityThread?.output) {
134
+ /* approval 에서 사용되는 경우 corrective 관련정보를 보완한다. - approval과정에서는 아직 dataOoc.correctiveAction 정보는 채워지지 않았기 때문. */
135
+ dataOoc.correctiveAction = activityThread.output.action
136
+ dataOoc.correctedAt = activityThread.updatedAt
137
+ dataOoc.corrector = activityThread.assignee
138
+ }
139
+
140
+ this.dataOoc = dataOoc
141
+ }
142
+ }
143
+ }
@@ -0,0 +1,173 @@
1
+ import '@material/web/icon/icon.js'
2
+ import '@operato/dataset/ox-data-sample-view.js'
3
+
4
+ import gql from 'graphql-tag'
5
+ import { css, html, LitElement } from 'lit'
6
+ import { customElement, property, query, state } from 'lit/decorators.js'
7
+
8
+ import { client } from '@operato/graphql'
9
+ import { i18next, localize } from '@operato/i18n'
10
+ import { ScrollbarStyles } from '@operato/styles'
11
+
12
+ @customElement('activity-ooc-review-edit')
13
+ class OocReviewActivityEdit extends localize(i18next)(LitElement) {
14
+ static styles = [
15
+ ScrollbarStyles,
16
+ css`
17
+ :host {
18
+ display: flex;
19
+ flex-direction: column;
20
+
21
+ background-color: var(--md-sys-color-surface);
22
+ }
23
+
24
+ div[content] {
25
+ flex: 1;
26
+ flex-direction: column;
27
+
28
+ display: flex;
29
+ overflow: auto;
30
+ }
31
+
32
+ ox-data-sample-view {
33
+ flex: 1;
34
+ padding: var(--spacing-large);
35
+ overflow: auto;
36
+ }
37
+
38
+ label[instruction] {
39
+ display: flex;
40
+ flex-direction: column;
41
+
42
+ padding: var(--spacing-large);
43
+
44
+ h2 {
45
+ display: flex;
46
+
47
+ color: var(--title-text-color);
48
+ text-transform: capitalize;
49
+ margin: var(--title-margin);
50
+ align-items: center;
51
+ }
52
+
53
+ div {
54
+ padding: var(--spacing-large);
55
+ font: var(--input-field-font);
56
+ }
57
+
58
+ md-icon {
59
+ color: var(--status-danger-color);
60
+ }
61
+
62
+ textarea {
63
+ border: var(--input-field-border);
64
+ border-radius: var(--spacing-small);
65
+ margin: var(--spacing-medium);
66
+ padding: var(--spacing-medium);
67
+ font: var(--input-field-font);
68
+ color: var(--md-sys-color-on-surface);
69
+ background: var(--md-sys-color-surface-variant);
70
+
71
+ resize: none;
72
+ outline: none;
73
+ min-height: 200px;
74
+ }
75
+ }
76
+ `
77
+ ]
78
+
79
+ @property({ type: Object }) input?: any
80
+ @property({ type: Object }) output?: any
81
+ @property({ type: Object }) activityThread?: any
82
+
83
+ @state() dataOoc?: any
84
+
85
+ render() {
86
+ const instruction = this.output?.instruction
87
+ const { state } = this.activityThread || {}
88
+ const editable = state == 'unassigned' || state == 'assigned' || state == 'started' || state == 'submitted'
89
+
90
+ return html`
91
+ <div content>
92
+ <ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>
93
+ </div>
94
+
95
+ <label instruction>
96
+ <h2><md-icon>build_circle</md-icon>&nbsp;<span>${i18next.t('label.corrective instruction')}</span></h2>
97
+ ${editable
98
+ ? html`
99
+ <textarea
100
+ placeholder=${String(i18next.t('text.corrective instruction placeholder'))}
101
+ .value=${instruction || ''}
102
+ @change=${this.onChangeInstruction}
103
+ ></textarea>
104
+ `
105
+ : html`<div>${instruction}</div>`}
106
+ </label>
107
+ `
108
+ }
109
+
110
+ onChangeInstruction(e: Event) {
111
+ this.output ||= {}
112
+ this.output.instruction = (e.target as HTMLTextAreaElement).value
113
+
114
+ this.dispatchEvent(
115
+ new CustomEvent('change', {
116
+ detail: this.output
117
+ })
118
+ )
119
+ }
120
+
121
+ updated(changes) {
122
+ if (changes.has('input')) {
123
+ this.fetchDataOoc()
124
+ }
125
+ }
126
+
127
+ async fetchDataOoc() {
128
+ const id = this.input?.dataOocId
129
+
130
+ if (id) {
131
+ const response = await client.query({
132
+ query: gql`
133
+ query ($id: String!) {
134
+ dataOoc(id: $id) {
135
+ id
136
+ name
137
+ description
138
+ ooc
139
+ oos
140
+ state
141
+ type
142
+ useCase
143
+ data
144
+ judgment
145
+ dataItems {
146
+ name
147
+ description
148
+ active
149
+ hidden
150
+ tag
151
+ group
152
+ type
153
+ unit
154
+ options
155
+ quota
156
+ spec
157
+ stat
158
+ }
159
+ workDate
160
+ workShift
161
+ collectedAt
162
+ }
163
+ }
164
+ `,
165
+ variables: {
166
+ id
167
+ }
168
+ })
169
+
170
+ this.dataOoc = response.data.dataOoc
171
+ }
172
+ }
173
+ }
@@ -0,0 +1,129 @@
1
+ import '@operato/dataset/ox-data-ooc-brief-view.js'
2
+
3
+ import gql from 'graphql-tag'
4
+ import { css, html, LitElement } from 'lit'
5
+ import { customElement, property, query, state } from 'lit/decorators.js'
6
+
7
+ import { client } from '@operato/graphql'
8
+ import { i18next, localize } from '@operato/i18n'
9
+ import { ScrollbarStyles } from '@operato/styles'
10
+
11
+ @customElement('activity-ooc-review-view')
12
+ class OocReviewActivityView extends localize(i18next)(LitElement) {
13
+ static styles = [
14
+ ScrollbarStyles,
15
+ css`
16
+ :host {
17
+ display: flex;
18
+ flex-direction: column;
19
+
20
+ background-color: var(--md-sys-color-surface);
21
+ }
22
+
23
+ div[content] {
24
+ flex: 1;
25
+ flex-direction: column;
26
+
27
+ display: flex;
28
+ overflow: auto;
29
+ }
30
+
31
+ ox-data-ooc-brief-view {
32
+ flex: 1;
33
+ padding: var(--spacing-large);
34
+ overflow: auto;
35
+ }
36
+
37
+ @media print {
38
+ :host {
39
+ display: block;
40
+ overflow: visible;
41
+ }
42
+
43
+ div[content] {
44
+ display: block;
45
+ overflow: visible;
46
+ }
47
+ }
48
+ `
49
+ ]
50
+
51
+ @property({ type: Object }) input?: any
52
+ @property({ type: Object }) output?: any
53
+
54
+ @state() dataOoc?: any
55
+
56
+ render() {
57
+ return html`
58
+ <div content>
59
+ <ox-data-ooc-brief-view .dataOoc=${this.dataOoc}></ox-data-ooc-brief-view>
60
+ </div>
61
+ `
62
+ }
63
+
64
+ updated(changes) {
65
+ if (changes.has('input')) {
66
+ this.fetchDataOoc()
67
+ }
68
+ }
69
+
70
+ async fetchDataOoc() {
71
+ const id = this.input?.dataOocId
72
+
73
+ if (id) {
74
+ const response = await client.query({
75
+ query: gql`
76
+ query ($id: String!) {
77
+ dataOoc(id: $id) {
78
+ id
79
+ name
80
+ description
81
+ ooc
82
+ oos
83
+ state
84
+ type
85
+ useCase
86
+ data
87
+ judgment
88
+ history
89
+ correctiveAction
90
+ correctiveInstruction
91
+ dataItems {
92
+ name
93
+ description
94
+ active
95
+ hidden
96
+ tag
97
+ group
98
+ type
99
+ unit
100
+ options
101
+ quota
102
+ spec
103
+ stat
104
+ }
105
+ workDate
106
+ workShift
107
+ reviewer {
108
+ id
109
+ name
110
+ }
111
+ corrector {
112
+ id
113
+ name
114
+ }
115
+ collectedAt
116
+ reviewedAt
117
+ correctedAt
118
+ }
119
+ }
120
+ `,
121
+ variables: {
122
+ id
123
+ }
124
+ })
125
+
126
+ this.dataOoc = response.data.dataOoc
127
+ }
128
+ }
129
+ }
@@ -0,0 +1,35 @@
1
+ import './activities/activity-data-collect-edit' /* refered by the activity template (activity-data-collect) on server */
2
+ import './activities/activity-data-collect-view' /* refered by the activity template (activity-data-collect) on server */
3
+ import './activities/activity-data-review-edit' /* refered by the activity template (activity-data-review) on server */
4
+ import './activities/activity-data-review-view' /* refered by the activity template (activity-data-review) on server */
5
+ import './activities/activity-ooc-review-edit' /* refered by the activity template (activity-ooc-review) on server */
6
+ import './activities/activity-ooc-review-view' /* refered by the activity template (activity-ooc-review) on server */
7
+ import './activities/activity-ooc-resolve-edit' /* refered by the activity template (activity-ooc-resolve) on server */
8
+ import './activities/activity-ooc-resolve-view' /* refered by the activity template (activity-ooc-resolve) on server */
9
+ import '@operato/app/filter-renderer.js' /* register resource-object filter renderer */
10
+
11
+ import { OxGristEditorCode } from '@operato/app/grist-editor/ox-grist-editor-code.js'
12
+ import {
13
+ OxGristRendererJson5,
14
+ registerEditor as registerGristEditor,
15
+ registerRenderer as registerGristRenderer
16
+ } from '@operato/data-grist'
17
+ import { OxGristEditorDataItemSpec } from '@operato/dataset/grist-editor/ox-grist-editor-data-item-spec.js'
18
+ import { OxGristEditorPartitionKeys } from '@operato/grist-editor/ox-grist-editor-partition-keys.js'
19
+ import { OxGristRendererPartitionKeys } from '@operato/grist-editor/ox-grist-renderer-partition-keys.js'
20
+
21
+ import { OxGristEditorSignature } from '@operato/grist-editor/ox-grist-editor-signature.js'
22
+ import { OxGristRendererSignature } from '@operato/grist-editor/ox-grist-renderer-signature.js'
23
+
24
+ export default function bootstrap() {
25
+ registerGristEditor('data-item-spec', OxGristEditorDataItemSpec)
26
+ registerGristRenderer('data-item-spec', OxGristRendererJson5)
27
+
28
+ registerGristEditor('script', OxGristEditorCode)
29
+
30
+ registerGristEditor('partition-keys', OxGristEditorPartitionKeys)
31
+ registerGristRenderer('partition-keys', OxGristRendererPartitionKeys)
32
+
33
+ registerGristRenderer('signature', OxGristRendererSignature)
34
+ registerGristEditor('signature', OxGristEditorSignature)
35
+ }