@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
|
@@ -74,10 +74,10 @@ var formatProductOption = (option) => {
|
|
|
74
74
|
}
|
|
75
75
|
return option.map((d) => {
|
|
76
76
|
return {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
num: d.num,
|
|
78
|
+
option_group_item_id: d.product_option_item_id || d.option_group_item_id,
|
|
79
|
+
option_group_id: d.option_group_id,
|
|
80
|
+
custom_add_price: Number(d == null ? void 0 : d.add_price)
|
|
81
81
|
};
|
|
82
82
|
});
|
|
83
83
|
};
|
|
@@ -95,7 +95,9 @@ var formatProductBundle = (bundle) => {
|
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
try {
|
|
98
|
-
const errorBundles = bundle == null ? void 0 : bundle.filter(
|
|
98
|
+
const errorBundles = bundle == null ? void 0 : bundle.filter(
|
|
99
|
+
(d) => !(d == null ? void 0 : d.group_id) || !(d == null ? void 0 : d.id) || !(d == null ? void 0 : d._bundle_product_id)
|
|
100
|
+
);
|
|
99
101
|
if ((errorBundles == null ? void 0 : errorBundles.length) > 0) {
|
|
100
102
|
log(errorBundles);
|
|
101
103
|
}
|
|
@@ -179,11 +181,14 @@ var formatResource = (service) => {
|
|
|
179
181
|
return void 0;
|
|
180
182
|
}
|
|
181
183
|
try {
|
|
182
|
-
return Object.values(service._extend.resource).reduce(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
return Object.values(service._extend.resource).reduce(
|
|
185
|
+
(pre, cur) => {
|
|
186
|
+
const newList = checkResourcesFormat(cur, service);
|
|
187
|
+
pre = pre.concat(newList);
|
|
188
|
+
return pre;
|
|
189
|
+
},
|
|
190
|
+
[]
|
|
191
|
+
);
|
|
187
192
|
} catch (err) {
|
|
188
193
|
return void 0;
|
|
189
194
|
}
|
|
@@ -210,7 +215,9 @@ var formatProductPrice = (item) => {
|
|
|
210
215
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
211
216
|
let price = Number((_b = item._extend) == null ? void 0 : _b.price);
|
|
212
217
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
|
|
213
|
-
const variant = item.variant.find(
|
|
218
|
+
const variant = item.variant.find(
|
|
219
|
+
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
220
|
+
);
|
|
214
221
|
if (variant) {
|
|
215
222
|
price = Number(variant == null ? void 0 : variant.price) || 0;
|
|
216
223
|
}
|
|
@@ -255,7 +262,9 @@ var getSourceProductPrice = (item) => {
|
|
|
255
262
|
const other = (_a = item._extend) == null ? void 0 : _a.other;
|
|
256
263
|
let price = Number((_b = item._extend) == null ? void 0 : _b.price);
|
|
257
264
|
if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
|
|
258
|
-
const variant = item.variant.find(
|
|
265
|
+
const variant = item.variant.find(
|
|
266
|
+
(d) => d.id === (other == null ? void 0 : other.product_variant_id)
|
|
267
|
+
);
|
|
259
268
|
if (variant) {
|
|
260
269
|
price = Number(variant == null ? void 0 : variant.price) || 0;
|
|
261
270
|
}
|
|
@@ -275,45 +284,49 @@ var formatProducts = (item, quantity) => {
|
|
|
275
284
|
unique_identification_number: `${item._extend.unique_identification_number}_${d.discount.resource_id}`
|
|
276
285
|
};
|
|
277
286
|
});
|
|
278
|
-
const notManualDiscount = discount_list.filter(
|
|
287
|
+
const notManualDiscount = discount_list.filter(
|
|
288
|
+
(item2) => item2.type !== "product"
|
|
289
|
+
);
|
|
279
290
|
if (item.isCustomItem) {
|
|
280
291
|
item.product_id = 0;
|
|
281
292
|
}
|
|
282
293
|
return {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
294
|
+
name: item.name,
|
|
295
|
+
num: quantity || item._extend.quantity,
|
|
296
|
+
price: formatProductPrice(item),
|
|
297
|
+
source_product_price: getSourceProductPrice(item),
|
|
298
|
+
product_id: (item == null ? void 0 : item.product_id) || item.product_id === 0 ? item.product_id : item.id,
|
|
299
|
+
discount_amount: notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
300
|
+
product_discount_reason: item._extend.discount_reason || "",
|
|
301
|
+
is_charge_tax: item.is_charge_tax,
|
|
302
|
+
note: ((_a = item._extend) == null ? void 0 : _a.note) || "",
|
|
303
|
+
discountway: item._extend.discountway || "num",
|
|
304
|
+
discount_per: item._extend.discount_per,
|
|
305
|
+
discount_type: item._extend.discount_type || discount_type,
|
|
306
|
+
order_detail_id: item._extend.order_detail_id || 0,
|
|
307
|
+
product_bundle: formatProductBundle((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle),
|
|
308
|
+
bundle_edit: item._extend.bundle_edit,
|
|
309
|
+
product_option_item: formatProductOption((_e = (_d = item._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.option),
|
|
310
|
+
product_variant_id: ((_g = (_f = item._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.product_variant_id) || 0,
|
|
311
|
+
discount_list: notManualDiscount,
|
|
301
312
|
metadata: formatMetaData(item),
|
|
302
313
|
// checkout 需求新增字段
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
314
|
+
calculated_original_price: formatOriginalPrice(item),
|
|
315
|
+
calculated_selling_price: formatSellingPrice(item),
|
|
316
|
+
tax_fee: item._extend.tax_fee,
|
|
317
|
+
custom_deposit_data: item.custom_deposit_data
|
|
307
318
|
};
|
|
308
319
|
};
|
|
309
320
|
var formatAppointmentProductLists = (data) => {
|
|
310
321
|
var _a;
|
|
311
322
|
try {
|
|
312
323
|
let list = data.service.value;
|
|
313
|
-
list = list.filter(
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
324
|
+
list = list.filter(
|
|
325
|
+
(item) => {
|
|
326
|
+
var _a2;
|
|
327
|
+
return ((_a2 = item._extend) == null ? void 0 : _a2.holder_id) && !(0, import_utils4.isNormalProductByDurationSchedule)(item);
|
|
328
|
+
}
|
|
329
|
+
);
|
|
317
330
|
const groupMap = /* @__PURE__ */ new Map();
|
|
318
331
|
list.forEach((item) => {
|
|
319
332
|
var _a2;
|
|
@@ -323,7 +336,10 @@ var formatAppointmentProductLists = (data) => {
|
|
|
323
336
|
}
|
|
324
337
|
groupMap.get(key).push(item);
|
|
325
338
|
});
|
|
326
|
-
const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce(
|
|
339
|
+
const result = (_a = Array.from(groupMap.values())) == null ? void 0 : _a.reduce(
|
|
340
|
+
(acc, group) => acc.concat(group),
|
|
341
|
+
[]
|
|
342
|
+
);
|
|
327
343
|
return list || [];
|
|
328
344
|
} catch (error) {
|
|
329
345
|
}
|
|
@@ -375,39 +391,45 @@ var formatBookings = (data, values) => {
|
|
|
375
391
|
if (isDay) {
|
|
376
392
|
const startDate = ((_a = item._extend) == null ? void 0 : _a.startDate) || ((_b = item._extend) == null ? void 0 : _b.start_date);
|
|
377
393
|
const endDate = ((_c = item._extend) == null ? void 0 : _c.endDate) || ((_d = item._extend) == null ? void 0 : _d.end_date);
|
|
378
|
-
const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
|
|
394
|
+
const { startDateTime, endDateTime } = (0, import_utils4.formatDayTime)({
|
|
395
|
+
startDate,
|
|
396
|
+
endDate
|
|
397
|
+
});
|
|
379
398
|
start_date = (0, import_dayjs.default)(startDateTime).format("YYYY-MM-DD");
|
|
380
399
|
start_time = (0, import_dayjs.default)(startDateTime).format("HH:mm");
|
|
381
400
|
end_date = (0, import_dayjs.default)(endDateTime).format("YYYY-MM-DD");
|
|
382
401
|
end_time = (0, import_dayjs.default)(endDateTime).format("HH:mm");
|
|
383
402
|
dayParams.relation_products = (item == null ? void 0 : item.relation_products) || [];
|
|
384
403
|
dayParams.holder = formatHolders(data, item, values);
|
|
385
|
-
dayParams.duration = (0, import_utils3.getDays)(
|
|
404
|
+
dayParams.duration = (0, import_utils3.getDays)(
|
|
405
|
+
{ _extend: { start_date: startDateTime, end_date: endDateTime } },
|
|
406
|
+
"minutes"
|
|
407
|
+
);
|
|
386
408
|
}
|
|
387
409
|
if (!((_e = item._extend) == null ? void 0 : _e.unique_identification_number)) {
|
|
388
410
|
const unique_identification_number = (0, import_utils5.getUniqueId)();
|
|
389
411
|
item._extend.unique_identification_number = unique_identification_number;
|
|
390
412
|
}
|
|
391
413
|
const booking = {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
414
|
+
product: formatProducts(item),
|
|
415
|
+
metadata: formatMetaData(item),
|
|
416
|
+
relation_products: formatRelationDetails(item._extend.relation_details),
|
|
417
|
+
id: item.booking_id || 0,
|
|
418
|
+
relation_id: item._extend.relation_id || 0,
|
|
419
|
+
like_status: item._extend.like_status || "common",
|
|
420
|
+
relation_type: item._extend.relation_type || "",
|
|
421
|
+
is_all: false,
|
|
422
|
+
schedule_id: item._extend.schedule_id || 0,
|
|
423
|
+
end_time,
|
|
424
|
+
sub_type: isDay ? "days" : getSubType(item),
|
|
425
|
+
select_date: start_date,
|
|
426
|
+
start_time,
|
|
427
|
+
end_date,
|
|
428
|
+
start_date,
|
|
429
|
+
duration: isDay ? 0 : import_utils.flexibleObj.getValue(item._extend.duration),
|
|
430
|
+
number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: item }) : item._extend.number || 1,
|
|
431
|
+
resources: formatResource(item),
|
|
432
|
+
note: item._extend.note,
|
|
411
433
|
...eventOtherParams || {},
|
|
412
434
|
...dayParams
|
|
413
435
|
};
|
|
@@ -420,10 +442,10 @@ var formatBookings = (data, values) => {
|
|
|
420
442
|
newItem._extend.unique_identification_number = `${item._extend.unique_identification_number}_${i}`;
|
|
421
443
|
bookings.push({
|
|
422
444
|
...booking,
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
445
|
+
product: formatProducts(newItem, 1),
|
|
446
|
+
number: item._extend.capacity ? (0, import_utilsByBooking.getSumCapacity)({ cacheItem: newItem }, false) : newItem._extend.number || 1,
|
|
447
|
+
holder: getHolderByIndex(booking.holder, i),
|
|
448
|
+
metadata: formatMetaData(newItem)
|
|
427
449
|
});
|
|
428
450
|
}
|
|
429
451
|
});
|
|
@@ -485,7 +507,7 @@ var formatHolder = (state, values) => {
|
|
|
485
507
|
return obj;
|
|
486
508
|
};
|
|
487
509
|
var formatValues = (state) => {
|
|
488
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
510
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
489
511
|
let values = {
|
|
490
512
|
type: state.renderType === "eventBooking" ? "event_booking_v2" : "appointment_booking",
|
|
491
513
|
platform: state.isBookingTicket2 ? "pos" : "shop",
|
|
@@ -517,7 +539,10 @@ var formatValues = (state) => {
|
|
|
517
539
|
};
|
|
518
540
|
values.holder = formatHolder(state, values);
|
|
519
541
|
if (isDay || isEvent) {
|
|
520
|
-
values.relation_products = formatRelationProducts(
|
|
542
|
+
values.relation_products = formatRelationProducts(
|
|
543
|
+
state,
|
|
544
|
+
isDay ? "day" : "event"
|
|
545
|
+
);
|
|
521
546
|
} else {
|
|
522
547
|
values.relation_products = formatNormalProducts(state);
|
|
523
548
|
if (!((_b = values.relation_products) == null ? void 0 : _b.length)) {
|
|
@@ -536,6 +561,7 @@ var formatValues = (state) => {
|
|
|
536
561
|
if (!((_g = values == null ? void 0 : values.bookings) == null ? void 0 : _g.length)) {
|
|
537
562
|
values.type = "virtual";
|
|
538
563
|
}
|
|
564
|
+
values.contacts_info = ((_h = state.contacts_info) == null ? void 0 : _h.value) || null;
|
|
539
565
|
return values;
|
|
540
566
|
};
|
|
541
567
|
var checkHolderIsError = (state) => {
|
|
@@ -52,7 +52,7 @@ var useClientFn = (_params) => {
|
|
|
52
52
|
num: 5,
|
|
53
53
|
total: 0,
|
|
54
54
|
search: "",
|
|
55
|
-
with: ["formRecord"],
|
|
55
|
+
with: ["formRecord", "contactsInfo"],
|
|
56
56
|
relation_form_id: (_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id
|
|
57
57
|
});
|
|
58
58
|
const paramsRef = (0, import_react.useRef)(params);
|
|
@@ -173,7 +173,11 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
173
173
|
const handleAddPet = (_client, cb) => {
|
|
174
174
|
var _a2, _b2, _c2;
|
|
175
175
|
let _data = {
|
|
176
|
-
formDataConfig: isMinorAndWaiver ? {
|
|
176
|
+
formDataConfig: isMinorAndWaiver ? {
|
|
177
|
+
...waiverForm,
|
|
178
|
+
customer_id: _client.id,
|
|
179
|
+
is_franchisor: (_b2 = (_a2 = state.pet.formData) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.is_franchisor
|
|
180
|
+
} : { ...((_c2 = state.pet.formData) == null ? void 0 : _c2[0]) || {} }
|
|
177
181
|
};
|
|
178
182
|
_data.customerId = _client.id;
|
|
179
183
|
state.action({
|
|
@@ -278,7 +282,7 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
278
282
|
} else {
|
|
279
283
|
const val = await getClients(
|
|
280
284
|
{
|
|
281
|
-
with: ["formRecord"],
|
|
285
|
+
with: ["formRecord", "contactsInfo"],
|
|
282
286
|
relation_form_id: boardConfig == null ? void 0 : boardConfig.form_id,
|
|
283
287
|
skip: 1,
|
|
284
288
|
num: 20,
|
|
@@ -449,21 +453,34 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
449
453
|
size: 64,
|
|
450
454
|
icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
|
|
451
455
|
}
|
|
452
|
-
), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((_B = state.client.value) == null ? void 0 : _B.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_C = state.client.value) == null ? void 0 : _C.email) : null, ((_D = state.client.value) == null ? void 0 : _D.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_E = state.client.value) == null ? void 0 : _E.phone) : null, !!((_G = (_F = state.client.value) == null ? void 0 : _F.waiver_form) == null ? void 0 : _G.length) && /* @__PURE__ */ import_react.default.createElement(
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
456
|
+
), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((_B = state.client.value) == null ? void 0 : _B.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_C = state.client.value) == null ? void 0 : _C.email) : null, ((_D = state.client.value) == null ? void 0 : _D.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_E = state.client.value) == null ? void 0 : _E.phone) : null, !!((_G = (_F = state.client.value) == null ? void 0 : _F.waiver_form) == null ? void 0 : _G.length) && /* @__PURE__ */ import_react.default.createElement(
|
|
457
|
+
"div",
|
|
458
|
+
{
|
|
459
|
+
className: "pisell-lowcode__booking-client-waiver",
|
|
460
|
+
title: (0, import_utils5.getWaiverTitle)((_H = state.client.value) == null ? void 0 : _H.waiver_form)
|
|
461
|
+
},
|
|
462
|
+
(_K = (_J = (_I = state.client.value) == null ? void 0 : _I.waiver_form) == null ? void 0 : _J.map) == null ? void 0 : _K.call(_J, (item) => {
|
|
463
|
+
return /* @__PURE__ */ import_react.default.createElement("span", null, item.form_title, /* @__PURE__ */ import_react.default.createElement(
|
|
464
|
+
"span",
|
|
465
|
+
{
|
|
466
|
+
className: "pisell-lowcode__booking-client-waiver-colon"
|
|
467
|
+
},
|
|
468
|
+
":"
|
|
469
|
+
), item.is_filled ? /* @__PURE__ */ import_react.default.createElement(
|
|
470
|
+
"span",
|
|
471
|
+
{
|
|
472
|
+
className: "pisell-lowcode__booking-client-waiver-filled"
|
|
473
|
+
},
|
|
474
|
+
import_utils.locales.getText("pisell2.text.filled")
|
|
475
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
476
|
+
"span",
|
|
477
|
+
{
|
|
478
|
+
className: "pisell-lowcode__booking-client-waiver-not-filled"
|
|
479
|
+
},
|
|
480
|
+
import_utils.locales.getText("pisell2.text.not-filled")
|
|
481
|
+
), ` ; `);
|
|
482
|
+
})
|
|
483
|
+
)), !isWalkIn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-action-wrap" }, !state.disabledEdit && /* @__PURE__ */ import_react.default.createElement(
|
|
467
484
|
import_antd.Dropdown.Button,
|
|
468
485
|
{
|
|
469
486
|
menu: {
|
|
@@ -54,6 +54,7 @@ var import_index = require("./index.less");
|
|
|
54
54
|
var import_notes = __toESM(require("./notes"));
|
|
55
55
|
var import_service2 = require("./service2");
|
|
56
56
|
var import_utils3 = require("./service2/utils");
|
|
57
|
+
var import_contactInfoMode = __toESM(require("../info2/service/contactInfoMode"));
|
|
57
58
|
var defaultModules = {
|
|
58
59
|
client: 1,
|
|
59
60
|
date: 1,
|
|
@@ -64,7 +65,7 @@ var defaultModules = {
|
|
|
64
65
|
};
|
|
65
66
|
import_utils.locales.init(import_locales.default, (0, import_locales2.getLocale)());
|
|
66
67
|
var Info = (0, import_model.Provider)((props) => {
|
|
67
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
68
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
68
69
|
const { style, globalState, modules = defaultModules, slot } = props;
|
|
69
70
|
const modal = (0, import_react.useContext)(import_model.Context);
|
|
70
71
|
const context = (0, import_useEngineContext.default)();
|
|
@@ -90,7 +91,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
90
91
|
}
|
|
91
92
|
}, []);
|
|
92
93
|
(0, import_react.useEffect)(() => {
|
|
93
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2,
|
|
94
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m;
|
|
94
95
|
const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
|
|
95
96
|
modal.dispatch({
|
|
96
97
|
type: "setState",
|
|
@@ -99,7 +100,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
99
100
|
...globalState,
|
|
100
101
|
isTerminal: (_g2 = (_f2 = (_e2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.isTerminal) == null ? void 0 : _g2.call(_f2),
|
|
101
102
|
isFranchisee,
|
|
102
|
-
timezone: (_m = (
|
|
103
|
+
timezone: (_m = (_l2 = (_k2 = (_j2 = (_i2 = (_h2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _h2.utils) == null ? void 0 : _i2.store) == null ? void 0 : _j2.getState()) == null ? void 0 : _k2.global) == null ? void 0 : _l2.globalConfig) == null ? void 0 : _m.timezone,
|
|
103
104
|
isDayBooking: (globalState == null ? void 0 : globalState.renderType) === "dayBooking"
|
|
104
105
|
}
|
|
105
106
|
});
|
|
@@ -171,7 +172,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
171
172
|
dispatch: modal.dispatch,
|
|
172
173
|
source: "info"
|
|
173
174
|
},
|
|
174
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((
|
|
175
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, ((_k = (_j = (_i = (_h = (_g = modal == null ? void 0 : modal.state) == null ? void 0 : _g.bookingConfig) == null ? void 0 : _h.config) == null ? void 0 : _i.cart_settings_tab) == null ? void 0 : _j.display_contact_info) == null ? void 0 : _k.show_contact_info) === true ? /* @__PURE__ */ import_react.default.createElement(import_contactInfoMode.default, null) : null, modules.holder && !((_l = modal.state) == null ? void 0 : _l.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
175
176
|
import_antd.Skeleton,
|
|
176
177
|
{
|
|
177
178
|
loading: globalState.loading,
|
|
@@ -38,6 +38,11 @@ var { Provider, Context } = (0, import_utils.miniRedux)({
|
|
|
38
38
|
setClient(state, payload) {
|
|
39
39
|
state.setGlobalState({ client: { ...state.client, ...payload } });
|
|
40
40
|
},
|
|
41
|
+
setContactsInfo(state, payload) {
|
|
42
|
+
state.setGlobalState({
|
|
43
|
+
contacts_info: { ...state.contacts_info, ...payload }
|
|
44
|
+
});
|
|
45
|
+
},
|
|
41
46
|
setService(state, payload) {
|
|
42
47
|
let obj = {};
|
|
43
48
|
if (payload.value) {
|
|
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_ahooks = require("ahooks");
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_lodash = require("lodash");
|
|
39
40
|
var import_locales = __toESM(require("./locales"));
|
|
40
41
|
var import_clientCard = __toESM(require("../../../../plus/clientCard"));
|
|
41
42
|
var import_clinetSearch = __toESM(require("../../../../plus/clinetSearch"));
|
|
@@ -148,10 +149,34 @@ var CartClientCard = (0, import_react.forwardRef)(({
|
|
|
148
149
|
selectCustomer(null);
|
|
149
150
|
};
|
|
150
151
|
const handleViewClient = (data) => {
|
|
152
|
+
const newSelectedCustomer = (0, import_lodash.cloneDeep)(selectedCustomer);
|
|
151
153
|
state.action({
|
|
152
154
|
type: "pisell1.handleOpenCustomerModal",
|
|
153
155
|
data: { id: state.client.value.id },
|
|
154
156
|
callback: (data2) => {
|
|
157
|
+
console.log("data>>>>>", data2);
|
|
158
|
+
const _selectedCustomer = {
|
|
159
|
+
...newSelectedCustomer || {},
|
|
160
|
+
display_name: (data2 == null ? void 0 : data2.display_name) || "",
|
|
161
|
+
email: (data2 == null ? void 0 : data2.email) || "",
|
|
162
|
+
phone: (data2 == null ? void 0 : data2.phone) || "",
|
|
163
|
+
nickname: (data2 == null ? void 0 : data2.nickname) || "",
|
|
164
|
+
country_calling_code: (data2 == null ? void 0 : data2.country_calling_code) || "",
|
|
165
|
+
first_name: (data2 == null ? void 0 : data2.first_name) || "",
|
|
166
|
+
last_name: (data2 == null ? void 0 : data2.last_name) || "",
|
|
167
|
+
contacts_info: (data2 == null ? void 0 : data2.contacts_info) || null
|
|
168
|
+
};
|
|
169
|
+
selectCustomer(_selectedCustomer);
|
|
170
|
+
if (JSON.stringify((newSelectedCustomer == null ? void 0 : newSelectedCustomer.contacts_info) || {}) !== JSON.stringify((data2 == null ? void 0 : data2.contacts_info) || {})) {
|
|
171
|
+
dispatch({
|
|
172
|
+
type: "setContactsInfo",
|
|
173
|
+
payload: {
|
|
174
|
+
value: (data2 == null ? void 0 : data2.contacts_info) || {},
|
|
175
|
+
client_id: data2 == null ? void 0 : data2.id
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
handleSearchClient("");
|
|
155
180
|
}
|
|
156
181
|
});
|
|
157
182
|
};
|
|
@@ -60,6 +60,7 @@ var import_locales2 = require("../../../utils/locales");
|
|
|
60
60
|
var import_ahooks = require("ahooks");
|
|
61
61
|
var import_cartClientCard = __toESM(require("./cartClientCard"));
|
|
62
62
|
var import_materials = require("@pisell/materials");
|
|
63
|
+
var import_contactInfoMode = __toESM(require("./service/contactInfoMode"));
|
|
63
64
|
var defaultModules = {
|
|
64
65
|
client: 1,
|
|
65
66
|
date: 1,
|
|
@@ -69,7 +70,7 @@ var defaultModules = {
|
|
|
69
70
|
};
|
|
70
71
|
import_utils.locales.init(import_locales.default, (0, import_locales2.getLocale)());
|
|
71
72
|
var Info = (0, import_model.Provider)((props) => {
|
|
72
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
73
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
73
74
|
const { style, globalState, modules = defaultModules, slot } = props;
|
|
74
75
|
const modal = (0, import_react.useContext)(import_model.Context);
|
|
75
76
|
const context = (0, import_useEngineContext.default)();
|
|
@@ -98,7 +99,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
98
99
|
}, []);
|
|
99
100
|
const Toast = (0, import_materials.useToast)();
|
|
100
101
|
(0, import_react.useMemo)(() => {
|
|
101
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2,
|
|
102
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
102
103
|
const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
|
|
103
104
|
modal.dispatch({
|
|
104
105
|
type: "setState",
|
|
@@ -107,7 +108,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
107
108
|
...globalState,
|
|
108
109
|
isTerminal: (_g2 = (_f2 = (_e2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.isTerminal) == null ? void 0 : _g2.call(_f2),
|
|
109
110
|
isFranchisee,
|
|
110
|
-
timezone: (
|
|
111
|
+
timezone: (_m2 = (_l2 = (_k2 = (_j2 = (_i2 = (_h2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _h2.utils) == null ? void 0 : _i2.store) == null ? void 0 : _j2.getState()) == null ? void 0 : _k2.global) == null ? void 0 : _l2.globalConfig) == null ? void 0 : _m2.timezone
|
|
111
112
|
}
|
|
112
113
|
});
|
|
113
114
|
}, [globalState]);
|
|
@@ -298,7 +299,12 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
298
299
|
dispatch: modal.dispatch,
|
|
299
300
|
source: "info"
|
|
300
301
|
},
|
|
301
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
302
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-client-line" }, modules.client ? (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "hidden" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
303
|
+
import_cartClientCard.default,
|
|
304
|
+
{
|
|
305
|
+
clientCardProps: { dropdown: dropdownProps }
|
|
306
|
+
}
|
|
307
|
+
)) : /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, (globalState == null ? void 0 : globalState.isBookingTicket2) ? /* @__PURE__ */ import_react.default.createElement(
|
|
302
308
|
"div",
|
|
303
309
|
{
|
|
304
310
|
className: "booking-info-client-line-code",
|
|
@@ -314,7 +320,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
314
320
|
style: { color: "#fff", fontSize: 42 }
|
|
315
321
|
}
|
|
316
322
|
)
|
|
317
|
-
) : null), modules.holder && !((
|
|
323
|
+
) : null), ((_n = (_m = (_l = (_k = (_j = modal == null ? void 0 : modal.state) == null ? void 0 : _j.bookingConfig) == null ? void 0 : _k.config) == null ? void 0 : _l.cart_settings_tab) == null ? void 0 : _m.display_contact_info) == null ? void 0 : _n.show_contact_info) === true ? /* @__PURE__ */ import_react.default.createElement(import_contactInfoMode.default, null) : null, modules.holder && !((_o = modal.state) == null ? void 0 : _o.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
318
324
|
import_antd.Skeleton,
|
|
319
325
|
{
|
|
320
326
|
loading: globalState.loading,
|