@pisell/private-materials 6.3.131 → 6.3.132
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.js +6 -6
- package/build/lowcode/view.js +6 -6
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +1 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/venueBooking/components/Cart/index.js +7 -7
- package/es/components/venueBooking/components/Checkout/index.js +2 -12
- package/es/components/venueBooking/components/Content/index.js +8 -7
- package/es/components/venueBooking/components/Footer/index.js +2 -8
- package/es/components/venueBooking/components/Header/index.js +37 -16
- package/es/components/venueBooking/components/VenueSelection/components/TimeGrid.js +52 -8
- package/es/components/venueBooking/components/VenueSelection/index.js +1 -5
- package/es/components/venueBooking/context.js +46 -24
- package/es/components/venueBooking/hooks.d.ts +1 -0
- package/es/components/venueBooking/hooks.js +8 -2
- package/es/components/venueBooking/index.js +30 -2
- package/es/components/venueBooking/locales.d.ts +15 -0
- package/es/components/venueBooking/locales.js +20 -5
- package/es/components/venueBooking/utils.d.ts +8 -0
- package/es/components/venueBooking/utils.js +12 -2
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/plus/pisellSalesManagement/config/booking.d.ts +6 -6
- package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +1 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/venueBooking/components/Cart/index.js +3 -8
- package/lib/components/venueBooking/components/Checkout/index.js +1 -5
- package/lib/components/venueBooking/components/Content/index.js +20 -15
- package/lib/components/venueBooking/components/Footer/index.js +1 -9
- package/lib/components/venueBooking/components/Header/index.js +11 -5
- package/lib/components/venueBooking/components/VenueSelection/components/TimeGrid.js +21 -3
- package/lib/components/venueBooking/components/VenueSelection/index.js +1 -2
- package/lib/components/venueBooking/context.js +32 -20
- package/lib/components/venueBooking/hooks.d.ts +1 -0
- package/lib/components/venueBooking/hooks.js +6 -1
- package/lib/components/venueBooking/index.js +19 -1
- package/lib/components/venueBooking/locales.d.ts +15 -0
- package/lib/components/venueBooking/locales.js +20 -5
- package/lib/components/venueBooking/utils.d.ts +8 -0
- package/lib/components/venueBooking/utils.js +3 -2
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +6 -6
- package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/package.json +18 -18
|
@@ -6,6 +6,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
6
6
|
* venueBooking 核心 hooks
|
|
7
7
|
* 模块获取、ViewModel 构建、入口上下文标准化、模块方法封装
|
|
8
8
|
*/
|
|
9
|
+
import { useRef } from 'react';
|
|
9
10
|
import { usePisellOS } from "../../hooks/useEngineContext";
|
|
10
11
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
11
12
|
import { toShoppingCartProducts } from "../scanOrder/utils/toShoppingCartProducts";
|
|
@@ -17,11 +18,16 @@ export var VENUE_PRODUCT_IDS = [61947, 61948];
|
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* 获取 PisellOS venueBooking 业务模块
|
|
21
|
+
* 使用 useRef 稳定模块引用,防止 getModule 返回值每次渲染变化时触发 bootstrap useEffect 重跑
|
|
20
22
|
*/
|
|
21
23
|
export function useVenueBookingModule() {
|
|
22
|
-
var _pisellOS$getModule;
|
|
23
24
|
var pisellOS = usePisellOS();
|
|
24
|
-
|
|
25
|
+
var moduleRef = useRef(null);
|
|
26
|
+
if (!moduleRef.current) {
|
|
27
|
+
var _pisellOS$getModule, _pisellOS$getModule2;
|
|
28
|
+
moduleRef.current = (_pisellOS$getModule = pisellOS === null || pisellOS === void 0 || (_pisellOS$getModule2 = pisellOS.getModule) === null || _pisellOS$getModule2 === void 0 ? void 0 : _pisellOS$getModule2.call(pisellOS, 'venueBooking')) !== null && _pisellOS$getModule !== void 0 ? _pisellOS$getModule : null;
|
|
29
|
+
}
|
|
30
|
+
return moduleRef.current;
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
/** 统一获取货币前缀(优先引擎配置,兜底 '$') */
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1
7
|
/**
|
|
2
8
|
* venueBooking 入口组件
|
|
3
9
|
* 初始化国际化、标准化入口上下文,并挂载 Provider + Content
|
|
4
10
|
*/
|
|
5
|
-
import React from 'react';
|
|
11
|
+
import React, { useState, useEffect } from 'react';
|
|
6
12
|
import { locales } from '@pisell/utils';
|
|
7
13
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
8
14
|
import { VenueBookingProvider } from "./context";
|
|
@@ -16,8 +22,30 @@ function VenueBooking(props) {
|
|
|
16
22
|
var context = useEngineContext();
|
|
17
23
|
var entryContext = normalizeEntryContext(context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 ? void 0 : _context$engine.props);
|
|
18
24
|
locales.init(localeTexts, (context === null || context === void 0 || (_context$engine2 = context.engine) === null || _context$engine2 === void 0 || (_context$engine2 = _context$engine2.props) === null || _context$engine2 === void 0 ? void 0 : _context$engine2.locale) || 'en');
|
|
25
|
+
|
|
26
|
+
// h-full 依赖父链上每一层都有明确高度,但宿主环境(如 KeepAlive wrapper)可能打断此链。
|
|
27
|
+
// 直接用 window.innerHeight 作为组件高度,绕开父链继承问题。
|
|
28
|
+
var _useState = useState(typeof window !== 'undefined' ? window.innerHeight : undefined),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
viewportHeight = _useState2[0],
|
|
31
|
+
setViewportHeight = _useState2[1];
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
function onResize() {
|
|
34
|
+
setViewportHeight(window.innerHeight);
|
|
35
|
+
}
|
|
36
|
+
setViewportHeight(window.innerHeight);
|
|
37
|
+
window.addEventListener('resize', onResize);
|
|
38
|
+
return function () {
|
|
39
|
+
return window.removeEventListener('resize', onResize);
|
|
40
|
+
};
|
|
41
|
+
}, []);
|
|
19
42
|
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
-
className: "venue-booking-scope
|
|
43
|
+
className: "venue-booking-scope overflow-x-hidden overscroll-none bg-[#f5f5f3] text-zinc-900",
|
|
44
|
+
style: viewportHeight !== undefined ? {
|
|
45
|
+
height: viewportHeight
|
|
46
|
+
} : {
|
|
47
|
+
height: '100vh'
|
|
48
|
+
}
|
|
21
49
|
}, /*#__PURE__*/React.createElement(VenueBookingProvider, {
|
|
22
50
|
entryContext: entryContext
|
|
23
51
|
}, /*#__PURE__*/React.createElement(Content, null)));
|
|
@@ -23,6 +23,7 @@ declare const _default: {
|
|
|
23
23
|
'pisell2.venue.cart.delete.venue.only.step1': string;
|
|
24
24
|
'pisell2.venue.cart.addons.ready': string;
|
|
25
25
|
'pisell2.venue.cart.review.all': string;
|
|
26
|
+
'pisell2.venue.action.next': string;
|
|
26
27
|
'pisell2.venue.action.next.addons': string;
|
|
27
28
|
'pisell2.venue.action.review.pay': string;
|
|
28
29
|
'pisell2.venue.action.pay.now': string;
|
|
@@ -91,6 +92,7 @@ declare const _default: {
|
|
|
91
92
|
'pisell2.venue.calendar.weekday.short.sun': string;
|
|
92
93
|
'pisell2.venue.time.am': string;
|
|
93
94
|
'pisell2.venue.time.pm': string;
|
|
95
|
+
'pisell2.venue.time.hour.format': string;
|
|
94
96
|
'pisell2.venue.limit.message': string;
|
|
95
97
|
'pisell2.text.goodpass': string;
|
|
96
98
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -119,6 +121,7 @@ declare const _default: {
|
|
|
119
121
|
'pisell2.appointment.policy': string;
|
|
120
122
|
'pisell2.appointment.policy.confirm': string;
|
|
121
123
|
'pisell2.appointment.booking.empty.data': string;
|
|
124
|
+
'pisell2.product-select.search': string;
|
|
122
125
|
};
|
|
123
126
|
'zh-CN': {
|
|
124
127
|
'pisell2.venue.step.select': string;
|
|
@@ -140,6 +143,7 @@ declare const _default: {
|
|
|
140
143
|
'pisell2.venue.cart.delete.venue.only.step1': string;
|
|
141
144
|
'pisell2.venue.cart.addons.ready': string;
|
|
142
145
|
'pisell2.venue.cart.review.all': string;
|
|
146
|
+
'pisell2.venue.action.next': string;
|
|
143
147
|
'pisell2.venue.action.next.addons': string;
|
|
144
148
|
'pisell2.venue.action.review.pay': string;
|
|
145
149
|
'pisell2.venue.action.pay.now': string;
|
|
@@ -208,6 +212,7 @@ declare const _default: {
|
|
|
208
212
|
'pisell2.venue.calendar.weekday.short.sun': string;
|
|
209
213
|
'pisell2.venue.time.am': string;
|
|
210
214
|
'pisell2.venue.time.pm': string;
|
|
215
|
+
'pisell2.venue.time.hour.format': string;
|
|
211
216
|
'pisell2.venue.limit.message': string;
|
|
212
217
|
'pisell2.text.goodpass': string;
|
|
213
218
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -236,6 +241,7 @@ declare const _default: {
|
|
|
236
241
|
'pisell2.appointment.policy': string;
|
|
237
242
|
'pisell2.appointment.policy.confirm': string;
|
|
238
243
|
'pisell2.appointment.booking.empty.data': string;
|
|
244
|
+
'pisell2.product-select.search': string;
|
|
239
245
|
};
|
|
240
246
|
'zh-HK': {
|
|
241
247
|
'pisell2.venue.step.select': string;
|
|
@@ -257,6 +263,7 @@ declare const _default: {
|
|
|
257
263
|
'pisell2.venue.cart.delete.venue.only.step1': string;
|
|
258
264
|
'pisell2.venue.cart.addons.ready': string;
|
|
259
265
|
'pisell2.venue.cart.review.all': string;
|
|
266
|
+
'pisell2.venue.action.next': string;
|
|
260
267
|
'pisell2.venue.action.next.addons': string;
|
|
261
268
|
'pisell2.venue.action.review.pay': string;
|
|
262
269
|
'pisell2.venue.action.pay.now': string;
|
|
@@ -325,6 +332,7 @@ declare const _default: {
|
|
|
325
332
|
'pisell2.venue.calendar.weekday.short.sun': string;
|
|
326
333
|
'pisell2.venue.time.am': string;
|
|
327
334
|
'pisell2.venue.time.pm': string;
|
|
335
|
+
'pisell2.venue.time.hour.format': string;
|
|
328
336
|
'pisell2.venue.limit.message': string;
|
|
329
337
|
'pisell2.text.goodpass': string;
|
|
330
338
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -353,6 +361,7 @@ declare const _default: {
|
|
|
353
361
|
'pisell2.appointment.policy': string;
|
|
354
362
|
'pisell2.appointment.policy.confirm': string;
|
|
355
363
|
'pisell2.appointment.booking.empty.data': string;
|
|
364
|
+
'pisell2.product-select.search': string;
|
|
356
365
|
};
|
|
357
366
|
ja: {
|
|
358
367
|
'pisell2.venue.step.select': string;
|
|
@@ -374,6 +383,7 @@ declare const _default: {
|
|
|
374
383
|
'pisell2.venue.cart.delete.venue.only.step1': string;
|
|
375
384
|
'pisell2.venue.cart.addons.ready': string;
|
|
376
385
|
'pisell2.venue.cart.review.all': string;
|
|
386
|
+
'pisell2.venue.action.next': string;
|
|
377
387
|
'pisell2.venue.action.next.addons': string;
|
|
378
388
|
'pisell2.venue.action.review.pay': string;
|
|
379
389
|
'pisell2.venue.action.pay.now': string;
|
|
@@ -442,6 +452,7 @@ declare const _default: {
|
|
|
442
452
|
'pisell2.venue.calendar.weekday.short.sun': string;
|
|
443
453
|
'pisell2.venue.time.am': string;
|
|
444
454
|
'pisell2.venue.time.pm': string;
|
|
455
|
+
'pisell2.venue.time.hour.format': string;
|
|
445
456
|
'pisell2.venue.limit.message': string;
|
|
446
457
|
'pisell2.text.goodpass': string;
|
|
447
458
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -470,6 +481,7 @@ declare const _default: {
|
|
|
470
481
|
'pisell2.appointment.policy': string;
|
|
471
482
|
'pisell2.appointment.policy.confirm': string;
|
|
472
483
|
'pisell2.appointment.booking.empty.data': string;
|
|
484
|
+
'pisell2.product-select.search': string;
|
|
473
485
|
};
|
|
474
486
|
pt: {
|
|
475
487
|
'pisell2.venue.step.select': string;
|
|
@@ -491,6 +503,7 @@ declare const _default: {
|
|
|
491
503
|
'pisell2.venue.cart.delete.venue.only.step1': string;
|
|
492
504
|
'pisell2.venue.cart.addons.ready': string;
|
|
493
505
|
'pisell2.venue.cart.review.all': string;
|
|
506
|
+
'pisell2.venue.action.next': string;
|
|
494
507
|
'pisell2.venue.action.next.addons': string;
|
|
495
508
|
'pisell2.venue.action.review.pay': string;
|
|
496
509
|
'pisell2.venue.action.pay.now': string;
|
|
@@ -559,6 +572,7 @@ declare const _default: {
|
|
|
559
572
|
'pisell2.venue.calendar.weekday.short.sun': string;
|
|
560
573
|
'pisell2.venue.time.am': string;
|
|
561
574
|
'pisell2.venue.time.pm': string;
|
|
575
|
+
'pisell2.venue.time.hour.format': string;
|
|
562
576
|
'pisell2.venue.limit.message': string;
|
|
563
577
|
'pisell2.text.goodpass': string;
|
|
564
578
|
'pisell2.text.goodpass.product-vouchers': string;
|
|
@@ -587,6 +601,7 @@ declare const _default: {
|
|
|
587
601
|
'pisell2.appointment.policy': string;
|
|
588
602
|
'pisell2.appointment.policy.confirm': string;
|
|
589
603
|
'pisell2.appointment.booking.empty.data': string;
|
|
604
|
+
'pisell2.product-select.search': string;
|
|
590
605
|
};
|
|
591
606
|
};
|
|
592
607
|
export default _default;
|
|
@@ -23,6 +23,7 @@ export default {
|
|
|
23
23
|
'pisell2.venue.cart.delete.venue.only.step1': 'Please return to Step 1 before removing court bookings',
|
|
24
24
|
'pisell2.venue.cart.addons.ready': 'Add-ons are ready below.',
|
|
25
25
|
'pisell2.venue.cart.review.all': 'Review everything before payment.',
|
|
26
|
+
'pisell2.venue.action.next': 'Next',
|
|
26
27
|
'pisell2.venue.action.next.addons': 'Next: Add-ons',
|
|
27
28
|
'pisell2.venue.action.review.pay': 'Review & Pay',
|
|
28
29
|
'pisell2.venue.action.pay.now': 'Pay now',
|
|
@@ -91,6 +92,7 @@ export default {
|
|
|
91
92
|
'pisell2.venue.calendar.weekday.short.sun': 'Sun',
|
|
92
93
|
'pisell2.venue.time.am': 'am',
|
|
93
94
|
'pisell2.venue.time.pm': 'pm',
|
|
95
|
+
'pisell2.venue.time.hour.format': '{hour}{suffix}',
|
|
94
96
|
'pisell2.venue.limit.message': 'You can book up to 4 bookings or max 8 hours.',
|
|
95
97
|
'pisell2.text.goodpass': 'Promotion',
|
|
96
98
|
'pisell2.text.goodpass.product-vouchers': 'Product Vouchers',
|
|
@@ -118,7 +120,8 @@ export default {
|
|
|
118
120
|
'pisell2.appointment.deposit.close': 'Close',
|
|
119
121
|
'pisell2.appointment.policy': 'You have read and agreed to this policy',
|
|
120
122
|
'pisell2.appointment.policy.confirm': 'Confirm',
|
|
121
|
-
'pisell2.appointment.booking.empty.data': 'No data'
|
|
123
|
+
'pisell2.appointment.booking.empty.data': 'No data',
|
|
124
|
+
'pisell2.product-select.search': 'Search'
|
|
122
125
|
},
|
|
123
126
|
'zh-CN': {
|
|
124
127
|
'pisell2.venue.step.select': '选择场地',
|
|
@@ -140,6 +143,7 @@ export default {
|
|
|
140
143
|
'pisell2.venue.cart.delete.venue.only.step1': '请返回第一步后再删除场地商品',
|
|
141
144
|
'pisell2.venue.cart.addons.ready': '附加项已准备就绪。',
|
|
142
145
|
'pisell2.venue.cart.review.all': '请在支付前检查所有信息。',
|
|
146
|
+
'pisell2.venue.action.next': '下一步',
|
|
143
147
|
'pisell2.venue.action.next.addons': '下一步:附加项',
|
|
144
148
|
'pisell2.venue.action.review.pay': '确认 & 支付',
|
|
145
149
|
'pisell2.venue.action.pay.now': '立即支付',
|
|
@@ -208,6 +212,7 @@ export default {
|
|
|
208
212
|
'pisell2.venue.calendar.weekday.short.sun': '周日',
|
|
209
213
|
'pisell2.venue.time.am': '上午',
|
|
210
214
|
'pisell2.venue.time.pm': '下午',
|
|
215
|
+
'pisell2.venue.time.hour.format': '{suffix}{hour}点',
|
|
211
216
|
'pisell2.venue.limit.message': '最多可预订 4 个场次或 8 小时。',
|
|
212
217
|
'pisell2.text.goodpass': '促销',
|
|
213
218
|
'pisell2.text.goodpass.product-vouchers': '商品兑换券',
|
|
@@ -235,7 +240,8 @@ export default {
|
|
|
235
240
|
'pisell2.appointment.deposit.close': '关闭',
|
|
236
241
|
'pisell2.appointment.policy': '您已仔细阅读并同意此协议',
|
|
237
242
|
'pisell2.appointment.policy.confirm': '确定',
|
|
238
|
-
'pisell2.appointment.booking.empty.data': '暂无数据'
|
|
243
|
+
'pisell2.appointment.booking.empty.data': '暂无数据',
|
|
244
|
+
'pisell2.product-select.search': '搜索'
|
|
239
245
|
},
|
|
240
246
|
'zh-HK': {
|
|
241
247
|
'pisell2.venue.step.select': '選擇場地',
|
|
@@ -257,6 +263,7 @@ export default {
|
|
|
257
263
|
'pisell2.venue.cart.delete.venue.only.step1': '請返回第一步後再刪除場地商品',
|
|
258
264
|
'pisell2.venue.cart.addons.ready': '附加項已準備就緒。',
|
|
259
265
|
'pisell2.venue.cart.review.all': '請在支付前檢查所有資訊。',
|
|
266
|
+
'pisell2.venue.action.next': '下一步',
|
|
260
267
|
'pisell2.venue.action.next.addons': '下一步:附加項',
|
|
261
268
|
'pisell2.venue.action.review.pay': '確認 & 支付',
|
|
262
269
|
'pisell2.venue.action.pay.now': '立即支付',
|
|
@@ -325,6 +332,7 @@ export default {
|
|
|
325
332
|
'pisell2.venue.calendar.weekday.short.sun': '週日',
|
|
326
333
|
'pisell2.venue.time.am': '上午',
|
|
327
334
|
'pisell2.venue.time.pm': '下午',
|
|
335
|
+
'pisell2.venue.time.hour.format': '{suffix}{hour}點',
|
|
328
336
|
'pisell2.venue.limit.message': '最多可預訂 4 個場次或 8 小時。',
|
|
329
337
|
'pisell2.text.goodpass': '促銷',
|
|
330
338
|
'pisell2.text.goodpass.product-vouchers': '商品兌換券',
|
|
@@ -352,7 +360,8 @@ export default {
|
|
|
352
360
|
'pisell2.appointment.deposit.close': '關閉',
|
|
353
361
|
'pisell2.appointment.policy': '您已仔細閱讀並同意此協議',
|
|
354
362
|
'pisell2.appointment.policy.confirm': '確定',
|
|
355
|
-
'pisell2.appointment.booking.empty.data': '暫無數據'
|
|
363
|
+
'pisell2.appointment.booking.empty.data': '暫無數據',
|
|
364
|
+
'pisell2.product-select.search': '搜索'
|
|
356
365
|
},
|
|
357
366
|
ja: {
|
|
358
367
|
'pisell2.venue.step.select': 'コートを選択',
|
|
@@ -374,6 +383,7 @@ export default {
|
|
|
374
383
|
'pisell2.venue.cart.delete.venue.only.step1': 'コート予約を削除するには、ステップ1に戻ってください',
|
|
375
384
|
'pisell2.venue.cart.addons.ready': '追加オプションを下から選択できます。',
|
|
376
385
|
'pisell2.venue.cart.review.all': '支払い前に内容を確認してください。',
|
|
386
|
+
'pisell2.venue.action.next': '次へ',
|
|
377
387
|
'pisell2.venue.action.next.addons': '次へ:追加オプション',
|
|
378
388
|
'pisell2.venue.action.review.pay': '確認して支払う',
|
|
379
389
|
'pisell2.venue.action.pay.now': '今すぐ支払う',
|
|
@@ -442,6 +452,7 @@ export default {
|
|
|
442
452
|
'pisell2.venue.calendar.weekday.short.sun': '日',
|
|
443
453
|
'pisell2.venue.time.am': '午前',
|
|
444
454
|
'pisell2.venue.time.pm': '午後',
|
|
455
|
+
'pisell2.venue.time.hour.format': '{suffix}{hour}時',
|
|
445
456
|
'pisell2.venue.limit.message': '最大 4 件の予約、または合計 8 時間まで予約できます。',
|
|
446
457
|
'pisell2.text.goodpass': 'プロモーション',
|
|
447
458
|
'pisell2.text.goodpass.product-vouchers': '商品バウチャー',
|
|
@@ -469,7 +480,8 @@ export default {
|
|
|
469
480
|
'pisell2.appointment.deposit.close': '閉じる',
|
|
470
481
|
'pisell2.appointment.policy': 'このポリシーを読み、同意しました',
|
|
471
482
|
'pisell2.appointment.policy.confirm': '確認',
|
|
472
|
-
'pisell2.appointment.booking.empty.data': 'データなし'
|
|
483
|
+
'pisell2.appointment.booking.empty.data': 'データなし',
|
|
484
|
+
'pisell2.product-select.search': '検索'
|
|
473
485
|
},
|
|
474
486
|
pt: {
|
|
475
487
|
'pisell2.venue.step.select': 'Escolher quadra',
|
|
@@ -491,6 +503,7 @@ export default {
|
|
|
491
503
|
'pisell2.venue.cart.delete.venue.only.step1': 'Volte para a Etapa 1 antes de remover reservas de quadra',
|
|
492
504
|
'pisell2.venue.cart.addons.ready': 'Os adicionais estão prontos abaixo.',
|
|
493
505
|
'pisell2.venue.cart.review.all': 'Revise tudo antes do pagamento.',
|
|
506
|
+
'pisell2.venue.action.next': 'Próximo',
|
|
494
507
|
'pisell2.venue.action.next.addons': 'Próximo: adicionais',
|
|
495
508
|
'pisell2.venue.action.review.pay': 'Revisar e pagar',
|
|
496
509
|
'pisell2.venue.action.pay.now': 'Pagar agora',
|
|
@@ -559,6 +572,7 @@ export default {
|
|
|
559
572
|
'pisell2.venue.calendar.weekday.short.sun': 'Dom',
|
|
560
573
|
'pisell2.venue.time.am': 'am',
|
|
561
574
|
'pisell2.venue.time.pm': 'pm',
|
|
575
|
+
'pisell2.venue.time.hour.format': '{hour}{suffix}',
|
|
562
576
|
'pisell2.venue.limit.message': 'Você pode reservar até 4 reservas ou no máximo 8 horas.',
|
|
563
577
|
'pisell2.text.goodpass': 'Promoção',
|
|
564
578
|
'pisell2.text.goodpass.product-vouchers': 'Vales de Produto',
|
|
@@ -586,6 +600,7 @@ export default {
|
|
|
586
600
|
'pisell2.appointment.deposit.close': 'Fechar',
|
|
587
601
|
'pisell2.appointment.policy': 'Você leu e concordou com esta política',
|
|
588
602
|
'pisell2.appointment.policy.confirm': 'Confirmar',
|
|
589
|
-
'pisell2.appointment.booking.empty.data': 'Sem dados'
|
|
603
|
+
'pisell2.appointment.booking.empty.data': 'Sem dados',
|
|
604
|
+
'pisell2.product-select.search': 'Pesquisar'
|
|
590
605
|
}
|
|
591
606
|
};
|
|
@@ -16,6 +16,14 @@ export declare function pad(n: number): string;
|
|
|
16
16
|
export declare function timeToMinutes(time: string): number;
|
|
17
17
|
export declare function minutesToTime(minutes: number): string;
|
|
18
18
|
export declare function isHourBoundary(slot: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* 格式化小时列头
|
|
21
|
+
* 使用 i18n 模板 `pisell2.venue.time.hour.format`,支持 {suffix} / {hour} 两个占位符
|
|
22
|
+
* - en / pt: "{hour}{suffix}" → "6pm"
|
|
23
|
+
* - zh-CN / zh-TW: "{suffix}{hour}点/點" → "下午6点"
|
|
24
|
+
* - ja: "{suffix}{hour}時" → "午後6時"
|
|
25
|
+
* 未命中模板时回退到 "{hour}{suffix}" 兼容旧行为
|
|
26
|
+
*/
|
|
19
27
|
export declare function formatHourHeader(slot: string): string;
|
|
20
28
|
/** 从 timeLabels 中提取整点小时(用于表头合并列) */
|
|
21
29
|
export declare function buildHourGroups(timeLabels: string[]): string[];
|
|
@@ -79,13 +79,23 @@ export function minutesToTime(minutes) {
|
|
|
79
79
|
export function isHourBoundary(slot) {
|
|
80
80
|
return slot.endsWith(':00');
|
|
81
81
|
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* 格式化小时列头
|
|
85
|
+
* 使用 i18n 模板 `pisell2.venue.time.hour.format`,支持 {suffix} / {hour} 两个占位符
|
|
86
|
+
* - en / pt: "{hour}{suffix}" → "6pm"
|
|
87
|
+
* - zh-CN / zh-TW: "{suffix}{hour}点/點" → "下午6点"
|
|
88
|
+
* - ja: "{suffix}{hour}時" → "午後6時"
|
|
89
|
+
* 未命中模板时回退到 "{hour}{suffix}" 兼容旧行为
|
|
90
|
+
*/
|
|
82
91
|
export function formatHourHeader(slot) {
|
|
83
92
|
var _slot$split$map = slot.split(':').map(Number),
|
|
84
93
|
_slot$split$map2 = _slicedToArray(_slot$split$map, 1),
|
|
85
94
|
hour = _slot$split$map2[0];
|
|
86
|
-
var suffix = hour >= 12 ? locales.getText('pisell2.venue.time.pm') || '
|
|
95
|
+
var suffix = hour >= 12 ? locales.getText('pisell2.venue.time.pm') || 'pm' : locales.getText('pisell2.venue.time.am') || 'am';
|
|
87
96
|
var hour12 = hour % 12 === 0 ? 12 : hour % 12;
|
|
88
|
-
|
|
97
|
+
var template = locales.getText('pisell2.venue.time.hour.format') || '{hour}{suffix}';
|
|
98
|
+
return template.replace('{hour}', String(hour12)).replace('{suffix}', suffix);
|
|
89
99
|
}
|
|
90
100
|
|
|
91
101
|
/** 从 timeLabels 中提取整点小时(用于表头合并列) */
|
|
@@ -20,7 +20,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
20
20
|
}[];
|
|
21
21
|
minInputNumberProps?: undefined;
|
|
22
22
|
maxInputNumberProps?: undefined;
|
|
23
|
-
|
|
23
|
+
component?: undefined;
|
|
24
24
|
isSearchServer?: undefined;
|
|
25
25
|
showSearch?: undefined;
|
|
26
26
|
showTime?: undefined;
|
|
@@ -46,7 +46,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
46
46
|
mode?: undefined;
|
|
47
47
|
maxTagCount?: undefined;
|
|
48
48
|
options?: undefined;
|
|
49
|
-
|
|
49
|
+
component?: undefined;
|
|
50
50
|
isSearchServer?: undefined;
|
|
51
51
|
showSearch?: undefined;
|
|
52
52
|
showTime?: undefined;
|
|
@@ -91,7 +91,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
91
91
|
options: () => Promise<any>;
|
|
92
92
|
minInputNumberProps?: undefined;
|
|
93
93
|
maxInputNumberProps?: undefined;
|
|
94
|
-
|
|
94
|
+
component?: undefined;
|
|
95
95
|
isSearchServer?: undefined;
|
|
96
96
|
showSearch?: undefined;
|
|
97
97
|
showTime?: undefined;
|
|
@@ -111,7 +111,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
111
111
|
options?: undefined;
|
|
112
112
|
minInputNumberProps?: undefined;
|
|
113
113
|
maxInputNumberProps?: undefined;
|
|
114
|
-
|
|
114
|
+
component?: undefined;
|
|
115
115
|
isSearchServer?: undefined;
|
|
116
116
|
showSearch?: undefined;
|
|
117
117
|
showTime?: undefined;
|
|
@@ -133,7 +133,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
133
133
|
maxTagCount?: undefined;
|
|
134
134
|
minInputNumberProps?: undefined;
|
|
135
135
|
maxInputNumberProps?: undefined;
|
|
136
|
-
|
|
136
|
+
component?: undefined;
|
|
137
137
|
showTime?: undefined;
|
|
138
138
|
};
|
|
139
139
|
sort?: undefined;
|
|
@@ -152,7 +152,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
152
152
|
options?: undefined;
|
|
153
153
|
minInputNumberProps?: undefined;
|
|
154
154
|
maxInputNumberProps?: undefined;
|
|
155
|
-
|
|
155
|
+
component?: undefined;
|
|
156
156
|
isSearchServer?: undefined;
|
|
157
157
|
showSearch?: undefined;
|
|
158
158
|
};
|
|
@@ -3,6 +3,6 @@ export interface ImageUploadProps {
|
|
|
3
3
|
value?: string;
|
|
4
4
|
onChange?: (val: string) => void;
|
|
5
5
|
}
|
|
6
|
-
export declare const getBaseTime: (size: number) =>
|
|
6
|
+
export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
|
|
7
7
|
declare const ImageUpload: React.FC<ImageUploadProps>;
|
|
8
8
|
export default ImageUpload;
|
|
@@ -245,4 +245,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
245
245
|
* @Author: WangHan
|
|
246
246
|
* @Date: 2024-12-24 11:32
|
|
247
247
|
*/
|
|
248
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
|
248
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
|
@@ -166,10 +166,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
166
166
|
export declare const getDuration: (duration: number | {
|
|
167
167
|
type: string;
|
|
168
168
|
value: number;
|
|
169
|
-
}) => number | {
|
|
169
|
+
}) => number | "flexible" | {
|
|
170
170
|
type: string;
|
|
171
171
|
value: number;
|
|
172
|
-
}
|
|
172
|
+
};
|
|
173
173
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
174
174
|
export declare const getIsEdit: (state: any) => boolean;
|
|
175
175
|
export {};
|
|
@@ -8,7 +8,7 @@ export declare const useCupAction: () => {
|
|
|
8
8
|
* @return {*}
|
|
9
9
|
*/
|
|
10
10
|
export declare const useBatchCupAction: () => {
|
|
11
|
-
run: (this: unknown, eco_cup_ids:
|
|
11
|
+
run: (this: unknown, eco_cup_ids: number[] | string[]) => Promise<boolean>;
|
|
12
12
|
loading: boolean;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "success" | "page" | "
|
|
12
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "success" | "page" | "
|
|
14
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"warn" | "success" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -176,7 +176,7 @@ export declare const updateCustom: (payload: {
|
|
|
176
176
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
177
177
|
type: EActionTypes;
|
|
178
178
|
payload: {
|
|
179
|
-
status: "
|
|
179
|
+
status: "warn" | "success" | "loading" | "fail" | "question";
|
|
180
180
|
};
|
|
181
181
|
};
|
|
182
182
|
/**
|
|
@@ -197,7 +197,7 @@ export declare const updateComponent: (component: string, render?: boolean) => {
|
|
|
197
197
|
} | {
|
|
198
198
|
readonly type: "step";
|
|
199
199
|
readonly render: boolean;
|
|
200
|
-
|
|
200
|
+
component?: undefined;
|
|
201
201
|
};
|
|
202
202
|
};
|
|
203
203
|
/**
|
|
@@ -297,9 +297,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
name?: string | undefined;
|
|
298
298
|
symbol?: string | undefined;
|
|
299
299
|
amount?: string | number | undefined;
|
|
300
|
-
mode?: "
|
|
300
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
301
301
|
order_id?: string | number | undefined;
|
|
302
|
-
eftpos?: "
|
|
302
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
|
303
303
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
304
304
|
key?: number | undefined;
|
|
305
305
|
step?: number | undefined;
|
|
@@ -310,7 +310,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
310
310
|
net?: boolean | undefined;
|
|
311
311
|
component?: string | undefined;
|
|
312
312
|
form?: string | undefined;
|
|
313
|
-
status?: "
|
|
313
|
+
status?: "warn" | "success" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
314
314
|
warn?: string | undefined;
|
|
315
315
|
steps?: {
|
|
316
316
|
/** 用于重置当前步骤 */
|
|
@@ -76,16 +76,11 @@ function Cart(props) {
|
|
|
76
76
|
const cartProducts = (0, import_react.useMemo)(() => {
|
|
77
77
|
return (items || []).map((item) => ({
|
|
78
78
|
...item,
|
|
79
|
-
symbol: (item == null ? void 0 : item.symbol) || symbol
|
|
79
|
+
symbol: (item == null ? void 0 : item.symbol) || symbol,
|
|
80
|
+
is_hide_like: true
|
|
80
81
|
}));
|
|
81
82
|
}, [items, symbol]);
|
|
82
|
-
const confirmOrderText = (()
|
|
83
|
-
if (currentStep === "select-venue")
|
|
84
|
-
return String(import_utils.locales.getText("pisell2.venue.action.next.addons") || "下一步:附加项");
|
|
85
|
-
if (currentStep === "addons")
|
|
86
|
-
return String(import_utils.locales.getText("pisell2.venue.action.review.pay") || "确认 & 支付");
|
|
87
|
-
return String(import_utils.locales.getText("pisell2.venue.action.pay.now") || "立即支付");
|
|
88
|
-
})();
|
|
83
|
+
const confirmOrderText = currentStep === "checkout" ? String(import_utils.locales.getText("pisell2.venue.action.pay.now") || "立即支付") : String(import_utils.locales.getText("pisell2.venue.action.next") || "下一步");
|
|
89
84
|
const subTotalList = (0, import_react.useMemo)(() => {
|
|
90
85
|
var _a2, _b2, _c2;
|
|
91
86
|
const subTotal = Number((summary == null ? void 0 : summary.product_amount) ?? 0);
|