@things-factory/operato-mms 7.0.0-alpha.9 → 7.0.0
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 +8 -3
- package/client/actions/mms.js +1 -1
- package/client/bootstrap.js +24 -15
- package/client/components/attachment-viewer.js +2 -2
- package/client/components/category-selector-popup.js +22 -23
- package/client/components/image-viewer.js +2 -2
- package/client/components/marketplace-order-max-weight.js +7 -7
- package/client/components/mms-home-cards.js +11 -11
- package/client/components/stock-allocation-ratio.js +17 -18
- package/client/components/variant-option-editor.js +9 -9
- package/client/components/variant-options-editor.js +4 -4
- package/client/components/wizard-view.js +3 -3
- package/client/menu.js +1 -1
- package/client/pages/catalogue/basic-product-setting.js +13 -13
- package/client/pages/catalogue/constants/product-type.js +1 -1
- package/client/pages/catalogue/create-new-product-popup.js +3 -3
- package/client/pages/catalogue/home.js +3 -3
- package/client/pages/catalogue/product-detail-popup.js +3 -3
- package/client/pages/catalogue/product-marketplace-setting.js +3 -3
- package/client/pages/catalogue/product-variation-setting.js +3 -3
- package/client/pages/catalogue/products.js +4 -3
- package/client/pages/catalogue/warehouse-marketplace-auto-link-popup.js +16 -15
- package/client/pages/catalogue/warehouse-marketplace-link-popup.js +3 -3
- package/client/pages/catalogue/warehouse-products.js +2 -2
- package/client/pages/catalogue-variation/home.js +3 -3
- package/client/pages/catalogue-variation/product-variations.js +1 -1
- package/client/pages/inventory/inventory-by-product.js +1 -1
- package/client/pages/inventory/inventory-history.js +1 -1
- package/client/pages/order/home.js +3 -3
- package/client/pages/order/logistics/batch-init-popup.js +6 -6
- package/client/pages/order/logistics/branch-logistics-popup.js +4 -4
- package/client/pages/order/logistics/lazada-order-init-batch-popup.js +5 -5
- package/client/pages/order/logistics/order-init-popup.js +3 -3
- package/client/pages/order/logistics/order-items.js +4 -4
- package/client/pages/order/logistics/order-shipping-items.js +12 -12
- package/client/pages/order/logistics/order-shipping.js +3 -3
- package/client/pages/order/logistics/pickup-logistics-popup.js +4 -4
- package/client/pages/order/logistics/request-ro-popup.js +4 -4
- package/client/pages/order/logistics/shopee-order-init-batch-popup.js +5 -5
- package/client/pages/order/order-by-store.js +2 -2
- package/client/pages/order/select-datetime-popup.js +3 -3
- package/client/pages/promotions/activities.js +1 -1
- package/client/pages/promotions/create-new-promotion.js +2 -2
- package/client/pages/promotions/promotions.js +1 -1
- package/client/pages/reports/custom.js +1 -1
- package/client/pages/reports/daily-sales-average.js +1 -1
- package/client/pages/reports/inventory.js +1 -1
- package/client/pages/reports/sales-by-platform/home.js +11 -11
- package/client/pages/reports/sales-by-platform/lazada-sales-report.js +3 -3
- package/client/pages/reports/sales-by-platform/shopee-sales-report.js +3 -3
- package/client/pages/reports/sales-by-promotion.js +1 -1
- package/client/pages/reports/sales-by-store.js +1 -1
- package/client/pages/reports/top-selling.js +1 -1
- package/client/pages/reports/total-orders.js +1 -1
- package/client/pages/reports/total-sales.js +1 -1
- package/client/pages/setting/marketplace-setting.js +3 -3
- package/client/pages/stock-replenishment/create-stock-replenishment.js +6 -7
- package/client/pages/stock-replenishment/stock-replenishment-detail.js +12 -13
- package/client/pages/stock-replenishment/stock-replenishment-list.js +4 -4
- package/client/themes/app-theme.css +30 -31
- package/client/themes/report-theme.css +3 -3
- package/config/config.production.js +0 -1
- package/dist-server/controllers/index.d.ts +0 -0
- package/dist-server/entities/index.d.ts +2 -0
- package/dist-server/graphql/index.d.ts +6 -0
- package/dist-server/graphql/resolvers/index.d.ts +23 -0
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/add-release-order.d.ts +6 -0
- package/dist-server/graphql/resolvers/interface-with-hub/add-release-order.js +1 -0
- package/dist-server/graphql/resolvers/interface-with-hub/add-release-order.js.map +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/auto-add-release-order.d.ts +5 -0
- package/dist-server/graphql/resolvers/interface-with-hub/auto-add-release-order.js +1 -0
- package/dist-server/graphql/resolvers/interface-with-hub/auto-add-release-order.js.map +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/auto-update-all-marketplace-product-variation-quantity.d.ts +6 -0
- package/dist-server/graphql/resolvers/interface-with-hub/auto-update-all-marketplace-product-variation-quantity.js.map +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/generate-replenishment-order.d.ts +6 -0
- package/dist-server/graphql/resolvers/interface-with-hub/index.d.ts +20 -0
- package/dist-server/graphql/resolvers/interface-with-hub/index.js.map +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.d.ts +18 -0
- package/dist-server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.js +2 -2
- package/dist-server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.js.map +1 -1
- package/dist-server/graphql/resolvers/shipping-provider/index.d.ts +1 -0
- package/dist-server/graphql/resolvers/shipping-provider/index.js.map +1 -1
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.d.ts +9 -0
- package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js.map +1 -1
- package/dist-server/graphql/resolvers/warehouse-product/auto-link-warehouse-marketplace-product-variations.d.ts +6 -0
- package/dist-server/graphql/resolvers/warehouse-product/auto-link-warehouse-marketplace-product-variations.js.map +1 -1
- package/dist-server/graphql/resolvers/warehouse-product/index.d.ts +6 -0
- package/dist-server/graphql/types/index.d.ts +3 -0
- package/dist-server/graphql/types/interface-with-hub/index.d.ts +3 -0
- package/dist-server/graphql/types/interface-with-hub/new-stock-replenishment.d.ts +1 -0
- package/dist-server/graphql/types/interface-with-hub/replenishment-order-product.d.ts +1 -0
- package/dist-server/graphql/types/interface-with-hub/stock-replenishment-list.d.ts +1 -0
- package/dist-server/graphql/types/interface-with-hub/stock-replenishment.d.ts +1 -0
- package/dist-server/graphql/types/interface-with-hub/warehouse-inventory.d.ts +1 -0
- package/dist-server/graphql/types/interface-with-hub/warehouse-marketplace-product-list.d.ts +1 -0
- package/dist-server/graphql/types/interface-with-hub/warehouse-marketplace-product.d.ts +1 -0
- package/dist-server/graphql/types/shipping-provider/index.d.ts +2 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider-list.d.ts +1 -0
- package/dist-server/graphql/types/shipping-provider/shipping-provider.d.ts +1 -0
- package/dist-server/graphql/types/warehouse-product/index.d.ts +2 -0
- package/dist-server/graphql/types/warehouse-product/warehouse-product.d.ts +1 -0
- package/dist-server/index.d.ts +4 -0
- package/dist-server/middlewares/index.d.ts +0 -0
- package/dist-server/migrations/1599732967233-SeedCommonCode.d.ts +5 -0
- package/dist-server/migrations/1608009991075-SeedUser.d.ts +5 -0
- package/dist-server/migrations/1608009991075-SeedUser.js.map +1 -1
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/routers/etrax-router.d.ts +1 -0
- package/dist-server/routers/etrax-router.js.map +1 -1
- package/dist-server/routers/shopify-pos-public-router.d.ts +1 -0
- package/dist-server/routers/shopify-pos-public-router.js.map +1 -1
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/dist-server/util/interface-helper.d.ts +6 -0
- package/dist-server/util/interface-helper.js.map +1 -1
- package/dist-server/util/no-generator.d.ts +4 -0
- package/package.json +61 -61
- package/views/auth-page.html +5 -2
- package/views/public/home.html +6 -3
- package/client/themes/grist-theme.css +0 -200
- package/client/themes/layout-theme.css +0 -92
package/_index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
@@ -52,6 +52,10 @@
|
|
|
52
52
|
<!-- Performance tip: hint to the browser to start the handshake for the fonts site -->
|
|
53
53
|
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />
|
|
54
54
|
<link href="/node_modules/@material-design-icons/font/index.css" rel="stylesheet" />
|
|
55
|
+
<link href="/node_modules/material-symbols/index.css" rel="stylesheet" />
|
|
56
|
+
<link href="/node_modules/@fontsource/roboto/index.css" rel="stylesheet" />
|
|
57
|
+
<link rel="stylesheet" href="/theme.css" />
|
|
58
|
+
|
|
55
59
|
<style>
|
|
56
60
|
body {
|
|
57
61
|
margin: 0;
|
|
@@ -65,7 +69,8 @@
|
|
|
65
69
|
line-height: 1.5;
|
|
66
70
|
-webkit-font-smoothing: antialiased;
|
|
67
71
|
|
|
68
|
-
accent-color: var(--
|
|
72
|
+
accent-color: var(--md-sys-color-primary);
|
|
73
|
+
background-color: var(--md-sys-color-background);
|
|
69
74
|
}
|
|
70
75
|
</style>
|
|
71
76
|
|
|
@@ -89,7 +94,7 @@
|
|
|
89
94
|
}
|
|
90
95
|
</script>
|
|
91
96
|
</head>
|
|
92
|
-
<body>
|
|
97
|
+
<body class="light">
|
|
93
98
|
<things-app></things-app>
|
|
94
99
|
<noscript> Please enable JavaScript to view this website. </noscript>
|
|
95
100
|
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
|
package/client/actions/mms.js
CHANGED
package/client/bootstrap.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@operato/i18n/ox-i18n.js'
|
|
2
|
-
import '@things-factory/auth-ui' /* for domain-switch */
|
|
2
|
+
import '@things-factory/auth-ui/dist-client' /* for domain-switch */
|
|
3
|
+
import '@things-factory/setting-ui/dist-client' /* theme-mode-setting-let */
|
|
3
4
|
import '@things-factory/notification'
|
|
4
5
|
import './menu'
|
|
5
6
|
import './viewparts/user-circle'
|
|
@@ -7,17 +8,17 @@ import './viewparts/user-circle'
|
|
|
7
8
|
import { html } from 'lit'
|
|
8
9
|
|
|
9
10
|
import { registerDefaultGroups } from '@operato/board/register-default-groups.js'
|
|
10
|
-
import { APPEND_APP_TOOL } from '@things-factory/apptool-base'
|
|
11
|
-
import { setupAppToolPart } from '@things-factory/apptool-ui'
|
|
11
|
+
import { APPEND_APP_TOOL } from '@things-factory/apptool-base/client'
|
|
12
|
+
import { setupAppToolPart } from '@things-factory/apptool-ui/dist-client'
|
|
12
13
|
import { auth, hasPrivilege } from '@things-factory/auth-base/dist-client'
|
|
13
|
-
import { setAuthManagementMenus } from '@things-factory/auth-ui'
|
|
14
|
+
import { setAuthManagementMenus } from '@things-factory/auth-ui/dist-client'
|
|
14
15
|
import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'
|
|
15
16
|
import { setupMenuPart } from '@things-factory/lite-menu'
|
|
16
|
-
import { setupContextUIPart } from '@things-factory/context-ui'
|
|
17
|
-
import { ADD_MORENDA } from '@things-factory/more-base'
|
|
18
|
-
import { ADD_SETTING } from '@things-factory/setting-base'
|
|
19
|
-
import { navigate, store } from '@
|
|
20
|
-
import { isMobileDevice } from '@
|
|
17
|
+
import { setupContextUIPart } from '@things-factory/context-ui/dist-client'
|
|
18
|
+
import { ADD_MORENDA } from '@things-factory/more-base/client'
|
|
19
|
+
import { ADD_SETTING } from '@things-factory/setting-base/dist-client'
|
|
20
|
+
import { navigate, store } from '@operato/shell'
|
|
21
|
+
import { isMobileDevice } from '@operato/utils'
|
|
21
22
|
|
|
22
23
|
import { fetchMmsStatus } from './actions/mms'
|
|
23
24
|
import mms from './reducers/mms'
|
|
@@ -51,7 +52,7 @@ export default async function bootstrap() {
|
|
|
51
52
|
})
|
|
52
53
|
|
|
53
54
|
await setupMenuPart({
|
|
54
|
-
slotTemplate: html` <domain-switch slot="head"></domain-switch> `
|
|
55
|
+
slotTemplate: html` <domain-switch attrname="description" slot="head"></domain-switch> `
|
|
55
56
|
})
|
|
56
57
|
|
|
57
58
|
store.addReducers({ mms })
|
|
@@ -60,7 +61,7 @@ export default async function bootstrap() {
|
|
|
60
61
|
store.dispatch({
|
|
61
62
|
type: ADD_MORENDA,
|
|
62
63
|
morenda: {
|
|
63
|
-
icon: html` <
|
|
64
|
+
icon: html` <md-icon>settings</md-icon> `,
|
|
64
65
|
name: html` <ox-i18n msgid="label.setting"></ox-i18n> `,
|
|
65
66
|
action: () => {
|
|
66
67
|
navigate('setting')
|
|
@@ -75,7 +76,7 @@ export default async function bootstrap() {
|
|
|
75
76
|
store.dispatch({
|
|
76
77
|
type: ADD_MORENDA,
|
|
77
78
|
morenda: {
|
|
78
|
-
icon: html` <
|
|
79
|
+
icon: html` <md-icon>view_list</md-icon> `,
|
|
79
80
|
name: html` <ox-i18n msgid="text.addon-menu management"></ox-i18n> `,
|
|
80
81
|
action: () => {
|
|
81
82
|
navigate('addon-menu-setting')
|
|
@@ -104,7 +105,7 @@ export default async function bootstrap() {
|
|
|
104
105
|
store.dispatch({
|
|
105
106
|
type: ADD_MORENDA,
|
|
106
107
|
morenda: {
|
|
107
|
-
icon: html` <
|
|
108
|
+
icon: html` <md-icon>help</md-icon> `,
|
|
108
109
|
name: html` <ox-i18n msgid="text.help"></ox-i18n> `,
|
|
109
110
|
action: () => {
|
|
110
111
|
navigate('help')
|
|
@@ -143,7 +144,7 @@ export default async function bootstrap() {
|
|
|
143
144
|
store.dispatch({
|
|
144
145
|
type: ADD_MORENDA,
|
|
145
146
|
morenda: {
|
|
146
|
-
icon: html` <
|
|
147
|
+
icon: html` <md-icon>device_hub</md-icon> `,
|
|
147
148
|
name: html` <ox-i18n msgid="text.connection"></ox-i18n> `,
|
|
148
149
|
action: () => {
|
|
149
150
|
navigate('connection')
|
|
@@ -154,7 +155,7 @@ export default async function bootstrap() {
|
|
|
154
155
|
store.dispatch({
|
|
155
156
|
type: ADD_MORENDA,
|
|
156
157
|
morenda: {
|
|
157
|
-
icon: html` <
|
|
158
|
+
icon: html` <md-icon>format_list_numbered</md-icon> `,
|
|
158
159
|
name: html` <ox-i18n msgid="text.scenario"></ox-i18n> `,
|
|
159
160
|
action: () => {
|
|
160
161
|
navigate('scenario')
|
|
@@ -162,6 +163,14 @@ export default async function bootstrap() {
|
|
|
162
163
|
}
|
|
163
164
|
})
|
|
164
165
|
|
|
166
|
+
store.dispatch({
|
|
167
|
+
type: ADD_SETTING,
|
|
168
|
+
setting: {
|
|
169
|
+
seq: 10,
|
|
170
|
+
template: html` <theme-mode-setting-let></theme-mode-setting-let> `
|
|
171
|
+
}
|
|
172
|
+
})
|
|
173
|
+
|
|
165
174
|
store.dispatch({
|
|
166
175
|
type: ADD_SETTING,
|
|
167
176
|
setting: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i18next, localize } from '@
|
|
1
|
+
import { i18next, localize } from '@operato/i18n'
|
|
2
2
|
import { css, html, LitElement } from 'lit'
|
|
3
3
|
|
|
4
4
|
class AttachmentViewer extends localize(i18next)(LitElement) {
|
|
@@ -19,7 +19,7 @@ class AttachmentViewer extends localize(i18next)(LitElement) {
|
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
overflow-x: overlay;
|
|
22
|
-
background-color: var(--
|
|
22
|
+
background-color: var(--md-sys-color-background);
|
|
23
23
|
}
|
|
24
24
|
.container {
|
|
25
25
|
display: flex;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, html, LitElement } from 'lit'
|
|
2
|
-
import { i18next, localize } from '@
|
|
3
|
-
import { ScrollbarStyles } from '@
|
|
2
|
+
import { i18next, localize } from '@operato/i18n'
|
|
3
|
+
import { ScrollbarStyles } from '@operato/styles'
|
|
4
4
|
|
|
5
5
|
export class CategorySelectorPopup extends localize(i18next)(LitElement) {
|
|
6
6
|
static get properties() {
|
|
@@ -20,7 +20,7 @@ export class CategorySelectorPopup extends localize(i18next)(LitElement) {
|
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: column;
|
|
22
22
|
|
|
23
|
-
background-color:
|
|
23
|
+
background-color: var(--md-sys-color-surface);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.button-container {
|
|
@@ -42,11 +42,11 @@ export class CategorySelectorPopup extends localize(i18next)(LitElement) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
[path] {
|
|
45
|
-
padding: var(--
|
|
46
|
-
color: var(--
|
|
45
|
+
padding: var(--spacing-large, 15px);
|
|
46
|
+
color: var(--md-sys-color-secondary);
|
|
47
47
|
}
|
|
48
48
|
[path] strong {
|
|
49
|
-
color: var(--
|
|
49
|
+
color: var(--md-sys-color-primary);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
[categories] {
|
|
@@ -59,9 +59,9 @@ export class CategorySelectorPopup extends localize(i18next)(LitElement) {
|
|
|
59
59
|
|
|
60
60
|
overflow-x: auto;
|
|
61
61
|
|
|
62
|
-
background-color: var(--
|
|
63
|
-
padding: var(--
|
|
64
|
-
border: var(--border-
|
|
62
|
+
background-color: var(--md-sys-color-background);
|
|
63
|
+
padding: var(--spacing-large, 15px);
|
|
64
|
+
border: var(--border-dim-color);
|
|
65
65
|
border-width: 2px 0 1px 0;
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -72,13 +72,13 @@ export class CategorySelectorPopup extends localize(i18next)(LitElement) {
|
|
|
72
72
|
margin-right: -1px;
|
|
73
73
|
|
|
74
74
|
border-radius: var(--border-radius);
|
|
75
|
-
border: var(--border-
|
|
76
|
-
padding: var(--
|
|
77
|
-
background-color:
|
|
75
|
+
border: var(--border-dim-color);
|
|
76
|
+
padding: var(--spacing-small, 4px);
|
|
77
|
+
background-color: var(--md-sys-color-surface);
|
|
78
78
|
}
|
|
79
79
|
[category-level] > div {
|
|
80
|
-
padding: var(--
|
|
81
|
-
color: var(--
|
|
80
|
+
padding: var(--spacing-small, 4px) var(--spacing-medium, 9px);
|
|
81
|
+
color: var(--md-sys-color-secondary);
|
|
82
82
|
font-size: 0.9rem;
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -89,7 +89,7 @@ export class CategorySelectorPopup extends localize(i18next)(LitElement) {
|
|
|
89
89
|
|
|
90
90
|
[category-level] > div[selected] {
|
|
91
91
|
background: rgba(0, 0, 0, 0.09);
|
|
92
|
-
color: var(--
|
|
92
|
+
color: var(--md-sys-color-primary);
|
|
93
93
|
font-weight: bold;
|
|
94
94
|
}
|
|
95
95
|
div[search] {
|
|
@@ -99,12 +99,12 @@ export class CategorySelectorPopup extends localize(i18next)(LitElement) {
|
|
|
99
99
|
--mdc-icon-size: 20px;
|
|
100
100
|
|
|
101
101
|
flex: 20px;
|
|
102
|
-
border-bottom: var(--border-
|
|
102
|
+
border-bottom: var(--border-dim-color);
|
|
103
103
|
}
|
|
104
104
|
div[search] input {
|
|
105
105
|
flex: 1;
|
|
106
106
|
border: none;
|
|
107
|
-
border-bottom: var(--border-
|
|
107
|
+
border-bottom: var(--border-dim-color);
|
|
108
108
|
max-width: 90%;
|
|
109
109
|
font-size: 1rem;
|
|
110
110
|
}
|
|
@@ -124,12 +124,11 @@ export class CategorySelectorPopup extends localize(i18next)(LitElement) {
|
|
|
124
124
|
<div search><mwc-icon>search</mwc-icon> <input type="text" /></div>
|
|
125
125
|
|
|
126
126
|
${categories.map(
|
|
127
|
-
category =>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
`
|
|
127
|
+
category => html`
|
|
128
|
+
<div @click=${e => this.onclickCategory(category)} ?selected=${selected === category.id}>
|
|
129
|
+
${category.name} <span>${category.hasSubcategories ? '>' : ''}</span>
|
|
130
|
+
</div>
|
|
131
|
+
`
|
|
133
132
|
)}
|
|
134
133
|
</div>
|
|
135
134
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i18next, localize } from '@
|
|
1
|
+
import { i18next, localize } from '@operato/i18n'
|
|
2
2
|
import { css, html, LitElement } from 'lit'
|
|
3
3
|
|
|
4
4
|
class ImageViewer extends localize(i18next)(LitElement) {
|
|
@@ -19,7 +19,7 @@ class ImageViewer extends localize(i18next)(LitElement) {
|
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
overflow-x: overlay;
|
|
22
|
-
background-color: var(--
|
|
22
|
+
background-color: var(--md-sys-color-background);
|
|
23
23
|
}
|
|
24
24
|
.container {
|
|
25
25
|
display: flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i18next, localize } from '@
|
|
1
|
+
import { i18next, localize } from '@operato/i18n'
|
|
2
2
|
import { client, CustomAlert } from '@things-factory/shell'
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -7,9 +7,9 @@ class MarketplaceOrderMaxWeight extends localize(i18next)(LitElement) {
|
|
|
7
7
|
static get styles() {
|
|
8
8
|
return css`
|
|
9
9
|
[field-2column] {
|
|
10
|
-
background-color: var(--
|
|
11
|
-
margin: var(--
|
|
12
|
-
padding: var(--
|
|
10
|
+
background-color: var(--md-sys-color-surface-variant);
|
|
11
|
+
margin: var(--spacing-large) 0;
|
|
12
|
+
padding: var(--spacing-large);
|
|
13
13
|
border-radius: var(--border-radius);
|
|
14
14
|
box-shadow: var(--box-shadow);
|
|
15
15
|
max-width: var(--input-container-max-width);
|
|
@@ -20,14 +20,14 @@ class MarketplaceOrderMaxWeight extends localize(i18next)(LitElement) {
|
|
|
20
20
|
[field] {
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-direction: column;
|
|
23
|
-
padding-bottom: var(--
|
|
23
|
+
padding-bottom: var(--spacing-medium);
|
|
24
24
|
}
|
|
25
25
|
[grid-span] {
|
|
26
26
|
grid-column: span 2;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
input {
|
|
30
|
-
border: var(--border-
|
|
30
|
+
border: var(--border-dim-color);
|
|
31
31
|
border-radius: var(--border-radius);
|
|
32
32
|
margin: var(--input-margin);
|
|
33
33
|
padding: var(--input-padding);
|
|
@@ -39,7 +39,7 @@ class MarketplaceOrderMaxWeight extends localize(i18next)(LitElement) {
|
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
|
|
41
41
|
font: var(--label-font);
|
|
42
|
-
color: var(--label-color);
|
|
42
|
+
color: var(--label-color, var(--md-sys-color-on-surface));
|
|
43
43
|
text-transform: var(--label-text-transform);
|
|
44
44
|
}
|
|
45
45
|
mwc-button {
|
|
@@ -10,7 +10,7 @@ class MmsHomeCards extends LitElement {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
ul {
|
|
13
|
-
margin: 0 0 var(--
|
|
13
|
+
margin: 0 0 var(--spacing-large) 0;
|
|
14
14
|
padding: 0;
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
list-style: none;
|
|
@@ -19,17 +19,17 @@ class MmsHomeCards extends LitElement {
|
|
|
19
19
|
li {
|
|
20
20
|
display: block;
|
|
21
21
|
float: left;
|
|
22
|
-
background-color: var(--
|
|
22
|
+
background-color: var(--md-sys-color-surface-variant);
|
|
23
23
|
border-radius: var(--border-radius);
|
|
24
|
-
border: 1px solid var(--
|
|
24
|
+
border: 1px solid var(--md-sys-color-on-primary);
|
|
25
25
|
box-shadow: var(--box-shadow);
|
|
26
|
-
margin: var(--
|
|
27
|
-
padding: var(--
|
|
26
|
+
margin: var(--spacing-small) var(--spacing-medium) var(--spacing-medium) 0;
|
|
27
|
+
padding: var(--spacing-medium) var(--spacing-medium) var(--spacing-small) var(--spacing-medium);
|
|
28
28
|
text-align: center;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
li:hover {
|
|
32
|
-
border: 1px solid var(--
|
|
32
|
+
border: 1px solid var(--md-sys-color-primary);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
* {
|
|
@@ -41,11 +41,11 @@ class MmsHomeCards extends LitElement {
|
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
text-decoration: none;
|
|
43
43
|
font-size: var(--fontsize-small);
|
|
44
|
-
color: var(--
|
|
44
|
+
color: var(--md-sys-color-secondary);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
mwc-icon {
|
|
48
|
-
color: var(--
|
|
48
|
+
color: var(--md-sys-color-primary);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
strong {
|
|
@@ -58,11 +58,11 @@ class MmsHomeCards extends LitElement {
|
|
|
58
58
|
max-width: 100%;
|
|
59
59
|
min-height: 20px;
|
|
60
60
|
opacity: 0.8;
|
|
61
|
-
border-top: var(--border-
|
|
62
|
-
margin-top: var(--
|
|
61
|
+
border-top: var(--border-dim-color);
|
|
62
|
+
margin-top: var(--spacing-small);
|
|
63
63
|
|
|
64
64
|
font-size: var(--fontsize-small);
|
|
65
|
-
color: var(--
|
|
65
|
+
color: var(--md-sys-color-secondary);
|
|
66
66
|
}
|
|
67
67
|
a,
|
|
68
68
|
strong,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i18next, localize } from '@
|
|
1
|
+
import { i18next, localize } from '@operato/i18n'
|
|
2
2
|
import { client, CustomAlert } from '@things-factory/shell'
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -7,9 +7,9 @@ class StockAllocationRatio extends localize(i18next)(LitElement) {
|
|
|
7
7
|
static get styles() {
|
|
8
8
|
return css`
|
|
9
9
|
[field-2column] {
|
|
10
|
-
background-color: var(--
|
|
11
|
-
margin: var(--
|
|
12
|
-
padding: var(--
|
|
10
|
+
background-color: var(--md-sys-color-surface-variant);
|
|
11
|
+
margin: var(--spacing-large) 0;
|
|
12
|
+
padding: var(--spacing-large);
|
|
13
13
|
border-radius: var(--border-radius);
|
|
14
14
|
box-shadow: var(--box-shadow);
|
|
15
15
|
max-width: var(--input-container-max-width);
|
|
@@ -20,14 +20,14 @@ class StockAllocationRatio extends localize(i18next)(LitElement) {
|
|
|
20
20
|
[field] {
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-direction: column;
|
|
23
|
-
padding-bottom: var(--
|
|
23
|
+
padding-bottom: var(--spacing-medium);
|
|
24
24
|
}
|
|
25
25
|
[grid-span] {
|
|
26
26
|
grid-column: span 2;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
input {
|
|
30
|
-
border: var(--border-
|
|
30
|
+
border: var(--border-dim-color);
|
|
31
31
|
border-radius: var(--border-radius);
|
|
32
32
|
margin: var(--input-margin);
|
|
33
33
|
padding: var(--input-padding);
|
|
@@ -39,7 +39,7 @@ class StockAllocationRatio extends localize(i18next)(LitElement) {
|
|
|
39
39
|
flex-direction: column;
|
|
40
40
|
|
|
41
41
|
font: var(--label-font);
|
|
42
|
-
color: var(--label-color);
|
|
42
|
+
color: var(--label-color, var(--md-sys-color-on-surface));
|
|
43
43
|
text-transform: var(--label-text-transform);
|
|
44
44
|
}
|
|
45
45
|
mwc-button {
|
|
@@ -68,17 +68,16 @@ class StockAllocationRatio extends localize(i18next)(LitElement) {
|
|
|
68
68
|
<div field-2column>
|
|
69
69
|
${ratioSettings?.length
|
|
70
70
|
? ratioSettings.map(
|
|
71
|
-
setting =>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
`
|
|
71
|
+
setting => html`
|
|
72
|
+
<label>${setting?.marketplaceStore.storeName} </label>
|
|
73
|
+
<input
|
|
74
|
+
name="${setting?.marketplaceStore.id}"
|
|
75
|
+
value="${parseInt(setting.value)}"
|
|
76
|
+
type="number"
|
|
77
|
+
max="100"
|
|
78
|
+
required
|
|
79
|
+
/>
|
|
80
|
+
`
|
|
82
81
|
)
|
|
83
82
|
: ''}
|
|
84
83
|
|
|
@@ -8,20 +8,20 @@ export class VariantOptionEditor extends LitElement {
|
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: row;
|
|
10
10
|
flex-wrap: wrap;
|
|
11
|
-
margin-bottom: var(--
|
|
12
|
-
padding: var(--
|
|
11
|
+
margin-bottom: var(--spacing-small);
|
|
12
|
+
padding: var(--spacing-medium);
|
|
13
13
|
padding-left: 0;
|
|
14
|
-
border-bottom: var(--border-
|
|
14
|
+
border-bottom: var(--border-dim-color);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
select,
|
|
18
18
|
input,
|
|
19
19
|
[option] {
|
|
20
|
-
border: var(--border-
|
|
20
|
+
border: var(--border-dim-color);
|
|
21
21
|
border-radius: var(--border-radius);
|
|
22
|
-
padding: var(--
|
|
23
|
-
margin-right: var(--
|
|
24
|
-
margin-bottom: var(--
|
|
22
|
+
padding: var(--spacing-small);
|
|
23
|
+
margin-right: var(--spacing-small);
|
|
24
|
+
margin-bottom: var(--spacing-small);
|
|
25
25
|
font-size: 0.9rem;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -35,7 +35,7 @@ export class VariantOptionEditor extends LitElement {
|
|
|
35
35
|
|
|
36
36
|
[option] {
|
|
37
37
|
display: inline-block;
|
|
38
|
-
background-color: var(--
|
|
38
|
+
background-color: var(--md-sys-color-primary);
|
|
39
39
|
margin: 1px 3px 4px 0;
|
|
40
40
|
padding: 3px 5px;
|
|
41
41
|
color: white;
|
|
@@ -43,7 +43,7 @@ export class VariantOptionEditor extends LitElement {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
[delete] {
|
|
46
|
-
margin-left: var(--
|
|
46
|
+
margin-left: var(--spacing-small);
|
|
47
47
|
opacity: 0.5;
|
|
48
48
|
}
|
|
49
49
|
[delete]:hover {
|
|
@@ -9,16 +9,16 @@ export class VariantOptionsEditor extends LitElement {
|
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
min-height: 200px;
|
|
12
|
-
color: var(--
|
|
12
|
+
color: var(--md-sys-color-secondary);
|
|
13
13
|
font-size: 1rem;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
label strong {
|
|
17
17
|
font-weight: bold;
|
|
18
|
-
color: var(--
|
|
18
|
+
color: var(--md-sys-color-primary);
|
|
19
19
|
}
|
|
20
20
|
label mwc-icon {
|
|
21
|
-
--
|
|
21
|
+
--md-icon-size: 20px;
|
|
22
22
|
float: right;
|
|
23
23
|
opacity: 0.8;
|
|
24
24
|
cursor: pointer;
|
|
@@ -27,7 +27,7 @@ export class VariantOptionsEditor extends LitElement {
|
|
|
27
27
|
label mwc-icon:hover,
|
|
28
28
|
label mwc-icon:active {
|
|
29
29
|
opacity: 1;
|
|
30
|
-
color: var(--
|
|
30
|
+
color: var(--md-sys-color-primary);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
button {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, html, css } from 'lit'
|
|
2
2
|
import '@material/mwc-button'
|
|
3
|
-
import { i18next, localize } from '@
|
|
3
|
+
import { i18next, localize } from '@operato/i18n'
|
|
4
4
|
|
|
5
5
|
export class WizardView extends localize(i18next)(LitElement) {
|
|
6
6
|
static get styles() {
|
|
@@ -66,8 +66,8 @@ export class WizardView extends localize(i18next)(LitElement) {
|
|
|
66
66
|
typeof step == 'string'
|
|
67
67
|
? this.querySelector(`[name=${step}]`)
|
|
68
68
|
: typeof step == 'number'
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
? this.querySelector(`:nth-child(${step})`)
|
|
70
|
+
: step
|
|
71
71
|
|
|
72
72
|
this.current?.toggleAttribute('active', true)
|
|
73
73
|
|
package/client/menu.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCodeByName } from '@things-factory/code-base'
|
|
2
2
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
|
-
import { i18next, localize } from '@
|
|
3
|
+
import { i18next, localize } from '@operato/i18n'
|
|
4
4
|
import { client, CustomAlert } from '@things-factory/shell'
|
|
5
5
|
import gql from 'graphql-tag'
|
|
6
6
|
import { css, html, LitElement } from 'lit'
|
|
@@ -26,7 +26,7 @@ class BasicProductSetting extends localize(i18next)(LitElement) {
|
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-direction: column;
|
|
28
28
|
overflow-y: auto;
|
|
29
|
-
background-color:
|
|
29
|
+
background-color: var(--md-sys-color-surface);
|
|
30
30
|
}
|
|
31
31
|
.form-container {
|
|
32
32
|
flex: 1;
|
|
@@ -102,8 +102,9 @@ class BasicProductSetting extends localize(i18next)(LitElement) {
|
|
|
102
102
|
<select name="storageType" required>
|
|
103
103
|
<option value="">--${i18next.t('label.select_a_type')}--</option>
|
|
104
104
|
${(this.storageTypes || []).map(
|
|
105
|
-
storageType =>
|
|
106
|
-
|
|
105
|
+
storageType => html`
|
|
106
|
+
<option value="${storageType && storageType.name}">${storageType && storageType.name}</option>
|
|
107
|
+
`
|
|
107
108
|
)}
|
|
108
109
|
</select>
|
|
109
110
|
</fieldset>
|
|
@@ -129,15 +130,14 @@ class BasicProductSetting extends localize(i18next)(LitElement) {
|
|
|
129
130
|
<legend>${i18next.t('title.uploaded_images')}</legend>
|
|
130
131
|
<div class="do-preview">
|
|
131
132
|
${(this._attachments || []).map(
|
|
132
|
-
attachment =>
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
`
|
|
133
|
+
attachment => html`
|
|
134
|
+
<image-viewer
|
|
135
|
+
name="${attachment.name}"
|
|
136
|
+
src="${location.origin}/attachment/${attachment.path}"
|
|
137
|
+
.mimetype="${attachment.mimetype}"
|
|
138
|
+
.downloadable="${this._downloadable}"
|
|
139
|
+
></image-viewer>
|
|
140
|
+
`
|
|
141
141
|
)}
|
|
142
142
|
</div>
|
|
143
143
|
</fieldset>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css, html, LitElement } from 'lit'
|
|
2
|
-
import { i18next, localize } from '@
|
|
2
|
+
import { i18next, localize } from '@operato/i18n'
|
|
3
3
|
|
|
4
4
|
import '../../components/wizard-view'
|
|
5
5
|
|
|
@@ -20,7 +20,7 @@ class CreateNewProdutPopup extends localize(i18next)(LitElement) {
|
|
|
20
20
|
:host {
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-direction: row;
|
|
23
|
-
background-color:
|
|
23
|
+
background-color: var(--md-sys-color-surface);
|
|
24
24
|
}
|
|
25
25
|
wizard-summary {
|
|
26
26
|
flex: 1;
|
|
@@ -62,7 +62,7 @@ class CreateNewProdutPopup extends localize(i18next)(LitElement) {
|
|
|
62
62
|
width: var(--wizard-step-size, 22px);
|
|
63
63
|
height: var(--wizard-step-size, 22px);
|
|
64
64
|
line-height: 1.2em;
|
|
65
|
-
background-color:
|
|
65
|
+
background-color: var(--md-sys-color-surface);
|
|
66
66
|
border: 1px solid var(--wizard-step-color, #4c526b);
|
|
67
67
|
text-align: center;
|
|
68
68
|
font-size: var(--wizard-step-number-size, 17px);
|