@pisell/private-materials 6.4.62 → 6.4.64
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 +2 -2
- package/build/lowcode/preview.js +145 -145
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -2
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +267 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +4 -1
- package/es/components/booking/components/footer/utils.js +80 -77
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +2 -2
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
- package/es/components/booking/info/main.js +3 -2
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info2/cartClientCard/index.js +30 -1
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +9 -3
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +4 -0
- package/es/components/booking/model.js +3 -0
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- 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/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/hooks.d.ts +1 -1
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/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/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/list/styles/header.less +1 -0
- package/es/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/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/productSelect/components/productGroup/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/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/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/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.js +63 -5
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +1 -0
- package/es/components/ticketBooking/index.js +1 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +28 -30
- package/es/plus/clinetSearch/locales.d.ts +3 -0
- package/es/plus/clinetSearch/locales.js +7 -4
- package/es/plus/clinetSearch/types.d.ts +12 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
- package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/es/plus/contactInfo/index.d.ts +6 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.d.ts +40 -0
- package/es/plus/contactInfoModal/index.js +154 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/contactInfoModal/locales.js +65 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -3
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +151 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +4 -1
- package/lib/components/booking/components/footer/utils.js +93 -67
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +1 -1
- package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
- package/lib/components/booking/info/main.js +5 -4
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info2/cartClientCard/index.js +25 -0
- package/lib/components/booking/info2/index.js +11 -5
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +9 -3
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +4 -0
- package/lib/components/booking/model.js +3 -0
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- 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/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/hooks.d.ts +1 -1
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/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/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/list/styles/header.less +1 -0
- package/lib/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/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/productSelect/components/productGroup/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/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/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/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +21 -2
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +1 -0
- package/lib/components/ticketBooking/index.js +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +17 -8
- package/lib/plus/clinetSearch/locales.d.ts +3 -0
- package/lib/plus/clinetSearch/locales.js +7 -4
- package/lib/plus/clinetSearch/types.d.ts +12 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/lib/plus/contactInfo/index.d.ts +6 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.d.ts +40 -0
- package/lib/plus/contactInfoModal/index.js +138 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/contactInfoModal/locales.js +89 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
- package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
- package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
- package/lowcode/contact-info/fragments/textStyle.ts +33 -0
- package/lowcode/contact-info/meta.ts +199 -0
- package/lowcode/contact-info-modal/meta.ts +98 -0
- package/package.json +5 -3
|
@@ -26,6 +26,7 @@ import "./index.less";
|
|
|
26
26
|
import Notes from "./notes";
|
|
27
27
|
import { Service2Cart } from "./service2";
|
|
28
28
|
import { isDayBooking, isEventBooking, isTerminalDayBooking } from "./service2/utils";
|
|
29
|
+
import ContactInfoMode from "../info2/service/contactInfoMode";
|
|
29
30
|
var defaultModules = {
|
|
30
31
|
client: 1,
|
|
31
32
|
date: 1,
|
|
@@ -36,7 +37,7 @@ var defaultModules = {
|
|
|
36
37
|
};
|
|
37
38
|
locales.init(localeTexts, getLocale());
|
|
38
39
|
var Info = Provider(function (props) {
|
|
39
|
-
var _modal$state2, _modal$state3, _modal$state4;
|
|
40
|
+
var _modal$state2, _modal$state3, _modal$state4, _modal$state5;
|
|
40
41
|
var style = props.style,
|
|
41
42
|
globalState = props.globalState,
|
|
42
43
|
_props$modules = props.modules,
|
|
@@ -142,7 +143,7 @@ var Info = Provider(function (props) {
|
|
|
142
143
|
source: "info"
|
|
143
144
|
}, /*#__PURE__*/React.createElement("div", {
|
|
144
145
|
className: "booking-info"
|
|
145
|
-
}, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$
|
|
146
|
+
}, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, (modal === null || modal === void 0 || (_modal$state4 = modal.state) === null || _modal$state4 === void 0 || (_modal$state4 = _modal$state4.bookingConfig) === null || _modal$state4 === void 0 || (_modal$state4 = _modal$state4.config) === null || _modal$state4 === void 0 || (_modal$state4 = _modal$state4.cart_settings_tab) === null || _modal$state4 === void 0 || (_modal$state4 = _modal$state4.display_contact_info) === null || _modal$state4 === void 0 ? void 0 : _modal$state4.show_contact_info) === true ? /*#__PURE__*/React.createElement(ContactInfoMode, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
146
147
|
loading: globalState.loading,
|
|
147
148
|
round: true,
|
|
148
149
|
active: true,
|
|
@@ -21,6 +21,11 @@ var _miniRedux = miniRedux({
|
|
|
21
21
|
});
|
|
22
22
|
// return { ...state, client: { ...state.client, ...payload } };
|
|
23
23
|
},
|
|
24
|
+
setContactsInfo: function setContactsInfo(state, payload) {
|
|
25
|
+
state.setGlobalState({
|
|
26
|
+
contacts_info: _objectSpread(_objectSpread({}, state.contacts_info), payload)
|
|
27
|
+
});
|
|
28
|
+
},
|
|
24
29
|
setService: function setService(state, payload) {
|
|
25
30
|
var obj = {};
|
|
26
31
|
// 拦截, 如果服务列表里 有两个相近时间的服务, 删除最后一个
|
|
@@ -17,6 +17,7 @@ import React, { useContext, useEffect, useImperativeHandle, useMemo, useState, f
|
|
|
17
17
|
import { useMemoizedFn, useDebounceFn } from 'ahooks';
|
|
18
18
|
import { PisellModal, useToast } from '@pisell/materials';
|
|
19
19
|
import { locales } from '@pisell/utils';
|
|
20
|
+
import { cloneDeep } from 'lodash';
|
|
20
21
|
import localeTexts from "./locales";
|
|
21
22
|
import ClientCard from "../../../../plus/clientCard";
|
|
22
23
|
import ClientSearch from "../../../../plus/clinetSearch";
|
|
@@ -186,12 +187,40 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
186
187
|
|
|
187
188
|
// 处理查看客户
|
|
188
189
|
var handleViewClient = function handleViewClient(data) {
|
|
190
|
+
var newSelectedCustomer = cloneDeep(selectedCustomer);
|
|
189
191
|
state.action({
|
|
190
192
|
type: 'pisell1.handleOpenCustomerModal',
|
|
191
193
|
data: {
|
|
192
194
|
id: state.client.value.id
|
|
193
195
|
},
|
|
194
|
-
callback: function callback(data) {
|
|
196
|
+
callback: function callback(data) {
|
|
197
|
+
console.log('data>>>>>', data);
|
|
198
|
+
var _selectedCustomer = _objectSpread(_objectSpread({}, newSelectedCustomer || {}), {}, {
|
|
199
|
+
display_name: (data === null || data === void 0 ? void 0 : data.display_name) || "",
|
|
200
|
+
email: (data === null || data === void 0 ? void 0 : data.email) || "",
|
|
201
|
+
phone: (data === null || data === void 0 ? void 0 : data.phone) || "",
|
|
202
|
+
nickname: (data === null || data === void 0 ? void 0 : data.nickname) || "",
|
|
203
|
+
country_calling_code: (data === null || data === void 0 ? void 0 : data.country_calling_code) || "",
|
|
204
|
+
first_name: (data === null || data === void 0 ? void 0 : data.first_name) || "",
|
|
205
|
+
last_name: (data === null || data === void 0 ? void 0 : data.last_name) || "",
|
|
206
|
+
contacts_info: (data === null || data === void 0 ? void 0 : data.contacts_info) || null
|
|
207
|
+
});
|
|
208
|
+
selectCustomer(_selectedCustomer);
|
|
209
|
+
|
|
210
|
+
// 如果联系信息发生变动需要更新
|
|
211
|
+
if (JSON.stringify((newSelectedCustomer === null || newSelectedCustomer === void 0 ? void 0 : newSelectedCustomer.contacts_info) || {}) !== JSON.stringify((data === null || data === void 0 ? void 0 : data.contacts_info) || {})) {
|
|
212
|
+
dispatch({
|
|
213
|
+
type: 'setContactsInfo',
|
|
214
|
+
payload: {
|
|
215
|
+
value: (data === null || data === void 0 ? void 0 : data.contacts_info) || {},
|
|
216
|
+
client_id: data === null || data === void 0 ? void 0 : data.id
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// 重置客户搜索框内容
|
|
222
|
+
handleSearchClient('');
|
|
223
|
+
}
|
|
195
224
|
});
|
|
196
225
|
};
|
|
197
226
|
|
|
@@ -35,6 +35,7 @@ import { getLocale } from "../../../utils/locales";
|
|
|
35
35
|
import { useDebounceEffect } from 'ahooks';
|
|
36
36
|
import CartClientCard from "./cartClientCard";
|
|
37
37
|
import { Iconfont, useToast } from '@pisell/materials';
|
|
38
|
+
import ContactInfoMode from "./service/contactInfoMode";
|
|
38
39
|
var defaultModules = {
|
|
39
40
|
client: 1,
|
|
40
41
|
date: 1,
|
|
@@ -44,7 +45,7 @@ var defaultModules = {
|
|
|
44
45
|
};
|
|
45
46
|
locales.init(localeTexts, getLocale());
|
|
46
47
|
var Info = Provider(function (props) {
|
|
47
|
-
var _modal$state2, _modal$state3, _modal$state5, _modal$state6;
|
|
48
|
+
var _modal$state2, _modal$state3, _modal$state5, _modal$state6, _modal$state7;
|
|
48
49
|
// return <Payments {...props} />;
|
|
49
50
|
var style = props.style,
|
|
50
51
|
globalState = props.globalState,
|
|
@@ -340,7 +341,7 @@ var Info = Provider(function (props) {
|
|
|
340
341
|
color: '#fff',
|
|
341
342
|
fontSize: 42
|
|
342
343
|
}
|
|
343
|
-
})) : null), modules.holder && !((_modal$
|
|
344
|
+
})) : null), (modal === null || modal === void 0 || (_modal$state6 = modal.state) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.bookingConfig) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.config) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.cart_settings_tab) === null || _modal$state6 === void 0 || (_modal$state6 = _modal$state6.display_contact_info) === null || _modal$state6 === void 0 ? void 0 : _modal$state6.show_contact_info) === true ? /*#__PURE__*/React.createElement(ContactInfoMode, null) : null, modules.holder && !((_modal$state7 = modal.state) !== null && _modal$state7 !== void 0 && _modal$state7.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
344
345
|
loading: globalState.loading,
|
|
345
346
|
round: true,
|
|
346
347
|
active: true,
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import React, { useContext, useEffect } from 'react';
|
|
8
|
+
import { locales } from '@pisell/utils';
|
|
9
|
+
import ContactInfo from "../../../../../plus/contactInfo";
|
|
10
|
+
import { Context } from "../../../info/model";
|
|
11
|
+
var ContactInfoMode = function ContactInfoMode() {
|
|
12
|
+
var _state$client$value6, _state$contacts_info3, _state$contacts_info4;
|
|
13
|
+
var _useContext = useContext(Context),
|
|
14
|
+
state = _useContext.state,
|
|
15
|
+
dispatch = _useContext.dispatch;
|
|
16
|
+
console.log('state>>>>>>>>>', state);
|
|
17
|
+
useEffect(function () {
|
|
18
|
+
var _state$contacts_info, _state$client$value, _state$client$value2, _state$contacts_info2;
|
|
19
|
+
// 如果客户id发生变化,则获取客户信息中的ContactInfo,如果不存在,则使用客户信息填充ContactInfo
|
|
20
|
+
console.log('state>>>>>>>>>111', state === null || state === void 0 || (_state$contacts_info = state.contacts_info) === null || _state$contacts_info === void 0 ? void 0 : _state$contacts_info.client_id);
|
|
21
|
+
console.log('state>>>>>>>>>222', (_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id);
|
|
22
|
+
if (((_state$client$value2 = state.client.value) === null || _state$client$value2 === void 0 ? void 0 : _state$client$value2.id) != (state === null || state === void 0 || (_state$contacts_info2 = state.contacts_info) === null || _state$contacts_info2 === void 0 ? void 0 : _state$contacts_info2.client_id)) {
|
|
23
|
+
var _state$client$value3;
|
|
24
|
+
var contactInfo = (_state$client$value3 = state.client.value) === null || _state$client$value3 === void 0 || (_state$client$value3 = _state$client$value3.contacts_info) === null || _state$client$value3 === void 0 ? void 0 : _state$client$value3.value;
|
|
25
|
+
if (!contactInfo) {
|
|
26
|
+
var _state$client, _state$client$value4;
|
|
27
|
+
var _ref = ((_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value) || {},
|
|
28
|
+
first_name = _ref.first_name,
|
|
29
|
+
last_name = _ref.last_name,
|
|
30
|
+
phone = _ref.phone,
|
|
31
|
+
country_calling_code = _ref.country_calling_code,
|
|
32
|
+
country_code = _ref.country_code,
|
|
33
|
+
email = _ref.email;
|
|
34
|
+
dispatch({
|
|
35
|
+
type: 'setContactsInfo',
|
|
36
|
+
payload: {
|
|
37
|
+
value: {
|
|
38
|
+
first_name: first_name || '',
|
|
39
|
+
last_name: last_name || '',
|
|
40
|
+
phone: {
|
|
41
|
+
phone: phone || '',
|
|
42
|
+
country_calling_code: country_calling_code || '',
|
|
43
|
+
country_code: country_code || ''
|
|
44
|
+
},
|
|
45
|
+
email: email || ''
|
|
46
|
+
},
|
|
47
|
+
client_id: (_state$client$value4 = state.client.value) === null || _state$client$value4 === void 0 ? void 0 : _state$client$value4.id
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
var _state$client$value5;
|
|
52
|
+
dispatch({
|
|
53
|
+
type: 'setContactsInfo',
|
|
54
|
+
payload: {
|
|
55
|
+
value: _objectSpread({}, contactInfo || {}),
|
|
56
|
+
client_id: (_state$client$value5 = state.client.value) === null || _state$client$value5 === void 0 ? void 0 : _state$client$value5.id
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}, [(_state$client$value6 = state.client.value) === null || _state$client$value6 === void 0 ? void 0 : _state$client$value6.id, state === null || state === void 0 || (_state$contacts_info3 = state.contacts_info) === null || _state$contacts_info3 === void 0 ? void 0 : _state$contacts_info3.client_id]);
|
|
62
|
+
var handleSave = function handleSave(value) {
|
|
63
|
+
dispatch({
|
|
64
|
+
type: 'setContactsInfo',
|
|
65
|
+
payload: {
|
|
66
|
+
value: value,
|
|
67
|
+
edit: true
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
style: {
|
|
73
|
+
marginTop: '24px'
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: "pisell-lowcode__booking-contact-info-title",
|
|
77
|
+
style: {
|
|
78
|
+
fontSize: '16px',
|
|
79
|
+
fontWeight: 500,
|
|
80
|
+
marginBottom: '8px'
|
|
81
|
+
}
|
|
82
|
+
}, locales.getText('pisell2.booking.text.contact-info.title')), /*#__PURE__*/React.createElement(ContactInfo, {
|
|
83
|
+
dataSource: ((_state$contacts_info4 = state.contacts_info) === null || _state$contacts_info4 === void 0 ? void 0 : _state$contacts_info4.value) || null,
|
|
84
|
+
isShowDelete: false,
|
|
85
|
+
isShowAvatar: false,
|
|
86
|
+
isShowPhone: true,
|
|
87
|
+
isShowEmail: true,
|
|
88
|
+
style: {
|
|
89
|
+
padding: '14px 0 14px 14px'
|
|
90
|
+
},
|
|
91
|
+
onSave: handleSave
|
|
92
|
+
}));
|
|
93
|
+
};
|
|
94
|
+
export default ContactInfoMode;
|
|
@@ -302,6 +302,7 @@ declare const _default: {
|
|
|
302
302
|
'pisell2.text.quotation.product.change.describe': string;
|
|
303
303
|
'pisell2.booking.notes.placeholder': string;
|
|
304
304
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
305
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
305
306
|
};
|
|
306
307
|
'zh-CN': {
|
|
307
308
|
'pisell2.text.refunded-amount': string;
|
|
@@ -606,6 +607,7 @@ declare const _default: {
|
|
|
606
607
|
'pisell2.text.quotation.product.change.describe': string;
|
|
607
608
|
'pisell2.booking.notes.placeholder': string;
|
|
608
609
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
610
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
609
611
|
};
|
|
610
612
|
'zh-HK': {
|
|
611
613
|
'pisell2.text.refunded-amount': string;
|
|
@@ -910,6 +912,7 @@ declare const _default: {
|
|
|
910
912
|
'pisell2.text.quotation.product.change.describe': string;
|
|
911
913
|
'pisell2.booking.notes.placeholder': string;
|
|
912
914
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
915
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
913
916
|
};
|
|
914
917
|
};
|
|
915
918
|
export default _default;
|
|
@@ -354,7 +354,9 @@ export default {
|
|
|
354
354
|
'pisell2.text.quotation.product.change.describe': "Product updates available: Please refresh the following items to load the latest data.",
|
|
355
355
|
// Notes
|
|
356
356
|
'pisell2.booking.notes.placeholder': 'Enter a note...',
|
|
357
|
-
'pisell2.text.form.link.to.another.record.more': 'View More'
|
|
357
|
+
'pisell2.text.form.link.to.another.record.more': 'View More',
|
|
358
|
+
// 联系信息
|
|
359
|
+
'pisell2.booking.text.contact-info.title': 'Contact info'
|
|
358
360
|
},
|
|
359
361
|
'zh-CN': {
|
|
360
362
|
'pisell2.text.refunded-amount': '已退金额',
|
|
@@ -715,7 +717,9 @@ export default {
|
|
|
715
717
|
'pisell2.text.quotation.product.change.describe': "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
|
|
716
718
|
// Notes
|
|
717
719
|
'pisell2.booking.notes.placeholder': '输入备注...',
|
|
718
|
-
'pisell2.text.form.link.to.another.record.more': '查看更多'
|
|
720
|
+
'pisell2.text.form.link.to.another.record.more': '查看更多',
|
|
721
|
+
// 联系信息
|
|
722
|
+
'pisell2.booking.text.contact-info.title': '联系信息'
|
|
719
723
|
},
|
|
720
724
|
'zh-HK': {
|
|
721
725
|
'pisell2.text.refunded-amount': '已退金額',
|
|
@@ -1076,6 +1080,8 @@ export default {
|
|
|
1076
1080
|
'pisell2.text.quotation.product.change.describe': "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
|
|
1077
1081
|
// Notes
|
|
1078
1082
|
'pisell2.booking.notes.placeholder': '輸入備註...',
|
|
1079
|
-
'pisell2.text.form.link.to.another.record.more': '查看更多'
|
|
1083
|
+
'pisell2.text.form.link.to.another.record.more': '查看更多',
|
|
1084
|
+
// 联系信息
|
|
1085
|
+
'pisell2.booking.text.contact-info.title': '聯繫信息'
|
|
1080
1086
|
}
|
|
1081
1087
|
};
|
|
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
|
|
|
17
17
|
cardData: any;
|
|
18
18
|
handleSelectWallet: (value: number[]) => void;
|
|
19
19
|
selectedWalletIds: any[];
|
|
20
|
-
expiredWalletIds: any;
|
|
20
|
+
expiredWalletIds: any[];
|
|
21
21
|
expiredWalletData: any;
|
|
22
22
|
disabledWalletData: any[];
|
|
23
23
|
clearAllSelectedWallet: () => void;
|
|
@@ -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<"stripe" | "
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -297,8 +297,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
298
|
mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "stripe" | "
|
|
301
|
-
action?: "
|
|
300
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
|
301
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|