@pisell/private-materials 3.0.197 → 3.0.199
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/components/customSelect/index.d.ts +0 -1
- package/es/components/booking/components/customSelect/index.js +2 -6
- package/es/components/booking/components/footer/amount.js +22 -45
- package/es/components/booking/components/footer/index.js +40 -84
- package/es/components/booking/components/footer/utils.js +32 -218
- package/es/components/booking/info/addServiceVariant/index.js +1 -8
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
- package/es/components/booking/info/clientVariant/vertical/index.js +4 -33
- package/es/components/booking/info/main.js +8 -20
- package/es/components/booking/info/model.js +0 -3
- package/es/components/booking/info/pet/index.js +5 -54
- package/es/components/booking/info/service/addService/index.js +20 -127
- package/es/components/booking/info/service/addService/index.less +3 -13
- package/es/components/booking/info/service/addService/utils.d.ts +2 -11
- package/es/components/booking/info/service/addService/utils.js +24 -49
- package/es/components/booking/info/service/editService/index.js +41 -232
- package/es/components/booking/info/service/editService/index.less +13 -18
- package/es/components/booking/info/utils.d.ts +0 -9
- package/es/components/booking/info/utils.js +0 -13
- package/es/components/booking/locales.d.ts +0 -60
- package/es/components/booking/locales.js +3 -75
- package/es/components/booking/model.d.ts +1 -4
- package/es/components/booking/model.js +2 -4
- package/es/components/booking/utils.d.ts +3 -12
- package/es/components/booking/utils.js +22 -126
- package/es/components/eftpos/form/index.js +12 -6
- package/es/components/eftpos/group/index.d.ts +1 -2
- package/es/components/eftpos/group/index.js +1 -2
- package/es/components/eftpos/index.js +2 -2
- package/es/components/eftpos/receipt/index.d.ts +24 -0
- package/es/components/eftpos/receipt/index.js +96 -0
- package/es/components/eftposPay/helper.d.ts +1 -0
- package/es/components/eftposPay/helper.js +14 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/tyro/index.js +51 -20
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/lib/components/booking/components/customSelect/index.d.ts +0 -1
- package/lib/components/booking/components/customSelect/index.js +2 -6
- package/lib/components/booking/components/footer/amount.js +8 -26
- package/lib/components/booking/components/footer/index.js +4 -25
- package/lib/components/booking/components/footer/utils.js +31 -144
- package/lib/components/booking/info/addServiceVariant/index.js +0 -5
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
- package/lib/components/booking/info/clientVariant/vertical/index.js +10 -36
- package/lib/components/booking/info/main.js +4 -11
- package/lib/components/booking/info/model.js +0 -3
- package/lib/components/booking/info/pet/index.js +25 -61
- package/lib/components/booking/info/service/addService/index.js +28 -95
- package/lib/components/booking/info/service/addService/index.less +3 -13
- package/lib/components/booking/info/service/addService/utils.d.ts +2 -11
- package/lib/components/booking/info/service/addService/utils.js +10 -31
- package/lib/components/booking/info/service/editService/index.js +122 -271
- package/lib/components/booking/info/service/editService/index.less +13 -18
- package/lib/components/booking/info/utils.d.ts +0 -9
- package/lib/components/booking/info/utils.js +0 -6
- package/lib/components/booking/locales.d.ts +0 -60
- package/lib/components/booking/locales.js +3 -63
- package/lib/components/booking/model.d.ts +1 -4
- package/lib/components/booking/model.js +2 -4
- package/lib/components/booking/utils.d.ts +3 -12
- package/lib/components/booking/utils.js +15 -79
- package/lib/components/eftpos/form/index.js +12 -6
- package/lib/components/eftpos/group/index.d.ts +1 -2
- package/lib/components/eftpos/group/index.js +0 -1
- package/lib/components/eftpos/index.js +2 -2
- package/lib/components/eftpos/receipt/index.d.ts +24 -0
- package/lib/components/eftpos/receipt/index.js +88 -0
- package/lib/components/eftposPay/helper.d.ts +1 -0
- package/lib/components/eftposPay/helper.js +21 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/tyro/index.js +36 -7
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/package.json +3 -3
- package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -37
- package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -5
- package/es/components/booking/info/dateRange/index.js +0 -98
- package/es/components/booking/info/dateRange/index.less +0 -21
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/es/components/booking/info/pet/ChangePetModal/index.js +0 -118
- package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/es/components/booking/info/service2/Lists.d.ts +0 -3
- package/es/components/booking/info/service2/Lists.js +0 -158
- package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
- package/es/components/booking/info/service2/index.d.ts +0 -3
- package/es/components/booking/info/service2/index.js +0 -58
- package/es/components/booking/info/service2/status.d.ts +0 -31
- package/es/components/booking/info/service2/status.js +0 -78
- package/es/components/booking/info/service2/utils.d.ts +0 -145
- package/es/components/booking/info/service2/utils.js +0 -436
- package/es/components/booking/materiels/holder/index.d.ts +0 -7
- package/es/components/booking/materiels/holder/index.js +0 -51
- package/es/components/shoppingCart/Provider.d.ts +0 -3
- package/es/components/shoppingCart/Provider.js +0 -86
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/Product.js +0 -96
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/index.js +0 -72
- package/es/components/shoppingCart/components/Cart/index.less +0 -68
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Empty/index.js +0 -14
- package/es/components/shoppingCart/components/Empty/index.less +0 -19
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Render/index.js +0 -68
- package/es/components/shoppingCart/components/Render/index.less +0 -2
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
- package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useAddService.js +0 -23
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useClearCart.js +0 -54
- package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useContext.js +0 -5
- package/es/components/shoppingCart/index.d.ts +0 -4
- package/es/components/shoppingCart/index.js +0 -24
- package/es/components/shoppingCart/locales.d.ts +0 -33
- package/es/components/shoppingCart/locales.js +0 -38
- package/es/components/shoppingCart/mock.d.ts +0 -40
- package/es/components/shoppingCart/mock.js +0 -40
- package/es/components/shoppingCart/status.d.ts +0 -2
- package/es/components/shoppingCart/status.js +0 -22
- package/es/components/shoppingCart/type.d.ts +0 -39
- package/es/components/shoppingCart/type.js +0 -1
- package/es/components/shoppingCart/utils.d.ts +0 -63
- package/es/components/shoppingCart/utils.js +0 -119
- package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -59
- package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -5
- package/lib/components/booking/info/dateRange/index.js +0 -111
- package/lib/components/booking/info/dateRange/index.less +0 -21
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -110
- package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/lib/components/booking/info/service2/Lists.d.ts +0 -3
- package/lib/components/booking/info/service2/Lists.js +0 -113
- package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
- package/lib/components/booking/info/service2/index.d.ts +0 -3
- package/lib/components/booking/info/service2/index.js +0 -75
- package/lib/components/booking/info/service2/status.d.ts +0 -31
- package/lib/components/booking/info/service2/status.js +0 -81
- package/lib/components/booking/info/service2/utils.d.ts +0 -145
- package/lib/components/booking/info/service2/utils.js +0 -320
- package/lib/components/booking/materiels/holder/index.d.ts +0 -7
- package/lib/components/booking/materiels/holder/index.js +0 -65
- package/lib/components/shoppingCart/Provider.d.ts +0 -3
- package/lib/components/shoppingCart/Provider.js +0 -110
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/Product.js +0 -89
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/index.js +0 -77
- package/lib/components/shoppingCart/components/Cart/index.less +0 -68
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Empty/index.js +0 -43
- package/lib/components/shoppingCart/components/Empty/index.less +0 -19
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Render/index.js +0 -79
- package/lib/components/shoppingCart/components/Render/index.less +0 -2
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -116
- package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useClearCart.js +0 -71
- package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useContext.js +0 -31
- package/lib/components/shoppingCart/index.d.ts +0 -4
- package/lib/components/shoppingCart/index.js +0 -60
- package/lib/components/shoppingCart/locales.d.ts +0 -33
- package/lib/components/shoppingCart/locales.js +0 -56
- package/lib/components/shoppingCart/mock.d.ts +0 -40
- package/lib/components/shoppingCart/mock.js +0 -76
- package/lib/components/shoppingCart/status.d.ts +0 -2
- package/lib/components/shoppingCart/status.js +0 -60
- package/lib/components/shoppingCart/type.d.ts +0 -39
- package/lib/components/shoppingCart/type.js +0 -17
- package/lib/components/shoppingCart/utils.d.ts +0 -63
- package/lib/components/shoppingCart/utils.js +0 -92
- package/lowcode/shopping-cart/meta.ts +0 -98
|
@@ -33,11 +33,6 @@ declare const _default: {
|
|
|
33
33
|
'pisell2.text.start_time': string;
|
|
34
34
|
'pisell2.text.duration': string;
|
|
35
35
|
'pisell2.text.resource': string;
|
|
36
|
-
'pisell2.text.end_time': string;
|
|
37
|
-
'pisell2.text.start_date': string;
|
|
38
|
-
'pisell2.text.end_date': string;
|
|
39
|
-
'pisell2.text.quantity': string;
|
|
40
|
-
'pisell2.text.holder': string;
|
|
41
36
|
'pisell2.text.warnings': string;
|
|
42
37
|
'pisell2.text.order-notes': string;
|
|
43
38
|
'pisell2.text.add-order-notes': string;
|
|
@@ -53,7 +48,6 @@ declare const _default: {
|
|
|
53
48
|
'pisell2.text.updated': string;
|
|
54
49
|
'pisell2.text.appointment-updated': string;
|
|
55
50
|
'pisell2.text.please-create-an-appointment-first': string;
|
|
56
|
-
'pisell2.text.day': (val: number) => string;
|
|
57
51
|
'pisell2.text.min': string;
|
|
58
52
|
'pisell2.text.h': string;
|
|
59
53
|
'pisell2.text.other': string;
|
|
@@ -224,20 +218,6 @@ declare const _default: {
|
|
|
224
218
|
'pisell2.booking.info.text.create-new': string;
|
|
225
219
|
'pisell2.booking.info.text.form-agreement-yes': string;
|
|
226
220
|
'pisell2.booking.info.text.form-agreement-no': string;
|
|
227
|
-
'pisell2.text.open.items': string;
|
|
228
|
-
'pisell2.text.cart.of': (val: any) => string;
|
|
229
|
-
'pisell2.text.no.selected': string;
|
|
230
|
-
'pisell2.text.select.items': string;
|
|
231
|
-
'pisell2.text.edit-select-service': string;
|
|
232
|
-
'pisell2.text.missing.reservation.title': string;
|
|
233
|
-
'pisell2.text.missing.reservation.content': string;
|
|
234
|
-
'pisell2.text.confirm': string;
|
|
235
|
-
'pisell2.text.cancel': string;
|
|
236
|
-
'pisell2.text.change.pet.title': string;
|
|
237
|
-
'pisell2.text.change.pet.content': string;
|
|
238
|
-
'pisell2.text.change.pet.content1': string;
|
|
239
|
-
'pisell2.text.change.pet.confirm': string;
|
|
240
|
-
'pisell2.text.change.pet.cancel': string;
|
|
241
221
|
};
|
|
242
222
|
'zh-CN': {
|
|
243
223
|
'pisell2.text.refunded-amount': string;
|
|
@@ -276,11 +256,6 @@ declare const _default: {
|
|
|
276
256
|
'pisell2.text.discount': string;
|
|
277
257
|
'pisell2.text.discount-reason': string;
|
|
278
258
|
'pisell2.text.start_time': string;
|
|
279
|
-
'pisell2.text.end_time': string;
|
|
280
|
-
'pisell2.text.start_date': string;
|
|
281
|
-
'pisell2.text.end_date': string;
|
|
282
|
-
'pisell2.text.quantity': string;
|
|
283
|
-
'pisell2.text.holder': string;
|
|
284
259
|
'pisell2.text.duration': string;
|
|
285
260
|
'pisell2.text.resource': string;
|
|
286
261
|
'pisell2.text.warnings': string;
|
|
@@ -300,7 +275,6 @@ declare const _default: {
|
|
|
300
275
|
'pisell2.text.appointment-updated': string;
|
|
301
276
|
'pisell2.text.updated': string;
|
|
302
277
|
'pisell2.text.please-create-an-appointment-first': string;
|
|
303
|
-
'pisell2.text.day': (val: number) => string;
|
|
304
278
|
'pisell2.text.min': string;
|
|
305
279
|
'pisell2.text.h': string;
|
|
306
280
|
'pisell2.text.other': string;
|
|
@@ -464,20 +438,6 @@ declare const _default: {
|
|
|
464
438
|
'pisell2.booking.info.text.create-new': string;
|
|
465
439
|
'pisell2.booking.info.text.form-agreement-yes': string;
|
|
466
440
|
'pisell2.booking.info.text.form-agreement-no': string;
|
|
467
|
-
'pisell2.text.open.items': string;
|
|
468
|
-
'pisell2.text.cart.of': (val: any) => string;
|
|
469
|
-
'pisell2.text.no.selected': string;
|
|
470
|
-
'pisell2.text.select.items': string;
|
|
471
|
-
'pisell2.text.edit-select-service': string;
|
|
472
|
-
'pisell2.text.missing.reservation.title': string;
|
|
473
|
-
'pisell2.text.missing.reservation.content': string;
|
|
474
|
-
'pisell2.text.confirm': string;
|
|
475
|
-
'pisell2.text.cancel': string;
|
|
476
|
-
'pisell2.text.change.pet.title': string;
|
|
477
|
-
'pisell2.text.change.pet.content': string;
|
|
478
|
-
'pisell2.text.change.pet.content1': string;
|
|
479
|
-
'pisell2.text.change.pet.confirm': string;
|
|
480
|
-
'pisell2.text.change.pet.cancel': string;
|
|
481
441
|
};
|
|
482
442
|
'zh-HK': {
|
|
483
443
|
'pisell2.text.refunded-amount': string;
|
|
@@ -516,11 +476,6 @@ declare const _default: {
|
|
|
516
476
|
'pisell2.text.discount': string;
|
|
517
477
|
'pisell2.text.discount-reason': string;
|
|
518
478
|
'pisell2.text.start_time': string;
|
|
519
|
-
'pisell2.text.end_time': string;
|
|
520
|
-
'pisell2.text.start_date': string;
|
|
521
|
-
'pisell2.text.end_date': string;
|
|
522
|
-
'pisell2.text.quantity': string;
|
|
523
|
-
'pisell2.text.holder': string;
|
|
524
479
|
'pisell2.text.duration': string;
|
|
525
480
|
'pisell2.text.resource': string;
|
|
526
481
|
'pisell2.text.warnings': string;
|
|
@@ -538,7 +493,6 @@ declare const _default: {
|
|
|
538
493
|
'pisell2.text.appointment-updated': string;
|
|
539
494
|
'pisell2.text.updated': string;
|
|
540
495
|
'pisell2.text.please-create-an-appointment-first': string;
|
|
541
|
-
'pisell2.text.day': (val: number) => string;
|
|
542
496
|
'pisell2.text.min': string;
|
|
543
497
|
'pisell2.text.h': string;
|
|
544
498
|
'pisell2.text.other': string;
|
|
@@ -704,20 +658,6 @@ declare const _default: {
|
|
|
704
658
|
'pisell2.booking.info.text.create-new': string;
|
|
705
659
|
'pisell2.booking.info.text.form-agreement-yes': string;
|
|
706
660
|
'pisell2.booking.info.text.form-agreement-no': string;
|
|
707
|
-
'pisell2.text.open.items': string;
|
|
708
|
-
'pisell2.text.cart.of': (val: any) => string;
|
|
709
|
-
'pisell2.text.no.selected': string;
|
|
710
|
-
'pisell2.text.select.items': string;
|
|
711
|
-
'pisell2.text.edit-select-service': string;
|
|
712
|
-
'pisell2.text.missing.reservation.title': string;
|
|
713
|
-
'pisell2.text.missing.reservation.content': string;
|
|
714
|
-
'pisell2.text.confirm': string;
|
|
715
|
-
'pisell2.text.cancel': string;
|
|
716
|
-
'pisell2.text.change.pet.title': string;
|
|
717
|
-
'pisell2.text.change.pet.content': string;
|
|
718
|
-
'pisell2.text.change.pet.content1': string;
|
|
719
|
-
'pisell2.text.change.pet.confirm': string;
|
|
720
|
-
'pisell2.text.change.pet.cancel': string;
|
|
721
661
|
};
|
|
722
662
|
};
|
|
723
663
|
export default _default;
|
|
@@ -34,11 +34,6 @@ export default {
|
|
|
34
34
|
'pisell2.text.start_time': 'Start time',
|
|
35
35
|
'pisell2.text.duration': 'Duration',
|
|
36
36
|
'pisell2.text.resource': 'Resource',
|
|
37
|
-
'pisell2.text.end_time': 'End time',
|
|
38
|
-
'pisell2.text.start_date': 'Start date',
|
|
39
|
-
'pisell2.text.end_date': 'End date',
|
|
40
|
-
'pisell2.text.quantity': 'Quantity',
|
|
41
|
-
'pisell2.text.holder': 'Holder',
|
|
42
37
|
'pisell2.text.warnings': 'Warnings',
|
|
43
38
|
'pisell2.text.order-notes': 'Order notes',
|
|
44
39
|
'pisell2.text.add-order-notes': 'Add Order note',
|
|
@@ -54,9 +49,6 @@ export default {
|
|
|
54
49
|
'pisell2.text.updated': ' updated',
|
|
55
50
|
'pisell2.text.appointment-updated': 'Appointment updated',
|
|
56
51
|
'pisell2.text.please-create-an-appointment-first': 'Please create an appointment first',
|
|
57
|
-
'pisell2.text.day': function pisell2TextDay(val) {
|
|
58
|
-
return "".concat(val > 1 ? 'days' : 'day');
|
|
59
|
-
},
|
|
60
52
|
'pisell2.text.min': 'min',
|
|
61
53
|
'pisell2.text.h': 'h',
|
|
62
54
|
'pisell2.text.other': 'Other',
|
|
@@ -258,23 +250,7 @@ export default {
|
|
|
258
250
|
'pisell2.booking.info.text.clear-all': "Clear all",
|
|
259
251
|
'pisell2.booking.info.text.create-new': "Create new",
|
|
260
252
|
'pisell2.booking.info.text.form-agreement-yes': "Yes",
|
|
261
|
-
'pisell2.booking.info.text.form-agreement-no': "No"
|
|
262
|
-
'pisell2.text.open.items': 'Open items',
|
|
263
|
-
'pisell2.text.cart.of': function pisell2TextCartOf(val) {
|
|
264
|
-
return "Cart of ".concat(val);
|
|
265
|
-
},
|
|
266
|
-
'pisell2.text.no.selected': 'No items selected',
|
|
267
|
-
'pisell2.text.select.items': 'Select items',
|
|
268
|
-
'pisell2.text.edit-select-service': 'Edit items',
|
|
269
|
-
'pisell2.text.missing.reservation.title': 'Missing Reservation Type',
|
|
270
|
-
'pisell2.text.missing.reservation.content': 'You have not selected a reservation type, Please select one before proceeding.',
|
|
271
|
-
'pisell2.text.confirm': 'Confirm',
|
|
272
|
-
'pisell2.text.cancel': 'Cancel',
|
|
273
|
-
'pisell2.text.change.pet.title': 'You have changed the holder information. Do you want to keep the items under their name?',
|
|
274
|
-
'pisell2.text.change.pet.content': 'Selecting “Keep” will move the items to Open Items. Selecting “Discard” will clear all items under the holder’s name.',
|
|
275
|
-
'pisell2.text.change.pet.content1': 'Reservation-type items cannot be added to the Open Items cart and will be removed.',
|
|
276
|
-
'pisell2.text.change.pet.confirm': 'Keep (Add to open items)',
|
|
277
|
-
'pisell2.text.change.pet.cancel': 'Discard (Clear items)'
|
|
253
|
+
'pisell2.booking.info.text.form-agreement-no': "No"
|
|
278
254
|
},
|
|
279
255
|
'zh-CN': {
|
|
280
256
|
'pisell2.text.refunded-amount': '已退金额',
|
|
@@ -313,11 +289,6 @@ export default {
|
|
|
313
289
|
'pisell2.text.discount': '折扣',
|
|
314
290
|
'pisell2.text.discount-reason': '折扣原因',
|
|
315
291
|
'pisell2.text.start_time': '开始时间',
|
|
316
|
-
'pisell2.text.end_time': '结束时间',
|
|
317
|
-
'pisell2.text.start_date': '开始日期',
|
|
318
|
-
'pisell2.text.end_date': '结束日期',
|
|
319
|
-
'pisell2.text.quantity': '数量',
|
|
320
|
-
'pisell2.text.holder': '预约主体',
|
|
321
292
|
'pisell2.text.duration': '时长',
|
|
322
293
|
'pisell2.text.resource': '资源',
|
|
323
294
|
'pisell2.text.warnings': '个警告',
|
|
@@ -338,9 +309,6 @@ export default {
|
|
|
338
309
|
'pisell2.text.appointment-updated': '预约已更新',
|
|
339
310
|
'pisell2.text.updated': '已更新',
|
|
340
311
|
'pisell2.text.please-create-an-appointment-first': '请先创建预约',
|
|
341
|
-
'pisell2.text.day': function pisell2TextDay(val) {
|
|
342
|
-
return '天';
|
|
343
|
-
},
|
|
344
312
|
'pisell2.text.min': '分钟',
|
|
345
313
|
'pisell2.text.h': '小时',
|
|
346
314
|
'pisell2.text.other': '未分类',
|
|
@@ -539,23 +507,7 @@ export default {
|
|
|
539
507
|
'pisell2.booking.info.text.clear-all': "清空",
|
|
540
508
|
'pisell2.booking.info.text.create-new': "新建",
|
|
541
509
|
'pisell2.booking.info.text.form-agreement-yes': "是",
|
|
542
|
-
'pisell2.booking.info.text.form-agreement-no': "否"
|
|
543
|
-
'pisell2.text.open.items': '公共购物车',
|
|
544
|
-
'pisell2.text.cart.of': function pisell2TextCartOf(val) {
|
|
545
|
-
return "".concat(val, "\u7684\u8D2D\u7269\u8F66");
|
|
546
|
-
},
|
|
547
|
-
'pisell2.text.no.selected': '未选择任何项目',
|
|
548
|
-
'pisell2.text.select.items': '选择项目',
|
|
549
|
-
'pisell2.text.edit-select-service': '编辑项目',
|
|
550
|
-
'pisell2.text.missing.reservation.title': '缺少预约类型',
|
|
551
|
-
'pisell2.text.missing.reservation.content': '您尚未选择预约类型,请在继续操作前选择。',
|
|
552
|
-
'pisell2.text.confirm': '确定',
|
|
553
|
-
'pisell2.text.cancel': '取消',
|
|
554
|
-
'pisell2.text.change.pet.title': '您已变更持有人信息,是否保留该持有人名下的商品?',
|
|
555
|
-
'pisell2.text.change.pet.content': '选择“保留”将商品添加到未分配商品(公共购物车)中;选择“不保留”将清空该持有人名下的所有商品。',
|
|
556
|
-
'pisell2.text.change.pet.content1': '预约类商品无法添加到公共购物车,将会被删除。',
|
|
557
|
-
'pisell2.text.change.pet.confirm': '保留(添加到未分配中)',
|
|
558
|
-
'pisell2.text.change.pet.cancel': '不保留(清空商品)'
|
|
510
|
+
'pisell2.booking.info.text.form-agreement-no': "否"
|
|
559
511
|
},
|
|
560
512
|
'zh-HK': {
|
|
561
513
|
'pisell2.text.refunded-amount': '已退金額',
|
|
@@ -594,11 +546,6 @@ export default {
|
|
|
594
546
|
'pisell2.text.discount': '折扣',
|
|
595
547
|
'pisell2.text.discount-reason': '折扣原因',
|
|
596
548
|
'pisell2.text.start_time': '開始時間',
|
|
597
|
-
'pisell2.text.end_time': '結束時間',
|
|
598
|
-
'pisell2.text.start_date': '開始日期',
|
|
599
|
-
'pisell2.text.end_date': '結束日期',
|
|
600
|
-
'pisell2.text.quantity': '數量',
|
|
601
|
-
'pisell2.text.holder': '預約主體',
|
|
602
549
|
'pisell2.text.duration': '時長',
|
|
603
550
|
'pisell2.text.resource': '資源',
|
|
604
551
|
'pisell2.text.warnings': '個警告',
|
|
@@ -617,9 +564,6 @@ export default {
|
|
|
617
564
|
'pisell2.text.appointment-updated': '預約已更新',
|
|
618
565
|
'pisell2.text.updated': '已更新',
|
|
619
566
|
'pisell2.text.please-create-an-appointment-first': '請先創建預約',
|
|
620
|
-
'pisell2.text.day': function pisell2TextDay(val) {
|
|
621
|
-
return '天';
|
|
622
|
-
},
|
|
623
567
|
'pisell2.text.min': '分鍾',
|
|
624
568
|
'pisell2.text.h': '小時',
|
|
625
569
|
'pisell2.text.other': '未分類',
|
|
@@ -820,22 +764,6 @@ export default {
|
|
|
820
764
|
'pisell2.booking.info.text.clear-all': "清空",
|
|
821
765
|
'pisell2.booking.info.text.create-new': "新建",
|
|
822
766
|
'pisell2.booking.info.text.form-agreement-yes': "是",
|
|
823
|
-
'pisell2.booking.info.text.form-agreement-no': "否"
|
|
824
|
-
'pisell2.text.open.items': '公共購物車',
|
|
825
|
-
'pisell2.text.cart.of': function pisell2TextCartOf(val) {
|
|
826
|
-
return "".concat(val, "\u7684\u8CFC\u7269\u8ECA");
|
|
827
|
-
},
|
|
828
|
-
'pisell2.text.no.selected': '未選擇任何項目',
|
|
829
|
-
'pisell2.text.select.items': '選擇項目',
|
|
830
|
-
'pisell2.text.edit-select-service': '編輯項目',
|
|
831
|
-
'pisell2.text.missing.reservation.title': '缺少預約類型',
|
|
832
|
-
'pisell2.text.missing.reservation.content': '您尚未選擇預約類型,請在繼續操作前選擇。',
|
|
833
|
-
'pisell2.text.confirm': '確定',
|
|
834
|
-
'pisell2.text.cancel': '取消',
|
|
835
|
-
'pisell2.text.change.pet.title': '您已變更持有人信息,是否保留該持有人名下的商品?',
|
|
836
|
-
'pisell2.text.change.pet.content': '選擇“保留”將商品添加到未分配商品(公共購物車)中;選擇“不保留”將清空該持有人名下的所有商品。',
|
|
837
|
-
'pisell2.text.change.pet.content1': '預約類商品無法添加到公共購物車,將會被刪除。',
|
|
838
|
-
'pisell2.text.change.pet.confirm': '保留(添加到未分配中)',
|
|
839
|
-
'pisell2.text.change.pet.cancel': '不保留(清空商品)'
|
|
767
|
+
'pisell2.booking.info.text.form-agreement-no': "否"
|
|
840
768
|
}
|
|
841
769
|
};
|
|
@@ -29,7 +29,6 @@ export interface FormState {
|
|
|
29
29
|
};
|
|
30
30
|
date: {
|
|
31
31
|
value: any;
|
|
32
|
-
end_date: any;
|
|
33
32
|
edit: boolean;
|
|
34
33
|
};
|
|
35
34
|
service: {
|
|
@@ -76,7 +75,7 @@ export interface FormState {
|
|
|
76
75
|
bookingId: string | number;
|
|
77
76
|
bookingDetail: any;
|
|
78
77
|
channelDisabledEdit: boolean;
|
|
79
|
-
renderType?: 'eventBooking'
|
|
78
|
+
renderType?: 'eventBooking';
|
|
80
79
|
modalOpen?: boolean;
|
|
81
80
|
isTerminal?: boolean;
|
|
82
81
|
isFranchisee?: boolean;
|
|
@@ -97,8 +96,6 @@ export interface FormState {
|
|
|
97
96
|
/** 是否terminal创建booking页面 */
|
|
98
97
|
isBookingCreatePage?: boolean;
|
|
99
98
|
loading: boolean;
|
|
100
|
-
isTerminalDayBookingPage?: boolean;
|
|
101
|
-
activeCartId?: any[];
|
|
102
99
|
}
|
|
103
100
|
export declare const walkInData: {
|
|
104
101
|
id: number;
|
|
@@ -42,8 +42,7 @@ var defaultState = {
|
|
|
42
42
|
value: walkInData
|
|
43
43
|
},
|
|
44
44
|
date: {
|
|
45
|
-
value: dayjs()
|
|
46
|
-
end_date: dayjs().add(1, 'days')
|
|
45
|
+
value: dayjs()
|
|
47
46
|
},
|
|
48
47
|
service: {
|
|
49
48
|
addModal: false,
|
|
@@ -93,8 +92,7 @@ var defaultState = {
|
|
|
93
92
|
action: function action(props) {
|
|
94
93
|
console.log(props);
|
|
95
94
|
},
|
|
96
|
-
bookingId: 0
|
|
97
|
-
activeCartId: [0]
|
|
95
|
+
bookingId: 0
|
|
98
96
|
};
|
|
99
97
|
var _miniRedux = miniRedux({
|
|
100
98
|
namespace: 'state',
|
|
@@ -21,7 +21,7 @@ export declare const request: Request;
|
|
|
21
21
|
* @Author: zhiwei.Wang
|
|
22
22
|
* @Date: 2024-04-26 14:00
|
|
23
23
|
*/
|
|
24
|
-
export declare const getDiscountTime: (service_times: number
|
|
24
|
+
export declare const getDiscountTime: (service_times: number) => string;
|
|
25
25
|
/**
|
|
26
26
|
* @title: 时间切片
|
|
27
27
|
* @description:
|
|
@@ -31,7 +31,7 @@ export declare const getDiscountTime: (service_times: number, isDay?: boolean) =
|
|
|
31
31
|
* @Author: zhiwei.Wang
|
|
32
32
|
* @Date: 2024-04-26 13:59
|
|
33
33
|
*/
|
|
34
|
-
export declare const sliceDayIntoFiveMinutes: (config: any, locale: string
|
|
34
|
+
export declare const sliceDayIntoFiveMinutes: (config: any, locale: string) => {
|
|
35
35
|
timeSlices: {
|
|
36
36
|
label: string;
|
|
37
37
|
value: string;
|
|
@@ -115,7 +115,7 @@ export declare const getServiceTimes: (service: any) => {
|
|
|
115
115
|
startDate: dayjs.Dayjs;
|
|
116
116
|
endDate: dayjs.Dayjs;
|
|
117
117
|
};
|
|
118
|
-
export declare const getErrorList: (resource: any, cacheItem: any
|
|
118
|
+
export declare const getErrorList: (resource: any, cacheItem: any) => {
|
|
119
119
|
label: any;
|
|
120
120
|
type: string;
|
|
121
121
|
}[];
|
|
@@ -131,15 +131,6 @@ export declare const formatResource: (resourceItem: any, cacheItem?: any, format
|
|
|
131
131
|
export declare const getLastServer: (list: any) => any;
|
|
132
132
|
export declare const getCacheParams: () => any;
|
|
133
133
|
export declare const deleteCacheParams: () => void;
|
|
134
|
-
/**
|
|
135
|
-
* @title: 获取跨日预约的时长
|
|
136
|
-
* @description:
|
|
137
|
-
* @param {any} cacheItem
|
|
138
|
-
* @return {*}
|
|
139
|
-
* @Author: WangHan
|
|
140
|
-
* @Date: 2024-12-01 22:43
|
|
141
|
-
*/
|
|
142
|
-
export declare const getDays: (cacheItem: any, type: 'minutes' | 'days') => any;
|
|
143
134
|
/**
|
|
144
135
|
* @title: 创建一个服务商品
|
|
145
136
|
* @description:
|
|
@@ -15,7 +15,6 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
15
15
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
16
|
import dayjs from 'dayjs';
|
|
17
17
|
import { locales } from '@pisell/utils';
|
|
18
|
-
import { isDayBooking, formatDayDate } from "./info/service2/utils";
|
|
19
18
|
import { intersectionBy } from 'lodash';
|
|
20
19
|
var Request = /*#__PURE__*/function () {
|
|
21
20
|
function Request() {
|
|
@@ -45,15 +44,10 @@ export var request = new Request();
|
|
|
45
44
|
* @Author: zhiwei.Wang
|
|
46
45
|
* @Date: 2024-04-26 14:00
|
|
47
46
|
*/
|
|
48
|
-
export var getDiscountTime = function getDiscountTime(service_times
|
|
49
|
-
if (!service_times
|
|
47
|
+
export var getDiscountTime = function getDiscountTime(service_times) {
|
|
48
|
+
if (!service_times) {
|
|
50
49
|
return '';
|
|
51
50
|
}
|
|
52
|
-
|
|
53
|
-
// 跨日预约
|
|
54
|
-
if (isDay) {
|
|
55
|
-
return "".concat(service_times, " ").concat(locales.getText('pisell2.text.day')(service_times));
|
|
56
|
-
}
|
|
57
51
|
if (service_times < 60) {
|
|
58
52
|
return "".concat(service_times, " ").concat(locales.getText('pisell2.text.min'));
|
|
59
53
|
} else {
|
|
@@ -77,7 +71,7 @@ export var getDiscountTime = function getDiscountTime(service_times, isDay) {
|
|
|
77
71
|
* @Author: zhiwei.Wang
|
|
78
72
|
* @Date: 2024-04-26 13:59
|
|
79
73
|
*/
|
|
80
|
-
export var sliceDayIntoFiveMinutes = function sliceDayIntoFiveMinutes(config, locale
|
|
74
|
+
export var sliceDayIntoFiveMinutes = function sliceDayIntoFiveMinutes(config, locale) {
|
|
81
75
|
var _locale = locale;
|
|
82
76
|
var dayjsLocale = _locale === 'en-US' || _locale === 'en' ? 'en' : 'zh-cn';
|
|
83
77
|
dayjs.locale(dayjsLocale);
|
|
@@ -88,34 +82,12 @@ export var sliceDayIntoFiveMinutes = function sliceDayIntoFiveMinutes(config, lo
|
|
|
88
82
|
var timeSlices = [];
|
|
89
83
|
var durationSlicesBasedOnTime = [];
|
|
90
84
|
var currentTime = startTime;
|
|
91
|
-
|
|
92
|
-
// 跨日预约
|
|
93
|
-
if (isDay) {
|
|
94
|
-
var currentDay = 1;
|
|
95
|
-
while (currentDay <= 30) {
|
|
96
|
-
var timeLabel = currentTime.format('hh:mm A');
|
|
97
|
-
var timeValue = currentTime.format('HH:mm');
|
|
98
|
-
timeSlices.push({
|
|
99
|
-
label: timeLabel,
|
|
100
|
-
value: timeValue
|
|
101
|
-
});
|
|
102
|
-
durationSlicesBasedOnTime.push({
|
|
103
|
-
label: "".concat(currentDay, " ").concat(locales.getText('pisell2.text.day')(currentDay)),
|
|
104
|
-
value: currentDay
|
|
105
|
-
});
|
|
106
|
-
currentDay++;
|
|
107
|
-
}
|
|
108
|
-
return {
|
|
109
|
-
timeSlices: timeSlices,
|
|
110
|
-
durationSlicesBasedOnTime: durationSlicesBasedOnTime
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
85
|
while (currentTime.isBefore(endTime)) {
|
|
114
|
-
var
|
|
115
|
-
var
|
|
86
|
+
var timeLabel = currentTime.format('hh:mm A');
|
|
87
|
+
var timeValue = currentTime.format('HH:mm');
|
|
116
88
|
timeSlices.push({
|
|
117
|
-
label:
|
|
118
|
-
value:
|
|
89
|
+
label: timeLabel,
|
|
90
|
+
value: timeValue
|
|
119
91
|
});
|
|
120
92
|
var nextTime = currentTime.add(timeSlice, 'minute');
|
|
121
93
|
var durationValue = nextTime.diff(startTime, 'minute');
|
|
@@ -304,29 +276,6 @@ export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cach
|
|
|
304
276
|
* @Date: 2024-01-09 13:57
|
|
305
277
|
*/
|
|
306
278
|
export var formatTimes = function formatTimes(resourceItem, cacheItem) {
|
|
307
|
-
var _cacheItem$_extend;
|
|
308
|
-
if ((cacheItem === null || cacheItem === void 0 ? void 0 : (_cacheItem$_extend = cacheItem._extend) === null || _cacheItem$_extend === void 0 ? void 0 : _cacheItem$_extend.sub_type) === 'days') {
|
|
309
|
-
var isResourceItem = (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.form_record_id) > 0;
|
|
310
|
-
|
|
311
|
-
// 是否在最大预约数量的区间内
|
|
312
|
-
var isMaxLimitRange = (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.sold_out) === 1;
|
|
313
|
-
|
|
314
|
-
// 是否在日期范围内
|
|
315
|
-
var isDateRange = (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.available_status) === 1;
|
|
316
|
-
|
|
317
|
-
// 是否可用
|
|
318
|
-
var isUsable = isDateRange && !isMaxLimitRange;
|
|
319
|
-
var usableTime = {
|
|
320
|
-
isMaxLimitRange: isMaxLimitRange,
|
|
321
|
-
isDateRange: isDateRange,
|
|
322
|
-
isUsable: isResourceItem ? isUsable : true
|
|
323
|
-
};
|
|
324
|
-
resourceItem._extend = _objectSpread(_objectSpread({}, resourceItem._extend), {}, {
|
|
325
|
-
usableTime: usableTime
|
|
326
|
-
});
|
|
327
|
-
return resourceItem;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
279
|
// 可用的time列表
|
|
331
280
|
var usableTimes = [];
|
|
332
281
|
var _resourceItem = _objectSpread({}, resourceItem);
|
|
@@ -486,7 +435,7 @@ export var getServiceTimes = function getServiceTimes(service) {
|
|
|
486
435
|
endDate: endDate
|
|
487
436
|
};
|
|
488
437
|
};
|
|
489
|
-
export var getErrorList = function getErrorList(resource, cacheItem
|
|
438
|
+
export var getErrorList = function getErrorList(resource, cacheItem) {
|
|
490
439
|
if (!(cacheItem !== null && cacheItem !== void 0 && cacheItem.id)) {
|
|
491
440
|
return [{
|
|
492
441
|
label: locales.getText('pisell2.text.no-product-added'),
|
|
@@ -499,7 +448,7 @@ export var getErrorList = function getErrorList(resource, cacheItem, isDay) {
|
|
|
499
448
|
var list = [];
|
|
500
449
|
// 当前资源不可用
|
|
501
450
|
if (!resource.usable) {
|
|
502
|
-
var _resource$_extend, _resource$_extend2
|
|
451
|
+
var _resource$_extend, _resource$_extend2;
|
|
503
452
|
// 挂接的商品不可用
|
|
504
453
|
if (!(resource !== null && resource !== void 0 && (_resource$_extend = resource._extend) !== null && _resource$_extend !== void 0 && _resource$_extend.usableProduct)) {
|
|
505
454
|
list.push({
|
|
@@ -507,35 +456,23 @@ export var getErrorList = function getErrorList(resource, cacheItem, isDay) {
|
|
|
507
456
|
type: 'product'
|
|
508
457
|
});
|
|
509
458
|
}
|
|
510
|
-
var
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
//
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
startText = start_date === null || start_date === void 0 ? void 0 : start_date.format('YYYY-MM-DD');
|
|
519
|
-
endText = end_date ? end_date === null || end_date === void 0 ? void 0 : end_date.format('YYYY-MM-DD') : '';
|
|
520
|
-
} else {
|
|
521
|
-
var _getServiceTimes = getServiceTimes(cacheItem),
|
|
522
|
-
startDate = _getServiceTimes.startDate,
|
|
523
|
-
endDate = _getServiceTimes.endDate;
|
|
524
|
-
// 如果跨天 结束时间前面加一个明天
|
|
525
|
-
startText = startDate.format('hh:mm A');
|
|
526
|
-
endText = endDate.format('hh:mm A');
|
|
527
|
-
if (dayjs(endDate).isAfter(startDate, 'day')) {
|
|
528
|
-
endText = locales.getText('pisell1.text.tomorrow') + endText;
|
|
529
|
-
}
|
|
459
|
+
var _getServiceTimes = getServiceTimes(cacheItem),
|
|
460
|
+
startDate = _getServiceTimes.startDate,
|
|
461
|
+
endDate = _getServiceTimes.endDate;
|
|
462
|
+
// 如果跨天 结束时间前面加一个明天
|
|
463
|
+
var startText = startDate.format('hh:mm A');
|
|
464
|
+
var endText = endDate.format('hh:mm A');
|
|
465
|
+
if (dayjs(endDate).isAfter(startDate, 'day')) {
|
|
466
|
+
endText = locales.getText('pisell1.text.tomorrow') + endText;
|
|
530
467
|
}
|
|
531
|
-
if (
|
|
468
|
+
if (!((_resource$_extend2 = resource._extend) !== null && _resource$_extend2 !== void 0 && _resource$_extend2.usableTime)) {
|
|
532
469
|
list.push({
|
|
533
470
|
label: locales.getText('pisell1.text.resource-error-message-2')(resource.labelText, startText, endText),
|
|
534
471
|
type: 'time'
|
|
535
472
|
});
|
|
536
473
|
} else {
|
|
537
|
-
var _resource$
|
|
538
|
-
if (
|
|
474
|
+
var _resource$_extend3;
|
|
475
|
+
if (!((_resource$_extend3 = resource._extend) !== null && _resource$_extend3 !== void 0 && _resource$_extend3.usableTime._extend.isMaxLimitRange)) {
|
|
539
476
|
list.push({
|
|
540
477
|
label: locales.getText('pisell1.text.resource-error-message-3')(resource.labelText, startText, endText),
|
|
541
478
|
type: 'limit'
|
|
@@ -555,7 +492,6 @@ export var getErrorList = function getErrorList(resource, cacheItem, isDay) {
|
|
|
555
492
|
* @Date: 2024-01-09 13:40
|
|
556
493
|
*/
|
|
557
494
|
export var formatResource = function formatResource(resourceItem, cacheItem, formatLabel) {
|
|
558
|
-
var _cacheItem$_extend3;
|
|
559
495
|
// 当前资源
|
|
560
496
|
var _resourceItem = _objectSpread({}, resourceItem);
|
|
561
497
|
|
|
@@ -568,12 +504,6 @@ export var formatResource = function formatResource(resourceItem, cacheItem, for
|
|
|
568
504
|
// 格式化label
|
|
569
505
|
_resourceItem.labelText = _resourceItem.room_name || _resourceItem.name;
|
|
570
506
|
var usable = _resourceItem._extend.usableTime && _resourceItem._extend.usableProduct;
|
|
571
|
-
|
|
572
|
-
// 跨日预约
|
|
573
|
-
if ((cacheItem === null || cacheItem === void 0 ? void 0 : (_cacheItem$_extend3 = cacheItem._extend) === null || _cacheItem$_extend3 === void 0 ? void 0 : _cacheItem$_extend3.sub_type) === 'days') {
|
|
574
|
-
var _resourceItem$_extend, _resourceItem$_extend2, _resourceItem$_extend3;
|
|
575
|
-
usable = ((_resourceItem$_extend = _resourceItem._extend) === null || _resourceItem$_extend === void 0 ? void 0 : (_resourceItem$_extend2 = _resourceItem$_extend.usableTime) === null || _resourceItem$_extend2 === void 0 ? void 0 : _resourceItem$_extend2.isUsable) && ((_resourceItem$_extend3 = _resourceItem._extend) === null || _resourceItem$_extend3 === void 0 ? void 0 : _resourceItem$_extend3.usableProduct);
|
|
576
|
-
}
|
|
577
507
|
_resourceItem.usable = usable;
|
|
578
508
|
if (formatLabel) {
|
|
579
509
|
_resourceItem.label = formatLabel(_resourceItem);
|
|
@@ -595,28 +525,6 @@ export var deleteCacheParams = function deleteCacheParams() {
|
|
|
595
525
|
sessionStorage.removeItem('pisell2.booking.serviceParams');
|
|
596
526
|
};
|
|
597
527
|
|
|
598
|
-
/**
|
|
599
|
-
* @title: 获取跨日预约的时长
|
|
600
|
-
* @description:
|
|
601
|
-
* @param {any} cacheItem
|
|
602
|
-
* @return {*}
|
|
603
|
-
* @Author: WangHan
|
|
604
|
-
* @Date: 2024-12-01 22:43
|
|
605
|
-
*/
|
|
606
|
-
export var getDays = function getDays(cacheItem, type) {
|
|
607
|
-
var _cacheItem$_extend4, _cacheItem$_extend5;
|
|
608
|
-
// 计算天数
|
|
609
|
-
if (type === 'days') {
|
|
610
|
-
var _formatDayDate = formatDayDate(cacheItem._extend),
|
|
611
|
-
start_date = _formatDayDate.start_date,
|
|
612
|
-
end_date = _formatDayDate.end_date;
|
|
613
|
-
return end_date.diff(start_date, 'day');
|
|
614
|
-
}
|
|
615
|
-
var startDate = dayjs((_cacheItem$_extend4 = cacheItem._extend) === null || _cacheItem$_extend4 === void 0 ? void 0 : _cacheItem$_extend4.start_date);
|
|
616
|
-
var endDate = dayjs((_cacheItem$_extend5 = cacheItem._extend) === null || _cacheItem$_extend5 === void 0 ? void 0 : _cacheItem$_extend5.end_date);
|
|
617
|
-
return endDate.diff(startDate, type);
|
|
618
|
-
};
|
|
619
|
-
|
|
620
528
|
/**
|
|
621
529
|
* @title: 创建一个服务商品
|
|
622
530
|
* @description:
|
|
@@ -632,14 +540,13 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
|
632
540
|
if (!cacheItem.new && cacheItem._extend.endDate) {
|
|
633
541
|
return cacheItem._extend;
|
|
634
542
|
}
|
|
635
|
-
var isDay = isDayBooking(state);
|
|
636
543
|
|
|
637
544
|
// 获取上一个服务商品
|
|
638
|
-
var lastServer =
|
|
545
|
+
var lastServer = getLastServer(state.service.value);
|
|
639
546
|
|
|
640
547
|
// 下一个商品的扩展参数
|
|
641
548
|
var _extend = {
|
|
642
|
-
duration:
|
|
549
|
+
duration: findNextDuration(cacheItem.duration, timeObj.durationSlicesBasedOnTime, cacheItem === null || cacheItem === void 0 ? void 0 : (_cacheItem$duration = cacheItem.duration) === null || _cacheItem$duration === void 0 ? void 0 : _cacheItem$duration.value)
|
|
643
550
|
};
|
|
644
551
|
|
|
645
552
|
// 如果有上一个商品, 将上一个商品的某些参数 设置到新商品上
|
|
@@ -692,17 +599,6 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
|
692
599
|
}
|
|
693
600
|
}
|
|
694
601
|
_extend = _objectSpread(_objectSpread({}, _extend), cacheItem._extend);
|
|
695
|
-
|
|
696
|
-
// 跨日预约
|
|
697
|
-
if (isDay) {
|
|
698
|
-
var _formatDayDate2 = formatDayDate(_extend),
|
|
699
|
-
start_date = _formatDayDate2.start_date,
|
|
700
|
-
end_date = _formatDayDate2.end_date;
|
|
701
|
-
_extend = _objectSpread(_objectSpread({}, _extend), {}, {
|
|
702
|
-
start_date: start_date,
|
|
703
|
-
end_date: end_date
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
602
|
return _extend;
|
|
707
603
|
};
|
|
708
604
|
|
|
@@ -9,6 +9,7 @@ import React from 'react';
|
|
|
9
9
|
import { Input, InputNumber, Checkbox, Radio, Cascader, DatePicker, Select, Slider, Switch, TimePicker, Transfer, TreeSelect, Upload, Form } from 'antd';
|
|
10
10
|
import { CheckboxGroup, RadioGroup } from "../group";
|
|
11
11
|
import Surcharge, { getCommName, getCommDefaultVal } from "../surcharge";
|
|
12
|
+
import Receipt, { getCommName as getCommNameReceipt, getCommDefaultVal as getCommDefaultValReceipt } from "../receipt";
|
|
12
13
|
import DeviceList from "../deviceList";
|
|
13
14
|
|
|
14
15
|
// 通用表单配置
|
|
@@ -32,7 +33,8 @@ var Mapping = {
|
|
|
32
33
|
};
|
|
33
34
|
var CustomMapping = {
|
|
34
35
|
Surcharge: Surcharge,
|
|
35
|
-
DeviceList: DeviceList
|
|
36
|
+
DeviceList: DeviceList,
|
|
37
|
+
Receipt: Receipt
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
/**
|
|
@@ -53,13 +55,13 @@ var CustomFormItem = function CustomFormItem(_ref) {
|
|
|
53
55
|
return /*#__PURE__*/React.createElement(CustomFormItem, {
|
|
54
56
|
formItemList: item.children,
|
|
55
57
|
onChange: onChange,
|
|
56
|
-
key: item.name ? item.name
|
|
58
|
+
key: item.name ? "".concat(item.name).concat(level) : "".concat(Component).concat(index).concat(level),
|
|
57
59
|
level: level + 1
|
|
58
60
|
});
|
|
59
61
|
}
|
|
60
62
|
if (_typeof(Component) === 'object') {
|
|
61
63
|
return /*#__PURE__*/React.createElement(Component, _extends({}, item, {
|
|
62
|
-
key: item.name
|
|
64
|
+
key: "".concat(item.name).concat(level)
|
|
63
65
|
}));
|
|
64
66
|
}
|
|
65
67
|
if (Mapping[Component]) {
|
|
@@ -67,7 +69,7 @@ var CustomFormItem = function CustomFormItem(_ref) {
|
|
|
67
69
|
var input = item.input,
|
|
68
70
|
formItemProps = _objectWithoutProperties(item, _excluded2);
|
|
69
71
|
return /*#__PURE__*/React.createElement(Form.Item, _extends({}, formItemProps, {
|
|
70
|
-
key: item.name
|
|
72
|
+
key: "".concat(item.name).concat(level)
|
|
71
73
|
}), /*#__PURE__*/React.createElement(Comm, input));
|
|
72
74
|
}
|
|
73
75
|
if (Mapping[Component]) {
|
|
@@ -75,13 +77,13 @@ var CustomFormItem = function CustomFormItem(_ref) {
|
|
|
75
77
|
var _input = item.input,
|
|
76
78
|
_formItemProps = _objectWithoutProperties(item, _excluded3);
|
|
77
79
|
return /*#__PURE__*/React.createElement(Form.Item, _extends({}, _formItemProps, {
|
|
78
|
-
key: item.name
|
|
80
|
+
key: "".concat(item.name).concat(level)
|
|
79
81
|
}), /*#__PURE__*/React.createElement(_Comm, _input));
|
|
80
82
|
}
|
|
81
83
|
if (CustomMapping[Component]) {
|
|
82
84
|
var _Comm2 = CustomMapping[Component];
|
|
83
85
|
return /*#__PURE__*/React.createElement(_Comm2, _extends({}, item, {
|
|
84
|
-
key: item.name
|
|
86
|
+
key: "".concat(item.name).concat(level)
|
|
85
87
|
}));
|
|
86
88
|
}
|
|
87
89
|
throw TypeError("pos\u7269\u6599\u5E93 \u8F93\u5165\u7EC4\u4EF6\u7C7B\u578B ".concat(Component, " \u65E0\u6CD5\u6620\u5C04,\u8BF7\u6B63\u786E\u4F20\u5165\u7EC4\u4EF6\u7C7B\u578B"));
|
|
@@ -92,5 +94,9 @@ export var helpMapping = {
|
|
|
92
94
|
Surcharge: {
|
|
93
95
|
getCommName: getCommName,
|
|
94
96
|
getCommDefaultVal: getCommDefaultVal
|
|
97
|
+
},
|
|
98
|
+
Receipt: {
|
|
99
|
+
getCommName: getCommNameReceipt,
|
|
100
|
+
getCommDefaultVal: getCommDefaultValReceipt
|
|
95
101
|
}
|
|
96
102
|
};
|