ts-glitter 21.4.3 → 21.4.5
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-product.js +8 -6
- package/lowcode/backend-manager/bg-product.ts +17 -15
- package/lowcode/backend-manager/bg-recommend.js +16 -5
- package/lowcode/backend-manager/bg-recommend.ts +15 -5
- package/lowcode/backend-manager/bg-widget.js +160 -160
- package/lowcode/backend-manager/bg-widget.ts +169 -166
- package/lowcode/cms-plugin/POS-setting.js +75 -23
- package/lowcode/cms-plugin/POS-setting.ts +87 -30
- package/lowcode/cms-plugin/menus-setting.js +165 -37
- package/lowcode/cms-plugin/menus-setting.ts +144 -21
- package/lowcode/cms-plugin/module/order-excel.js +8 -8
- package/lowcode/cms-plugin/module/order-excel.ts +10 -10
- package/lowcode/cms-plugin/module/stock-excel.js +184 -0
- package/lowcode/cms-plugin/module/stock-excel.ts +205 -0
- package/lowcode/cms-plugin/module/vendor-excel.js +375 -0
- package/lowcode/cms-plugin/module/vendor-excel.ts +450 -0
- package/lowcode/cms-plugin/order/order-module.js +6 -4
- package/lowcode/cms-plugin/order/order-module.ts +16 -14
- package/lowcode/cms-plugin/pos-pages/models.ts +6 -2
- package/lowcode/cms-plugin/pos-pages/products-page.js +589 -469
- package/lowcode/cms-plugin/pos-pages/products-page.ts +657 -491
- package/lowcode/cms-plugin/shopping-product-setting.js +7 -10
- package/lowcode/cms-plugin/shopping-product-setting.ts +12 -10
- package/lowcode/cms-plugin/shopping-setting-basic.js +2 -5
- package/lowcode/cms-plugin/shopping-setting-basic.ts +2 -5
- package/lowcode/cms-plugin/stock-history.js +39 -26
- package/lowcode/cms-plugin/stock-history.ts +58 -49
- package/lowcode/cms-plugin/stock-vendors.js +18 -13
- package/lowcode/cms-plugin/stock-vendors.ts +31 -16
- package/lowcode/public-components/layout-plugin/social-links-01.js +8 -0
- package/lowcode/public-components/layout-plugin/social-links-01.ts +15 -0
- package/package.json +1 -1
- package/src/api-public/services/schedule.js +6 -1
- package/src/api-public/services/schedule.js.map +1 -1
- package/src/api-public/services/schedule.ts +4 -1
|
@@ -22,6 +22,7 @@ import { PosWidget } from './pos-widget.js';
|
|
|
22
22
|
import { SaasOffer } from '../saas-offer.js';
|
|
23
23
|
import { Language } from '../glitter-base/global/language.js';
|
|
24
24
|
import { CreditCard } from './pos-pages/credit-card.js';
|
|
25
|
+
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
25
26
|
|
|
26
27
|
const html = String.raw;
|
|
27
28
|
|
|
@@ -173,8 +174,6 @@ export class POSSetting {
|
|
|
173
174
|
}
|
|
174
175
|
|
|
175
176
|
static initial(gvc: GVC) {
|
|
176
|
-
|
|
177
|
-
|
|
178
177
|
gvc.glitter.share.editorViewModel = { app_config_original: {} };
|
|
179
178
|
gvc.glitter.share.shop_config = { shop_name: '' };
|
|
180
179
|
|
|
@@ -191,7 +190,7 @@ export class POSSetting {
|
|
|
191
190
|
});
|
|
192
191
|
}
|
|
193
192
|
|
|
194
|
-
static setSaasBrand(){
|
|
193
|
+
static setSaasBrand() {
|
|
195
194
|
if (window.location.href.includes('smartshop')) {
|
|
196
195
|
(window as any).glitterBase = 'hd_saas';
|
|
197
196
|
} else {
|
|
@@ -396,7 +395,6 @@ export class POSSetting {
|
|
|
396
395
|
function changeSelectVariant(product: any) {
|
|
397
396
|
let emptyArray: any[] = [];
|
|
398
397
|
product.content.specs.forEach((spec: any) => {
|
|
399
|
-
console.log(spec.option);
|
|
400
398
|
emptyArray.push(spec.option.find((opt: any) => opt.select == true).title);
|
|
401
399
|
});
|
|
402
400
|
return product.content.variants.find((variant: any) => arraysEqual(variant.spec, emptyArray));
|
|
@@ -561,9 +559,9 @@ export class POSSetting {
|
|
|
561
559
|
</svg>
|
|
562
560
|
</div>
|
|
563
561
|
</div>
|
|
564
|
-
<div class="d-flex mt-2 align-items-
|
|
565
|
-
<
|
|
566
|
-
|
|
562
|
+
<div class="d-flex flex-column gap-1 mt-2 align-items-end justify-content-center">
|
|
563
|
+
<div>
|
|
564
|
+
${(() => {
|
|
567
565
|
if (selectVariant.show_understocking === 'false') {
|
|
568
566
|
return '此商品未追蹤庫存數量';
|
|
569
567
|
}
|
|
@@ -574,8 +572,75 @@ export class POSSetting {
|
|
|
574
572
|
return `庫存數量: ${selectVariant.exhibition_active_stock}`;
|
|
575
573
|
}
|
|
576
574
|
return `庫存數量: ${selectVariant.stock}`;
|
|
577
|
-
})()}
|
|
578
|
-
>
|
|
575
|
+
})()}
|
|
576
|
+
</div>
|
|
577
|
+
${selectVariant.show_understocking === 'false'
|
|
578
|
+
? ''
|
|
579
|
+
: BgWidget.blueNote(
|
|
580
|
+
'查看其他庫存點',
|
|
581
|
+
gvc.event(() => {
|
|
582
|
+
BgWidget.settingDialog({
|
|
583
|
+
gvc,
|
|
584
|
+
title: '其他庫存點',
|
|
585
|
+
innerHTML: () => {
|
|
586
|
+
return BgWidget.tableV3({
|
|
587
|
+
gvc,
|
|
588
|
+
filter: [],
|
|
589
|
+
getData: vmi => {
|
|
590
|
+
const dataList: { name: string; count: number }[] = [];
|
|
591
|
+
|
|
592
|
+
function callback() {
|
|
593
|
+
vmi.pageSize = 1;
|
|
594
|
+
vmi.originalData = dataList;
|
|
595
|
+
vmi.tableData = getDatalist();
|
|
596
|
+
vmi.loading = false;
|
|
597
|
+
vmi.callback();
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
function getDatalist() {
|
|
601
|
+
return dataList.map((dd: any) => {
|
|
602
|
+
return [
|
|
603
|
+
{
|
|
604
|
+
key: '門市名稱',
|
|
605
|
+
value: `<span class="fs-7">${dd.name}</span>`,
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
key: '數量',
|
|
609
|
+
value: `<span class="fs-7">${dd.count || 0}</span>`,
|
|
610
|
+
},
|
|
611
|
+
];
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
ApiUser.getPublicConfig('store_manager', 'manager').then((dd: any) => {
|
|
616
|
+
if (dd.result && Array.isArray(dd.response.value?.list)) {
|
|
617
|
+
dd.response.value.list.map((store: any) => {
|
|
618
|
+
const n = selectVariant.stockList?.[store.id]?.count ?? 0;
|
|
619
|
+
dataList.push({
|
|
620
|
+
name: store.name,
|
|
621
|
+
count: n > 0 ? n : 0,
|
|
622
|
+
});
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
callback();
|
|
627
|
+
});
|
|
628
|
+
},
|
|
629
|
+
rowClick: () => {},
|
|
630
|
+
hiddenPageSplit: true,
|
|
631
|
+
});
|
|
632
|
+
},
|
|
633
|
+
footer_html: (fGVC: GVC) => {
|
|
634
|
+
return [
|
|
635
|
+
BgWidget.save(
|
|
636
|
+
fGVC.event(() => gvc.closeDialog()),
|
|
637
|
+
'確認'
|
|
638
|
+
),
|
|
639
|
+
].join();
|
|
640
|
+
},
|
|
641
|
+
});
|
|
642
|
+
})
|
|
643
|
+
)}
|
|
579
644
|
</div>
|
|
580
645
|
`;
|
|
581
646
|
},
|
|
@@ -871,13 +936,7 @@ export class POSSetting {
|
|
|
871
936
|
query: '',
|
|
872
937
|
productSearch: [],
|
|
873
938
|
categorySearch: true,
|
|
874
|
-
categories: [
|
|
875
|
-
{
|
|
876
|
-
key: 'all',
|
|
877
|
-
value: '全部商品',
|
|
878
|
-
select: true,
|
|
879
|
-
},
|
|
880
|
-
],
|
|
939
|
+
categories: [],
|
|
881
940
|
};
|
|
882
941
|
|
|
883
942
|
let orderDetail = JSON.parse(JSON.stringify(new OrderDetail(0, 0)));
|
|
@@ -980,7 +1039,6 @@ export class POSSetting {
|
|
|
980
1039
|
PayConfig.pos_config = res.response.value;
|
|
981
1040
|
vm.loading = false;
|
|
982
1041
|
gvc.notifyDataChange(vm.id);
|
|
983
|
-
console.log(`PayConfig.pos_config=>`,PayConfig.pos_config)
|
|
984
1042
|
});
|
|
985
1043
|
|
|
986
1044
|
if (vm.type === 'home') {
|
|
@@ -1389,21 +1447,20 @@ export class POSSetting {
|
|
|
1389
1447
|
<div class="dropdown-menu position-absolute" style="top:50px; right: 0;">
|
|
1390
1448
|
${[
|
|
1391
1449
|
...[
|
|
1392
|
-
|
|
1393
1450
|
...(PayConfig.deviceType === 'pos'
|
|
1394
1451
|
? [
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1452
|
+
html`<a
|
|
1453
|
+
class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
1454
|
+
style="gap:10px;"
|
|
1455
|
+
onclick="${gvc.event(() => {
|
|
1456
|
+
CreditCard.refundView(gvc);
|
|
1457
|
+
})}"
|
|
1458
|
+
><i
|
|
1459
|
+
class="fa-regular fa-credit-card d-flex align-items-center justify-content-center"
|
|
1460
|
+
style="width:20px;"
|
|
1461
|
+
></i
|
|
1462
|
+
>信用卡刷退</a
|
|
1463
|
+
>`,
|
|
1407
1464
|
html` <a
|
|
1408
1465
|
class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
1409
1466
|
style="gap:10px;"
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import { BgWidget } from '../backend-manager/bg-widget.js';
|
|
2
11
|
import { ApiUser } from '../glitter-base/route/user.js';
|
|
3
12
|
import { EditorElem } from '../glitterBundle/plugins/editor-elem.js';
|
|
4
13
|
import { LanguageBackend } from './language-backend.js';
|
|
14
|
+
import { ShareDialog } from '../glitterBundle/dialog/ShareDialog.js';
|
|
5
15
|
const html = String.raw;
|
|
6
16
|
export class MenusSetting {
|
|
7
17
|
static main(gvc, widget) {
|
|
@@ -12,7 +22,8 @@ export class MenusSetting {
|
|
|
12
22
|
index: 0,
|
|
13
23
|
dataList: undefined,
|
|
14
24
|
query: '',
|
|
15
|
-
tab: 'menu'
|
|
25
|
+
tab: 'menu',
|
|
26
|
+
select: { title: '', tag: '' }
|
|
16
27
|
};
|
|
17
28
|
const filterID = gvc.glitter.getUUID();
|
|
18
29
|
let vmi = undefined;
|
|
@@ -40,12 +51,57 @@ export class MenusSetting {
|
|
|
40
51
|
<div class="title-container">
|
|
41
52
|
${BgWidget.title('選單管理')}
|
|
42
53
|
<div class="flex-fill"></div>
|
|
43
|
-
${
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
${BgWidget.darkButton(`新增${vm.tab === 'menu' ? `頁首選單` : `頁腳選單`}`, gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
let title = '';
|
|
56
|
+
function next() {
|
|
57
|
+
var _a;
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
60
|
+
dialog.dataLoading({ visible: true });
|
|
61
|
+
const tab = vm.tab === 'menu' ? `頁首選單` : `頁腳選單`;
|
|
62
|
+
let menu_all = (yield ApiUser.getPublicConfig('menu-setting-list', 'manager')).response.value;
|
|
63
|
+
menu_all.list = (_a = menu_all.list) !== null && _a !== void 0 ? _a : [];
|
|
64
|
+
menu_all.list = [
|
|
65
|
+
{
|
|
66
|
+
tag: gvc.glitter.getUUID(),
|
|
67
|
+
title: [tab, `${menu_all.list.length + 1}`].join(''),
|
|
68
|
+
tab: vm.tab === 'menu' ? 'menu-setting' : 'footer-setting'
|
|
69
|
+
}
|
|
70
|
+
].concat(menu_all.list);
|
|
71
|
+
yield ApiUser.setPublicConfig({
|
|
72
|
+
key: 'menu-setting-list',
|
|
73
|
+
value: menu_all,
|
|
74
|
+
user_id: 'manager'
|
|
75
|
+
});
|
|
76
|
+
dialog.dataLoading({ visible: false });
|
|
77
|
+
gvc.notifyDataChange(id);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
BgWidget.settingDialog({
|
|
81
|
+
gvc: gvc,
|
|
82
|
+
title: '選單名稱',
|
|
83
|
+
innerHTML: (gvc) => {
|
|
84
|
+
return [
|
|
85
|
+
BgWidget.editeInput({
|
|
86
|
+
title: '',
|
|
87
|
+
callback: (text) => {
|
|
88
|
+
title = text;
|
|
89
|
+
},
|
|
90
|
+
default: title,
|
|
91
|
+
gvc: gvc,
|
|
92
|
+
placeHolder: '請輸入選單名稱'
|
|
93
|
+
})
|
|
94
|
+
].join('');
|
|
95
|
+
},
|
|
96
|
+
footer_html: (gvc) => {
|
|
97
|
+
return BgWidget.save(gvc.event(() => {
|
|
98
|
+
next();
|
|
99
|
+
gvc.closeDialog();
|
|
100
|
+
}), '儲存');
|
|
101
|
+
},
|
|
102
|
+
width: 300
|
|
103
|
+
});
|
|
104
|
+
})))}
|
|
49
105
|
</div>
|
|
50
106
|
${BgWidget.tab([
|
|
51
107
|
{ title: '主選單', key: 'menu' },
|
|
@@ -53,23 +109,31 @@ export class MenusSetting {
|
|
|
53
109
|
], gvc, vm.tab, (text) => {
|
|
54
110
|
vm.tab = text;
|
|
55
111
|
gvc.notifyDataChange(id);
|
|
56
|
-
}, `margin-bottom:0px !important;`
|
|
112
|
+
}, `${document.body.clientWidth < 800 ? `` : `margin-bottom:0px !important;`}
|
|
113
|
+
`)}
|
|
57
114
|
${BgWidget.container(BgWidget.mainCard(BgWidget.tableV3({
|
|
58
115
|
gvc: gvc,
|
|
59
|
-
getData: vmi => {
|
|
116
|
+
getData: (vmi) => __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
var _a;
|
|
118
|
+
const tag = vm.tab === 'menu' ? 'menu-setting' : 'footer-setting';
|
|
119
|
+
let menu_all = (yield ApiUser.getPublicConfig('menu-setting-list', 'manager')).response.value;
|
|
120
|
+
menu_all.list = (_a = menu_all.list) !== null && _a !== void 0 ? _a : [];
|
|
60
121
|
vm.dataList = [
|
|
61
|
-
{ tag:
|
|
122
|
+
{ tag: tag, title: `
|
|
62
123
|
<div> ${vm.tab === 'menu' ? `頁首選單` : `頁腳選單`} <span style="font-size:12px;color:#36B;">系統預設</span></div>
|
|
63
|
-
` }
|
|
124
|
+
` },
|
|
125
|
+
...menu_all.list.filter((d1) => {
|
|
126
|
+
return d1.tab === tag;
|
|
127
|
+
})
|
|
64
128
|
];
|
|
65
129
|
vmi.pageSize = 1;
|
|
66
130
|
vmi.originalData = vm.dataList;
|
|
67
131
|
vmi.tableData = getDatalist();
|
|
68
132
|
vmi.loading = false;
|
|
69
133
|
vmi.callback();
|
|
70
|
-
},
|
|
134
|
+
}),
|
|
71
135
|
rowClick: (data, index) => {
|
|
72
|
-
vm.
|
|
136
|
+
vm.select = vm.dataList[index];
|
|
73
137
|
vm.type = 'replace';
|
|
74
138
|
},
|
|
75
139
|
filter: [],
|
|
@@ -89,8 +153,8 @@ export class MenusSetting {
|
|
|
89
153
|
return BgWidget.container(this.setMenu({
|
|
90
154
|
gvc: gvc,
|
|
91
155
|
widget: widget,
|
|
92
|
-
key: vm.
|
|
93
|
-
title: vm.
|
|
156
|
+
key: vm.select.tag,
|
|
157
|
+
title: vm.select.title,
|
|
94
158
|
goBack: () => {
|
|
95
159
|
vm.type = 'list';
|
|
96
160
|
gvc.notifyDataChange(id);
|
|
@@ -115,7 +179,7 @@ export class MenusSetting {
|
|
|
115
179
|
},
|
|
116
180
|
selected: false,
|
|
117
181
|
loading: true,
|
|
118
|
-
language: window.parent.store_info.language_setting.def
|
|
182
|
+
language: window.parent.store_info.language_setting.def
|
|
119
183
|
};
|
|
120
184
|
ApiUser.getPublicConfig(cf.key, 'manager').then((data) => {
|
|
121
185
|
if (data.response.value) {
|
|
@@ -130,25 +194,38 @@ export class MenusSetting {
|
|
|
130
194
|
});
|
|
131
195
|
}
|
|
132
196
|
function save() {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
197
|
+
var _a, _b;
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
for (const a of ['en-US', 'zh-CN', 'zh-TW']) {
|
|
200
|
+
vm.link[a] = (_a = vm.link[a]) !== null && _a !== void 0 ? _a : [];
|
|
201
|
+
clearNoNeedData(vm.link[a]);
|
|
202
|
+
}
|
|
203
|
+
cf.widget.event('loading', {
|
|
204
|
+
title: '儲存中...',
|
|
205
|
+
});
|
|
206
|
+
let menu_all = (yield ApiUser.getPublicConfig('menu-setting-list', 'manager')).response.value;
|
|
207
|
+
menu_all.list = (_b = menu_all.list) !== null && _b !== void 0 ? _b : [];
|
|
208
|
+
const find_ = menu_all.list.find((d1) => { return d1.tag === cf.key; });
|
|
209
|
+
find_ && (find_.title = cf.title);
|
|
210
|
+
yield ApiUser.setPublicConfig({
|
|
211
|
+
key: 'menu-setting-list',
|
|
212
|
+
value: menu_all,
|
|
213
|
+
user_id: 'manager'
|
|
214
|
+
});
|
|
215
|
+
ApiUser.setPublicConfig({
|
|
216
|
+
key: cf.key,
|
|
217
|
+
value: vm.link,
|
|
218
|
+
user_id: 'manager',
|
|
219
|
+
}).then(data => {
|
|
220
|
+
setTimeout(() => {
|
|
221
|
+
cf.widget.event('loading', {
|
|
222
|
+
visible: false,
|
|
223
|
+
});
|
|
224
|
+
cf.widget.event('success', {
|
|
225
|
+
title: '儲存成功',
|
|
226
|
+
});
|
|
227
|
+
}, 1000);
|
|
228
|
+
});
|
|
152
229
|
});
|
|
153
230
|
}
|
|
154
231
|
function selectAll(array) {
|
|
@@ -194,13 +271,44 @@ export class MenusSetting {
|
|
|
194
271
|
return {
|
|
195
272
|
bind: vm.id,
|
|
196
273
|
view: () => {
|
|
197
|
-
var _a;
|
|
274
|
+
var _a, _b;
|
|
275
|
+
vm.link[vm.language] = (_a = vm.link[vm.language]) !== null && _a !== void 0 ? _a : [];
|
|
198
276
|
const link = vm.link[vm.language];
|
|
199
277
|
return html `<div class="title-container" style="width: 100%; max-width: 100%;">
|
|
200
278
|
${BgWidget.goBack(cf.gvc.event(() => {
|
|
201
279
|
cf.goBack();
|
|
202
|
-
}))}${BgWidget.title((
|
|
280
|
+
}))}${BgWidget.title((_b = cf.title) !== null && _b !== void 0 ? _b : '選單設定')}
|
|
281
|
+
<div class="mx-2 ${['menu-setting', 'footer-setting', 'text-manager'].includes(cf.key) ? `d-none` : ``}">
|
|
282
|
+
${BgWidget.grayButton('重新命名', gvc.event(() => {
|
|
283
|
+
BgWidget.settingDialog({
|
|
284
|
+
gvc: gvc,
|
|
285
|
+
title: '重新命名',
|
|
286
|
+
innerHTML: (gvc) => {
|
|
287
|
+
return [
|
|
288
|
+
BgWidget.editeInput({
|
|
289
|
+
title: '',
|
|
290
|
+
callback: (text) => {
|
|
291
|
+
cf.title = text;
|
|
292
|
+
},
|
|
293
|
+
default: cf.title,
|
|
294
|
+
gvc: gvc,
|
|
295
|
+
placeHolder: ''
|
|
296
|
+
})
|
|
297
|
+
].join('');
|
|
298
|
+
},
|
|
299
|
+
footer_html: (gvc) => {
|
|
300
|
+
return BgWidget.save(gvc.event(() => {
|
|
301
|
+
gvc.closeDialog();
|
|
302
|
+
refresh();
|
|
303
|
+
}), '儲存');
|
|
304
|
+
},
|
|
305
|
+
width: 500
|
|
306
|
+
});
|
|
307
|
+
}))}
|
|
308
|
+
</div>
|
|
309
|
+
|
|
203
310
|
<div class="flex-fill"></div>
|
|
311
|
+
|
|
204
312
|
${LanguageBackend.switchBtn({
|
|
205
313
|
gvc: gvc,
|
|
206
314
|
language: vm.language,
|
|
@@ -489,6 +597,26 @@ export class MenusSetting {
|
|
|
489
597
|
</div>
|
|
490
598
|
</div>`)}
|
|
491
599
|
<div class="update-bar-container">
|
|
600
|
+
${['menu-setting', 'footer-setting', 'text-manager'].includes(cf.key) ? `` : BgWidget.danger(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
601
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
602
|
+
dialog.checkYesOrNot({
|
|
603
|
+
text: '是否確認刪除?',
|
|
604
|
+
callback: (response) => __awaiter(this, void 0, void 0, function* () {
|
|
605
|
+
if (response) {
|
|
606
|
+
dialog.dataLoading({ visible: true });
|
|
607
|
+
let menu_all = (yield ApiUser.getPublicConfig('menu-setting-list', 'manager')).response.value;
|
|
608
|
+
menu_all.list = menu_all.list.filter((d1) => d1.tag != cf.key);
|
|
609
|
+
yield ApiUser.setPublicConfig({
|
|
610
|
+
key: 'menu-setting-list',
|
|
611
|
+
value: menu_all,
|
|
612
|
+
user_id: 'manager'
|
|
613
|
+
});
|
|
614
|
+
dialog.dataLoading({ visible: false });
|
|
615
|
+
cf.goBack();
|
|
616
|
+
}
|
|
617
|
+
})
|
|
618
|
+
});
|
|
619
|
+
})))}
|
|
492
620
|
${BgWidget.cancel(gvc.event(() => {
|
|
493
621
|
cf.goBack();
|
|
494
622
|
}))}
|