@things-factory/reference-app 7.0.1-alpha.4 → 7.0.1-alpha.41
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/_index.html +1 -0
- package/client/bootstrap.js +17 -40
- package/client/editors/id-selector.js +8 -16
- package/client/pages/data-set/data-set-importer.js +4 -16
- package/client/pages/data-set/data-set-list-page.js +13 -24
- package/client/pages/grist-filters.ts +5 -6
- package/client/pages/grist-fulltext-search.ts +5 -6
- package/client/pages/grist-mode-page.js +5 -7
- package/client/pages/operation/operation-master.js +8 -9
- package/client/pages/pending-job-page.js +10 -9
- package/client/pages/product/product-master.js +9 -12
- package/client/themes/app-theme.css +19 -3
- package/client/themes/grist-theme.css +2 -2
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -35
- package/schema.graphql +86 -24
- package/views/auth-page.html +1 -0
- package/views/public/home.html +1 -0
|
@@ -38,6 +38,7 @@ class ProductMaster extends localize(i18next)(PageView) {
|
|
|
38
38
|
constructor() {
|
|
39
39
|
super()
|
|
40
40
|
this.mode = isMobileDevice() ? 'LIST' : 'GRID'
|
|
41
|
+
this.importHandler = this.defaultImportHandler
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
static get properties() {
|
|
@@ -61,7 +62,7 @@ class ProductMaster extends localize(i18next)(PageView) {
|
|
|
61
62
|
|
|
62
63
|
<div id="sorters">
|
|
63
64
|
Sort
|
|
64
|
-
<
|
|
65
|
+
<md-icon
|
|
65
66
|
@click=${e => {
|
|
66
67
|
const target = e.currentTarget
|
|
67
68
|
this.renderRoot.querySelector('#sorter-control').open({
|
|
@@ -69,7 +70,7 @@ class ProductMaster extends localize(i18next)(PageView) {
|
|
|
69
70
|
top: target.offsetTop + target.offsetHeight
|
|
70
71
|
})
|
|
71
72
|
}}
|
|
72
|
-
>expand_more</
|
|
73
|
+
>expand_more</md-icon
|
|
73
74
|
>
|
|
74
75
|
<ox-popup id="sorter-control">
|
|
75
76
|
<ox-sorters-control> </ox-sorters-control>
|
|
@@ -77,8 +78,8 @@ class ProductMaster extends localize(i18next)(PageView) {
|
|
|
77
78
|
</div>
|
|
78
79
|
|
|
79
80
|
<div id="modes">
|
|
80
|
-
<
|
|
81
|
-
<
|
|
81
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
82
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
82
83
|
</div>
|
|
83
84
|
|
|
84
85
|
<ox-record-creator id="add" .callback=${this.productCreationCallback.bind(this)}>
|
|
@@ -725,7 +726,7 @@ class ProductMaster extends localize(i18next)(PageView) {
|
|
|
725
726
|
}
|
|
726
727
|
}
|
|
727
728
|
|
|
728
|
-
async
|
|
729
|
+
async defaultImportHandler(patches) {
|
|
729
730
|
const response = await saveProducts(patches)
|
|
730
731
|
|
|
731
732
|
if (!response.errors) {
|
|
@@ -842,9 +843,7 @@ class ProductMaster extends localize(i18next)(PageView) {
|
|
|
842
843
|
...this._columns
|
|
843
844
|
.filter(column => column.type !== 'gutter' && !!column.imex)
|
|
844
845
|
.reduce((record, column) => {
|
|
845
|
-
record[column.imex.key] = column.imex.key
|
|
846
|
-
.split('.')
|
|
847
|
-
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
|
846
|
+
record[column.imex.key] = column.imex.key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
|
848
847
|
return record
|
|
849
848
|
}, {})
|
|
850
849
|
}
|
|
@@ -866,15 +865,13 @@ class ProductMaster extends localize(i18next)(PageView) {
|
|
|
866
865
|
if (!errors.find(err => err.type == 'type')) errors.push({ type: 'type', value: 'Product type is required' })
|
|
867
866
|
}
|
|
868
867
|
if (_.isEmpty(itm.packingType) || '') {
|
|
869
|
-
if (!errors.find(err => err.type == 'packingType'))
|
|
870
|
-
errors.push({ type: 'packingType', value: 'Packing type is required' })
|
|
868
|
+
if (!errors.find(err => err.type == 'packingType')) errors.push({ type: 'packingType', value: 'Packing type is required' })
|
|
871
869
|
}
|
|
872
870
|
if (_.isEmpty(itm.uom) || '') {
|
|
873
871
|
if (!errors.find(err => err.type == 'uom')) errors.push({ type: 'uom', value: 'UOM is required' })
|
|
874
872
|
}
|
|
875
873
|
if (!_.isNumber(itm.uomValue) || _.isNaN(itm.uomValue) || '' || itm?.uomValue < 0) {
|
|
876
|
-
if (!errors.find(err => err.type == 'uomValue'))
|
|
877
|
-
errors.push({ type: 'uomValue', value: 'UOM Value is required' })
|
|
874
|
+
if (!errors.find(err => err.type == 'uomValue')) errors.push({ type: 'uomValue', value: 'UOM Value is required' })
|
|
878
875
|
}
|
|
879
876
|
return itm
|
|
880
877
|
})
|
|
@@ -82,18 +82,34 @@ body {
|
|
|
82
82
|
--mdc-button-outline-width: 1px;
|
|
83
83
|
--mdc-button-horizontal-padding: 16px;
|
|
84
84
|
|
|
85
|
+
--md-fab-container-color: var(--primary-color);
|
|
86
|
+
--md-fab-icon-color: var(--focus-color);
|
|
87
|
+
|
|
88
|
+
--md-theme-on-primary: var(--theme-white-color);
|
|
89
|
+
--md-theme-primary: var(--secondary-text-color);
|
|
90
|
+
--md-theme-on-secondary: var(--theme-white-color);
|
|
91
|
+
--md-theme-secondary: var(--primary-color);
|
|
92
|
+
--md-button-outline-color: var(--primary-color);
|
|
93
|
+
--md-danger-button-primary-color: var(--status-danger-color);
|
|
94
|
+
--md-danger-button-outline-color: var(--status-danger-color);
|
|
95
|
+
--md-button-outline-width: 1px;
|
|
96
|
+
--md-button-horizontal-padding: 16px;
|
|
97
|
+
|
|
85
98
|
/* button style */
|
|
86
99
|
--button-background-color: #fafbfc;
|
|
87
100
|
--button-background-focus-color: var(--primary-color);
|
|
88
101
|
--button-border: var(--border-dark-color);
|
|
89
102
|
--button-border-radius: var(--border-radius);
|
|
90
103
|
--button-margin: var(--margin-default) var(--margin-default) var(--margin-default) 0;
|
|
91
|
-
--button-padding: var(--padding-
|
|
104
|
+
--button-padding: calc(var(--padding-narrow) * 1.5) var(--padding-wide);
|
|
92
105
|
--button-color: var(--secondary-color);
|
|
93
|
-
--button-font:
|
|
106
|
+
--button-font: 600 var(--fontsize-default) var(--theme-font);
|
|
94
107
|
--button-text-transform: capitalize;
|
|
95
108
|
--button-active-box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
|
96
109
|
--button-activ-border: 1px solid var(--primary-color);
|
|
110
|
+
--button-activ-background-color: var(--primary-color);
|
|
111
|
+
--button-activ-color: var(--theme-white-color);
|
|
112
|
+
--iconbtn-padding: var(--padding-narrow);
|
|
97
113
|
|
|
98
114
|
--button-primary-background-color: var(--primary-color);
|
|
99
115
|
--button-primary-active-background-color: var(--status-success-color);
|
|
@@ -124,7 +140,7 @@ body {
|
|
|
124
140
|
--label-color: var(--secondary-color);
|
|
125
141
|
--label-text-transform: capitalize;
|
|
126
142
|
--input-margin: var(--margin-narrow) 0;
|
|
127
|
-
--input-padding:
|
|
143
|
+
--input-padding: 6px 2px;
|
|
128
144
|
--input-min-width: 200px;
|
|
129
145
|
--input-font: normal var(--fontsize-default) var(--theme-font);
|
|
130
146
|
--input-hint-font: normal var(--fontsize-small) var(--theme-font);
|
|
@@ -155,7 +155,7 @@ body {
|
|
|
155
155
|
--record-view-font: normal 15px/32px var(--theme-font);
|
|
156
156
|
--record-view-footer-height: 50px;
|
|
157
157
|
--record-view-footer-button-height: var(--record-view-footer-height);
|
|
158
|
-
--record-view-footer-iconbutton-size:
|
|
158
|
+
--record-view-footer-iconbutton-size: 28px;
|
|
159
159
|
--record-view-footer-iconbutton-margin: -2px;
|
|
160
160
|
--record-view-footer-iconbutton-display: block;
|
|
161
161
|
--ox-grist-padding: 0;
|
|
@@ -168,7 +168,7 @@ body {
|
|
|
168
168
|
|
|
169
169
|
--record-view-footer-height: 50px;
|
|
170
170
|
--record-view-footer-button-height: var(--record-view-footer-height);
|
|
171
|
-
--record-view-footer-iconbutton-size:
|
|
171
|
+
--record-view-footer-iconbutton-size: 28px;
|
|
172
172
|
--record-view-footer-iconbutton-margin: -2px;
|
|
173
173
|
--record-view-footer-iconbutton-display: block;
|
|
174
174
|
}
|