@pisell/private-materials 6.3.50 → 6.3.51
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/es/components/booking/addons/index.js +20 -17
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/utils.d.ts +5 -0
- package/es/components/booking/components/footer/utils.js +85 -40
- package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +18 -5
- package/es/components/booking/forms/single/index.d.ts +1 -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/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.js +1 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +2 -3
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +16 -2
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +3 -3
- package/es/components/ticketBooking/utils/index.js +23 -8
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/es/plus/saasRegister/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
- package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/es/plus/walletPassGallery/components/passDetail/index.js +5 -1
- package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
- package/es/plus/walletPassGallery/index.js +3 -1
- package/es/pro/Login2.0/index.less +15 -8
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
- package/lib/components/booking/addons/index.js +10 -7
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.d.ts +5 -0
- package/lib/components/booking/components/footer/utils.js +56 -23
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +19 -6
- package/lib/components/booking/forms/single/index.d.ts +1 -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/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.js +1 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +1 -2
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +12 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/utils/index.js +9 -4
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/lib/plus/saasRegister/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/lib/plus/walletPassGallery/components/passDetail/index.js +4 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
- package/lib/plus/walletPassGallery/index.js +3 -1
- package/lib/pro/Login2.0/index.less +15 -8
- package/package.json +4 -4
|
@@ -1,3 +1,7 @@
|
|
|
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 _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; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
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); }
|
|
1
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
6
|
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."); }
|
|
3
7
|
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); }
|
|
@@ -247,7 +251,7 @@ var PassDetail = function PassDetail(props) {
|
|
|
247
251
|
};
|
|
248
252
|
if (!props.dataSource) return null;
|
|
249
253
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
250
|
-
className: classNames("pisell-wallet-pass-gallery_detail", "pisell-wallet-pass-gallery_detail-".concat(platform))
|
|
254
|
+
className: classNames("pisell-wallet-pass-gallery_detail", "pisell-wallet-pass-gallery_detail-".concat(platform), _defineProperty({}, "pisell-wallet-pass-gallery_detail-with-footer", platform === 'h5' && tag === 'gift_card'))
|
|
251
255
|
}, /*#__PURE__*/React.createElement("div", {
|
|
252
256
|
className: "pisell-wallet-pass-gallery_detail-content",
|
|
253
257
|
ref: containerRef
|
|
@@ -32,6 +32,10 @@ var Recharge = function Recharge(_ref) {
|
|
|
32
32
|
storage = _ref2.storage;
|
|
33
33
|
var dvaStore = (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 || (_context$appHelper2$g = _context$appHelper2.getStore) === null || _context$appHelper2$g === void 0 || (_context$appHelper2$g = _context$appHelper2$g.call(_context$appHelper2)) === null || _context$appHelper2$g === void 0 ? void 0 : _context$appHelper2$g.getState();
|
|
34
34
|
var shop = (dvaStore === null || dvaStore === void 0 || (_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 || (_dvaStore$core = _dvaStore$core.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.shop) || {};
|
|
35
|
+
var _useState3 = useState(false),
|
|
36
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
+
loading = _useState4[0],
|
|
38
|
+
setLoading = _useState4[1];
|
|
35
39
|
useEffect(function () {
|
|
36
40
|
if (detailData) {
|
|
37
41
|
setChargeItem(((detailData === null || detailData === void 0 ? void 0 : detailData.gift_option) || [])[0]);
|
|
@@ -44,6 +48,7 @@ var Recharge = function Recharge(_ref) {
|
|
|
44
48
|
while (1) switch (_context.prev = _context.next) {
|
|
45
49
|
case 0:
|
|
46
50
|
_context.prev = 0;
|
|
51
|
+
setLoading(true);
|
|
47
52
|
params = {
|
|
48
53
|
voucher_id: (detailData === null || detailData === void 0 ? void 0 : detailData.id) || '',
|
|
49
54
|
product_id: (detailData === null || detailData === void 0 ? void 0 : detailData.product_id) || '',
|
|
@@ -57,9 +62,9 @@ var Recharge = function Recharge(_ref) {
|
|
|
57
62
|
currency_format: (shop === null || shop === void 0 ? void 0 : shop.currency_format) || ''
|
|
58
63
|
}
|
|
59
64
|
};
|
|
60
|
-
_context.next =
|
|
65
|
+
_context.next = 5;
|
|
61
66
|
return orderRechargeProduct(params);
|
|
62
|
-
case
|
|
67
|
+
case 5:
|
|
63
68
|
data = _context.sent;
|
|
64
69
|
if (data !== null && data !== void 0 && data.order_id) {
|
|
65
70
|
storage === null || storage === void 0 || (_storage$set = storage.set) === null || _storage$set === void 0 || _storage$set.call(storage, 'orderId', data.order_id);
|
|
@@ -69,23 +74,28 @@ var Recharge = function Recharge(_ref) {
|
|
|
69
74
|
callback: function callback() {}
|
|
70
75
|
});
|
|
71
76
|
}
|
|
72
|
-
_context.next =
|
|
77
|
+
_context.next = 12;
|
|
73
78
|
break;
|
|
74
|
-
case
|
|
75
|
-
_context.prev =
|
|
79
|
+
case 9:
|
|
80
|
+
_context.prev = 9;
|
|
76
81
|
_context.t0 = _context["catch"](0);
|
|
77
82
|
console.error(locales.getText('wallet-pass-gallery.log.rechargeOrderFailed'), _context.t0);
|
|
78
|
-
case
|
|
83
|
+
case 12:
|
|
84
|
+
_context.prev = 12;
|
|
85
|
+
setLoading(false);
|
|
86
|
+
return _context.finish(12);
|
|
87
|
+
case 15:
|
|
79
88
|
case "end":
|
|
80
89
|
return _context.stop();
|
|
81
90
|
}
|
|
82
|
-
}, _callee, null, [[0,
|
|
91
|
+
}, _callee, null, [[0, 9, 12, 15]]);
|
|
83
92
|
}));
|
|
84
93
|
return function handleRecharge() {
|
|
85
94
|
return _ref3.apply(this, arguments);
|
|
86
95
|
};
|
|
87
96
|
}();
|
|
88
97
|
return /*#__PURE__*/React.createElement(Drawer, {
|
|
98
|
+
destroyOnClose: true,
|
|
89
99
|
title: locales.getText('wallet-pass-gallery.rechargeOptions'),
|
|
90
100
|
open: open,
|
|
91
101
|
zIndex: 999,
|
|
@@ -97,7 +107,8 @@ var Recharge = function Recharge(_ref) {
|
|
|
97
107
|
block: true,
|
|
98
108
|
size: "large",
|
|
99
109
|
onClick: handleRecharge,
|
|
100
|
-
disabled: !(chargeItem !== null && chargeItem !== void 0 && chargeItem.id)
|
|
110
|
+
disabled: !(chargeItem !== null && chargeItem !== void 0 && chargeItem.id),
|
|
111
|
+
loading: loading
|
|
101
112
|
}, locales.getText('wallet-pass-gallery.recharge'))
|
|
102
113
|
}, /*#__PURE__*/React.createElement("div", {
|
|
103
114
|
className: "pisell-wallet-pass-gallery_recharge"
|
|
@@ -554,7 +554,9 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
554
554
|
},
|
|
555
555
|
block: true
|
|
556
556
|
}, locales.getText('wallet-pass-gallery.button.add'))), /*#__PURE__*/React.createElement(PisellModal, {
|
|
557
|
-
|
|
557
|
+
zIndex: 997,
|
|
558
|
+
destroyOnClose: true,
|
|
559
|
+
platform: platform,
|
|
558
560
|
visible: !!_currentItem,
|
|
559
561
|
onCancel: function onCancel() {
|
|
560
562
|
return setCurrentItemId('');
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
/* 默认底部内边距 */
|
|
17
17
|
padding-bottom: 24px;
|
|
18
|
+
|
|
19
|
+
// 加载状态优化
|
|
20
|
+
.pisell-lowcode-btn-loading-icon {
|
|
21
|
+
.anticon {
|
|
22
|
+
color: #ffffff !important;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
|
|
19
27
|
/* 在弹窗模式下不需要额外的底部内边距,因为使用 sticky 定位 */
|
|
20
28
|
.pisell-lowcode-modal-body & {
|
|
@@ -462,6 +470,13 @@
|
|
|
462
470
|
.login-lm-drawer-popover & {
|
|
463
471
|
padding-bottom: 100px;
|
|
464
472
|
}
|
|
473
|
+
// 加载状态优化
|
|
474
|
+
.pisell-lowcode-btn-loading-icon {
|
|
475
|
+
.anticon {
|
|
476
|
+
color: #ffffff !important;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
465
480
|
}
|
|
466
481
|
|
|
467
482
|
// 错误提示样式优化
|
|
@@ -521,14 +536,6 @@
|
|
|
521
536
|
// }
|
|
522
537
|
// }
|
|
523
538
|
// }
|
|
524
|
-
|
|
525
|
-
// 加载状态优化
|
|
526
|
-
.pisell-lowcode-btn-loading-icon {
|
|
527
|
-
.anticon {
|
|
528
|
-
color: #ffffff !important;
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
|
|
532
539
|
// 切换认证方式按钮
|
|
533
540
|
.login2-switch-button {
|
|
534
541
|
margin-top: 0;
|
|
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
30
30
|
* @return {*}
|
|
31
31
|
* @Author: xiangfeng.xue
|
|
32
32
|
*/
|
|
33
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00"
|
|
33
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
|
|
34
34
|
/**
|
|
35
35
|
* 计算所有价格明细
|
|
36
36
|
* @param items - 购物车商品数组
|
|
@@ -51,23 +51,26 @@ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext")
|
|
|
51
51
|
var formatProducts = (values) => {
|
|
52
52
|
let arr = [];
|
|
53
53
|
arr = values.map((item) => {
|
|
54
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
54
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
55
|
+
const bundleDiscountList = (0, import_utils.getBundleDiscountList)(((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []);
|
|
56
|
+
const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
|
|
57
|
+
discount_list.push(...bundleDiscountList);
|
|
55
58
|
return {
|
|
56
59
|
order_detail_id: item.order_detail_id || 0,
|
|
57
60
|
num: item._extend.quantity,
|
|
58
61
|
price: (0, import_utils.formatProductPrice)(item),
|
|
59
62
|
product_id: item.id,
|
|
60
|
-
discount_list:
|
|
63
|
+
discount_list: discount_list || [],
|
|
61
64
|
discount_amount: 0,
|
|
62
65
|
product_discount_reason: "",
|
|
63
66
|
is_charge_tax: item.is_charge_tax,
|
|
64
67
|
note: "",
|
|
65
68
|
discountway: "num",
|
|
66
69
|
discount_type: "discount",
|
|
67
|
-
bundle_edit: (
|
|
68
|
-
product_bundle: (0, import_utils.formatProductBundle)((
|
|
69
|
-
"product_option_item": (0, import_utils.formatProductOption)((
|
|
70
|
-
"product_variant_id": ((
|
|
70
|
+
bundle_edit: (_c = item._extend) == null ? void 0 : _c.bundle_edit,
|
|
71
|
+
product_bundle: (0, import_utils.formatProductBundle)((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle),
|
|
72
|
+
"product_option_item": (0, import_utils.formatProductOption)((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option),
|
|
73
|
+
"product_variant_id": ((_i = (_h = item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.product_variant_id) || 0
|
|
71
74
|
};
|
|
72
75
|
});
|
|
73
76
|
return arr;
|
|
@@ -241,12 +244,12 @@ var Addons = (0, import_model.Provider)((props) => {
|
|
|
241
244
|
isAddons: true,
|
|
242
245
|
_key: e.key,
|
|
243
246
|
_extend: {
|
|
244
|
-
price: _detail.price,
|
|
245
247
|
other: e,
|
|
246
248
|
quantity: (e == null ? void 0 : e.quantity) || 1
|
|
247
249
|
},
|
|
248
250
|
quantity: (e == null ? void 0 : e.quantity) || 1
|
|
249
251
|
};
|
|
252
|
+
product._extend.price = (0, import_utils2.getMainPrice)(product, _detail.price);
|
|
250
253
|
let _total = (0, import_utils2.getProductTotalPrice)(product);
|
|
251
254
|
product._extend.total = _total;
|
|
252
255
|
product._extend.origin_total = _total;
|
|
@@ -16,6 +16,11 @@ export declare const formatProductOption: (option: any) => any;
|
|
|
16
16
|
* @Date: 2024-02-19 09:26
|
|
17
17
|
*/
|
|
18
18
|
export declare const formatProductBundle: (bundle: any) => any;
|
|
19
|
+
/**
|
|
20
|
+
* 获取子商品折扣信息
|
|
21
|
+
* @param item
|
|
22
|
+
*/
|
|
23
|
+
export declare const getBundleDiscountList: (bundle: any[]) => any[];
|
|
19
24
|
export interface ResourceItem {
|
|
20
25
|
[key: string]: any;
|
|
21
26
|
}
|
|
@@ -35,7 +35,8 @@ __export(utils_exports, {
|
|
|
35
35
|
formatProductBundle: () => formatProductBundle,
|
|
36
36
|
formatProductOption: () => formatProductOption,
|
|
37
37
|
formatProductPrice: () => formatProductPrice,
|
|
38
|
-
formatValues: () => formatValues
|
|
38
|
+
formatValues: () => formatValues,
|
|
39
|
+
getBundleDiscountList: () => getBundleDiscountList
|
|
39
40
|
});
|
|
40
41
|
module.exports = __toCommonJS(utils_exports);
|
|
41
42
|
var import_dayjs = __toESM(require("dayjs"));
|
|
@@ -47,6 +48,7 @@ var import_status = require("../../info/service2/status");
|
|
|
47
48
|
var import_utils4 = require("../../info/service2/utils");
|
|
48
49
|
var import_utils5 = require("@pisell/utils");
|
|
49
50
|
var import_materials = require("@pisell/materials");
|
|
51
|
+
var import_decimal = __toESM(require("decimal.js"));
|
|
50
52
|
var formatNote = (data) => {
|
|
51
53
|
var _a;
|
|
52
54
|
return ((_a = data.notes) == null ? void 0 : _a.orderNote) || "";
|
|
@@ -71,10 +73,10 @@ var formatProductOption = (option) => {
|
|
|
71
73
|
}
|
|
72
74
|
return option.map((d) => {
|
|
73
75
|
return {
|
|
74
|
-
num: d.num,
|
|
75
|
-
option_group_item_id: d.product_option_item_id || d.option_group_item_id,
|
|
76
|
-
option_group_id: d.option_group_id
|
|
77
|
-
|
|
76
|
+
"num": d.num,
|
|
77
|
+
"option_group_item_id": d.product_option_item_id || d.option_group_item_id,
|
|
78
|
+
"option_group_id": d.option_group_id,
|
|
79
|
+
"custom_add_price": Number(d == null ? void 0 : d.add_price)
|
|
78
80
|
};
|
|
79
81
|
});
|
|
80
82
|
};
|
|
@@ -101,20 +103,44 @@ var formatProductBundle = (bundle) => {
|
|
|
101
103
|
} catch (error) {
|
|
102
104
|
}
|
|
103
105
|
return bundle.map((d) => {
|
|
106
|
+
const option = formatProductOption(d.option);
|
|
107
|
+
const option_price = option.reduce((temp, item) => {
|
|
108
|
+
return temp + Number(item.num) * item.custom_add_price;
|
|
109
|
+
}, 0);
|
|
104
110
|
return {
|
|
105
|
-
bundle_group_id: d.group_id,
|
|
106
|
-
bundle_id: d.id,
|
|
107
|
-
bundle_product_id: (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
|
|
108
|
-
bundle_variant_id: d.bundle_variant_id,
|
|
109
|
-
num: d.num,
|
|
110
|
-
extension_id: d.extension_id,
|
|
111
|
-
extension_type: d.extension_type,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
"bundle_group_id": d.group_id,
|
|
112
|
+
"bundle_id": d.id,
|
|
113
|
+
"bundle_product_id": (d == null ? void 0 : d._bundle_product_id) || (d == null ? void 0 : d.product_id),
|
|
114
|
+
"bundle_variant_id": d.bundle_variant_id,
|
|
115
|
+
"num": d.num,
|
|
116
|
+
"extension_id": d.extension_id,
|
|
117
|
+
"extension_type": d.extension_type,
|
|
118
|
+
"price": Number(d == null ? void 0 : d.product_price),
|
|
119
|
+
"price_type": d == null ? void 0 : d.price_type,
|
|
120
|
+
"price_type_ext": d == null ? void 0 : d.price_type_ext,
|
|
121
|
+
"custom_price": (d == null ? void 0 : d.custom_price) || Math.abs(new import_decimal.default(d == null ? void 0 : d.product_price).sub(option_price).toNumber()).toFixed(2),
|
|
122
|
+
"custom_price_type": d == null ? void 0 : d.price_type,
|
|
123
|
+
"option": option,
|
|
124
|
+
"bundle_selling_price": d == null ? void 0 : d.price,
|
|
125
|
+
"bundle_sum_price": (d == null ? void 0 : d.original_price) || (d == null ? void 0 : d.original_total),
|
|
126
|
+
metadata: {
|
|
127
|
+
custom_product_bundle_map_id: d._id
|
|
128
|
+
}
|
|
115
129
|
};
|
|
116
130
|
});
|
|
117
131
|
};
|
|
132
|
+
var getBundleDiscountList = (bundle) => {
|
|
133
|
+
if (!bundle) {
|
|
134
|
+
return [];
|
|
135
|
+
}
|
|
136
|
+
let discountList = [];
|
|
137
|
+
bundle.forEach((d) => {
|
|
138
|
+
if (d.discount_list && (0, import_utils5.isArr)(d.discount_list)) {
|
|
139
|
+
discountList.push(...d.discount_list.filter((item) => !item.id));
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
return discountList;
|
|
143
|
+
};
|
|
118
144
|
var getSubType = (item) => {
|
|
119
145
|
var _a;
|
|
120
146
|
const _type = (_a = item.duration) == null ? void 0 : _a.type;
|
|
@@ -219,7 +245,7 @@ var formatProductPrice = (item) => {
|
|
|
219
245
|
return price;
|
|
220
246
|
};
|
|
221
247
|
var formatMetaData = (item, isMultiDayPrices) => {
|
|
222
|
-
var _a, _b, _c, _d, _e;
|
|
248
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
223
249
|
let metadata = {};
|
|
224
250
|
if ((_a = item._extend) == null ? void 0 : _a.capacity) {
|
|
225
251
|
metadata.capacity = item._extend.capacity;
|
|
@@ -233,6 +259,9 @@ var formatMetaData = (item, isMultiDayPrices) => {
|
|
|
233
259
|
if (isMultiDayPrices && ((_d = item._extend) == null ? void 0 : _d.multiDayPrices)) {
|
|
234
260
|
metadata.multiDayPrices = (_e = item._extend) == null ? void 0 : _e.multiDayPrices;
|
|
235
261
|
}
|
|
262
|
+
if ((_f = item._extend) == null ? void 0 : _f.unique_identification_number) {
|
|
263
|
+
metadata.unique_identification_number = (_g = item._extend) == null ? void 0 : _g.unique_identification_number;
|
|
264
|
+
}
|
|
236
265
|
return metadata;
|
|
237
266
|
};
|
|
238
267
|
var getSourceProductPrice = (item) => {
|
|
@@ -250,11 +279,13 @@ var getSourceProductPrice = (item) => {
|
|
|
250
279
|
return price;
|
|
251
280
|
};
|
|
252
281
|
var formatProducts = (item, quantity) => {
|
|
253
|
-
var _a, _b, _c, _d, _e, _f;
|
|
282
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
254
283
|
const total = Number(item._extend.total);
|
|
255
284
|
const origin_total = Number(item._extend.origin_total);
|
|
256
285
|
const discount_amount = origin_total - total;
|
|
257
|
-
const
|
|
286
|
+
const bundleDiscountList = getBundleDiscountList(((_b = (_a = item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []);
|
|
287
|
+
const discount_list = [...(item == null ? void 0 : item.discount_list) || []];
|
|
288
|
+
discount_list.push(...bundleDiscountList);
|
|
258
289
|
const discount_type = discount_amount < 0 ? "change_price" : "discount";
|
|
259
290
|
const notManualDiscount = discount_list.filter(
|
|
260
291
|
(item2) => item2.type !== "product"
|
|
@@ -262,6 +293,7 @@ var formatProducts = (item, quantity) => {
|
|
|
262
293
|
return {
|
|
263
294
|
"num": quantity || item._extend.quantity,
|
|
264
295
|
"price": formatProductPrice(item),
|
|
296
|
+
"main_product_selling_price": item._extend.main_product_selling_price ?? formatProductPrice(item),
|
|
265
297
|
"source_product_price": getSourceProductPrice(item),
|
|
266
298
|
"product_id": (item == null ? void 0 : item.product_id) || item.id,
|
|
267
299
|
"discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
@@ -272,10 +304,10 @@ var formatProducts = (item, quantity) => {
|
|
|
272
304
|
"discount_per": item._extend.discount_per,
|
|
273
305
|
"discount_type": item._extend.discount_type || discount_type,
|
|
274
306
|
"order_detail_id": item._extend.order_detail_id || 0,
|
|
275
|
-
"product_bundle": formatProductBundle((
|
|
276
|
-
"bundle_edit": item._extend.bundle_edit,
|
|
277
|
-
"product_option_item": formatProductOption((
|
|
278
|
-
"product_variant_id": ((
|
|
307
|
+
"product_bundle": formatProductBundle((_d = (_c = item._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.bundle),
|
|
308
|
+
"bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
|
|
309
|
+
"product_option_item": formatProductOption((_f = (_e = item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.option),
|
|
310
|
+
"product_variant_id": ((_h = (_g = item._extend) == null ? void 0 : _g.other) == null ? void 0 : _h.product_variant_id) || 0,
|
|
279
311
|
"discount_list": notManualDiscount,
|
|
280
312
|
metadata: formatMetaData(item, false)
|
|
281
313
|
};
|
|
@@ -538,5 +570,6 @@ var checkHolderIsError = (state) => {
|
|
|
538
570
|
formatProductBundle,
|
|
539
571
|
formatProductOption,
|
|
540
572
|
formatProductPrice,
|
|
541
|
-
formatValues
|
|
573
|
+
formatValues,
|
|
574
|
+
getBundleDiscountList
|
|
542
575
|
});
|
|
@@ -103,6 +103,11 @@ var VoucherCard = (props) => {
|
|
|
103
103
|
});
|
|
104
104
|
return val;
|
|
105
105
|
}, [state.service.value]);
|
|
106
|
+
const serviceTotal = (0, import_react.useMemo)(() => {
|
|
107
|
+
return serviceMemo.reduce((total, item) => {
|
|
108
|
+
return total + (item.total || 0);
|
|
109
|
+
}, 0);
|
|
110
|
+
}, [serviceMemo]);
|
|
106
111
|
const addonsMemo = (0, import_react.useMemo)(() => {
|
|
107
112
|
var _a2;
|
|
108
113
|
const val = (_a2 = state.addons.value || []) == null ? void 0 : _a2.map((value) => {
|
|
@@ -194,6 +199,12 @@ var VoucherCard = (props) => {
|
|
|
194
199
|
}, [state.bookingId, isBooking4Shop, fn]);
|
|
195
200
|
const productListToValue = (0, import_ahooks.useMemoizedFn)((list, edit) => {
|
|
196
201
|
const { serviceList, addonsList } = (0, import_utils2.getServiceAddons)(list);
|
|
202
|
+
const newTotal = serviceList.reduce((total, item) => {
|
|
203
|
+
return total + (item._extend.total || 0);
|
|
204
|
+
}, 0);
|
|
205
|
+
if (newTotal !== serviceTotal) {
|
|
206
|
+
edit = true;
|
|
207
|
+
}
|
|
197
208
|
serviceValueRef.current = serviceList;
|
|
198
209
|
addonsValueRef.current = addonsList;
|
|
199
210
|
let other = {};
|
|
@@ -209,12 +220,14 @@ var VoucherCard = (props) => {
|
|
|
209
220
|
...other
|
|
210
221
|
}
|
|
211
222
|
});
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
223
|
+
setTimeout(() => {
|
|
224
|
+
dispatch({
|
|
225
|
+
type: "setAddons",
|
|
226
|
+
payload: {
|
|
227
|
+
value: addonsList,
|
|
228
|
+
...other
|
|
229
|
+
}
|
|
230
|
+
});
|
|
218
231
|
});
|
|
219
232
|
});
|
|
220
233
|
const onScanCode = async () => {
|
|
@@ -367,6 +367,7 @@ var formatBundle = (bundle) => {
|
|
|
367
367
|
num: item == null ? void 0 : item.num,
|
|
368
368
|
price: item == null ? void 0 : item.price,
|
|
369
369
|
total: item == null ? void 0 : item.price,
|
|
370
|
+
origin_total: item.original_total,
|
|
370
371
|
price_type: item == null ? void 0 : item.price_type,
|
|
371
372
|
bundle_sum_price: item == null ? void 0 : item.bundle_sum_price,
|
|
372
373
|
bundle_sum_type: item == null ? void 0 : item.bundle_sum_type,
|
|
@@ -242,13 +242,12 @@ var Info = (props) => {
|
|
|
242
242
|
_extend: {
|
|
243
243
|
start_date: state.date.value,
|
|
244
244
|
quantity: (e == null ? void 0 : e.quantity) || 1,
|
|
245
|
-
price: _detail.price,
|
|
246
245
|
product_name: item.title,
|
|
247
246
|
other
|
|
248
247
|
},
|
|
249
248
|
new: 1
|
|
250
249
|
};
|
|
251
|
-
|
|
250
|
+
cacheItem._extend.price = (0, import_utils3.getMainPrice)(_detail, _detail.price);
|
|
252
251
|
let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
|
|
253
252
|
cacheItem._extend.total = _total;
|
|
254
253
|
cacheItem._extend.origin_total = _total;
|
|
@@ -153,6 +153,7 @@ export declare const getIsOnlySession: (item: any) => boolean;
|
|
|
153
153
|
* @Date: 2024-01-26 14:09
|
|
154
154
|
*/
|
|
155
155
|
export declare const getServerItemExtend: (state: any, cacheItem: any, timeObj: any) => any;
|
|
156
|
+
export declare const getMainPrice: (item: any, price?: number) => number;
|
|
156
157
|
export declare const getProductTotalPrice: (item: any) => number;
|
|
157
158
|
/**
|
|
158
159
|
* @title: 判断 duration
|
|
@@ -46,6 +46,7 @@ __export(utils_exports, {
|
|
|
46
46
|
getIsEject: () => getIsEject,
|
|
47
47
|
getIsOnlySession: () => getIsOnlySession,
|
|
48
48
|
getLastServer: () => getLastServer,
|
|
49
|
+
getMainPrice: () => getMainPrice,
|
|
49
50
|
getNowTime: () => getNowTime,
|
|
50
51
|
getProductTotalPrice: () => getProductTotalPrice,
|
|
51
52
|
getResourceTimeIsUsable: () => getResourceTimeIsUsable,
|
|
@@ -66,6 +67,7 @@ var import_utils = require("@pisell/utils");
|
|
|
66
67
|
var import_utils2 = require("./info/service2/utils");
|
|
67
68
|
var import_lodash = require("lodash");
|
|
68
69
|
var import_utilsByBooking = require("./info2/utilsByBooking");
|
|
70
|
+
var import_decimal = __toESM(require("decimal.js"));
|
|
69
71
|
var Request = class {
|
|
70
72
|
request = {};
|
|
71
73
|
constructor() {
|
|
@@ -609,6 +611,15 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
|
|
|
609
611
|
}
|
|
610
612
|
return _extend;
|
|
611
613
|
};
|
|
614
|
+
var getMainPrice = (item, price) => {
|
|
615
|
+
var _a;
|
|
616
|
+
let newPrice = new import_decimal.default(price || item._extend.price || 0);
|
|
617
|
+
let other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
618
|
+
if (other == null ? void 0 : other.product_variant_id) {
|
|
619
|
+
newPrice = new import_decimal.default((other == null ? void 0 : other.price) || 0);
|
|
620
|
+
}
|
|
621
|
+
return newPrice.toNumber();
|
|
622
|
+
};
|
|
612
623
|
var getProductTotalPrice = (item) => {
|
|
613
624
|
var _a;
|
|
614
625
|
let price = Number(item._extend.price);
|
|
@@ -698,6 +709,7 @@ var getIsEdit = (state) => {
|
|
|
698
709
|
getIsEject,
|
|
699
710
|
getIsOnlySession,
|
|
700
711
|
getLastServer,
|
|
712
|
+
getMainPrice,
|
|
701
713
|
getNowTime,
|
|
702
714
|
getProductTotalPrice,
|
|
703
715
|
getResourceTimeIsUsable,
|