@pisell/private-materials 6.3.139 → 6.3.141

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.
Files changed (153) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +5 -5
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +6 -6
  11. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  12. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  15. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  16. package/es/components/booking/forms/footer.d.ts +1 -0
  17. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  18. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  19. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  20. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  21. package/es/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
  22. package/es/components/ecocup/components/CupActionList/index.d.ts +1 -0
  23. package/es/components/ecocup/components/CupActionModal/index.d.ts +1 -0
  24. package/es/components/ecocup/components/CupStatusModal/index.d.ts +1 -0
  25. package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +1 -0
  26. package/es/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
  27. package/es/components/ecocup/components/SearchBar/index.d.ts +1 -0
  28. package/es/components/ecocup/components/SettingModal/index.d.ts +1 -0
  29. package/es/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
  30. package/es/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
  31. package/es/components/ecocup/cupList/index.d.ts +1 -0
  32. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  33. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  34. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  35. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  36. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  37. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  38. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  39. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  40. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  41. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  42. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  43. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  44. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  45. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  46. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  47. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  48. package/es/components/scanOrder/components/Cart/index.js +127 -56
  49. package/es/components/scanOrder/components/Cart/index.less +11 -5
  50. package/es/components/scanOrder/components/Check/index.js +85 -80
  51. package/es/components/scanOrder/components/Content/index.js +356 -164
  52. package/es/components/scanOrder/components/Menu/index.d.ts +11 -0
  53. package/es/components/scanOrder/components/Menu/index.js +140 -169
  54. package/es/components/scanOrder/components/Voucher/index.d.ts +8 -0
  55. package/es/components/scanOrder/components/Voucher/index.js +250 -0
  56. package/es/components/scanOrder/context.js +38 -13
  57. package/es/components/scanOrder/hooks.js +4 -1
  58. package/es/components/scanOrder/locales.d.ts +65 -0
  59. package/es/components/scanOrder/locales.js +65 -0
  60. package/es/components/scanOrder/types.d.ts +10 -0
  61. package/es/components/scanOrder/utils/toShoppingCartProducts.d.ts +1 -0
  62. package/es/components/scanOrder/utils/toShoppingCartProducts.js +137 -9
  63. package/es/components/scanOrder/utils/transformProductDetail.js +21 -4
  64. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  65. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  66. package/es/components/venueBooking/components/Addons/index.js +42 -33
  67. package/es/components/venueBooking/components/Cart/index.js +26 -14
  68. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  69. package/es/plus/orderList/components/HandleActions.d.ts +1 -0
  70. package/es/plus/orderList/components/QuickFilter.d.ts +1 -0
  71. package/es/plus/orderList/components/Reset.d.ts +1 -0
  72. package/es/plus/orderList/components/Toolbar.d.ts +1 -0
  73. package/es/plus/pisellReservation/floorMap/useReservationFloorPlan.d.ts +1 -0
  74. package/es/plus/saasAttendance/settings/components/membersField/index.d.ts +1 -0
  75. package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  76. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  77. package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
  78. package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
  79. package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
  80. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  81. package/es/pro/pisellPhoneKeyboard/index.d.ts +1 -0
  82. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  83. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  84. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  85. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  86. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  87. package/lib/components/booking/forms/footer.d.ts +1 -0
  88. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  89. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  90. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  91. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  92. package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
  93. package/lib/components/ecocup/components/CupActionList/index.d.ts +1 -0
  94. package/lib/components/ecocup/components/CupActionModal/index.d.ts +1 -0
  95. package/lib/components/ecocup/components/CupStatusModal/index.d.ts +1 -0
  96. package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +1 -0
  97. package/lib/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
  98. package/lib/components/ecocup/components/SearchBar/index.d.ts +1 -0
  99. package/lib/components/ecocup/components/SettingModal/index.d.ts +1 -0
  100. package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
  101. package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
  102. package/lib/components/ecocup/cupList/index.d.ts +1 -0
  103. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  104. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  105. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  106. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  107. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  108. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  109. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  110. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  111. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  112. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  113. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  114. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  115. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  116. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  117. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  118. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  119. package/lib/components/scanOrder/components/Cart/index.js +79 -24
  120. package/lib/components/scanOrder/components/Cart/index.less +11 -5
  121. package/lib/components/scanOrder/components/Check/index.js +28 -23
  122. package/lib/components/scanOrder/components/Content/index.js +136 -42
  123. package/lib/components/scanOrder/components/Menu/index.d.ts +11 -0
  124. package/lib/components/scanOrder/components/Menu/index.js +23 -36
  125. package/lib/components/scanOrder/components/Voucher/index.d.ts +8 -0
  126. package/lib/components/scanOrder/components/Voucher/index.js +162 -0
  127. package/lib/components/scanOrder/context.js +21 -10
  128. package/lib/components/scanOrder/hooks.js +4 -1
  129. package/lib/components/scanOrder/locales.d.ts +65 -0
  130. package/lib/components/scanOrder/locales.js +65 -0
  131. package/lib/components/scanOrder/types.d.ts +10 -0
  132. package/lib/components/scanOrder/utils/toShoppingCartProducts.d.ts +1 -0
  133. package/lib/components/scanOrder/utils/toShoppingCartProducts.js +88 -6
  134. package/lib/components/scanOrder/utils/transformProductDetail.js +10 -3
  135. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  136. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  137. package/lib/components/venueBooking/components/Addons/index.js +15 -8
  138. package/lib/components/venueBooking/components/Cart/index.js +8 -2
  139. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  140. package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
  141. package/lib/plus/orderList/components/QuickFilter.d.ts +1 -0
  142. package/lib/plus/orderList/components/Reset.d.ts +1 -0
  143. package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
  144. package/lib/plus/pisellReservation/floorMap/useReservationFloorPlan.d.ts +1 -0
  145. package/lib/plus/saasAttendance/settings/components/membersField/index.d.ts +1 -0
  146. package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  147. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  148. package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
  149. package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
  150. package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
  151. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  152. package/lib/pro/pisellPhoneKeyboard/index.d.ts +1 -0
  153. package/package.json +1 -1
@@ -9,7 +9,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
9
9
  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); }
10
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
11
  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); }
12
- import React, { useEffect, useMemo, useRef, useState } from 'react';
12
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
13
13
  import { isMobile, locales } from '@pisell/utils';
14
14
  import { message, Modal } from 'antd';
15
15
  import { Button, PisellModal } from '@pisell/materials';
@@ -78,7 +78,9 @@ function ReadyState() {
78
78
  scanOrderModule = _useScanOrderContext.scanOrderModule,
79
79
  isCacheHydrated = _useScanOrderContext.isCacheHydrated,
80
80
  markGate = _useScanOrderContext.markGate,
81
- isGatePassed = _useScanOrderContext.isGatePassed;
81
+ isGatePassed = _useScanOrderContext.isGatePassed,
82
+ resumeStep = _useScanOrderContext.resumeStep,
83
+ consumeResumeStep = _useScanOrderContext.consumeResumeStep;
82
84
  var _useScanOrderLogin = useScanOrderLogin(),
83
85
  isLogin = _useScanOrderLogin.isLogin,
84
86
  openLoginModal = _useScanOrderLogin.openLoginModal;
@@ -111,20 +113,122 @@ function ReadyState() {
111
113
  _useState8 = _slicedToArray(_useState7, 2),
112
114
  pendingFormPayload = _useState8[0],
113
115
  setPendingFormPayload = _useState8[1];
116
+
117
+ /**
118
+ * 商品列表状态:挂在 ReadyState 而不是 Menu 本地,保证从 check 返回 product 时命中缓存、不重发请求
119
+ * (stepRegistry 切换会让 Menu unmount,本地 useState 会丢;ReadyState 在整段会话内不 unmount)
120
+ * - productListLoadedRef:同步判定是否已有有效结果,避免 setState 异步窗口内重复请求
121
+ * - productListPromiseRef:in-flight promise 去重,让并发调用合并成同一次请求
122
+ */
123
+ var _useState9 = useState([]),
124
+ _useState10 = _slicedToArray(_useState9, 2),
125
+ productList = _useState10[0],
126
+ setProductList = _useState10[1];
127
+ var productListLoadedRef = useRef(false);
128
+ var productListPromiseRef = useRef(null);
129
+ var ensureProductListLoaded = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
130
+ var request;
131
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
132
+ while (1) switch (_context2.prev = _context2.next) {
133
+ case 0:
134
+ if (!productListLoadedRef.current) {
135
+ _context2.next = 2;
136
+ break;
137
+ }
138
+ return _context2.abrupt("return");
139
+ case 2:
140
+ if (!productListPromiseRef.current) {
141
+ _context2.next = 6;
142
+ break;
143
+ }
144
+ _context2.next = 5;
145
+ return productListPromiseRef.current.catch(function () {});
146
+ case 5:
147
+ return _context2.abrupt("return");
148
+ case 6:
149
+ request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
150
+ var res;
151
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
152
+ while (1) switch (_context.prev = _context.next) {
153
+ case 0:
154
+ _context.prev = 0;
155
+ _context.next = 3;
156
+ return runModuleAction('getProductList');
157
+ case 3:
158
+ res = _context.sent;
159
+ if (!Array.isArray(res)) {
160
+ _context.next = 8;
161
+ break;
162
+ }
163
+ productListLoadedRef.current = true;
164
+ setProductList(res);
165
+ return _context.abrupt("return");
166
+ case 8:
167
+ // 非数组错误载荷:沿用原 Menu 内的 Modal.confirm + 跳首页逻辑
168
+ Modal.confirm({
169
+ title: res === null || res === void 0 ? void 0 : res.message,
170
+ okText: String(locales.getText('pisell2.event.confirm') || 'OK'),
171
+ cancelButtonProps: {
172
+ style: {
173
+ display: 'none'
174
+ }
175
+ },
176
+ maskClosable: false,
177
+ onOk: function onOk() {
178
+ location.replace('/');
179
+ }
180
+ });
181
+ _context.next = 14;
182
+ break;
183
+ case 11:
184
+ _context.prev = 11;
185
+ _context.t0 = _context["catch"](0);
186
+ console.warn('[scanOrder] getProductList failed', _context.t0);
187
+ case 14:
188
+ _context.prev = 14;
189
+ productListPromiseRef.current = null;
190
+ return _context.finish(14);
191
+ case 17:
192
+ case "end":
193
+ return _context.stop();
194
+ }
195
+ }, _callee, null, [[0, 11, 14, 17]]);
196
+ }))();
197
+ productListPromiseRef.current = request;
198
+ _context2.next = 10;
199
+ return request;
200
+ case 10:
201
+ case "end":
202
+ return _context2.stop();
203
+ }
204
+ }, _callee2);
205
+ })), [runModuleAction]);
206
+
114
207
  /** checkResourceAvailable 返回 requestEntryPax === 1 时,在协议/表单之后弹人数并写入 scanOrder otherParams */
115
208
  var requestEntryPaxRef = useRef(0);
116
209
  var requestPaxMinRef = useRef(1);
117
210
  var requestPaxMaxRef = useRef(1);
118
211
  var tableFormRecordRef = useRef(null);
212
+ /** 本次会话是否曾实际弹出过入口人数弹窗(商品页返回首页前可二次弹窗) */
213
+ var entryPaxModalWasPresentedRef = useRef(false);
119
214
 
120
- /** 根据当前语言从多语言 name 对象中取值,兜底 original -> en -> 空串 */
215
+ /** 根据当前语言从多语言 name 对象中取值,兜底当前语言 -> original -> 空串 */
121
216
  var getLocalizedName = function getLocalizedName(nameMap) {
122
217
  if (!nameMap) return '';
123
218
  var currentLocale = locales.getLocale();
124
- return nameMap[currentLocale] || nameMap.original || nameMap.en || '';
219
+ var localized = nameMap[currentLocale];
220
+ if (typeof localized === 'string' && localized) return localized;
221
+ var original = nameMap.original;
222
+ if (typeof original === 'string' && original) return original;
223
+ return '';
125
224
  };
126
225
 
127
- /** 解析可能是纯字符串或多语言对象的文案,兜底 current locale -> original -> en -> 空串 */
226
+ /**
227
+ * 解析可能是纯字符串或多语言对象的文案
228
+ * - 字符串:原样返回
229
+ * - 多语言对象(如 { en, 'zh-CN', original, ... }):取当前语言,兜底 original
230
+ * - 其它:空串
231
+ */
128
232
  var resolveLocalizedText = function resolveLocalizedText(value) {
129
233
  if (value == null) return '';
130
234
  if (typeof value === 'string') return value;
@@ -132,11 +236,11 @@ function ReadyState() {
132
236
  return getLocalizedName(value);
133
237
  };
134
238
  var normalizeFormPayload = function normalizeFormPayload(formPayload, partyroomBookingPayload) {
135
- var _ref, _ref2, _sourcePayload$id;
239
+ var _ref3, _ref4, _sourcePayload$id;
136
240
  var sourcePayload = formPayload !== null && formPayload !== void 0 ? formPayload : partyroomBookingPayload;
137
241
  if (!sourcePayload) return null;
138
242
  var isPrimitivePayload = typeof sourcePayload === 'number' || typeof sourcePayload === 'string';
139
- var rawId = isPrimitivePayload ? sourcePayload : (_ref = (_ref2 = (_sourcePayload$id = sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.id) !== null && _sourcePayload$id !== void 0 ? _sourcePayload$id : sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.form_id) !== null && _ref2 !== void 0 ? _ref2 : sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.resource_form_id) !== null && _ref !== void 0 ? _ref : sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.partyroom_booking;
243
+ var rawId = isPrimitivePayload ? sourcePayload : (_ref3 = (_ref4 = (_sourcePayload$id = sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.id) !== null && _sourcePayload$id !== void 0 ? _sourcePayload$id : sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.form_id) !== null && _ref4 !== void 0 ? _ref4 : sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.resource_form_id) !== null && _ref3 !== void 0 ? _ref3 : sourcePayload === null || sourcePayload === void 0 ? void 0 : sourcePayload.partyroom_booking;
140
244
  var formId = Number(rawId);
141
245
  if (Number.isNaN(formId) || formId <= 0) return null;
142
246
  var sourceDetail = _typeof(sourcePayload) === 'object' && sourcePayload !== null ? sourcePayload : {};
@@ -148,20 +252,54 @@ function ReadyState() {
148
252
  };
149
253
  };
150
254
  var app = utils === null || utils === void 0 || (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 ? void 0 : _utils$getApp.call(utils);
255
+
256
+ /** 回站点首页(与商品步返回兜底一致) */
257
+ var navigateToHome = function navigateToHome() {
258
+ var _app$history, _app$history2;
259
+ if (app !== null && app !== void 0 && (_app$history = app.history) !== null && _app$history !== void 0 && _app$history.replace) {
260
+ app.history.replace('/');
261
+ } else if (app !== null && app !== void 0 && (_app$history2 = app.history) !== null && _app$history2 !== void 0 && _app$history2.push) {
262
+ app.history.push('/');
263
+ } else {
264
+ location.replace('/');
265
+ }
266
+ };
267
+
268
+ /** 弹出入口人数弹窗,返回有效人数或取消/关闭时为 null */
269
+ var requestEntryPaxModal = function requestEntryPaxModal() {
270
+ return new Promise(function (resolve) {
271
+ var _tableFormRecordRef$c;
272
+ if (typeof (utils === null || utils === void 0 ? void 0 : utils.action) !== 'function') {
273
+ resolve(null);
274
+ return;
275
+ }
276
+ utils.action({
277
+ type: 'pisell1.handlePaxModal',
278
+ data: {
279
+ tableName: getLocalizedName((_tableFormRecordRef$c = tableFormRecordRef.current) === null || _tableFormRecordRef$c === void 0 ? void 0 : _tableFormRecordRef$c.name),
280
+ requestPaxMin: requestPaxMinRef.current,
281
+ requestPaxMax: requestPaxMaxRef.current
282
+ },
283
+ callback: function callback(result) {
284
+ resolve(extractEntryPaxNumber(result));
285
+ }
286
+ });
287
+ });
288
+ };
289
+
151
290
  // 跳转到订单详情页
152
291
  var handleOrderDetail = function handleOrderDetail(order_id) {
153
- var _app$history, _app$history2;
292
+ var _app$history3, _app$history4;
154
293
  var link = "/order/details?id=".concat(order_id);
155
- if (app !== null && app !== void 0 && (_app$history = app.history) !== null && _app$history !== void 0 && _app$history.replace) {
294
+ if (app !== null && app !== void 0 && (_app$history3 = app.history) !== null && _app$history3 !== void 0 && _app$history3.replace) {
156
295
  app.history.replace(link);
157
- } else if (app !== null && app !== void 0 && (_app$history2 = app.history) !== null && _app$history2 !== void 0 && _app$history2.push) {
296
+ } else if (app !== null && app !== void 0 && (_app$history4 = app.history) !== null && _app$history4 !== void 0 && _app$history4.push) {
158
297
  app.history.push(link);
159
298
  } else {
160
299
  location.replace(link);
161
300
  }
162
301
  };
163
302
  var handleBack = function handleBack() {
164
- var _app$history3, _app$history4;
165
303
  if (currentStep !== 'product') {
166
304
  prevStep();
167
305
  return;
@@ -170,123 +308,153 @@ function ReadyState() {
170
308
  handleOrderDetail(entryContext.order_id);
171
309
  return;
172
310
  }
173
- if (app !== null && app !== void 0 && (_app$history3 = app.history) !== null && _app$history3 !== void 0 && _app$history3.replace) {
174
- app.history.replace('/');
175
- } else if (app !== null && app !== void 0 && (_app$history4 = app.history) !== null && _app$history4 !== void 0 && _app$history4.push) {
176
- app.history.push('/');
177
- } else {
178
- location.replace('/');
311
+ if (entryPaxModalWasPresentedRef.current) {
312
+ void _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
313
+ var pax;
314
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
315
+ while (1) switch (_context3.prev = _context3.next) {
316
+ case 0:
317
+ _context3.next = 2;
318
+ return requestEntryPaxModal();
319
+ case 2:
320
+ pax = _context3.sent;
321
+ if (!(pax == null)) {
322
+ _context3.next = 6;
323
+ break;
324
+ }
325
+ navigateToHome();
326
+ return _context3.abrupt("return");
327
+ case 6:
328
+ _context3.prev = 6;
329
+ _context3.next = 9;
330
+ return runModuleAction('setEntryPaxNumber', pax);
331
+ case 9:
332
+ _context3.next = 11;
333
+ return refreshViewModel();
334
+ case 11:
335
+ _context3.next = 16;
336
+ break;
337
+ case 13:
338
+ _context3.prev = 13;
339
+ _context3.t0 = _context3["catch"](6);
340
+ console.warn('[scanOrder] setEntryPaxNumber on back pax confirm failed', _context3.t0);
341
+ case 16:
342
+ case "end":
343
+ return _context3.stop();
344
+ }
345
+ }, _callee3, null, [[6, 13]]);
346
+ }))();
347
+ return;
179
348
  }
349
+ navigateToHome();
180
350
  };
181
351
  var enterProductStep = /*#__PURE__*/function () {
182
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
183
- return _regeneratorRuntime().wrap(function _callee$(_context) {
184
- while (1) switch (_context.prev = _context.next) {
352
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
353
+ var target;
354
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
355
+ while (1) switch (_context4.prev = _context4.next) {
185
356
  case 0:
186
- _context.prev = 0;
187
- _context.next = 3;
357
+ _context4.prev = 0;
358
+ _context4.next = 3;
188
359
  return runModuleAction('applyItemRulePrefill');
189
360
  case 3:
190
- _context.next = 5;
361
+ _context4.next = 5;
191
362
  return refreshViewModel();
192
363
  case 5:
193
- _context.next = 10;
364
+ _context4.next = 10;
194
365
  break;
195
366
  case 7:
196
- _context.prev = 7;
197
- _context.t0 = _context["catch"](0);
198
- console.warn('[scanOrder] applyItemRulePrefill failed', _context.t0);
367
+ _context4.prev = 7;
368
+ _context4.t0 = _context4["catch"](0);
369
+ console.warn('[scanOrder] applyItemRulePrefill failed', _context4.t0);
199
370
  case 10:
200
- _context.prev = 10;
201
- // 步骤缓存命中时,currentStep 可能已恢复到 'check';不把它拉回 'product'
202
- if (currentStep !== 'check') goToStep('product');
203
- return _context.finish(10);
204
- case 13:
371
+ _context4.prev = 10;
372
+ // bootstrap 结束后统一由 resumeStep 决定最终去向:
373
+ // - resumeStep === 'check' → 恢复到结算页(此时 dineInConfig 已加载)
374
+ // - 其它(null / 'product') → 正常进入商品页
375
+ target = resumeStep === 'check' ? 'check' : 'product';
376
+ if (resumeStep) consumeResumeStep();
377
+ goToStep(target);
378
+ return _context4.finish(10);
379
+ case 15:
205
380
  case "end":
206
- return _context.stop();
381
+ return _context4.stop();
207
382
  }
208
- }, _callee, null, [[0, 7, 10, 13]]);
383
+ }, _callee4, null, [[0, 7, 10, 15]]);
209
384
  }));
210
385
  return function enterProductStep() {
211
- return _ref3.apply(this, arguments);
386
+ return _ref6.apply(this, arguments);
212
387
  };
213
388
  }();
214
389
 
215
390
  /** 需要时先走人数弹窗与 setOtherParams(entryPaxNumber),再进入商品步 */
216
391
  var runEntryPaxGateThenEnterProduct = /*#__PURE__*/function () {
217
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
392
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
218
393
  var pax;
219
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
220
- while (1) switch (_context2.prev = _context2.next) {
394
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
395
+ while (1) switch (_context5.prev = _context5.next) {
221
396
  case 0:
222
- if (!(requestEntryPaxRef.current !== 1)) {
223
- _context2.next = 4;
397
+ if (!(entryMode === 'additional_order')) {
398
+ _context5.next = 4;
224
399
  break;
225
400
  }
226
- _context2.next = 3;
401
+ _context5.next = 3;
227
402
  return enterProductStep();
228
403
  case 3:
229
- return _context2.abrupt("return");
404
+ return _context5.abrupt("return");
230
405
  case 4:
231
- if (!isGatePassed('paxEntered')) {
232
- _context2.next = 8;
406
+ if (!(requestEntryPaxRef.current !== 1)) {
407
+ _context5.next = 8;
233
408
  break;
234
409
  }
235
- _context2.next = 7;
410
+ _context5.next = 7;
236
411
  return enterProductStep();
237
412
  case 7:
238
- return _context2.abrupt("return");
413
+ return _context5.abrupt("return");
239
414
  case 8:
240
- _context2.next = 10;
241
- return new Promise(function (resolve) {
242
- var _tableFormRecordRef$c;
243
- if (typeof (utils === null || utils === void 0 ? void 0 : utils.action) !== 'function') {
244
- resolve(null);
245
- return;
246
- }
247
- utils.action({
248
- type: 'pisell1.handlePaxModal',
249
- data: {
250
- tableName: getLocalizedName((_tableFormRecordRef$c = tableFormRecordRef.current) === null || _tableFormRecordRef$c === void 0 ? void 0 : _tableFormRecordRef$c.name),
251
- requestPaxMin: requestPaxMinRef.current,
252
- requestPaxMax: requestPaxMaxRef.current
253
- },
254
- callback: function callback(result) {
255
- resolve(extractEntryPaxNumber(result));
256
- }
257
- });
258
- });
259
- case 10:
260
- pax = _context2.sent;
415
+ if (!isGatePassed('paxEntered')) {
416
+ _context5.next = 12;
417
+ break;
418
+ }
419
+ _context5.next = 11;
420
+ return enterProductStep();
421
+ case 11:
422
+ return _context5.abrupt("return");
423
+ case 12:
424
+ entryPaxModalWasPresentedRef.current = true;
425
+ _context5.next = 15;
426
+ return requestEntryPaxModal();
427
+ case 15:
428
+ pax = _context5.sent;
261
429
  if (!(pax == null)) {
262
- _context2.next = 14;
430
+ _context5.next = 19;
263
431
  break;
264
432
  }
265
- location.replace('/');
266
- return _context2.abrupt("return");
267
- case 14:
268
- _context2.prev = 14;
269
- _context2.next = 17;
433
+ navigateToHome();
434
+ return _context5.abrupt("return");
435
+ case 19:
436
+ _context5.prev = 19;
437
+ _context5.next = 22;
270
438
  return runModuleAction('setEntryPaxNumber', pax);
271
- case 17:
439
+ case 22:
272
440
  markGate('paxEntered');
273
- _context2.next = 23;
441
+ _context5.next = 28;
274
442
  break;
275
- case 20:
276
- _context2.prev = 20;
277
- _context2.t0 = _context2["catch"](14);
278
- console.warn('[scanOrder] setOtherParams failed', _context2.t0);
279
- case 23:
280
- _context2.next = 25;
281
- return enterProductStep();
282
443
  case 25:
444
+ _context5.prev = 25;
445
+ _context5.t0 = _context5["catch"](19);
446
+ console.warn('[scanOrder] setOtherParams failed', _context5.t0);
447
+ case 28:
448
+ _context5.next = 30;
449
+ return enterProductStep();
450
+ case 30:
283
451
  case "end":
284
- return _context2.stop();
452
+ return _context5.stop();
285
453
  }
286
- }, _callee2, null, [[14, 20]]);
454
+ }, _callee5, null, [[19, 25]]);
287
455
  }));
288
456
  return function runEntryPaxGateThenEnterProduct() {
289
- return _ref4.apply(this, arguments);
457
+ return _ref7.apply(this, arguments);
290
458
  };
291
459
  }();
292
460
  var closePolicyAndBack = function closePolicyAndBack() {
@@ -348,16 +516,16 @@ function ReadyState() {
348
516
  };
349
517
  useEffect(function () {
350
518
  var checkResourceAvailable = /*#__PURE__*/function () {
351
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
352
- var hasOrderId, _yield$runModuleActio, mode, order_id, errorTips, policy, form, partyroom_booking, requestEntryPax, requestPaxMin, requestPaxMax, table_form_record, normalizedFormPayload, isAdditionalOrder, normalizedPolicyPayload, tips, content;
353
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
354
- while (1) switch (_context3.prev = _context3.next) {
519
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
520
+ var hasOrderId, _yield$runModuleActio, mode, order_id, errorTips, policy, form, partyroom_booking, requestEntryPax, requestPaxMin, requestPaxMax, table_form_record, normalizedFormPayload, isAdditionalOrder, normalizedPolicyPayload, tips, _scanOrderModule$setU, content;
521
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
522
+ while (1) switch (_context6.prev = _context6.next) {
355
523
  case 0:
356
524
  hasOrderId = !!(entryContext !== null && entryContext !== void 0 && entryContext.order_id);
357
- _context3.next = 3;
525
+ _context6.next = 3;
358
526
  return runModuleAction('checkResourceAvailable', entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id, hasOrderId);
359
527
  case 3:
360
- _yield$runModuleActio = _context3.sent;
528
+ _yield$runModuleActio = _context6.sent;
361
529
  mode = _yield$runModuleActio.mode;
362
530
  order_id = _yield$runModuleActio.order_id;
363
531
  errorTips = _yield$runModuleActio.errorTips;
@@ -378,14 +546,14 @@ function ReadyState() {
378
546
  setEntryMode(isAdditionalOrder ? 'additional_order' : 'default');
379
547
  // 资源空闲:按需依次弹 协议 -> 表单 -> 人数,最后进入商品选择
380
548
  if (!(mode === 'idle')) {
381
- _context3.next = 35;
549
+ _context6.next = 35;
382
550
  break;
383
551
  }
384
552
  normalizedPolicyPayload = _typeof(policy) === 'object' && policy !== null ? policy : {
385
553
  id: policy
386
554
  }; // 步骤缓存:同一 resourceId 会话内已确认过协议则跳过
387
555
  if (!(normalizedPolicyPayload !== null && normalizedPolicyPayload !== void 0 && normalizedPolicyPayload.id && !isGatePassed('policyAccepted'))) {
388
- _context3.next = 28;
556
+ _context6.next = 28;
389
557
  break;
390
558
  }
391
559
  setPendingFormPayload(normalizedFormPayload);
@@ -393,79 +561,96 @@ function ReadyState() {
393
561
  open: true,
394
562
  content: normalizedPolicyPayload
395
563
  });
396
- return _context3.abrupt("return");
564
+ return _context6.abrupt("return");
397
565
  case 28:
398
566
  if (!(normalizedFormPayload && !isGatePassed('formSubmitted'))) {
399
- _context3.next = 31;
567
+ _context6.next = 31;
400
568
  break;
401
569
  }
402
570
  openFormModal(normalizedFormPayload);
403
- return _context3.abrupt("return");
571
+ return _context6.abrupt("return");
404
572
  case 31:
405
- _context3.next = 33;
573
+ _context6.next = 33;
406
574
  return runEntryPaxGateThenEnterProduct();
407
575
  case 33:
408
- _context3.next = 54;
576
+ _context6.next = 48;
409
577
  break;
410
578
  case 35:
411
579
  if (!isAdditionalOrder) {
412
- _context3.next = 44;
413
- break;
414
- }
415
- if (!hasOrderId) {
416
- _context3.next = 41;
580
+ _context6.next = 40;
417
581
  break;
418
582
  }
419
- _context3.next = 39;
583
+ _context6.next = 38;
420
584
  return enterProductStep();
421
- case 39:
422
- _context3.next = 42;
423
- break;
424
- case 41:
425
- handleOrderDetail(order_id);
426
- case 42:
427
- _context3.next = 54;
585
+ case 38:
586
+ _context6.next = 48;
428
587
  break;
429
- case 44:
588
+ case 40:
430
589
  if (!(mode === 'submit_disabled')) {
431
- _context3.next = 51;
590
+ _context6.next = 47;
432
591
  break;
433
592
  }
434
593
  // 禁止下单模式:允许进入商品选择,但下一步按钮需被禁用,点击提示 errorTips
435
594
  tips = resolveLocalizedText(errorTips) || String(locales.getText('pisell2.scan.order.submit.disabled.default') || '');
436
595
  setSubmitDisabledTips(tips);
437
- _context3.next = 49;
596
+ _context6.next = 45;
438
597
  return enterProductStep();
439
- case 49:
440
- _context3.next = 54;
598
+ case 45:
599
+ _context6.next = 48;
441
600
  break;
442
- case 51:
443
- // 其他情况,视为不在营业或者异常,返回异常提示
444
- content = resolveLocalizedText(errorTips);
445
- if (!content) {
446
- if (mode === 'resource_busy') {
447
- content = String(locales.getText('pisell2.scan.order.resource.status.exception') || '');
601
+ case 47:
602
+ if (mode === 'resource_busy') {
603
+ // 如果资源是占用,则跳转到订单详情页
604
+ // 需要检测当前是否已经登录,如果未登录则先登录再跳转
605
+ // 若用户直接关闭登录弹窗(非登录成功),由于当前还卡在 initialize 步骤,
606
+ // 没有合法后续状态,统一兜底回首页避免卡死。
607
+ if (!isLogin) {
608
+ // 登录回流意图:登录成功后 hydrate 阶段消费 pendingStep,避免卡在 init
609
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$setU = scanOrderModule.setUIState) === null || _scanOrderModule$setU === void 0 || _scanOrderModule$setU.call(scanOrderModule, 'pendingStep', currentStep);
610
+ openLoginModal({
611
+ callback: function callback(status) {
612
+ var _scanOrderModule$dele2;
613
+ if (status === 'success') {
614
+ var _scanOrderModule$dele;
615
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele === void 0 || _scanOrderModule$dele.call(scanOrderModule, 'pendingStep');
616
+ handleOrderDetail(order_id);
617
+ return;
618
+ }
619
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele2 = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele2 === void 0 || _scanOrderModule$dele2.call(scanOrderModule, 'pendingStep');
620
+ location.replace('/');
621
+ }
622
+ });
448
623
  } else {
449
- content = String(locales.getText('pisell2.scan.order.store.status.exception') || '');
624
+ handleOrderDetail(order_id);
450
625
  }
451
- }
452
- Modal.info({
453
- title: locales.getText('pisell2.scan.order.step.error'),
454
- content: String(content || '').trim(),
455
- okText: String(locales.getText('pisell2.event.confirm') || 'OK'),
456
- maskClosable: false,
457
- onOk: function onOk() {
458
- location.replace('/');
626
+ } else {
627
+ // 其他情况,视为不在营业或者异常,返回异常提示
628
+ content = resolveLocalizedText(errorTips);
629
+ if (!content) {
630
+ if (mode === 'resource_block') {
631
+ content = String(locales.getText('pisell2.scan.order.resource.status.exception') || '');
632
+ } else {
633
+ content = String(locales.getText('pisell2.scan.order.store.status.exception') || '');
634
+ }
459
635
  }
460
- });
461
- case 54:
636
+ Modal.info({
637
+ title: locales.getText('pisell2.scan.order.step.error'),
638
+ content: resolveLocalizedText(content).trim(),
639
+ okText: String(locales.getText('pisell2.event.confirm') || 'OK'),
640
+ maskClosable: false,
641
+ onOk: function onOk() {
642
+ location.replace('/');
643
+ }
644
+ });
645
+ }
646
+ case 48:
462
647
  case "end":
463
- return _context3.stop();
648
+ return _context6.stop();
464
649
  }
465
- }, _callee3);
650
+ }, _callee6);
466
651
  }));
467
652
  return function checkResourceAvailable() {
468
- return _ref5.apply(this, arguments);
653
+ return _ref8.apply(this, arguments);
469
654
  };
470
655
  }();
471
656
  // 等 ScanOrderProvider 的步骤缓存 hydrate 完成再跑,确保 gate 标记已就位
@@ -494,7 +679,9 @@ function ReadyState() {
494
679
  product: /*#__PURE__*/React.createElement(Menu, {
495
680
  onCheckout: function onCheckout() {
496
681
  return goToStep('check');
497
- }
682
+ },
683
+ productList: productList,
684
+ onEnsureProductList: ensureProductListLoaded
498
685
  }),
499
686
  check: /*#__PURE__*/React.createElement(Check, null),
500
687
  error: /*#__PURE__*/React.createElement(ErrorState, {
@@ -564,22 +751,22 @@ function ReadyState() {
564
751
 
565
752
  // 跳转到订单确认页
566
753
  var gotoCheckOrder = /*#__PURE__*/function () {
567
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
754
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
568
755
  var _otherParams$dineInCo;
569
- var firstFailure, failedProductIds, failureTips, otherParams, dineInConfig, isPauseOrder, _dineInConfig$availab;
570
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
571
- while (1) switch (_context4.prev = _context4.next) {
756
+ var firstFailure, failedProductIds, failureTips, otherParams, dineInConfig, isPauseOrder, _dineInConfig$availab, _scanOrderModule$setU2;
757
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
758
+ while (1) switch (_context7.prev = _context7.next) {
572
759
  case 0:
573
760
  if (!submitDisabledTips) {
574
- _context4.next = 3;
761
+ _context7.next = 3;
575
762
  break;
576
763
  }
577
764
  message.warning(submitDisabledTips, 2);
578
- return _context4.abrupt("return");
765
+ return _context7.abrupt("return");
579
766
  case 3:
580
767
  firstFailure = Array.isArray(cartValidation === null || cartValidation === void 0 ? void 0 : cartValidation.failures) ? cartValidation.failures[0] : null;
581
768
  if (!((cartValidation === null || cartValidation === void 0 ? void 0 : cartValidation.passed) === false)) {
582
- _context4.next = 10;
769
+ _context7.next = 10;
583
770
  break;
584
771
  }
585
772
  failedProductIds = getFirstFailedProductIds();
@@ -588,17 +775,17 @@ function ReadyState() {
588
775
  }
589
776
  failureTips = String((firstFailure === null || firstFailure === void 0 ? void 0 : firstFailure.validationMessage) || '').trim();
590
777
  message.warning(failureTips, 2);
591
- return _context4.abrupt("return");
778
+ return _context7.abrupt("return");
592
779
  case 10:
593
- _context4.next = 12;
780
+ _context7.next = 12;
594
781
  return runModuleAction('getOtherParams');
595
782
  case 12:
596
- otherParams = _context4.sent;
783
+ otherParams = _context7.sent;
597
784
  console.log('otherParams >>>>> ', otherParams);
598
785
  dineInConfig = (_otherParams$dineInCo = otherParams === null || otherParams === void 0 ? void 0 : otherParams.dineInConfig) !== null && _otherParams$dineInCo !== void 0 ? _otherParams$dineInCo : {};
599
786
  isPauseOrder = dineInConfig === null || dineInConfig === void 0 ? void 0 : dineInConfig['availability.paused']; // 如果暂停接单直接弹提示,点完确定回首页
600
787
  if (!isPauseOrder) {
601
- _context4.next = 19;
788
+ _context7.next = 19;
602
789
  break;
603
790
  }
604
791
  Modal.info({
@@ -609,28 +796,33 @@ function ReadyState() {
609
796
  location.replace('/');
610
797
  }
611
798
  });
612
- return _context4.abrupt("return");
799
+ return _context7.abrupt("return");
613
800
  case 19:
614
- // 需要先确认当前是否登录,如果没有则需要登录
615
- if (!isLogin) {
616
- openLoginModal({
617
- callback: function callback(status) {
618
- if (status === 'success') {
619
- goToStep('check');
620
- }
621
- }
622
- });
623
- } else {
624
- goToStep('check');
801
+ if (isLogin) {
802
+ _context7.next = 23;
803
+ break;
625
804
  }
626
- case 20:
805
+ // 登录前落盘跳转意图:弹窗 callback 能触发时由本函数消费,
806
+ // 整页跳转回流时由 Provider 的 hydrate 消费(参见 venueBooking 同名实现)
807
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$setU2 = scanOrderModule.setUIState) === null || _scanOrderModule$setU2 === void 0 || _scanOrderModule$setU2.call(scanOrderModule, 'pendingStep', 'check');
808
+ openLoginModal({
809
+ callback: function callback(status) {
810
+ var _scanOrderModule$dele3;
811
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele3 = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele3 === void 0 || _scanOrderModule$dele3.call(scanOrderModule, 'pendingStep');
812
+ if (status === 'success') goToStep('check');
813
+ }
814
+ });
815
+ return _context7.abrupt("return");
816
+ case 23:
817
+ goToStep('check');
818
+ case 24:
627
819
  case "end":
628
- return _context4.stop();
820
+ return _context7.stop();
629
821
  }
630
- }, _callee4);
822
+ }, _callee7);
631
823
  }));
632
824
  return function gotoCheckOrder() {
633
- return _ref6.apply(this, arguments);
825
+ return _ref9.apply(this, arguments);
634
826
  };
635
827
  }();
636
828
  var isMobileView = isMobile();