@pisell/private-materials 3.3.97 → 3.3.99
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 +8 -8
- 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/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/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 +0 -15
- 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.js +1 -15
- 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/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- 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/voucher/index.js +2 -2
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/app.d.ts +0 -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/payo/config.js +1 -1
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- 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/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.js +1 -3
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/locales.d.ts +0 -24
- package/es/components/eventBooking/locales.js +3 -27
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +1 -120
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- 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/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 +0 -15
- 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.js +1 -6
- 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/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- 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/voucher/index.js +2 -2
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/app.d.ts +0 -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/payo/config.js +1 -1
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- 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/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/locales.d.ts +0 -24
- package/lib/components/eventBooking/locales.js +3 -27
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -120
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/package.json +4 -4
- 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 -321
- 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 -81
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -3
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
- 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/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 -242
- 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 -3
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
- 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
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import './index.less';
|
|
2
|
-
export declare const DepositContent: (props: {
|
|
3
|
-
isAgreeDepositPolicy: boolean;
|
|
4
|
-
setIsAgreeDepositPolicy: (value: boolean) => void;
|
|
5
|
-
deposit: any;
|
|
6
|
-
depositProtocolRequest?: any;
|
|
7
|
-
}) => JSX.Element;
|
|
8
2
|
declare const Deposit: () => JSX.Element;
|
|
9
3
|
export default Deposit;
|
|
@@ -4,11 +4,12 @@ import AppointmentDeposit from "../../deposit";
|
|
|
4
4
|
import { useAppointmentBookingContext } from "../../context";
|
|
5
5
|
import { locales } from '@pisell/utils';
|
|
6
6
|
import "./index.less";
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
setIsAgreeDepositPolicy =
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
var Deposit = function Deposit() {
|
|
8
|
+
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
9
|
+
setIsAgreeDepositPolicy = _useAppointmentBookin.setIsAgreeDepositPolicy,
|
|
10
|
+
isAgreeDepositPolicy = _useAppointmentBookin.isAgreeDepositPolicy,
|
|
11
|
+
summary = _useAppointmentBookin.summary;
|
|
12
|
+
var deposit = summary.deposit;
|
|
12
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
13
14
|
className: "appointment-deposit-wrap"
|
|
14
15
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -23,28 +24,7 @@ export var DepositContent = function DepositContent(props) {
|
|
|
23
24
|
isAgreePolicy: isAgreeDepositPolicy,
|
|
24
25
|
onChange: function onChange(value) {
|
|
25
26
|
return setIsAgreeDepositPolicy(value);
|
|
26
|
-
}
|
|
27
|
-
depositProtocolRequest: depositProtocolRequest
|
|
27
|
+
}
|
|
28
28
|
}));
|
|
29
29
|
};
|
|
30
|
-
var Deposit = function Deposit() {
|
|
31
|
-
var _ref = useAppointmentBookingContext(),
|
|
32
|
-
setIsAgreeDepositPolicy = _ref.setIsAgreeDepositPolicy,
|
|
33
|
-
isAgreeDepositPolicy = _ref.isAgreeDepositPolicy,
|
|
34
|
-
summary = _ref.summary,
|
|
35
|
-
appointmentBooking = _ref.appointmentBooking;
|
|
36
|
-
var deposit = summary.deposit;
|
|
37
|
-
|
|
38
|
-
// 获取协议方法需要在组件中定义才能传递给子组件,子组件无法获取到context中的方法
|
|
39
|
-
var depositProtocolRequest = function depositProtocolRequest(id) {
|
|
40
|
-
var _appointmentBooking$g;
|
|
41
|
-
return appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$g = appointmentBooking.getProtocol) === null || _appointmentBooking$g === void 0 ? void 0 : _appointmentBooking$g.call(appointmentBooking, id);
|
|
42
|
-
};
|
|
43
|
-
return /*#__PURE__*/React.createElement(DepositContent, {
|
|
44
|
-
isAgreeDepositPolicy: !!isAgreeDepositPolicy,
|
|
45
|
-
setIsAgreeDepositPolicy: setIsAgreeDepositPolicy,
|
|
46
|
-
deposit: deposit,
|
|
47
|
-
depositProtocolRequest: depositProtocolRequest
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
30
|
export default Deposit;
|
|
@@ -85,7 +85,9 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
85
85
|
return checkProductType(item === null || item === void 0 ? void 0 : item.id);
|
|
86
86
|
case 4:
|
|
87
87
|
type = _context2.sent;
|
|
88
|
-
|
|
88
|
+
if (type === 'session') {
|
|
89
|
+
appointmentBooking.openProductDetail(item.id);
|
|
90
|
+
}
|
|
89
91
|
case 6:
|
|
90
92
|
utils === null || utils === void 0 || utils.action({
|
|
91
93
|
type: 'pisell1.productDetail',
|
|
@@ -103,13 +105,6 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
103
105
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
104
106
|
while (1) switch (_context.prev = _context.next) {
|
|
105
107
|
case 0:
|
|
106
|
-
if (!data.isCancel) {
|
|
107
|
-
_context.next = 3;
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
appointmentBooking.closeProductDetail();
|
|
111
|
-
return _context.abrupt("return");
|
|
112
|
-
case 3:
|
|
113
108
|
product = _objectSpread(_objectSpread({}, data), {}, {
|
|
114
109
|
options: (data === null || data === void 0 ? void 0 : data.option) || []
|
|
115
110
|
});
|
|
@@ -117,21 +112,31 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
117
112
|
|
|
118
113
|
// 零售模版,直接加入购物车
|
|
119
114
|
if (!isRetailTemplate) {
|
|
120
|
-
_context.next =
|
|
115
|
+
_context.next = 7;
|
|
121
116
|
break;
|
|
122
117
|
}
|
|
123
118
|
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
|
124
|
-
_context.next =
|
|
119
|
+
_context.next = 5;
|
|
125
120
|
break;
|
|
126
121
|
}
|
|
127
122
|
return _context.abrupt("return");
|
|
128
|
-
case
|
|
123
|
+
case 5:
|
|
129
124
|
appointmentBooking.storeProduct(product);
|
|
130
125
|
return _context.abrupt("return");
|
|
126
|
+
case 7:
|
|
127
|
+
if (!(data !== null && data !== void 0 && data.isCancel)) {
|
|
128
|
+
_context.next = 10;
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
if (type === 'session') {
|
|
132
|
+
appointmentBooking.closeProductDetail();
|
|
133
|
+
appointmentBooking.getAvailableDate();
|
|
134
|
+
}
|
|
135
|
+
return _context.abrupt("return");
|
|
131
136
|
case 10:
|
|
132
137
|
session = data === null || data === void 0 ? void 0 : data.session;
|
|
133
138
|
if (!session) {
|
|
134
|
-
_context.next =
|
|
139
|
+
_context.next = 20;
|
|
135
140
|
break;
|
|
136
141
|
}
|
|
137
142
|
startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
|
|
@@ -143,36 +148,35 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
143
148
|
endTime: "".concat(endDate, " ").concat(session === null || session === void 0 ? void 0 : session.end_time)
|
|
144
149
|
}
|
|
145
150
|
});
|
|
146
|
-
|
|
151
|
+
appointmentBooking.closeProductDetail();
|
|
152
|
+
_context.next = 18;
|
|
147
153
|
return appointmentBooking.getAvailableDate({
|
|
148
154
|
startDate: startDate,
|
|
149
155
|
endDate: endDate
|
|
150
156
|
});
|
|
151
|
-
case
|
|
152
|
-
_context.next =
|
|
157
|
+
case 18:
|
|
158
|
+
_context.next = 28;
|
|
153
159
|
break;
|
|
154
|
-
case
|
|
160
|
+
case 20:
|
|
155
161
|
resources = (data === null || data === void 0 || (_data$origin = data.origin) === null || _data$origin === void 0 || (_data$origin = _data$origin.product_resource) === null || _data$origin === void 0 ? void 0 : _data$origin.resources) || [];
|
|
156
162
|
activeStatus = resources.find(function (item) {
|
|
157
163
|
return item.status === 1;
|
|
158
164
|
});
|
|
159
165
|
if (!(!activeStatus && !appointmentBooking.isTargetNormalProduct(data === null || data === void 0 ? void 0 : data.origin))) {
|
|
160
|
-
_context.next =
|
|
166
|
+
_context.next = 24;
|
|
161
167
|
break;
|
|
162
168
|
}
|
|
163
169
|
return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
|
|
164
|
-
case
|
|
170
|
+
case 24:
|
|
165
171
|
appointmentBooking.storeProduct(product);
|
|
166
172
|
// duration 类型的商品,要获取一下资源,在先选日期的 duration 步骤里目前只能通过这个动作拉取
|
|
167
173
|
if (!(type === 'duration')) {
|
|
168
|
-
_context.next =
|
|
174
|
+
_context.next = 28;
|
|
169
175
|
break;
|
|
170
176
|
}
|
|
171
|
-
_context.next =
|
|
177
|
+
_context.next = 28;
|
|
172
178
|
return appointmentBooking.getAvailableDate();
|
|
173
|
-
case
|
|
174
|
-
appointmentBooking.closeProductDetail();
|
|
175
|
-
|
|
179
|
+
case 28:
|
|
176
180
|
// 先选择日期流程
|
|
177
181
|
if (isDateSelectedFirst) {
|
|
178
182
|
index = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2; //先选择日期流程:如果商品类型是duration的商品,则需要增加选择时间步骤
|
|
@@ -12,6 +12,7 @@ import React, { useState, useEffect } from 'react';
|
|
|
12
12
|
import { Spin } from 'antd';
|
|
13
13
|
import { PisellModal, PisellEmpty, Button, Checkbox } from '@pisell/materials';
|
|
14
14
|
import { locales, isMobile } from '@pisell/utils';
|
|
15
|
+
import { useAppointmentBookingContext } from "../../../context";
|
|
15
16
|
import "./index.less";
|
|
16
17
|
var DepositModal = function DepositModal(props) {
|
|
17
18
|
var open = props.open,
|
|
@@ -20,8 +21,9 @@ var DepositModal = function DepositModal(props) {
|
|
|
20
21
|
onChange = props.onChange,
|
|
21
22
|
onConfirm = props.onConfirm,
|
|
22
23
|
_props$isHideCheckout = props.isHideCheckout,
|
|
23
|
-
isHideCheckout = _props$isHideCheckout === void 0 ? true : _props$isHideCheckout
|
|
24
|
-
|
|
24
|
+
isHideCheckout = _props$isHideCheckout === void 0 ? true : _props$isHideCheckout;
|
|
25
|
+
var _useAppointmentBookin = useAppointmentBookingContext(),
|
|
26
|
+
appointmentBooking = _useAppointmentBookin.appointmentBooking;
|
|
25
27
|
var _useState = useState(null),
|
|
26
28
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
29
|
policy = _useState2[0],
|
|
@@ -48,42 +50,35 @@ var DepositModal = function DepositModal(props) {
|
|
|
48
50
|
*/
|
|
49
51
|
var getPolicy = /*#__PURE__*/function () {
|
|
50
52
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(id) {
|
|
51
|
-
var _yield$
|
|
53
|
+
var _yield$appointmentBoo, data;
|
|
52
54
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
53
55
|
while (1) switch (_context.prev = _context.next) {
|
|
54
56
|
case 0:
|
|
55
|
-
if (depositProtocolRequest) {
|
|
56
|
-
_context.next = 3;
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
console.error('depositProtocolRequest is not defined');
|
|
60
|
-
return _context.abrupt("return");
|
|
61
|
-
case 3:
|
|
62
57
|
setLoading(true);
|
|
63
|
-
_context.prev =
|
|
64
|
-
_context.next =
|
|
65
|
-
return
|
|
66
|
-
case
|
|
67
|
-
_yield$
|
|
68
|
-
data = _yield$
|
|
58
|
+
_context.prev = 1;
|
|
59
|
+
_context.next = 4;
|
|
60
|
+
return appointmentBooking.getProtocol(id);
|
|
61
|
+
case 4:
|
|
62
|
+
_yield$appointmentBoo = _context.sent;
|
|
63
|
+
data = _yield$appointmentBoo.data;
|
|
69
64
|
setPolicy(data);
|
|
70
65
|
onChange && onChange(data);
|
|
71
|
-
_context.next =
|
|
66
|
+
_context.next = 14;
|
|
72
67
|
break;
|
|
73
|
-
case
|
|
74
|
-
_context.prev =
|
|
75
|
-
_context.t0 = _context["catch"](
|
|
68
|
+
case 10:
|
|
69
|
+
_context.prev = 10;
|
|
70
|
+
_context.t0 = _context["catch"](1);
|
|
76
71
|
console.log(_context.t0);
|
|
77
72
|
onChange && onChange(_context.t0);
|
|
78
|
-
case
|
|
79
|
-
_context.prev =
|
|
73
|
+
case 14:
|
|
74
|
+
_context.prev = 14;
|
|
80
75
|
setLoading(false);
|
|
81
|
-
return _context.finish(
|
|
82
|
-
case
|
|
76
|
+
return _context.finish(14);
|
|
77
|
+
case 17:
|
|
83
78
|
case "end":
|
|
84
79
|
return _context.stop();
|
|
85
80
|
}
|
|
86
|
-
}, _callee, null, [[
|
|
81
|
+
}, _callee, null, [[1, 10, 14, 17]]);
|
|
87
82
|
}));
|
|
88
83
|
return function getPolicy(_x) {
|
|
89
84
|
return _ref.apply(this, arguments);
|
|
@@ -21,8 +21,7 @@ var Deposit = function Deposit(props) {
|
|
|
21
21
|
isAgreePolicy = _props$isAgreePolicy === void 0 ? true : _props$isAgreePolicy,
|
|
22
22
|
_props$isShowTitle = props.isShowTitle,
|
|
23
23
|
isShowTitle = _props$isShowTitle === void 0 ? true : _props$isShowTitle,
|
|
24
|
-
onChange = props.onChange
|
|
25
|
-
depositProtocolRequest = props.depositProtocolRequest;
|
|
24
|
+
onChange = props.onChange;
|
|
26
25
|
var context = useEngineContext();
|
|
27
26
|
// 打开协议弹窗
|
|
28
27
|
var _useState = useState(false),
|
|
@@ -96,8 +95,7 @@ var Deposit = function Deposit(props) {
|
|
|
96
95
|
onCancel: function onCancel() {
|
|
97
96
|
return setVisible(false);
|
|
98
97
|
},
|
|
99
|
-
item: policyItem
|
|
100
|
-
depositProtocolRequest: depositProtocolRequest
|
|
98
|
+
item: policyItem
|
|
101
99
|
}));
|
|
102
100
|
};
|
|
103
101
|
export default Deposit;
|
|
@@ -27,20 +27,6 @@ var AppointmentBooking = function AppointmentBooking() {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
}, []);
|
|
30
|
-
useEffect(function () {
|
|
31
|
-
var setRealVH = function setRealVH() {
|
|
32
|
-
// window.innerHeight 会返回视口真实的高度(不包括工具栏)
|
|
33
|
-
var vh = window.innerHeight * 0.01;
|
|
34
|
-
document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// 页面加载和窗口大小变化时都重新计算
|
|
38
|
-
setRealVH();
|
|
39
|
-
window.addEventListener('resize', setRealVH);
|
|
40
|
-
return function () {
|
|
41
|
-
window.removeEventListener('resize', setRealVH);
|
|
42
|
-
};
|
|
43
|
-
}, []);
|
|
44
30
|
return /*#__PURE__*/React.createElement("div", {
|
|
45
31
|
className: "parallel-booking-wrap ".concat(isMobile() ? 'parallel-booking-mobile-wrap' : '')
|
|
46
32
|
}, /*#__PURE__*/React.createElement(AppointmentBookingProvider, null, /*#__PURE__*/React.createElement(Content, null)));
|
|
@@ -26,8 +26,8 @@ import useEngineContext from "../../../../hooks/useEngineContext";
|
|
|
26
26
|
import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
|
|
27
27
|
import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
|
|
28
28
|
import "./index.less";
|
|
29
|
-
import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
|
|
30
29
|
import { getServiceAddons } from "./utils";
|
|
30
|
+
import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
|
|
31
31
|
var ShopDiscountHooks = {
|
|
32
32
|
onInited: 'shopDiscount:onInited',
|
|
33
33
|
onDestroy: 'shopDiscount:onDestroy',
|
|
@@ -275,8 +275,8 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
275
275
|
style: {
|
|
276
276
|
width: '100%'
|
|
277
277
|
},
|
|
278
|
-
dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
|
|
279
278
|
mixedSort: mixedSort,
|
|
279
|
+
dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
|
|
280
280
|
onChange: function onChange(val) {
|
|
281
281
|
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
282
282
|
var detail = shopDiscount.setDiscountSelected({
|
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
|
166
166
|
type: string;
|
|
167
167
|
value: number;
|
|
168
|
-
}) => number | {
|
|
168
|
+
}) => number | "flexible" | {
|
|
169
169
|
type: string;
|
|
170
170
|
value: number;
|
|
171
|
-
}
|
|
171
|
+
};
|
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
|
174
174
|
export {};
|
|
@@ -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: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
12
12
|
[keys: string]: unknown;
|
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
|
14
14
|
onClose: () => void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PosProps, RouteType } from './const';
|
|
3
2
|
declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
|
|
4
3
|
action: RouteType;
|
|
@@ -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
|
/** 交易请求超时 */
|
|
@@ -3,9 +3,8 @@ export var EftposEnum = /*#__PURE__*/function (EftposEnum) {
|
|
|
3
3
|
EftposEnum["Tyro"] = "tyro";
|
|
4
4
|
EftposEnum["Windcave"] = "windcave";
|
|
5
5
|
EftposEnum["Stripe"] = "stripe";
|
|
6
|
-
EftposEnum["Linkly"] = "linkly";
|
|
7
6
|
return EftposEnum;
|
|
8
|
-
}({});
|
|
7
|
+
}({}); // Eftpos = 'eftpos',
|
|
9
8
|
export var StatusEnum = /*#__PURE__*/function (StatusEnum) {
|
|
10
9
|
StatusEnum["Loading"] = "loading";
|
|
11
10
|
StatusEnum["Warn"] = "warn";
|
|
@@ -65,7 +64,6 @@ export var PayRouteEnum = /*#__PURE__*/function (PayRouteEnum) {
|
|
|
65
64
|
export var PayStatus = /*#__PURE__*/function (PayStatus) {
|
|
66
65
|
PayStatus["Success"] = "200";
|
|
67
66
|
PayStatus["NoPay"] = "4004";
|
|
68
|
-
PayStatus["PairingFailure"] = "606020";
|
|
69
67
|
PayStatus["Unknown"] = "701000";
|
|
70
68
|
PayStatus["Timeout"] = "701001";
|
|
71
69
|
PayStatus["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: "success" | "page" | "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<"success" | "loading" | "warn" | "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<"tyro" | "windcave" | "stripe" | "payo">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -139,7 +139,6 @@ export var useFail = function useFail(index) {
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
var code = "".concat(res.code);
|
|
142
|
-
console.log('code---->>>>>>>', code);
|
|
143
142
|
if (code === PayStatus.Unknown) {
|
|
144
143
|
// 前往报错页 不可标记
|
|
145
144
|
steps[index].title = locales.getText('page.eftpos-pay.text.failed')(modeRef.current);
|
|
@@ -225,7 +224,6 @@ export var useFail = function useFail(index) {
|
|
|
225
224
|
dispatch(updateComponent('Fail'));
|
|
226
225
|
return;
|
|
227
226
|
}
|
|
228
|
-
|
|
229
227
|
// 重新支付 最多到重新发起2次
|
|
230
228
|
ref.current += 1;
|
|
231
229
|
dispatch(updateState({
|
|
@@ -302,7 +300,7 @@ export var useFail = function useFail(index) {
|
|
|
302
300
|
}));
|
|
303
301
|
return;
|
|
304
302
|
}
|
|
305
|
-
if (code === PayStatus.UserConfigError
|
|
303
|
+
if (code === PayStatus.UserConfigError) {
|
|
306
304
|
// 前往错误页 不可标记状态
|
|
307
305
|
steps[index].title = locales.getText('page.eftpos-pay.text.transaction.user.config.title');
|
|
308
306
|
steps[index].fail = locales.getText('page.eftpos-pay.text.transaction.user.config.text');
|
|
@@ -163,7 +163,7 @@ export default (function (props) {
|
|
|
163
163
|
}, [mode, state]);
|
|
164
164
|
useEffect(function () {
|
|
165
165
|
document.body.id = 'body';
|
|
166
|
-
console.log('初始化 ........
|
|
166
|
+
console.log('初始化 ........11221801');
|
|
167
167
|
}, []);
|
|
168
168
|
|
|
169
169
|
// console.log('action = ', action);
|
|
@@ -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;
|
|
@@ -2,12 +2,10 @@ import { EftposEnum } from "./const";
|
|
|
2
2
|
import getPayoInitState from "./payo/const";
|
|
3
3
|
import getTyroInitState from "./tyro/const";
|
|
4
4
|
import getWindcaveInitState from "./windcave/const";
|
|
5
|
-
import getLinklyInitState from "./linkly/const";
|
|
6
5
|
export { getAmonunt } from "./helper";
|
|
7
6
|
export { default as Payo } from "./payo";
|
|
8
7
|
export { default as Windcave } from "./windcave/windcave";
|
|
9
8
|
export { default as Tyro } from "./tyro";
|
|
10
|
-
export { default as Linkly } from "./linkly";
|
|
11
9
|
export var getInitState = function getInitState(type, params) {
|
|
12
10
|
switch (type) {
|
|
13
11
|
case EftposEnum.Payo:
|
|
@@ -16,8 +14,6 @@ export var getInitState = function getInitState(type, params) {
|
|
|
16
14
|
return getWindcaveInitState(params);
|
|
17
15
|
case EftposEnum.Tyro:
|
|
18
16
|
return getTyroInitState(params);
|
|
19
|
-
case EftposEnum.Linkly:
|
|
20
|
-
return getLinklyInitState(params);
|
|
21
17
|
default:
|
|
22
18
|
throw new Error('未知的厂商类型');
|
|
23
19
|
}
|
|
@@ -6,7 +6,7 @@ import './index.less';
|
|
|
6
6
|
* @Author: hongbing.wang
|
|
7
7
|
* @Date: 2024-08-20 14:59
|
|
8
8
|
*/
|
|
9
|
-
declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client
|
|
9
|
+
declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client }: PayProps & {
|
|
10
10
|
terminal: {
|
|
11
11
|
network: boolean;
|
|
12
12
|
};
|
|
@@ -10,7 +10,7 @@ import { getPayParams } from "./helper";
|
|
|
10
10
|
import Manual from "./component/manual";
|
|
11
11
|
import Signature from "./component/signature";
|
|
12
12
|
import { StatusEnum, PayRouteEnum, ClientEnum } from "./const";
|
|
13
|
-
import { Payo, Windcave, Tyro
|
|
13
|
+
import { Payo, Windcave, Tyro } from "./manufacturer";
|
|
14
14
|
import { useContextData, useDispatch, updateStatus, backUpProduction, updateComponent, backUpFree, updateState } from "./store";
|
|
15
15
|
import "./index.less";
|
|
16
16
|
|
|
@@ -150,7 +150,7 @@ var Pay = function Pay(_ref) {
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
}, []);
|
|
153
|
-
console.log('
|
|
153
|
+
// console.log("pay2222 = ",'pay 222' , data.render,data.type)
|
|
154
154
|
return /*#__PURE__*/React.createElement(React.Fragment, null, data.render ? /*#__PURE__*/React.createElement("div", {
|
|
155
155
|
className: "pisell-lowcode__eft-pay-box ".concat(className),
|
|
156
156
|
style: data.type === 'step' ? {} : {
|
|
@@ -178,10 +178,6 @@ var Pay = function Pay(_ref) {
|
|
|
178
178
|
onChange: onChange,
|
|
179
179
|
key: data.key,
|
|
180
180
|
formatAmount: formatAmount
|
|
181
|
-
}) : null, data.eftpos === 'linkly' ? /*#__PURE__*/React.createElement(Linkly, {
|
|
182
|
-
key: data.key,
|
|
183
|
-
api: api,
|
|
184
|
-
onChange: onChange
|
|
185
181
|
}) : null) : null, data.type === PayRouteEnum.Unset && Comm ? /*#__PURE__*/React.createElement(Comm, {
|
|
186
182
|
onChange: onChange,
|
|
187
183
|
api: api,
|
|
@@ -265,7 +265,7 @@ export var Action = function Action(_ref2) {
|
|
|
265
265
|
};
|
|
266
266
|
return /*#__PURE__*/React.createElement("div", {
|
|
267
267
|
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
268
|
-
}, client
|
|
268
|
+
}, client !== ClientEnum.Merchant && isShowCancel && /*#__PURE__*/React.createElement(Button, {
|
|
269
269
|
block: true,
|
|
270
270
|
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
271
271
|
onClick: onCancel
|