ts-glitter 21.1.7 → 21.1.9
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 +14 -1
- package/lowcode/Entry.ts +13 -1
- package/lowcode/backend-manager/bg-line.js +18 -10
- package/lowcode/backend-manager/bg-line.ts +19 -10
- package/lowcode/backend-manager/bg-list-component.js +1 -2
- package/lowcode/backend-manager/bg-list-component.ts +1 -1
- package/lowcode/backend-manager/bg-notify.js +17 -10
- package/lowcode/backend-manager/bg-notify.ts +19 -11
- package/lowcode/backend-manager/bg-product.js +39 -18
- package/lowcode/backend-manager/bg-product.ts +54 -23
- package/lowcode/backend-manager/bg-recommend.js +15 -9
- package/lowcode/backend-manager/bg-recommend.ts +16 -9
- package/lowcode/backend-manager/bg-sns.js +16 -9
- package/lowcode/backend-manager/bg-sns.ts +18 -11
- package/lowcode/backend-manager/bg-widget.js +325 -261
- package/lowcode/backend-manager/bg-widget.ts +117 -45
- package/lowcode/cms-plugin/auto-fcm-history.js +15 -6
- package/lowcode/cms-plugin/auto-fcm-history.ts +18 -11
- package/lowcode/cms-plugin/auto-reply.js +17 -1
- package/lowcode/cms-plugin/auto-reply.ts +16 -1
- package/lowcode/cms-plugin/exhibition-list.js +11 -2
- package/lowcode/cms-plugin/exhibition-list.ts +12 -2
- package/lowcode/cms-plugin/live_capture.js +2 -2
- package/lowcode/cms-plugin/live_capture.ts +2 -2
- package/lowcode/cms-plugin/model/order.d.ts +1 -0
- package/lowcode/cms-plugin/module/order-excel.js +15 -1
- package/lowcode/cms-plugin/module/order-excel.ts +22 -2
- package/lowcode/cms-plugin/module/table-storage.js +11 -0
- package/lowcode/cms-plugin/module/table-storage.ts +12 -0
- package/lowcode/cms-plugin/permission-setting.js +16 -9
- package/lowcode/cms-plugin/permission-setting.ts +18 -10
- package/lowcode/cms-plugin/pos-pages/payment-page.js +37 -29
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +61 -49
- package/lowcode/cms-plugin/pos-pages/pos-function.js +6 -1
- package/lowcode/cms-plugin/pos-pages/pos-function.ts +8 -1
- package/lowcode/cms-plugin/reconciliation-area.js +12 -3
- package/lowcode/cms-plugin/reconciliation-area.ts +13 -3
- package/lowcode/cms-plugin/shopping-allowance-manager.js +12 -3
- package/lowcode/cms-plugin/shopping-allowance-manager.ts +13 -3
- package/lowcode/cms-plugin/shopping-invoice-manager.js +12 -3
- package/lowcode/cms-plugin/shopping-invoice-manager.ts +13 -4
- package/lowcode/cms-plugin/shopping-order-manager.js +12 -3
- package/lowcode/cms-plugin/shopping-order-manager.ts +13 -4
- package/lowcode/cms-plugin/shopping-product-setting.js +16 -10
- package/lowcode/cms-plugin/shopping-product-setting.ts +17 -10
- package/lowcode/cms-plugin/shopping-product-stock.js +17 -11
- package/lowcode/cms-plugin/shopping-product-stock.ts +18 -11
- package/lowcode/cms-plugin/shopping-setting-basic.js +129 -38
- package/lowcode/cms-plugin/shopping-setting-basic.ts +134 -38
- package/lowcode/cms-plugin/stock-history.js +15 -7
- package/lowcode/cms-plugin/stock-history.ts +16 -17
- package/lowcode/cms-plugin/stock-stores.js +13 -6
- package/lowcode/cms-plugin/stock-stores.ts +14 -6
- package/lowcode/cms-plugin/stock-vendors.js +13 -6
- package/lowcode/cms-plugin/stock-vendors.ts +14 -6
- package/lowcode/cms-plugin/user-list.js +24 -7
- package/lowcode/cms-plugin/user-list.ts +25 -7
- package/lowcode/css/editor.css +11 -6
- package/lowcode/form-view/e-commerce/product-select.js +13 -11
- package/lowcode/form-view/e-commerce/product-select.ts +14 -12
- package/lowcode/modules/tool.js +9 -0
- package/lowcode/modules/tool.ts +12 -0
- package/lowcode/public-components/checkout/index.js +216 -207
- package/lowcode/public-components/checkout/index.ts +1315 -1309
- package/lowcode/public-components/product/pd-class.js +11 -2
- package/lowcode/public-components/product/pd-class.ts +16 -3
- package/lowcode/public-components/public/ad.js +42 -10
- package/lowcode/public-components/public/ad.ts +28 -1
- package/lowcode/public-models/product.ts +1 -0
- package/lowcode/view-model/saas-view-model.js +394 -379
- package/lowcode/view-model/saas-view-model.ts +1451 -1405
- package/package.json +1 -1
- package/src/api-public/controllers/user.js +4 -4
- package/src/api-public/controllers/user.js.map +1 -1
- package/src/api-public/controllers/user.ts +4 -4
- package/src/api-public/models/glitter-finance.js +1 -2
- package/src/api-public/models/glitter-finance.js.map +1 -5
- package/src/api-public/services/data-analyze.d.ts +1 -1
- package/src/api-public/services/fb-api.d.ts +4 -3
- package/src/api-public/services/fb-api.js +72 -27
- package/src/api-public/services/fb-api.js.map +1 -1
- package/src/api-public/services/fb-api.ts +183 -127
- package/src/api-public/services/fb-service.js +4 -4
- package/src/api-public/services/fb-service.js.map +1 -1
- package/src/api-public/services/schedule.d.ts +1 -1
- package/src/api-public/services/schedule.js +18 -14
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +18 -14
- package/src/api-public/services/user.d.ts +6 -5
- package/src/api-public/services/user.js +12 -10
- package/src/api-public/services/user.js.map +1 -1
- package/src/api-public/services/user.ts +14 -10
- package/src/config.d.ts +1 -1
- package/src/modules/AWSLib.js +2 -3
- package/src/modules/AWSLib.js.map +1 -1
- package/src/modules/database.d.ts +1 -1
- package/src/modules/redis.d.ts +1 -1
- package/src/modules/tool.d.ts +4 -4
- package/src/modules/tool.js +1 -2
- package/src/modules/tool.js.map +1 -1
- package/src/seo-config.js +1 -0
- package/src/seo-config.js.map +1 -1
- package/src/seo-config.ts +1 -0
- package/src/services/backend-service.js +17 -7
- package/src/services/backend-service.js.map +1 -1
- package/src/services/create-instance.js +3 -4
- package/src/services/create-instance.js.map +1 -1
- package/src/services/saas-table-check.js +2 -2
- package/src/services/saas-table-check.js.map +1 -5
- package/src/services/tool.js +2 -3
- package/src/services/tool.js.map +1 -1
|
@@ -7,6 +7,7 @@ import { FilterOptions } from './filter-options.js';
|
|
|
7
7
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
8
8
|
import { CheckInput } from '../modules/checkInput.js';
|
|
9
9
|
import { Tool } from '../modules/tool.js';
|
|
10
|
+
import { TableStorage } from './module/table-storage.js';
|
|
10
11
|
|
|
11
12
|
const html = String.raw;
|
|
12
13
|
|
|
@@ -29,6 +30,7 @@ type VM = {
|
|
|
29
30
|
query: string;
|
|
30
31
|
queryType: string;
|
|
31
32
|
orderString: string;
|
|
33
|
+
listLimit: number;
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
export class StockVendors {
|
|
@@ -45,6 +47,7 @@ export class StockVendors {
|
|
|
45
47
|
queryType: '',
|
|
46
48
|
filter: {},
|
|
47
49
|
orderString: '',
|
|
50
|
+
listLimit: TableStorage.getLimit(),
|
|
48
51
|
};
|
|
49
52
|
|
|
50
53
|
return gvc.bindView({
|
|
@@ -133,8 +136,7 @@ export class StockVendors {
|
|
|
133
136
|
gvc,
|
|
134
137
|
callback: (value: any) => {
|
|
135
138
|
vm.queryType = value;
|
|
136
|
-
gvc.notifyDataChange(vm.tableId);
|
|
137
|
-
gvc.notifyDataChange(id);
|
|
139
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
138
140
|
},
|
|
139
141
|
default: vm.queryType || 'name',
|
|
140
142
|
options: FilterOptions.vendorsSelect,
|
|
@@ -142,12 +144,19 @@ export class StockVendors {
|
|
|
142
144
|
BgWidget.searchFilter(
|
|
143
145
|
gvc.event(e => {
|
|
144
146
|
vm.query = `${e.value}`.trim();
|
|
145
|
-
gvc.notifyDataChange(vm.tableId);
|
|
146
|
-
gvc.notifyDataChange(id);
|
|
147
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
147
148
|
}),
|
|
148
149
|
vm.query || '',
|
|
149
150
|
'搜尋庫存點名稱'
|
|
150
151
|
),
|
|
152
|
+
BgWidget.countingFilter({
|
|
153
|
+
gvc,
|
|
154
|
+
callback: value => {
|
|
155
|
+
vm.listLimit = value;
|
|
156
|
+
gvc.notifyDataChange([vm.tableId, id]);
|
|
157
|
+
},
|
|
158
|
+
default: vm.listLimit,
|
|
159
|
+
}),
|
|
151
160
|
];
|
|
152
161
|
|
|
153
162
|
const filterTags = ListComp.getFilterTags(FilterOptions.vendorsFunnel);
|
|
@@ -162,14 +171,13 @@ export class StockVendors {
|
|
|
162
171
|
gvc: gvc,
|
|
163
172
|
getData: vd => {
|
|
164
173
|
vmi = vd;
|
|
165
|
-
const limit = 100;
|
|
166
174
|
this.getPublicData().then((data: any) => {
|
|
167
175
|
if (data.list) {
|
|
168
176
|
data.list = data.list.filter((item: VendorData) => {
|
|
169
177
|
return vm.query === '' || item.name.includes(vm.query);
|
|
170
178
|
});
|
|
171
179
|
vm.dataList = data.list;
|
|
172
|
-
vmi.pageSize = Math.ceil(data.list.length /
|
|
180
|
+
vmi.pageSize = Math.ceil(data.list.length / vm.listLimit);
|
|
173
181
|
vmi.originalData = vm.dataList;
|
|
174
182
|
vmi.tableData = getDatalist();
|
|
175
183
|
}
|
|
@@ -26,6 +26,7 @@ import { UserExcel } from './module/user-excel.js';
|
|
|
26
26
|
import { GlobalUser } from '../glitter-base/global/global-user.js';
|
|
27
27
|
import { ListHeaderOption } from './list-header-option.js';
|
|
28
28
|
import { UserModule } from './user/user-module.js';
|
|
29
|
+
import { TableStorage } from './module/table-storage.js';
|
|
29
30
|
const html = String.raw;
|
|
30
31
|
export class UserList {
|
|
31
32
|
static main(gvc, obj) {
|
|
@@ -53,6 +54,7 @@ export class UserList {
|
|
|
53
54
|
headerConfig: [],
|
|
54
55
|
apiJSON: {},
|
|
55
56
|
checkedData: [],
|
|
57
|
+
listLimit: TableStorage.getLimit(),
|
|
56
58
|
};
|
|
57
59
|
const ListComp = new BgListComponent(gvc, vm, FilterOptions.userFilterFrame);
|
|
58
60
|
vm.filter = ListComp.getFilterObject();
|
|
@@ -300,6 +302,14 @@ export class UserList {
|
|
|
300
302
|
vm.query = `${e.value}`.trim();
|
|
301
303
|
gvc.notifyDataChange([vm.barId, vm.tableId]);
|
|
302
304
|
}), vm.query || '', '搜尋所有用戶'),
|
|
305
|
+
BgWidget.countingFilter({
|
|
306
|
+
gvc,
|
|
307
|
+
callback: value => {
|
|
308
|
+
vm.listLimit = value;
|
|
309
|
+
gvc.notifyDataChange([vm.barId, vm.tableId]);
|
|
310
|
+
},
|
|
311
|
+
default: vm.listLimit,
|
|
312
|
+
}),
|
|
303
313
|
BgWidget.funnelFilter({
|
|
304
314
|
gvc,
|
|
305
315
|
callback: () => ListComp.showRightMenu(userFunnel),
|
|
@@ -358,10 +368,9 @@ export class UserList {
|
|
|
358
368
|
vmi = vd;
|
|
359
369
|
vm.tabLoading = true;
|
|
360
370
|
UserList.vm.page = vmi.page;
|
|
361
|
-
const limit = 20;
|
|
362
371
|
vm.apiJSON = {
|
|
363
372
|
page: vmi.page - 1,
|
|
364
|
-
limit:
|
|
373
|
+
limit: vm.listLimit,
|
|
365
374
|
search: vm.query || undefined,
|
|
366
375
|
searchType: vm.queryType || 'name',
|
|
367
376
|
orderString: vm.orderString || '',
|
|
@@ -371,8 +380,8 @@ export class UserList {
|
|
|
371
380
|
};
|
|
372
381
|
ApiUser.getUserListOrders(vm.apiJSON).then(data => {
|
|
373
382
|
vm.dataList = data.response.data;
|
|
374
|
-
vmi.limit =
|
|
375
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
383
|
+
vmi.limit = vm.listLimit;
|
|
384
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
376
385
|
vmi.originalData = vm.dataList;
|
|
377
386
|
vmi.tableData = getUserlist();
|
|
378
387
|
vmi.allResult = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -495,6 +504,7 @@ export class UserList {
|
|
|
495
504
|
headerConfig: [],
|
|
496
505
|
apiJSON: {},
|
|
497
506
|
checkedData: [],
|
|
507
|
+
listLimit: TableStorage.getLimit(),
|
|
498
508
|
};
|
|
499
509
|
const ListComp = new BgListComponent(gvc, vm, FilterOptions.userFilterFrame);
|
|
500
510
|
vm.filter = ListComp.getFilterObject();
|
|
@@ -558,6 +568,14 @@ export class UserList {
|
|
|
558
568
|
vm.query = `${e.value}`.trim();
|
|
559
569
|
gvc.notifyDataChange([vm.barId, vm.tableId]);
|
|
560
570
|
}), vm.query || '', '搜尋會員電話/編號/名稱'),
|
|
571
|
+
BgWidget.countingFilter({
|
|
572
|
+
gvc,
|
|
573
|
+
callback: value => {
|
|
574
|
+
vm.listLimit = value;
|
|
575
|
+
gvc.notifyDataChange([vm.barId, vm.tableId]);
|
|
576
|
+
},
|
|
577
|
+
default: vm.listLimit,
|
|
578
|
+
}),
|
|
561
579
|
BgWidget.funnelFilter({
|
|
562
580
|
gvc,
|
|
563
581
|
callback: () => ListComp.showRightMenu(userFunnel),
|
|
@@ -584,10 +602,9 @@ export class UserList {
|
|
|
584
602
|
gvc: gvc,
|
|
585
603
|
getData: vd => {
|
|
586
604
|
vmi = vd;
|
|
587
|
-
const limit = 20;
|
|
588
605
|
vm.apiJSON = {
|
|
589
606
|
page: vmi.page - 1,
|
|
590
|
-
limit:
|
|
607
|
+
limit: vm.listLimit,
|
|
591
608
|
search: vm.query || undefined,
|
|
592
609
|
searchType: vm.queryType || 'name',
|
|
593
610
|
orderString: vm.orderString || '',
|
|
@@ -597,7 +614,7 @@ export class UserList {
|
|
|
597
614
|
};
|
|
598
615
|
ApiUser.getUserListOrders(vm.apiJSON).then(data => {
|
|
599
616
|
vm.dataList = data.response.data;
|
|
600
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
617
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
601
618
|
vmi.originalData = vm.dataList;
|
|
602
619
|
vmi.tableData = getDatalist();
|
|
603
620
|
vmi.loading = false;
|
|
@@ -18,6 +18,7 @@ import { UserExcel } from './module/user-excel.js';
|
|
|
18
18
|
import { GlobalUser } from '../glitter-base/global/global-user.js';
|
|
19
19
|
import { ListHeaderOption } from './list-header-option.js';
|
|
20
20
|
import { UserModule } from './user/user-module.js';
|
|
21
|
+
import { TableStorage } from './module/table-storage.js';
|
|
21
22
|
|
|
22
23
|
const html = String.raw;
|
|
23
24
|
|
|
@@ -43,6 +44,7 @@ type ViewModel = {
|
|
|
43
44
|
headerConfig: string[];
|
|
44
45
|
apiJSON: any;
|
|
45
46
|
checkedData: any[];
|
|
47
|
+
listLimit: number;
|
|
46
48
|
};
|
|
47
49
|
|
|
48
50
|
export class UserList {
|
|
@@ -89,6 +91,7 @@ export class UserList {
|
|
|
89
91
|
headerConfig: [],
|
|
90
92
|
apiJSON: {},
|
|
91
93
|
checkedData: [],
|
|
94
|
+
listLimit: TableStorage.getLimit(),
|
|
92
95
|
};
|
|
93
96
|
|
|
94
97
|
const ListComp = new BgListComponent(gvc, vm, FilterOptions.userFilterFrame);
|
|
@@ -369,6 +372,14 @@ export class UserList {
|
|
|
369
372
|
vm.query || '',
|
|
370
373
|
'搜尋所有用戶'
|
|
371
374
|
),
|
|
375
|
+
BgWidget.countingFilter({
|
|
376
|
+
gvc,
|
|
377
|
+
callback: value => {
|
|
378
|
+
vm.listLimit = value;
|
|
379
|
+
gvc.notifyDataChange([vm.barId, vm.tableId]);
|
|
380
|
+
},
|
|
381
|
+
default: vm.listLimit,
|
|
382
|
+
}),
|
|
372
383
|
BgWidget.funnelFilter({
|
|
373
384
|
gvc,
|
|
374
385
|
callback: () => ListComp.showRightMenu(userFunnel),
|
|
@@ -433,11 +444,10 @@ export class UserList {
|
|
|
433
444
|
vmi = vd;
|
|
434
445
|
vm.tabLoading = true;
|
|
435
446
|
UserList.vm.page = vmi.page;
|
|
436
|
-
const limit = 20;
|
|
437
447
|
|
|
438
448
|
vm.apiJSON = {
|
|
439
449
|
page: vmi.page - 1,
|
|
440
|
-
limit:
|
|
450
|
+
limit: vm.listLimit,
|
|
441
451
|
search: vm.query || undefined,
|
|
442
452
|
searchType: vm.queryType || 'name',
|
|
443
453
|
orderString: vm.orderString || '',
|
|
@@ -448,8 +458,8 @@ export class UserList {
|
|
|
448
458
|
|
|
449
459
|
ApiUser.getUserListOrders(vm.apiJSON).then(data => {
|
|
450
460
|
vm.dataList = data.response.data;
|
|
451
|
-
vmi.limit =
|
|
452
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
461
|
+
vmi.limit = vm.listLimit;
|
|
462
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
453
463
|
vmi.originalData = vm.dataList;
|
|
454
464
|
vmi.tableData = getUserlist();
|
|
455
465
|
|
|
@@ -588,6 +598,7 @@ export class UserList {
|
|
|
588
598
|
headerConfig: [],
|
|
589
599
|
apiJSON: {},
|
|
590
600
|
checkedData: [],
|
|
601
|
+
listLimit: TableStorage.getLimit(),
|
|
591
602
|
};
|
|
592
603
|
|
|
593
604
|
const ListComp = new BgListComponent(gvc, vm, FilterOptions.userFilterFrame);
|
|
@@ -660,6 +671,14 @@ export class UserList {
|
|
|
660
671
|
vm.query || '',
|
|
661
672
|
'搜尋會員電話/編號/名稱'
|
|
662
673
|
),
|
|
674
|
+
BgWidget.countingFilter({
|
|
675
|
+
gvc,
|
|
676
|
+
callback: value => {
|
|
677
|
+
vm.listLimit = value;
|
|
678
|
+
gvc.notifyDataChange([vm.barId, vm.tableId]);
|
|
679
|
+
},
|
|
680
|
+
default: vm.listLimit,
|
|
681
|
+
}),
|
|
663
682
|
BgWidget.funnelFilter({
|
|
664
683
|
gvc,
|
|
665
684
|
callback: () => ListComp.showRightMenu(userFunnel),
|
|
@@ -687,10 +706,9 @@ export class UserList {
|
|
|
687
706
|
gvc: gvc,
|
|
688
707
|
getData: vd => {
|
|
689
708
|
vmi = vd;
|
|
690
|
-
const limit = 20;
|
|
691
709
|
vm.apiJSON = {
|
|
692
710
|
page: vmi.page - 1,
|
|
693
|
-
limit:
|
|
711
|
+
limit: vm.listLimit,
|
|
694
712
|
search: vm.query || undefined,
|
|
695
713
|
searchType: vm.queryType || 'name',
|
|
696
714
|
orderString: vm.orderString || '',
|
|
@@ -700,7 +718,7 @@ export class UserList {
|
|
|
700
718
|
};
|
|
701
719
|
ApiUser.getUserListOrders(vm.apiJSON).then(data => {
|
|
702
720
|
vm.dataList = data.response.data;
|
|
703
|
-
vmi.pageSize = Math.ceil(data.response.total /
|
|
721
|
+
vmi.pageSize = Math.ceil(data.response.total / vm.listLimit);
|
|
704
722
|
vmi.originalData = vm.dataList;
|
|
705
723
|
vmi.tableData = getDatalist();
|
|
706
724
|
vmi.loading = false;
|
package/lowcode/css/editor.css
CHANGED
|
@@ -588,14 +588,18 @@ h6 {
|
|
|
588
588
|
background: var(--background-orange);
|
|
589
589
|
}
|
|
590
590
|
|
|
591
|
+
.form-switch .form-check-input {
|
|
592
|
+
box-shadow: 1px 1px 2.5px rgba(0, 0, 0, 0.2);
|
|
593
|
+
}
|
|
594
|
+
|
|
591
595
|
.form-switch .form-check-input:checked {
|
|
592
596
|
background-color: var(--main-black) !important;
|
|
593
|
-
box-shadow: 0 0
|
|
597
|
+
box-shadow: 1px 1px 2.5px rgba(0, 0, 0, 0.2);
|
|
594
598
|
}
|
|
595
599
|
|
|
596
600
|
.form-switch .form-check-input-success:checked {
|
|
597
601
|
background-color: var(--item-success) !important;
|
|
598
|
-
box-shadow: 0 0
|
|
602
|
+
box-shadow: 1px 1px 2.5px rgba(0, 0, 0, 0.2);
|
|
599
603
|
}
|
|
600
604
|
|
|
601
605
|
.bt_border_editor {
|
|
@@ -902,7 +906,7 @@ h6 {
|
|
|
902
906
|
color: var(--main-black);
|
|
903
907
|
}
|
|
904
908
|
|
|
905
|
-
.
|
|
909
|
+
.c_filter_view {
|
|
906
910
|
display: flex;
|
|
907
911
|
padding: 9px;
|
|
908
912
|
min-width: 40px;
|
|
@@ -941,6 +945,7 @@ h6 {
|
|
|
941
945
|
color: var(--main-black);
|
|
942
946
|
font-size: 16px;
|
|
943
947
|
font-weight: 400;
|
|
948
|
+
padding-top: 1px;
|
|
944
949
|
}
|
|
945
950
|
|
|
946
951
|
.c_dropdown {
|
|
@@ -1277,9 +1282,9 @@ h6 {
|
|
|
1277
1282
|
}
|
|
1278
1283
|
|
|
1279
1284
|
.c_absolute {
|
|
1280
|
-
width:
|
|
1281
|
-
height:
|
|
1282
|
-
padding:
|
|
1285
|
+
width: 220px;
|
|
1286
|
+
height: 280px;
|
|
1287
|
+
padding: 16px;
|
|
1283
1288
|
}
|
|
1284
1289
|
|
|
1285
1290
|
.btn-gray,
|
|
@@ -124,9 +124,10 @@ export class ProductSelect {
|
|
|
124
124
|
return [];
|
|
125
125
|
}
|
|
126
126
|
}))();
|
|
127
|
-
resolve(html ` <div class="d-flex flex-column py-2
|
|
127
|
+
resolve(html ` <div class="d-flex flex-column py-2" style="">
|
|
128
|
+
<div class="mx-n3 border-top" ></div>
|
|
128
129
|
<div
|
|
129
|
-
class="d-flex align-items-center
|
|
130
|
+
class="d-flex align-items-center pb-2"
|
|
130
131
|
style="gap: 10px; justify-content: space-between;"
|
|
131
132
|
>
|
|
132
133
|
<div class="flex-fill ">
|
|
@@ -153,14 +154,7 @@ export class ProductSelect {
|
|
|
153
154
|
class="${bundle.formData[bundle.key].select === 'all' ? `d-none` : ``}"
|
|
154
155
|
style="margin-top: 30px;"
|
|
155
156
|
>
|
|
156
|
-
${BgWidget.
|
|
157
|
-
switch (bundle.formData[bundle.key].select) {
|
|
158
|
-
case 'product':
|
|
159
|
-
case 'collection':
|
|
160
|
-
return `選取`;
|
|
161
|
-
}
|
|
162
|
-
return ``;
|
|
163
|
-
})(), gvc.event(() => {
|
|
157
|
+
${BgWidget.save(gvc.event(() => {
|
|
164
158
|
var _a, _b;
|
|
165
159
|
if (bundle.formData[bundle.key].select === 'product') {
|
|
166
160
|
bundle.formData[bundle.key].value = (_a = bundle.formData[bundle.key].value) !== null && _a !== void 0 ? _a : [];
|
|
@@ -186,7 +180,14 @@ export class ProductSelect {
|
|
|
186
180
|
}),
|
|
187
181
|
});
|
|
188
182
|
}
|
|
189
|
-
}),
|
|
183
|
+
}), (() => {
|
|
184
|
+
switch (bundle.formData[bundle.key].select) {
|
|
185
|
+
case 'product':
|
|
186
|
+
case 'collection':
|
|
187
|
+
return `選取`;
|
|
188
|
+
}
|
|
189
|
+
return ``;
|
|
190
|
+
})())}
|
|
190
191
|
</div>
|
|
191
192
|
</div>
|
|
192
193
|
<div class="d-flex flex-column gap-2" id="${subVM.containerId}">
|
|
@@ -232,6 +233,7 @@ export class ProductSelect {
|
|
|
232
233
|
}
|
|
233
234
|
}))}
|
|
234
235
|
</div>
|
|
236
|
+
<div class="mx-n3 border-top" ></div>
|
|
235
237
|
</div>`);
|
|
236
238
|
}));
|
|
237
239
|
},
|
|
@@ -127,9 +127,10 @@ export class ProductSelect {
|
|
|
127
127
|
}
|
|
128
128
|
})();
|
|
129
129
|
resolve(
|
|
130
|
-
html` <div class="d-flex flex-column py-2
|
|
130
|
+
html` <div class="d-flex flex-column py-2" style="">
|
|
131
|
+
<div class="mx-n3 border-top" ></div>
|
|
131
132
|
<div
|
|
132
|
-
class="d-flex align-items-center
|
|
133
|
+
class="d-flex align-items-center pb-2"
|
|
133
134
|
style="gap: 10px; justify-content: space-between;"
|
|
134
135
|
>
|
|
135
136
|
<div class="flex-fill ">
|
|
@@ -156,15 +157,7 @@ export class ProductSelect {
|
|
|
156
157
|
class="${bundle.formData[bundle.key].select === 'all' ? `d-none` : ``}"
|
|
157
158
|
style="margin-top: 30px;"
|
|
158
159
|
>
|
|
159
|
-
${BgWidget.
|
|
160
|
-
(() => {
|
|
161
|
-
switch (bundle.formData[bundle.key].select) {
|
|
162
|
-
case 'product':
|
|
163
|
-
case 'collection':
|
|
164
|
-
return `選取`;
|
|
165
|
-
}
|
|
166
|
-
return ``;
|
|
167
|
-
})(),
|
|
160
|
+
${BgWidget.save(
|
|
168
161
|
gvc.event(() => {
|
|
169
162
|
if (bundle.formData[bundle.key].select === 'product') {
|
|
170
163
|
bundle.formData[bundle.key].value = bundle.formData[bundle.key].value ?? [];
|
|
@@ -190,7 +183,15 @@ export class ProductSelect {
|
|
|
190
183
|
});
|
|
191
184
|
}
|
|
192
185
|
}),
|
|
193
|
-
|
|
186
|
+
(() => {
|
|
187
|
+
switch (bundle.formData[bundle.key].select) {
|
|
188
|
+
case 'product':
|
|
189
|
+
case 'collection':
|
|
190
|
+
return `選取`;
|
|
191
|
+
}
|
|
192
|
+
return ``;
|
|
193
|
+
})(),
|
|
194
|
+
|
|
194
195
|
)}
|
|
195
196
|
</div>
|
|
196
197
|
</div>
|
|
@@ -241,6 +242,7 @@ export class ProductSelect {
|
|
|
241
242
|
})
|
|
242
243
|
)}
|
|
243
244
|
</div>
|
|
245
|
+
<div class="mx-n3 border-top" ></div>
|
|
244
246
|
</div>`
|
|
245
247
|
);
|
|
246
248
|
});
|
package/lowcode/modules/tool.js
CHANGED
|
@@ -81,4 +81,13 @@ export class Tool {
|
|
|
81
81
|
return a + b;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
static isNowBetweenDates(startIso, endIso) {
|
|
85
|
+
const now = new Date();
|
|
86
|
+
const startDate = new Date(startIso);
|
|
87
|
+
const endDate = new Date(endIso);
|
|
88
|
+
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
return now >= startDate && now <= endDate;
|
|
92
|
+
}
|
|
84
93
|
}
|
package/lowcode/modules/tool.ts
CHANGED
|
@@ -98,4 +98,16 @@ export class Tool {
|
|
|
98
98
|
return a + b;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
static isNowBetweenDates(startIso: string, endIso: string): boolean {
|
|
103
|
+
const now = new Date();
|
|
104
|
+
const startDate = new Date(startIso);
|
|
105
|
+
const endDate = new Date(endIso);
|
|
106
|
+
|
|
107
|
+
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return now >= startDate && now <= endDate;
|
|
112
|
+
}
|
|
101
113
|
}
|