@pisell/private-materials 6.3.177 → 6.3.178
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +91 -24
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -20
- package/es/components/appointmentBooking/components/Header/index.js +4 -24
- package/es/components/appointmentBooking/components/Voucher/index.js +10 -0
- package/es/components/appointmentBooking/hooks.d.ts +1 -17
- package/es/components/appointmentBooking/hooks.js +54 -128
- package/es/components/appointmentBooking/utils.d.ts +1 -0
- package/es/components/appointmentBooking/utils.js +54 -33
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- 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/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/device.js +4 -11
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/linkly/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/progressBar/index.d.ts +1 -8
- package/es/components/eventBooking/components/progressBar/index.js +10 -30
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pisellCashCounting/hooks.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/scanOrder/components/Check/index.js +46 -187
- package/es/components/scanOrder/components/Check/index.less +0 -39
- package/es/components/scanOrder/components/Content/index.js +72 -189
- package/es/components/scanOrder/components/Menu/index.js +5 -11
- package/es/components/scanOrder/hooks.js +0 -7
- package/es/components/scanOrder/locales.d.ts +0 -75
- package/es/components/scanOrder/locales.js +0 -75
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/venueBooking/components/Cart/index.js +159 -46
- package/es/components/venueBooking/components/Voucher/index.js +1 -6
- package/es/components/venueBooking/context.js +15 -2
- package/es/components/venueBooking/locales.d.ts +5 -0
- package/es/components/venueBooking/locales.js +10 -5
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/pro/Login2.0/locales.js +1 -1
- package/es/utils/buildCartHolderParams.d.ts +92 -0
- package/es/utils/buildCartHolderParams.js +191 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +71 -9
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +6 -2
- package/lib/components/appointmentBooking/components/Header/index.js +1 -13
- package/lib/components/appointmentBooking/components/Voucher/index.js +10 -0
- package/lib/components/appointmentBooking/hooks.d.ts +1 -17
- package/lib/components/appointmentBooking/hooks.js +16 -91
- package/lib/components/appointmentBooking/utils.d.ts +1 -0
- package/lib/components/appointmentBooking/utils.js +24 -13
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- 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/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/device.js +4 -6
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/linkly/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/progressBar/index.d.ts +1 -8
- package/lib/components/eventBooking/components/progressBar/index.js +9 -29
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pisellCashCounting/hooks.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/scanOrder/components/Check/index.js +3 -116
- package/lib/components/scanOrder/components/Check/index.less +0 -39
- package/lib/components/scanOrder/components/Content/index.js +25 -106
- package/lib/components/scanOrder/components/Menu/index.js +0 -2
- package/lib/components/scanOrder/hooks.js +0 -7
- package/lib/components/scanOrder/locales.d.ts +0 -75
- package/lib/components/scanOrder/locales.js +0 -75
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/venueBooking/components/Cart/index.js +92 -14
- package/lib/components/venueBooking/components/Voucher/index.js +1 -5
- package/lib/components/venueBooking/context.js +12 -2
- package/lib/components/venueBooking/locales.d.ts +5 -0
- package/lib/components/venueBooking/locales.js +10 -5
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/pro/Login2.0/locales.js +1 -1
- package/lib/utils/buildCartHolderParams.d.ts +92 -0
- package/lib/utils/buildCartHolderParams.js +167 -0
- package/package.json +1 -1
|
@@ -30,21 +30,6 @@ export default {
|
|
|
30
30
|
'pisell2.scan.order.products.empty.tip': 'Please select products',
|
|
31
31
|
'pisell2.scan.order.check.cart.empty.tip': 'Please go back to add products',
|
|
32
32
|
'pisell2.scan.order.submit.disabled.default': 'Order submission is currently disabled.',
|
|
33
|
-
'pisell2.scan.order.multiple.orders.tip': 'There are multiple active orders for this table. Please contact staff for add-on orders.',
|
|
34
|
-
'pisell2.scan.order.multiple.orders.confirm': 'I Got It',
|
|
35
|
-
'pisell2.scan.order.settled.cannot.add.tip': 'This order has already been settled and you cannot add more items. Please scan again to create a new order or contact staff.',
|
|
36
|
-
'pisell2.scan.order.inventory.insufficient.title': 'Insufficient inventory',
|
|
37
|
-
'pisell2.scan.order.inventory.insufficient.description': 'The following items are out of stock or do not have enough inventory. Please adjust your cart and try again.',
|
|
38
|
-
'pisell2.scan.order.inventory.insufficient.products.label': 'Unavailable products:',
|
|
39
|
-
'pisell2.scan.order.add.on.confirm.title': 'This table has already started ordering',
|
|
40
|
-
'pisell2.scan.order.add.on.confirm.description': 'Someone at your table has placed the order. This will be submitted as an add-on order.',
|
|
41
|
-
'pisell2.scan.order.add.on.confirm.button': 'Confirm Add-on Order',
|
|
42
|
-
'pisell2.scan.order.add.on.return.button': 'Return to Cart',
|
|
43
|
-
'pisell2.scan.order.add.on.unavailable.title': 'Add-on ordering is not available',
|
|
44
|
-
'pisell2.scan.order.add.on.unavailable.description': 'You can’t add items to this order from your phone right now.\nPlease ask a staff member for help.',
|
|
45
|
-
'pisell2.scan.order.add.on.unavailable.confirm': 'Got it',
|
|
46
|
-
'pisell2.scan.order.add.on.login.required.title': 'Notice',
|
|
47
|
-
'pisell2.scan.order.add.on.login.required': 'Please login before placing an add-on order.',
|
|
48
33
|
'pisell2.text.goodpass': 'Promotion',
|
|
49
34
|
'pisell2.text.goodpass.product-vouchers': 'Product Vouchers',
|
|
50
35
|
'pisell2.text.goodpass.view-more': 'View More',
|
|
@@ -94,21 +79,6 @@ export default {
|
|
|
94
79
|
'pisell2.scan.order.products.empty.tip': '请选择商品',
|
|
95
80
|
'pisell2.scan.order.check.cart.empty.tip': '请返回添加商品',
|
|
96
81
|
'pisell2.scan.order.submit.disabled.default': '当前暂不可下单',
|
|
97
|
-
'pisell2.scan.order.multiple.orders.tip': '当前桌台存在多个进行中的订单,请联系店员处理加餐。',
|
|
98
|
-
'pisell2.scan.order.multiple.orders.confirm': '我知道了',
|
|
99
|
-
'pisell2.scan.order.settled.cannot.add.tip': '当前订单已结账,无法继续加餐。请重新扫码创建新订单或联系店员。',
|
|
100
|
-
'pisell2.scan.order.inventory.insufficient.title': '库存不足',
|
|
101
|
-
'pisell2.scan.order.inventory.insufficient.description': '以下商品库存不足或已售罄,请调整购物车后重新提交。',
|
|
102
|
-
'pisell2.scan.order.inventory.insufficient.products.label': '异常商品:',
|
|
103
|
-
'pisell2.scan.order.add.on.confirm.title': '本桌已开始点餐',
|
|
104
|
-
'pisell2.scan.order.add.on.confirm.description': '同行顾客已提交订单。本次将作为加餐提交,请确认后继续。',
|
|
105
|
-
'pisell2.scan.order.add.on.confirm.button': '确认加餐',
|
|
106
|
-
'pisell2.scan.order.add.on.return.button': '返回购物车',
|
|
107
|
-
'pisell2.scan.order.add.on.unavailable.title': '暂不支持加餐',
|
|
108
|
-
'pisell2.scan.order.add.on.unavailable.description': '当前无法通过手机为此订单加餐。\n如需加餐,请联系工作人员。',
|
|
109
|
-
'pisell2.scan.order.add.on.unavailable.confirm': '我知道了',
|
|
110
|
-
'pisell2.scan.order.add.on.login.required.title': '提示',
|
|
111
|
-
'pisell2.scan.order.add.on.login.required': '需要登录后才能加餐',
|
|
112
82
|
'pisell2.text.goodpass': '促销',
|
|
113
83
|
'pisell2.text.goodpass.product-vouchers': '商品兑换券',
|
|
114
84
|
'pisell2.text.goodpass.view-more': '查看更多',
|
|
@@ -158,21 +128,6 @@ export default {
|
|
|
158
128
|
'pisell2.scan.order.products.empty.tip': '請選擇商品',
|
|
159
129
|
'pisell2.scan.order.check.cart.empty.tip': '請返回添加商品',
|
|
160
130
|
'pisell2.scan.order.submit.disabled.default': '當前暫不可下單',
|
|
161
|
-
'pisell2.scan.order.multiple.orders.tip': '當前桌台存在多個進行中的訂單,請聯繫店員處理加餐。',
|
|
162
|
-
'pisell2.scan.order.multiple.orders.confirm': '我知道了',
|
|
163
|
-
'pisell2.scan.order.settled.cannot.add.tip': '當前訂單已結賬,無法繼續加餐。請重新掃碼創建新訂單或聯繫店員。',
|
|
164
|
-
'pisell2.scan.order.inventory.insufficient.title': '庫存不足',
|
|
165
|
-
'pisell2.scan.order.inventory.insufficient.description': '以下商品庫存不足或已售罄,請調整購物車後重新提交。',
|
|
166
|
-
'pisell2.scan.order.inventory.insufficient.products.label': '異常商品:',
|
|
167
|
-
'pisell2.scan.order.add.on.confirm.title': '本桌已開始點餐',
|
|
168
|
-
'pisell2.scan.order.add.on.confirm.description': '同行顧客已提交訂單。本次將作為加餐提交,請確認後繼續。',
|
|
169
|
-
'pisell2.scan.order.add.on.confirm.button': '確認加餐',
|
|
170
|
-
'pisell2.scan.order.add.on.return.button': '返回購物車',
|
|
171
|
-
'pisell2.scan.order.add.on.unavailable.title': '暫不支援加餐',
|
|
172
|
-
'pisell2.scan.order.add.on.unavailable.description': '目前無法透過手機為此訂單加餐。\n如需加餐,請聯絡工作人員。',
|
|
173
|
-
'pisell2.scan.order.add.on.unavailable.confirm': '我知道了',
|
|
174
|
-
'pisell2.scan.order.add.on.login.required.title': '提示',
|
|
175
|
-
'pisell2.scan.order.add.on.login.required': '需要登錄後才能加餐',
|
|
176
131
|
'pisell2.text.goodpass': '促銷',
|
|
177
132
|
'pisell2.text.goodpass.product-vouchers': '商品兌換券',
|
|
178
133
|
'pisell2.text.goodpass.view-more': '查看更多',
|
|
@@ -222,21 +177,6 @@ export default {
|
|
|
222
177
|
'pisell2.scan.order.products.empty.tip': '商品を選択してください',
|
|
223
178
|
'pisell2.scan.order.check.cart.empty.tip': '商品を追加するには、前の画面に戻ってください',
|
|
224
179
|
'pisell2.scan.order.submit.disabled.default': '現在、注文を送信できません。',
|
|
225
|
-
'pisell2.scan.order.multiple.orders.tip': '現在のテーブルには進行中の注文が複数あります。追加注文についてはスタッフにお問い合わせください。',
|
|
226
|
-
'pisell2.scan.order.multiple.orders.confirm': '了解しました',
|
|
227
|
-
'pisell2.scan.order.settled.cannot.add.tip': '現在の注文はすでに会計済みのため、追加注文できません。再度QRコードをスキャンして新しい注文を作成するか、スタッフにお問い合わせください。',
|
|
228
|
-
'pisell2.scan.order.inventory.insufficient.title': '在庫が不足しています',
|
|
229
|
-
'pisell2.scan.order.inventory.insufficient.description': '以下の商品は在庫切れ、または在庫が不足しています。カートを調整してからもう一度送信してください。',
|
|
230
|
-
'pisell2.scan.order.inventory.insufficient.products.label': '対象商品:',
|
|
231
|
-
'pisell2.scan.order.add.on.confirm.title': 'このテーブルではすでに注文が開始されています',
|
|
232
|
-
'pisell2.scan.order.add.on.confirm.description': '同席のお客様がすでに注文を送信しました。今回は追加注文として送信されます。確認して続行してください。',
|
|
233
|
-
'pisell2.scan.order.add.on.confirm.button': '追加注文を確認',
|
|
234
|
-
'pisell2.scan.order.add.on.return.button': 'カートに戻る',
|
|
235
|
-
'pisell2.scan.order.add.on.unavailable.title': '追加注文は現在ご利用いただけません',
|
|
236
|
-
'pisell2.scan.order.add.on.unavailable.description': '現在、スマートフォンからこの注文に商品を追加することはできません。\n追加注文をご希望の場合は、スタッフにお声がけください。',
|
|
237
|
-
'pisell2.scan.order.add.on.unavailable.confirm': '了解しました',
|
|
238
|
-
'pisell2.scan.order.add.on.login.required.title': 'お知らせ',
|
|
239
|
-
'pisell2.scan.order.add.on.login.required': '追加注文を行うにはログインが必要です。',
|
|
240
180
|
'pisell2.text.goodpass': 'プロモーション',
|
|
241
181
|
'pisell2.text.goodpass.product-vouchers': '商品バウチャー',
|
|
242
182
|
'pisell2.text.goodpass.view-more': 'もっと見る',
|
|
@@ -286,21 +226,6 @@ export default {
|
|
|
286
226
|
'pisell2.scan.order.products.empty.tip': 'Selecione produtos',
|
|
287
227
|
'pisell2.scan.order.check.cart.empty.tip': 'Volte para adicionar produtos',
|
|
288
228
|
'pisell2.scan.order.submit.disabled.default': 'No momento, não é possível enviar pedidos.',
|
|
289
|
-
'pisell2.scan.order.multiple.orders.tip': 'Há vários pedidos ativos nesta mesa. Entre em contato com a equipe para adicionar itens.',
|
|
290
|
-
'pisell2.scan.order.multiple.orders.confirm': 'Entendi',
|
|
291
|
-
'pisell2.scan.order.settled.cannot.add.tip': 'Este pedido já foi finalizado e não é possível adicionar mais itens. Escaneie novamente para criar um novo pedido ou entre em contato com a equipe.',
|
|
292
|
-
'pisell2.scan.order.inventory.insufficient.title': 'Estoque insuficiente',
|
|
293
|
-
'pisell2.scan.order.inventory.insufficient.description': 'Os seguintes itens estão sem estoque ou não têm estoque suficiente. Ajuste o carrinho e tente novamente.',
|
|
294
|
-
'pisell2.scan.order.inventory.insufficient.products.label': 'Produtos indisponíveis:',
|
|
295
|
-
'pisell2.scan.order.add.on.confirm.title': 'Esta mesa já começou a fazer o pedido',
|
|
296
|
-
'pisell2.scan.order.add.on.confirm.description': 'Alguém na sua mesa já enviou o pedido. Este será enviado como um pedido adicional.',
|
|
297
|
-
'pisell2.scan.order.add.on.confirm.button': 'Confirmar pedido adicional',
|
|
298
|
-
'pisell2.scan.order.add.on.return.button': 'Voltar ao carrinho',
|
|
299
|
-
'pisell2.scan.order.add.on.unavailable.title': 'Pedidos adicionais não estão disponíveis',
|
|
300
|
-
'pisell2.scan.order.add.on.unavailable.description': 'No momento, você não pode adicionar itens a este pedido pelo celular.\nPeça ajuda a um membro da equipe.',
|
|
301
|
-
'pisell2.scan.order.add.on.unavailable.confirm': 'Entendi',
|
|
302
|
-
'pisell2.scan.order.add.on.login.required.title': 'Aviso',
|
|
303
|
-
'pisell2.scan.order.add.on.login.required': 'Faça login antes de fazer um pedido adicional.',
|
|
304
229
|
'pisell2.text.goodpass': 'Promoção',
|
|
305
230
|
'pisell2.text.goodpass.product-vouchers': 'Vales de Produto',
|
|
306
231
|
'pisell2.text.goodpass.view-more': 'Ver Mais',
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider:
|
|
73
|
-
state: FormState;
|
|
74
|
-
} & {
|
|
75
|
-
dispatch: (params: {
|
|
76
|
-
type: string;
|
|
77
|
-
payload: any;
|
|
78
|
-
}) => void;
|
|
79
|
-
}>;
|
|
71
|
+
export declare const Provider: any, Context: any;
|
|
@@ -4,21 +4,25 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
4
4
|
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); }
|
|
5
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
6
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
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); }
|
|
8
7
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9
8
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
-
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; }
|
|
11
9
|
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; }
|
|
12
10
|
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; }
|
|
13
11
|
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; }
|
|
14
12
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
15
13
|
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); }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
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."); }
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
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; } }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
20
|
/**
|
|
17
21
|
* venueBooking 购物车组件
|
|
18
22
|
* 参照 scanOrder/Cart 实现,使用系统内置 ShoppingCart + SubTotal 组件
|
|
19
23
|
* 支持两种模式:embedded(桌面端内嵌)和 drawer(移动端抽屉弹出)
|
|
20
24
|
*/
|
|
21
|
-
import React, { useEffect, useMemo } from 'react';
|
|
25
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
22
26
|
import { message } from 'antd';
|
|
23
27
|
import { Button } from '@pisell/materials';
|
|
24
28
|
import { locales } from '@pisell/utils';
|
|
@@ -28,12 +32,15 @@ import SubTotal from "../../../subTotal";
|
|
|
28
32
|
import VoucherCard from "../Voucher";
|
|
29
33
|
import VenueDeposit from "../Deposit";
|
|
30
34
|
import { useVenueBookingContext } from "../../context";
|
|
35
|
+
import { buildCartHolderParams, getVenueCartHolderConfig } from "../../../../utils/buildCartHolderParams";
|
|
36
|
+
import { getSkuRelationFormId, handleCartHolderFormSuccess } from "../../../../utils/buildCartHolderParams";
|
|
37
|
+
import { openForm, getCustomer } from "../../../appointmentBooking/utils";
|
|
31
38
|
import "./index.less";
|
|
32
39
|
|
|
33
40
|
/** Cart 组件 Props,与 scanOrder/Cart 对齐 */
|
|
34
41
|
|
|
35
42
|
export default function Cart(props) {
|
|
36
|
-
var _engineContext$appHel, _engineContext$appHel2, _engineContext$appHel3, _engineContext$engine, _businessUtils$getApp, _businessUtils$getApp2,
|
|
43
|
+
var _engineContext$appHel, _engineContext$appHel2, _engineContext$appHel3, _engineContext$engine, _engineContext$appHel4, _businessUtils$getApp, _businessUtils$getApp2, _ref2, _ref3, _ref4, _summary$total_amount, _summary$deposit3;
|
|
37
44
|
var open = props.open,
|
|
38
45
|
onCancel = props.onCancel,
|
|
39
46
|
onNext = props.onNext,
|
|
@@ -50,34 +57,70 @@ export default function Cart(props) {
|
|
|
50
57
|
refreshViewModel = _useVenueBookingConte.refreshViewModel,
|
|
51
58
|
venueBookingModule = _useVenueBookingConte.venueBookingModule,
|
|
52
59
|
isAgreeDepositPolicy = _useVenueBookingConte.isAgreeDepositPolicy,
|
|
53
|
-
setIsAgreeDepositPolicy = _useVenueBookingConte.setIsAgreeDepositPolicy
|
|
60
|
+
setIsAgreeDepositPolicy = _useVenueBookingConte.setIsAgreeDepositPolicy,
|
|
61
|
+
isLogin = _useVenueBookingConte.isLogin;
|
|
54
62
|
var engineContext = useEngineContext();
|
|
55
63
|
var businessUtils = engineContext === null || engineContext === void 0 || (_engineContext$appHel = engineContext.appHelper) === null || _engineContext$appHel === void 0 || (_engineContext$appHel = _engineContext$appHel.utils) === null || _engineContext$appHel === void 0 ? void 0 : _engineContext$appHel.businessUtils;
|
|
56
64
|
var symbol = String((engineContext === null || engineContext === void 0 || (_engineContext$appHel2 = engineContext.appHelper) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel2 = _engineContext$appHel2.utils) === null || _engineContext$appHel2 === void 0 || (_engineContext$appHel3 = _engineContext$appHel2.getSymbolic) === null || _engineContext$appHel3 === void 0 ? void 0 : _engineContext$appHel3.call(_engineContext$appHel2)) || '$');
|
|
57
65
|
var locale = (engineContext === null || engineContext === void 0 || (_engineContext$engine = engineContext.engine) === null || _engineContext$engine === void 0 || (_engineContext$engine = _engineContext$engine.props) === null || _engineContext$engine === void 0 ? void 0 : _engineContext$engine.locale) || 'en';
|
|
66
|
+
var _useState = useState({}),
|
|
67
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
+
holderMap = _useState2[0],
|
|
69
|
+
setHolderMap = _useState2[1];
|
|
70
|
+
var _ref = (engineContext === null || engineContext === void 0 || (_engineContext$appHel4 = engineContext.appHelper) === null || _engineContext$appHel4 === void 0 ? void 0 : _engineContext$appHel4.utils) || {},
|
|
71
|
+
pisellos = _ref.pisellos,
|
|
72
|
+
translation = _ref.translation;
|
|
58
73
|
|
|
59
74
|
// 是否安装商品券/折扣卡应用
|
|
60
75
|
var hasGoodPassApp = !!(businessUtils !== null && businessUtils !== void 0 && (_businessUtils$getApp = businessUtils.getAppByModal) !== null && _businessUtils$getApp !== void 0 && _businessUtils$getApp.call(businessUtils, 'goodpass'));
|
|
61
76
|
var hasDiscountCardApp = !!(businessUtils !== null && businessUtils !== void 0 && (_businessUtils$getApp2 = businessUtils.getAppByModal) !== null && _businessUtils$getApp2 !== void 0 && _businessUtils$getApp2.call(businessUtils, 'discountcard'));
|
|
62
77
|
var showVoucher = hasGoodPassApp || hasDiscountCardApp;
|
|
78
|
+
useEffect(function () {
|
|
79
|
+
var _pisellos$effects;
|
|
80
|
+
var onHolderChanged = function onHolderChanged(res) {
|
|
81
|
+
if ((res === null || res === void 0 ? void 0 : res.path) === 'holderMap') {
|
|
82
|
+
setHolderMap(res === null || res === void 0 ? void 0 : res.value);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
pisellos === null || pisellos === void 0 || (_pisellos$effects = pisellos.effects) === null || _pisellos$effects === void 0 || _pisellos$effects.on('venueBooking_holder:changed', onHolderChanged);
|
|
86
|
+
return function () {
|
|
87
|
+
var _pisellos$effects2;
|
|
88
|
+
pisellos === null || pisellos === void 0 || (_pisellos$effects2 = pisellos.effects) === null || _pisellos$effects2 === void 0 || _pisellos$effects2.off('venueBooking_holder:changed', onHolderChanged);
|
|
89
|
+
};
|
|
90
|
+
}, []);
|
|
91
|
+
useEffect(function () {
|
|
92
|
+
var _holderMap = (venueBookingModule === null || venueBookingModule === void 0 ? void 0 : venueBookingModule.getHolderFormMap()) || {};
|
|
93
|
+
setHolderMap(_holderMap);
|
|
94
|
+
}, [venueBookingModule]);
|
|
63
95
|
|
|
64
96
|
// 可见判断:内嵌模式始终可见,抽屉模式需 open 为 true
|
|
65
97
|
var isVisible = embedded || open;
|
|
66
98
|
if (!isVisible) return null;
|
|
67
99
|
|
|
68
100
|
// 从 summary 中提取总金额(兼容多种字段名)
|
|
69
|
-
var totalAmount = (
|
|
101
|
+
var totalAmount = (_ref2 = (_ref3 = (_ref4 = (_summary$total_amount = summary === null || summary === void 0 ? void 0 : summary.total_amount) !== null && _summary$total_amount !== void 0 ? _summary$total_amount : summary === null || summary === void 0 ? void 0 : summary.expect_amount) !== null && _ref4 !== void 0 ? _ref4 : summary === null || summary === void 0 ? void 0 : summary.amount) !== null && _ref3 !== void 0 ? _ref3 : summary === null || summary === void 0 ? void 0 : summary.total) !== null && _ref2 !== void 0 ? _ref2 : '0.00';
|
|
70
102
|
|
|
71
103
|
// VenueBooking 场景下不展示 ProductCard 的 like(心形)图标,
|
|
72
104
|
// 通过在 item 层注入 is_hide_like 覆盖 Time 组件的渲染条件
|
|
73
105
|
var cartProducts = useMemo(function () {
|
|
74
106
|
return (items || []).map(function (item) {
|
|
107
|
+
var _item$_origin;
|
|
108
|
+
var holderConfig = getVenueCartHolderConfig(item);
|
|
109
|
+
var formData = holderMap === null || holderMap === void 0 ? void 0 : holderMap[holderConfig === null || holderConfig === void 0 ? void 0 : holderConfig.resource_id];
|
|
110
|
+
var holderParams = buildCartHolderParams({
|
|
111
|
+
item: item,
|
|
112
|
+
holderConfig: holderConfig,
|
|
113
|
+
formData: formData,
|
|
114
|
+
translation: translation,
|
|
115
|
+
enabled: !!(item !== null && item !== void 0 && (_item$_origin = item._origin) !== null && _item$_origin !== void 0 && (_item$_origin = _item$_origin.product) !== null && _item$_origin !== void 0 && _item$_origin.bookingUuid)
|
|
116
|
+
});
|
|
75
117
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
76
118
|
symbol: (item === null || item === void 0 ? void 0 : item.symbol) || symbol,
|
|
77
|
-
is_hide_like: true
|
|
78
|
-
|
|
119
|
+
is_hide_like: true,
|
|
120
|
+
allowClearHolder: true
|
|
121
|
+
}, holderParams);
|
|
79
122
|
});
|
|
80
|
-
}, [items, symbol]);
|
|
123
|
+
}, [items, symbol, holderMap, translation]);
|
|
81
124
|
|
|
82
125
|
// 按钮文案:最后一步显示"立即支付",其余步骤统一显示"下一步"
|
|
83
126
|
var confirmOrderText = currentStep === 'checkout' ? String(locales.getText('pisell2.venue.action.pay.now') || '立即支付') : String(locales.getText('pisell2.venue.action.next') || '下一步');
|
|
@@ -88,10 +131,10 @@ export default function Cart(props) {
|
|
|
88
131
|
* surcharges 为服务费列表,label 支持多语言对象,按当前 locale 取值
|
|
89
132
|
*/
|
|
90
133
|
var subTotalList = useMemo(function () {
|
|
91
|
-
var _summary$product_amou, _summary$tax_fee,
|
|
134
|
+
var _summary$product_amou, _summary$tax_fee, _ref5, _summary$total_amount2, _summary$deposit, _venueBookingModule$g, _tempSummary$is_price, _summary$deposit$tota, _summary$deposit2;
|
|
92
135
|
var subTotal = Number((_summary$product_amou = summary === null || summary === void 0 ? void 0 : summary.product_amount) !== null && _summary$product_amou !== void 0 ? _summary$product_amou : 0);
|
|
93
136
|
var totalTaxFee = Number((_summary$tax_fee = summary === null || summary === void 0 ? void 0 : summary.tax_fee) !== null && _summary$tax_fee !== void 0 ? _summary$tax_fee : 0);
|
|
94
|
-
var total = Number((
|
|
137
|
+
var total = Number((_ref5 = (_summary$total_amount2 = summary === null || summary === void 0 ? void 0 : summary.total_amount) !== null && _summary$total_amount2 !== void 0 ? _summary$total_amount2 : summary === null || summary === void 0 ? void 0 : summary.expect_amount) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
95
138
|
var hasDeposit = !!(summary !== null && summary !== void 0 && (_summary$deposit = summary.deposit) !== null && _summary$deposit !== void 0 && _summary$deposit.hasDeposit);
|
|
96
139
|
var tempOrder = venueBookingModule === null || venueBookingModule === void 0 || (_venueBookingModule$g = venueBookingModule.getTempOrder) === null || _venueBookingModule$g === void 0 ? void 0 : _venueBookingModule$g.call(venueBookingModule);
|
|
97
140
|
var tempSummary = (tempOrder === null || tempOrder === void 0 ? void 0 : tempOrder.summary) || {};
|
|
@@ -155,75 +198,145 @@ export default function Cart(props) {
|
|
|
155
198
|
return false;
|
|
156
199
|
};
|
|
157
200
|
var handleCartChange = /*#__PURE__*/function () {
|
|
158
|
-
var
|
|
159
|
-
var
|
|
160
|
-
var targetItem, productId, productVariantId, identityKey;
|
|
161
|
-
return _regeneratorRuntime().wrap(function
|
|
162
|
-
while (1) switch (
|
|
201
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(item, type, sourceItem) {
|
|
202
|
+
var _ref7, _targetItem$product_i, _targetItem$product_v;
|
|
203
|
+
var _getVenueCartHolderCo, _engineContext$appHel5, formId, skuRelationFormId, _engineContext$appHel8, _item$_origin3, customer, params, targetItem, productId, productVariantId, identityKey;
|
|
204
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
205
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
163
206
|
case 0:
|
|
207
|
+
if (!(type === 'add_holder')) {
|
|
208
|
+
_context2.next = 6;
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
formId = (_getVenueCartHolderCo = getVenueCartHolderConfig(item)) === null || _getVenueCartHolderCo === void 0 ? void 0 : _getVenueCartHolderCo.resource_id;
|
|
212
|
+
if (formId) {
|
|
213
|
+
_context2.next = 4;
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
return _context2.abrupt("return");
|
|
217
|
+
case 4:
|
|
218
|
+
skuRelationFormId = getSkuRelationFormId(holderMap, formId);
|
|
219
|
+
return _context2.abrupt("return", openForm({
|
|
220
|
+
form_id: skuRelationFormId || formId,
|
|
221
|
+
title: locales.getText('pisell2.venue.create.form'),
|
|
222
|
+
utils: engineContext === null || engineContext === void 0 || (_engineContext$appHel5 = engineContext.appHelper) === null || _engineContext$appHel5 === void 0 ? void 0 : _engineContext$appHel5.utils,
|
|
223
|
+
callback: function () {
|
|
224
|
+
var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
|
|
225
|
+
var _engineContext$appHel6, _engineContext$appHel7, _item$_origin2, _handleCartHolderForm, formRecordId, holderFormId, customer;
|
|
226
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
227
|
+
while (1) switch (_context.prev = _context.next) {
|
|
228
|
+
case 0:
|
|
229
|
+
if (!((res === null || res === void 0 ? void 0 : res.status) === 'success')) {
|
|
230
|
+
_context.next = 6;
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
_handleCartHolderForm = handleCartHolderFormSuccess({
|
|
234
|
+
res: res,
|
|
235
|
+
formId: formId,
|
|
236
|
+
skuRelationFormId: skuRelationFormId,
|
|
237
|
+
utils: engineContext === null || engineContext === void 0 || (_engineContext$appHel6 = engineContext.appHelper) === null || _engineContext$appHel6 === void 0 ? void 0 : _engineContext$appHel6.utils,
|
|
238
|
+
module: venueBookingModule
|
|
239
|
+
}), formRecordId = _handleCartHolderForm.formRecordId, holderFormId = _handleCartHolderForm.formId;
|
|
240
|
+
customer = getCustomer(engineContext === null || engineContext === void 0 || (_engineContext$appHel7 = engineContext.appHelper) === null || _engineContext$appHel7 === void 0 ? void 0 : _engineContext$appHel7.utils);
|
|
241
|
+
venueBookingModule.setBookingHolder(item === null || item === void 0 || (_item$_origin2 = item._origin) === null || _item$_origin2 === void 0 || (_item$_origin2 = _item$_origin2.product) === null || _item$_origin2 === void 0 ? void 0 : _item$_origin2.bookingUuid, {
|
|
242
|
+
customer_id: customer === null || customer === void 0 ? void 0 : customer.id,
|
|
243
|
+
form_id: holderFormId,
|
|
244
|
+
form_record: [formRecordId]
|
|
245
|
+
});
|
|
246
|
+
_context.next = 6;
|
|
247
|
+
return refreshViewModel();
|
|
248
|
+
case 6:
|
|
249
|
+
case "end":
|
|
250
|
+
return _context.stop();
|
|
251
|
+
}
|
|
252
|
+
}, _callee);
|
|
253
|
+
}));
|
|
254
|
+
function callback(_x4) {
|
|
255
|
+
return _callback.apply(this, arguments);
|
|
256
|
+
}
|
|
257
|
+
return callback;
|
|
258
|
+
}()
|
|
259
|
+
}));
|
|
260
|
+
case 6:
|
|
261
|
+
if (!(type === 'change_holder')) {
|
|
262
|
+
_context2.next = 13;
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
customer = getCustomer(engineContext === null || engineContext === void 0 || (_engineContext$appHel8 = engineContext.appHelper) === null || _engineContext$appHel8 === void 0 ? void 0 : _engineContext$appHel8.utils);
|
|
266
|
+
params = !sourceItem ? null : {
|
|
267
|
+
customer_id: customer === null || customer === void 0 ? void 0 : customer.id,
|
|
268
|
+
form_id: sourceItem === null || sourceItem === void 0 ? void 0 : sourceItem.form_id,
|
|
269
|
+
form_record: [sourceItem === null || sourceItem === void 0 ? void 0 : sourceItem.form_record_id]
|
|
270
|
+
};
|
|
271
|
+
venueBookingModule.setBookingHolder(item === null || item === void 0 || (_item$_origin3 = item._origin) === null || _item$_origin3 === void 0 || (_item$_origin3 = _item$_origin3.product) === null || _item$_origin3 === void 0 ? void 0 : _item$_origin3.bookingUuid, params);
|
|
272
|
+
_context2.next = 12;
|
|
273
|
+
return refreshViewModel();
|
|
274
|
+
case 12:
|
|
275
|
+
return _context2.abrupt("return");
|
|
276
|
+
case 13:
|
|
164
277
|
if (!(type !== 'delete')) {
|
|
165
|
-
|
|
278
|
+
_context2.next = 15;
|
|
166
279
|
break;
|
|
167
280
|
}
|
|
168
|
-
return
|
|
169
|
-
case
|
|
281
|
+
return _context2.abrupt("return");
|
|
282
|
+
case 15:
|
|
170
283
|
targetItem = sourceItem && _typeof(sourceItem) === 'object' ? sourceItem : item;
|
|
171
284
|
if (!(currentStep !== 'select-venue' && isVenueBookingCartItem(targetItem))) {
|
|
172
|
-
|
|
285
|
+
_context2.next = 19;
|
|
173
286
|
break;
|
|
174
287
|
}
|
|
175
288
|
message.warning({
|
|
176
289
|
content: String(locales.getText('pisell2.venue.cart.delete.venue.only.step1') || '请返回第一步后再删除场地商品'),
|
|
177
290
|
duration: 2
|
|
178
291
|
});
|
|
179
|
-
return
|
|
180
|
-
case
|
|
181
|
-
productId = (
|
|
292
|
+
return _context2.abrupt("return");
|
|
293
|
+
case 19:
|
|
294
|
+
productId = (_ref7 = (_targetItem$product_i = targetItem === null || targetItem === void 0 ? void 0 : targetItem.product_id) !== null && _targetItem$product_i !== void 0 ? _targetItem$product_i : targetItem === null || targetItem === void 0 ? void 0 : targetItem.id) !== null && _ref7 !== void 0 ? _ref7 : null;
|
|
182
295
|
productVariantId = Number((_targetItem$product_v = targetItem === null || targetItem === void 0 ? void 0 : targetItem.product_variant_id) !== null && _targetItem$product_v !== void 0 ? _targetItem$product_v : 0); // 不透明 identity 契约:删除只信任 SDK 回灌的 identity_key,禁用 rowKey 回退。
|
|
183
296
|
identityKey = targetItem === null || targetItem === void 0 ? void 0 : targetItem.identity_key;
|
|
184
297
|
if (!(productId === null && Number.isNaN(productVariantId))) {
|
|
185
|
-
|
|
298
|
+
_context2.next = 24;
|
|
186
299
|
break;
|
|
187
300
|
}
|
|
188
|
-
return
|
|
189
|
-
case
|
|
301
|
+
return _context2.abrupt("return");
|
|
302
|
+
case 24:
|
|
190
303
|
if (!(typeof identityKey !== 'string' || identityKey.length === 0)) {
|
|
191
|
-
|
|
304
|
+
_context2.next = 27;
|
|
192
305
|
break;
|
|
193
306
|
}
|
|
194
307
|
console.error('[venueBooking] removeProductFromOrder skipped: missing identity_key', {
|
|
195
308
|
item: targetItem
|
|
196
309
|
});
|
|
197
|
-
return
|
|
198
|
-
case
|
|
199
|
-
|
|
200
|
-
|
|
310
|
+
return _context2.abrupt("return");
|
|
311
|
+
case 27:
|
|
312
|
+
_context2.prev = 27;
|
|
313
|
+
_context2.next = 30;
|
|
201
314
|
return runModuleAction('removeProductFromOrder', {
|
|
202
315
|
product_id: productId,
|
|
203
316
|
product_variant_id: Number.isNaN(productVariantId) ? 0 : productVariantId,
|
|
204
317
|
identity_key: identityKey
|
|
205
318
|
});
|
|
206
|
-
case
|
|
207
|
-
|
|
319
|
+
case 30:
|
|
320
|
+
_context2.next = 32;
|
|
208
321
|
return refreshViewModel();
|
|
209
|
-
case
|
|
210
|
-
|
|
322
|
+
case 32:
|
|
323
|
+
_context2.next = 37;
|
|
211
324
|
break;
|
|
212
|
-
case
|
|
213
|
-
|
|
214
|
-
|
|
325
|
+
case 34:
|
|
326
|
+
_context2.prev = 34;
|
|
327
|
+
_context2.t0 = _context2["catch"](27);
|
|
215
328
|
console.error('[venueBooking] removeProductFromOrder failed', {
|
|
216
|
-
error:
|
|
329
|
+
error: _context2.t0,
|
|
217
330
|
item: targetItem
|
|
218
331
|
});
|
|
219
|
-
case
|
|
332
|
+
case 37:
|
|
220
333
|
case "end":
|
|
221
|
-
return
|
|
334
|
+
return _context2.stop();
|
|
222
335
|
}
|
|
223
|
-
},
|
|
336
|
+
}, _callee2, null, [[27, 34]]);
|
|
224
337
|
}));
|
|
225
338
|
return function handleCartChange(_x, _x2, _x3) {
|
|
226
|
-
return
|
|
339
|
+
return _ref6.apply(this, arguments);
|
|
227
340
|
};
|
|
228
341
|
}();
|
|
229
342
|
|
|
@@ -244,9 +357,9 @@ export default function Cart(props) {
|
|
|
244
357
|
isShowNote: false,
|
|
245
358
|
isShowDelete: true,
|
|
246
359
|
isShowPackageNote: false,
|
|
247
|
-
isShowChangeHolder: false,
|
|
248
|
-
isShowHolder:
|
|
249
|
-
isShowAddHolderButton:
|
|
360
|
+
isShowChangeHolder: currentStep === 'checkout' ? false : !!isLogin,
|
|
361
|
+
isShowHolder: true,
|
|
362
|
+
isShowAddHolderButton: true
|
|
250
363
|
},
|
|
251
364
|
platform: "h5",
|
|
252
365
|
emptyText: locales.getText('pisell2.venue.cart.empty'),
|
|
@@ -189,12 +189,7 @@ export default function VoucherCard() {
|
|
|
189
189
|
className: "login-btn",
|
|
190
190
|
onClick: function onClick() {
|
|
191
191
|
openLoginModal({
|
|
192
|
-
callback: function callback(
|
|
193
|
-
if (status !== 'success') return;
|
|
194
|
-
handleLoginSuccess().then(function () {
|
|
195
|
-
void syncAfterDiscountChange();
|
|
196
|
-
});
|
|
197
|
-
}
|
|
192
|
+
callback: function callback() {}
|
|
198
193
|
});
|
|
199
194
|
}
|
|
200
195
|
}, locales.getText('pisell2.text.goodpass.login')), ' ', /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.text.goodpass.login-tip'))));
|
|
@@ -25,6 +25,7 @@ import { usePisellOS } from "../../hooks/useEngineContext";
|
|
|
25
25
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
26
26
|
import { VENUE_PRODUCT_IDS, useVenueBookingModule, useVenueBookingLogin, safeRunModuleAction, createVenueBookingViewModel, loadVenueProducts, fetchResourceAvailability, getDateRangeSummary, getTimeSlotGrid, toggleSlotAction, getAllSelectedSlots, getOtherParams } from "./hooks";
|
|
27
27
|
import { formatDateKey, getWeekDays } from "./utils";
|
|
28
|
+
import { getVenueCartHolderConfig, validateRequiredCartHolders } from "../../utils/buildCartHolderParams";
|
|
28
29
|
var VenueBookingContext = /*#__PURE__*/createContext(undefined);
|
|
29
30
|
|
|
30
31
|
/** 初始视图模型:所有数据从 OS 模块获取,初始为空 */
|
|
@@ -882,8 +883,20 @@ export function VenueBookingProvider(_ref) {
|
|
|
882
883
|
});
|
|
883
884
|
return;
|
|
884
885
|
}
|
|
886
|
+
|
|
887
|
+
// 如果当前步骤是 addons,则校验购物车中的 holder 数据
|
|
888
|
+
if (currentStep === 'addons') {
|
|
889
|
+
var _validateRequiredCart = validateRequiredCartHolders({
|
|
890
|
+
items: viewModel.cartItems,
|
|
891
|
+
getHolderConfig: getVenueCartHolderConfig
|
|
892
|
+
}),
|
|
893
|
+
hasError = _validateRequiredCart.hasError;
|
|
894
|
+
if (hasError) {
|
|
895
|
+
return;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
885
898
|
goToStep('checkout');
|
|
886
|
-
}, [isLogin, openLoginModal, handleLoginSuccess, goToStep, venueBookingModule]);
|
|
899
|
+
}, [isLogin, openLoginModal, handleLoginSuccess, goToStep, venueBookingModule, currentStep, viewModel.cartItems, getVenueCartHolderConfig]);
|
|
887
900
|
|
|
888
901
|
/** 主操作按钮行为(含登录门禁,自适应 2/3 步流程) */
|
|
889
902
|
var handlePrimaryAction = useCallback(function () {
|
|
@@ -915,7 +928,7 @@ export function VenueBookingProvider(_ref) {
|
|
|
915
928
|
return;
|
|
916
929
|
}
|
|
917
930
|
void handleSubmitOrder();
|
|
918
|
-
}, [currentStep, canNext, isAgreeDepositPolicy, viewModel.summary, stepList,
|
|
931
|
+
}, [currentStep, canNext, isAgreeDepositPolicy, viewModel.summary, stepList, goToStep, handleSubmitOrder, proceedToCheckout]);
|
|
919
932
|
|
|
920
933
|
// ── 监听全局登录成功事件(Voucher 区域内登录等场景) ──
|
|
921
934
|
// 仅依赖 pubsub 实例,回调经 ref 取最新实现,避免 handleLoginSuccess 重建
|
|
@@ -126,6 +126,7 @@ declare const _default: {
|
|
|
126
126
|
'pisell2.appointment.policy.confirm': string;
|
|
127
127
|
'pisell2.appointment.booking.empty.data': string;
|
|
128
128
|
'pisell2.product-select.search': string;
|
|
129
|
+
'pisell2.venue.create.form': string;
|
|
129
130
|
};
|
|
130
131
|
'zh-CN': {
|
|
131
132
|
'pisell2.venue.step.select': string;
|
|
@@ -250,6 +251,7 @@ declare const _default: {
|
|
|
250
251
|
'pisell2.appointment.policy.confirm': string;
|
|
251
252
|
'pisell2.appointment.booking.empty.data': string;
|
|
252
253
|
'pisell2.product-select.search': string;
|
|
254
|
+
'pisell2.venue.create.form': string;
|
|
253
255
|
};
|
|
254
256
|
'zh-HK': {
|
|
255
257
|
'pisell2.venue.step.select': string;
|
|
@@ -374,6 +376,7 @@ declare const _default: {
|
|
|
374
376
|
'pisell2.appointment.policy.confirm': string;
|
|
375
377
|
'pisell2.appointment.booking.empty.data': string;
|
|
376
378
|
'pisell2.product-select.search': string;
|
|
379
|
+
'pisell2.venue.create.form': string;
|
|
377
380
|
};
|
|
378
381
|
ja: {
|
|
379
382
|
'pisell2.venue.step.select': string;
|
|
@@ -498,6 +501,7 @@ declare const _default: {
|
|
|
498
501
|
'pisell2.appointment.policy.confirm': string;
|
|
499
502
|
'pisell2.appointment.booking.empty.data': string;
|
|
500
503
|
'pisell2.product-select.search': string;
|
|
504
|
+
'pisell2.venue.create.form': string;
|
|
501
505
|
};
|
|
502
506
|
pt: {
|
|
503
507
|
'pisell2.venue.step.select': string;
|
|
@@ -622,6 +626,7 @@ declare const _default: {
|
|
|
622
626
|
'pisell2.appointment.policy.confirm': string;
|
|
623
627
|
'pisell2.appointment.booking.empty.data': string;
|
|
624
628
|
'pisell2.product-select.search': string;
|
|
629
|
+
'pisell2.venue.create.form': string;
|
|
625
630
|
};
|
|
626
631
|
};
|
|
627
632
|
export default _default;
|
|
@@ -125,7 +125,8 @@ export default {
|
|
|
125
125
|
'pisell2.appointment.policy': 'You have read and agreed to this policy',
|
|
126
126
|
'pisell2.appointment.policy.confirm': 'Confirm',
|
|
127
127
|
'pisell2.appointment.booking.empty.data': 'No data',
|
|
128
|
-
'pisell2.product-select.search': 'Search'
|
|
128
|
+
'pisell2.product-select.search': 'Search',
|
|
129
|
+
'pisell2.venue.create.form': 'Create form'
|
|
129
130
|
},
|
|
130
131
|
'zh-CN': {
|
|
131
132
|
'pisell2.venue.step.select': '选择场地',
|
|
@@ -249,7 +250,8 @@ export default {
|
|
|
249
250
|
'pisell2.appointment.policy': '您已仔细阅读并同意此协议',
|
|
250
251
|
'pisell2.appointment.policy.confirm': '确定',
|
|
251
252
|
'pisell2.appointment.booking.empty.data': '暂无数据',
|
|
252
|
-
'pisell2.product-select.search': '搜索'
|
|
253
|
+
'pisell2.product-select.search': '搜索',
|
|
254
|
+
'pisell2.venue.create.form': '创建表单'
|
|
253
255
|
},
|
|
254
256
|
'zh-HK': {
|
|
255
257
|
'pisell2.venue.step.select': '選擇場地',
|
|
@@ -373,7 +375,8 @@ export default {
|
|
|
373
375
|
'pisell2.appointment.policy': '您已仔細閱讀並同意此協議',
|
|
374
376
|
'pisell2.appointment.policy.confirm': '確定',
|
|
375
377
|
'pisell2.appointment.booking.empty.data': '暫無數據',
|
|
376
|
-
'pisell2.product-select.search': '搜索'
|
|
378
|
+
'pisell2.product-select.search': '搜索',
|
|
379
|
+
'pisell2.venue.create.form': '创建表单'
|
|
377
380
|
},
|
|
378
381
|
ja: {
|
|
379
382
|
'pisell2.venue.step.select': 'コートを選択',
|
|
@@ -497,7 +500,8 @@ export default {
|
|
|
497
500
|
'pisell2.appointment.policy': 'このポリシーを読み、同意しました',
|
|
498
501
|
'pisell2.appointment.policy.confirm': '確認',
|
|
499
502
|
'pisell2.appointment.booking.empty.data': 'データなし',
|
|
500
|
-
'pisell2.product-select.search': '検索'
|
|
503
|
+
'pisell2.product-select.search': '検索',
|
|
504
|
+
'pisell2.venue.create.form': 'フォームを作成'
|
|
501
505
|
},
|
|
502
506
|
pt: {
|
|
503
507
|
'pisell2.venue.step.select': 'Escolher quadra',
|
|
@@ -621,6 +625,7 @@ export default {
|
|
|
621
625
|
'pisell2.appointment.policy': 'Você leu e concordou com esta política',
|
|
622
626
|
'pisell2.appointment.policy.confirm': 'Confirmar',
|
|
623
627
|
'pisell2.appointment.booking.empty.data': 'Sem dados',
|
|
624
|
-
'pisell2.product-select.search': 'Pesquisar'
|
|
628
|
+
'pisell2.product-select.search': 'Pesquisar',
|
|
629
|
+
'pisell2.venue.create.form': 'Criar formulário'
|
|
625
630
|
}
|
|
626
631
|
};
|