ts-glitter 16.6.0 → 16.6.1
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 +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/cms-plugin/checkout-setting.js +41 -30
- package/lowcode/cms-plugin/checkout-setting.ts +85 -74
- package/lowcode/cms-plugin/pos-pages/models.ts +1 -1
- package/lowcode/cms-plugin/pos-pages/payment-page.js +162 -162
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +193 -191
- package/lowcode/cms-plugin/pos-pages/pos-function.js +63 -0
- package/lowcode/cms-plugin/pos-pages/pos-function.ts +67 -0
- package/lowcode/cms-plugin/pos-pages/products-page.js +1 -1
- package/lowcode/cms-plugin/pos-pages/products-page.ts +1 -1
- package/lowcode/cms-plugin/pos-widget.js +13 -0
- package/lowcode/cms-plugin/pos-widget.ts +14 -0
- package/lowcode/cms-plugin/shopping-order-manager.js +77 -57
- package/lowcode/cms-plugin/shopping-order-manager.ts +70 -57
- package/package.json +1 -1
- package/src/api-public/services/shopping.js +2 -2
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +2 -2
- package/src/index.js +6 -1
- package/src/index.js.map +1 -1
- package/src/index.ts +6 -1
package/lowcode/Entry.js
CHANGED
|
@@ -79,7 +79,7 @@ export class Entry {
|
|
|
79
79
|
}
|
|
80
80
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
81
81
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
82
|
-
glitter.share.editerVersion = 'V_16.6.
|
|
82
|
+
glitter.share.editerVersion = 'V_16.6.1';
|
|
83
83
|
glitter.share.start = new Date();
|
|
84
84
|
const vm = {
|
|
85
85
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -78,7 +78,7 @@ export class Entry {
|
|
|
78
78
|
}
|
|
79
79
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
80
80
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
81
|
-
glitter.share.editerVersion = 'V_16.6.
|
|
81
|
+
glitter.share.editerVersion = 'V_16.6.1';
|
|
82
82
|
glitter.share.start = new Date();
|
|
83
83
|
const vm: {
|
|
84
84
|
appConfig: any;
|
|
@@ -28,7 +28,8 @@ export class MemberSetting {
|
|
|
28
28
|
key: 'login_config',
|
|
29
29
|
value: vm.data,
|
|
30
30
|
user_id: 'manager',
|
|
31
|
-
}).then(() => {
|
|
31
|
+
}).then(() => {
|
|
32
|
+
});
|
|
32
33
|
}
|
|
33
34
|
return gvc.bindView(() => {
|
|
34
35
|
return {
|
|
@@ -44,54 +45,64 @@ export class MemberSetting {
|
|
|
44
45
|
</div>
|
|
45
46
|
${BgWidget.container([
|
|
46
47
|
BgWidget.mainCard([
|
|
47
|
-
html `
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
class="
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
html `
|
|
49
|
+
<div class="tx_normal fw-bolder mt-2 d-flex flex-column"
|
|
50
|
+
style="margin-bottom: 12px;">結帳設定
|
|
51
|
+
<span class="" style="color:#8D8D8D;font-size: 12px;">是否必需註冊會員後才可進行結帳</span>
|
|
52
|
+
</div>`,
|
|
53
|
+
html `
|
|
54
|
+
<div class="d-flex align-items-center w-100"
|
|
55
|
+
style="gap:4px;margin-bottom: 12px;">
|
|
56
|
+
<div class="tx_normal d-flex flex-column">允許訪客結帳
|
|
57
|
+
</div>
|
|
58
|
+
<div class="tx_normal ms-2">
|
|
59
|
+
${vm.data.login_in_to_order ? `關閉` : `開啟`}
|
|
60
|
+
</div>
|
|
61
|
+
<div class="cursor_pointer form-check form-switch m-0">
|
|
62
|
+
<input
|
|
63
|
+
class="form-check-input"
|
|
64
|
+
type="checkbox"
|
|
65
|
+
onchange="${gvc.event((e, event) => {
|
|
56
66
|
vm.data.login_in_to_order = !vm.data.login_in_to_order;
|
|
57
67
|
saveEvent();
|
|
58
68
|
gvc.notifyDataChange(vm.id);
|
|
59
69
|
})}"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
${vm.data.login_in_to_order ? `` : `checked`}
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="flex-fill"></div>
|
|
74
|
+
</div>`,
|
|
65
75
|
].join('')),
|
|
66
76
|
...(() => {
|
|
67
77
|
const form = BgWidget.customForm(gvc, [
|
|
68
78
|
{
|
|
69
79
|
key: 'custom_form_checkout',
|
|
70
80
|
title: html `
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
<div class="tx_normal fw-bolder mt-2 d-flex flex-column"
|
|
82
|
+
style="margin-bottom: 12px;">
|
|
83
|
+
顧客資訊表單
|
|
84
|
+
<span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的顧客資訊表單</span>
|
|
85
|
+
</div>
|
|
76
86
|
|
|
77
|
-
|
|
87
|
+
`
|
|
78
88
|
},
|
|
79
89
|
{
|
|
80
90
|
key: 'custom_form_checkout_recipient',
|
|
81
91
|
title: html `
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
92
|
+
<div class="tx_normal fw-bolder mt-2 d-flex flex-column"
|
|
93
|
+
style="margin-bottom: 12px;">
|
|
94
|
+
配送資訊表單
|
|
95
|
+
<span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的配送資訊表單</span>
|
|
96
|
+
</div>
|
|
87
97
|
|
|
88
|
-
|
|
98
|
+
`
|
|
89
99
|
}
|
|
90
100
|
]);
|
|
91
101
|
return [
|
|
92
102
|
form.view,
|
|
93
|
-
html `
|
|
94
|
-
|
|
103
|
+
html `
|
|
104
|
+
<div class="update-bar-container">
|
|
105
|
+
${BgWidget.save(gvc.event(() => __awaiter(this, void 0, void 0, function* () {
|
|
95
106
|
const dialog = new ShareDialog(gvc.glitter);
|
|
96
107
|
dialog.dataLoading({ visible: true });
|
|
97
108
|
saveEvent();
|
|
@@ -99,7 +110,7 @@ export class MemberSetting {
|
|
|
99
110
|
dialog.dataLoading({ visible: false });
|
|
100
111
|
dialog.successMessage({ text: '設定成功' });
|
|
101
112
|
})))}
|
|
102
|
-
|
|
113
|
+
</div>`,
|
|
103
114
|
];
|
|
104
115
|
})(),
|
|
105
116
|
BgWidget.mbContainer(240),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import {GVC} from '../glitterBundle/GVController.js';
|
|
2
|
+
import {EditorElem} from '../glitterBundle/plugins/editor-elem.js';
|
|
3
|
+
import {BgWidget} from '../backend-manager/bg-widget.js';
|
|
4
|
+
import {ApiUser} from '../glitter-base/route/user.js';
|
|
5
|
+
import {ShareDialog} from '../glitterBundle/dialog/ShareDialog.js';
|
|
6
|
+
import {EditorConfig} from '../editor-config.js';
|
|
7
|
+
import {ViewWidget} from './view-widget.js';
|
|
8
|
+
import {FormModule} from './module/form-module.js';
|
|
9
9
|
|
|
10
10
|
export class MemberSetting {
|
|
11
11
|
public static main(gvc: GVC) {
|
|
@@ -30,7 +30,8 @@ export class MemberSetting {
|
|
|
30
30
|
key: 'login_config',
|
|
31
31
|
value: vm.data,
|
|
32
32
|
user_id: 'manager',
|
|
33
|
-
}).then(() => {
|
|
33
|
+
}).then(() => {
|
|
34
|
+
});
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
return gvc.bindView(() => {
|
|
@@ -47,73 +48,83 @@ export class MemberSetting {
|
|
|
47
48
|
<div class="flex-fill"></div>
|
|
48
49
|
</div>
|
|
49
50
|
${BgWidget.container(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
class="
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
51
|
+
[
|
|
52
|
+
BgWidget.mainCard(
|
|
53
|
+
[
|
|
54
|
+
html`
|
|
55
|
+
<div class="tx_normal fw-bolder mt-2 d-flex flex-column"
|
|
56
|
+
style="margin-bottom: 12px;">結帳設定
|
|
57
|
+
<span class="" style="color:#8D8D8D;font-size: 12px;">是否必需註冊會員後才可進行結帳</span>
|
|
58
|
+
</div>`,
|
|
59
|
+
html`
|
|
60
|
+
<div class="d-flex align-items-center w-100"
|
|
61
|
+
style="gap:4px;margin-bottom: 12px;">
|
|
62
|
+
<div class="tx_normal d-flex flex-column">允許訪客結帳
|
|
63
|
+
</div>
|
|
64
|
+
<div class="tx_normal ms-2">
|
|
65
|
+
${vm.data.login_in_to_order ? `關閉` : `開啟`}
|
|
66
|
+
</div>
|
|
67
|
+
<div class="cursor_pointer form-check form-switch m-0">
|
|
68
|
+
<input
|
|
69
|
+
class="form-check-input"
|
|
70
|
+
type="checkbox"
|
|
71
|
+
onchange="${gvc.event((e, event) => {
|
|
72
|
+
vm.data.login_in_to_order = !vm.data.login_in_to_order;
|
|
73
|
+
saveEvent();
|
|
74
|
+
gvc.notifyDataChange(vm.id);
|
|
75
|
+
})}"
|
|
76
|
+
${vm.data.login_in_to_order ? `` : `checked`}
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="flex-fill"></div>
|
|
80
|
+
</div>`,
|
|
81
|
+
].join('')
|
|
82
|
+
),
|
|
83
|
+
...(() => {
|
|
84
|
+
const form = BgWidget.customForm(gvc, [
|
|
85
|
+
{
|
|
86
|
+
key: 'custom_form_checkout',
|
|
87
|
+
title: html`
|
|
88
|
+
<div class="tx_normal fw-bolder mt-2 d-flex flex-column"
|
|
89
|
+
style="margin-bottom: 12px;">
|
|
90
|
+
顧客資訊表單
|
|
91
|
+
<span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的顧客資訊表單</span>
|
|
92
|
+
</div>
|
|
83
93
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
`
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
key: 'custom_form_checkout_recipient',
|
|
98
|
+
title: html`
|
|
99
|
+
<div class="tx_normal fw-bolder mt-2 d-flex flex-column"
|
|
100
|
+
style="margin-bottom: 12px;">
|
|
101
|
+
配送資訊表單
|
|
102
|
+
<span class="" style="color:#8D8D8D;font-size: 12px;">於結帳頁面中設定顧客必須填寫的配送資訊表單</span>
|
|
103
|
+
</div>
|
|
94
104
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
105
|
+
`
|
|
106
|
+
}
|
|
107
|
+
]);
|
|
108
|
+
return [
|
|
109
|
+
form.view,
|
|
110
|
+
html`
|
|
111
|
+
<div class="update-bar-container">
|
|
112
|
+
${BgWidget.save(
|
|
113
|
+
gvc.event(async () => {
|
|
114
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
115
|
+
dialog.dataLoading({visible: true});
|
|
116
|
+
saveEvent();
|
|
117
|
+
await form.save();
|
|
118
|
+
dialog.dataLoading({visible: false});
|
|
119
|
+
|
|
120
|
+
dialog.successMessage({text: '設定成功'});
|
|
121
|
+
})
|
|
122
|
+
)}
|
|
123
|
+
</div>`,
|
|
124
|
+
];
|
|
125
|
+
})(),
|
|
126
|
+
BgWidget.mbContainer(240),
|
|
127
|
+
].join(BgWidget.mbContainer(24))
|
|
117
128
|
)}
|
|
118
129
|
`
|
|
119
130
|
);
|