@pisell/private-materials 6.2.48 → 6.2.50
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +27 -3
- package/es/components/appointmentBooking/components/Content/index.js +3 -3
- package/es/components/appointmentBooking/components/Services/index.js +36 -18
- package/es/components/appointmentBooking/components/Voucher/index.js +6 -5
- package/es/components/appointmentBooking/hooks.js +10 -2
- package/es/components/appointmentBooking/index.js +10 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/footer/index.js +12 -1
- package/es/components/booking/editBookingModal/index.js +8 -2
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +21 -9
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/normal.js +3 -3
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +25 -4
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +34 -8
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +3 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -3
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +112 -24
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +78 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +9 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pay/toC/utils.js +1 -1
- package/es/components/pinModal/hooks.d.ts +7 -0
- package/es/components/pinModal/hooks.js +65 -0
- package/es/components/pinModal/index.d.ts +4 -0
- package/es/components/pinModal/index.js +98 -0
- package/es/components/pinModal/index.less +44 -0
- package/es/components/pinModal/locales.d.ts +27 -0
- package/es/components/pinModal/locales.js +26 -0
- package/es/components/pinModal/serve.d.ts +6 -0
- package/es/components/pinModal/serve.js +11 -0
- package/es/components/pinModal/types.d.ts +0 -0
- package/es/components/pinModal/types.js +0 -0
- package/es/components/pinVerifyModal/hooks.d.ts +7 -0
- package/es/components/pinVerifyModal/hooks.js +80 -0
- package/es/components/pinVerifyModal/index.d.ts +5 -0
- package/es/components/pinVerifyModal/index.js +218 -0
- package/es/components/pinVerifyModal/index.less +92 -0
- package/es/components/pinVerifyModal/locales.d.ts +24 -0
- package/es/components/pinVerifyModal/locales.js +23 -0
- package/es/components/pinVerifyModal/types.d.ts +33 -0
- package/es/components/pinVerifyModal/types.js +1 -0
- package/es/components/ruleSetting/locales.js +3 -3
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/ticketBooking/components/ticketBooking/index.js +58 -10
- package/es/components/ticketBooking/components/timeBar/index.js +2 -1
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/wallet/Detail/index.js +251 -63
- package/es/components/wallet/Detail/locales.d.ts +51 -0
- package/es/components/wallet/Detail/locales.js +57 -3
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/Detail/serve.js +5 -1
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/components/UsageRules/index.d.ts +23 -0
- package/es/components/wallet/components/UsageRules/index.js +147 -0
- package/es/components/wallet/components/UsageRules/index.less +157 -0
- package/es/components/wallet/components/WalletCard.js +8 -3
- package/es/components/wallet/components/index.d.ts +1 -0
- package/es/components/wallet/components/index.js +2 -1
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/walletList/index.js +20 -2
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +22 -2
- package/lib/components/appointmentBooking/components/Content/index.js +2 -2
- package/lib/components/appointmentBooking/components/Services/index.js +13 -3
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
- package/lib/components/appointmentBooking/hooks.js +10 -2
- package/lib/components/appointmentBooking/index.js +6 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/index.js +15 -2
- package/lib/components/booking/components/voucher/index.js +1 -3
- package/lib/components/booking/editBookingModal/index.js +6 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +15 -9
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/normal.js +3 -3
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +16 -4
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +30 -8
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +6 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +84 -36
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +18 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +7 -2
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pay/toC/utils.js +1 -1
- package/lib/components/pinModal/hooks.d.ts +7 -0
- package/lib/components/pinModal/hooks.js +85 -0
- package/lib/components/pinModal/index.d.ts +4 -0
- package/lib/components/pinModal/index.js +88 -0
- package/lib/components/pinModal/index.less +44 -0
- package/lib/components/pinModal/locales.d.ts +27 -0
- package/lib/components/pinModal/locales.js +50 -0
- package/lib/components/pinModal/serve.d.ts +6 -0
- package/lib/components/pinModal/serve.js +37 -0
- package/lib/components/pinModal/types.d.ts +0 -0
- package/lib/components/pinModal/types.js +0 -0
- package/lib/components/pinVerifyModal/hooks.d.ts +7 -0
- package/lib/components/pinVerifyModal/hooks.js +93 -0
- package/lib/components/pinVerifyModal/index.d.ts +5 -0
- package/lib/components/pinVerifyModal/index.js +230 -0
- package/lib/components/pinVerifyModal/index.less +92 -0
- package/lib/components/pinVerifyModal/locales.d.ts +24 -0
- package/lib/components/pinVerifyModal/locales.js +47 -0
- package/lib/components/pinVerifyModal/types.d.ts +33 -0
- package/lib/components/pinVerifyModal/types.js +17 -0
- package/lib/components/ruleSetting/locales.js +3 -3
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/ticketBooking/components/ticketBooking/index.js +50 -6
- package/lib/components/ticketBooking/components/timeBar/index.js +2 -1
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/wallet/Detail/index.js +140 -8
- package/lib/components/wallet/Detail/locales.d.ts +51 -0
- package/lib/components/wallet/Detail/locales.js +57 -3
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/Detail/serve.js +6 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/components/UsageRules/index.d.ts +23 -0
- package/lib/components/wallet/components/UsageRules/index.js +113 -0
- package/lib/components/wallet/components/UsageRules/index.less +157 -0
- package/lib/components/wallet/components/WalletCard.js +3 -1
- package/lib/components/wallet/components/index.d.ts +1 -0
- package/lib/components/wallet/components/index.js +3 -0
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/walletList/index.js +19 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lowcode/pin-modal/meta.ts +37 -0
- package/lowcode/pin-verify-modal/meta.ts +80 -0
- package/package.json +3 -3
@@ -69,9 +69,7 @@ var VoucherCard = (props) => {
|
|
69
69
|
const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
|
70
70
|
const shopDiscount = pisellos.getModule("shopDiscount");
|
71
71
|
services = state.service;
|
72
|
-
const {
|
73
|
-
selectCustomer
|
74
|
-
} = (0, import_pisellos.useCustomer)();
|
72
|
+
const { selectCustomer } = (0, import_pisellos.useCustomer)();
|
75
73
|
(0, import_ahooks.useDebounceEffect)(
|
76
74
|
() => {
|
77
75
|
if (isBooking4Shop) {
|
@@ -113,7 +113,12 @@ var EditBookingModal = (props, ref) => {
|
|
113
113
|
_cloned[_idx] = _targetResource;
|
114
114
|
}
|
115
115
|
} else {
|
116
|
-
_cloned.
|
116
|
+
const _targetIdx = _cloned.findIndex((rs) => {
|
117
|
+
return rs.relation_id == (_targetResource == null ? void 0 : _targetResource.relation_id);
|
118
|
+
});
|
119
|
+
if (_targetIdx === -1) {
|
120
|
+
_cloned.push(_targetResource);
|
121
|
+
}
|
117
122
|
}
|
118
123
|
_initResourceVal = {
|
119
124
|
..._initResourceVal,
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,14 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { FormState } from '../model';
|
3
1
|
export declare const walkInData: {
|
4
2
|
id: number;
|
5
3
|
nickname: string;
|
6
4
|
};
|
7
|
-
export declare const Provider:
|
8
|
-
state: FormState;
|
9
|
-
} & {
|
10
|
-
dispatch: (params: {
|
11
|
-
type: string;
|
12
|
-
payload: any;
|
13
|
-
}) => void;
|
14
|
-
}>;
|
5
|
+
export declare const Provider: any, Context: any;
|
@@ -156,6 +156,8 @@ declare const _default: {
|
|
156
156
|
'pisell2.text.deposit-delete-message': string;
|
157
157
|
'pisell2.text.deposit-paid': string;
|
158
158
|
"pisell2.text.stock": string;
|
159
|
+
'pisell2.appointment.unuse.stock': string;
|
160
|
+
'pisell2.appointment.unuse.capacity': (count: number) => string;
|
159
161
|
'pisell2.text.payment-link': string;
|
160
162
|
'pisell2.text.send-mail': string;
|
161
163
|
'pisell2.text.copy-to-clipboard': string;
|
@@ -458,6 +460,8 @@ declare const _default: {
|
|
458
460
|
'pisell2.text.deposit-delete-message': string;
|
459
461
|
'pisell2.text.deposit-paid': string;
|
460
462
|
"pisell2.text.stock": string;
|
463
|
+
'pisell2.appointment.unuse.stock': string;
|
464
|
+
'pisell2.appointment.unuse.capacity': (count: number) => string;
|
461
465
|
'pisell2.text.payment-link': string;
|
462
466
|
'pisell2.text.send-mail': string;
|
463
467
|
'pisell2.text.copy-to-clipboard': string;
|
@@ -760,6 +764,8 @@ declare const _default: {
|
|
760
764
|
'pisell2.text.deposit-delete-message': string;
|
761
765
|
'pisell2.text.deposit-paid': string;
|
762
766
|
"pisell2.text.stock": string;
|
767
|
+
'pisell2.appointment.unuse.stock': string;
|
768
|
+
'pisell2.appointment.unuse.capacity': (count: number) => string;
|
763
769
|
'pisell2.text.payment-link': string;
|
764
770
|
'pisell2.text.send-mail': string;
|
765
771
|
'pisell2.text.copy-to-clipboard': string;
|
@@ -134,7 +134,7 @@ var locales_default = {
|
|
134
134
|
const obj = {
|
135
135
|
shop: "Paid from Merchant Portal",
|
136
136
|
"mini-program": "Paid from WeChat Mini-program",
|
137
|
-
pos: "Paid from
|
137
|
+
pos: "Paid from Terminal",
|
138
138
|
PC: "Paid from Website",
|
139
139
|
app: "Paid from APP"
|
140
140
|
};
|
@@ -171,7 +171,7 @@ var locales_default = {
|
|
171
171
|
"pisell2.text.edit-profile": "Edit profile",
|
172
172
|
"pisell2.text.remove-contact": "Remove contact",
|
173
173
|
"pisell2.text.order.sales.channel.online": "Online store",
|
174
|
-
"pisell2.text.order.sales.channel.pos-terminal": "
|
174
|
+
"pisell2.text.order.sales.channel.pos-terminal": "Terminal",
|
175
175
|
"pisell2.text.order.sales.channel.boxcocal": "Boxlocal",
|
176
176
|
"pisell2.text.order.sales.channel.tableorder": "Table order",
|
177
177
|
"pisell2.text.order.sales.channel.reserve": "Google reservation",
|
@@ -200,6 +200,8 @@ var locales_default = {
|
|
200
200
|
"pisell2.text.deposit-delete-message": "It cannot be restored after deletion. Please confirm the operation.",
|
201
201
|
"pisell2.text.deposit-paid": "Deposit paid",
|
202
202
|
"pisell2.text.stock": "Stock",
|
203
|
+
"pisell2.appointment.unuse.stock": "Not enough stock",
|
204
|
+
"pisell2.appointment.unuse.capacity": (count) => `Only ${count} spots available. Please reduce quantity.`,
|
203
205
|
"pisell2.text.payment-link": "Payment link",
|
204
206
|
"pisell2.text.send-mail": "Send email",
|
205
207
|
"pisell2.text.copy-to-clipboard": "Copy to clipboard",
|
@@ -213,7 +215,7 @@ var locales_default = {
|
|
213
215
|
"page.booking.text.available": "Available",
|
214
216
|
"page.booking.text.fully-booked": "Fully booked",
|
215
217
|
"page.booking.text.unlimited": "Unlimited",
|
216
|
-
"pisell2.text.terminal-edit-message": "This operation cannot be performed. To proceed, please use the
|
218
|
+
"pisell2.text.terminal-edit-message": "This operation cannot be performed. To proceed, please use the Terminal.",
|
217
219
|
"pisell2.text.actions": "Actions",
|
218
220
|
"pisell2.text.add-client": "Add customer",
|
219
221
|
// 日称tab
|
@@ -479,7 +481,7 @@ var locales_default = {
|
|
479
481
|
const obj = {
|
480
482
|
shop: "在 管理后台 支付",
|
481
483
|
"mini-program": "在 微信小程序 支付",
|
482
|
-
pos: "在
|
484
|
+
pos: "在 终端 支付",
|
483
485
|
PC: "在 网站 支付",
|
484
486
|
app: "在 手机应用程序 支付"
|
485
487
|
};
|
@@ -511,7 +513,7 @@ var locales_default = {
|
|
511
513
|
"pisell2.text.edit-profile": "编辑个人资料",
|
512
514
|
"pisell2.text.remove-contact": "删除联系人",
|
513
515
|
"pisell2.text.order.sales.channel.online": "在线店铺",
|
514
|
-
"pisell2.text.order.sales.channel.pos-terminal": "
|
516
|
+
"pisell2.text.order.sales.channel.pos-terminal": "终端",
|
515
517
|
"pisell2.text.order.sales.channel.boxcocal": "Boxlocal",
|
516
518
|
"pisell2.text.order.sales.channel.tableorder": "扫码点餐",
|
517
519
|
"pisell2.text.order.sales.channel.reserve": "谷歌预约",
|
@@ -540,11 +542,13 @@ var locales_default = {
|
|
540
542
|
"pisell2.text.deposit-delete-message": "删除后不可恢复,请确认操作",
|
541
543
|
"pisell2.text.deposit-paid": "已付定金",
|
542
544
|
"pisell2.text.stock": "库存",
|
545
|
+
"pisell2.appointment.unuse.stock": "库存不足",
|
546
|
+
"pisell2.appointment.unuse.capacity": (count) => `仅可预约 ${count} 个,请减少数量`,
|
543
547
|
"pisell2.text.payment-link": "付款链接",
|
544
548
|
"pisell2.text.send-mail": "发送邮件",
|
545
549
|
"pisell2.text.copy-to-clipboard": "复制到剪切板",
|
546
550
|
"pisell2.text.ok": "好的",
|
547
|
-
"pisell2.text.terminal-edit-message": "
|
551
|
+
"pisell2.text.terminal-edit-message": "此操作不可使用,如需使用请至终端设备操作。",
|
548
552
|
"page.booking.text.add-time": "加时",
|
549
553
|
"page.booking.text.quantity": "数量",
|
550
554
|
"page.booking.text.sales": "销售",
|
@@ -819,7 +823,7 @@ var locales_default = {
|
|
819
823
|
const obj = {
|
820
824
|
shop: "在 管理後臺 支付",
|
821
825
|
"mini-program": "在 微信小程序 支付",
|
822
|
-
pos: "在
|
826
|
+
pos: "在 終端 支付",
|
823
827
|
PC: "在 網站 支付",
|
824
828
|
app: "在 手機應用程序 支付"
|
825
829
|
};
|
@@ -851,7 +855,7 @@ var locales_default = {
|
|
851
855
|
"pisell2.text.edit-profile": "編輯個人資料",
|
852
856
|
"pisell2.text.remove-contact": "删除聯系人",
|
853
857
|
"pisell2.text.order.sales.channel.online": "在線店鋪",
|
854
|
-
"pisell2.text.order.sales.channel.pos-terminal": "
|
858
|
+
"pisell2.text.order.sales.channel.pos-terminal": "终端",
|
855
859
|
"pisell2.text.order.sales.channel.boxcocal": "Boxlocal",
|
856
860
|
"pisell2.text.order.sales.channel.tableorder": "掃碼點餐",
|
857
861
|
"pisell2.text.order.sales.channel.reserve": "谷歌預約",
|
@@ -880,11 +884,13 @@ var locales_default = {
|
|
880
884
|
"pisell2.text.deposit-delete-message": "刪除後不可恢復,請確認操作",
|
881
885
|
"pisell2.text.deposit-paid": "已付定金",
|
882
886
|
"pisell2.text.stock": "庫存",
|
887
|
+
"pisell2.appointment.unuse.stock": "庫存不足",
|
888
|
+
"pisell2.appointment.unuse.capacity": (count) => `僅可預約 ${count} 個,請減少數量`,
|
883
889
|
"pisell2.text.payment-link": "付款鏈接",
|
884
890
|
"pisell2.text.send-mail": "發送郵件",
|
885
891
|
"pisell2.text.copy-to-clipboard": "複製到剪切板",
|
886
892
|
"pisell2.text.ok": "好的",
|
887
|
-
"pisell2.text.terminal-edit-message": "
|
893
|
+
"pisell2.text.terminal-edit-message": "此操作不可使用,如需使用請至終端設備操作。",
|
888
894
|
"page.booking.text.add-time": "加時",
|
889
895
|
"page.booking.text.quantity": "數量",
|
890
896
|
"page.booking.text.sales": "銷售",
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
export interface FormState {
|
3
2
|
amountSymbol: string;
|
4
3
|
apis: {
|
@@ -106,11 +105,4 @@ export declare const walkInData: {
|
|
106
105
|
id: number;
|
107
106
|
nickname: string;
|
108
107
|
};
|
109
|
-
export declare const Provider:
|
110
|
-
state: FormState;
|
111
|
-
} & {
|
112
|
-
dispatch: (params: {
|
113
|
-
type: string;
|
114
|
-
payload: any;
|
115
|
-
}) => void;
|
116
|
-
}>;
|
108
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
22
|
+
readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
25
25
|
};
|
@@ -63,18 +63,18 @@ var useLinklyPayOrRefund = (handleCheck) => {
|
|
63
63
|
content: [{ key: "response", value: JSON.stringify(res) }]
|
64
64
|
});
|
65
65
|
const status = (_a = res == null ? void 0 : res.data) == null ? void 0 : _a.status;
|
66
|
-
if (status
|
66
|
+
if (status == 0) {
|
67
67
|
numRef.current = (_b = res == null ? void 0 : res.data) == null ? void 0 : _b.session_id;
|
68
68
|
dispatch((0, import_store.updateState)({ number: numRef.current }));
|
69
69
|
dispatch((0, import_store.updateCustom)({ actionStatus: import_const2.LinklyActionStatus.Cancel }));
|
70
70
|
setTimeout(() => {
|
71
71
|
var _a2;
|
72
72
|
(_a2 = resultQueryRef.current) == null ? void 0 : _a2.call(resultQueryRef);
|
73
|
-
});
|
73
|
+
}, 300);
|
74
74
|
return;
|
75
75
|
}
|
76
76
|
dispatch((0, import_store.updateCustom)({ actionStatus: import_const2.LinklyActionStatus.Empty }));
|
77
|
-
if (status
|
77
|
+
if (status == 1) {
|
78
78
|
(_c = handleLinklySuccessRef.current) == null ? void 0 : _c.call(handleLinklySuccessRef, res);
|
79
79
|
return;
|
80
80
|
}
|
@@ -83,13 +83,17 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
|
|
83
83
|
_log("Success" /* Success */, result);
|
84
84
|
isQueryFinishedRef.current = true;
|
85
85
|
const data = (result == null ? void 0 : result.data) || {};
|
86
|
-
if (data.status
|
86
|
+
if (data.status == 1) {
|
87
87
|
console.log("交易成功,终止查询");
|
88
|
+
(0, import_utils.sendWarningLog)({
|
89
|
+
title: `Linkly-${isPay ? "Pay" : "Refund"}-交易成功`,
|
90
|
+
content: [{ key: "response", value: JSON.stringify(result) }]
|
91
|
+
});
|
88
92
|
reset();
|
89
93
|
handleLinklySuccess(result);
|
90
94
|
return;
|
91
95
|
}
|
92
|
-
if (data
|
96
|
+
if ((data == null ? void 0 : data.status) == 0 && (data == null ? void 0 : data.signature_flag) != 1) {
|
93
97
|
console.log("交易状态为0需要继续查询");
|
94
98
|
isQueryFinishedRef.current = false;
|
95
99
|
_resultQuery();
|
@@ -97,13 +101,21 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
|
|
97
101
|
}
|
98
102
|
if (data.status < 0) {
|
99
103
|
console.log("交易失败,终止查询");
|
104
|
+
(0, import_utils.sendWarningLog)({
|
105
|
+
title: `Linkly-${isPay ? "Pay" : "Refund"}-交易失败`,
|
106
|
+
content: [{ key: "response", value: JSON.stringify(result) }]
|
107
|
+
});
|
100
108
|
reset();
|
101
109
|
result.code = import_const.PayStatus.Unknown;
|
102
110
|
(_a2 = failRef.current) == null ? void 0 : _a2.call(failRef, result, false);
|
103
111
|
return;
|
104
112
|
}
|
105
|
-
if (data.signature_flag
|
113
|
+
if (data.signature_flag == 1) {
|
106
114
|
console.log("交易需要签名,终止查询");
|
115
|
+
(0, import_utils.sendWarningLog)({
|
116
|
+
title: `Linkly-${isPay ? "Pay" : "Refund"}-交易需要签名`,
|
117
|
+
content: [{ key: "response", value: JSON.stringify(result) }]
|
118
|
+
});
|
107
119
|
reset();
|
108
120
|
gotoSignature();
|
109
121
|
return;
|
@@ -194,7 +206,7 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
|
|
194
206
|
content.push({ key: "error", value: JSON.stringify(res) });
|
195
207
|
}
|
196
208
|
(0, import_utils.sendWarningLog)({
|
197
|
-
title: `Linkly-${isPay ? "Pay" : "Refund"}
|
209
|
+
title: `Linkly-${isPay ? "Pay" : "Refund"}-交易结果轮询`,
|
198
210
|
content
|
199
211
|
});
|
200
212
|
};
|
@@ -297,8 +297,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
297
297
|
amount?: string | number | undefined;
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
|
-
eftpos?: "
|
301
|
-
action?: "
|
300
|
+
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
|
301
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
302
302
|
key?: number | undefined;
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
@@ -45,7 +45,8 @@ var import_useEngineContext = __toESM(require("../../../../../../hooks/useEngine
|
|
45
45
|
var import_index = require("./index.less");
|
46
46
|
var import_utils3 = require("../../../../../appointmentBooking/utils");
|
47
47
|
var ContinueButton = () => {
|
48
|
-
var _a, _b;
|
48
|
+
var _a, _b, _c, _d, _e;
|
49
|
+
const hasSubscribedRef = (0, import_react.useRef)(false);
|
49
50
|
const { data } = (0, import_Sales.useSales)();
|
50
51
|
const { onHolderOpen } = (0, import_Sales.useHolder)();
|
51
52
|
const { checkHolder, onCloseCart, cartData, getWithoutCartItemsHolderNames } = (0, import_Sales.useCart)();
|
@@ -64,14 +65,17 @@ var ContinueButton = () => {
|
|
64
65
|
const [openEmptyHolder, setOpenEmptyHolder] = (0, import_react.useState)(false);
|
65
66
|
const { setData, removeSessionStorage } = (0, import_Sales.useSales)();
|
66
67
|
const context = (0, import_useEngineContext.default)();
|
67
|
-
const
|
68
|
+
const config = ((_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.constants) == null ? void 0 : _b.config) || {};
|
69
|
+
const utils = ((_c = context == null ? void 0 : context.appHelper) == null ? void 0 : _c.utils) || {};
|
70
|
+
const { pubsub } = context.appHelper.utils;
|
71
|
+
const { store, action, getStore } = ((_d = context.appHelper) == null ? void 0 : _d.utils) || {};
|
68
72
|
const handleCheckout = async () => {
|
69
73
|
const params = (0, import_utils2.getFormParams)(data);
|
70
74
|
action == null ? void 0 : action({
|
71
75
|
type: "pisell1.goProductForm",
|
72
76
|
data: params,
|
73
77
|
callback: async (e) => {
|
74
|
-
var _a2, _b2,
|
78
|
+
var _a2, _b2, _c2;
|
75
79
|
if ((e == null ? void 0 : e.type) === "close") {
|
76
80
|
return;
|
77
81
|
}
|
@@ -88,7 +92,7 @@ var ContinueButton = () => {
|
|
88
92
|
removeSessionStorage();
|
89
93
|
} else {
|
90
94
|
(0, import_materials.PisellToast)({
|
91
|
-
content: ((
|
95
|
+
content: ((_c2 = result == null ? void 0 : result.err) == null ? void 0 : _c2.message) || ""
|
92
96
|
});
|
93
97
|
}
|
94
98
|
}
|
@@ -234,13 +238,13 @@ var ContinueButton = () => {
|
|
234
238
|
handleNextStep();
|
235
239
|
};
|
236
240
|
const handleContinue = async () => {
|
237
|
-
var _a2, _b2,
|
241
|
+
var _a2, _b2, _c2;
|
238
242
|
if (isLastStep) {
|
239
243
|
const value = (0, import_utils2.formatValues)({
|
240
244
|
state: data,
|
241
245
|
platform: (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.constants) == null ? void 0 : _b2.platform
|
242
246
|
});
|
243
|
-
if ((deposit == null ? void 0 : deposit.hasDeposit) && ((
|
247
|
+
if ((deposit == null ? void 0 : deposit.hasDeposit) && ((_c2 = deposit == null ? void 0 : deposit.protocols) == null ? void 0 : _c2.length) > 0 && !isAgreeDepositPolicy) {
|
244
248
|
(0, import_utils3.Toast)(import_utils.locales.getText("pisell2.appointment.deposit.agree.policy"));
|
245
249
|
return;
|
246
250
|
}
|
@@ -270,6 +274,24 @@ var ContinueButton = () => {
|
|
270
274
|
}
|
271
275
|
handleHolder();
|
272
276
|
};
|
277
|
+
const handleSubmit = () => {
|
278
|
+
var _a2, _b2, _c2, _d2;
|
279
|
+
if ((_b2 = (_a2 = utils == null ? void 0 : utils.businessUtils) == null ? void 0 : _a2.isGuestUser) == null ? void 0 : _b2.call(_a2)) {
|
280
|
+
if (!hasSubscribedRef.current) {
|
281
|
+
pubsub.subscribe("bind.guest.user", handleContinue);
|
282
|
+
hasSubscribedRef.current = true;
|
283
|
+
}
|
284
|
+
(_d2 = (_c2 = utils == null ? void 0 : utils.businessUtils) == null ? void 0 : _c2.openRegisterModal) == null ? void 0 : _d2.call(_c2, true);
|
285
|
+
return;
|
286
|
+
}
|
287
|
+
handleContinue();
|
288
|
+
};
|
289
|
+
(0, import_react.useEffect)(() => {
|
290
|
+
return () => {
|
291
|
+
pubsub.unsubscribe("bind.guest.user", handleContinue);
|
292
|
+
hasSubscribedRef.current = false;
|
293
|
+
};
|
294
|
+
}, []);
|
273
295
|
const continueText = (0, import_react.useMemo)(() => {
|
274
296
|
if (isLastStep) {
|
275
297
|
return import_utils.locales.getText("pisell2.event.checkout");
|
@@ -289,10 +311,10 @@ var ContinueButton = () => {
|
|
289
311
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
290
312
|
import_materials.Button,
|
291
313
|
{
|
292
|
-
disabled: !((
|
314
|
+
disabled: !((_e = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _e.length),
|
293
315
|
size: "large",
|
294
316
|
type: "primary",
|
295
|
-
onClick: () => handleContinue(),
|
317
|
+
onClick: () => isLastStep ? handleSubmit() : handleContinue(),
|
296
318
|
loading: confirmLoading
|
297
319
|
},
|
298
320
|
continueText
|
@@ -17,4 +17,6 @@ import PisellSelectCustomerModal from './pisellSelectCustomerModal';
|
|
17
17
|
import SubTotal from './subTotal';
|
18
18
|
import EditBookingModal from './booking/editBookingModal';
|
19
19
|
import StepController from './stepController';
|
20
|
-
|
20
|
+
import PinModal from './pinModal';
|
21
|
+
import PinVerifyModal from './pinVerifyModal';
|
22
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, };
|
package/lib/components/index.js
CHANGED
@@ -36,6 +36,8 @@ __export(components_exports, {
|
|
36
36
|
BookingNotes: () => import_notes.default,
|
37
37
|
EditBookingModal: () => import_editBookingModal.default,
|
38
38
|
Login: () => import_login.default,
|
39
|
+
PinModal: () => import_pinModal.default,
|
40
|
+
PinVerifyModal: () => import_pinVerifyModal.default,
|
39
41
|
PisellSelectCustomerModal: () => import_pisellSelectCustomerModal.default,
|
40
42
|
ProductExtension: () => import_productExtension.default,
|
41
43
|
RuleSetting: () => import_ruleSetting.default,
|
@@ -69,6 +71,8 @@ var import_pisellSelectCustomerModal = __toESM(require("./pisellSelectCustomerMo
|
|
69
71
|
var import_subTotal = __toESM(require("./subTotal"));
|
70
72
|
var import_editBookingModal = __toESM(require("./booking/editBookingModal"));
|
71
73
|
var import_stepController = __toESM(require("./stepController"));
|
74
|
+
var import_pinModal = __toESM(require("./pinModal"));
|
75
|
+
var import_pinVerifyModal = __toESM(require("./pinVerifyModal"));
|
72
76
|
// Annotate the CommonJS export names for ESM import in node:
|
73
77
|
0 && (module.exports = {
|
74
78
|
Booking,
|
@@ -78,6 +82,8 @@ var import_stepController = __toESM(require("./stepController"));
|
|
78
82
|
BookingNotes,
|
79
83
|
EditBookingModal,
|
80
84
|
Login,
|
85
|
+
PinModal,
|
86
|
+
PinVerifyModal,
|
81
87
|
PisellSelectCustomerModal,
|
82
88
|
ProductExtension,
|
83
89
|
RuleSetting,
|
@@ -171,6 +171,7 @@ var createThreeDSMethodIframe = async (threeDSMethodData, callback) => {
|
|
171
171
|
return defaultReturnParams;
|
172
172
|
}
|
173
173
|
const displayBox = document.getElementById("threeds-container");
|
174
|
+
displayBox.innerHTML = "";
|
174
175
|
let iframe = document.createElement("iframe");
|
175
176
|
iframe.classList.add("hidden_TDS_From");
|
176
177
|
iframe.name = "threeDSMethodIframe";
|
@@ -286,6 +287,7 @@ var checkTDSAuth = async (step2, step3, callback) => {
|
|
286
287
|
};
|
287
288
|
var createChallengeIframe = (challengeData, callback) => {
|
288
289
|
const displayBox = document.getElementById("threeds-container");
|
290
|
+
displayBox.innerHTML = "";
|
289
291
|
let iframe = document.createElement("iframe");
|
290
292
|
iframe.classList.add("tdsv2challengeIframe");
|
291
293
|
iframe.name = "challengeIframe";
|
@@ -11,6 +11,8 @@ export interface WalletPassListProps {
|
|
11
11
|
name: string;
|
12
12
|
};
|
13
13
|
onChangeDebounce?: boolean;
|
14
|
+
loading?: boolean;
|
15
|
+
onLoadingChange?: (loading: boolean) => void;
|
14
16
|
}
|
15
17
|
export declare type WalletPassListRef = {
|
16
18
|
init: (params: MachineCodeListParams, formatList?: (val: WalletPassDataType[]) => WalletPassDataType[]) => void;
|