@pisell/private-materials 3.3.89 → 3.3.91
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 +1 -1
- package/build/lowcode/preview.js +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/businessModel/SalesModel/Sales/index.js +4 -37
- package/es/components/Sales/Cart/index.js +1 -5
- package/es/components/Sales/Cart/utils.d.ts +0 -40
- package/es/components/Sales/Cart/utils.js +0 -167
- package/es/components/Sales/Checkout/index.d.ts +0 -4
- package/es/components/Sales/Checkout/index.js +8 -52
- package/es/components/Sales/Checkout/serve.d.ts +0 -13
- package/es/components/Sales/Checkout/serve.js +2 -16
- package/es/components/Sales/Checkout/utils.js +1 -7
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +0 -7
- package/es/components/Sales/Resource/serve.js +0 -10
- package/es/components/Sales/Summary/index.d.ts +0 -10
- package/es/components/Sales/Summary/index.js +2 -17
- package/es/components/Sales/Summary/serve.d.ts +0 -1
- package/es/components/Sales/Summary/serve.js +0 -6
- package/es/components/Sales/Summary/utils.d.ts +1 -16
- package/es/components/Sales/Summary/utils.js +1 -43
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
- package/es/components/appointmentBooking/components/Deposit/index.js +7 -27
- package/es/components/appointmentBooking/components/Services/index.js +27 -23
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +20 -25
- package/es/components/appointmentBooking/deposit/index.js +2 -4
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/booking/components/footer/utils.d.ts +0 -1
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +2 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/es/components/booking/info2/service/addService/utils.js +13 -44
- package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
- package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/es/components/booking/info2/utilsByBooking.js +0 -9
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +0 -3
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/const.d.ts +1 -4
- package/es/components/eftposPay/const.js +1 -3
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/hooks.js +1 -3
- package/es/components/eftposPay/index.js +1 -1
- package/es/components/eftposPay/manufacturer.d.ts +0 -1
- package/es/components/eftposPay/manufacturer.js +0 -4
- package/es/components/eftposPay/pay.d.ts +1 -1
- package/es/components/eftposPay/pay.js +2 -6
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +17 -29
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +6 -10
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
- package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
- package/es/components/eventBooking/components/bookingDetailModal/index.js +4 -22
- package/es/components/eventBooking/index.js +7 -21
- package/es/components/eventBooking/locales.d.ts +0 -24
- package/es/components/eventBooking/locales.js +6 -30
- package/es/components/index.d.ts +1 -3
- package/es/components/index.js +1 -3
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/Sales/index.js +8 -22
- package/lib/components/Sales/Cart/index.js +0 -1
- package/lib/components/Sales/Cart/utils.d.ts +0 -40
- package/lib/components/Sales/Cart/utils.js +0 -117
- package/lib/components/Sales/Checkout/index.d.ts +0 -4
- package/lib/components/Sales/Checkout/index.js +7 -39
- package/lib/components/Sales/Checkout/serve.d.ts +0 -13
- package/lib/components/Sales/Checkout/serve.js +2 -7
- package/lib/components/Sales/Checkout/utils.js +0 -2
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +0 -7
- package/lib/components/Sales/Resource/serve.js +2 -9
- package/lib/components/Sales/Summary/index.d.ts +0 -10
- package/lib/components/Sales/Summary/index.js +1 -7
- package/lib/components/Sales/Summary/serve.d.ts +0 -1
- package/lib/components/Sales/Summary/serve.js +0 -32
- package/lib/components/Sales/Summary/utils.d.ts +1 -16
- package/lib/components/Sales/Summary/utils.js +1 -30
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
- package/lib/components/appointmentBooking/components/Deposit/index.js +4 -36
- package/lib/components/appointmentBooking/components/Services/index.js +11 -6
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +4 -8
- package/lib/components/appointmentBooking/deposit/index.js +2 -4
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/booking/components/footer/utils.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.js +0 -2
- package/lib/components/booking/components/voucher/index.js +2 -2
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/lib/components/booking/info2/service/addService/utils.js +4 -27
- package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
- package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/lib/components/booking/info2/utilsByBooking.js +0 -6
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +0 -3
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/const.d.ts +1 -4
- package/lib/components/eftposPay/const.js +0 -2
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/hooks.js +4 -11
- package/lib/components/eftposPay/index.js +1 -1
- package/lib/components/eftposPay/manufacturer.d.ts +0 -1
- package/lib/components/eftposPay/manufacturer.js +0 -6
- package/lib/components/eftposPay/pay.d.ts +1 -1
- package/lib/components/eftposPay/pay.js +2 -13
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +3 -16
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +5 -8
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
- package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +4 -10
- package/lib/components/eventBooking/index.js +7 -11
- package/lib/components/eventBooking/locales.d.ts +0 -24
- package/lib/components/eventBooking/locales.js +6 -30
- package/lib/components/index.d.ts +1 -3
- package/lib/components/index.js +0 -6
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/lib/utils/index.d.ts +1 -1
- package/package.json +3 -3
- package/es/components/booking/editBookingModal/index.d.ts +0 -5
- package/es/components/booking/editBookingModal/index.js +0 -386
- package/es/components/booking/editBookingModal/index.less +0 -8
- package/es/components/booking/editBookingModal/locales.d.ts +0 -21
- package/es/components/booking/editBookingModal/locales.js +0 -20
- package/es/components/booking/editBookingModal/mock.d.ts +0 -807
- package/es/components/booking/editBookingModal/mock.js +0 -2993
- package/es/components/booking/editBookingModal/serve.d.ts +0 -51
- package/es/components/booking/editBookingModal/serve.js +0 -288
- package/es/components/booking/editBookingModal/type.d.ts +0 -12
- package/es/components/booking/editBookingModal/type.js +0 -1
- package/es/components/booking/editBookingModal/utils.d.ts +0 -12
- package/es/components/booking/editBookingModal/utils.js +0 -157
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
- package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
- package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/es/components/eftposPay/linkly/const.d.ts +0 -23
- package/es/components/eftposPay/linkly/const.js +0 -82
- package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
- package/es/components/eftposPay/linkly/hooks/index.js +0 -2
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
- package/es/components/eftposPay/linkly/hooks/normal.js +0 -318
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
- package/es/components/eftposPay/linkly/index.d.ts +0 -2
- package/es/components/eftposPay/linkly/index.js +0 -197
- package/es/components/eftposPay/linkly/service.d.ts +0 -32
- package/es/components/eftposPay/linkly/service.js +0 -73
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
- package/es/components/stepController/components/Content/index.d.ts +0 -7
- package/es/components/stepController/components/Content/index.js +0 -9
- package/es/components/stepController/components/Content/index.less +0 -8
- package/es/components/stepController/components/Footer/index.d.ts +0 -8
- package/es/components/stepController/components/Footer/index.js +0 -15
- package/es/components/stepController/components/Footer/index.less +0 -39
- package/es/components/stepController/components/Header/index.d.ts +0 -20
- package/es/components/stepController/components/Header/index.js +0 -97
- package/es/components/stepController/components/Header/index.less +0 -21
- package/es/components/stepController/index.d.ts +0 -5
- package/es/components/stepController/index.js +0 -64
- package/es/components/stepController/index.less +0 -11
- package/es/components/stepController/locales.d.ts +0 -27
- package/es/components/stepController/locales.js +0 -32
- package/es/components/stepController/types.d.ts +0 -23
- package/es/components/stepController/types.js +0 -1
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/es/hooks/useWindowSize.d.ts +0 -5
- package/es/hooks/useWindowSize.js +0 -26
- package/lib/components/booking/editBookingModal/index.d.ts +0 -5
- package/lib/components/booking/editBookingModal/index.js +0 -363
- package/lib/components/booking/editBookingModal/index.less +0 -8
- package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
- package/lib/components/booking/editBookingModal/locales.js +0 -44
- package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
- package/lib/components/booking/editBookingModal/mock.js +0 -3314
- package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
- package/lib/components/booking/editBookingModal/serve.js +0 -178
- package/lib/components/booking/editBookingModal/type.d.ts +0 -12
- package/lib/components/booking/editBookingModal/type.js +0 -17
- package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
- package/lib/components/booking/editBookingModal/utils.js +0 -158
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/lib/components/eftposPay/linkly/const.d.ts +0 -23
- package/lib/components/eftposPay/linkly/const.js +0 -102
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
- package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
- package/lib/components/eftposPay/linkly/hooks/normal.js +0 -239
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
- package/lib/components/eftposPay/linkly/index.d.ts +0 -2
- package/lib/components/eftposPay/linkly/index.js +0 -208
- package/lib/components/eftposPay/linkly/service.d.ts +0 -32
- package/lib/components/eftposPay/linkly/service.js +0 -55
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
- package/lib/components/stepController/components/Content/index.d.ts +0 -7
- package/lib/components/stepController/components/Content/index.js +0 -40
- package/lib/components/stepController/components/Content/index.less +0 -8
- package/lib/components/stepController/components/Footer/index.d.ts +0 -8
- package/lib/components/stepController/components/Footer/index.js +0 -49
- package/lib/components/stepController/components/Footer/index.less +0 -39
- package/lib/components/stepController/components/Header/index.d.ts +0 -20
- package/lib/components/stepController/components/Header/index.js +0 -104
- package/lib/components/stepController/components/Header/index.less +0 -21
- package/lib/components/stepController/index.d.ts +0 -5
- package/lib/components/stepController/index.js +0 -89
- package/lib/components/stepController/index.less +0 -11
- package/lib/components/stepController/locales.d.ts +0 -27
- package/lib/components/stepController/locales.js +0 -50
- package/lib/components/stepController/types.d.ts +0 -23
- package/lib/components/stepController/types.js +0 -17
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
- package/lib/hooks/useWindowSize.d.ts +0 -5
- package/lib/hooks/useWindowSize.js +0 -51
- package/lowcode/edit-booking-modal/meta.ts +0 -53
- package/lowcode/step-controller/meta.ts +0 -88
|
@@ -74,7 +74,9 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
74
74
|
let type = "";
|
|
75
75
|
if (!isRetailTemplate) {
|
|
76
76
|
type = await checkProductType(item == null ? void 0 : item.id);
|
|
77
|
-
|
|
77
|
+
if (type === "session") {
|
|
78
|
+
appointmentBooking.openProductDetail(item.id);
|
|
79
|
+
}
|
|
78
80
|
}
|
|
79
81
|
utils == null ? void 0 : utils.action({
|
|
80
82
|
type: "pisell1.productDetail",
|
|
@@ -84,10 +86,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
84
86
|
},
|
|
85
87
|
callback: async (data) => {
|
|
86
88
|
var _a, _b;
|
|
87
|
-
if (data.isCancel) {
|
|
88
|
-
appointmentBooking.closeProductDetail();
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
89
|
const product = {
|
|
92
90
|
...data,
|
|
93
91
|
options: (data == null ? void 0 : data.option) || []
|
|
@@ -98,6 +96,13 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
98
96
|
appointmentBooking.storeProduct(product);
|
|
99
97
|
return;
|
|
100
98
|
}
|
|
99
|
+
if (data == null ? void 0 : data.isCancel) {
|
|
100
|
+
if (type === "session") {
|
|
101
|
+
appointmentBooking.closeProductDetail();
|
|
102
|
+
appointmentBooking.getAvailableDate();
|
|
103
|
+
}
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
101
106
|
const session = data == null ? void 0 : data.session;
|
|
102
107
|
if (session) {
|
|
103
108
|
const startDate = (0, import_dayjs.default)(session == null ? void 0 : session.start_at).format("YYYY-MM-DD");
|
|
@@ -109,6 +114,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
109
114
|
endTime: `${endDate} ${session == null ? void 0 : session.end_time}`
|
|
110
115
|
}
|
|
111
116
|
});
|
|
117
|
+
appointmentBooking.closeProductDetail();
|
|
112
118
|
await appointmentBooking.getAvailableDate({
|
|
113
119
|
startDate,
|
|
114
120
|
endDate
|
|
@@ -126,7 +132,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
126
132
|
await appointmentBooking.getAvailableDate();
|
|
127
133
|
}
|
|
128
134
|
}
|
|
129
|
-
appointmentBooking.closeProductDetail();
|
|
130
135
|
if (isDateSelectedFirst) {
|
|
131
136
|
const index = (currentStep == null ? void 0 : currentStep.index) + 2;
|
|
132
137
|
if (type === "duration" || appointmentBooking.isCartHasDurationProduct()) {
|
|
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_context = require("../../../context");
|
|
39
40
|
var import_index = require("./index.less");
|
|
40
41
|
var DepositModal = (props) => {
|
|
41
42
|
const {
|
|
@@ -44,10 +45,9 @@ var DepositModal = (props) => {
|
|
|
44
45
|
item,
|
|
45
46
|
onChange,
|
|
46
47
|
onConfirm,
|
|
47
|
-
isHideCheckout = true
|
|
48
|
-
depositProtocolRequest
|
|
49
|
-
// 定金协议请求
|
|
48
|
+
isHideCheckout = true
|
|
50
49
|
} = props;
|
|
50
|
+
const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
|
|
51
51
|
const [policy, setPolicy] = (0, import_react.useState)(null);
|
|
52
52
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
53
53
|
const [disabled, setDisabled] = (0, import_react.useState)(false);
|
|
@@ -55,13 +55,9 @@ var DepositModal = (props) => {
|
|
|
55
55
|
setDisabled(!isHideCheckout);
|
|
56
56
|
}, [isHideCheckout]);
|
|
57
57
|
const getPolicy = async (id) => {
|
|
58
|
-
if (!depositProtocolRequest) {
|
|
59
|
-
console.error("depositProtocolRequest is not defined");
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
58
|
setLoading(true);
|
|
63
59
|
try {
|
|
64
|
-
const { data } = await (
|
|
60
|
+
const { data } = await appointmentBooking.getProtocol(id);
|
|
65
61
|
setPolicy(data);
|
|
66
62
|
onChange && onChange(data);
|
|
67
63
|
} catch (error) {
|
|
@@ -48,8 +48,7 @@ var Deposit = (props) => {
|
|
|
48
48
|
title,
|
|
49
49
|
isAgreePolicy = true,
|
|
50
50
|
isShowTitle = true,
|
|
51
|
-
onChange
|
|
52
|
-
depositProtocolRequest
|
|
51
|
+
onChange
|
|
53
52
|
} = props;
|
|
54
53
|
const context = (0, import_useEngineContext.default)();
|
|
55
54
|
const [visible, setVisible] = (0, import_react.useState)(false);
|
|
@@ -103,8 +102,7 @@ var Deposit = (props) => {
|
|
|
103
102
|
{
|
|
104
103
|
open: visible,
|
|
105
104
|
onCancel: () => setVisible(false),
|
|
106
|
-
item: policyItem
|
|
107
|
-
depositProtocolRequest
|
|
105
|
+
item: policyItem
|
|
108
106
|
}
|
|
109
107
|
));
|
|
110
108
|
};
|
|
@@ -58,17 +58,6 @@ var AppointmentBooking = () => {
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}, []);
|
|
61
|
-
(0, import_react.useEffect)(() => {
|
|
62
|
-
const setRealVH = () => {
|
|
63
|
-
const vh = window.innerHeight * 0.01;
|
|
64
|
-
document.documentElement.style.setProperty("--vh", `${vh}px`);
|
|
65
|
-
};
|
|
66
|
-
setRealVH();
|
|
67
|
-
window.addEventListener("resize", setRealVH);
|
|
68
|
-
return () => {
|
|
69
|
-
window.removeEventListener("resize", setRealVH);
|
|
70
|
-
};
|
|
71
|
-
}, []);
|
|
72
61
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
73
62
|
"div",
|
|
74
63
|
{
|
|
@@ -27,7 +27,6 @@ export interface ResourceItem {
|
|
|
27
27
|
* @Author: jinglin.tan
|
|
28
28
|
*/
|
|
29
29
|
export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
|
|
30
|
-
export declare const checkResourcesFormat: (resources: any[], service: any, isChild?: boolean) => any[];
|
|
31
30
|
/**
|
|
32
31
|
* @title: 格式化商品单价
|
|
33
32
|
* @description:
|
|
@@ -30,7 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
var utils_exports = {};
|
|
31
31
|
__export(utils_exports, {
|
|
32
32
|
checkHolderIsError: () => checkHolderIsError,
|
|
33
|
-
checkResourcesFormat: () => checkResourcesFormat,
|
|
34
33
|
checkSubResourcesCapacity: () => checkSubResourcesCapacity,
|
|
35
34
|
formatProductBundle: () => formatProductBundle,
|
|
36
35
|
formatProductOption: () => formatProductOption,
|
|
@@ -474,7 +473,6 @@ var checkHolderIsError = (state) => {
|
|
|
474
473
|
// Annotate the CommonJS export names for ESM import in node:
|
|
475
474
|
0 && (module.exports = {
|
|
476
475
|
checkHolderIsError,
|
|
477
|
-
checkResourcesFormat,
|
|
478
476
|
checkSubResourcesCapacity,
|
|
479
477
|
formatProductBundle,
|
|
480
478
|
formatProductOption,
|
|
@@ -41,8 +41,8 @@ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContex
|
|
|
41
41
|
var import_materials = require("@pisell/materials");
|
|
42
42
|
var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
|
|
43
43
|
var import_index = require("./index.less");
|
|
44
|
-
var import_ahooks = require("ahooks");
|
|
45
44
|
var import_utils2 = require("./utils");
|
|
45
|
+
var import_ahooks = require("ahooks");
|
|
46
46
|
var ShopDiscountHooks = {
|
|
47
47
|
onInited: "shopDiscount:onInited",
|
|
48
48
|
onDestroy: "shopDiscount:onDestroy",
|
|
@@ -274,8 +274,8 @@ var VoucherCard = (props) => {
|
|
|
274
274
|
import_materials.PisellGoodPassCard,
|
|
275
275
|
{
|
|
276
276
|
style: { width: "100%" },
|
|
277
|
-
dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
|
|
278
277
|
mixedSort,
|
|
278
|
+
dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
|
|
279
279
|
onChange: (val) => {
|
|
280
280
|
const shopDiscount2 = pisellos.getModule("shopDiscount");
|
|
281
281
|
const detail = shopDiscount2.setDiscountSelected({
|
|
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
244
244
|
* @Author: WangHan
|
|
245
245
|
* @Date: 2024-12-24 11:32
|
|
246
246
|
*/
|
|
247
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
|
247
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
|
@@ -422,7 +422,7 @@ var getErrorMessageInfo2 = (errorList) => {
|
|
|
422
422
|
};
|
|
423
423
|
var getAllErrorList = (item) => {
|
|
424
424
|
const { resourceMaps } = item._data || {};
|
|
425
|
-
const { resource
|
|
425
|
+
const { resource } = item._extend || {};
|
|
426
426
|
const errorList = [];
|
|
427
427
|
Object.entries(resource).forEach(([key, value]) => {
|
|
428
428
|
value.forEach((val) => {
|
|
@@ -437,7 +437,7 @@ var getAllErrorList = (item) => {
|
|
|
437
437
|
var mapListItems = (items) => items.map((item) => ({
|
|
438
438
|
id: item.id || item.form_record_id,
|
|
439
439
|
label: item.labelText,
|
|
440
|
-
isError: !item.usable
|
|
440
|
+
isError: !item.usable
|
|
441
441
|
}));
|
|
442
442
|
var getIsSubjectRequire = (state) => {
|
|
443
443
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -69,16 +69,6 @@ export declare const setDefaultResource: ({ cacheItem, resources }: any) => any;
|
|
|
69
69
|
* @Date: 2024-09-19 20:26
|
|
70
70
|
*/
|
|
71
71
|
export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any;
|
|
72
|
-
/**
|
|
73
|
-
* @title: 将商品内关联的资源id还原成数据
|
|
74
|
-
* @description:
|
|
75
|
-
* @param {any} resourcesOriginMap
|
|
76
|
-
* @param {any} cacheItem
|
|
77
|
-
* @return {*}
|
|
78
|
-
* @Author: zhiwei.Wang
|
|
79
|
-
* @Date: 2024-09-19 20:23
|
|
80
|
-
*/
|
|
81
|
-
export declare const getResourceByIds: (resourcesOriginMap: any, cacheItem: any, extraParams?: any) => any[];
|
|
82
72
|
/**
|
|
83
73
|
* @title: 预生成服务的 extend
|
|
84
74
|
* @description:
|
|
@@ -33,7 +33,6 @@ __export(utils_exports, {
|
|
|
33
33
|
getDurationProps: () => getDurationProps,
|
|
34
34
|
getFlexibleOption: () => getFlexibleOption,
|
|
35
35
|
getProductExtend: () => getProductExtend,
|
|
36
|
-
getResourceByIds: () => getResourceByIds,
|
|
37
36
|
getTimeObj: () => getTimeObj,
|
|
38
37
|
getTimeSlices: () => getTimeSlices,
|
|
39
38
|
getUsableTime: () => getUsableTime,
|
|
@@ -178,12 +177,8 @@ var formatResources = ({ cacheItem, resourcesOrigin, id }) => {
|
|
|
178
177
|
let _item = (0, import_lodash.cloneDeep)(item);
|
|
179
178
|
_item.renderList = _item.renderList.map((d) => {
|
|
180
179
|
let res = (0, import_utilsByBooking.formatResource)(d, _cacheItem, (newData) => {
|
|
181
|
-
|
|
182
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "resource-option" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "like-wrap" }), /* @__PURE__ */ import_react.default.createElement("span", { className: "resource-option-label-text" }, newData.labelText), (!newData.usable || unbound) && /* @__PURE__ */ import_react.default.createElement(import_AlertTriangle.default, { className: "resource-option-alert-icon" }));
|
|
180
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "resource-option" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "like-wrap" }), newData.labelText, !newData.usable && /* @__PURE__ */ import_react.default.createElement(import_AlertTriangle.default, { className: "resource-option-alert-icon" }));
|
|
183
181
|
});
|
|
184
|
-
if (!item.optional_resource.includes(d.id) && !item.default_resource.includes(d.id) && d.id !== 0) {
|
|
185
|
-
res.unbound = true;
|
|
186
|
-
}
|
|
187
182
|
renderListMaps[res.id] = res;
|
|
188
183
|
return res;
|
|
189
184
|
}).sort((a, b) => b.usable ? 1 : -1);
|
|
@@ -285,17 +280,12 @@ var setDefaultCapacitys = ({ capacitys, cacheItem }) => {
|
|
|
285
280
|
}
|
|
286
281
|
return [{ id: 0, value: 1, name: "" }];
|
|
287
282
|
};
|
|
288
|
-
var getResourceByIds = (resourcesOriginMap, cacheItem
|
|
283
|
+
var getResourceByIds = (resourcesOriginMap, cacheItem) => {
|
|
289
284
|
var _a;
|
|
290
285
|
let _resources = [...((_a = cacheItem == null ? void 0 : cacheItem.product_resource) == null ? void 0 : _a.resources) || []];
|
|
291
|
-
const { extraResources = [] } = extraParams || {};
|
|
292
286
|
_resources = _resources.filter((d) => d.status == 1);
|
|
293
287
|
for (let item of _resources) {
|
|
294
288
|
const form_id = item.id;
|
|
295
|
-
let extraResourceIds = extraResources.filter((_extraItem) => {
|
|
296
|
-
return _extraItem.form_id === form_id && !item.optional_resource.includes(_extraItem.id) && !item.default_resource.includes(_extraItem.id);
|
|
297
|
-
}).map((_extraItem) => _extraItem.id);
|
|
298
|
-
extraResourceIds = Array.from(new Set(extraResourceIds));
|
|
299
289
|
item.optional_resource = (item.optional_resource || []).filter(
|
|
300
290
|
(d) => item.default_resource.indexOf(d) == -1
|
|
301
291
|
);
|
|
@@ -318,7 +308,7 @@ var getResourceByIds = (resourcesOriginMap, cacheItem, extraParams) => {
|
|
|
318
308
|
}
|
|
319
309
|
};
|
|
320
310
|
};
|
|
321
|
-
let optional_resource =
|
|
311
|
+
let optional_resource = item.optional_resource.map((d) => {
|
|
322
312
|
if (!resourcesOriginMap[d]) {
|
|
323
313
|
return null;
|
|
324
314
|
}
|
|
@@ -427,21 +417,9 @@ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
|
|
|
427
417
|
_cacheItem._data.capacitys = cacheItem.capacity;
|
|
428
418
|
}
|
|
429
419
|
if (!_cacheItem._data.resourcesOrigin) {
|
|
430
|
-
const extraResources = [];
|
|
431
|
-
if (Array.isArray(_cacheItem._extend.event_resources)) {
|
|
432
|
-
_cacheItem._extend.event_resources.forEach((_item) => {
|
|
433
|
-
extraResources.push({
|
|
434
|
-
form_id: _item.form_id,
|
|
435
|
-
id: _item.relation_id
|
|
436
|
-
});
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
420
|
_cacheItem._data.resourcesOrigin = getResourceByIds(
|
|
440
421
|
resourcesOriginMap,
|
|
441
|
-
cacheItem
|
|
442
|
-
{
|
|
443
|
-
extraResources
|
|
444
|
-
}
|
|
422
|
+
cacheItem
|
|
445
423
|
);
|
|
446
424
|
}
|
|
447
425
|
if (!_cacheItem._data.resources) {
|
|
@@ -480,7 +458,6 @@ var transServiceList = (list) => {
|
|
|
480
458
|
getDurationProps,
|
|
481
459
|
getFlexibleOption,
|
|
482
460
|
getProductExtend,
|
|
483
|
-
getResourceByIds,
|
|
484
461
|
getTimeObj,
|
|
485
462
|
getTimeSlices,
|
|
486
463
|
getUsableTime,
|
|
@@ -43,20 +43,7 @@ var import_lodash = require("lodash");
|
|
|
43
43
|
var import_utils2 = require("../utils");
|
|
44
44
|
var import_ahooks = require("ahooks");
|
|
45
45
|
var import_icons = require("@ant-design/icons");
|
|
46
|
-
var Resources = ({
|
|
47
|
-
state,
|
|
48
|
-
cacheItem,
|
|
49
|
-
getCurrentCacheItem,
|
|
50
|
-
onChange,
|
|
51
|
-
value,
|
|
52
|
-
config = {
|
|
53
|
-
// 是否显示自动分配
|
|
54
|
-
autoAllocation: true,
|
|
55
|
-
// 是否显示资源错误图标
|
|
56
|
-
resourceErrorIcon: true,
|
|
57
|
-
disabled: false
|
|
58
|
-
}
|
|
59
|
-
}, ref) => {
|
|
46
|
+
var Resources = ({ state, cacheItem, getCurrentCacheItem, onChange, value }, ref) => {
|
|
60
47
|
var _a, _b;
|
|
61
48
|
const [showError, setShowError] = (0, import_react.useState)(false);
|
|
62
49
|
const update = (0, import_ahooks.useUpdate)();
|
|
@@ -147,7 +134,7 @@ var Resources = ({
|
|
|
147
134
|
);
|
|
148
135
|
});
|
|
149
136
|
},
|
|
150
|
-
[
|
|
137
|
+
[]
|
|
151
138
|
);
|
|
152
139
|
const check = () => {
|
|
153
140
|
var _a2;
|
|
@@ -179,7 +166,6 @@ var Resources = ({
|
|
|
179
166
|
{
|
|
180
167
|
label: item.title,
|
|
181
168
|
required: true,
|
|
182
|
-
labelCol: config == null ? void 0 : config.labelCol,
|
|
183
169
|
extra: showError && item.select_type.min > (cur == null ? void 0 : cur.length) ? /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#ff4d4f" } }, import_utils.locales.getText(
|
|
184
170
|
"page.booking.text.resource.min-length-error"
|
|
185
171
|
)(item.select_type.min, item.title)) : void 0
|
|
@@ -187,12 +173,9 @@ var Resources = ({
|
|
|
187
173
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "resource-col" }, item.select_type.type === "multiple" ? null : /* @__PURE__ */ import_react.default.createElement(
|
|
188
174
|
import_antd.Button,
|
|
189
175
|
{
|
|
190
|
-
className:
|
|
176
|
+
className: "resource-col-like-wrap",
|
|
191
177
|
onClick: () => {
|
|
192
178
|
var _a3;
|
|
193
|
-
if (config == null ? void 0 : config.disabled) {
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
179
|
setLikeStatus(
|
|
197
180
|
((_a3 = cur == null ? void 0 : cur[0]) == null ? void 0 : _a3.like_status) === "like" ? "common" : "like",
|
|
198
181
|
item.form_id,
|
|
@@ -200,13 +183,7 @@ var Resources = ({
|
|
|
200
183
|
);
|
|
201
184
|
}
|
|
202
185
|
},
|
|
203
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
204
|
-
import_like.default,
|
|
205
|
-
{
|
|
206
|
-
status: (_a2 = cur == null ? void 0 : cur[0]) == null ? void 0 : _a2.like_status,
|
|
207
|
-
className: `${(config == null ? void 0 : config.disabled) ? "like-icon-disabled" : ""}`
|
|
208
|
-
}
|
|
209
|
-
)
|
|
186
|
+
/* @__PURE__ */ import_react.default.createElement(import_like.default, { status: (_a2 = cur == null ? void 0 : cur[0]) == null ? void 0 : _a2.like_status })
|
|
210
187
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
211
188
|
import_MaxLengthSelect.default,
|
|
212
189
|
{
|
|
@@ -227,35 +204,14 @@ var Resources = ({
|
|
|
227
204
|
showSearch: true,
|
|
228
205
|
filterOption: (str, option) => {
|
|
229
206
|
return ((option == null ? void 0 : option.labelText) || "").toLowerCase().includes((str || "").toLowerCase());
|
|
230
|
-
},
|
|
231
|
-
disabled: config == null ? void 0 : config.disabled
|
|
232
|
-
},
|
|
233
|
-
renderOptions(
|
|
234
|
-
item.renderList,
|
|
235
|
-
"id",
|
|
236
|
-
(config == null ? void 0 : config.resourceErrorIcon) ? "label" : "labelText",
|
|
237
|
-
"resource"
|
|
238
|
-
)
|
|
239
|
-
), (config == null ? void 0 : config.autoAllocation) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
240
|
-
import_antd.Checkbox,
|
|
241
|
-
{
|
|
242
|
-
checked: getIsAutoAllocation(item.form_id),
|
|
243
|
-
onChange: (e) => {
|
|
244
|
-
handleCheckAutoAllocation(
|
|
245
|
-
item.form_id,
|
|
246
|
-
e.target.checked
|
|
247
|
-
);
|
|
248
207
|
}
|
|
249
|
-
}
|
|
250
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
251
|
-
import_antd.Tooltip,
|
|
252
|
-
{
|
|
253
|
-
title: import_utils.locales.getText(
|
|
254
|
-
"page.booking.text.resource.check-auto-allocation-tip"
|
|
255
|
-
)
|
|
256
208
|
},
|
|
257
|
-
|
|
258
|
-
)) :
|
|
209
|
+
renderOptions(item.renderList, "id", "label", "resource")
|
|
210
|
+
), /* @__PURE__ */ import_react.default.createElement(import_antd.Checkbox, { checked: getIsAutoAllocation(item.form_id), onChange: (e) => {
|
|
211
|
+
handleCheckAutoAllocation(item.form_id, e.target.checked);
|
|
212
|
+
} }), /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: import_utils.locales.getText(
|
|
213
|
+
"page.booking.text.resource.check-auto-allocation-tip"
|
|
214
|
+
) }, /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, null)))
|
|
259
215
|
), state.renderType !== "eventBooking" && (errors || []).map((d) => {
|
|
260
216
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
261
217
|
import_antd.Alert,
|
|
@@ -180,12 +180,6 @@ var getErrorList = (resource, cacheItem) => {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
if (resource.unbound) {
|
|
184
|
-
list.push({
|
|
185
|
-
label: import_utils.locales.getText("pisell1.text.resource-error-message-unbound"),
|
|
186
|
-
type: "time"
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
183
|
return list;
|
|
190
184
|
};
|
|
191
185
|
var formatResource = (resourceItem, cacheItem, formatLabel) => {
|
|
@@ -110,7 +110,6 @@ declare const _default: {
|
|
|
110
110
|
'pisell1.text.resource-error-message-1': (x: string, y: string) => string;
|
|
111
111
|
'pisell1.text.resource-error-message-2': (x: string, y: string, z: string) => string;
|
|
112
112
|
'pisell1.text.resource-error-message-3': (x: string, y: string, z: string) => string;
|
|
113
|
-
'pisell1.text.resource-error-message-unbound': string;
|
|
114
113
|
'pisell1.text.no-addons': string;
|
|
115
114
|
'pisell1.text.no-resource': string;
|
|
116
115
|
'pisell1.text.no-payments': string;
|
|
@@ -390,7 +389,6 @@ declare const _default: {
|
|
|
390
389
|
'pisell1.text.resource-error-message-1': (x: string, y: string) => string;
|
|
391
390
|
'pisell1.text.resource-error-message-2': (x: string, y: string, z: string) => string;
|
|
392
391
|
'pisell1.text.resource-error-message-3': (x: string, y: string, z: string) => string;
|
|
393
|
-
'pisell1.text.resource-error-message-unbound': string;
|
|
394
392
|
'pisell2.text.flexible': string;
|
|
395
393
|
'pisell2.text.order-discount': string;
|
|
396
394
|
'pisell2.text.no-product-added': string;
|
|
@@ -662,7 +660,6 @@ declare const _default: {
|
|
|
662
660
|
'pisell1.text.resource-error-message-1': (x: string, y: string) => string;
|
|
663
661
|
'pisell1.text.resource-error-message-2': (x: string, y: string, z: string) => string;
|
|
664
662
|
'pisell1.text.resource-error-message-3': (x: string, y: string, z: string) => string;
|
|
665
|
-
'pisell1.text.resource-error-message-unbound': string;
|
|
666
663
|
'pisell2.text.flexible': string;
|
|
667
664
|
'pisell2.text.order-discount': string;
|
|
668
665
|
'pisell2.text.no-product-added': string;
|
|
@@ -154,7 +154,6 @@ var locales_default = {
|
|
|
154
154
|
"pisell1.text.resource-error-message-1": (x, y) => `${x} doesn't provide ${y}, but your team member can still book appointments.`,
|
|
155
155
|
"pisell1.text.resource-error-message-2": (x, y, z) => `${x} isn't available between ${y} and ${z}, but your team member can still book appointments.`,
|
|
156
156
|
"pisell1.text.resource-error-message-3": (x, y, z) => `${x} is fully booked between ${y} and ${z}, but your team member can still book appointments.`,
|
|
157
|
-
"pisell1.text.resource-error-message-unbound": "This booking product is not associated with the target resource.",
|
|
158
157
|
"pisell1.text.no-addons": "No addons",
|
|
159
158
|
"pisell1.text.no-resource": "No resource",
|
|
160
159
|
"pisell1.text.no-payments": "No payments",
|
|
@@ -466,7 +465,6 @@ var locales_default = {
|
|
|
466
465
|
"pisell1.text.resource-error-message-1": (x, y) => `${x} 不提供 ${y},但您的团队成员仍然可以预约。`,
|
|
467
466
|
"pisell1.text.resource-error-message-2": (x, y, z) => `${x}在${y}到${z}之间不提供服务,但您的团队成员仍然可以预约。`,
|
|
468
467
|
"pisell1.text.resource-error-message-3": (x, y, z) => `${x}在${y}到${z}之间已约满,但您的团队成员仍然可以预约。`,
|
|
469
|
-
"pisell1.text.resource-error-message-unbound": "该预约商品未关联目标资源。",
|
|
470
468
|
"pisell2.text.flexible": "灵活",
|
|
471
469
|
"pisell2.text.order-discount": "折扣",
|
|
472
470
|
"pisell2.text.no-product-added": "未添加商品",
|
|
@@ -770,7 +768,6 @@ var locales_default = {
|
|
|
770
768
|
"pisell1.text.resource-error-message-1": (x, y) => `${x} 不提供 ${y},但您的團隊成員仍然可以預約。`,
|
|
771
769
|
"pisell1.text.resource-error-message-2": (x, y, z) => `${x}在${y}到${z}之間不提供服務,但您的團隊成員仍然可以預約。`,
|
|
772
770
|
"pisell1.text.resource-error-message-3": (x, y, z) => `${x}在${y}到${z}之間已約滿,但您的團隊成員仍然可以預約。`,
|
|
773
|
-
"pisell1.text.resource-error-message-unbound": "該預約商品未關聯目標資源。",
|
|
774
771
|
"pisell2.text.flexible": "靈活",
|
|
775
772
|
"pisell2.text.order-discount": "折扣",
|
|
776
773
|
"pisell2.text.no-product-added": "未添加商品",
|
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
|
8
8
|
*/
|
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
10
10
|
className?: string | undefined;
|
|
11
|
-
onChange?: ((status: "
|
|
11
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
12
12
|
[keys: string]: unknown;
|
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
|
14
14
|
onClose: () => void;
|
|
@@ -5,8 +5,7 @@ export declare enum EftposEnum {
|
|
|
5
5
|
Tyro = "tyro",
|
|
6
6
|
/** 后端支付 - 支付 + 退款 */
|
|
7
7
|
Windcave = "windcave",
|
|
8
|
-
Stripe = "stripe"
|
|
9
|
-
Linkly = "linkly"
|
|
8
|
+
Stripe = "stripe"
|
|
10
9
|
}
|
|
11
10
|
export declare enum StatusEnum {
|
|
12
11
|
Loading = "loading",
|
|
@@ -148,8 +147,6 @@ export declare enum PayStatus {
|
|
|
148
147
|
'Success' = "200",
|
|
149
148
|
/** 未生成交易记录 */
|
|
150
149
|
'NoPay' = "4004",
|
|
151
|
-
/** 配对失效 */
|
|
152
|
-
'PairingFailure' = "606020",
|
|
153
150
|
/** 支付失败 */
|
|
154
151
|
'Unknown' = "701000",
|
|
155
152
|
/** 交易请求超时 */
|
|
@@ -35,7 +35,6 @@ var EftposEnum = /* @__PURE__ */ ((EftposEnum2) => {
|
|
|
35
35
|
EftposEnum2["Tyro"] = "tyro";
|
|
36
36
|
EftposEnum2["Windcave"] = "windcave";
|
|
37
37
|
EftposEnum2["Stripe"] = "stripe";
|
|
38
|
-
EftposEnum2["Linkly"] = "linkly";
|
|
39
38
|
return EftposEnum2;
|
|
40
39
|
})(EftposEnum || {});
|
|
41
40
|
var StatusEnum = /* @__PURE__ */ ((StatusEnum2) => {
|
|
@@ -89,7 +88,6 @@ var PayRouteEnum = /* @__PURE__ */ ((PayRouteEnum2) => {
|
|
|
89
88
|
var PayStatus = /* @__PURE__ */ ((PayStatus2) => {
|
|
90
89
|
PayStatus2["Success"] = "200";
|
|
91
90
|
PayStatus2["NoPay"] = "4004";
|
|
92
|
-
PayStatus2["PairingFailure"] = "606020";
|
|
93
91
|
PayStatus2["Unknown"] = "701000";
|
|
94
92
|
PayStatus2["Timeout"] = "701001";
|
|
95
93
|
PayStatus2["PayOtherEftposFailed"] = "701003";
|
|
@@ -10,7 +10,7 @@ import './device.less';
|
|
|
10
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
11
11
|
api: PayProps['api'];
|
|
12
12
|
className?: string | undefined;
|
|
13
|
-
onChange?: ((status: "
|
|
13
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
14
14
|
[keys: string]: unknown;
|
|
15
15
|
} | undefined, other?: any) => void) | undefined;
|
|
16
16
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "warn" | "success" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
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<"stripe" | "tyro" | "windcave" | "payo">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -128,7 +128,6 @@ var useFail = (index) => {
|
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
const [code] = [`${res.code}`];
|
|
131
|
-
console.log("code---->>>>>>>", code);
|
|
132
131
|
if (code === import_const.PayStatus.Unknown) {
|
|
133
132
|
steps[index].title = import_utils.locales.getText("page.eftpos-pay.text.failed")(
|
|
134
133
|
modeRef.current
|
|
@@ -169,12 +168,8 @@ var useFail = (index) => {
|
|
|
169
168
|
if (isMark) {
|
|
170
169
|
if (clientRef.current === import_const2.ClientEnum.User) {
|
|
171
170
|
steps[index].status = "fail";
|
|
172
|
-
steps[index].title = import_utils.locales.getText(
|
|
173
|
-
|
|
174
|
-
);
|
|
175
|
-
steps[index].fail = import_utils.locales.getText(
|
|
176
|
-
"page.eftpos-pay.text.transaction.eftpos.fail.other"
|
|
177
|
-
);
|
|
171
|
+
steps[index].title = import_utils.locales.getText("page.eftpos-pay.text.timedout.title");
|
|
172
|
+
steps[index].fail = import_utils.locales.getText("page.eftpos-pay.text.transaction.eftpos.fail.other");
|
|
178
173
|
steps[index].custom = steps[index].custom ? { ...steps[index].custom, isPosNetworkError: true } : { isPosNetworkError: true };
|
|
179
174
|
dispatch((0, import_store.updateSteps)(steps));
|
|
180
175
|
dispatch((0, import_store.updateComponent)("Fail"));
|
|
@@ -315,9 +310,7 @@ ${import_utils.locales.getText(
|
|
|
315
310
|
)}
|
|
316
311
|
${import_utils.locales.getText(
|
|
317
312
|
"page.eftpos-pay.text.transaction.eftpos.fail.if"
|
|
318
|
-
)(modeRef.current)}` : import_utils.locales.getText(
|
|
319
|
-
"page.eftpos-pay.text.transaction.eftpos.fail.other"
|
|
320
|
-
);
|
|
313
|
+
)(modeRef.current)}` : import_utils.locales.getText("page.eftpos-pay.text.transaction.eftpos.fail.other");
|
|
321
314
|
steps[index].status = "warn";
|
|
322
315
|
steps[index].custom = steps[index].custom ? { ...steps[index].custom, isPosNetworkError: true } : { isPosNetworkError: true };
|
|
323
316
|
dispatch((0, import_store.updateSteps)(steps));
|
|
@@ -366,7 +359,7 @@ ${import_utils.locales.getText(
|
|
|
366
359
|
);
|
|
367
360
|
return;
|
|
368
361
|
}
|
|
369
|
-
if (code === import_const.PayStatus.UserConfigError
|
|
362
|
+
if (code === import_const.PayStatus.UserConfigError) {
|
|
370
363
|
steps[index].title = import_utils.locales.getText(
|
|
371
364
|
"page.eftpos-pay.text.transaction.user.config.title"
|
|
372
365
|
);
|
|
@@ -139,7 +139,7 @@ var eftposPay_default = (props) => {
|
|
|
139
139
|
}, [mode, state]);
|
|
140
140
|
(0, import_react.useEffect)(() => {
|
|
141
141
|
document.body.id = "body";
|
|
142
|
-
console.log("初始化 ........
|
|
142
|
+
console.log("初始化 ........11221801");
|
|
143
143
|
}, []);
|
|
144
144
|
console.log("props?.params?.device_number = ", (_e = props == null ? void 0 : props.params) == null ? void 0 : _e.device_number);
|
|
145
145
|
const api = (0, import_react.useMemo)(() => {
|
|
@@ -3,5 +3,4 @@ export { getAmonunt } from './helper';
|
|
|
3
3
|
export { default as Payo } from './payo';
|
|
4
4
|
export { default as Windcave } from './windcave/windcave';
|
|
5
5
|
export { default as Tyro } from './tyro';
|
|
6
|
-
export { default as Linkly } from './linkly';
|
|
7
6
|
export declare const getInitState: (type: string, params?: any) => State;
|