ts-glitter 20.6.8 → 20.7.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/lowcode/Entry.js +2 -2
- package/lowcode/Entry.ts +2 -2
- package/lowcode/backend-manager/bg-blog.js +617 -621
- package/lowcode/backend-manager/bg-blog.ts +2323 -2325
- package/lowcode/backend-manager/bg-line.js +5 -4
- package/lowcode/backend-manager/bg-line.ts +5 -4
- package/lowcode/backend-manager/bg-list-component.js +9 -0
- package/lowcode/backend-manager/bg-list-component.ts +15 -1
- package/lowcode/backend-manager/bg-notify.js +6 -4
- package/lowcode/backend-manager/bg-notify.ts +6 -4
- package/lowcode/backend-manager/bg-product.js +145 -0
- package/lowcode/backend-manager/bg-product.ts +153 -0
- package/lowcode/backend-manager/bg-sns.js +5 -3
- package/lowcode/backend-manager/bg-sns.ts +5 -3
- package/lowcode/backend-manager/bg-widget.js +92 -4
- package/lowcode/backend-manager/bg-widget.ts +122 -6
- package/lowcode/backend-manager/splitPage.js +0 -39
- package/lowcode/backend-manager/splitPage.ts +0 -40
- package/lowcode/cms-plugin/auto-fcm-advertise.js +17 -5
- package/lowcode/cms-plugin/auto-fcm-advertise.ts +19 -6
- package/lowcode/cms-plugin/auto-fcm-history.js +2732 -0
- package/lowcode/cms-plugin/auto-fcm-history.ts +2995 -0
- package/lowcode/cms-plugin/cms-router.js +5 -0
- package/lowcode/cms-plugin/cms-router.ts +6 -0
- package/lowcode/cms-plugin/filter-options.js +80 -27
- package/lowcode/cms-plugin/filter-options.ts +83 -27
- package/lowcode/cms-plugin/language-backend.js +50 -39
- package/lowcode/cms-plugin/language-backend.ts +109 -95
- package/lowcode/cms-plugin/menus-setting.js +175 -151
- package/lowcode/cms-plugin/menus-setting.ts +620 -591
- package/lowcode/cms-plugin/model/order.d.ts +1 -0
- package/lowcode/cms-plugin/module/data.js +7 -7
- package/lowcode/cms-plugin/module/data.ts +262 -233
- package/lowcode/cms-plugin/module/delivery-html.js +18 -10
- package/lowcode/cms-plugin/module/delivery-html.ts +26 -10
- package/lowcode/cms-plugin/module/order-setting.js +458 -328
- package/lowcode/cms-plugin/module/order-setting.ts +622 -351
- package/lowcode/cms-plugin/module/product-excel.js +1 -1
- package/lowcode/cms-plugin/module/product-excel.ts +2 -1
- package/lowcode/cms-plugin/order/order-module.js +90 -1
- package/lowcode/cms-plugin/order/order-module.ts +106 -1
- package/lowcode/cms-plugin/pos-pages/payment-page.js +11 -8
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +28 -15
- package/lowcode/cms-plugin/pos-pages/products-page.js +0 -39
- package/lowcode/cms-plugin/pos-pages/products-page.ts +0 -40
- package/lowcode/cms-plugin/shopping-collections.ts +1 -3
- package/lowcode/cms-plugin/shopping-finance-setting.js +19 -80
- package/lowcode/cms-plugin/shopping-finance-setting.ts +19 -87
- package/lowcode/cms-plugin/shopping-order-manager.js +122 -38
- package/lowcode/cms-plugin/shopping-order-manager.ts +160 -58
- package/lowcode/cms-plugin/shopping-product-setting.js +364 -376
- package/lowcode/cms-plugin/shopping-product-setting.ts +406 -415
- package/lowcode/cms-plugin/shopping-setting-advance.js +57 -16
- package/lowcode/cms-plugin/shopping-setting-advance.ts +69 -18
- package/lowcode/cms-plugin/stock-history.js +75 -63
- package/lowcode/cms-plugin/stock-history.ts +390 -376
- package/lowcode/cms-plugin/user/user-module.js +2 -43
- package/lowcode/cms-plugin/user/user-module.ts +2 -46
- package/lowcode/cms-plugin/user-list.js +4 -6
- package/lowcode/cms-plugin/user-list.ts +35 -38
- package/lowcode/css/editor.css +42 -3
- package/lowcode/glitter-base/global/language.js +6 -1
- package/lowcode/glitter-base/global/language.ts +10 -4
- package/lowcode/glitter-base/global/payment-config.js +19 -16
- package/lowcode/glitter-base/global/payment-config.ts +22 -16
- package/lowcode/glitter-base/global/shipment-config.js +6 -5
- package/lowcode/glitter-base/global/shipment-config.ts +12 -10
- package/lowcode/glitter-base/route/fcm.js +21 -1
- package/lowcode/glitter-base/route/fcm.ts +22 -2
- package/lowcode/glitter-base/route/shopping.js +8 -32
- package/lowcode/glitter-base/route/shopping.ts +10 -33
- package/lowcode/glitter-base/route/stock.ts +1 -0
- package/lowcode/glitter-base/route/user.js +11 -2
- package/lowcode/glitter-base/route/user.ts +23 -12
- package/lowcode/jspage/function-page/setting_editor.js +9 -0
- package/lowcode/jspage/function-page/setting_editor.ts +9 -0
- package/lowcode/public-components/blogs/list.js +223 -195
- package/lowcode/public-components/blogs/list.ts +383 -352
- package/lowcode/public-components/product/product-list.js +8 -4
- package/lowcode/public-components/product/product-list.ts +9 -4
- package/lowcode/public-components/terms-related/index.js +1 -1
- package/lowcode/public-components/terms-related/index.ts +1 -1
- package/lowcode/public-components/user-manager/um-login.js +1 -1
- package/lowcode/public-components/user-manager/um-login.ts +2 -2
- package/lowcode/public-components/user-manager/um-order.js +41 -5
- package/lowcode/public-components/user-manager/um-order.ts +58 -20
- package/lowcode/public-components/user-manager/um-voucher.ts +2 -2
- package/nhi4veq3gk.json +1 -0
- package/package.json +1 -1
- package/src/Language.d.ts +2 -0
- package/src/Language.js +66 -65
- package/src/Language.js.map +1 -1
- package/src/Language.ts +719 -715
- package/src/api-public/config/shipment-config.js +3 -2
- package/src/api-public/config/shipment-config.js.map +1 -1
- package/src/api-public/config/shipment-config.ts +3 -2
- package/src/api-public/controllers/ai-chat.js.map +1 -1
- package/src/api-public/controllers/ai-chat.ts +1 -2
- package/src/api-public/controllers/fcm.js +23 -58
- package/src/api-public/controllers/fcm.js.map +1 -1
- package/src/api-public/controllers/fcm.ts +28 -56
- package/src/api-public/controllers/shop.js +7 -1
- package/src/api-public/controllers/shop.js.map +1 -1
- package/src/api-public/controllers/shop.ts +17 -10
- package/src/api-public/controllers/user.js +1 -0
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +2 -0
- package/src/api-public/services/auto-send-email.js +247 -187
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/auto-send-email.ts +568 -505
- package/src/api-public/services/delivery.js +1 -1
- package/src/api-public/services/delivery.js.map +1 -1
- package/src/api-public/services/delivery.ts +6 -5
- package/src/api-public/services/financial-service.js +1 -2
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/financial-service.ts +4 -6
- package/src/api-public/services/manager.d.ts +4 -3
- package/src/api-public/services/manager.js +8 -12
- package/src/api-public/services/manager.js.map +1 -1
- package/src/api-public/services/manager.ts +57 -59
- package/src/api-public/services/model/handlePaymentTransaction.d.ts +1 -1
- package/src/api-public/services/model/handlePaymentTransaction.js +23 -3
- package/src/api-public/services/model/handlePaymentTransaction.js.map +1 -1
- package/src/api-public/services/model/handlePaymentTransaction.ts +25 -36
- package/src/api-public/services/schedule.d.ts +1 -0
- package/src/api-public/services/schedule.js +27 -0
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +30 -0
- package/src/api-public/services/shopping.d.ts +22 -2
- package/src/api-public/services/shopping.js +371 -95
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +499 -141
- package/src/api-public/services/stock.js +0 -3
- package/src/api-public/services/stock.js.map +1 -1
- package/src/api-public/services/stock.ts +3 -3
- package/src/api-public/services/user.d.ts +1 -0
- package/src/api-public/services/user.js +32 -12
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +38 -19
- package/src/api-public/services/workers.js +3 -3
- package/src/api-public/services/workers.js.map +1 -1
- package/src/api-public/services/workers.ts +103 -103
- package/src/app-project/ios/proshake/AppDelegate.swift +51 -7
- package/src/app-project/ios/proshake/Info.plist +11 -9
- package/src/app-project/ios/proshake/SceneDelegate.swift +18 -0
- package/src/app-project/ios/proshake/glitter-interface/BasicUtil.swift +43 -2
- package/src/app-project/ios/proshake/glitter-interface/Ecommerce.swift +56 -0
- package/src/app-project/ios/proshake.xcodeproj/project.xcworkspace/xcuserdata/jianzhi.wang.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/src/app-project/serverless/src/modules/database.js +1 -1
- package/src/app-project/serverless/src/modules/database.js.map +1 -1
- package/src/app-project/serverless/src/modules/database.ts +171 -171
- package/src/controllers/template.d.ts +1 -1
- package/src/controllers/template.js +16 -16
- package/src/controllers/template.js.map +1 -1
- package/src/controllers/template.ts +98 -84
- package/src/modules/database.js +3 -1
- package/src/modules/database.js.map +1 -1
- package/src/modules/database.ts +185 -181
- package/src/modules/firebase.d.ts +17 -0
- package/src/modules/firebase.js +126 -0
- package/src/modules/firebase.js.map +1 -1
- package/src/modules/firebase.ts +169 -0
- package/src/public-config-initial/auto-fcm.js +8 -2
- package/src/public-config-initial/auto-fcm.js.map +1 -1
- package/src/public-config-initial/auto-fcm.ts +15 -6
- package/src/services/app.d.ts +2 -1
- package/src/services/app.js.map +1 -1
- package/src/services/app.ts +2 -1
- package/src/services/ios-project.js +12 -6
- package/src/services/ios-project.js.map +1 -1
- package/src/services/ios-project.ts +12 -6
- package/src/services/template.d.ts +3 -2
- package/src/services/template.js +2 -1
- package/src/services/template.js.map +1 -1
- package/src/services/template.ts +13 -20
|
@@ -56,6 +56,11 @@ export class CmsRouter {
|
|
|
56
56
|
resolve(cl.main(gvc));
|
|
57
57
|
});
|
|
58
58
|
break;
|
|
59
|
+
case 'auto_fcm_history':
|
|
60
|
+
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-history.js', gvc.glitter.root_path).href, (cl) => {
|
|
61
|
+
resolve(cl.emailHistory(gvc));
|
|
62
|
+
});
|
|
63
|
+
break;
|
|
59
64
|
case 'auto_fcm_advertise':
|
|
60
65
|
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-advertise.js', gvc.glitter.root_path).href, (cl) => {
|
|
61
66
|
resolve(cl.main(gvc));
|
|
@@ -72,6 +72,12 @@ export class CmsRouter{
|
|
|
72
72
|
resolve(cl.main(gvc))
|
|
73
73
|
})
|
|
74
74
|
break
|
|
75
|
+
case 'auto_fcm_history':
|
|
76
|
+
// resolve('12345')
|
|
77
|
+
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-history.js', gvc.glitter.root_path).href, (cl) => {
|
|
78
|
+
resolve(cl.emailHistory(gvc))
|
|
79
|
+
})
|
|
80
|
+
break
|
|
75
81
|
case 'auto_fcm_advertise':
|
|
76
82
|
gvc.glitter.getModule(new URL('./cms-plugin/auto-fcm-advertise.js', gvc.glitter.root_path).href, (cl) => {
|
|
77
83
|
resolve(cl.main(gvc))
|
|
@@ -11,7 +11,19 @@ import { ShipmentConfig } from '../glitter-base/global/shipment-config.js';
|
|
|
11
11
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
12
12
|
import { PaymentConfig } from '../glitter-base/global/payment-config.js';
|
|
13
13
|
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
14
|
+
import { BgProduct } from '../backend-manager/bg-product.js';
|
|
15
|
+
import { OrderModule } from './order/order-module.js';
|
|
16
|
+
const html = String.raw;
|
|
14
17
|
export class FilterOptions {
|
|
18
|
+
static getLevelData() {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const normalMember = ApiUser.normalMember;
|
|
22
|
+
normalMember.id = 'null';
|
|
23
|
+
const levelConfig = yield ApiUser.getPublicConfig('member_level_config', 'manager');
|
|
24
|
+
return [normalMember, ...((_c = (_b = (_a = levelConfig === null || levelConfig === void 0 ? void 0 : levelConfig.response) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.levels) !== null && _c !== void 0 ? _c : [])];
|
|
25
|
+
});
|
|
26
|
+
}
|
|
15
27
|
static getUserFunnel() {
|
|
16
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
29
|
const generalTags = yield new Promise(resolve => {
|
|
@@ -25,7 +37,7 @@ export class FilterOptions {
|
|
|
25
37
|
}
|
|
26
38
|
});
|
|
27
39
|
});
|
|
28
|
-
const levelData =
|
|
40
|
+
const levelData = yield this.getLevelData();
|
|
29
41
|
return [
|
|
30
42
|
{
|
|
31
43
|
key: 'created_time',
|
|
@@ -137,6 +149,7 @@ export class FilterOptions {
|
|
|
137
149
|
}
|
|
138
150
|
static getOrderFunnel() {
|
|
139
151
|
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
const levelData = yield this.getLevelData();
|
|
140
153
|
return [
|
|
141
154
|
{ key: 'orderStatus', type: 'multi_checkbox', name: '訂單狀態', data: this.orderStatusOptions },
|
|
142
155
|
{ key: 'payload', type: 'multi_checkbox', name: '付款狀態', data: this.payloadStatusOptions },
|
|
@@ -148,7 +161,9 @@ export class FilterOptions {
|
|
|
148
161
|
data: (yield PaymentConfig.getSupportPayment()).map(dd => {
|
|
149
162
|
if (dd.type === 'pos' && !dd.name.includes('POS')) {
|
|
150
163
|
const name = dd.name;
|
|
151
|
-
dd.name = `<div class="d-flex"
|
|
164
|
+
dd.name = html `<div class="d-flex">
|
|
165
|
+
${[BgWidget.warningInsignia('POS'), name].join(html `<div class="mx-1"></div>`)}
|
|
166
|
+
</div>`;
|
|
152
167
|
}
|
|
153
168
|
return dd;
|
|
154
169
|
}),
|
|
@@ -158,9 +173,7 @@ export class FilterOptions {
|
|
|
158
173
|
key: 'shipment',
|
|
159
174
|
type: 'multi_checkbox',
|
|
160
175
|
name: '運送方式',
|
|
161
|
-
data: yield ShipmentConfig.shipmentMethod({
|
|
162
|
-
type: 'support',
|
|
163
|
-
}),
|
|
176
|
+
data: yield ShipmentConfig.shipmentMethod({ type: 'support' }),
|
|
164
177
|
},
|
|
165
178
|
{
|
|
166
179
|
key: 'created_time',
|
|
@@ -186,6 +199,20 @@ export class FilterOptions {
|
|
|
186
199
|
],
|
|
187
200
|
},
|
|
188
201
|
},
|
|
202
|
+
{
|
|
203
|
+
key: 'member_levels',
|
|
204
|
+
type: 'multi_checkbox',
|
|
205
|
+
name: '會員等級',
|
|
206
|
+
data: levelData.map((dd) => {
|
|
207
|
+
return { key: dd.id, name: dd.tag_name };
|
|
208
|
+
}),
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
key: 'manager_tag',
|
|
212
|
+
type: 'search_and_select',
|
|
213
|
+
name: '訂單管理標籤',
|
|
214
|
+
data: yield OrderModule.getOrderManagerTag(),
|
|
215
|
+
},
|
|
189
216
|
];
|
|
190
217
|
});
|
|
191
218
|
}
|
|
@@ -241,6 +268,50 @@ export class FilterOptions {
|
|
|
241
268
|
];
|
|
242
269
|
});
|
|
243
270
|
}
|
|
271
|
+
static getProductFunnel() {
|
|
272
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
273
|
+
return [
|
|
274
|
+
{
|
|
275
|
+
key: 'status',
|
|
276
|
+
type: 'multi_checkbox',
|
|
277
|
+
name: '商品狀態',
|
|
278
|
+
data: [
|
|
279
|
+
{ key: 'inRange', name: '上架' },
|
|
280
|
+
{ key: 'beforeStart', name: '待上架' },
|
|
281
|
+
{ key: 'afterEnd', name: '下架' },
|
|
282
|
+
{ key: 'draft', name: '草稿' },
|
|
283
|
+
],
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
key: 'channel',
|
|
287
|
+
type: 'multi_checkbox',
|
|
288
|
+
name: '銷售管道',
|
|
289
|
+
data: [
|
|
290
|
+
{ key: 'normal', name: 'APP & 官網' },
|
|
291
|
+
{ key: 'pos', name: 'POS' },
|
|
292
|
+
],
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
key: 'collection',
|
|
296
|
+
type: 'multi_checkbox',
|
|
297
|
+
name: '商品分類',
|
|
298
|
+
data: yield BgProduct.getCollectonCheckData(),
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
key: 'general_tag',
|
|
302
|
+
type: 'search_and_select',
|
|
303
|
+
name: '商品標籤',
|
|
304
|
+
data: yield BgProduct.getProductGeneralTag(),
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
key: 'manager_tag',
|
|
308
|
+
type: 'search_and_select',
|
|
309
|
+
name: '商品管理標籤',
|
|
310
|
+
data: yield BgProduct.getProductManagerTag(),
|
|
311
|
+
},
|
|
312
|
+
];
|
|
313
|
+
});
|
|
314
|
+
}
|
|
244
315
|
}
|
|
245
316
|
FilterOptions.userFilterFrame = {
|
|
246
317
|
created_time: ['', ''],
|
|
@@ -281,6 +352,8 @@ FilterOptions.orderFilterFrame = {
|
|
|
281
352
|
payment_select: [],
|
|
282
353
|
shipment: [],
|
|
283
354
|
created_time: ['', ''],
|
|
355
|
+
manager_tag: [],
|
|
356
|
+
member_levels: [],
|
|
284
357
|
};
|
|
285
358
|
FilterOptions.returnOrderFilterFrame = {
|
|
286
359
|
progress: [],
|
|
@@ -486,29 +559,9 @@ FilterOptions.productFilterFrame = {
|
|
|
486
559
|
status: [],
|
|
487
560
|
channel: [],
|
|
488
561
|
collection: [],
|
|
562
|
+
general_tag: [],
|
|
563
|
+
manager_tag: [],
|
|
489
564
|
};
|
|
490
|
-
FilterOptions.productFunnel = [
|
|
491
|
-
{
|
|
492
|
-
key: 'status',
|
|
493
|
-
type: 'multi_checkbox',
|
|
494
|
-
name: '商品狀態',
|
|
495
|
-
data: [
|
|
496
|
-
{ key: 'inRange', name: '上架' },
|
|
497
|
-
{ key: 'beforeStart', name: '待上架' },
|
|
498
|
-
{ key: 'afterEnd', name: '下架' },
|
|
499
|
-
{ key: 'draft', name: '草稿' },
|
|
500
|
-
],
|
|
501
|
-
},
|
|
502
|
-
{
|
|
503
|
-
key: 'channel',
|
|
504
|
-
type: 'multi_checkbox',
|
|
505
|
-
name: '銷售管道',
|
|
506
|
-
data: [
|
|
507
|
-
{ key: 'normal', name: 'APP & 官網' },
|
|
508
|
-
{ key: 'pos', name: 'POS' },
|
|
509
|
-
],
|
|
510
|
-
},
|
|
511
|
-
];
|
|
512
565
|
FilterOptions.productOrderBy = [
|
|
513
566
|
{ key: 'default', value: '預設' },
|
|
514
567
|
{ key: 'max_price', value: '價格高 > 低' },
|
|
@@ -2,6 +2,10 @@ import { ShipmentConfig } from '../glitter-base/global/shipment-config.js';
|
|
|
2
2
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
3
3
|
import { PaymentConfig } from '../glitter-base/global/payment-config.js';
|
|
4
4
|
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
5
|
+
import { BgProduct } from '../backend-manager/bg-product.js';
|
|
6
|
+
import { OrderModule } from './order/order-module.js';
|
|
7
|
+
|
|
8
|
+
const html = String.raw;
|
|
5
9
|
|
|
6
10
|
export class FilterOptions {
|
|
7
11
|
static userFilterFrame = {
|
|
@@ -17,6 +21,15 @@ export class FilterOptions {
|
|
|
17
21
|
last_order_total: { key: '', value: '' },
|
|
18
22
|
};
|
|
19
23
|
|
|
24
|
+
static async getLevelData() {
|
|
25
|
+
const normalMember = ApiUser.normalMember;
|
|
26
|
+
normalMember.id = 'null';
|
|
27
|
+
|
|
28
|
+
const levelConfig = await ApiUser.getPublicConfig('member_level_config', 'manager');
|
|
29
|
+
|
|
30
|
+
return [normalMember, ...(levelConfig?.response?.value?.levels ?? [])];
|
|
31
|
+
}
|
|
32
|
+
|
|
20
33
|
static async getUserFunnel() {
|
|
21
34
|
const generalTags = await new Promise<{ key: string; name: string }[]>(resolve => {
|
|
22
35
|
ApiUser.getPublicConfig('user_general_tags', 'manager').then((dd: any) => {
|
|
@@ -27,7 +40,9 @@ export class FilterOptions {
|
|
|
27
40
|
}
|
|
28
41
|
});
|
|
29
42
|
});
|
|
30
|
-
|
|
43
|
+
|
|
44
|
+
const levelData = await this.getLevelData();
|
|
45
|
+
|
|
31
46
|
return [
|
|
32
47
|
{
|
|
33
48
|
key: 'created_time',
|
|
@@ -166,6 +181,8 @@ export class FilterOptions {
|
|
|
166
181
|
payment_select: [],
|
|
167
182
|
shipment: [],
|
|
168
183
|
created_time: ['', ''],
|
|
184
|
+
manager_tag: [],
|
|
185
|
+
member_levels: [],
|
|
169
186
|
};
|
|
170
187
|
|
|
171
188
|
static returnOrderFilterFrame = {
|
|
@@ -225,6 +242,8 @@ export class FilterOptions {
|
|
|
225
242
|
];
|
|
226
243
|
|
|
227
244
|
static async getOrderFunnel() {
|
|
245
|
+
const levelData = await this.getLevelData();
|
|
246
|
+
|
|
228
247
|
return [
|
|
229
248
|
{ key: 'orderStatus', type: 'multi_checkbox', name: '訂單狀態', data: this.orderStatusOptions },
|
|
230
249
|
{ key: 'payload', type: 'multi_checkbox', name: '付款狀態', data: this.payloadStatusOptions },
|
|
@@ -236,7 +255,9 @@ export class FilterOptions {
|
|
|
236
255
|
data: (await PaymentConfig.getSupportPayment()).map(dd => {
|
|
237
256
|
if (dd.type === 'pos' && !dd.name.includes('POS')) {
|
|
238
257
|
const name = dd.name;
|
|
239
|
-
dd.name = `<div class="d-flex"
|
|
258
|
+
dd.name = html`<div class="d-flex">
|
|
259
|
+
${[BgWidget.warningInsignia('POS'), name].join(html`<div class="mx-1"></div>`)}
|
|
260
|
+
</div>`;
|
|
240
261
|
}
|
|
241
262
|
return dd;
|
|
242
263
|
}),
|
|
@@ -246,9 +267,7 @@ export class FilterOptions {
|
|
|
246
267
|
key: 'shipment',
|
|
247
268
|
type: 'multi_checkbox',
|
|
248
269
|
name: '運送方式',
|
|
249
|
-
data: await ShipmentConfig.shipmentMethod({
|
|
250
|
-
type: 'support',
|
|
251
|
-
}),
|
|
270
|
+
data: await ShipmentConfig.shipmentMethod({ type: 'support' }),
|
|
252
271
|
},
|
|
253
272
|
{
|
|
254
273
|
key: 'created_time',
|
|
@@ -274,6 +293,20 @@ export class FilterOptions {
|
|
|
274
293
|
],
|
|
275
294
|
},
|
|
276
295
|
},
|
|
296
|
+
{
|
|
297
|
+
key: 'member_levels',
|
|
298
|
+
type: 'multi_checkbox',
|
|
299
|
+
name: '會員等級',
|
|
300
|
+
data: levelData.map((dd: any) => {
|
|
301
|
+
return { key: dd.id, name: dd.tag_name };
|
|
302
|
+
}),
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
key: 'manager_tag',
|
|
306
|
+
type: 'search_and_select',
|
|
307
|
+
name: '訂單管理標籤',
|
|
308
|
+
data: await OrderModule.getOrderManagerTag(),
|
|
309
|
+
},
|
|
277
310
|
];
|
|
278
311
|
}
|
|
279
312
|
|
|
@@ -503,30 +536,52 @@ export class FilterOptions {
|
|
|
503
536
|
status: [],
|
|
504
537
|
channel: [],
|
|
505
538
|
collection: [],
|
|
539
|
+
general_tag: [],
|
|
540
|
+
manager_tag: [],
|
|
506
541
|
};
|
|
507
542
|
|
|
508
|
-
static
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
543
|
+
static async getProductFunnel() {
|
|
544
|
+
return [
|
|
545
|
+
{
|
|
546
|
+
key: 'status',
|
|
547
|
+
type: 'multi_checkbox',
|
|
548
|
+
name: '商品狀態',
|
|
549
|
+
data: [
|
|
550
|
+
{ key: 'inRange', name: '上架' },
|
|
551
|
+
{ key: 'beforeStart', name: '待上架' },
|
|
552
|
+
{ key: 'afterEnd', name: '下架' },
|
|
553
|
+
{ key: 'draft', name: '草稿' },
|
|
554
|
+
],
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
key: 'channel',
|
|
558
|
+
type: 'multi_checkbox',
|
|
559
|
+
name: '銷售管道',
|
|
560
|
+
data: [
|
|
561
|
+
{ key: 'normal', name: 'APP & 官網' },
|
|
562
|
+
{ key: 'pos', name: 'POS' },
|
|
563
|
+
],
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
key: 'collection',
|
|
567
|
+
type: 'multi_checkbox',
|
|
568
|
+
name: '商品分類',
|
|
569
|
+
data: await BgProduct.getCollectonCheckData(),
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
key: 'general_tag',
|
|
573
|
+
type: 'search_and_select',
|
|
574
|
+
name: '商品標籤',
|
|
575
|
+
data: await BgProduct.getProductGeneralTag(),
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
key: 'manager_tag',
|
|
579
|
+
type: 'search_and_select',
|
|
580
|
+
name: '商品管理標籤',
|
|
581
|
+
data: await BgProduct.getProductManagerTag(),
|
|
582
|
+
},
|
|
583
|
+
];
|
|
584
|
+
}
|
|
530
585
|
|
|
531
586
|
static productOrderBy = [
|
|
532
587
|
{ key: 'default', value: '預設' },
|
|
@@ -629,6 +684,7 @@ export class FilterOptions {
|
|
|
629
684
|
{ key: 'title', value: '內容' },
|
|
630
685
|
];
|
|
631
686
|
|
|
687
|
+
|
|
632
688
|
static emailOptions = [
|
|
633
689
|
{ key: 'def', value: '請選擇根據的條件' },
|
|
634
690
|
{ key: 'all', value: '所有會員' },
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { BgWidget } from
|
|
2
|
-
import { Language } from
|
|
1
|
+
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
2
|
+
import { Language } from '../glitter-base/global/language.js';
|
|
3
|
+
const html = String.raw;
|
|
3
4
|
export class LanguageBackend {
|
|
4
5
|
static switchBtn(cf) {
|
|
5
6
|
const gvc = cf.gvc;
|
|
6
|
-
return BgWidget.grayButton(`<div class="d-flex align-items-center" style="gap:5px;">
|
|
7
|
-
<i class="fa-duotone fa-solid fa-earth-americas"></i>${Language.getLanguageText({
|
|
7
|
+
return BgWidget.grayButton(html `<div class="d-flex align-items-center" style="gap:5px;">
|
|
8
|
+
<i class="fa-duotone fa-solid fa-earth-americas"></i>${Language.getLanguageText({
|
|
8
9
|
local: true,
|
|
9
|
-
compare: cf.language
|
|
10
|
+
compare: cf.language,
|
|
10
11
|
})}
|
|
11
|
-
</div>`, gvc.event(() => {
|
|
12
|
+
</div>`, gvc.event(() => {
|
|
12
13
|
BgWidget.settingDialog({
|
|
13
14
|
gvc: gvc,
|
|
14
15
|
innerHTML: (gvc) => {
|
|
@@ -20,10 +21,9 @@ export class LanguageBackend {
|
|
|
20
21
|
return {
|
|
21
22
|
bind: id,
|
|
22
23
|
view: () => {
|
|
23
|
-
return html `
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
${gvc.bindView(() => {
|
|
24
|
+
return html ` <div style="position: relative;word-break: break-all;white-space: normal;">
|
|
25
|
+
${BgWidget.grayNote('前往商店設定->商店訊息中,設定支援的語言。')}
|
|
26
|
+
${gvc.bindView(() => {
|
|
27
27
|
const html = String.raw;
|
|
28
28
|
return {
|
|
29
29
|
bind: glitter.getUUID(),
|
|
@@ -31,57 +31,68 @@ export class LanguageBackend {
|
|
|
31
31
|
const sup = [
|
|
32
32
|
{
|
|
33
33
|
key: 'en-US',
|
|
34
|
-
value: '英文'
|
|
34
|
+
value: '英文',
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
key: 'zh-CN',
|
|
38
|
-
value: '簡體中文'
|
|
38
|
+
value: '簡體中文',
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
key: 'zh-TW',
|
|
42
|
-
value: '繁體中文'
|
|
43
|
-
}
|
|
44
|
-
]
|
|
42
|
+
value: '繁體中文',
|
|
43
|
+
},
|
|
44
|
+
]
|
|
45
|
+
.filter(dd => {
|
|
45
46
|
return window.parent.store_info.language_setting.support.includes(dd.key);
|
|
46
|
-
})
|
|
47
|
+
})
|
|
48
|
+
.sort((dd) => {
|
|
47
49
|
return dd.key === cf.language ? -1 : 1;
|
|
48
50
|
});
|
|
49
|
-
return html `
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
return html ` <div
|
|
52
|
+
class="d-flex mt-3 flex-wrap align-items-center justify-content-center"
|
|
53
|
+
style="gap:15px;"
|
|
54
|
+
>
|
|
55
|
+
${sup
|
|
56
|
+
.map((dd) => {
|
|
53
57
|
return html `
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
<div
|
|
59
|
+
class="px-3 py-1 text-white position-relative d-flex align-items-center justify-content-center"
|
|
60
|
+
style="border-radius: 20px;background: #393939;cursor: pointer;width:100px;"
|
|
61
|
+
onclick="${gvc.event(() => {
|
|
57
62
|
cf.callback(dd.key);
|
|
58
63
|
gvc.closeDialog();
|
|
59
|
-
})}"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
})}"
|
|
65
|
+
>
|
|
66
|
+
${dd.value}
|
|
67
|
+
<div
|
|
68
|
+
class="position-absolute text-white rounded-2 px-2 d-flex align-items-center rounded-3 ${dd.key !==
|
|
69
|
+
cf.language
|
|
70
|
+
? `d-none`
|
|
71
|
+
: ``}"
|
|
72
|
+
style="top: -12px;right: -10px; height:20px;font-size: 11px;background: #ff6c02;"
|
|
73
|
+
>
|
|
74
|
+
已選擇
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
`;
|
|
78
|
+
})
|
|
79
|
+
.join('')}
|
|
80
|
+
</div>`;
|
|
81
|
+
},
|
|
70
82
|
};
|
|
71
83
|
})}
|
|
72
|
-
|
|
84
|
+
</div>`;
|
|
73
85
|
},
|
|
74
86
|
divCreate: {},
|
|
75
|
-
onCreate: () => {
|
|
76
|
-
},
|
|
87
|
+
onCreate: () => { },
|
|
77
88
|
};
|
|
78
89
|
})());
|
|
79
90
|
},
|
|
80
91
|
title: '切換語系',
|
|
81
|
-
footer_html:
|
|
92
|
+
footer_html: gvc => {
|
|
82
93
|
return ``;
|
|
83
94
|
},
|
|
84
|
-
width: 350
|
|
95
|
+
width: 350,
|
|
85
96
|
});
|
|
86
97
|
}));
|
|
87
98
|
}
|