@pisell/private-materials 3.3.26 → 3.3.27
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 +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 +5 -5
- package/es/components/Sales/Customer/index.js +3 -1
- package/es/components/Sales/Event/Detail.js +5 -1
- package/es/components/Sales/Event/serve.d.ts +3 -0
- package/es/components/Sales/Init/index.d.ts +1 -0
- package/es/components/Sales/Init/index.js +3 -2
- package/es/components/Sales/Step/index.d.ts +2 -0
- package/es/components/Sales/Step/index.js +13 -4
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +5 -5
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Services/index.js +2 -0
- package/es/components/appointmentBooking/deposit/index.js +2 -2
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/utils.js +16 -15
- package/es/components/booking/hooks/useQuotation.d.ts +4 -0
- package/es/components/booking/hooks/useQuotation.js +256 -0
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.js +4 -4
- package/es/components/booking/info/service/editService/index.js +6 -3
- package/es/components/booking/info/service/index.js +4 -1
- package/es/components/booking/info/service2/Group/utils.js +1 -1
- package/es/components/booking/info/service2/hooks/useSelectPet.js +6 -4
- package/es/components/booking/info/service2/index.js +4 -1
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +29 -9
- package/es/components/booking/info2/service/editService/index.js +2 -0
- package/es/components/booking/info2/service/index.js +4 -1
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +9 -3
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +122 -31
- package/es/components/eventBooking/components/Provider/Event/index.js +20 -4
- package/es/components/eventBooking/components/Provider/Resource/index.js +26 -5
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +2 -2
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +1 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.js +5 -2
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.js +7 -2
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +60 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +59 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/index.js +30 -21
- package/es/components/eventBooking/components/scheduleCalendar/index.less +2 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/eventBooking/index.js +2 -2
- package/es/components/eventBooking/locales.d.ts +6 -0
- package/es/components/eventBooking/locales.js +166 -160
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +3 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +73 -20
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +60 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +98 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +34 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
- package/es/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
- package/es/components/pay/toC/WalletPassBlock/index.js +119 -21
- package/es/components/pay/toC/WalletPassBlock/index.less +82 -13
- package/es/components/pay/toC/index.js +138 -89
- package/es/components/pay/toC/locales.d.ts +69 -3
- package/es/components/pay/toC/locales.js +132 -6
- package/es/components/pay/toC/model.d.ts +4 -0
- package/es/components/pay/toC/model.js +9 -0
- package/es/components/pay/toC/serve.d.ts +23 -0
- package/es/components/pay/toC/serve.js +34 -2
- package/es/components/pay/toC/utils.d.ts +3 -1
- package/es/components/pay/toC/utils.js +8 -3
- package/es/components/productSelect/components/productGroup/index.less +4 -12
- package/es/components/productSelect/index.less +1 -1
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +15 -20
- package/es/components/ticketBooking/components/menuBar/index.less +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -4
- package/es/hooks/useLocale.d.ts +2 -0
- package/es/hooks/useLocale.js +7 -0
- package/es/hooks/useLoginUser.d.ts +2 -0
- package/es/hooks/useLoginUser.js +19 -0
- package/lib/components/Sales/Customer/index.js +3 -1
- package/lib/components/Sales/Event/Detail.js +5 -1
- package/lib/components/Sales/Event/serve.d.ts +3 -0
- package/lib/components/Sales/Init/index.d.ts +1 -0
- package/lib/components/Sales/Init/index.js +3 -2
- package/lib/components/Sales/Step/index.d.ts +2 -0
- package/lib/components/Sales/Step/index.js +13 -4
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +2 -2
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Services/index.js +2 -0
- package/lib/components/appointmentBooking/deposit/index.js +2 -2
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.js +5 -4
- package/lib/components/booking/hooks/useQuotation.d.ts +4 -0
- package/lib/components/booking/hooks/useQuotation.js +210 -0
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.js +2 -3
- package/lib/components/booking/info/service/editService/index.js +5 -2
- package/lib/components/booking/info/service/index.js +3 -1
- package/lib/components/booking/info/service2/Group/utils.js +2 -2
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +5 -3
- package/lib/components/booking/info/service2/index.js +3 -1
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +25 -17
- package/lib/components/booking/info2/service/editService/index.js +2 -1
- package/lib/components/booking/info2/service/index.js +3 -1
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +9 -3
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +52 -4
- package/lib/components/eventBooking/components/Provider/Event/index.js +15 -3
- package/lib/components/eventBooking/components/Provider/Resource/index.js +16 -3
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +2 -2
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +7 -7
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.js +3 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.js +6 -5
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +75 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +64 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/index.js +17 -11
- package/lib/components/eventBooking/components/scheduleCalendar/index.less +2 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/eventBooking/index.js +2 -2
- package/lib/components/eventBooking/locales.d.ts +6 -0
- package/lib/components/eventBooking/locales.js +10 -4
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +2 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +52 -11
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +87 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +103 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +52 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
- package/lib/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +115 -20
- package/lib/components/pay/toC/WalletPassBlock/index.less +82 -13
- package/lib/components/pay/toC/index.js +35 -9
- package/lib/components/pay/toC/locales.d.ts +69 -3
- package/lib/components/pay/toC/locales.js +72 -6
- package/lib/components/pay/toC/model.d.ts +4 -0
- package/lib/components/pay/toC/model.js +10 -0
- package/lib/components/pay/toC/serve.d.ts +23 -0
- package/lib/components/pay/toC/serve.js +12 -6
- package/lib/components/pay/toC/utils.d.ts +3 -1
- package/lib/components/pay/toC/utils.js +8 -3
- package/lib/components/productSelect/components/productGroup/index.less +4 -12
- package/lib/components/productSelect/index.less +1 -1
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +13 -16
- package/lib/components/ticketBooking/components/menuBar/index.less +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -4
- package/lib/hooks/useLocale.d.ts +2 -0
- package/lib/hooks/useLocale.js +41 -0
- package/lib/hooks/useLoginUser.d.ts +2 -0
- package/lib/hooks/useLoginUser.js +50 -0
- package/package.json +3 -3
|
@@ -39,7 +39,7 @@ import { getNoResource } from "../../../mock";
|
|
|
39
39
|
import { getDays, getErrorList, getProductTotalPrice, isSessionProduct } from "../../../utils";
|
|
40
40
|
import { createBookingItemsByGroup, filterItemByGroupId, getGroupTotalPrice, isGroupBooking } from "../../service2/Group/utils";
|
|
41
41
|
import useSelectPet from "../../service2/hooks/useSelectPet";
|
|
42
|
-
import { disabledDate as _disabledDate, formatDayTime, isDayBooking, isDayBookingProduct, isEventBooking } from "../../service2/utils";
|
|
42
|
+
import { disabledDate as _disabledDate, formatDayTime, isDayBooking, isDayBookingProduct, isDaysBooking, isEventBooking } from "../../service2/utils";
|
|
43
43
|
import { formatResources, getDurationProps, getFlexibleOption, getMultiDay, getTimeObj } from "../addService/utils";
|
|
44
44
|
import Like from "../like";
|
|
45
45
|
import { editSessionProduct, getMultiDayPrices } from "../../utils";
|
|
@@ -86,6 +86,9 @@ var Info = function Info(_, ref) {
|
|
|
86
86
|
var isDayBookingMode = useMemo(function () {
|
|
87
87
|
return isDayBooking(state);
|
|
88
88
|
}, [state === null || state === void 0 ? void 0 : state.renderType]);
|
|
89
|
+
var isDaysBookingMode = useMemo(function () {
|
|
90
|
+
return isDaysBooking(state);
|
|
91
|
+
}, [state === null || state === void 0 ? void 0 : state.renderType]);
|
|
89
92
|
var isEventBookingMode = useMemo(function () {
|
|
90
93
|
return isEventBooking(state);
|
|
91
94
|
}, [state === null || state === void 0 ? void 0 : state.renderType]);
|
|
@@ -692,7 +695,7 @@ var Info = function Info(_, ref) {
|
|
|
692
695
|
},
|
|
693
696
|
value: _objectSpread(_objectSpread(_objectSpread({}, ((_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.other) || {}), dayValue), sessionValue),
|
|
694
697
|
isOS: isSession,
|
|
695
|
-
customer_id:
|
|
698
|
+
customer_id: (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id
|
|
696
699
|
},
|
|
697
700
|
callback: function () {
|
|
698
701
|
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e, extension_type, detail) {
|
|
@@ -733,7 +736,7 @@ var Info = function Info(_, ref) {
|
|
|
733
736
|
cacheItem: cacheItem
|
|
734
737
|
}
|
|
735
738
|
});
|
|
736
|
-
if (
|
|
739
|
+
if (isDaysBookingMode) {
|
|
737
740
|
setTimeout(function () {
|
|
738
741
|
updateMultiDay({
|
|
739
742
|
start_date: values.start_date,
|
|
@@ -6,6 +6,7 @@ import "./index.less";
|
|
|
6
6
|
import ServiceList from "./serviceList";
|
|
7
7
|
import AddTimeModal from "./addTimeModal";
|
|
8
8
|
import useClearCart from "../../hooks/useClearCart";
|
|
9
|
+
import useQuotation from "../../hooks/useQuotation";
|
|
9
10
|
var Service = function Service() {
|
|
10
11
|
var _state$bookingConfig2;
|
|
11
12
|
var _useContext = useContext(Context),
|
|
@@ -45,6 +46,8 @@ var Service = function Service() {
|
|
|
45
46
|
}, 100);
|
|
46
47
|
};
|
|
47
48
|
var clearCart = useClearCart(state, dispatch);
|
|
49
|
+
var _useQuotation = useQuotation(state, dispatch),
|
|
50
|
+
dom = _useQuotation.dom;
|
|
48
51
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
49
52
|
className: "pisell-lowcode__booking-service-wrap"
|
|
50
53
|
}, clearCart, /*#__PURE__*/React.createElement(ServiceList, {
|
|
@@ -53,6 +56,6 @@ var Service = function Service() {
|
|
|
53
56
|
onEdit: handleEdit
|
|
54
57
|
}) : null), /*#__PURE__*/React.createElement(EditService, {
|
|
55
58
|
ref: detailRef
|
|
56
|
-
}), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null));
|
|
59
|
+
}), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null), dom);
|
|
57
60
|
};
|
|
58
61
|
export default /*#__PURE__*/React.memo(Service);
|
|
@@ -85,7 +85,7 @@ export var createBookingItemsByGroup = function createBookingItemsByGroup(item,
|
|
|
85
85
|
var startDate = _extend.start_date.add(i, 'day');
|
|
86
86
|
var endDate = _extend.start_date.add(i + 1, 'day');
|
|
87
87
|
// 商品原始价格
|
|
88
|
-
var price = ((_extend$multiDayPrice = _extend.multiDayPrices[startDate.format('YYYY-MM-DD')]) === null || _extend$multiDayPrice === void 0 ? void 0 : _extend$multiDayPrice.total) || item._extend.price;
|
|
88
|
+
var price = ((_extend$multiDayPrice = _extend.multiDayPrices) === null || _extend$multiDayPrice === void 0 || (_extend$multiDayPrice = _extend$multiDayPrice[startDate.format('YYYY-MM-DD')]) === null || _extend$multiDayPrice === void 0 ? void 0 : _extend$multiDayPrice.total) || item._extend.price;
|
|
89
89
|
var cacheItem = _objectSpread(_objectSpread({}, item), {}, {
|
|
90
90
|
// 编辑时组商品需要清空booking_id 否则会重复
|
|
91
91
|
booking_id: isBatchEdit ? 0 : item.booking_id,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import { formatHolderLists,
|
|
2
|
+
import { formatHolderLists, isDayBooking } from "../utils";
|
|
3
3
|
var useSelectPet = function useSelectPet(state) {
|
|
4
4
|
var _state$pet2, _state$pet4;
|
|
5
5
|
var isDaysBookingBol = useMemo(function () {
|
|
6
|
-
return
|
|
6
|
+
return isDayBooking(state);
|
|
7
7
|
}, [state === null || state === void 0 ? void 0 : state.renderType]);
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -30,9 +30,11 @@ var useSelectPet = function useSelectPet(state) {
|
|
|
30
30
|
*/
|
|
31
31
|
var holderLists = useMemo(function () {
|
|
32
32
|
var _state$pet3;
|
|
33
|
+
var _lists = formatHolderLists(petLists);
|
|
34
|
+
return _lists;
|
|
33
35
|
if (isDaysBookingBol) {
|
|
34
|
-
var
|
|
35
|
-
return
|
|
36
|
+
var _lists2 = formatHolderLists(petLists);
|
|
37
|
+
return _lists2;
|
|
36
38
|
}
|
|
37
39
|
return (state === null || state === void 0 || (_state$pet3 = state.pet) === null || _state$pet3 === void 0 ? void 0 : _state$pet3.holders) || [];
|
|
38
40
|
}, [petLists, isDaysBookingBol, state === null || state === void 0 || (_state$pet4 = state.pet) === null || _state$pet4 === void 0 ? void 0 : _state$pet4.holders]);
|
|
@@ -9,6 +9,7 @@ import AddService from "../service/addService";
|
|
|
9
9
|
import EditService from "../service/editService";
|
|
10
10
|
import { Context } from "../model";
|
|
11
11
|
import Lists from "./Lists";
|
|
12
|
+
import useQuotation from "../../hooks/useQuotation";
|
|
12
13
|
export var Service2Context = /*#__PURE__*/createContext({});
|
|
13
14
|
export var Service2Cart = function Service2Cart(_ref) {
|
|
14
15
|
var hideAdd = _ref.hideAdd,
|
|
@@ -42,6 +43,8 @@ export var Service2Cart = function Service2Cart(_ref) {
|
|
|
42
43
|
(_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 || (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 || _detailRef$current$in.call(_detailRef$current, cacheItem);
|
|
43
44
|
}, 100);
|
|
44
45
|
};
|
|
46
|
+
var _useQuotation = useQuotation(state, dispatch),
|
|
47
|
+
dom = _useQuotation.dom;
|
|
45
48
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
46
49
|
className: "pisell-lowcode__booking-service-wrap"
|
|
47
50
|
}, /*#__PURE__*/React.createElement(Lists, {
|
|
@@ -53,5 +56,5 @@ export var Service2Cart = function Service2Cart(_ref) {
|
|
|
53
56
|
onEdit: handleEdit
|
|
54
57
|
})), !hideEdit && /*#__PURE__*/React.createElement(EditService, {
|
|
55
58
|
ref: detailRef
|
|
56
|
-
}));
|
|
59
|
+
}), dom);
|
|
57
60
|
};
|
|
@@ -35,7 +35,7 @@ import { locales, getUniqueId } from '@pisell/utils';
|
|
|
35
35
|
import { useUpdateEffect } from 'ahooks';
|
|
36
36
|
var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978, 7386, 6848, 6305];
|
|
37
37
|
var Info = function Info(props) {
|
|
38
|
-
var _state$service2, _state$service4, _state$service5;
|
|
38
|
+
var _state$client2, _state$service2, _state$service4, _state$service5;
|
|
39
39
|
var onEdit = props.onEdit,
|
|
40
40
|
drawerProps = props.drawerProps,
|
|
41
41
|
renderMode = props.renderMode;
|
|
@@ -56,6 +56,20 @@ var Info = function Info(props) {
|
|
|
56
56
|
dispatch = dispatch || (props === null || props === void 0 ? void 0 : props.dispatch);
|
|
57
57
|
request.setRequest(context.appHelper.utils.request);
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @title: 客户id
|
|
61
|
+
* @description:
|
|
62
|
+
* @param {*} useMemo
|
|
63
|
+
* @return {*}
|
|
64
|
+
* @Author: WangHan
|
|
65
|
+
* @Date: 2024-12-24 10:33
|
|
66
|
+
*/
|
|
67
|
+
var customerId = useMemo(function () {
|
|
68
|
+
var _state$client;
|
|
69
|
+
return ((_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id) || undefined;
|
|
70
|
+
}, [(_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.value) === null || _state$client2 === void 0 ? void 0 : _state$client2.id]);
|
|
71
|
+
console.log(customerId, 'customerIdcustomerId');
|
|
72
|
+
|
|
59
73
|
/**
|
|
60
74
|
* @title: 如果商品只有一个, 则自动设置默认商品
|
|
61
75
|
* @description:
|
|
@@ -182,7 +196,8 @@ var Info = function Info(props) {
|
|
|
182
196
|
with_count: ['bundleGroup', 'optionGroup'],
|
|
183
197
|
order_by_string: 'sort:desc',
|
|
184
198
|
status: 'published',
|
|
185
|
-
schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date
|
|
199
|
+
schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date,
|
|
200
|
+
customer_id: params === null || params === void 0 ? void 0 : params.customer_id
|
|
186
201
|
});
|
|
187
202
|
case 7:
|
|
188
203
|
data = _context2.sent;
|
|
@@ -223,6 +238,7 @@ var Info = function Info(props) {
|
|
|
223
238
|
}
|
|
224
239
|
};
|
|
225
240
|
var handleSelectProduct = function handleSelectProduct(item, type) {
|
|
241
|
+
var _state$client3;
|
|
226
242
|
var isSession = isSessionProduct(item);
|
|
227
243
|
// 是否有单规格 组合规格 套餐, 或者session商品 如果没有不需要打开弹窗
|
|
228
244
|
var isEject = type === 'detail' || item.bundle_group_count > 0 || isSession;
|
|
@@ -239,7 +255,8 @@ var Info = function Info(props) {
|
|
|
239
255
|
package: true
|
|
240
256
|
},
|
|
241
257
|
is_eject: isEject ? 1 : 0,
|
|
242
|
-
isOS: isSession
|
|
258
|
+
isOS: isSession,
|
|
259
|
+
customer_id: (_state$client3 = state.client) === null || _state$client3 === void 0 || (_state$client3 = _state$client3.value) === null || _state$client3 === void 0 ? void 0 : _state$client3.id
|
|
243
260
|
},
|
|
244
261
|
callback: function callback(e, extension_type, detail) {
|
|
245
262
|
// 防止选择商品弹窗多次触发callback
|
|
@@ -369,25 +386,28 @@ var Info = function Info(props) {
|
|
|
369
386
|
useUpdateEffect(function () {
|
|
370
387
|
if (state.service.addModal) {
|
|
371
388
|
getServices({
|
|
372
|
-
schedule_date: currentDate
|
|
389
|
+
schedule_date: currentDate,
|
|
390
|
+
customer_id: customerId
|
|
373
391
|
});
|
|
374
392
|
setSearch('');
|
|
375
393
|
}
|
|
376
|
-
}, [state.service.addModal, currentDate]);
|
|
394
|
+
}, [state.service.addModal, currentDate, customerId]);
|
|
377
395
|
useEffect(function () {
|
|
378
396
|
if (renderMode === 'current') {
|
|
379
397
|
getServices({
|
|
380
|
-
schedule_date: currentDate
|
|
398
|
+
schedule_date: currentDate,
|
|
399
|
+
customer_id: customerId
|
|
381
400
|
});
|
|
382
401
|
}
|
|
383
|
-
}, [renderMode, currentDate]);
|
|
402
|
+
}, [renderMode, currentDate, customerId]);
|
|
384
403
|
useEffect(function () {
|
|
385
404
|
if (state.renderType === 'eventBooking' && state.modalOpen) {
|
|
386
405
|
getServices({
|
|
387
|
-
schedule_date: currentDate
|
|
406
|
+
schedule_date: currentDate,
|
|
407
|
+
customer_id: customerId
|
|
388
408
|
});
|
|
389
409
|
}
|
|
390
|
-
}, [state.renderType, state.modalOpen, currentDate]);
|
|
410
|
+
}, [state.renderType, state.modalOpen, currentDate, customerId]);
|
|
391
411
|
var addButton = useMemo(function () {
|
|
392
412
|
if (state.isBookingCreatePage) {
|
|
393
413
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -386,6 +386,7 @@ var Info = function Info(_, ref) {
|
|
|
386
386
|
* @Date: 2024-08-28 17:08
|
|
387
387
|
*/
|
|
388
388
|
var handleEdit = function handleEdit(e) {
|
|
389
|
+
var _state$client;
|
|
389
390
|
// 当前商品
|
|
390
391
|
var item = state.service.cacheItem;
|
|
391
392
|
|
|
@@ -415,6 +416,7 @@ var Info = function Info(_, ref) {
|
|
|
415
416
|
package: true
|
|
416
417
|
},
|
|
417
418
|
isOS: isSession,
|
|
419
|
+
customer_id: (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id,
|
|
418
420
|
value: _objectSpread(_objectSpread({}, item._extend.other), sessionValue)
|
|
419
421
|
},
|
|
420
422
|
callback: function callback(e, extension_type, detail) {
|
|
@@ -7,6 +7,7 @@ import AddTimeModal from "./addTimeModal";
|
|
|
7
7
|
import useInfoHolder from "../../info/hooks/useInfoHolder";
|
|
8
8
|
import Lists from "../../info/service/Lists";
|
|
9
9
|
import useClearCart from "../../hooks/useClearCart";
|
|
10
|
+
import useQuotation from "../../hooks/useQuotation";
|
|
10
11
|
var Service = function Service() {
|
|
11
12
|
var _useContext = useContext(Context),
|
|
12
13
|
state = _useContext.state,
|
|
@@ -21,6 +22,8 @@ var Service = function Service() {
|
|
|
21
22
|
document.body.id = 'body';
|
|
22
23
|
}, []);
|
|
23
24
|
var clearCart = useClearCart(state, dispatch);
|
|
25
|
+
var _useQuotation = useQuotation(state, dispatch),
|
|
26
|
+
dom = _useQuotation.dom;
|
|
24
27
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
25
28
|
className: "pisell-lowcode__booking-service-wrap"
|
|
26
29
|
}, clearCart, /*#__PURE__*/React.createElement(Lists, {
|
|
@@ -34,6 +37,6 @@ var Service = function Service() {
|
|
|
34
37
|
onEdit: handleEdit
|
|
35
38
|
}) : null), /*#__PURE__*/React.createElement(EditService, {
|
|
36
39
|
ref: detailRef
|
|
37
|
-
}), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null));
|
|
40
|
+
}), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null), dom);
|
|
38
41
|
};
|
|
39
42
|
export default /*#__PURE__*/React.memo(Service);
|
|
@@ -266,6 +266,8 @@ declare const _default: {
|
|
|
266
266
|
'pisell2.text.validity.expired': (str: string) => string;
|
|
267
267
|
'pisell2.text.validity.expiring_soon': (str: string) => string;
|
|
268
268
|
'pisell2.text.validity.valid_through': (str: string) => string;
|
|
269
|
+
'pisell2.text.quotation.product.change.title': string;
|
|
270
|
+
'pisell2.text.quotation.product.change.describe': string;
|
|
269
271
|
};
|
|
270
272
|
'zh-CN': {
|
|
271
273
|
'pisell2.text.refunded-amount': string;
|
|
@@ -534,6 +536,8 @@ declare const _default: {
|
|
|
534
536
|
'pisell2.text.validity.expired': (str: string) => string;
|
|
535
537
|
'pisell2.text.validity.expiring_soon': (str: string) => string;
|
|
536
538
|
'pisell2.text.validity.valid_through': (str: string) => string;
|
|
539
|
+
'pisell2.text.quotation.product.change.title': string;
|
|
540
|
+
'pisell2.text.quotation.product.change.describe': string;
|
|
537
541
|
};
|
|
538
542
|
'zh-HK': {
|
|
539
543
|
'pisell2.text.refunded-amount': string;
|
|
@@ -802,6 +806,8 @@ declare const _default: {
|
|
|
802
806
|
'pisell2.text.validity.expired': (str: string) => string;
|
|
803
807
|
'pisell2.text.validity.expiring_soon': (str: string) => string;
|
|
804
808
|
'pisell2.text.validity.valid_through': (str: string) => string;
|
|
809
|
+
'pisell2.text.quotation.product.change.title': string;
|
|
810
|
+
'pisell2.text.quotation.product.change.describe': string;
|
|
805
811
|
};
|
|
806
812
|
};
|
|
807
813
|
export default _default;
|
|
@@ -308,7 +308,9 @@ export default {
|
|
|
308
308
|
},
|
|
309
309
|
'pisell2.text.validity.valid_through': function pisell2TextValidityValid_through(str) {
|
|
310
310
|
return "Valid through ".concat(str);
|
|
311
|
-
}
|
|
311
|
+
},
|
|
312
|
+
'pisell2.text.quotation.product.change.title': "Notification",
|
|
313
|
+
'pisell2.text.quotation.product.change.describe': "Product updates available: Please refresh the following items to load the latest data."
|
|
312
314
|
},
|
|
313
315
|
'zh-CN': {
|
|
314
316
|
'pisell2.text.refunded-amount': '已退金额',
|
|
@@ -623,7 +625,9 @@ export default {
|
|
|
623
625
|
},
|
|
624
626
|
'pisell2.text.validity.valid_through': function pisell2TextValidityValid_through(str) {
|
|
625
627
|
return "\u6709\u6548\u671F\u81F3 ".concat(str, " \uFF08\u542B\u5F53\u65E5\uFF09");
|
|
626
|
-
}
|
|
628
|
+
},
|
|
629
|
+
'pisell2.text.quotation.product.change.title': "提示",
|
|
630
|
+
'pisell2.text.quotation.product.change.describe': "以下商品信息已更新,请重新编辑相关商品以同步最新数据。"
|
|
627
631
|
},
|
|
628
632
|
'zh-HK': {
|
|
629
633
|
'pisell2.text.refunded-amount': '已退金額',
|
|
@@ -938,6 +942,8 @@ export default {
|
|
|
938
942
|
},
|
|
939
943
|
'pisell2.text.validity.valid_through': function pisell2TextValidityValid_through(str) {
|
|
940
944
|
return "\u6709\u6548\u671F\u81F3 ".concat(str, " \uFF08\u542B\u7576\u65E5\uFF09");
|
|
941
|
-
}
|
|
945
|
+
},
|
|
946
|
+
'pisell2.text.quotation.product.change.title': "提示",
|
|
947
|
+
'pisell2.text.quotation.product.change.describe': "以下商品信息已更新,请重新编辑相关商品以同步最新数据。"
|
|
942
948
|
}
|
|
943
949
|
};
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
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<"
|
|
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
|
};
|
|
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | undefined;
|
|
301
301
|
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|