@pisell/private-materials 3.3.51 → 3.3.55
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/index.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Resource/index.js +5 -44
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +177 -218
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/locales.d.ts +0 -3
- package/es/components/appointmentBooking/locales.js +0 -9
- package/es/components/booking/components/TabProduct/productItem/index.js +2 -14
- package/es/components/booking/components/drawer/index.js +2 -4
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +17 -25
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/client/index.js +1 -2
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/pet/index.js +0 -3
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.js +27 -27
- package/es/components/booking/info2/index.js +3 -3
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.js +2 -5
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/editService/index.js +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +4 -23
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +6 -18
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/productSelect/components/TabProduct/index.js +10 -28
- package/es/components/productSelect/components/productGroup/index.js +7 -20
- package/es/components/productSelect/components/productGroup/index.less +1 -14
- package/es/components/productSelect/index.less +2 -1
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +10 -16
- package/es/components/ticketBooking/components/addServiceVariant/index.less +0 -10
- package/es/components/ticketBooking/components/ticketBooking/index.js +1 -3
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/index.js +1 -2
- package/es/components/ticketBooking/locales.d.ts +0 -3
- package/es/components/ticketBooking/locales.js +3 -12
- package/es/components/ticketBooking/utils/index.d.ts +1 -5
- package/es/components/ticketBooking/utils/index.js +3 -35
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Resource/index.js +5 -44
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +3 -12
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/locales.d.ts +0 -3
- package/lib/components/appointmentBooking/locales.js +0 -3
- package/lib/components/booking/components/TabProduct/productItem/index.js +1 -8
- package/lib/components/booking/components/drawer/index.js +2 -2
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +27 -31
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/client/index.js +1 -2
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/pet/index.js +0 -3
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info2/index.js +4 -7
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.js +2 -4
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/editService/index.js +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +8 -18
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +1 -8
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.js +6 -19
- package/lib/components/productSelect/components/productGroup/index.js +4 -24
- package/lib/components/productSelect/components/productGroup/index.less +1 -14
- package/lib/components/productSelect/index.less +2 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +14 -25
- package/lib/components/ticketBooking/components/addServiceVariant/index.less +0 -10
- package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -3
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/index.js +1 -2
- package/lib/components/ticketBooking/locales.d.ts +0 -3
- package/lib/components/ticketBooking/locales.js +3 -6
- package/lib/components/ticketBooking/utils/index.d.ts +1 -5
- package/lib/components/ticketBooking/utils/index.js +3 -35
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/package.json +4 -4
- package/es/components/appointmentBooking/assets/resource.svg +0 -1
- package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +0 -21
- package/es/components/productSelect/components/TabProduct/tabs/index.js +0 -243
- package/es/components/productSelect/components/TabProduct/tabs/index.less +0 -126
- package/es/components/productSelect/components/pisellPriceText/index.d.ts +0 -11
- package/es/components/productSelect/components/pisellPriceText/index.js +0 -43
- package/lib/components/appointmentBooking/assets/resource.svg +0 -1
- package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +0 -21
- package/lib/components/productSelect/components/TabProduct/tabs/index.js +0 -202
- package/lib/components/productSelect/components/TabProduct/tabs/index.less +0 -126
- package/lib/components/productSelect/components/pisellPriceText/index.d.ts +0 -11
- package/lib/components/productSelect/components/pisellPriceText/index.js +0 -72
package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js
CHANGED
|
@@ -3,8 +3,6 @@ import OpenCard from "../../OpenCard";
|
|
|
3
3
|
import { PisellCheckboxGroup, PisellText } from '@pisell/materials';
|
|
4
4
|
import { locales } from '@pisell/utils';
|
|
5
5
|
import { useEventDetail } from "../../../../Sales";
|
|
6
|
-
import Decimal from 'decimal.js';
|
|
7
|
-
import PisellPriceText from "../../../../productSelect/components/pisellPriceText";
|
|
8
6
|
var BookingOptions = function BookingOptions(props) {
|
|
9
7
|
var _detail$bookingOption, _detail$bookingOption2;
|
|
10
8
|
var _useEventDetail = useEventDetail(),
|
|
@@ -29,29 +27,12 @@ var BookingOptions = function BookingOptions(props) {
|
|
|
29
27
|
optionClassName: "option-item ".concat((detail === null || detail === void 0 || (_detail$bookingOption2 = detail.bookingOptions) === null || _detail$bookingOption2 === void 0 ? void 0 : _detail$bookingOption2.length) > 1 ? 'option-item-pointer' : ''),
|
|
30
28
|
value: currentBookingOption,
|
|
31
29
|
renderOption: function renderOption(option) {
|
|
32
|
-
var _ref = option._originData || {},
|
|
33
|
-
price = _ref.price,
|
|
34
|
-
is_bundle = _ref.is_bundle,
|
|
35
|
-
minimum_markup_price = _ref.minimum_markup_price;
|
|
36
|
-
if (!option._originData || !is_bundle) {
|
|
37
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: "item"
|
|
39
|
-
}, /*#__PURE__*/React.createElement("span", null, option.label), /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
40
|
-
value: option.price,
|
|
41
|
-
showCurrencySymbol: true,
|
|
42
|
-
className: "price"
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
|
-
var _price = price;
|
|
46
|
-
if (is_bundle) {
|
|
47
|
-
_price = new Decimal(price).plus(new Decimal(minimum_markup_price)).toFixed(2);
|
|
48
|
-
}
|
|
49
30
|
return /*#__PURE__*/React.createElement("div", {
|
|
50
31
|
className: "item"
|
|
51
|
-
}, /*#__PURE__*/React.createElement("span", null, option.label), /*#__PURE__*/React.createElement(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
32
|
+
}, /*#__PURE__*/React.createElement("span", null, option.label), /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
33
|
+
value: option.price,
|
|
34
|
+
showCurrencySymbol: true,
|
|
35
|
+
className: "price"
|
|
55
36
|
}));
|
|
56
37
|
},
|
|
57
38
|
onChange: onChange
|
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { image } from
|
|
3
|
-
import classNames from
|
|
4
|
-
import Decimal from 'decimal.js';
|
|
5
|
-
import PisellPriceText from "../../../../productSelect/components/pisellPriceText";
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { formatAmount, image } from "@pisell/utils";
|
|
3
|
+
import classNames from "classnames";
|
|
6
4
|
import "./index.less";
|
|
7
5
|
var ProductItem = function ProductItem(_ref) {
|
|
8
6
|
var _ref$item = _ref.item,
|
|
9
7
|
item = _ref$item === void 0 ? {} : _ref$item,
|
|
10
8
|
_onClick = _ref.onClick,
|
|
11
9
|
_ref$amountSymbol = _ref.amountSymbol,
|
|
12
|
-
amountSymbol = _ref$amountSymbol === void 0 ?
|
|
10
|
+
amountSymbol = _ref$amountSymbol === void 0 ? "$" : _ref$amountSymbol,
|
|
13
11
|
style = _ref.style,
|
|
14
12
|
className = _ref.className;
|
|
15
|
-
var price = item.price,
|
|
16
|
-
is_bundle = item.is_bundle,
|
|
17
|
-
minimum_markup_price = item.minimum_markup_price;
|
|
18
|
-
var _price = price;
|
|
19
|
-
if (is_bundle) {
|
|
20
|
-
_price = new Decimal(price).plus(new Decimal(minimum_markup_price)).toFixed(2);
|
|
21
|
-
}
|
|
22
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
14
|
style: style,
|
|
24
|
-
className: classNames(
|
|
15
|
+
className: classNames("product-item-card", className),
|
|
25
16
|
onClick: function onClick() {
|
|
26
17
|
_onClick(item);
|
|
27
18
|
}
|
|
@@ -34,9 +25,6 @@ var ProductItem = function ProductItem(_ref) {
|
|
|
34
25
|
className: "product-item-card-title"
|
|
35
26
|
}, item.title), /*#__PURE__*/React.createElement("div", {
|
|
36
27
|
className: "product-item-card-price"
|
|
37
|
-
},
|
|
38
|
-
value: _price,
|
|
39
|
-
isMini: is_bundle
|
|
40
|
-
}))));
|
|
28
|
+
}, formatAmount(item.price, 2, amountSymbol))));
|
|
41
29
|
};
|
|
42
30
|
export default ProductItem;
|
|
@@ -12,9 +12,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
12
12
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
13
13
|
import { Skeleton } from 'antd';
|
|
14
14
|
import { PisellEmpty } from '@pisell/materials';
|
|
15
|
-
import { useMemoizedFn
|
|
15
|
+
import { useMemoizedFn } from 'ahooks';
|
|
16
16
|
import { locales } from '@pisell/utils';
|
|
17
|
-
import Tabs from "
|
|
17
|
+
import Tabs from "../../../booking/components/TabProduct/tabs";
|
|
18
18
|
import ProductGroup, { ProductGroupSkeleton } from "../productGroup";
|
|
19
19
|
var io = null;
|
|
20
20
|
var TabProduct = function TabProduct(props) {
|
|
@@ -43,37 +43,19 @@ var TabProduct = function TabProduct(props) {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
}, [list]);
|
|
46
|
-
|
|
47
|
-
// 添加防抖的scroll函数
|
|
48
|
-
var debouncedScroll = useDebounceFn(function (id) {
|
|
49
|
-
var _tabsRef$current;
|
|
50
|
-
tabsRef === null || tabsRef === void 0 || (_tabsRef$current = tabsRef.current) === null || _tabsRef$current === void 0 || _tabsRef$current.scroll(id);
|
|
51
|
-
}, {
|
|
52
|
-
wait: 100
|
|
53
|
-
} // 100ms防抖
|
|
54
|
-
);
|
|
55
46
|
var handleObserver = useMemoizedFn(function () {
|
|
56
47
|
var _marginTop = 270;
|
|
57
48
|
var _marginBottom = window.innerHeight - 70 - 200 - 70;
|
|
58
49
|
var _rootMargin = "".concat(_marginTop * -1, "px 0px ").concat(_marginBottom * -1, "px 0px");
|
|
59
50
|
io = new IntersectionObserver(function (entries) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
});
|
|
69
|
-
var _topMostEntry$target$ = topMostEntry === null || topMostEntry === void 0 || (_topMostEntry$target = topMostEntry.target) === null || _topMostEntry$target === void 0 || (_topMostEntry$target = _topMostEntry$target.id) === null || _topMostEntry$target === void 0 ? void 0 : _topMostEntry$target.split('-'),
|
|
70
|
-
_topMostEntry$target$2 = _slicedToArray(_topMostEntry$target$, 2),
|
|
71
|
-
name = _topMostEntry$target$2[0],
|
|
72
|
-
id = _topMostEntry$target$2[1];
|
|
73
|
-
var newGroupId = Number(id);
|
|
74
|
-
setCurrentGroupId(newGroupId);
|
|
75
|
-
debouncedScroll.run(id);
|
|
76
|
-
// tabsRef?.current?.scroll(id);
|
|
51
|
+
if (entries[0].isIntersecting) {
|
|
52
|
+
var _entries$, _tabsRef$current;
|
|
53
|
+
var _entries$0$target$id$ = (_entries$ = entries[0]) === null || _entries$ === void 0 || (_entries$ = _entries$.target) === null || _entries$ === void 0 || (_entries$ = _entries$.id) === null || _entries$ === void 0 ? void 0 : _entries$.split('-'),
|
|
54
|
+
_entries$0$target$id$2 = _slicedToArray(_entries$0$target$id$, 2),
|
|
55
|
+
name = _entries$0$target$id$2[0],
|
|
56
|
+
id = _entries$0$target$id$2[1];
|
|
57
|
+
setCurrentGroupId(Number(id));
|
|
58
|
+
tabsRef === null || tabsRef === void 0 || (_tabsRef$current = tabsRef.current) === null || _tabsRef$current === void 0 || _tabsRef$current.scroll(id);
|
|
77
59
|
}
|
|
78
60
|
}, {
|
|
79
61
|
root: null,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import GridLayout from "../gridLayout";
|
|
4
|
+
import { PisellText } from '@pisell/materials';
|
|
4
5
|
import { locales } from '@pisell/utils';
|
|
5
6
|
import { Skeleton } from 'antd';
|
|
6
|
-
import Decimal from 'decimal.js';
|
|
7
7
|
import "./index.less";
|
|
8
|
-
import PisellPriceText from "../pisellPriceText";
|
|
9
8
|
|
|
10
9
|
// 装修端配置项均为 isXXX,这里先适配一部分
|
|
11
10
|
|
|
@@ -56,29 +55,17 @@ var ProductGroup = function ProductGroup(_ref) {
|
|
|
56
55
|
return "".concat(locales.getText('pisell2.product-select.stock'), "\uFF1A").concat(item.stock_quantity);
|
|
57
56
|
};
|
|
58
57
|
var renderPrice = function renderPrice(item) {
|
|
59
|
-
|
|
60
|
-
_original_price = item.original_price,
|
|
61
|
-
is_bundle = item.is_bundle,
|
|
62
|
-
minimum_markup_price = item.minimum_markup_price;
|
|
63
|
-
var price = _price;
|
|
64
|
-
var original_price = _original_price;
|
|
65
|
-
if (is_bundle) {
|
|
66
|
-
price = new Decimal(price).plus(new Decimal(minimum_markup_price)).toFixed(2);
|
|
67
|
-
original_price = new Decimal(original_price).plus(new Decimal(minimum_markup_price)).toFixed(2);
|
|
68
|
-
}
|
|
69
|
-
if (!showZeroPrice && !parseFloat(price)) return null;
|
|
58
|
+
if (!showZeroPrice && !parseFloat(item.price)) return null;
|
|
70
59
|
return !!isPrice || !!isOriginPrice ? /*#__PURE__*/React.createElement("div", {
|
|
71
60
|
className: "price-info"
|
|
72
61
|
}, isPrice ? /*#__PURE__*/React.createElement("div", {
|
|
73
62
|
className: "price"
|
|
74
|
-
}, /*#__PURE__*/React.createElement(
|
|
75
|
-
value: price
|
|
76
|
-
|
|
77
|
-
})) : null, !!isOriginPrice && parseFloat(original_price) ? /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
}, /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
64
|
+
value: item.price
|
|
65
|
+
})) : null, !!isOriginPrice && parseFloat(item.original_price) ? /*#__PURE__*/React.createElement("div", {
|
|
78
66
|
className: "original-price"
|
|
79
|
-
}, /*#__PURE__*/React.createElement(
|
|
80
|
-
value: original_price
|
|
81
|
-
isMini: is_bundle
|
|
67
|
+
}, /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
68
|
+
value: item.original_price
|
|
82
69
|
})) : null) : null;
|
|
83
70
|
};
|
|
84
71
|
var renderItem = function renderItem(item) {
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.product-card {
|
|
20
|
-
user-select: none;
|
|
21
20
|
cursor: pointer;
|
|
22
21
|
border-radius: 12px;
|
|
23
22
|
background: var(--ps-card-bg, #fff);
|
|
@@ -196,19 +195,7 @@
|
|
|
196
195
|
font-style: normal;
|
|
197
196
|
font-weight: 400;
|
|
198
197
|
line-height: 24px;
|
|
199
|
-
|
|
200
|
-
position: relative;
|
|
201
|
-
&::before {
|
|
202
|
-
content: '';
|
|
203
|
-
display: block;
|
|
204
|
-
position: absolute;
|
|
205
|
-
top: 50%;
|
|
206
|
-
left: 0;
|
|
207
|
-
width: 100%;
|
|
208
|
-
height: 1px;
|
|
209
|
-
background-color: #4e4e4e;
|
|
210
|
-
transform: translateY(-50%);
|
|
211
|
-
}
|
|
198
|
+
text-decoration-line: line-through;
|
|
212
199
|
|
|
213
200
|
> span {
|
|
214
201
|
vertical-align: middle;
|
|
@@ -58,13 +58,14 @@
|
|
|
58
58
|
.booking-pisell-tabs-tab {
|
|
59
59
|
.booking-pisell-tabs-tab-content {
|
|
60
60
|
background: var(--ps-tab-item-bg, #ffffff) !important;
|
|
61
|
-
font-weight:
|
|
61
|
+
font-weight: 400;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.booking-pisell-tabs-tab-active {
|
|
66
66
|
.booking-pisell-tabs-tab-content {
|
|
67
67
|
background: var(--ps-tab-item-active-bg, #8157d5) !important;
|
|
68
|
+
font-weight: 600;
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -20,6 +20,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
20
20
|
import { getUniqueId, locales } from '@pisell/utils';
|
|
21
21
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
22
22
|
import { useMemoizedFn } from 'ahooks';
|
|
23
|
+
import { PisellToast } from '@pisell/materials';
|
|
23
24
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
24
25
|
import { isSessionProduct, request, getProductTotalPrice, getIsEject } from "../../../booking/utils";
|
|
25
26
|
import { getProductExtend } from "../../../booking/info2/service/addService/utils";
|
|
@@ -30,16 +31,16 @@ import { getProductDetail } from "../../../booking/info/service/serve";
|
|
|
30
31
|
import { useService } from "../../../booking/info/service/serviceManager";
|
|
31
32
|
import ProductSelect from "../../../productSelect";
|
|
32
33
|
import "./index.less";
|
|
33
|
-
import { addService
|
|
34
|
+
import { addService } from "../../utils";
|
|
34
35
|
import NotAvailable from "../notAvailable";
|
|
35
36
|
var AddSerivce = function AddSerivce(props) {
|
|
36
|
-
var _context$appHelper
|
|
37
|
+
var _context$appHelper$ut, _context$appHelper$ut2, _state$bookingConfig2, _state$client2, _state$service5, _state$service6;
|
|
37
38
|
var onEdit = props.onEdit,
|
|
38
39
|
state = props.state,
|
|
39
40
|
dispatch = props.dispatch,
|
|
40
41
|
_props$renderMode = props.renderMode,
|
|
41
42
|
renderMode = _props$renderMode === void 0 ? 'current' : _props$renderMode;
|
|
42
|
-
var _useState = useState(
|
|
43
|
+
var _useState = useState(false),
|
|
43
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44
45
|
loading = _useState2[0],
|
|
45
46
|
setLoading = _useState2[1];
|
|
@@ -47,7 +48,6 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
47
48
|
var notAvailableRef = useRef(null);
|
|
48
49
|
var isLoadedServiceRef = useRef(false);
|
|
49
50
|
request.setRequest(context.appHelper.utils.request);
|
|
50
|
-
var Toast = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.Toast;
|
|
51
51
|
var _useService = useService({
|
|
52
52
|
renderMode: renderMode,
|
|
53
53
|
onEdit: onEdit,
|
|
@@ -287,7 +287,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
287
287
|
},
|
|
288
288
|
callback: function () {
|
|
289
289
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e, extension_type, detail) {
|
|
290
|
-
var data, _detail, other, cacheItem, _total, _isEdit, _state$service$cacheI,
|
|
290
|
+
var data, _detail, other, cacheItem, _total, _isEdit, _state$service$cacheI, _list;
|
|
291
291
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
292
292
|
while (1) switch (_context3.prev = _context3.next) {
|
|
293
293
|
case 0:
|
|
@@ -356,23 +356,17 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
356
356
|
}
|
|
357
357
|
cacheItem = getProductExtend({
|
|
358
358
|
cacheItem: cacheItem,
|
|
359
|
-
state: state
|
|
360
|
-
isDisabledTime: true
|
|
359
|
+
state: state
|
|
361
360
|
});
|
|
362
361
|
if (state.renderType === 'eventBooking') {
|
|
363
362
|
cacheItem.autoClose = false;
|
|
364
363
|
}
|
|
365
364
|
if (cacheItem.autoClose) {
|
|
366
365
|
cacheItem.autoClose = false;
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
className: "add-toast-title"
|
|
372
|
-
}, cacheItem.title), /*#__PURE__*/React.createElement("div", {
|
|
373
|
-
className: "add-toast-quantity"
|
|
374
|
-
}, locales.getText('pisell2.ticket-booking.in-cart')(quantity || 1))));
|
|
375
|
-
addServiceScroll(e.rowKey, cacheItem);
|
|
366
|
+
_list = addService(state.service.value, cacheItem);
|
|
367
|
+
PisellToast({
|
|
368
|
+
content: locales.getText('pisell2.ticket-booking.add-to-cart')
|
|
369
|
+
});
|
|
376
370
|
dispatch({
|
|
377
371
|
type: 'setService',
|
|
378
372
|
payload: {
|
|
@@ -286,7 +286,6 @@ var TicketBooking = function TicketBooking() {
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
_modalState.service.value = [];
|
|
290
289
|
_modalState.service.cacheItem = null;
|
|
291
290
|
_modalState.service.addTimeModal = false;
|
|
292
291
|
_modalState.service.changeService = false;
|
|
@@ -809,8 +808,7 @@ var TicketBooking = function TicketBooking() {
|
|
|
809
808
|
locale: engineProps.locale,
|
|
810
809
|
refreshData: _refreshData,
|
|
811
810
|
setActiveTab: _setActiveTab,
|
|
812
|
-
clearAllValue: _clearAllValue
|
|
813
|
-
drawerMask: true
|
|
811
|
+
clearAllValue: _clearAllValue
|
|
814
812
|
}),
|
|
815
813
|
setGlobalState: _setModalState,
|
|
816
814
|
setState: setState,
|
|
@@ -8,7 +8,6 @@ import React, { useLayoutEffect, useMemo, useRef } from 'react';
|
|
|
8
8
|
import { Provider, createStore } from "./miniRedux";
|
|
9
9
|
import { locales } from '@pisell/utils';
|
|
10
10
|
import dayjs from 'dayjs';
|
|
11
|
-
import { cloneDeep } from 'lodash';
|
|
12
11
|
import TicketBooking from "./components/ticketBooking/index";
|
|
13
12
|
import { request } from "../../utils";
|
|
14
13
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
@@ -142,7 +141,7 @@ export default (function (props) {
|
|
|
142
141
|
request.setRequest(context.appHelper.utils.request);
|
|
143
142
|
}, []);
|
|
144
143
|
useMemo(function () {
|
|
145
|
-
var store = createStore(_objectSpread(_objectSpread({},
|
|
144
|
+
var store = createStore(_objectSpread(_objectSpread({}, initialState), {}, {
|
|
146
145
|
bookingConfigParams: bookingConfigParams,
|
|
147
146
|
productExtensionType: productExtensionType
|
|
148
147
|
}));
|
|
@@ -47,7 +47,6 @@ declare const _default: {
|
|
|
47
47
|
"pisell2.ticket-booking.add-to-cart": string;
|
|
48
48
|
"pisell2.ticket-booking.not-available-title": string;
|
|
49
49
|
"pisell2.ticket-booking.not-available-ok": string;
|
|
50
|
-
"pisell2.ticket-booking.in-cart": (number: number) => string;
|
|
51
50
|
};
|
|
52
51
|
"zh-CN": {
|
|
53
52
|
"pisell2.ticket-booking.info": string;
|
|
@@ -97,7 +96,6 @@ declare const _default: {
|
|
|
97
96
|
"pisell2.ticket-booking.add-to-cart": string;
|
|
98
97
|
"pisell2.ticket-booking.not-available-title": string;
|
|
99
98
|
"pisell2.ticket-booking.not-available-ok": string;
|
|
100
|
-
"pisell2.ticket-booking.in-cart": (number: number) => string;
|
|
101
99
|
};
|
|
102
100
|
"zh-HK": {
|
|
103
101
|
"pisell2.ticket-booking.info": string;
|
|
@@ -147,7 +145,6 @@ declare const _default: {
|
|
|
147
145
|
"pisell2.ticket-booking.add-to-cart": string;
|
|
148
146
|
"pisell2.ticket-booking.not-available-title": string;
|
|
149
147
|
"pisell2.ticket-booking.not-available-ok": string;
|
|
150
|
-
"pisell2.ticket-booking.in-cart": (number: number) => string;
|
|
151
148
|
};
|
|
152
149
|
};
|
|
153
150
|
export default _default;
|
|
@@ -46,10 +46,7 @@ export default {
|
|
|
46
46
|
"pisell2.ticket-booking.create-new": "Create new",
|
|
47
47
|
"pisell2.ticket-booking.add-to-cart": "Added to Cart",
|
|
48
48
|
"pisell2.ticket-booking.not-available-title": "Sorry, Not available at current time.",
|
|
49
|
-
"pisell2.ticket-booking.not-available-ok": "OK"
|
|
50
|
-
"pisell2.ticket-booking.in-cart": function pisell2TicketBookingInCart(number) {
|
|
51
|
-
return "".concat(number, " in cart");
|
|
52
|
-
}
|
|
49
|
+
"pisell2.ticket-booking.not-available-ok": "OK"
|
|
53
50
|
},
|
|
54
51
|
"zh-CN": {
|
|
55
52
|
"pisell2.ticket-booking.info": "信息",
|
|
@@ -98,10 +95,7 @@ export default {
|
|
|
98
95
|
"pisell2.ticket-booking.create-new": "新建",
|
|
99
96
|
"pisell2.ticket-booking.add-to-cart": "已加入购物车",
|
|
100
97
|
"pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售时间。",
|
|
101
|
-
"pisell2.ticket-booking.not-available-ok": "好的"
|
|
102
|
-
"pisell2.ticket-booking.in-cart": function pisell2TicketBookingInCart(number) {
|
|
103
|
-
return "\u5DF2\u6709".concat(number, "\u4EF6");
|
|
104
|
-
}
|
|
98
|
+
"pisell2.ticket-booking.not-available-ok": "好的"
|
|
105
99
|
},
|
|
106
100
|
"zh-HK": {
|
|
107
101
|
"pisell2.ticket-booking.info": "資訊",
|
|
@@ -150,9 +144,6 @@ export default {
|
|
|
150
144
|
"pisell2.ticket-booking.create-new": "新建",
|
|
151
145
|
"pisell2.ticket-booking.add-to-cart": "已加入购物车",
|
|
152
146
|
"pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售時間。",
|
|
153
|
-
"pisell2.ticket-booking.not-available-ok": "好的"
|
|
154
|
-
"pisell2.ticket-booking.in-cart": function pisell2TicketBookingInCart(number) {
|
|
155
|
-
return "\u5DF2\u6709".concat(number, "\u4EF6");
|
|
156
|
-
}
|
|
147
|
+
"pisell2.ticket-booking.not-available-ok": "好的"
|
|
157
148
|
}
|
|
158
149
|
};
|
|
@@ -12,8 +12,4 @@ export declare const restoreProductOtherData: (data: any) => {
|
|
|
12
12
|
product_variant_id: number;
|
|
13
13
|
quantity: number;
|
|
14
14
|
} | undefined;
|
|
15
|
-
export declare const addService: (list: any[], addItem: any) =>
|
|
16
|
-
list: any[];
|
|
17
|
-
quantity: any;
|
|
18
|
-
};
|
|
19
|
-
export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
|
|
15
|
+
export declare const addService: (list: any[], addItem: any) => any[];
|