@pisell/private-materials 3.3.95 → 3.3.97
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/components/Sales/Cart/index.js +5 -1
- package/es/components/Sales/Cart/utils.d.ts +40 -0
- package/es/components/Sales/Cart/utils.js +167 -0
- package/es/components/Sales/Checkout/index.d.ts +4 -0
- package/es/components/Sales/Checkout/index.js +52 -8
- package/es/components/Sales/Checkout/serve.d.ts +13 -0
- package/es/components/Sales/Checkout/serve.js +16 -2
- package/es/components/Sales/Checkout/utils.js +7 -1
- package/es/components/Sales/Summary/index.d.ts +10 -0
- package/es/components/Sales/Summary/index.js +17 -2
- package/es/components/Sales/Summary/serve.d.ts +1 -0
- package/es/components/Sales/Summary/serve.js +6 -0
- package/es/components/Sales/Summary/utils.d.ts +15 -0
- package/es/components/Sales/Summary/utils.js +43 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.js +15 -1
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +27 -7
- package/es/components/appointmentBooking/components/Services/index.js +23 -27
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
- package/es/components/appointmentBooking/deposit/index.js +4 -2
- package/es/components/appointmentBooking/index.js +14 -0
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/payments/model.js +5 -5
- 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 +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/const.d.ts +4 -1
- package/es/components/eftposPay/const.js +3 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/hooks.js +3 -1
- package/es/components/eftposPay/index.js +1 -1
- package/es/components/eftposPay/linkly/const.d.ts +23 -0
- package/es/components/eftposPay/linkly/const.js +82 -0
- package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/hooks/index.js +2 -0
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/es/components/eftposPay/linkly/hooks/normal.js +321 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
- package/es/components/eftposPay/linkly/index.d.ts +2 -0
- package/es/components/eftposPay/linkly/index.js +197 -0
- package/es/components/eftposPay/linkly/service.d.ts +32 -0
- package/es/components/eftposPay/linkly/service.js +81 -0
- package/es/components/eftposPay/manufacturer.d.ts +1 -0
- package/es/components/eftposPay/manufacturer.js +4 -0
- package/es/components/eftposPay/pay.d.ts +1 -1
- package/es/components/eftposPay/pay.js +6 -2
- package/es/components/eftposPay/payo/config.js +30 -3
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -17
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
- package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -1
- package/es/components/eventBooking/locales.d.ts +24 -0
- package/es/components/eventBooking/locales.js +27 -3
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/index.js +5 -4
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +120 -1
- package/es/components/ticketBooking/locales.d.ts +164 -146
- package/es/components/ticketBooking/locales.js +195 -147
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
- package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/es/components/ticketBooking/utils/formatTime.js +144 -0
- package/es/components/wallet/Detail/model.d.ts +1 -13
- 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/model.d.ts +1 -9
- package/es/hooks/useComponents.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/Sales/Cart/index.js +1 -0
- package/lib/components/Sales/Cart/utils.d.ts +40 -0
- package/lib/components/Sales/Cart/utils.js +117 -0
- package/lib/components/Sales/Checkout/index.d.ts +4 -0
- package/lib/components/Sales/Checkout/index.js +39 -7
- package/lib/components/Sales/Checkout/serve.d.ts +13 -0
- package/lib/components/Sales/Checkout/serve.js +7 -2
- package/lib/components/Sales/Checkout/utils.js +2 -0
- package/lib/components/Sales/Summary/index.d.ts +10 -0
- package/lib/components/Sales/Summary/index.js +7 -1
- package/lib/components/Sales/Summary/serve.d.ts +1 -0
- package/lib/components/Sales/Summary/serve.js +32 -0
- package/lib/components/Sales/Summary/utils.d.ts +15 -0
- package/lib/components/Sales/Summary/utils.js +30 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.js +6 -1
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
- package/lib/components/appointmentBooking/components/Services/index.js +6 -11
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
- package/lib/components/appointmentBooking/deposit/index.js +4 -2
- package/lib/components/appointmentBooking/index.js +11 -0
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/voucher/index.js +2 -2
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/model.js +3 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- 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/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/const.d.ts +4 -1
- package/lib/components/eftposPay/const.js +2 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/hooks.js +11 -4
- package/lib/components/eftposPay/index.js +1 -1
- package/lib/components/eftposPay/linkly/const.d.ts +23 -0
- package/lib/components/eftposPay/linkly/const.js +102 -0
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/hooks/index.js +25 -0
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/lib/components/eftposPay/linkly/hooks/normal.js +242 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
- package/lib/components/eftposPay/linkly/index.d.ts +2 -0
- package/lib/components/eftposPay/linkly/index.js +208 -0
- package/lib/components/eftposPay/linkly/service.d.ts +32 -0
- package/lib/components/eftposPay/linkly/service.js +55 -0
- package/lib/components/eftposPay/manufacturer.d.ts +1 -0
- package/lib/components/eftposPay/manufacturer.js +6 -0
- package/lib/components/eftposPay/pay.d.ts +1 -1
- package/lib/components/eftposPay/pay.js +13 -2
- package/lib/components/eftposPay/payo/config.js +22 -2
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +16 -3
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +55 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
- package/lib/components/eventBooking/locales.d.ts +24 -0
- package/lib/components/eventBooking/locales.js +27 -3
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +120 -1
- package/lib/components/ticketBooking/locales.d.ts +164 -146
- package/lib/components/ticketBooking/locales.js +22 -4
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
- package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
- package/lib/components/ticketBooking/utils/formatTime.js +139 -0
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- 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/model.d.ts +1 -9
- package/lib/utils/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -190,6 +190,10 @@ var Layout = () => {
|
|
|
190
190
|
if (isDateSelectedFirst && key === "select-date") return false;
|
|
191
191
|
return key !== "confirm-information";
|
|
192
192
|
}, [isDateSelectedFirst, (_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key]);
|
|
193
|
+
const depositProtocolRequest = (id) => {
|
|
194
|
+
var _a2;
|
|
195
|
+
return (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.getProtocol) == null ? void 0 : _a2.call(appointmentBooking, id);
|
|
196
|
+
};
|
|
193
197
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !isRetailTemplate ? /* @__PURE__ */ import_react.default.createElement(import_Header.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
194
198
|
"div",
|
|
195
199
|
{
|
|
@@ -214,7 +218,8 @@ var Layout = () => {
|
|
|
214
218
|
onConfirm: () => closePolicy(true),
|
|
215
219
|
item: policyParams == null ? void 0 : policyParams.content,
|
|
216
220
|
onChange: () => setLoading(false),
|
|
217
|
-
isHideCheckout: false
|
|
221
|
+
isHideCheckout: false,
|
|
222
|
+
depositProtocolRequest
|
|
218
223
|
}
|
|
219
224
|
) : null);
|
|
220
225
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
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;
|
|
2
8
|
declare const Deposit: () => JSX.Element;
|
|
3
9
|
export default Deposit;
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/appointmentBooking/components/Deposit/index.tsx
|
|
30
30
|
var Deposit_exports = {};
|
|
31
31
|
__export(Deposit_exports, {
|
|
32
|
+
DepositContent: () => DepositContent,
|
|
32
33
|
default: () => Deposit_default
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(Deposit_exports);
|
|
@@ -38,9 +39,13 @@ var import_deposit = __toESM(require("../../deposit"));
|
|
|
38
39
|
var import_context = require("../../context");
|
|
39
40
|
var import_utils = require("@pisell/utils");
|
|
40
41
|
var import_index = require("./index.less");
|
|
41
|
-
var
|
|
42
|
-
const {
|
|
43
|
-
|
|
42
|
+
var DepositContent = (props) => {
|
|
43
|
+
const {
|
|
44
|
+
isAgreeDepositPolicy,
|
|
45
|
+
setIsAgreeDepositPolicy,
|
|
46
|
+
deposit,
|
|
47
|
+
depositProtocolRequest
|
|
48
|
+
} = props;
|
|
44
49
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-deposit-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-deposit-top" }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.appointment.deposit")), /* @__PURE__ */ import_react.default.createElement(
|
|
45
50
|
import_materials.PisellText.Amount,
|
|
46
51
|
{
|
|
@@ -54,8 +59,35 @@ var Deposit = () => {
|
|
|
54
59
|
total: deposit == null ? void 0 : deposit.total,
|
|
55
60
|
protocols: deposit == null ? void 0 : deposit.protocols,
|
|
56
61
|
isAgreePolicy: isAgreeDepositPolicy,
|
|
57
|
-
onChange: (value) => setIsAgreeDepositPolicy(value)
|
|
62
|
+
onChange: (value) => setIsAgreeDepositPolicy(value),
|
|
63
|
+
depositProtocolRequest
|
|
58
64
|
}
|
|
59
65
|
));
|
|
60
66
|
};
|
|
67
|
+
var Deposit = () => {
|
|
68
|
+
const {
|
|
69
|
+
setIsAgreeDepositPolicy,
|
|
70
|
+
isAgreeDepositPolicy,
|
|
71
|
+
summary,
|
|
72
|
+
appointmentBooking
|
|
73
|
+
} = (0, import_context.useAppointmentBookingContext)();
|
|
74
|
+
const { deposit } = summary;
|
|
75
|
+
const depositProtocolRequest = (id) => {
|
|
76
|
+
var _a;
|
|
77
|
+
return (_a = appointmentBooking == null ? void 0 : appointmentBooking.getProtocol) == null ? void 0 : _a.call(appointmentBooking, id);
|
|
78
|
+
};
|
|
79
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
80
|
+
DepositContent,
|
|
81
|
+
{
|
|
82
|
+
isAgreeDepositPolicy: !!isAgreeDepositPolicy,
|
|
83
|
+
setIsAgreeDepositPolicy,
|
|
84
|
+
deposit,
|
|
85
|
+
depositProtocolRequest
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
};
|
|
61
89
|
var Deposit_default = Deposit;
|
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
+
0 && (module.exports = {
|
|
92
|
+
DepositContent
|
|
93
|
+
});
|
|
@@ -74,9 +74,7 @@ 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
|
-
|
|
78
|
-
appointmentBooking.openProductDetail(item.id);
|
|
79
|
-
}
|
|
77
|
+
appointmentBooking.openProductDetail(item.id);
|
|
80
78
|
}
|
|
81
79
|
utils == null ? void 0 : utils.action({
|
|
82
80
|
type: "pisell1.productDetail",
|
|
@@ -86,6 +84,10 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
86
84
|
},
|
|
87
85
|
callback: async (data) => {
|
|
88
86
|
var _a, _b;
|
|
87
|
+
if (data.isCancel) {
|
|
88
|
+
appointmentBooking.closeProductDetail();
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
89
91
|
const product = {
|
|
90
92
|
...data,
|
|
91
93
|
options: (data == null ? void 0 : data.option) || []
|
|
@@ -96,13 +98,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
96
98
|
appointmentBooking.storeProduct(product);
|
|
97
99
|
return;
|
|
98
100
|
}
|
|
99
|
-
if (data == null ? void 0 : data.isCancel) {
|
|
100
|
-
if (type === "session") {
|
|
101
|
-
appointmentBooking.closeProductDetail();
|
|
102
|
-
appointmentBooking.getAvailableDate();
|
|
103
|
-
}
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
101
|
const session = data == null ? void 0 : data.session;
|
|
107
102
|
if (session) {
|
|
108
103
|
const startDate = (0, import_dayjs.default)(session == null ? void 0 : session.start_at).format("YYYY-MM-DD");
|
|
@@ -114,7 +109,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
114
109
|
endTime: `${endDate} ${session == null ? void 0 : session.end_time}`
|
|
115
110
|
}
|
|
116
111
|
});
|
|
117
|
-
appointmentBooking.closeProductDetail();
|
|
118
112
|
await appointmentBooking.getAvailableDate({
|
|
119
113
|
startDate,
|
|
120
114
|
endDate
|
|
@@ -132,6 +126,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
|
|
|
132
126
|
await appointmentBooking.getAvailableDate();
|
|
133
127
|
}
|
|
134
128
|
}
|
|
129
|
+
appointmentBooking.closeProductDetail();
|
|
135
130
|
if (isDateSelectedFirst) {
|
|
136
131
|
const index = (currentStep == null ? void 0 : currentStep.index) + 2;
|
|
137
132
|
if (type === "duration" || appointmentBooking.isCartHasDurationProduct()) {
|
|
@@ -36,7 +36,6 @@ 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");
|
|
40
39
|
var import_index = require("./index.less");
|
|
41
40
|
var DepositModal = (props) => {
|
|
42
41
|
const {
|
|
@@ -45,9 +44,10 @@ var DepositModal = (props) => {
|
|
|
45
44
|
item,
|
|
46
45
|
onChange,
|
|
47
46
|
onConfirm,
|
|
48
|
-
isHideCheckout = true
|
|
47
|
+
isHideCheckout = true,
|
|
48
|
+
depositProtocolRequest
|
|
49
|
+
// 定金协议请求
|
|
49
50
|
} = 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,9 +55,13 @@ 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
|
+
}
|
|
58
62
|
setLoading(true);
|
|
59
63
|
try {
|
|
60
|
-
const { data } = await
|
|
64
|
+
const { data } = await (depositProtocolRequest == null ? void 0 : depositProtocolRequest(id));
|
|
61
65
|
setPolicy(data);
|
|
62
66
|
onChange && onChange(data);
|
|
63
67
|
} catch (error) {
|
|
@@ -48,7 +48,8 @@ var Deposit = (props) => {
|
|
|
48
48
|
title,
|
|
49
49
|
isAgreePolicy = true,
|
|
50
50
|
isShowTitle = true,
|
|
51
|
-
onChange
|
|
51
|
+
onChange,
|
|
52
|
+
depositProtocolRequest
|
|
52
53
|
} = props;
|
|
53
54
|
const context = (0, import_useEngineContext.default)();
|
|
54
55
|
const [visible, setVisible] = (0, import_react.useState)(false);
|
|
@@ -102,7 +103,8 @@ var Deposit = (props) => {
|
|
|
102
103
|
{
|
|
103
104
|
open: visible,
|
|
104
105
|
onCancel: () => setVisible(false),
|
|
105
|
-
item: policyItem
|
|
106
|
+
item: policyItem,
|
|
107
|
+
depositProtocolRequest
|
|
106
108
|
}
|
|
107
109
|
));
|
|
108
110
|
};
|
|
@@ -58,6 +58,17 @@ 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
|
+
}, []);
|
|
61
72
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
62
73
|
"div",
|
|
63
74
|
{
|
|
@@ -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;
|
|
@@ -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_utils2 = require("./utils");
|
|
45
44
|
var import_ahooks = require("ahooks");
|
|
45
|
+
var import_utils2 = require("./utils");
|
|
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
|
-
mixedSort,
|
|
278
277
|
dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
|
|
278
|
+
mixedSort,
|
|
279
279
|
onChange: (val) => {
|
|
280
280
|
const shopDiscount2 = pisellos.getModule("shopDiscount");
|
|
281
281
|
const detail = shopDiscount2.setDiscountSelected({
|
|
@@ -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;
|
|
@@ -79,6 +79,9 @@ var { Provider, Context } = (0, import_utils.miniRedux)({
|
|
|
79
79
|
},
|
|
80
80
|
setActiveCartId(state, payload) {
|
|
81
81
|
state.setGlobalState(payload);
|
|
82
|
+
},
|
|
83
|
+
setAddons(state, payload) {
|
|
84
|
+
state.setGlobalState({ addons: { ...state.addons, ...payload } });
|
|
82
85
|
}
|
|
83
86
|
},
|
|
84
87
|
reducers: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -105,11 +104,4 @@ export declare const walkInData: {
|
|
|
105
104
|
id: number;
|
|
106
105
|
nickname: string;
|
|
107
106
|
};
|
|
108
|
-
export declare const Provider:
|
|
109
|
-
state: FormState;
|
|
110
|
-
} & {
|
|
111
|
-
dispatch: (params: {
|
|
112
|
-
type: string;
|
|
113
|
-
payload: any;
|
|
114
|
-
}) => void;
|
|
115
|
-
}>;
|
|
107
|
+
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;
|
|
@@ -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 | {
|
|
169
169
|
type: string;
|
|
170
170
|
value: number;
|
|
171
|
-
};
|
|
171
|
+
} | "flexible";
|
|
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: "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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PosProps, RouteType } from './const';
|
|
2
3
|
declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
|
|
3
4
|
action: RouteType;
|
|
@@ -5,7 +5,8 @@ export declare enum EftposEnum {
|
|
|
5
5
|
Tyro = "tyro",
|
|
6
6
|
/** 后端支付 - 支付 + 退款 */
|
|
7
7
|
Windcave = "windcave",
|
|
8
|
-
Stripe = "stripe"
|
|
8
|
+
Stripe = "stripe",
|
|
9
|
+
Linkly = "linkly"
|
|
9
10
|
}
|
|
10
11
|
export declare enum StatusEnum {
|
|
11
12
|
Loading = "loading",
|
|
@@ -147,6 +148,8 @@ export declare enum PayStatus {
|
|
|
147
148
|
'Success' = "200",
|
|
148
149
|
/** 未生成交易记录 */
|
|
149
150
|
'NoPay' = "4004",
|
|
151
|
+
/** 配对失效 */
|
|
152
|
+
'PairingFailure' = "606020",
|
|
150
153
|
/** 支付失败 */
|
|
151
154
|
'Unknown' = "701000",
|
|
152
155
|
/** 交易请求超时 */
|
|
@@ -35,6 +35,7 @@ var EftposEnum = /* @__PURE__ */ ((EftposEnum2) => {
|
|
|
35
35
|
EftposEnum2["Tyro"] = "tyro";
|
|
36
36
|
EftposEnum2["Windcave"] = "windcave";
|
|
37
37
|
EftposEnum2["Stripe"] = "stripe";
|
|
38
|
+
EftposEnum2["Linkly"] = "linkly";
|
|
38
39
|
return EftposEnum2;
|
|
39
40
|
})(EftposEnum || {});
|
|
40
41
|
var StatusEnum = /* @__PURE__ */ ((StatusEnum2) => {
|
|
@@ -88,6 +89,7 @@ var PayRouteEnum = /* @__PURE__ */ ((PayRouteEnum2) => {
|
|
|
88
89
|
var PayStatus = /* @__PURE__ */ ((PayStatus2) => {
|
|
89
90
|
PayStatus2["Success"] = "200";
|
|
90
91
|
PayStatus2["NoPay"] = "4004";
|
|
92
|
+
PayStatus2["PairingFailure"] = "606020";
|
|
91
93
|
PayStatus2["Unknown"] = "701000";
|
|
92
94
|
PayStatus2["Timeout"] = "701001";
|
|
93
95
|
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" | "success" | "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<"tyro" | "windcave" | "stripe" | "
|
|
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
|
};
|
|
@@ -128,6 +128,7 @@ var useFail = (index) => {
|
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
const [code] = [`${res.code}`];
|
|
131
|
+
console.log("code---->>>>>>>", code);
|
|
131
132
|
if (code === import_const.PayStatus.Unknown) {
|
|
132
133
|
steps[index].title = import_utils.locales.getText("page.eftpos-pay.text.failed")(
|
|
133
134
|
modeRef.current
|
|
@@ -168,8 +169,12 @@ var useFail = (index) => {
|
|
|
168
169
|
if (isMark) {
|
|
169
170
|
if (clientRef.current === import_const2.ClientEnum.User) {
|
|
170
171
|
steps[index].status = "fail";
|
|
171
|
-
steps[index].title = import_utils.locales.getText(
|
|
172
|
-
|
|
172
|
+
steps[index].title = import_utils.locales.getText(
|
|
173
|
+
"page.eftpos-pay.text.timedout.title"
|
|
174
|
+
);
|
|
175
|
+
steps[index].fail = import_utils.locales.getText(
|
|
176
|
+
"page.eftpos-pay.text.transaction.eftpos.fail.other"
|
|
177
|
+
);
|
|
173
178
|
steps[index].custom = steps[index].custom ? { ...steps[index].custom, isPosNetworkError: true } : { isPosNetworkError: true };
|
|
174
179
|
dispatch((0, import_store.updateSteps)(steps));
|
|
175
180
|
dispatch((0, import_store.updateComponent)("Fail"));
|
|
@@ -310,7 +315,9 @@ ${import_utils.locales.getText(
|
|
|
310
315
|
)}
|
|
311
316
|
${import_utils.locales.getText(
|
|
312
317
|
"page.eftpos-pay.text.transaction.eftpos.fail.if"
|
|
313
|
-
)(modeRef.current)}` : import_utils.locales.getText(
|
|
318
|
+
)(modeRef.current)}` : import_utils.locales.getText(
|
|
319
|
+
"page.eftpos-pay.text.transaction.eftpos.fail.other"
|
|
320
|
+
);
|
|
314
321
|
steps[index].status = "warn";
|
|
315
322
|
steps[index].custom = steps[index].custom ? { ...steps[index].custom, isPosNetworkError: true } : { isPosNetworkError: true };
|
|
316
323
|
dispatch((0, import_store.updateSteps)(steps));
|
|
@@ -359,7 +366,7 @@ ${import_utils.locales.getText(
|
|
|
359
366
|
);
|
|
360
367
|
return;
|
|
361
368
|
}
|
|
362
|
-
if (code === import_const.PayStatus.UserConfigError) {
|
|
369
|
+
if (code === import_const.PayStatus.UserConfigError || code === import_const.PayStatus.PairingFailure) {
|
|
363
370
|
steps[index].title = import_utils.locales.getText(
|
|
364
371
|
"page.eftpos-pay.text.transaction.user.config.title"
|
|
365
372
|
);
|
|
@@ -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("初始化 ........112218017777");
|
|
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)(() => {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { State } from '../store';
|
|
2
|
+
import { ModeEnum } from '../const';
|
|
3
|
+
export declare const getStep: (mode?: ModeEnum) => State['steps'];
|
|
4
|
+
declare const _default: (params: any) => State;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare enum EVisibleButtonType {
|
|
7
|
+
/** 取消按钮 */
|
|
8
|
+
CancelButton = "CancelButton",
|
|
9
|
+
/** 等待按钮 */
|
|
10
|
+
WaitButton = "WaitButton"
|
|
11
|
+
}
|
|
12
|
+
export declare enum LinklyActionStatus {
|
|
13
|
+
/** 空 */
|
|
14
|
+
Empty = "Empty",
|
|
15
|
+
/** 取消 */
|
|
16
|
+
Cancel = "Cancel",
|
|
17
|
+
/** 取消中 */
|
|
18
|
+
CancelWaiting = "CancelWaiting",
|
|
19
|
+
/** 签名 */
|
|
20
|
+
Signature = "Signature",
|
|
21
|
+
/** 签名等待中 */
|
|
22
|
+
SignatureWaiting = "SignatureWaiting"
|
|
23
|
+
}
|