@pisell/private-materials 3.2.21 → 3.2.23
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 +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/assets/guests.svg +1 -0
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +83 -104
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +36 -17
- package/es/components/appointmentBooking/components/Cart/Item/index.less +7 -4
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.js +11 -11
- package/es/components/appointmentBooking/components/Date/index.js +49 -32
- package/es/components/appointmentBooking/components/Date/index.less +5 -0
- package/es/components/appointmentBooking/components/Guest/index.js +8 -21
- package/es/components/appointmentBooking/components/Header/index.js +44 -7
- package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Resource/index.js +28 -20
- package/es/components/appointmentBooking/components/Resource/index.less +5 -0
- package/es/components/appointmentBooking/components/Services/index.js +20 -9
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +47 -32
- package/es/components/appointmentBooking/components/TimeSlicing/index.less +4 -0
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +238 -0
- package/es/components/appointmentBooking/components/Voucher/index.less +26 -0
- package/es/components/appointmentBooking/context.d.ts +2 -0
- package/es/components/appointmentBooking/context.js +7 -1
- package/es/components/appointmentBooking/hooks.d.ts +46 -9
- package/es/components/appointmentBooking/hooks.js +162 -121
- package/es/components/appointmentBooking/index.js +12 -7
- package/es/components/appointmentBooking/locales.d.ts +57 -0
- package/es/components/appointmentBooking/locales.js +60 -3
- package/es/components/appointmentBooking/utils.d.ts +19 -0
- package/es/components/appointmentBooking/utils.js +71 -2
- package/es/components/booking/addons/index.js +1 -0
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +5 -1
- package/es/components/booking/components/footer/utils.js +18 -2
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/components/voucher/index.js +238 -0
- package/es/components/booking/components/voucher/index.less +88 -0
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +47 -0
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +115 -0
- package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +52 -0
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/es/components/booking/hooks/useIsBooking4Shop.js +10 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/editService/index.js +9 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/locales.d.ts +18 -0
- package/es/components/booking/locales.js +21 -3
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- 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/payments/index.js +1 -0
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +6 -6
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +3 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.js +3 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.js +4 -3
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/wallet/Detail/index.js +20 -14
- package/es/components/wallet/Voucher/index.js +1 -0
- package/es/components/wallet/index.js +15 -1
- package/es/components/wallet/locales.d.ts +3 -0
- package/es/components/wallet/locales.js +3 -0
- package/es/components/wallet/model.d.ts +1 -1
- package/es/components/wallet/utils/formatUtils.js +1 -1
- package/es/components/walletList/index.js +5 -1
- package/lib/components/appointmentBooking/assets/guests.svg +1 -0
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +37 -27
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +24 -11
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +7 -4
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.js +3 -5
- package/lib/components/appointmentBooking/components/Date/index.js +53 -47
- package/lib/components/appointmentBooking/components/Date/index.less +5 -0
- package/lib/components/appointmentBooking/components/Guest/index.js +6 -5
- package/lib/components/appointmentBooking/components/Header/index.js +25 -3
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +16 -17
- package/lib/components/appointmentBooking/components/Resource/index.less +5 -0
- package/lib/components/appointmentBooking/components/Services/index.js +21 -2
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +23 -21
- package/lib/components/appointmentBooking/components/TimeSlicing/index.less +4 -0
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +221 -0
- package/lib/components/appointmentBooking/components/Voucher/index.less +26 -0
- package/lib/components/appointmentBooking/context.d.ts +2 -0
- package/lib/components/appointmentBooking/context.js +4 -1
- package/lib/components/appointmentBooking/hooks.d.ts +46 -9
- package/lib/components/appointmentBooking/hooks.js +36 -43
- package/lib/components/appointmentBooking/index.js +11 -7
- package/lib/components/appointmentBooking/locales.d.ts +57 -0
- package/lib/components/appointmentBooking/locales.js +60 -3
- package/lib/components/appointmentBooking/utils.d.ts +19 -0
- package/lib/components/appointmentBooking/utils.js +42 -2
- package/lib/components/booking/addons/index.js +1 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +2 -1
- package/lib/components/booking/components/footer/utils.js +4 -1
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/components/voucher/index.js +222 -0
- package/lib/components/booking/components/voucher/index.less +88 -0
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +47 -0
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +109 -0
- package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +52 -0
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/lib/components/booking/hooks/useIsBooking4Shop.js +51 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/index.js +8 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/locales.d.ts +18 -0
- package/lib/components/booking/locales.js +21 -3
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- 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/payments/index.js +1 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +6 -6
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +3 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.js +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.js +3 -2
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/wallet/Detail/index.js +6 -1
- package/lib/components/wallet/Voucher/index.js +1 -0
- package/lib/components/wallet/index.js +15 -1
- package/lib/components/wallet/locales.d.ts +3 -0
- package/lib/components/wallet/locales.js +3 -0
- package/lib/components/wallet/model.d.ts +1 -1
- package/lib/components/wallet/utils/formatUtils.js +1 -1
- package/lib/components/walletList/index.js +6 -2
- package/package.json +3 -3
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/booking/components/voucher/pisellGoodPassCard/index.tsx
|
|
30
|
+
var pisellGoodPassCard_exports = {};
|
|
31
|
+
__export(pisellGoodPassCard_exports, {
|
|
32
|
+
default: () => pisellGoodPassCard_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellGoodPassCard_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_materials = require("@pisell/materials");
|
|
39
|
+
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var clsPrefix = "pisell-good-pass-card";
|
|
42
|
+
var index = (props) => {
|
|
43
|
+
var _a;
|
|
44
|
+
const context = (0, import_useEngineContext.default)();
|
|
45
|
+
const { translationShop } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
46
|
+
const { dataSource = [], onChange, style = {} } = props;
|
|
47
|
+
const [showModal, setShowModal] = (0, import_react.useState)(false);
|
|
48
|
+
console.log("pisell good card datasource", dataSource);
|
|
49
|
+
const handleChange = (newValue) => {
|
|
50
|
+
if (onChange) {
|
|
51
|
+
onChange(newValue);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const handleItemChange = (item, checked) => {
|
|
55
|
+
handleChange({
|
|
56
|
+
id: item.id,
|
|
57
|
+
isSelected: checked
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const renderVoucherContent = (item) => {
|
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement("span", null, "Save ", /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: item.savedAmount }));
|
|
62
|
+
};
|
|
63
|
+
const renderActionElement = (item) => {
|
|
64
|
+
const isChecked = item.isSelected;
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
import_antd.Checkbox,
|
|
67
|
+
{
|
|
68
|
+
disabled: item.isDisabled,
|
|
69
|
+
style: { marginLeft: 8 },
|
|
70
|
+
checked: isChecked,
|
|
71
|
+
onChange: (e) => handleItemChange(item, e.target.checked)
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
const renderVoucherItem = (item) => {
|
|
76
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: item.id, className: `${clsPrefix}-voucher-item` }, /* @__PURE__ */ import_react.default.createElement("div", { className: "item-title" }, translationShop(item.format_title)), /* @__PURE__ */ import_react.default.createElement("div", { className: "item-content" }, renderVoucherContent(item), renderActionElement(item)));
|
|
77
|
+
};
|
|
78
|
+
const renderModal = () => {
|
|
79
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
80
|
+
import_materials.PisellModal,
|
|
81
|
+
{
|
|
82
|
+
title: "Vouchers",
|
|
83
|
+
footer: null,
|
|
84
|
+
open: showModal,
|
|
85
|
+
onCancel: () => setShowModal(false),
|
|
86
|
+
className: `${clsPrefix}-all-items-modal`
|
|
87
|
+
},
|
|
88
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "10px 0" } }, dataSource.map(renderVoucherItem))
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
const renderMixedMode = () => {
|
|
92
|
+
const list = dataSource.length > 3 ? dataSource.slice(0, 3) : dataSource;
|
|
93
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${clsPrefix}-header` }, /* @__PURE__ */ import_react.default.createElement("div", null, import_utils.locales.getText("pisell2.text.goodpass.product-vouchers")), /* @__PURE__ */ import_react.default.createElement(import_antd.Typography.Text, { underline: true, onClick: () => setShowModal(true) }, import_utils.locales.getText("pisell2.text.goodpass.view-more"))), /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 4 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${clsPrefix}-body` }, list.map(renderVoucherItem)));
|
|
94
|
+
};
|
|
95
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderModal(), /* @__PURE__ */ import_react.default.createElement(
|
|
96
|
+
import_materials.PisellCard,
|
|
97
|
+
{
|
|
98
|
+
padding: 8,
|
|
99
|
+
borderRadius: 8,
|
|
100
|
+
style: {
|
|
101
|
+
width: 378,
|
|
102
|
+
...style
|
|
103
|
+
},
|
|
104
|
+
className: clsPrefix
|
|
105
|
+
},
|
|
106
|
+
renderMixedMode()
|
|
107
|
+
));
|
|
108
|
+
};
|
|
109
|
+
var pisellGoodPassCard_default = index;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.pisell-good-pass-card-all-items-modal,
|
|
2
|
+
.pisell-good-pass-card {
|
|
3
|
+
.pisell-good-pass-card-header,
|
|
4
|
+
.pisell-good-pass-card-group-header {
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
color: var(--Gray-900, #101828);
|
|
9
|
+
text-align: center;
|
|
10
|
+
font-family: Inter;
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
line-height: 20px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pisell-good-pass-card-voucher-item {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
height: 22px;
|
|
22
|
+
|
|
23
|
+
.item-title {
|
|
24
|
+
color: var(--Gray-500, #667085);
|
|
25
|
+
text-align: center;
|
|
26
|
+
font-family: Inter;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
font-style: normal;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
line-height: 20px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.item-content {
|
|
34
|
+
color: var(--, #8157d5);
|
|
35
|
+
font-family: Inter;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
font-style: normal;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
line-height: 20px;
|
|
40
|
+
|
|
41
|
+
.add-btn {
|
|
42
|
+
color: var(--, #8157d5);
|
|
43
|
+
text-align: center;
|
|
44
|
+
font-family: Inter;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
font-style: normal;
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
line-height: 20px; /* 142.857% */
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsBooking4Shop: (state: any) => boolean;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/booking/hooks/useIsBooking4Shop.tsx
|
|
30
|
+
var useIsBooking4Shop_exports = {};
|
|
31
|
+
__export(useIsBooking4Shop_exports, {
|
|
32
|
+
useIsBooking4Shop: () => useIsBooking4Shop
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(useIsBooking4Shop_exports);
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
37
|
+
var import_utils = require("../info/utils");
|
|
38
|
+
var useIsBooking4Shop = (state) => {
|
|
39
|
+
const context = (0, import_useEngineContext.default)();
|
|
40
|
+
return (0, import_react.useMemo)(() => {
|
|
41
|
+
var _a, _b, _c, _d, _e;
|
|
42
|
+
return (0, import_utils.isBooking4Shop)(
|
|
43
|
+
(_e = (_d = (_c = (_b = (_a = context.appHelper.utils.store) == null ? void 0 : _a.getState) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.global) == null ? void 0 : _d.globalConfig) == null ? void 0 : _e.id,
|
|
44
|
+
state.renderType
|
|
45
|
+
);
|
|
46
|
+
}, [state.renderType]);
|
|
47
|
+
};
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
useIsBooking4Shop
|
|
51
|
+
});
|
|
@@ -99,7 +99,7 @@ var isBooking4Shop = (shopId, renderType) => {
|
|
|
99
99
|
if (renderType === "eventBooking") {
|
|
100
100
|
return false;
|
|
101
101
|
}
|
|
102
|
-
const booking4Shops = [
|
|
102
|
+
const booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586];
|
|
103
103
|
return booking4Shops.includes(shopId);
|
|
104
104
|
};
|
|
105
105
|
function generateDateRange(start, end) {
|
|
@@ -59,6 +59,7 @@ var Info = (_, ref) => {
|
|
|
59
59
|
const useDuration = import_antd.Form.useWatch("duration", form);
|
|
60
60
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
61
61
|
const resourcesRef = (0, import_react.useRef)(null);
|
|
62
|
+
const isChangeTotal = (0, import_react.useRef)(false);
|
|
62
63
|
const getCurrentCacheItem = (_cacheItem) => {
|
|
63
64
|
let values = form.getFieldsValue();
|
|
64
65
|
let _item = _cacheItem || state.service.cacheItem;
|
|
@@ -184,6 +185,9 @@ var Info = (_, ref) => {
|
|
|
184
185
|
if (!_list.some((d) => d._id === _id)) {
|
|
185
186
|
_list.push(_item);
|
|
186
187
|
} else {
|
|
188
|
+
if (isChangeTotal.current) {
|
|
189
|
+
delete _item.discount_list;
|
|
190
|
+
}
|
|
187
191
|
_list = _list.map((d) => d._id === _id ? { ..._item, new: 0 } : d);
|
|
188
192
|
}
|
|
189
193
|
(0, import_utils3.deleteCacheParams)();
|
|
@@ -353,6 +357,9 @@ var Info = (_, ref) => {
|
|
|
353
357
|
init: setEditData
|
|
354
358
|
};
|
|
355
359
|
});
|
|
360
|
+
const handleTotalChange = (number) => {
|
|
361
|
+
isChangeTotal.current = true;
|
|
362
|
+
};
|
|
356
363
|
console.log("state.service.value", state.service.value);
|
|
357
364
|
const SelectTime = (_n = window.BaseMaterials) == null ? void 0 : _n.SelectTime;
|
|
358
365
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -403,6 +410,7 @@ var Info = (_, ref) => {
|
|
|
403
410
|
min: 0,
|
|
404
411
|
precision: 2,
|
|
405
412
|
prefix: state.amountSymbol,
|
|
413
|
+
onChange: handleTotalChange,
|
|
406
414
|
disabled: state.channelDisabledEdit,
|
|
407
415
|
originValue: ((_x = (_w = state.service.cacheItem) == null ? void 0 : _w._extend) == null ? void 0 : _x.origin_total) || 0,
|
|
408
416
|
placeholder: ((_z = (_y = state.service.cacheItem) == null ? void 0 : _y._extend) == null ? void 0 : _z.origin_total) || "0"
|
|
@@ -240,6 +240,12 @@ declare const _default: {
|
|
|
240
240
|
'pisell2.text.change.pet.cancel': string;
|
|
241
241
|
'pisell2.text.booking-list': string;
|
|
242
242
|
'pisell2.text.edit-booking': string;
|
|
243
|
+
'pisell2.text.goodpass': string;
|
|
244
|
+
'pisell2.text.goodpass.product-vouchers': string;
|
|
245
|
+
'pisell2.text.goodpass.view-more': string;
|
|
246
|
+
'pisell2.text.goodpass.code': string;
|
|
247
|
+
'pisell2.text.goodpass.enter-code': string;
|
|
248
|
+
'pisell2.text.goodpass.code-invalid': string;
|
|
243
249
|
};
|
|
244
250
|
'zh-CN': {
|
|
245
251
|
'pisell2.text.refunded-amount': string;
|
|
@@ -482,6 +488,12 @@ declare const _default: {
|
|
|
482
488
|
'pisell2.text.change.pet.cancel': string;
|
|
483
489
|
'pisell2.text.booking-list': string;
|
|
484
490
|
'pisell2.text.edit-booking': string;
|
|
491
|
+
'pisell2.text.goodpass': string;
|
|
492
|
+
'pisell2.text.goodpass.product-vouchers': string;
|
|
493
|
+
'pisell2.text.goodpass.view-more': string;
|
|
494
|
+
'pisell2.text.goodpass.code': string;
|
|
495
|
+
'pisell2.text.goodpass.enter-code': string;
|
|
496
|
+
'pisell2.text.goodpass.code-invalid': string;
|
|
485
497
|
};
|
|
486
498
|
'zh-HK': {
|
|
487
499
|
'pisell2.text.refunded-amount': string;
|
|
@@ -724,6 +736,12 @@ declare const _default: {
|
|
|
724
736
|
'pisell2.text.change.pet.cancel': string;
|
|
725
737
|
'pisell2.text.booking-list': string;
|
|
726
738
|
'pisell2.text.edit-booking': string;
|
|
739
|
+
'pisell2.text.goodpass': string;
|
|
740
|
+
'pisell2.text.goodpass.product-vouchers': string;
|
|
741
|
+
'pisell2.text.goodpass.view-more': string;
|
|
742
|
+
'pisell2.text.goodpass.code': string;
|
|
743
|
+
'pisell2.text.goodpass.enter-code': string;
|
|
744
|
+
'pisell2.text.goodpass.code-invalid': string;
|
|
727
745
|
};
|
|
728
746
|
};
|
|
729
747
|
export default _default;
|
|
@@ -295,7 +295,13 @@ var locales_default = {
|
|
|
295
295
|
"pisell2.text.change.pet.confirm": "Keep (Add to open items)",
|
|
296
296
|
"pisell2.text.change.pet.cancel": "Discard (Clear items)",
|
|
297
297
|
"pisell2.text.booking-list": "List",
|
|
298
|
-
"pisell2.text.edit-booking": "Edit"
|
|
298
|
+
"pisell2.text.edit-booking": "Edit",
|
|
299
|
+
"pisell2.text.goodpass": "GoodPass",
|
|
300
|
+
"pisell2.text.goodpass.product-vouchers": "Product Vouchers",
|
|
301
|
+
"pisell2.text.goodpass.view-more": "View More",
|
|
302
|
+
"pisell2.text.goodpass.code": "Code",
|
|
303
|
+
"pisell2.text.goodpass.enter-code": "Enter Code",
|
|
304
|
+
"pisell2.text.goodpass.code-invalid": "Current code is invalid"
|
|
299
305
|
},
|
|
300
306
|
"zh-CN": {
|
|
301
307
|
"pisell2.text.refunded-amount": "已退金额",
|
|
@@ -563,7 +569,13 @@ var locales_default = {
|
|
|
563
569
|
"pisell2.text.change.pet.confirm": "保留(添加到未分配中)",
|
|
564
570
|
"pisell2.text.change.pet.cancel": "不保留(清空商品)",
|
|
565
571
|
"pisell2.text.booking-list": "列表",
|
|
566
|
-
"pisell2.text.edit-booking": "编辑"
|
|
572
|
+
"pisell2.text.edit-booking": "编辑",
|
|
573
|
+
"pisell2.text.goodpass": "商品券",
|
|
574
|
+
"pisell2.text.goodpass.product-vouchers": "商品兑换券",
|
|
575
|
+
"pisell2.text.goodpass.view-more": "查看更多",
|
|
576
|
+
"pisell2.text.goodpass.code": "券码",
|
|
577
|
+
"pisell2.text.goodpass.enter-code": "请输入券码",
|
|
578
|
+
"pisell2.text.goodpass.code-invalid": "当前券码不可用"
|
|
567
579
|
},
|
|
568
580
|
"zh-HK": {
|
|
569
581
|
"pisell2.text.refunded-amount": "已退金額",
|
|
@@ -831,6 +843,12 @@ var locales_default = {
|
|
|
831
843
|
"pisell2.text.change.pet.confirm": "保留(添加到未分配中)",
|
|
832
844
|
"pisell2.text.change.pet.cancel": "不保留(清空商品)",
|
|
833
845
|
"pisell2.text.booking-list": "列表",
|
|
834
|
-
"pisell2.text.edit-booking": "編輯"
|
|
846
|
+
"pisell2.text.edit-booking": "編輯",
|
|
847
|
+
"pisell2.text.goodpass": "商品券",
|
|
848
|
+
"pisell2.text.goodpass.product-vouchers": "商品兌換券",
|
|
849
|
+
"pisell2.text.goodpass.view-more": "查看更多",
|
|
850
|
+
"pisell2.text.goodpass.code": "券碼",
|
|
851
|
+
"pisell2.text.goodpass.enter-code": "請輸入券碼",
|
|
852
|
+
"pisell2.text.goodpass.code-invalid": "當前券碼不可用"
|
|
835
853
|
}
|
|
836
854
|
};
|
|
@@ -112,7 +112,7 @@ var Payments = (0, import_model.Provider)((props) => {
|
|
|
112
112
|
import_tabPane.default,
|
|
113
113
|
{
|
|
114
114
|
header: import_utils.locales.getText("pisell2.text.payments"),
|
|
115
|
-
footer: state.bookingId && /* @__PURE__ */ import_react.default.createElement(import_footer.default, { state, source: "payment" }),
|
|
115
|
+
footer: state.bookingId && /* @__PURE__ */ import_react.default.createElement(import_footer.default, { state, dispatch, source: "payment" }),
|
|
116
116
|
loading: loading && state.bookingId
|
|
117
117
|
},
|
|
118
118
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "payment-customer-pay-title" }, import_utils.locales.getText("pisell2.text.customerpay")),
|
|
@@ -162,10 +162,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
162
162
|
export declare const getDuration: (duration: number | {
|
|
163
163
|
type: string;
|
|
164
164
|
value: number;
|
|
165
|
-
}) => number | {
|
|
165
|
+
}) => number | "flexible" | {
|
|
166
166
|
type: string;
|
|
167
167
|
value: number;
|
|
168
|
-
}
|
|
168
|
+
};
|
|
169
169
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
170
170
|
export declare const getIsEdit: (state: any) => boolean;
|
|
171
171
|
export {};
|
|
@@ -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<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
175
|
type: EActionTypes;
|
|
176
176
|
payload: {
|
|
177
|
-
status: "
|
|
177
|
+
status: "loading" | "success" | "warn" | "fail" | "question";
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
295
|
name?: string | undefined;
|
|
296
296
|
symbol?: string | undefined;
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "
|
|
298
|
+
mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "stripe" | "
|
|
301
|
-
action?: "amount" | "
|
|
300
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | undefined;
|
|
301
|
+
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
305
305
|
subTitle?: string | undefined;
|
|
306
|
-
type?: "
|
|
306
|
+
type?: "step" | "unset" | undefined;
|
|
307
307
|
render?: boolean | undefined;
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|
|
310
310
|
form?: string | undefined;
|
|
311
|
-
status?: "
|
|
311
|
+
status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
312
|
warn?: string | undefined;
|
|
313
313
|
steps?: {
|
|
314
314
|
/** 用于重置当前步骤 */
|
|
@@ -80,6 +80,7 @@ var Product = (props) => {
|
|
|
80
80
|
onNote: (e) => handleChange(e, "note", { note: e.note }),
|
|
81
81
|
onLike: (e) => handleChange(e, "like", { like_status: e.like_status }),
|
|
82
82
|
onCard: (e) => handleChange == null ? void 0 : handleChange(e, "view"),
|
|
83
|
+
onChangeResource: (e) => handleChange(item, "change_resource", e),
|
|
83
84
|
...productParams
|
|
84
85
|
}
|
|
85
86
|
);
|
|
@@ -39,7 +39,8 @@ var import_useContext = require("./useContext");
|
|
|
39
39
|
var import_utils = require("@pisell/utils");
|
|
40
40
|
var useClearCart = (key) => {
|
|
41
41
|
const { state, updateState, onChange } = (0, import_useContext.useContext)();
|
|
42
|
-
const { isProductList, disabledEdit, holders } = state;
|
|
42
|
+
const { isProductList, disabledEdit, holders, isHideClearCart } = state;
|
|
43
|
+
console.log(state, "wh978968");
|
|
43
44
|
const handleClear = () => {
|
|
44
45
|
let products = [...(state == null ? void 0 : state.products) || []];
|
|
45
46
|
if (typeof key === "undefined") {
|
|
@@ -51,7 +52,7 @@ var useClearCart = (key) => {
|
|
|
51
52
|
products = products.filter((item) => (item == null ? void 0 : item.holder_id) !== key);
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
|
-
return !disabledEdit && (holders == null ? void 0 : holders.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
55
|
+
return !disabledEdit && (holders == null ? void 0 : holders.length) > 0 && !isHideClearCart ? /* @__PURE__ */ import_react.default.createElement(
|
|
55
56
|
"span",
|
|
56
57
|
{
|
|
57
58
|
className: (0, import_classnames.default)("pisell-lowcode__shopping-cart-clear-btn", {
|
|
@@ -67,7 +67,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
67
67
|
expire_date = "",
|
|
68
68
|
product = {}
|
|
69
69
|
} = detail;
|
|
70
|
-
const { description = "" } = product;
|
|
70
|
+
const { description = "" } = product || {};
|
|
71
71
|
const context = (0, import_useEngineContext.default)();
|
|
72
72
|
const utils = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
73
73
|
const dvaStore = (_c = (_b = utils == null ? void 0 : utils.getStore) == null ? void 0 : _b.call(utils)) == null ? void 0 : _c.getState();
|
|
@@ -145,6 +145,11 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
|
145
145
|
label: import_utils.locales.getText("page.wallet.points"),
|
|
146
146
|
value: balance ? `${Number(balance)}` : ""
|
|
147
147
|
});
|
|
148
|
+
} else if (tag === "good_pass") {
|
|
149
|
+
data.splice(2, 0, {
|
|
150
|
+
label: import_utils.locales.getText("page.wallet.goodPass"),
|
|
151
|
+
value: balance ? `${Number(balance)}` : ""
|
|
152
|
+
});
|
|
148
153
|
} else {
|
|
149
154
|
data.splice(2, 0, {
|
|
150
155
|
label: import_utils.locales.getText("page.wallet.balance"),
|