@things-factory/dataset 7.0.1-alpha.9 → 7.0.1-alpha.92
Sign up to get free protection for your applications and to get access to all the features.
- package/client/activities/activity-ooc-resolve-edit.ts +3 -3
- package/client/activities/activity-ooc-review-edit.ts +3 -2
- package/client/components/data-entry-form.ts +6 -13
- package/client/pages/data-archive/data-archive-list-page.ts +5 -17
- package/client/pages/data-archive/data-archive-request-popup.ts +7 -10
- package/client/pages/data-entry/data-entry-list-page.ts +2 -4
- package/client/pages/data-key-set/data-key-item-list.ts +8 -22
- package/client/pages/data-key-set/data-key-set-importer.ts +4 -11
- package/client/pages/data-key-set/data-key-set-list-page.ts +6 -5
- package/client/pages/data-ooc/data-ooc-list-page.ts +26 -17
- package/client/pages/data-ooc/data-ooc-view.ts +7 -6
- package/client/pages/data-report/data-report-list-page.ts +9 -27
- package/client/pages/data-report/data-report-samples-page.ts +1 -1
- package/client/pages/data-sample/data-sample-list-page.ts +30 -14
- package/client/pages/data-sample/data-sample-search-page.ts +22 -14
- package/client/pages/data-sample/data-sample-view.ts +7 -5
- package/client/pages/data-sensor/data-sensor-list-page.ts +20 -17
- package/client/pages/data-set/data-item-list.ts +7 -15
- package/client/pages/data-set/data-set-importer.ts +5 -17
- package/client/pages/data-set/data-set-list-page.ts +33 -15
- package/client/pages/data-summary/data-summary-list-page.ts +9 -10
- package/client/pages/data-summary/data-summary-period-page.ts +5 -23
- package/client/pages/data-summary/data-summary-search-page.ts +12 -35
- package/dist-client/activities/activity-ooc-resolve-edit.d.ts +1 -0
- package/dist-client/activities/activity-ooc-resolve-edit.js +3 -3
- package/dist-client/activities/activity-ooc-resolve-edit.js.map +1 -1
- package/dist-client/activities/activity-ooc-review-edit.d.ts +1 -0
- package/dist-client/activities/activity-ooc-review-edit.js +3 -2
- package/dist-client/activities/activity-ooc-review-edit.js.map +1 -1
- package/dist-client/components/data-entry-form.d.ts +1 -0
- package/dist-client/components/data-entry-form.js +5 -10
- package/dist-client/components/data-entry-form.js.map +1 -1
- package/dist-client/pages/data-archive/data-archive-list-page.d.ts +1 -0
- package/dist-client/pages/data-archive/data-archive-list-page.js +5 -17
- package/dist-client/pages/data-archive/data-archive-list-page.js.map +1 -1
- package/dist-client/pages/data-archive/data-archive-request-popup.d.ts +1 -1
- package/dist-client/pages/data-archive/data-archive-request-popup.js +6 -10
- package/dist-client/pages/data-archive/data-archive-request-popup.js.map +1 -1
- package/dist-client/pages/data-entry/data-entry-list-page.d.ts +1 -0
- package/dist-client/pages/data-entry/data-entry-list-page.js +2 -4
- package/dist-client/pages/data-entry/data-entry-list-page.js.map +1 -1
- package/dist-client/pages/data-key-set/data-key-item-list.d.ts +1 -0
- package/dist-client/pages/data-key-set/data-key-item-list.js +7 -22
- package/dist-client/pages/data-key-set/data-key-item-list.js.map +1 -1
- package/dist-client/pages/data-key-set/data-key-set-importer.d.ts +1 -0
- package/dist-client/pages/data-key-set/data-key-set-importer.js +4 -11
- package/dist-client/pages/data-key-set/data-key-set-importer.js.map +1 -1
- package/dist-client/pages/data-key-set/data-key-set-list-page.d.ts +11 -2
- package/dist-client/pages/data-key-set/data-key-set-list-page.js +6 -5
- package/dist-client/pages/data-key-set/data-key-set-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-list-page.d.ts +7 -0
- package/dist-client/pages/data-ooc/data-ooc-list-page.js +17 -10
- package/dist-client/pages/data-ooc/data-ooc-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-view.d.ts +2 -1
- package/dist-client/pages/data-ooc/data-ooc-view.js +7 -6
- package/dist-client/pages/data-ooc/data-ooc-view.js.map +1 -1
- package/dist-client/pages/data-report/data-report-list-page.d.ts +1 -0
- package/dist-client/pages/data-report/data-report-list-page.js +4 -19
- package/dist-client/pages/data-report/data-report-list-page.js.map +1 -1
- package/dist-client/pages/data-report/data-report-samples-page.js +1 -1
- package/dist-client/pages/data-report/data-report-samples-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-list-page.d.ts +7 -0
- package/dist-client/pages/data-sample/data-sample-list-page.js +22 -10
- package/dist-client/pages/data-sample/data-sample-list-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-search-page.d.ts +1 -0
- package/dist-client/pages/data-sample/data-sample-search-page.js +15 -9
- package/dist-client/pages/data-sample/data-sample-search-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-view.d.ts +2 -0
- package/dist-client/pages/data-sample/data-sample-view.js +7 -5
- package/dist-client/pages/data-sample/data-sample-view.js.map +1 -1
- package/dist-client/pages/data-sensor/data-sensor-list-page.d.ts +17 -2
- package/dist-client/pages/data-sensor/data-sensor-list-page.js +19 -17
- package/dist-client/pages/data-sensor/data-sensor-list-page.js.map +1 -1
- package/dist-client/pages/data-set/data-item-list.d.ts +1 -1
- package/dist-client/pages/data-set/data-item-list.js +6 -15
- package/dist-client/pages/data-set/data-item-list.js.map +1 -1
- package/dist-client/pages/data-set/data-set-importer.d.ts +1 -0
- package/dist-client/pages/data-set/data-set-importer.js +5 -16
- package/dist-client/pages/data-set/data-set-importer.js.map +1 -1
- package/dist-client/pages/data-set/data-set-list-page.d.ts +17 -2
- package/dist-client/pages/data-set/data-set-list-page.js +23 -10
- package/dist-client/pages/data-set/data-set-list-page.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-list-page.d.ts +1 -0
- package/dist-client/pages/data-summary/data-summary-list-page.js +9 -10
- package/dist-client/pages/data-summary/data-summary-list-page.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-period-page.d.ts +1 -0
- package/dist-client/pages/data-summary/data-summary-period-page.js +5 -23
- package/dist-client/pages/data-summary/data-summary-period-page.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-search-page.d.ts +1 -0
- package/dist-client/pages/data-summary/data-summary-search-page.js +7 -19
- package/dist-client/pages/data-summary/data-summary-search-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/data-archive/data-archive.js +1 -1
- package/dist-server/service/data-archive/data-archive.js.map +1 -1
- package/dist-server/service/data-key-set/data-key-set.js +1 -1
- package/dist-server/service/data-key-set/data-key-set.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc.js +16 -4
- package/dist-server/service/data-ooc/data-ooc.js.map +1 -1
- package/dist-server/service/data-sample/data-sample.js +13 -3
- package/dist-server/service/data-sample/data-sample.js.map +1 -1
- package/dist-server/service/data-sensor/data-sensor.js +1 -1
- package/dist-server/service/data-sensor/data-sensor.js.map +1 -1
- package/dist-server/service/data-set-history/data-set-history.js +1 -1
- package/dist-server/service/data-set-history/data-set-history.js.map +1 -1
- package/dist-server/service/data-summary/data-summary.js +1 -1
- package/dist-server/service/data-summary/data-summary.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -15
- package/server/service/data-archive/data-archive.ts +1 -1
- package/server/service/data-key-set/data-key-set.ts +1 -1
- package/server/service/data-ooc/data-ooc.ts +31 -5
- package/server/service/data-sample/data-sample.ts +37 -7
- package/server/service/data-sensor/data-sensor.ts +11 -2
- package/server/service/data-set-history/data-set-history.ts +3 -3
- package/server/service/data-summary/data-summary.ts +16 -3
@@ -1,5 +1,5 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
1
2
|
import '@operato/dataset/ox-data-ooc-brief-view.js'
|
2
|
-
// import '@operato/dataset/ox-data-ooc-correction-part.js'
|
3
3
|
|
4
4
|
import gql from 'graphql-tag'
|
5
5
|
import { css, html, LitElement, nothing } from 'lit'
|
@@ -51,7 +51,7 @@ class OocResolveActivityEdit extends localize(i18next)(LitElement) {
|
|
51
51
|
align-items: center;
|
52
52
|
}
|
53
53
|
|
54
|
-
|
54
|
+
md-icon {
|
55
55
|
color: var(--status-danger-color);
|
56
56
|
}
|
57
57
|
|
@@ -92,7 +92,7 @@ class OocResolveActivityEdit extends localize(i18next)(LitElement) {
|
|
92
92
|
${editable
|
93
93
|
? html`
|
94
94
|
<label action>
|
95
|
-
<h2><
|
95
|
+
<h2><md-icon>build_circle</md-icon> <span>${i18next.t('label.corrective action')}</span></h2>
|
96
96
|
<textarea placeholder=${String(i18next.t('text.corrective action placeholder'))} .value=${action || ''} @change=${this.onChangeAction}></textarea>
|
97
97
|
</label>
|
98
98
|
`
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
1
2
|
import '@operato/dataset/ox-data-sample-view.js'
|
2
3
|
|
3
4
|
import gql from 'graphql-tag'
|
@@ -54,7 +55,7 @@ class OocReviewActivityEdit extends localize(i18next)(LitElement) {
|
|
54
55
|
font: var(--input-field-font);
|
55
56
|
}
|
56
57
|
|
57
|
-
|
58
|
+
md-icon {
|
58
59
|
color: var(--status-danger-color);
|
59
60
|
}
|
60
61
|
|
@@ -90,7 +91,7 @@ class OocReviewActivityEdit extends localize(i18next)(LitElement) {
|
|
90
91
|
</div>
|
91
92
|
|
92
93
|
<label instruction>
|
93
|
-
<h2><
|
94
|
+
<h2><md-icon>build_circle</md-icon> <span>${i18next.t('label.corrective instruction')}</span></h2>
|
94
95
|
${editable
|
95
96
|
? html`
|
96
97
|
<textarea
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
1
2
|
import '@operato/dataset/ox-data-entry-form.js'
|
2
3
|
|
3
4
|
import gql from 'graphql-tag'
|
@@ -6,13 +7,14 @@ import { customElement, property, query, state } from 'lit/decorators.js'
|
|
6
7
|
|
7
8
|
import { client } from '@operato/graphql'
|
8
9
|
import { i18next, localize } from '@operato/i18n'
|
9
|
-
import { ScrollbarStyles } from '@operato/styles'
|
10
|
+
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'
|
10
11
|
import { OxDataEntryForm } from '@operato/dataset/ox-data-entry-form.js'
|
11
12
|
import { DataSet } from '@operato/dataset'
|
12
13
|
|
13
14
|
@customElement('data-entry-form')
|
14
15
|
export class DataEntryForm extends localize(i18next)(LitElement) {
|
15
16
|
static styles = [
|
17
|
+
ButtonContainerStyles,
|
16
18
|
ScrollbarStyles,
|
17
19
|
css`
|
18
20
|
:host {
|
@@ -28,12 +30,6 @@ export class DataEntryForm extends localize(i18next)(LitElement) {
|
|
28
30
|
overflow: auto;
|
29
31
|
}
|
30
32
|
|
31
|
-
.button-container {
|
32
|
-
display: flex;
|
33
|
-
margin-left: auto;
|
34
|
-
padding: var(--padding-default);
|
35
|
-
}
|
36
|
-
|
37
33
|
.button-container span {
|
38
34
|
font-size: 14px;
|
39
35
|
color: #333;
|
@@ -52,11 +48,10 @@ export class DataEntryForm extends localize(i18next)(LitElement) {
|
|
52
48
|
render() {
|
53
49
|
return html`
|
54
50
|
<ox-data-entry-form .dataSet=${this.dataSet}></ox-data-entry-form>
|
51
|
+
|
55
52
|
<div class="button-container">
|
56
53
|
${!this.dataSample
|
57
|
-
? html`
|
58
|
-
<mwc-button raised @click=${this.updateDataItems.bind(this)}>${i18next.t('button.save')}</mwc-button>
|
59
|
-
`
|
54
|
+
? html` <button @click=${this.updateDataItems.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button> `
|
60
55
|
: html` <span>${i18next.t('field.collected-at')}: ${this.dataSample.collectedAt.toLocaleString()}</span> `}
|
61
56
|
</div>
|
62
57
|
`
|
@@ -101,9 +96,7 @@ export class DataEntryForm extends localize(i18next)(LitElement) {
|
|
101
96
|
collectedAt: new Date(collectedAt)
|
102
97
|
}
|
103
98
|
|
104
|
-
document.dispatchEvent(
|
105
|
-
new CustomEvent('notify', { detail: { message: i18next.t('text.data sample created successfully') } })
|
106
|
-
)
|
99
|
+
document.dispatchEvent(new CustomEvent('notify', { detail: { message: i18next.t('text.data sample created successfully') } }))
|
107
100
|
}
|
108
101
|
}
|
109
102
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
1
2
|
import '@operato/data-grist'
|
2
3
|
import '@operato/context/ox-context-page-toolbar.js'
|
3
4
|
|
@@ -77,17 +78,9 @@ export class DataArchiveListPage extends connect(store)(localize(i18next)(PageVi
|
|
77
78
|
const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')
|
78
79
|
|
79
80
|
return html`
|
80
|
-
<ox-grist
|
81
|
-
.mode=${mode}
|
82
|
-
.config=${this.gristConfig}
|
83
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
84
|
-
?url-params-sensitive=${false /* this.active */}
|
85
|
-
>
|
81
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${false /* this.active */}>
|
86
82
|
<div slot="headroom" class="header">
|
87
|
-
<div class="title">
|
88
|
-
<mwc-icon>summarize</mwc-icon>
|
89
|
-
${i18next.t('title.data-archive list')}
|
90
|
-
</div>
|
83
|
+
<div class="title">${i18next.t('title.data-archive list')}</div>
|
91
84
|
|
92
85
|
<!-- <div class="filters">
|
93
86
|
<ox-filters-form class="filter" autofocus without-search></ox-filters-form>
|
@@ -185,10 +178,7 @@ export class DataArchiveListPage extends connect(store)(localize(i18next)(PageVi
|
|
185
178
|
|
186
179
|
async openArchivePopup() {
|
187
180
|
this.popup = openPopup(
|
188
|
-
html` <data-archive-request-popup
|
189
|
-
@requested=${this.closePopupAndRefesh.bind(this)}
|
190
|
-
@created=${this.closePopupAndRefesh.bind(this)}
|
191
|
-
></data-archive-request-popup>`,
|
181
|
+
html` <data-archive-request-popup @requested=${this.closePopupAndRefesh.bind(this)} @created=${this.closePopupAndRefesh.bind(this)}></data-archive-request-popup>`,
|
192
182
|
{
|
193
183
|
backdrop: true,
|
194
184
|
size: 'small',
|
@@ -264,9 +254,7 @@ export class DataArchiveListPage extends connect(store)(localize(i18next)(PageVi
|
|
264
254
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
265
255
|
.reduce((record, column) => {
|
266
256
|
const key = column.imex === true ? column.name : column.imex.key
|
267
|
-
record[key] = key
|
268
|
-
.split('.')
|
269
|
-
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
257
|
+
record[key] = key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
270
258
|
return record
|
271
259
|
}, {})
|
272
260
|
}
|
@@ -1,17 +1,21 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
2
|
+
|
1
3
|
import gql from 'graphql-tag'
|
2
4
|
import { css, html, LitElement } from 'lit'
|
3
5
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
4
6
|
|
5
7
|
import { i18next, localize } from '@operato/i18n'
|
6
8
|
import { client } from '@operato/graphql'
|
7
|
-
import { SingleColumnFormStyles } from '@
|
9
|
+
import { SingleColumnFormStyles } from '@operato/form'
|
10
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
8
11
|
|
9
|
-
import moment from 'moment-timezone'
|
12
|
+
import moment from '@operato/moment-timezone-es'
|
10
13
|
import { CustomAlert } from '@operato/shell'
|
11
14
|
|
12
15
|
@customElement('data-archive-request-popup')
|
13
16
|
class DataArchiveRequestPopup extends localize(i18next)(LitElement) {
|
14
17
|
static styles = [
|
18
|
+
ButtonContainerStyles,
|
15
19
|
SingleColumnFormStyles,
|
16
20
|
css`
|
17
21
|
:host {
|
@@ -25,13 +29,6 @@ class DataArchiveRequestPopup extends localize(i18next)(LitElement) {
|
|
25
29
|
form {
|
26
30
|
overflow: auto;
|
27
31
|
}
|
28
|
-
|
29
|
-
.button-container {
|
30
|
-
display: flex;
|
31
|
-
margin-top: auto;
|
32
|
-
margin-left: auto;
|
33
|
-
padding: var(--padding-default);
|
34
|
-
}
|
35
32
|
`
|
36
33
|
]
|
37
34
|
|
@@ -53,7 +50,7 @@ class DataArchiveRequestPopup extends localize(i18next)(LitElement) {
|
|
53
50
|
</form>
|
54
51
|
|
55
52
|
<div class="button-container">
|
56
|
-
<
|
53
|
+
<button @click=${this.requestArchive}><md-icon>archive</md-icon>${String(i18next.t('button.submit'))}</button>
|
57
54
|
</div>
|
58
55
|
`
|
59
56
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
1
2
|
import '@operato/data-grist'
|
2
3
|
import '@operato/context/ox-context-page-toolbar.js'
|
3
4
|
import '@operato/board/ox-board-viewer.js'
|
@@ -120,10 +121,7 @@ export class DataEntryListPage extends connect(store)(localize(i18next)(PageView
|
|
120
121
|
return html`
|
121
122
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${this.active}>
|
122
123
|
<div slot="headroom" class="header">
|
123
|
-
<div class="title">
|
124
|
-
<mwc-icon>summarize</mwc-icon>
|
125
|
-
${i18next.t('title.data-entry list')}
|
126
|
-
</div>
|
124
|
+
<div class="title">${i18next.t('title.data-entry list')}</div>
|
127
125
|
|
128
126
|
<div class="filters">
|
129
127
|
<ox-filters-form autofocus without-search></ox-filters-form>
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
2
|
+
|
1
3
|
import gql from 'graphql-tag'
|
2
4
|
import { css, html, LitElement } from 'lit'
|
3
5
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
@@ -6,10 +8,12 @@ import { client } from '@operato/graphql'
|
|
6
8
|
import { i18next, localize } from '@operato/i18n'
|
7
9
|
import { isMobileDevice } from '@operato/utils'
|
8
10
|
import { DataGrist, FetchOption } from '@operato/data-grist'
|
11
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
9
12
|
|
10
13
|
@customElement('data-key-item-list')
|
11
14
|
export class DataKeyItemList extends localize(i18next)(LitElement) {
|
12
15
|
static styles = [
|
16
|
+
ButtonContainerStyles,
|
13
17
|
css`
|
14
18
|
:host {
|
15
19
|
display: flex;
|
@@ -21,19 +25,6 @@ export class DataKeyItemList extends localize(i18next)(LitElement) {
|
|
21
25
|
ox-grist {
|
22
26
|
flex: 1;
|
23
27
|
}
|
24
|
-
|
25
|
-
.button-container {
|
26
|
-
display: flex;
|
27
|
-
margin-left: auto;
|
28
|
-
padding: var(--padding-default);
|
29
|
-
}
|
30
|
-
|
31
|
-
[danger] {
|
32
|
-
--mdc-theme-primary: var(--mdc-danger-button-primary-color);
|
33
|
-
}
|
34
|
-
mwc-button {
|
35
|
-
margin-left: var(--margin-default);
|
36
|
-
}
|
37
28
|
`
|
38
29
|
]
|
39
30
|
|
@@ -43,16 +34,11 @@ export class DataKeyItemList extends localize(i18next)(LitElement) {
|
|
43
34
|
|
44
35
|
render() {
|
45
36
|
return html`
|
46
|
-
<ox-grist
|
47
|
-
|
48
|
-
.config=${this.gristConfig}
|
49
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
50
|
-
></ox-grist>
|
37
|
+
<ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}></ox-grist>
|
38
|
+
|
51
39
|
<div class="button-container">
|
52
|
-
<
|
53
|
-
|
54
|
-
>
|
55
|
-
<mwc-button raised @click=${this._updateDataKeyItems.bind(this)}>${i18next.t('button.save')}</mwc-button>
|
40
|
+
<button danger @click=${this._deleteDataKeyItems.bind(this)}><md-icon>delete_forever</md-icon>${i18next.t('button.delete')}</button>
|
41
|
+
<button @click=${this._updateDataKeyItems.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
56
42
|
</div>
|
57
43
|
`
|
58
44
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
1
2
|
import '@operato/data-grist'
|
2
3
|
|
3
4
|
import gql from 'graphql-tag'
|
@@ -7,10 +8,12 @@ import { customElement, property, query, state } from 'lit/decorators.js'
|
|
7
8
|
import { client } from '@operato/graphql'
|
8
9
|
import { i18next } from '@operato/i18n'
|
9
10
|
import { isMobileDevice } from '@operato/utils'
|
11
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
10
12
|
|
11
13
|
@customElement('data-key-set-importer')
|
12
14
|
export class DataKeySetImporter extends LitElement {
|
13
15
|
static styles = [
|
16
|
+
ButtonContainerStyles,
|
14
17
|
css`
|
15
18
|
:host {
|
16
19
|
display: flex;
|
@@ -22,16 +25,6 @@ export class DataKeySetImporter extends LitElement {
|
|
22
25
|
ox-grist {
|
23
26
|
flex: 1;
|
24
27
|
}
|
25
|
-
|
26
|
-
.button-container {
|
27
|
-
display: flex;
|
28
|
-
margin-left: auto;
|
29
|
-
padding: var(--padding-default);
|
30
|
-
}
|
31
|
-
|
32
|
-
mwc-button {
|
33
|
-
margin-left: var(--margin-default);
|
34
|
-
}
|
35
28
|
`
|
36
29
|
]
|
37
30
|
|
@@ -73,7 +66,7 @@ export class DataKeySetImporter extends LitElement {
|
|
73
66
|
></ox-grist>
|
74
67
|
|
75
68
|
<div class="button-container">
|
76
|
-
<
|
69
|
+
<button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
77
70
|
</div>
|
78
71
|
`
|
79
72
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
1
2
|
import '@operato/data-grist'
|
2
3
|
import '@operato/context/ox-context-page-toolbar.js'
|
3
4
|
import './data-key-set-importer.js'
|
@@ -102,7 +103,10 @@ export class DataKeySetListPage extends connect(store)(localize(i18next)(PageVie
|
|
102
103
|
{
|
103
104
|
title: i18next.t('button.delete'),
|
104
105
|
action: this._deleteDataKeySet.bind(this),
|
105
|
-
icon: 'delete'
|
106
|
+
icon: 'delete',
|
107
|
+
emphasis: {
|
108
|
+
danger: true
|
109
|
+
}
|
106
110
|
}
|
107
111
|
],
|
108
112
|
exportable: {
|
@@ -122,10 +126,7 @@ export class DataKeySetListPage extends connect(store)(localize(i18next)(PageVie
|
|
122
126
|
return html`
|
123
127
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
124
128
|
<div slot="headroom" class="header">
|
125
|
-
<div class="title">
|
126
|
-
<mwc-icon>summarize</mwc-icon>
|
127
|
-
${i18next.t('title.data-key-set list')}
|
128
|
-
</div>
|
129
|
+
<div class="title">${i18next.t('title.data-key-set list')}</div>
|
129
130
|
|
130
131
|
<div class="filters">
|
131
132
|
<ox-filters-form autofocus without-search></ox-filters-form>
|
@@ -1,7 +1,10 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
1
2
|
import '@operato/data-grist'
|
2
3
|
import '@operato/context/ox-context-page-toolbar.js'
|
3
4
|
import '@operato/input/ox-input-select-buttons.js'
|
4
5
|
|
6
|
+
import { p13n } from '@operato/p13n'
|
7
|
+
|
5
8
|
import './data-ooc-view.js'
|
6
9
|
|
7
10
|
import gql from 'graphql-tag'
|
@@ -33,13 +36,14 @@ import { client } from '@operato/graphql'
|
|
33
36
|
import { i18next, localize } from '@operato/i18n'
|
34
37
|
import { openPopup } from '@operato/layout'
|
35
38
|
import { PageView, store } from '@operato/shell'
|
36
|
-
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
39
|
+
import { CommonGristStyles, CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
37
40
|
import { isMobileDevice, adjustFilters } from '@operato/utils'
|
38
41
|
|
39
42
|
@customElement('data-ooc-list-page')
|
40
|
-
export class DataOocListPage extends connect(store)(localize(i18next)(PageView)) {
|
43
|
+
export class DataOocListPage extends connect(store)(p13n(localize(i18next)(PageView))) {
|
41
44
|
static styles = [
|
42
45
|
ScrollbarStyles,
|
46
|
+
CommonGristStyles,
|
43
47
|
CommonHeaderStyles,
|
44
48
|
css`
|
45
49
|
:host {
|
@@ -98,12 +102,14 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
98
102
|
const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')
|
99
103
|
|
100
104
|
return html`
|
101
|
-
<ox-grist
|
105
|
+
<ox-grist
|
106
|
+
.mode=${mode}
|
107
|
+
.config=${this.gristConfig}
|
108
|
+
.fetchHandler=${this.fetchHandler.bind(this)}
|
109
|
+
.personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')}
|
110
|
+
>
|
102
111
|
<div slot="headroom" class="header">
|
103
|
-
<div class="title">
|
104
|
-
<mwc-icon>summarize</mwc-icon>
|
105
|
-
${i18next.t('title.data-ooc list')}
|
106
|
-
</div>
|
112
|
+
<div class="title">${i18next.t('title.data-ooc list')}</div>
|
107
113
|
|
108
114
|
<div class="filters">
|
109
115
|
<ox-input-select-buttons
|
@@ -118,6 +124,8 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
118
124
|
|
119
125
|
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
120
126
|
</div>
|
127
|
+
|
128
|
+
<ox-grist-personalizer slot="setting"></ox-grist-personalizer>
|
121
129
|
</ox-grist>
|
122
130
|
`
|
123
131
|
}
|
@@ -380,11 +388,14 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
380
388
|
},
|
381
389
|
handlers: {
|
382
390
|
click: (columns, data, column, record, rowIndex) => {
|
383
|
-
const popup = openPopup(
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
391
|
+
const popup = openPopup(
|
392
|
+
html` <data-ooc-view data-ooc-id=${record.id} style="background-color: white;"></data-ooc-view> `,
|
393
|
+
{
|
394
|
+
backdrop: true,
|
395
|
+
size: 'large',
|
396
|
+
title: i18next.t('title.data-ooc view')
|
397
|
+
}
|
398
|
+
)
|
388
399
|
popup.onclosed = () => {
|
389
400
|
this.grist.fetch()
|
390
401
|
}
|
@@ -398,10 +409,6 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
398
409
|
}
|
399
410
|
]
|
400
411
|
}
|
401
|
-
|
402
|
-
await this.updateComplete
|
403
|
-
|
404
|
-
this.grist.fetch()
|
405
412
|
}
|
406
413
|
|
407
414
|
async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {
|
@@ -515,7 +522,9 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
515
522
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
516
523
|
.reduce((record, column) => {
|
517
524
|
const key = column.imex === true ? column.name : column.imex.key
|
518
|
-
record[key] = key
|
525
|
+
record[key] = key
|
526
|
+
.split('.')
|
527
|
+
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
519
528
|
return record
|
520
529
|
}, {})
|
521
530
|
}
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
2
|
+
import '@material/web/fab/fab.js'
|
1
3
|
import '@operato/dataset/ox-data-ooc-brief-view.js'
|
2
|
-
import '@material/mwc-fab'
|
3
4
|
import '@things-factory/worklist/dist-client/components/activity-thread-timeline.js'
|
4
5
|
|
5
6
|
import gql from 'graphql-tag'
|
@@ -32,7 +33,7 @@ export class DataOocView extends localize(i18next)(LitElement) {
|
|
32
33
|
margin: var(--margin-default);
|
33
34
|
}
|
34
35
|
|
35
|
-
|
36
|
+
md-fab {
|
36
37
|
position: fixed;
|
37
38
|
bottom: 15px;
|
38
39
|
right: 16px;
|
@@ -41,7 +42,7 @@ export class DataOocView extends localize(i18next)(LitElement) {
|
|
41
42
|
}
|
42
43
|
|
43
44
|
@media print {
|
44
|
-
|
45
|
+
md-fab {
|
45
46
|
display: none;
|
46
47
|
}
|
47
48
|
}
|
@@ -87,15 +88,15 @@ export class DataOocView extends localize(i18next)(LitElement) {
|
|
87
88
|
`
|
88
89
|
: nothing}
|
89
90
|
|
90
|
-
<
|
91
|
-
icon="print"
|
91
|
+
<md-fab
|
92
92
|
title="print"
|
93
93
|
@click=${() =>
|
94
94
|
GhostPrint.print({
|
95
95
|
src: `./data-ooc/${this.dataOoc.id}`
|
96
96
|
})}
|
97
|
-
>print</mwc-fab
|
98
97
|
>
|
98
|
+
<md-icon slot="icon">print</md-icon>
|
99
|
+
</md-fab>
|
99
100
|
`
|
100
101
|
}
|
101
102
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
1
2
|
import '@operato/data-grist'
|
2
3
|
import '@operato/context/ox-context-page-toolbar.js'
|
3
4
|
import '@operato/board/ox-board-viewer.js'
|
@@ -44,23 +45,12 @@ const showMonitorView = (columns, data, column, record, rowIndex) => {
|
|
44
45
|
const board = {
|
45
46
|
id: monitorView
|
46
47
|
}
|
47
|
-
openPopup(
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
hide-fullscreen
|
54
|
-
hide-navigation
|
55
|
-
></ox-board-viewer>
|
56
|
-
`,
|
57
|
-
{
|
58
|
-
closable: true,
|
59
|
-
backdrop: true,
|
60
|
-
size: 'large',
|
61
|
-
title
|
62
|
-
}
|
63
|
-
)
|
48
|
+
openPopup(html` <ox-board-viewer style="background-color: white;" .board=${board} .provider=${provider} hide-fullscreen hide-navigation></ox-board-viewer> `, {
|
49
|
+
closable: true,
|
50
|
+
backdrop: true,
|
51
|
+
size: 'large',
|
52
|
+
title
|
53
|
+
})
|
64
54
|
|
65
55
|
// navigate(`board-viewer/${monitorView}?interactive=true&title=${title}`)
|
66
56
|
break
|
@@ -166,17 +156,9 @@ export class DataReportListPage extends connect(store)(localize(i18next)(PageVie
|
|
166
156
|
const mode = 'CARD'
|
167
157
|
|
168
158
|
return html`
|
169
|
-
<ox-grist
|
170
|
-
.mode=${mode}
|
171
|
-
.config=${this.gristConfig}
|
172
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
173
|
-
?url-params-sensitive=${this.active}
|
174
|
-
>
|
159
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${this.active}>
|
175
160
|
<div slot="headroom" class="header">
|
176
|
-
<div class="title">
|
177
|
-
<mwc-icon>summarize</mwc-icon>
|
178
|
-
${i18next.t('title.data-report list')}
|
179
|
-
</div>
|
161
|
+
<div class="title">${i18next.t('title.data-report list')}</div>
|
180
162
|
|
181
163
|
<div class="filters">
|
182
164
|
<ox-filters-form class="filter" autofocus without-search></ox-filters-form>
|
@@ -8,7 +8,7 @@ import gql from 'graphql-tag'
|
|
8
8
|
import { css, html } from 'lit'
|
9
9
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
10
10
|
import { connect } from 'pwa-helpers/connect-mixin'
|
11
|
-
import moment from 'moment-timezone'
|
11
|
+
import moment from '@operato/moment-timezone-es'
|
12
12
|
|
13
13
|
import { client } from '@operato/graphql'
|
14
14
|
import { i18next, localize } from '@operato/i18n'
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '@material/web/icon/icon.js'
|
1
2
|
import '@operato/data-grist'
|
2
3
|
import '@operato/context/ox-context-page-toolbar.js'
|
3
4
|
import './data-sample-view.js'
|
@@ -6,21 +7,24 @@ import gql from 'graphql-tag'
|
|
6
7
|
import { css, html } from 'lit'
|
7
8
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
8
9
|
import { connect } from 'pwa-helpers/connect-mixin'
|
9
|
-
import moment from 'moment-timezone'
|
10
|
+
import moment from '@operato/moment-timezone-es'
|
10
11
|
|
11
12
|
import { DataGrist, FetchOption, GristRecord } from '@operato/data-grist'
|
12
13
|
import { client } from '@operato/graphql'
|
13
14
|
import { i18next, localize } from '@operato/i18n'
|
14
15
|
import { openPopup } from '@operato/layout'
|
15
16
|
import { PageView, store } from '@operato/shell'
|
16
|
-
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
17
|
+
import { CommonGristStyles, CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
17
18
|
import { isMobileDevice } from '@operato/utils'
|
18
19
|
import { GhostPrint } from '@operato/ghost-print'
|
19
20
|
|
21
|
+
import { p13n } from '@operato/p13n'
|
22
|
+
|
20
23
|
@customElement('data-sample-list-page')
|
21
|
-
export class DataSampleListPage extends connect(store)(localize(i18next)(PageView)) {
|
24
|
+
export class DataSampleListPage extends connect(store)(p13n(localize(i18next)(PageView))) {
|
22
25
|
static styles = [
|
23
26
|
ScrollbarStyles,
|
27
|
+
CommonGristStyles,
|
24
28
|
CommonHeaderStyles,
|
25
29
|
css`
|
26
30
|
:host {
|
@@ -78,12 +82,15 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
78
82
|
const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')
|
79
83
|
|
80
84
|
return html`
|
81
|
-
<ox-grist
|
85
|
+
<ox-grist
|
86
|
+
.mode=${mode}
|
87
|
+
.config=${this.gristConfig}
|
88
|
+
.fetchHandler=${this.fetchHandler.bind(this)}
|
89
|
+
.personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')}
|
90
|
+
?url-params-sensitive=${false /* this.active */}
|
91
|
+
>
|
82
92
|
<div slot="headroom" class="header">
|
83
|
-
<div class="title">
|
84
|
-
<mwc-icon>summarize</mwc-icon>
|
85
|
-
${i18next.t('title.data-sample list')}
|
86
|
-
</div>
|
93
|
+
<div class="title">${i18next.t('title.data-sample list')}</div>
|
87
94
|
|
88
95
|
<div class="filters">
|
89
96
|
<ox-filters-form class="filter" autofocus without-search></ox-filters-form>
|
@@ -91,6 +98,8 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
91
98
|
|
92
99
|
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
93
100
|
</div>
|
101
|
+
|
102
|
+
<ox-grist-personalizer slot="setting"></ox-grist-personalizer>
|
94
103
|
</ox-grist>
|
95
104
|
`
|
96
105
|
}
|
@@ -310,11 +319,16 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
310
319
|
},
|
311
320
|
handlers: {
|
312
321
|
click: (columns, data, column, record, rowIndex) => {
|
313
|
-
openPopup(
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
322
|
+
openPopup(
|
323
|
+
html`
|
324
|
+
<data-sample-view data-sample-id=${record.id} style="background-color: white;"></data-sample-view>
|
325
|
+
`,
|
326
|
+
{
|
327
|
+
backdrop: true,
|
328
|
+
size: 'large',
|
329
|
+
title: i18next.t('title.data-sample view')
|
330
|
+
}
|
331
|
+
)
|
318
332
|
}
|
319
333
|
}
|
320
334
|
},
|
@@ -401,7 +415,9 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
401
415
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
402
416
|
.reduce((record, column) => {
|
403
417
|
const key = column.imex === true ? column.name : column.imex.key
|
404
|
-
record[key] = key
|
418
|
+
record[key] = key
|
419
|
+
.split('.')
|
420
|
+
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
405
421
|
return record
|
406
422
|
}, {})
|
407
423
|
}
|