@pisell/private-materials 3.2.33 → 3.2.34
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 +13 -13
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Event/index.js +7 -7
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +86 -41
- package/es/components/appointmentBooking/components/Cart/Item/Total.js +3 -2
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +31 -15
- package/es/components/appointmentBooking/components/Cart/Item/index.less +15 -9
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.js +2 -7
- package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +16 -0
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +24 -0
- package/es/components/appointmentBooking/components/Content/index.js +42 -6
- package/es/components/appointmentBooking/components/Date/index.js +86 -24
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
- package/es/components/appointmentBooking/components/Deposit/index.less +16 -0
- package/es/components/appointmentBooking/components/Form/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Form/index.js +110 -0
- package/es/components/appointmentBooking/components/Form/index.less +3 -0
- package/es/components/appointmentBooking/components/Header/index.js +3 -2
- package/es/components/appointmentBooking/components/Resource/index.js +4 -1
- package/es/components/appointmentBooking/components/Services/index.js +103 -9
- package/es/components/appointmentBooking/context.d.ts +3 -0
- package/es/components/appointmentBooking/context.js +19 -3
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/index.js +101 -0
- package/es/components/appointmentBooking/deposit/index.less +53 -0
- package/es/components/appointmentBooking/hooks.d.ts +16 -0
- package/es/components/appointmentBooking/hooks.js +138 -53
- package/es/components/appointmentBooking/index.js +8 -0
- package/es/components/appointmentBooking/locales.d.ts +36 -3
- package/es/components/appointmentBooking/locales.js +42 -3
- package/es/components/appointmentBooking/utils.d.ts +22 -0
- package/es/components/appointmentBooking/utils.js +111 -26
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +6 -4
- package/es/components/booking/components/voucher/index.js +13 -15
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/index.js +2 -8
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/addTimeModal/index.js +3 -2
- package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +4 -2
- package/es/components/booking/info2/service/editService/index.js +4 -11
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/addNote/index.js +1 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.js +77 -0
- package/es/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
- package/es/components/listComponent/index.js +5 -5
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/Product.js +12 -2
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/status.js +3 -1
- package/es/components/shoppingCart/type.d.ts +2 -0
- package/es/components/wallet/Detail/index.js +1 -1
- package/es/components/wallet/components/WalletCard.js +1 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/lib/components/Sales/Event/index.js +5 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +56 -20
- package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +28 -10
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +15 -9
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +42 -0
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +24 -0
- package/lib/components/appointmentBooking/components/Content/index.js +31 -3
- package/lib/components/appointmentBooking/components/Date/index.js +27 -8
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
- package/lib/components/appointmentBooking/components/Deposit/index.less +16 -0
- package/lib/components/appointmentBooking/components/Form/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Form/index.js +108 -0
- package/lib/components/appointmentBooking/components/Form/index.less +3 -0
- package/lib/components/appointmentBooking/components/Header/index.js +9 -6
- package/lib/components/appointmentBooking/components/Resource/index.js +2 -0
- package/lib/components/appointmentBooking/components/Services/index.js +48 -7
- package/lib/components/appointmentBooking/context.d.ts +3 -0
- package/lib/components/appointmentBooking/context.js +12 -4
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/index.js +109 -0
- package/lib/components/appointmentBooking/deposit/index.less +53 -0
- package/lib/components/appointmentBooking/hooks.d.ts +16 -0
- package/lib/components/appointmentBooking/hooks.js +49 -6
- package/lib/components/appointmentBooking/index.js +5 -0
- package/lib/components/appointmentBooking/locales.d.ts +36 -3
- package/lib/components/appointmentBooking/locales.js +36 -3
- package/lib/components/appointmentBooking/utils.d.ts +22 -0
- package/lib/components/appointmentBooking/utils.js +83 -25
- package/lib/components/booking/components/footer/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +8 -6
- package/lib/components/booking/components/voucher/index.js +11 -15
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/index.js +4 -6
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addTimeModal/index.js +4 -3
- package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +2 -1
- package/lib/components/booking/info2/service/editService/index.js +4 -11
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +69 -0
- package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +8 -2
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/status.js +3 -1
- package/lib/components/shoppingCart/type.d.ts +2 -0
- package/lib/components/wallet/Detail/index.js +1 -1
- package/lib/components/wallet/components/WalletCard.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lowcode/appointment-deposit/meta.ts +58 -0
- package/package.json +4 -4
- package/es/components/ticketBooking/data.d.ts +0 -0
- package/es/components/ticketBooking/data.js +0 -82
- package/es/components/ticketBooking/index.d.ts +0 -2
- package/es/components/ticketBooking/index.js +0 -6
- package/es/components/workSpaceListDetail/index.d.ts +0 -4
- package/es/components/workSpaceListDetail/server.d.ts +0 -4
- package/lib/components/ticketBooking/data.d.ts +0 -0
- package/lib/components/ticketBooking/data.js +0 -0
- package/lib/components/ticketBooking/index.d.ts +0 -2
- package/lib/components/ticketBooking/index.js +0 -28
- package/lib/components/workSpaceListDetail/index.d.ts +0 -4
- package/lib/components/workSpaceListDetail/server.d.ts +0 -4
|
@@ -15,6 +15,14 @@ var AppointmentBooking = function AppointmentBooking() {
|
|
|
15
15
|
var appointmentBooking = useAppointmentBooking();
|
|
16
16
|
var currentUser = formatCurrentUser();
|
|
17
17
|
useEffect(function () {
|
|
18
|
+
var _appointmentBooking$o;
|
|
19
|
+
var _ref = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.productModuleParams) || {},
|
|
20
|
+
bookingSubject = _ref.bookingSubject;
|
|
21
|
+
|
|
22
|
+
// 预约主体是表单则不需要添加账户
|
|
23
|
+
if ((bookingSubject === null || bookingSubject === void 0 ? void 0 : bookingSubject.type) === 'form') {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
18
26
|
appointmentBooking.getAccounts().then(function (data) {
|
|
19
27
|
if (!data.length) {
|
|
20
28
|
appointmentBooking.addAccount([currentUser]);
|
|
@@ -12,7 +12,7 @@ declare const _default: {
|
|
|
12
12
|
'pisell2.event.close.tip': string;
|
|
13
13
|
'pisell2.event.close.continue': string;
|
|
14
14
|
'pisell2.event.close.exit': string;
|
|
15
|
-
'pisell2.
|
|
15
|
+
'pisell2.appointment.step': (step: number) => string;
|
|
16
16
|
'pisell2.event.select.category': (val: string) => string;
|
|
17
17
|
'pisell2.event.select.campus': (val: string) => string;
|
|
18
18
|
'pisell2.event.select.event': string;
|
|
@@ -70,6 +70,7 @@ declare const _default: {
|
|
|
70
70
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
71
71
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
72
72
|
'pisell2.appointment.booking.empty.service': string;
|
|
73
|
+
'pisell2.appointment.booking.empty.data': string;
|
|
73
74
|
'pisell2.appointment.booking.empty.time': string;
|
|
74
75
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
75
76
|
'pisell2.appointment.add.guest': string;
|
|
@@ -87,6 +88,16 @@ declare const _default: {
|
|
|
87
88
|
'pisell2.appointment.sunday': string;
|
|
88
89
|
'pisell2.appointment.any.professional': string;
|
|
89
90
|
'pisell2.appointment.for.maximum.availability': string;
|
|
91
|
+
'pisell2.appointment.deposit': string;
|
|
92
|
+
'pisell2.appointment.deposit.agreed': string;
|
|
93
|
+
'pisell2.appointment.deposit.agree.policy': string;
|
|
94
|
+
'pisell2.appointment.deposit.and': string;
|
|
95
|
+
'pisell2.appointment.deposit.amount.tip1': string;
|
|
96
|
+
'pisell2.appointment.deposit.amount.tip2': string;
|
|
97
|
+
'pisell2.appointment.deposit.close': string;
|
|
98
|
+
'pisell2.appointment.tips': string;
|
|
99
|
+
'pisell2.appointment.tips.content': (x: string) => string;
|
|
100
|
+
'pisell2.appointment.fill-form': string;
|
|
90
101
|
'pisell2.text.apply': string;
|
|
91
102
|
'pisell2.text.goodpass': string;
|
|
92
103
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -110,7 +121,7 @@ declare const _default: {
|
|
|
110
121
|
'pisell2.event.close.tip': string;
|
|
111
122
|
'pisell2.event.close.continue': string;
|
|
112
123
|
'pisell2.event.close.exit': string;
|
|
113
|
-
'pisell2.
|
|
124
|
+
'pisell2.appointment.step': (step: number) => string;
|
|
114
125
|
'pisell2.event.select.category': (val: string) => string;
|
|
115
126
|
'pisell2.event.select.event': string;
|
|
116
127
|
'pisell2.event.select.campus': (val: string) => string;
|
|
@@ -168,6 +179,7 @@ declare const _default: {
|
|
|
168
179
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
169
180
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
170
181
|
'pisell2.appointment.booking.empty.service': string;
|
|
182
|
+
'pisell2.appointment.booking.empty.data': string;
|
|
171
183
|
'pisell2.appointment.booking.empty.time': string;
|
|
172
184
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
173
185
|
'pisell2.appointment.add.guest': string;
|
|
@@ -185,6 +197,16 @@ declare const _default: {
|
|
|
185
197
|
'pisell2.appointment.sunday': string;
|
|
186
198
|
'pisell2.appointment.any.professional': string;
|
|
187
199
|
'pisell2.appointment.for.maximum.availability': string;
|
|
200
|
+
'pisell2.appointment.deposit': string;
|
|
201
|
+
'pisell2.appointment.deposit.agreed': string;
|
|
202
|
+
'pisell2.appointment.deposit.agree.policy': string;
|
|
203
|
+
'pisell2.appointment.deposit.and': string;
|
|
204
|
+
'pisell2.appointment.deposit.amount.tip1': string;
|
|
205
|
+
'pisell2.appointment.deposit.amount.tip2': string;
|
|
206
|
+
'pisell2.appointment.deposit.close': string;
|
|
207
|
+
'pisell2.appointment.tips': string;
|
|
208
|
+
'pisell2.appointment.tips.content': (x: string) => string;
|
|
209
|
+
'pisell2.appointment.fill-form': string;
|
|
188
210
|
'pisell2.text.apply': string;
|
|
189
211
|
'pisell2.text.goodpass': string;
|
|
190
212
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -208,7 +230,7 @@ declare const _default: {
|
|
|
208
230
|
'pisell2.event.close.tip': string;
|
|
209
231
|
'pisell2.event.close.continue': string;
|
|
210
232
|
'pisell2.event.close.exit': string;
|
|
211
|
-
'pisell2.
|
|
233
|
+
'pisell2.appointment.step': (step: number) => string;
|
|
212
234
|
'pisell2.event.select.category': (val: string) => string;
|
|
213
235
|
'pisell2.event.select.event': string;
|
|
214
236
|
'pisell2.event.select.campus': (val: string) => string;
|
|
@@ -266,6 +288,7 @@ declare const _default: {
|
|
|
266
288
|
'pisell2.event.capacity.limit.reached.title': string;
|
|
267
289
|
'pisell2.event.capacity.limit.reached.tip': string;
|
|
268
290
|
'pisell2.appointment.booking.empty.service': string;
|
|
291
|
+
'pisell2.appointment.booking.empty.data': string;
|
|
269
292
|
'pisell2.appointment.booking.empty.time': string;
|
|
270
293
|
'pisell2.appointment.service.title': (val: number) => string;
|
|
271
294
|
'pisell2.appointment.add.guest': string;
|
|
@@ -283,6 +306,16 @@ declare const _default: {
|
|
|
283
306
|
'pisell2.appointment.sunday': string;
|
|
284
307
|
'pisell2.appointment.any.professional': string;
|
|
285
308
|
'pisell2.appointment.for.maximum.availability': string;
|
|
309
|
+
'pisell2.appointment.deposit': string;
|
|
310
|
+
'pisell2.appointment.deposit.agreed': string;
|
|
311
|
+
'pisell2.appointment.deposit.agree.policy': string;
|
|
312
|
+
'pisell2.appointment.deposit.and': string;
|
|
313
|
+
'pisell2.appointment.deposit.amount.tip1': string;
|
|
314
|
+
'pisell2.appointment.deposit.amount.tip2': string;
|
|
315
|
+
'pisell2.appointment.deposit.close': string;
|
|
316
|
+
'pisell2.appointment.tips': string;
|
|
317
|
+
'pisell2.appointment.tips.content': (x: string) => string;
|
|
318
|
+
'pisell2.appointment.fill-form': string;
|
|
286
319
|
'pisell2.text.apply': string;
|
|
287
320
|
'pisell2.text.goodpass': string;
|
|
288
321
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
'pisell2.event.close.tip': "All entered information will be lost. Are you sure you want to exit?",
|
|
13
13
|
'pisell2.event.close.continue': "Continue",
|
|
14
14
|
'pisell2.event.close.exit': "Exit",
|
|
15
|
-
'pisell2.
|
|
15
|
+
'pisell2.appointment.step': function pisell2AppointmentStep(step) {
|
|
16
16
|
return "Step ".concat(step);
|
|
17
17
|
},
|
|
18
18
|
'pisell2.event.select.category': function pisell2EventSelectCategory(val) {
|
|
@@ -82,6 +82,7 @@ export default {
|
|
|
82
82
|
'pisell2.event.capacity.limit.reached.title': 'Capacity limit reached',
|
|
83
83
|
'pisell2.event.capacity.limit.reached.tip': 'One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.',
|
|
84
84
|
'pisell2.appointment.booking.empty.service': 'No service',
|
|
85
|
+
'pisell2.appointment.booking.empty.data': 'No data',
|
|
85
86
|
'pisell2.appointment.booking.empty.time': 'No time',
|
|
86
87
|
'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
|
|
87
88
|
return "".concat(val, " ").concat(val > 1 ? 'services' : 'service');
|
|
@@ -101,6 +102,18 @@ export default {
|
|
|
101
102
|
'pisell2.appointment.sunday': 'Sun',
|
|
102
103
|
'pisell2.appointment.any.professional': 'Any professional',
|
|
103
104
|
'pisell2.appointment.for.maximum.availability': 'for maximum availability',
|
|
105
|
+
'pisell2.appointment.deposit': 'Deposit',
|
|
106
|
+
'pisell2.appointment.deposit.agreed': 'I have read and agree to the ',
|
|
107
|
+
'pisell2.appointment.deposit.agree.policy': 'You need to agree the policy to proceed',
|
|
108
|
+
'pisell2.appointment.deposit.and': ' & ',
|
|
109
|
+
'pisell2.appointment.deposit.amount.tip1': ' needs to be paid as deposit.',
|
|
110
|
+
'pisell2.appointment.deposit.amount.tip2': '',
|
|
111
|
+
'pisell2.appointment.deposit.close': 'Close',
|
|
112
|
+
'pisell2.appointment.tips': 'Tips',
|
|
113
|
+
'pisell2.appointment.tips.content': function pisell2AppointmentTipsContent(x) {
|
|
114
|
+
return "Please carefully review the items in your shopping cart and click the '".concat(x, "' button below to proceed with the payment.");
|
|
115
|
+
},
|
|
116
|
+
'pisell2.appointment.fill-form': 'Enter your details',
|
|
104
117
|
'pisell2.text.apply': 'Apply',
|
|
105
118
|
'pisell2.text.goodpass': "GoodPass",
|
|
106
119
|
'pisell2.text.goodpass.product-vouchers': "Product Vouchers",
|
|
@@ -124,7 +137,7 @@ export default {
|
|
|
124
137
|
'pisell2.event.close.tip': "退出后将丢失所有已填写的信息,确定要退出吗?",
|
|
125
138
|
'pisell2.event.close.continue': "继续",
|
|
126
139
|
'pisell2.event.close.exit': "退出",
|
|
127
|
-
'pisell2.
|
|
140
|
+
'pisell2.appointment.step': function pisell2AppointmentStep(step) {
|
|
128
141
|
return "\u6B65\u9AA4 ".concat(step);
|
|
129
142
|
},
|
|
130
143
|
'pisell2.event.select.category': function pisell2EventSelectCategory(val) {
|
|
@@ -194,6 +207,7 @@ export default {
|
|
|
194
207
|
'pisell2.event.capacity.limit.reached.title': '活动名额已满',
|
|
195
208
|
'pisell2.event.capacity.limit.reached.tip': '购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。',
|
|
196
209
|
'pisell2.appointment.booking.empty.service': '暂无服务',
|
|
210
|
+
'pisell2.appointment.booking.empty.data': '暂无数据',
|
|
197
211
|
'pisell2.appointment.booking.empty.time': '暂无时间',
|
|
198
212
|
'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
|
|
199
213
|
return "".concat(val, "\u4E2A\u670D\u52A1");
|
|
@@ -213,6 +227,18 @@ export default {
|
|
|
213
227
|
'pisell2.appointment.sunday': '周日',
|
|
214
228
|
'pisell2.appointment.any.professional': '随机分配',
|
|
215
229
|
'pisell2.appointment.for.maximum.availability': '立即匹配',
|
|
230
|
+
'pisell2.appointment.deposit': '定金',
|
|
231
|
+
'pisell2.appointment.deposit.agreed': '我已阅读并同意 ',
|
|
232
|
+
'pisell2.appointment.deposit.agree.policy': '您需要同意协议才能继续',
|
|
233
|
+
'pisell2.appointment.deposit.and': ' 和 ',
|
|
234
|
+
'pisell2.appointment.deposit.amount.tip1': '请支付 ',
|
|
235
|
+
'pisell2.appointment.deposit.amount.tip2': ' 定金。',
|
|
236
|
+
'pisell2.appointment.deposit.close': '关闭',
|
|
237
|
+
'pisell2.appointment.tips': '提示',
|
|
238
|
+
'pisell2.appointment.tips.content': function pisell2AppointmentTipsContent(x) {
|
|
239
|
+
return "\u8BF7\u4ED4\u7EC6\u67E5\u770B\u8D2D\u7269\u8F66\u4E2D\u7684\u5546\u54C1\uFF0C\u7136\u540E\u70B9\u51FB\u4E0B\u9762\u7684\u201C".concat(x, "\u201D\u6309\u94AE\u7EE7\u7EED\u4ED8\u6B3E\u3002");
|
|
240
|
+
},
|
|
241
|
+
'pisell2.appointment.fill-form': '填写信息',
|
|
216
242
|
'pisell2.text.apply': '应用',
|
|
217
243
|
'pisell2.text.goodpass': "商品券",
|
|
218
244
|
'pisell2.text.goodpass.product-vouchers': "商品兑换券",
|
|
@@ -236,7 +262,7 @@ export default {
|
|
|
236
262
|
'pisell2.event.close.tip': "退出後將丟失所有已填寫的信息,確定要退出嗎?",
|
|
237
263
|
'pisell2.event.close.continue': "繼續",
|
|
238
264
|
'pisell2.event.close.exit': "退出",
|
|
239
|
-
'pisell2.
|
|
265
|
+
'pisell2.appointment.step': function pisell2AppointmentStep(step) {
|
|
240
266
|
return "\u6B65\u9A5F ".concat(step);
|
|
241
267
|
},
|
|
242
268
|
'pisell2.event.select.category': function pisell2EventSelectCategory(val) {
|
|
@@ -306,6 +332,7 @@ export default {
|
|
|
306
332
|
'pisell2.event.capacity.limit.reached.title': '活動名額已滿',
|
|
307
333
|
'pisell2.event.capacity.limit.reached.tip': '購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。',
|
|
308
334
|
'pisell2.appointment.booking.empty.service': '暫無服務',
|
|
335
|
+
'pisell2.appointment.booking.empty.data': '暫無數據',
|
|
309
336
|
'pisell2.appointment.booking.empty.time': '暫無時間',
|
|
310
337
|
'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
|
|
311
338
|
return "".concat(val, "\u4E2A\u670D\u52D9");
|
|
@@ -325,6 +352,18 @@ export default {
|
|
|
325
352
|
'pisell2.appointment.sunday': '周日',
|
|
326
353
|
'pisell2.appointment.any.professional': '隨機分配',
|
|
327
354
|
'pisell2.appointment.for.maximum.availability': '立即匹配',
|
|
355
|
+
'pisell2.appointment.deposit': '定金',
|
|
356
|
+
'pisell2.appointment.deposit.agreed': '我已閱讀並同意 ',
|
|
357
|
+
'pisell2.appointment.deposit.agree.policy': '您需要同意協議才能繼續',
|
|
358
|
+
'pisell2.appointment.deposit.and': ' 和 ',
|
|
359
|
+
'pisell2.appointment.deposit.amount.tip1': '請支付 ',
|
|
360
|
+
'pisell2.appointment.deposit.amount.tip2': ' 定金。',
|
|
361
|
+
'pisell2.appointment.deposit.close': '关闭',
|
|
362
|
+
'pisell2.appointment.tips': '提示',
|
|
363
|
+
'pisell2.appointment.tips.content': function pisell2AppointmentTipsContent(x) {
|
|
364
|
+
return "\u8ACB\u4ED4\u7D30\u67E5\u770B\u8CFC\u7269\u8ECA\u4E2D\u7684\u5546\u54C1\uFF0C\u7136\u5F8C\u9EDE\u64CA\u4E0B\u9762\u7684\u201C".concat(x, "\u201D\u6309\u9215\u7E7C\u7E8C\u4ED8\u6B3E\u3002");
|
|
365
|
+
},
|
|
366
|
+
'pisell2.appointment.fill-form': '填寫資訊',
|
|
328
367
|
'pisell2.text.apply': '應用',
|
|
329
368
|
'pisell2.text.goodpass': "商品券",
|
|
330
369
|
'pisell2.text.goodpass.product-vouchers': "商品兌換券",
|
|
@@ -84,3 +84,25 @@ export declare const isEmptyGuest: (carts: any[], accounts: any[]) => boolean;
|
|
|
84
84
|
* @Date: 2025-04-15 21:51
|
|
85
85
|
*/
|
|
86
86
|
export declare const isEmptyCartsResourceId: (carts: any[]) => boolean;
|
|
87
|
+
/**
|
|
88
|
+
* @title: 定金合并的标点符号
|
|
89
|
+
* @description:
|
|
90
|
+
* @return {*}
|
|
91
|
+
* @Author: WangHan
|
|
92
|
+
* @Date: 2025-04-21 17:52
|
|
93
|
+
*/
|
|
94
|
+
export declare const getPunctuationMark: (index: number, totalLength: number, isEn: boolean) => any;
|
|
95
|
+
/**
|
|
96
|
+
* @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
|
|
97
|
+
* @description:
|
|
98
|
+
* @param {any} array
|
|
99
|
+
* @param {any} resources
|
|
100
|
+
* @return {*}
|
|
101
|
+
* @Author: WangHan
|
|
102
|
+
* @Date: 2025-04-25 19:05
|
|
103
|
+
*/
|
|
104
|
+
export declare const hasResourceFormId: (array: any[]) => boolean | undefined;
|
|
105
|
+
export declare const formatForms: (array: any[]) => ({
|
|
106
|
+
form_id: any;
|
|
107
|
+
policy_id: any;
|
|
108
|
+
} | null)[];
|
|
@@ -8,7 +8,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
8
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
9
|
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); }
|
|
10
10
|
import dayjs from 'dayjs';
|
|
11
|
-
import { getUniqueId } from "@pisell/utils";
|
|
11
|
+
import { getUniqueId, locales } from "@pisell/utils";
|
|
12
12
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -133,34 +133,41 @@ export var formatGuest = function formatGuest(data, products) {
|
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
135
|
export var formatCarts = function formatCarts(data, resources) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
136
|
+
try {
|
|
137
|
+
// const context = useEngineContext();
|
|
138
|
+
// const utils = context.appHelper.utils || {};
|
|
139
|
+
// const locale = utils?.storage?.get('umi_locale') || 'en-US'
|
|
140
|
+
// const symbol = utils?.getSymbolic() || '$'
|
|
141
|
+
var locale = 'en-US';
|
|
142
|
+
var symbol = '$';
|
|
143
|
+
console.log(data, resources, 'formatCartsformatCarts');
|
|
144
|
+
return data === null || data === void 0 ? void 0 : data.map(function (d) {
|
|
145
|
+
var _currentResource$reso, _currentResources, _d$duration;
|
|
146
|
+
var currentResource = resources === null || resources === void 0 ? void 0 : resources.find(function (r) {
|
|
147
|
+
return (d === null || d === void 0 ? void 0 : d._id) === (r === null || r === void 0 ? void 0 : r._id);
|
|
148
|
+
});
|
|
149
|
+
var currentResources = currentResource === null || currentResource === void 0 || (_currentResource$reso = currentResource.resources) === null || _currentResource$reso === void 0 || (_currentResource$reso = _currentResource$reso[0]) === null || _currentResource$reso === void 0 ? void 0 : _currentResource$reso.renderList;
|
|
150
|
+
currentResources = (_currentResources = currentResources) === null || _currentResources === void 0 ? void 0 : _currentResources.map(function (d) {
|
|
151
|
+
return _objectSpread(_objectSpread({}, d), {}, {
|
|
152
|
+
label: (d === null || d === void 0 ? void 0 : d.main_field) || (d === null || d === void 0 ? void 0 : d.id)
|
|
153
|
+
});
|
|
154
|
+
});
|
|
149
155
|
return _objectSpread(_objectSpread({}, d), {}, {
|
|
150
|
-
|
|
156
|
+
format: ['HH:mm', 'HH:mm'],
|
|
157
|
+
show_time: true,
|
|
158
|
+
duration_type: (d === null || d === void 0 || (_d$duration = d.duration) === null || _d$duration === void 0 ? void 0 : _d$duration.type) || 'minutes',
|
|
159
|
+
locale: locale,
|
|
160
|
+
symbol: symbol,
|
|
161
|
+
resources: currentResources,
|
|
162
|
+
is_hide_like: true,
|
|
163
|
+
holder_title: '',
|
|
164
|
+
holders: []
|
|
151
165
|
});
|
|
152
166
|
});
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
locale: locale,
|
|
158
|
-
symbol: symbol,
|
|
159
|
-
resources: currentResources,
|
|
160
|
-
is_hide_like: true,
|
|
161
|
-
holder_title: ''
|
|
162
|
-
});
|
|
163
|
-
});
|
|
167
|
+
} catch (error) {
|
|
168
|
+
console.log(error, 'formatCarts');
|
|
169
|
+
return [];
|
|
170
|
+
}
|
|
164
171
|
};
|
|
165
172
|
|
|
166
173
|
/**
|
|
@@ -280,4 +287,82 @@ export var isEmptyCartsResourceId = function isEmptyCartsResourceId(carts) {
|
|
|
280
287
|
});
|
|
281
288
|
console.log(isEmptyResourceId, 'isEmptyResourceId');
|
|
282
289
|
return isEmptyResourceId;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* @title: 定金合并的标点符号
|
|
294
|
+
* @description:
|
|
295
|
+
* @return {*}
|
|
296
|
+
* @Author: WangHan
|
|
297
|
+
* @Date: 2025-04-21 17:52
|
|
298
|
+
*/
|
|
299
|
+
export var getPunctuationMark = function getPunctuationMark(index, totalLength, isEn) {
|
|
300
|
+
var isLastItem = index === totalLength - 1;
|
|
301
|
+
var isSecondLastItem = index === totalLength - 2;
|
|
302
|
+
if (isLastItem) {
|
|
303
|
+
return isEn ? '.' : '。';
|
|
304
|
+
}
|
|
305
|
+
if (isSecondLastItem) {
|
|
306
|
+
return locales.getText('pisell2.appointment.deposit.and');
|
|
307
|
+
}
|
|
308
|
+
return isEn ? ', ' : '、';
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
|
|
313
|
+
* @description:
|
|
314
|
+
* @param {any} array
|
|
315
|
+
* @param {any} resources
|
|
316
|
+
* @return {*}
|
|
317
|
+
* @Author: WangHan
|
|
318
|
+
* @Date: 2025-04-25 19:05
|
|
319
|
+
*/
|
|
320
|
+
export var hasResourceFormId = function hasResourceFormId(array) {
|
|
321
|
+
try {
|
|
322
|
+
if (!(array !== null && array !== void 0 && array.length)) {
|
|
323
|
+
return false;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// 检查数组中的任何一个 resource_id 是否满足条件
|
|
327
|
+
return array.some(function (item) {
|
|
328
|
+
var _item$resources;
|
|
329
|
+
// 获取当前项的 resource_id
|
|
330
|
+
var resourceId = item.resource_id;
|
|
331
|
+
|
|
332
|
+
// 在 resources 中查找匹配的项
|
|
333
|
+
var foundResource = item === null || item === void 0 || (_item$resources = item.resources) === null || _item$resources === void 0 ? void 0 : _item$resources.find(function (resource) {
|
|
334
|
+
return resource.id === resourceId;
|
|
335
|
+
});
|
|
336
|
+
console.log(foundResource, item, 'foundResource');
|
|
337
|
+
// 如果找到匹配项并且其 resource_form_id 存在且有值
|
|
338
|
+
return foundResource && foundResource.resource_form_id;
|
|
339
|
+
});
|
|
340
|
+
} catch (error) {
|
|
341
|
+
console.log(error, 'hasResourceFormId');
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
export var formatForms = function formatForms(array) {
|
|
345
|
+
try {
|
|
346
|
+
if (!(array !== null && array !== void 0 && array.length)) {
|
|
347
|
+
return [];
|
|
348
|
+
}
|
|
349
|
+
var mappedResources = array.map(function (item) {
|
|
350
|
+
var _item$resources2;
|
|
351
|
+
// 在 resources 中查找匹配的项
|
|
352
|
+
var foundResource = item === null || item === void 0 || (_item$resources2 = item.resources) === null || _item$resources2 === void 0 ? void 0 : _item$resources2.find(function (resource) {
|
|
353
|
+
return resource.id === item.resource_id;
|
|
354
|
+
});
|
|
355
|
+
if (foundResource && (foundResource !== null && foundResource !== void 0 && foundResource.resource_form_id || foundResource !== null && foundResource !== void 0 && foundResource.policy_id)) {
|
|
356
|
+
return {
|
|
357
|
+
form_id: foundResource.resource_form_id,
|
|
358
|
+
policy_id: foundResource.policy_id
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
return null;
|
|
362
|
+
}).filter(Boolean);
|
|
363
|
+
return mappedResources;
|
|
364
|
+
} catch (error) {
|
|
365
|
+
console.log(error, 'hasResourceFormId');
|
|
366
|
+
return [];
|
|
367
|
+
}
|
|
283
368
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
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
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(
|
|
6
|
-
function _toPrimitive(
|
|
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
7
|
import { miniRedux } from "@pisell/utils";
|
|
8
8
|
var defaultState = {};
|
|
9
9
|
var _miniRedux = miniRedux({
|
|
@@ -6,7 +6,7 @@ import CollapsibleList from "../../collapsibleList";
|
|
|
6
6
|
import { renderBundles } from "../../collapsibleList/utils";
|
|
7
7
|
import "./index.less";
|
|
8
8
|
var SelectProductItem = function SelectProductItem(_ref) {
|
|
9
|
-
var _item$_extend, _item$
|
|
9
|
+
var _item$_extend, _item$_extend2;
|
|
10
10
|
var item = _ref.item,
|
|
11
11
|
_onClick = _ref.onClick,
|
|
12
12
|
onChangeQuantity = _ref.onChangeQuantity,
|
|
@@ -28,7 +28,7 @@ var SelectProductItem = function SelectProductItem(_ref) {
|
|
|
28
28
|
style: style,
|
|
29
29
|
className: classNames("server-select-product", className),
|
|
30
30
|
onClick: function onClick() {
|
|
31
|
-
_onClick === null || _onClick === void 0
|
|
31
|
+
_onClick === null || _onClick === void 0 || _onClick(item);
|
|
32
32
|
}
|
|
33
33
|
}, item.cover ? /*#__PURE__*/React.createElement("img", {
|
|
34
34
|
src: image.ali(item.cover, 100),
|
|
@@ -39,11 +39,11 @@ var SelectProductItem = function SelectProductItem(_ref) {
|
|
|
39
39
|
className: "server-select-product-title"
|
|
40
40
|
}, item.title), /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
className: "server-select-product-subtitle"
|
|
42
|
-
}, item.subtitle || ""), (((_item$_extend = item._extend) === null || _item$_extend === void 0
|
|
42
|
+
}, item.subtitle || ""), (((_item$_extend = item._extend) === null || _item$_extend === void 0 || (_item$_extend = _item$_extend.other) === null || _item$_extend === void 0 ? void 0 : _item$_extend.bundle) || []).length ? /*#__PURE__*/React.createElement(CollapsibleList, {
|
|
43
43
|
style: {
|
|
44
44
|
width: "100%"
|
|
45
45
|
},
|
|
46
|
-
list: ((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0
|
|
46
|
+
list: ((_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 || (_item$_extend2 = _item$_extend2.other) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.bundle) || [],
|
|
47
47
|
renderItem: function renderItem(item) {
|
|
48
48
|
return renderBundles(item, amountSymbol);
|
|
49
49
|
}
|
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
-
function _iterableToArrayLimit(
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from "react";
|
|
8
8
|
import classNames from "classnames";
|
|
@@ -13,6 +13,10 @@ import "./index.less";
|
|
|
13
13
|
|
|
14
14
|
// tabs 子组件定义
|
|
15
15
|
|
|
16
|
+
// 定义主键类型
|
|
17
|
+
|
|
18
|
+
// Tabs 可传递的参数
|
|
19
|
+
|
|
16
20
|
var Tabs = function Tabs(_ref, ref) {
|
|
17
21
|
var renderTab = _ref.renderTab,
|
|
18
22
|
rowKey = _ref.rowKey,
|
|
@@ -29,7 +29,7 @@ var BrowserSelect = function BrowserSelect(props) {
|
|
|
29
29
|
onChange: function onChange(e) {
|
|
30
30
|
var _resetProps$onChange;
|
|
31
31
|
e.persist();
|
|
32
|
-
(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0
|
|
32
|
+
(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 || _resetProps$onChange.call(resetProps, e);
|
|
33
33
|
}
|
|
34
34
|
}), _options);
|
|
35
35
|
};
|
|
@@ -45,7 +45,7 @@ import VoucherCard from "../voucher";
|
|
|
45
45
|
* @Date: 2024-01-30 16:51
|
|
46
46
|
*/
|
|
47
47
|
var Footer = function Footer(props) {
|
|
48
|
-
var _context$appHelper, _state$bookingConfig2, _state$bookingConfig4, _state$addons2,
|
|
48
|
+
var _context$appHelper, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _state$addons4, _state$bookingDetail9;
|
|
49
49
|
var state = props.state,
|
|
50
50
|
buttons = props.buttons,
|
|
51
51
|
dispatch = props.dispatch,
|
|
@@ -236,8 +236,10 @@ var Footer = function Footer(props) {
|
|
|
236
236
|
}, [state, params]);
|
|
237
237
|
|
|
238
238
|
// 是否安装商品券应用
|
|
239
|
-
var hasGoodPassApp =
|
|
240
|
-
|
|
239
|
+
var hasGoodPassApp = useMemo(function () {
|
|
240
|
+
var _businessUtils$getApp;
|
|
241
|
+
return !!(businessUtils !== null && businessUtils !== void 0 && (_businessUtils$getApp = businessUtils.getAppByModal) !== null && _businessUtils$getApp !== void 0 && _businessUtils$getApp.call(businessUtils, 'goodpass'));
|
|
242
|
+
}, []);
|
|
241
243
|
|
|
242
244
|
/**
|
|
243
245
|
* @title: 跳转到 checkout页面
|
|
@@ -1173,7 +1175,7 @@ var Footer = function Footer(props) {
|
|
|
1173
1175
|
round: true,
|
|
1174
1176
|
loading: showFooter,
|
|
1175
1177
|
active: true
|
|
1176
|
-
}, hasGoodPassApp
|
|
1178
|
+
}, hasGoodPassApp ? /*#__PURE__*/React.createElement(VoucherCard, {
|
|
1177
1179
|
state: state,
|
|
1178
1180
|
dispatch: dispatch
|
|
1179
1181
|
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -22,7 +22,6 @@ import useEngineContext from "../../../../hooks/useEngineContext";
|
|
|
22
22
|
import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
|
|
23
23
|
import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
|
|
24
24
|
import "./index.less";
|
|
25
|
-
import { useMemoizedFn } from "ahooks";
|
|
26
25
|
var ShopDiscountHooks = {
|
|
27
26
|
onInited: 'shopDiscount:onInited',
|
|
28
27
|
onDestroy: 'shopDiscount:onDestroy',
|
|
@@ -32,7 +31,6 @@ var ShopDiscountHooks = {
|
|
|
32
31
|
onRulesListChange: 'shopDiscount:onRulesListChange',
|
|
33
32
|
onLoadPrepareCalcResult: 'shopDiscount:onLoadPrepareCalcResult'
|
|
34
33
|
};
|
|
35
|
-
var services = {};
|
|
36
34
|
var VoucherCard = function VoucherCard(props) {
|
|
37
35
|
var _context$appHelper, _state$client$value;
|
|
38
36
|
var context = useEngineContext();
|
|
@@ -55,7 +53,6 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
55
53
|
var productRef = useRef(state.service.value);
|
|
56
54
|
var isBooking4Shop = useIsBooking4Shop(state);
|
|
57
55
|
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
58
|
-
services = state.service;
|
|
59
56
|
var availableData = useMemo(function () {
|
|
60
57
|
if (!isBooking4Shop) return [];
|
|
61
58
|
var shopDiscount = pisellos.getModule('shopDiscount');
|
|
@@ -94,25 +91,18 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
94
91
|
productRef.current = val.productList;
|
|
95
92
|
dispatch({
|
|
96
93
|
type: 'setService',
|
|
97
|
-
payload:
|
|
94
|
+
payload: {
|
|
98
95
|
value: val.productList
|
|
99
|
-
}
|
|
96
|
+
}
|
|
100
97
|
});
|
|
101
98
|
}
|
|
102
99
|
}, [state.service.value, isBooking4Shop]);
|
|
103
|
-
var fn = useMemoizedFn(function (result) {
|
|
104
|
-
dispatch({
|
|
105
|
-
type: 'setService',
|
|
106
|
-
payload: _objectSpread(_objectSpread({}, services), {}, {
|
|
107
|
-
value: result.productList
|
|
108
|
-
})
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
100
|
|
|
112
101
|
// 监听customer变化
|
|
113
102
|
useEffect(function () {
|
|
114
103
|
if (!isBooking4Shop) return;
|
|
115
104
|
pisellos.effects.on(ShopDiscountHooks.onCustomerChange, function (customer) {
|
|
105
|
+
console.log(customer, 'customerChange');
|
|
116
106
|
// 更新客户
|
|
117
107
|
dispatch({
|
|
118
108
|
type: 'setClient',
|
|
@@ -121,8 +111,16 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
121
111
|
}
|
|
122
112
|
});
|
|
123
113
|
});
|
|
124
|
-
pisellos.effects.on(ShopDiscountHooks.onLoadPrepareCalcResult,
|
|
114
|
+
pisellos.effects.on(ShopDiscountHooks.onLoadPrepareCalcResult, function (result) {
|
|
115
|
+
dispatch({
|
|
116
|
+
type: 'setService',
|
|
117
|
+
payload: {
|
|
118
|
+
value: result.productList
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
125
122
|
pisellos.effects.on(ShopDiscountHooks.onDiscountListChange, function (discount) {
|
|
123
|
+
console.log(discount, 'discountChange');
|
|
126
124
|
setDisCountList(discount);
|
|
127
125
|
});
|
|
128
126
|
return function () {
|
|
@@ -131,7 +129,7 @@ var VoucherCard = function VoucherCard(props) {
|
|
|
131
129
|
pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult);
|
|
132
130
|
pisellos.effects.off(ShopDiscountHooks.onDiscountListChange);
|
|
133
131
|
};
|
|
134
|
-
}, [state.bookingId, isBooking4Shop
|
|
132
|
+
}, [state.bookingId, isBooking4Shop]);
|
|
135
133
|
|
|
136
134
|
// apply code
|
|
137
135
|
var onScanCode = /*#__PURE__*/function () {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
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
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(
|
|
6
|
-
function _toPrimitive(
|
|
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
7
|
import { miniRedux } from "@pisell/utils";
|
|
8
8
|
var defaultState = {};
|
|
9
9
|
var _miniRedux = miniRedux({
|