@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,115 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import React, { useState } from 'react';
|
|
14
|
+
import { Checkbox, Divider, Typography } from 'antd';
|
|
15
|
+
import { locales } from '@pisell/utils';
|
|
16
|
+
import { PisellText, PisellCard, PisellModal } from '@pisell/materials';
|
|
17
|
+
import useEngineContext from "../../../../../hooks/useEngineContext";
|
|
18
|
+
import "./index.less";
|
|
19
|
+
var clsPrefix = 'pisell-good-pass-card';
|
|
20
|
+
var index = function index(props) {
|
|
21
|
+
var _context$appHelper;
|
|
22
|
+
var context = useEngineContext();
|
|
23
|
+
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
|
24
|
+
translationShop = _context$appHelper$ut.translationShop;
|
|
25
|
+
var _props$dataSource = props.dataSource,
|
|
26
|
+
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
|
|
27
|
+
onChange = props.onChange,
|
|
28
|
+
_props$style = props.style,
|
|
29
|
+
style = _props$style === void 0 ? {} : _props$style;
|
|
30
|
+
var _useState = useState(false),
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
+
showModal = _useState2[0],
|
|
33
|
+
setShowModal = _useState2[1];
|
|
34
|
+
console.log('pisell good card datasource', dataSource);
|
|
35
|
+
var handleChange = function handleChange(newValue) {
|
|
36
|
+
if (onChange) {
|
|
37
|
+
onChange(newValue);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var handleItemChange = function handleItemChange(item, checked) {
|
|
41
|
+
handleChange({
|
|
42
|
+
id: item.id,
|
|
43
|
+
isSelected: checked
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
var renderVoucherContent = function renderVoucherContent(item) {
|
|
47
|
+
return /*#__PURE__*/React.createElement("span", null, "Save ", /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
48
|
+
value: item.savedAmount
|
|
49
|
+
}));
|
|
50
|
+
};
|
|
51
|
+
var renderActionElement = function renderActionElement(item) {
|
|
52
|
+
var isChecked = item.isSelected;
|
|
53
|
+
return /*#__PURE__*/React.createElement(Checkbox, {
|
|
54
|
+
disabled: item.isDisabled,
|
|
55
|
+
style: {
|
|
56
|
+
marginLeft: 8
|
|
57
|
+
},
|
|
58
|
+
checked: isChecked,
|
|
59
|
+
onChange: function onChange(e) {
|
|
60
|
+
return handleItemChange(item, e.target.checked);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
var renderVoucherItem = function renderVoucherItem(item) {
|
|
65
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
key: item.id,
|
|
67
|
+
className: "".concat(clsPrefix, "-voucher-item")
|
|
68
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
className: "item-title"
|
|
70
|
+
}, translationShop(item.format_title)), /*#__PURE__*/React.createElement("div", {
|
|
71
|
+
className: "item-content"
|
|
72
|
+
}, renderVoucherContent(item), renderActionElement(item)));
|
|
73
|
+
};
|
|
74
|
+
var renderModal = function renderModal() {
|
|
75
|
+
return /*#__PURE__*/React.createElement(PisellModal, {
|
|
76
|
+
title: 'Vouchers',
|
|
77
|
+
footer: null,
|
|
78
|
+
open: showModal,
|
|
79
|
+
onCancel: function onCancel() {
|
|
80
|
+
return setShowModal(false);
|
|
81
|
+
},
|
|
82
|
+
className: "".concat(clsPrefix, "-all-items-modal")
|
|
83
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
style: {
|
|
85
|
+
padding: '10px 0'
|
|
86
|
+
}
|
|
87
|
+
}, dataSource.map(renderVoucherItem)));
|
|
88
|
+
};
|
|
89
|
+
var renderMixedMode = function renderMixedMode() {
|
|
90
|
+
var list = dataSource.length > 3 ? dataSource.slice(0, 3) : dataSource;
|
|
91
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: "".concat(clsPrefix, "-header")
|
|
93
|
+
}, /*#__PURE__*/React.createElement("div", null, locales.getText('pisell2.text.goodpass.product-vouchers')), /*#__PURE__*/React.createElement(Typography.Text, {
|
|
94
|
+
underline: true,
|
|
95
|
+
onClick: function onClick() {
|
|
96
|
+
return setShowModal(true);
|
|
97
|
+
}
|
|
98
|
+
}, locales.getText('pisell2.text.goodpass.view-more'))), /*#__PURE__*/React.createElement(Divider, {
|
|
99
|
+
style: {
|
|
100
|
+
margin: 4
|
|
101
|
+
}
|
|
102
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
className: "".concat(clsPrefix, "-body")
|
|
104
|
+
}, list.map(renderVoucherItem)));
|
|
105
|
+
};
|
|
106
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, renderModal(), /*#__PURE__*/React.createElement(PisellCard, {
|
|
107
|
+
padding: 8,
|
|
108
|
+
borderRadius: 8,
|
|
109
|
+
style: _objectSpread({
|
|
110
|
+
width: 378
|
|
111
|
+
}, style),
|
|
112
|
+
className: clsPrefix
|
|
113
|
+
}, renderMixedMode()));
|
|
114
|
+
};
|
|
115
|
+
export 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,10 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
3
|
+
import { isBooking4Shop } from "../info/utils";
|
|
4
|
+
export var useIsBooking4Shop = function useIsBooking4Shop(state) {
|
|
5
|
+
var context = useEngineContext();
|
|
6
|
+
return useMemo(function () {
|
|
7
|
+
var _context$appHelper$ut, _context$appHelper$ut2;
|
|
8
|
+
return isBooking4Shop((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.global) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.globalConfig) === null || _context$appHelper$ut2 === void 0 ? void 0 : _context$appHelper$ut2.id, state.renderType);
|
|
9
|
+
}, [state.renderType]);
|
|
10
|
+
};
|
|
@@ -93,7 +93,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
|
|
|
93
93
|
if (renderType === 'eventBooking') {
|
|
94
94
|
return false;
|
|
95
95
|
}
|
|
96
|
-
var booking4Shops = [
|
|
96
|
+
var booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586];
|
|
97
97
|
return booking4Shops.includes(shopId);
|
|
98
98
|
};
|
|
99
99
|
function generateDateRange(start, end) {
|
|
@@ -47,6 +47,7 @@ var Info = function Info(_, ref) {
|
|
|
47
47
|
state = _useContext.state,
|
|
48
48
|
dispatch = _useContext.dispatch;
|
|
49
49
|
var resourcesRef = useRef(null);
|
|
50
|
+
var isChangeTotal = useRef(false);
|
|
50
51
|
|
|
51
52
|
// 当前商品信息+ 表单信息
|
|
52
53
|
var getCurrentCacheItem = function getCurrentCacheItem(_cacheItem) {
|
|
@@ -241,6 +242,10 @@ var Info = function Info(_, ref) {
|
|
|
241
242
|
})) {
|
|
242
243
|
_list.push(_item);
|
|
243
244
|
} else {
|
|
245
|
+
// 手动改价时移除优惠券使用
|
|
246
|
+
if (isChangeTotal.current) {
|
|
247
|
+
delete _item.discount_list;
|
|
248
|
+
}
|
|
244
249
|
_list = _list.map(function (d) {
|
|
245
250
|
return d._id === _id ? _objectSpread(_objectSpread({}, _item), {}, {
|
|
246
251
|
new: 0
|
|
@@ -466,6 +471,9 @@ var Info = function Info(_, ref) {
|
|
|
466
471
|
init: setEditData
|
|
467
472
|
};
|
|
468
473
|
});
|
|
474
|
+
var handleTotalChange = function handleTotalChange(number) {
|
|
475
|
+
isChangeTotal.current = true;
|
|
476
|
+
};
|
|
469
477
|
console.log('state.service.value', state.service.value);
|
|
470
478
|
var SelectTime = (_window$BaseMaterials = window.BaseMaterials) === null || _window$BaseMaterials === void 0 ? void 0 : _window$BaseMaterials.SelectTime;
|
|
471
479
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
|
|
@@ -535,6 +543,7 @@ var Info = function Info(_, ref) {
|
|
|
535
543
|
min: 0,
|
|
536
544
|
precision: 2,
|
|
537
545
|
prefix: state.amountSymbol,
|
|
546
|
+
onChange: handleTotalChange,
|
|
538
547
|
disabled: state.channelDisabledEdit,
|
|
539
548
|
originValue: ((_state$service$cacheI9 = state.service.cacheItem) === null || _state$service$cacheI9 === void 0 || (_state$service$cacheI9 = _state$service$cacheI9._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total) || 0,
|
|
540
549
|
placeholder: ((_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 || (_state$service$cacheI10 = _state$service$cacheI10._extend) === null || _state$service$cacheI10 === void 0 ? void 0 : _state$service$cacheI10.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;
|
|
@@ -276,7 +276,13 @@ export default {
|
|
|
276
276
|
'pisell2.text.change.pet.confirm': 'Keep (Add to open items)',
|
|
277
277
|
'pisell2.text.change.pet.cancel': 'Discard (Clear items)',
|
|
278
278
|
'pisell2.text.booking-list': "List",
|
|
279
|
-
'pisell2.text.edit-booking': "Edit"
|
|
279
|
+
'pisell2.text.edit-booking': "Edit",
|
|
280
|
+
'pisell2.text.goodpass': "GoodPass",
|
|
281
|
+
'pisell2.text.goodpass.product-vouchers': "Product Vouchers",
|
|
282
|
+
'pisell2.text.goodpass.view-more': "View More",
|
|
283
|
+
'pisell2.text.goodpass.code': "Code",
|
|
284
|
+
'pisell2.text.goodpass.enter-code': "Enter Code",
|
|
285
|
+
'pisell2.text.goodpass.code-invalid': "Current code is invalid"
|
|
280
286
|
},
|
|
281
287
|
'zh-CN': {
|
|
282
288
|
'pisell2.text.refunded-amount': '已退金额',
|
|
@@ -559,7 +565,13 @@ export default {
|
|
|
559
565
|
'pisell2.text.change.pet.confirm': '保留(添加到未分配中)',
|
|
560
566
|
'pisell2.text.change.pet.cancel': '不保留(清空商品)',
|
|
561
567
|
'pisell2.text.booking-list': "列表",
|
|
562
|
-
'pisell2.text.edit-booking': "编辑"
|
|
568
|
+
'pisell2.text.edit-booking': "编辑",
|
|
569
|
+
'pisell2.text.goodpass': "商品券",
|
|
570
|
+
'pisell2.text.goodpass.product-vouchers': "商品兑换券",
|
|
571
|
+
'pisell2.text.goodpass.view-more': "查看更多",
|
|
572
|
+
'pisell2.text.goodpass.code': "券码",
|
|
573
|
+
'pisell2.text.goodpass.enter-code': "请输入券码",
|
|
574
|
+
'pisell2.text.goodpass.code-invalid': "当前券码不可用"
|
|
563
575
|
},
|
|
564
576
|
'zh-HK': {
|
|
565
577
|
'pisell2.text.refunded-amount': '已退金額',
|
|
@@ -842,6 +854,12 @@ export default {
|
|
|
842
854
|
'pisell2.text.change.pet.confirm': '保留(添加到未分配中)',
|
|
843
855
|
'pisell2.text.change.pet.cancel': '不保留(清空商品)',
|
|
844
856
|
'pisell2.text.booking-list': "列表",
|
|
845
|
-
'pisell2.text.edit-booking': "編輯"
|
|
857
|
+
'pisell2.text.edit-booking': "編輯",
|
|
858
|
+
'pisell2.text.goodpass': "商品券",
|
|
859
|
+
'pisell2.text.goodpass.product-vouchers': "商品兌換券",
|
|
860
|
+
'pisell2.text.goodpass.view-more': "查看更多",
|
|
861
|
+
'pisell2.text.goodpass.code': "券碼",
|
|
862
|
+
'pisell2.text.goodpass.enter-code': "請輸入券碼",
|
|
863
|
+
'pisell2.text.goodpass.code-invalid': "當前券碼不可用"
|
|
846
864
|
}
|
|
847
865
|
};
|
|
@@ -158,6 +158,7 @@ var Payments = Provider(function (props) {
|
|
|
158
158
|
header: locales.getText("pisell2.text.payments"),
|
|
159
159
|
footer: state.bookingId && /*#__PURE__*/React.createElement(Footer, {
|
|
160
160
|
state: state,
|
|
161
|
+
dispatch: dispatch,
|
|
161
162
|
source: "payment"
|
|
162
163
|
}),
|
|
163
164
|
loading: loading && state.bookingId
|
|
@@ -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
|
/** 用于重置当前步骤 */
|
|
@@ -68,6 +68,9 @@ var Product = function Product(props) {
|
|
|
68
68
|
},
|
|
69
69
|
onCard: function onCard(e) {
|
|
70
70
|
return handleChange === null || handleChange === void 0 ? void 0 : handleChange(e, 'view');
|
|
71
|
+
},
|
|
72
|
+
onChangeResource: function onChangeResource(e) {
|
|
73
|
+
return handleChange(item, 'change_resource', e);
|
|
71
74
|
}
|
|
72
75
|
}, productParams));
|
|
73
76
|
}), !hideAddBtn && platform !== 'h5' && isAdd ? useAddService(id, 'more') : null);
|
|
@@ -16,8 +16,9 @@ var useClearCart = function useClearCart(key) {
|
|
|
16
16
|
onChange = _useContext.onChange;
|
|
17
17
|
var isProductList = state.isProductList,
|
|
18
18
|
disabledEdit = state.disabledEdit,
|
|
19
|
-
holders = state.holders
|
|
20
|
-
|
|
19
|
+
holders = state.holders,
|
|
20
|
+
isHideClearCart = state.isHideClearCart;
|
|
21
|
+
console.log(state, 'wh978968');
|
|
21
22
|
/**
|
|
22
23
|
* @title: 清空购物车
|
|
23
24
|
* @description:
|
|
@@ -47,7 +48,7 @@ var useClearCart = function useClearCart(key) {
|
|
|
47
48
|
// updateState(updateProduct(state, products));
|
|
48
49
|
// onChange(products);
|
|
49
50
|
};
|
|
50
|
-
return !disabledEdit && (holders === null || holders === void 0 ? void 0 : holders.length) > 0 ? /*#__PURE__*/React.createElement("span", {
|
|
51
|
+
return !disabledEdit && (holders === null || holders === void 0 ? void 0 : holders.length) > 0 && !isHideClearCart ? /*#__PURE__*/React.createElement("span", {
|
|
51
52
|
className: classNames('pisell-lowcode__shopping-cart-clear-btn', {
|
|
52
53
|
'pisell-lowcode__shopping-cart-clear-btn-empty': isProductList
|
|
53
54
|
}),
|