@pisell/private-materials 3.3.33 → 3.3.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) 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 +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +25 -4
  12. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/components/Cart/Item/index.js +25 -45
  15. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  16. package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
  17. package/es/components/appointmentBooking/components/Content/index.js +36 -53
  18. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  19. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  20. package/es/components/appointmentBooking/components/Form/index.js +161 -61
  21. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  22. package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
  23. package/es/components/appointmentBooking/components/Header/index.js +50 -64
  24. package/es/components/appointmentBooking/components/Resource/index.js +102 -119
  25. package/es/components/appointmentBooking/components/TimeSlicing/index.js +12 -5
  26. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  27. package/es/components/appointmentBooking/context.js +3 -43
  28. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  29. package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
  30. package/es/components/appointmentBooking/hooks.d.ts +3 -2
  31. package/es/components/appointmentBooking/hooks.js +209 -293
  32. package/es/components/appointmentBooking/index.d.ts +1 -0
  33. package/es/components/appointmentBooking/utils.d.ts +2 -88
  34. package/es/components/appointmentBooking/utils.js +63 -325
  35. package/es/components/booking/addons/model.js +5 -5
  36. package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
  37. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  38. package/es/components/booking/components/browserSelect/index.js +1 -1
  39. package/es/components/booking/components/footer/index.d.ts +1 -0
  40. package/es/components/booking/components/voucher/index.d.ts +0 -1
  41. package/es/components/booking/deposit/index.d.ts +1 -0
  42. package/es/components/booking/forms/model.js +5 -5
  43. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  44. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  45. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  46. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  47. package/es/components/booking/info/index.d.ts +1 -0
  48. package/es/components/booking/info/service/Lists.d.ts +1 -0
  49. package/es/components/booking/info/service/addService/index.d.ts +1 -0
  50. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  51. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  52. package/es/components/booking/info/service/like/index.js +1 -1
  53. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  54. package/es/components/booking/info/utils.js +1 -1
  55. package/es/components/booking/info2/service/addService/index.d.ts +1 -0
  56. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  57. package/es/components/booking/materiels/startTime/index.js +1 -1
  58. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  59. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  60. package/es/components/booking/notes/model.js +5 -5
  61. package/es/components/booking/payments/model.js +5 -5
  62. package/es/components/eftposPay/amount.d.ts +1 -1
  63. package/es/components/eftposPay/device.d.ts +1 -1
  64. package/es/components/eftposPay/hooks.d.ts +1 -1
  65. package/es/components/eftposPay/store/index.d.ts +3 -3
  66. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  67. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  68. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  69. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  70. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  71. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  72. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  73. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  74. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  75. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  76. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  77. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  78. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  79. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  80. package/es/components/eventBooking/index.d.ts +1 -0
  81. package/es/components/listComponent/index.js +5 -5
  82. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  83. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  84. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  85. package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
  86. package/es/components/productExtension/card/index.js +3 -3
  87. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  88. package/es/components/productExtension/fields/Forms/index.js +12 -12
  89. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  90. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  91. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  92. package/es/components/productExtension/server.js +2 -2
  93. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
  94. package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
  95. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  96. package/es/components/schedules/calendar/index.js +4 -4
  97. package/es/components/schedules/calendar/serve.js +2 -2
  98. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  99. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  100. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  101. package/es/components/schedules/components/ResourceList/index.js +1 -1
  102. package/es/components/schedules/components/Search/index.js +5 -5
  103. package/es/components/schedules/model.js +5 -5
  104. package/es/components/schedules/openHours/index.js +1 -1
  105. package/es/components/schedules/openHours/serve.js +2 -2
  106. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  107. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  108. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  109. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  110. package/es/components/schedules/products/serve.js +2 -2
  111. package/es/components/schedules/products/utils.js +5 -5
  112. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  113. package/es/components/schedules/resources/detail/index.js +10 -10
  114. package/es/components/schedules/resources/list/index.js +2 -2
  115. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  116. package/es/components/schedules/resources/serve.js +2 -2
  117. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  118. package/es/components/schedules/utils.d.ts +1 -1
  119. package/es/components/schedules/utils.js +4 -4
  120. package/es/components/selectModal/index.js +2 -2
  121. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  122. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  123. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  124. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  125. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  126. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  127. package/es/hooks/useComponents.js +1 -1
  128. package/es/utils/index.d.ts +1 -1
  129. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +5 -0
  130. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  131. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  132. package/lib/components/appointmentBooking/components/Cart/Item/index.js +9 -33
  133. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  134. package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
  135. package/lib/components/appointmentBooking/components/Content/index.js +21 -35
  136. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  137. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  138. package/lib/components/appointmentBooking/components/Form/index.js +98 -54
  139. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  140. package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
  141. package/lib/components/appointmentBooking/components/Header/index.js +20 -39
  142. package/lib/components/appointmentBooking/components/Resource/index.js +59 -41
  143. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -1
  144. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  145. package/lib/components/appointmentBooking/context.js +4 -48
  146. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  147. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
  148. package/lib/components/appointmentBooking/hooks.d.ts +3 -2
  149. package/lib/components/appointmentBooking/hooks.js +57 -143
  150. package/lib/components/appointmentBooking/index.d.ts +1 -0
  151. package/lib/components/appointmentBooking/utils.d.ts +2 -88
  152. package/lib/components/appointmentBooking/utils.js +51 -191
  153. package/lib/components/booking/components/footer/index.d.ts +1 -0
  154. package/lib/components/booking/components/voucher/index.d.ts +0 -1
  155. package/lib/components/booking/deposit/index.d.ts +1 -0
  156. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  157. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  158. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  159. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  160. package/lib/components/booking/info/index.d.ts +1 -0
  161. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  162. package/lib/components/booking/info/service/addService/index.d.ts +1 -0
  163. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  164. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  165. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  166. package/lib/components/booking/info/utils.js +1 -1
  167. package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
  168. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  169. package/lib/components/eftposPay/amount.d.ts +1 -1
  170. package/lib/components/eftposPay/device.d.ts +1 -1
  171. package/lib/components/eftposPay/hooks.d.ts +1 -1
  172. package/lib/components/eftposPay/store/index.d.ts +3 -3
  173. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  174. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  175. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  176. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  177. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  178. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  179. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  180. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  181. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  182. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  183. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  184. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  185. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  186. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  187. package/lib/components/eventBooking/index.d.ts +1 -0
  188. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  189. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  190. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  191. package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
  192. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
  193. package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
  194. package/lib/components/schedules/utils.d.ts +1 -1
  195. package/lib/components/schedules/utils.js +1 -1
  196. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  197. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  198. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  199. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  200. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  201. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  202. package/lib/utils/index.d.ts +1 -1
  203. package/package.json +4 -4
  204. package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  205. package/es/components/eventBooking/components/Provider/SelectProduct/index.js +0 -77
  206. package/es/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
  207. package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  208. package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +0 -69
  209. package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
@@ -102,20 +102,41 @@ var ContinueButton = function ContinueButton(_ref) {
102
102
  */
103
103
  var handleContinue = /*#__PURE__*/function () {
104
104
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
105
+ var loginOk;
105
106
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
106
107
  while (1) switch (_context2.prev = _context2.next) {
107
108
  case 0:
108
109
  _context2.prev = 0;
109
- return _context2.abrupt("return", onNext && onNext());
110
+ if (!((currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2 === (stepList === null || stepList === void 0 ? void 0 : stepList.length))) {
111
+ _context2.next = 9;
112
+ break;
113
+ }
114
+ _context2.next = 4;
115
+ return handleLoginCheck();
110
116
  case 4:
111
- _context2.prev = 4;
117
+ loginOk = _context2.sent;
118
+ if (loginOk) {
119
+ _context2.next = 7;
120
+ break;
121
+ }
122
+ return _context2.abrupt("return");
123
+ case 7:
124
+ if (!handleCheckAccount()) {
125
+ _context2.next = 9;
126
+ break;
127
+ }
128
+ return _context2.abrupt("return");
129
+ case 9:
130
+ return _context2.abrupt("return", onNext && onNext());
131
+ case 12:
132
+ _context2.prev = 12;
112
133
  _context2.t0 = _context2["catch"](0);
113
134
  console.log(_context2.t0, 'handleContinue_error');
114
- case 7:
135
+ case 15:
115
136
  case "end":
116
137
  return _context2.stop();
117
138
  }
118
- }, _callee2, null, [[0, 4]]);
139
+ }, _callee2, null, [[0, 12]]);
119
140
  }));
120
141
  return function handleContinue() {
121
142
  return _ref3.apply(this, arguments);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
4
3
  export default Total;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const CartItem: ({ onNext }: any) => JSX.Element;
3
4
  export default CartItem;
@@ -14,7 +14,7 @@ import ContinueButton from "../ContinueButton";
14
14
  import { useAppointmentBooking } from "../../../hooks";
15
15
  import { useAppointmentBookingContext } from "../../../context";
16
16
  import { useAppointmentBookingAccount, useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingLogin, contextUtils } from "../../../hooks";
17
- import { formatHolder, formatCurrentUser, openForm, getMultiResources, updateCartResources } from "../../../utils";
17
+ import { formatHolder, formatCarts, formatCurrentUser, openForm } from "../../../utils";
18
18
  import VoucherCard from "../../Voucher";
19
19
  import Total from "./Total";
20
20
  import Deposit from "../../Deposit";
@@ -24,26 +24,26 @@ var CartItem = function CartItem(_ref) {
24
24
  var _businessUtils$getApp, _currentStep$step, _currentStep$step2;
25
25
  var onNext = _ref.onNext;
26
26
  var appointmentBooking = useAppointmentBooking();
27
- var _ref2 = useAppointmentBookingContext(),
28
- carts = _ref2.carts,
29
- currentStep = _ref2.currentStep,
30
- setResourceOtherParams = _ref2.setResourceOtherParams,
31
- resourceOtherParams = _ref2.resourceOtherParams,
32
- summary = _ref2.summary,
33
- isLastStep = _ref2.isLastStep,
34
- currentSelectedResourcesRef = _ref2.currentSelectedResourcesRef,
35
- currentStepParams = _ref2.currentStepParams;
36
- var _useAppointmentBookin = useAppointmentBookingAccount(),
37
- accountLists = _useAppointmentBookin.accountLists,
38
- getHolders = _useAppointmentBookin.getHolders,
39
- addAccount = _useAppointmentBookin.addAccount;
40
- var _useAppointmentBookin2 = useAppointmentBookingResource(),
41
- getResourceList = _useAppointmentBookin2.getResourceList;
42
- var _useAppointmentBookin3 = useAppointmentBookingSetting(),
43
- isFormSubject = _useAppointmentBookin3.isFormSubject,
44
- bookingSubject = _useAppointmentBookin3.bookingSubject;
45
- var _useAppointmentBookin4 = useAppointmentBookingLogin(),
46
- isLogin = _useAppointmentBookin4.isLogin;
27
+ var _useAppointmentBookin = useAppointmentBookingContext(),
28
+ carts = _useAppointmentBookin.carts,
29
+ currentStep = _useAppointmentBookin.currentStep,
30
+ resources = _useAppointmentBookin.resources,
31
+ setResourceOtherParams = _useAppointmentBookin.setResourceOtherParams,
32
+ resourceOtherParams = _useAppointmentBookin.resourceOtherParams,
33
+ summary = _useAppointmentBookin.summary,
34
+ isLastStep = _useAppointmentBookin.isLastStep;
35
+ var _useAppointmentBookin2 = useAppointmentBookingAccount(),
36
+ accountLists = _useAppointmentBookin2.accountLists,
37
+ getHolders = _useAppointmentBookin2.getHolders,
38
+ form_id = _useAppointmentBookin2.form_id,
39
+ addAccount = _useAppointmentBookin2.addAccount;
40
+ var _useAppointmentBookin3 = useAppointmentBookingResource(),
41
+ getResourceList = _useAppointmentBookin3.getResourceList;
42
+ var _useAppointmentBookin4 = useAppointmentBookingSetting(),
43
+ isFormSubject = _useAppointmentBookin4.isFormSubject,
44
+ bookingSubject = _useAppointmentBookin4.bookingSubject;
45
+ var _useAppointmentBookin5 = useAppointmentBookingLogin(),
46
+ isLogin = _useAppointmentBookin5.isLogin;
47
47
  var utils = contextUtils();
48
48
  var businessUtils = utils.businessUtils;
49
49
  var deposit = summary.deposit;
@@ -113,7 +113,7 @@ var CartItem = function CartItem(_ref) {
113
113
  } else {
114
114
  appointmentBooking.updateCart({
115
115
  _id: e === null || e === void 0 ? void 0 : e._id,
116
- resources: val ? updateCartResources(e, val) : []
116
+ resources: val ? [val] : []
117
117
  });
118
118
  }
119
119
  getResourceList();
@@ -198,28 +198,8 @@ var CartItem = function CartItem(_ref) {
198
198
  }
199
199
  };
200
200
  var products = useMemo(function () {
201
- var _currentSelectedResou;
202
- console.log(currentSelectedResourcesRef.current, carts, 'wh867865');
203
- if (!(carts !== null && carts !== void 0 && carts.length)) return [];
204
- if ((currentSelectedResourcesRef === null || currentSelectedResourcesRef === void 0 || (_currentSelectedResou = currentSelectedResourcesRef.current) === null || _currentSelectedResou === void 0 ? void 0 : _currentSelectedResou.length) > 0) {
205
- var newCarts = carts.map(function (item) {
206
- var _currentResourceData$;
207
- var currentResourceData = currentSelectedResourcesRef.current.find(function (resource) {
208
- return (resource === null || resource === void 0 ? void 0 : resource._id) === (item === null || item === void 0 ? void 0 : item._id);
209
- });
210
-
211
- // 可选资源列表
212
- var multiResources = getMultiResources(item, currentResourceData === null || currentResourceData === void 0 || (_currentResourceData$ = currentResourceData.currentSelectedResource) === null || _currentResourceData$ === void 0 ? void 0 : _currentResourceData$.resourceItem, currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key);
213
- return _objectSpread(_objectSpread({}, item), {}, {
214
- isMultipleResource: true,
215
- multiResources: multiResources
216
- });
217
- });
218
- return newCarts;
219
- } else {
220
- return carts;
221
- }
222
- }, [carts, currentSelectedResourcesRef.current, currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key]);
201
+ return formatCarts(carts, resources, utils, accountLists);
202
+ }, [carts, resources, accountLists]);
223
203
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
224
204
  className: "appointment-cart-item-wrap ".concat(isMobile() ? 'appointment-cart-mobile-item-wrap' : '')
225
205
  }, /*#__PURE__*/React.createElement("div", {
@@ -230,7 +210,7 @@ var CartItem = function CartItem(_ref) {
230
210
  hideAddBtn: false,
231
211
  holders: holders,
232
212
  disabledEdit: isLastStep,
233
- isShowChangeResource: currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 || (_currentStep$step = _currentStep$step.key) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.startsWith('select-resource'),
213
+ isShowChangeResource: (currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key) === 'select-resource',
234
214
  isShowDelete: (currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key) === 'select-service',
235
215
  isShowPackageNote: false,
236
216
  isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Cart: ({ open, onCancel, onNext }: any) => JSX.Element;
4
3
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Layout: () => JSX.Element;
3
4
  export default Layout;
@@ -29,25 +29,26 @@ import "./index.less";
29
29
  var Layout = function Layout() {
30
30
  var _currentStep$step, _currentStep$step3, _currentStep$step4, _currentStep$step6, _currentStep$step8;
31
31
  var stepRef = useRef();
32
- var _ref = useAppointmentBookingContext(),
33
- currentStep = _ref.currentStep,
34
- setResourceOtherParams = _ref.setResourceOtherParams,
35
- resourceOtherParams = _ref.resourceOtherParams,
36
- setIsAgreeDepositPolicy = _ref.setIsAgreeDepositPolicy,
37
- appointmentBooking = _ref.appointmentBooking,
38
- setLoading = _ref.setLoading,
39
- policyParams = _ref.policyParams,
40
- closePolicy = _ref.closePolicy,
41
- currentStepParams = _ref.currentStepParams;
42
- var _useAppointmentBookin = useAppointmentBookingSetting(),
43
- isDateSelectedFirst = _useAppointmentBookin.isDateSelectedFirst,
44
- isFormSubject = _useAppointmentBookin.isFormSubject;
45
- var _useAppointmentBookin2 = useAppointmentBookingLogin(),
46
- isLogin = _useAppointmentBookin2.isLogin;
47
- var _useAppointmentBookin3 = useAppointmentBookingAccount(),
48
- getHolders = _useAppointmentBookin3.getHolders;
49
- var _useAppointmentBookin4 = useAppointmentBookingStep(),
50
- removeStep = _useAppointmentBookin4.removeStep;
32
+ var formRef = useRef();
33
+ var _useAppointmentBookin = useAppointmentBookingContext(),
34
+ currentStep = _useAppointmentBookin.currentStep,
35
+ setResourceOtherParams = _useAppointmentBookin.setResourceOtherParams,
36
+ resourceOtherParams = _useAppointmentBookin.resourceOtherParams,
37
+ setIsAgreeDepositPolicy = _useAppointmentBookin.setIsAgreeDepositPolicy,
38
+ appointmentBooking = _useAppointmentBookin.appointmentBooking,
39
+ setLoading = _useAppointmentBookin.setLoading,
40
+ policyParams = _useAppointmentBookin.policyParams,
41
+ closePolicy = _useAppointmentBookin.closePolicy;
42
+ var _useAppointmentBookin2 = useAppointmentBookingSetting(),
43
+ isDateSelectedFirst = _useAppointmentBookin2.isDateSelectedFirst,
44
+ isFormSubject = _useAppointmentBookin2.isFormSubject;
45
+ var _useAppointmentBookin3 = useAppointmentBookingLogin(),
46
+ isLogin = _useAppointmentBookin3.isLogin;
47
+ var _useAppointmentBookin4 = useAppointmentBookingAccount(),
48
+ getHolders = _useAppointmentBookin4.getHolders;
49
+ var _useAppointmentBookin5 = useAppointmentBookingStep(),
50
+ removeStep = _useAppointmentBookin5.removeStep,
51
+ stepList = _useAppointmentBookin5.stepList;
51
52
  var _useShopDiscount = useShopDiscount(),
52
53
  shopDiscount = _useShopDiscount.shopDiscount;
53
54
 
@@ -59,7 +60,6 @@ var Layout = function Layout() {
59
60
  params = _useState2[0],
60
61
  setParams = _useState2[1];
61
62
  useEffect(function () {
62
- appointmentBooking.removeStep('fill-form');
63
63
  return function () {
64
64
  var _shopDiscount$destroy;
65
65
  setIsAgreeDepositPolicy(false);
@@ -67,18 +67,6 @@ var Layout = function Layout() {
67
67
  shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$destroy = shopDiscount.destroy) === null || _shopDiscount$destroy === void 0 || _shopDiscount$destroy.call(shopDiscount);
68
68
  };
69
69
  }, []);
70
- useEffect(function () {
71
- var _currentStepParams$st;
72
- if ((currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.index) < 0) return;
73
- var resourceStepIndex = currentStepParams === null || currentStepParams === void 0 || (_currentStepParams$st = currentStepParams.stepLists) === null || _currentStepParams$st === void 0 ? void 0 : _currentStepParams$st.findIndex(function (item) {
74
- return item.key === 'select-resource';
75
- });
76
-
77
- // 清空当前所选择的资源
78
- if ((currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.index) < resourceStepIndex) {
79
- appointmentBooking.setOtherData('current_selected_resources', null);
80
- }
81
- }, [currentStepParams]);
82
70
  useEffect(function () {
83
71
  try {
84
72
  if (isFormSubject) {
@@ -112,38 +100,33 @@ var Layout = function Layout() {
112
100
  behavior: 'smooth'
113
101
  });
114
102
  }, [currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key]);
115
- var components = {
116
- // 选择服务
117
- 'select-service': Services,
118
- // 添加客户
119
- 'select-guest': Guest,
120
- // 选择时间
121
- 'select-date': Date,
122
- // 时间切片
123
- 'select-time': TimeSlicing,
124
- // 确认信息
125
- 'confirm-information': ConfirmInformation
126
- };
127
103
  var Com = useMemo(function () {
128
104
  var _currentStep$step2;
129
105
  var key = currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key;
130
106
  if (!key) return null;
131
- var Com;
132
- if (key.startsWith('select-resource')) {
107
+ var components = {
108
+ // 选择服务
109
+ 'select-service': Services,
110
+ // 添加客户
111
+ 'select-guest': Guest,
112
+ // 选择时间
113
+ 'select-date': Date,
133
114
  // 选择资源
134
- Com = Resource;
135
- } else if (key.startsWith('fill-form')) {
115
+ 'select-resource': Resource,
116
+ // 时间切片
117
+ 'select-time': TimeSlicing,
136
118
  // 填写表单
137
- Com = Form;
138
- } else {
139
- Com = components[key];
140
- }
119
+ 'fill-form': Form,
120
+ // 确认信息
121
+ 'confirm-information': ConfirmInformation
122
+ };
123
+ var Com = components[key];
141
124
  return /*#__PURE__*/React.createElement(Com, {
142
125
  onChange: setParams,
143
126
  params: params,
144
127
  ref: stepRef
145
128
  });
146
- }, [currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key]);
129
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key, stepRef]);
147
130
 
148
131
  /**
149
132
  * @title: 动态计算中间内容区域的高度
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Deposit: () => JSX.Element;
4
3
  export default Deposit;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
4
3
  export default Footer;
@@ -10,57 +10,122 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
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 _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; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import React, { useMemo, useRef, useState, useImperativeHandle, forwardRef } from 'react';
13
+ import React, { useMemo, useRef, useState, useImperativeHandle, forwardRef, useEffect } from 'react';
14
14
  import useComponents from "../../../../hooks/useComponents";
15
- import { updateBookingFormStorage, currentAppointmentBoard } from "../../utils";
15
+ import { formatForms, formatCarts, updateLists, updateBookingFormStorage } from "../../utils";
16
16
  import { useAppointmentBookingContext } from "../../context";
17
- import { useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingStep } from "../../hooks";
17
+ import { useAppointmentBookingResource, useAppointmentBookingSetting, useAppointmentBookingStep, contextUtils } from "../../hooks";
18
+ import PolicyModal from "../../deposit/components/PolicyModal";
18
19
  import "./index.less";
19
20
  var Form = /*#__PURE__*/forwardRef(function (props, ref) {
20
21
  var manualRef = useRef();
21
- var _useState = useState(false),
22
+ var _useState = useState(0),
22
23
  _useState2 = _slicedToArray(_useState, 2),
23
- isClearData = _useState2[0],
24
- setIsClearData = _useState2[1];
25
- var _ref = useAppointmentBookingContext(),
26
- appointmentBooking = _ref.appointmentBooking,
27
- setLoading = _ref.setLoading,
28
- currentStepParams = _ref.currentStepParams,
29
- currentSelectedResourcesRef = _ref.currentSelectedResourcesRef;
30
- var _useAppointmentBookin = useAppointmentBookingResource(),
31
- getResourceList = _useAppointmentBookin.getResourceList;
32
- var _useAppointmentBookin2 = useAppointmentBookingSetting(),
33
- setOtherData = _useAppointmentBookin2.setOtherData,
34
- getOtherData = _useAppointmentBookin2.getOtherData;
35
- var _useAppointmentBookin3 = useAppointmentBookingStep(),
36
- nextStep = _useAppointmentBookin3.nextStep;
24
+ currentFormIndex = _useState2[0],
25
+ setCurrentFormIndex = _useState2[1];
26
+ var _useState3 = useState(false),
27
+ _useState4 = _slicedToArray(_useState3, 2),
28
+ showAgreement = _useState4[0],
29
+ setShowAgreement = _useState4[1];
30
+ var _useState5 = useState({}),
31
+ _useState6 = _slicedToArray(_useState5, 2),
32
+ agreementContent = _useState6[0],
33
+ setAgreementContent = _useState6[1];
34
+ var _useState7 = useState([]),
35
+ _useState8 = _slicedToArray(_useState7, 2),
36
+ formStatus = _useState8[0],
37
+ setFormStatus = _useState8[1];
38
+ var _useState9 = useState(false),
39
+ _useState10 = _slicedToArray(_useState9, 2),
40
+ isClearData = _useState10[0],
41
+ setIsClearData = _useState10[1];
42
+ var _useState11 = useState(0),
43
+ _useState12 = _slicedToArray(_useState11, 2),
44
+ formId = _useState12[0],
45
+ setFormId = _useState12[1];
46
+ var _useAppointmentBookin = useAppointmentBookingContext(),
47
+ carts = _useAppointmentBookin.carts,
48
+ appointmentBooking = _useAppointmentBookin.appointmentBooking,
49
+ setLoading = _useAppointmentBookin.setLoading;
50
+ var _useAppointmentBookin2 = useAppointmentBookingResource(),
51
+ getResourceList = _useAppointmentBookin2.getResourceList;
52
+ var _useAppointmentBookin3 = useAppointmentBookingSetting(),
53
+ setOtherData = _useAppointmentBookin3.setOtherData,
54
+ getOtherData = _useAppointmentBookin3.getOtherData;
55
+ var _useAppointmentBookin4 = useAppointmentBookingStep(),
56
+ nextStep = _useAppointmentBookin4.nextStep;
57
+ var utils = contextUtils();
37
58
  useImperativeHandle(ref, function () {
38
59
  return {
39
60
  next: function next() {
40
61
  var _manualRef$current, _manualRef$current$su;
41
- debugger;
42
62
  setLoading(true);
43
63
  (_manualRef$current = manualRef.current) === null || _manualRef$current === void 0 || (_manualRef$current$su = _manualRef$current.submit) === null || _manualRef$current$su === void 0 || _manualRef$current$su.call(_manualRef$current);
44
64
  }
45
65
  };
46
66
  });
67
+ var key = 'booking_form';
68
+
69
+ // 获取本地存储
70
+ var formStorage = getOtherData('booking_form') || {};
71
+
72
+ /**
73
+ * @title: 获取资源列表
74
+ * @description:
75
+ * @param {*} useMemo
76
+ * @return {*}
77
+ * @Author: WangHan
78
+ * @Date: 2025-05-06 10:00
79
+ */
80
+ var resources = useMemo(function () {
81
+ var _resource = getResourceList();
82
+ return (_resource === null || _resource === void 0 ? void 0 : _resource.resources) || [];
83
+ }, []);
84
+ var forms = useMemo(function () {
85
+ var newCarts = formatCarts(carts, resources, utils);
86
+ if (!(newCarts !== null && newCarts !== void 0 && newCarts.length) || !(resources !== null && resources !== void 0 && resources.length)) return [];
87
+ return formatForms(newCarts) || [];
88
+ }, [carts, resources]);
89
+ useEffect(function () {
90
+ var _forms$currentFormInd;
91
+ if (!(forms !== null && forms !== void 0 && forms.length)) return;
92
+ setFormId((forms === null || forms === void 0 || (_forms$currentFormInd = forms[currentFormIndex]) === null || _forms$currentFormInd === void 0 ? void 0 : _forms$currentFormInd.form_id) || 0);
93
+ }, [forms, currentFormIndex]);
47
94
  var _useComponents = useComponents({
48
95
  components: ['FormCard']
49
96
  }),
50
97
  _useComponents2 = _slicedToArray(_useComponents, 1),
51
98
  FormCard = _useComponents2[0];
52
- var key = 'booking_form';
53
99
 
54
- // 获取本地存储
55
- var formStorage = getOtherData('booking_form') || {};
56
- var appointmentBoard = useMemo(function () {
57
- var _getResourceList = getResourceList(),
58
- resources = _getResourceList.resources;
59
- return currentAppointmentBoard(currentStepParams.key, resources, appointmentBooking);
60
- }, [currentStepParams.key]);
61
- var formId = useMemo(function () {
62
- return (appointmentBoard === null || appointmentBoard === void 0 ? void 0 : appointmentBoard.resource_form_id) || 0;
63
- }, [appointmentBoard === null || appointmentBoard === void 0 ? void 0 : appointmentBoard.resource_form_id]);
100
+ /**
101
+ * @title: 获取下一个表单
102
+ * @description:
103
+ * @return {*}
104
+ * @Author: WangHan
105
+ * @Date: 2025-04-26 11:04
106
+ */
107
+ var goToNextForm = function goToNextForm() {
108
+ var nextIndex = currentFormIndex + 1;
109
+ if (nextIndex < forms.length) {
110
+ var _forms$nextIndex, _forms$nextIndex2;
111
+ setIsClearData(true);
112
+ setCurrentFormIndex(nextIndex);
113
+
114
+ // 如果下一个表单没有id但有协议,直接弹协议
115
+ if (!(forms !== null && forms !== void 0 && (_forms$nextIndex = forms[nextIndex]) !== null && _forms$nextIndex !== void 0 && _forms$nextIndex.form_id) && forms !== null && forms !== void 0 && (_forms$nextIndex2 = forms[nextIndex]) !== null && _forms$nextIndex2 !== void 0 && _forms$nextIndex2.policy_id) {
116
+ var _forms$nextIndex3;
117
+ setLoading(true);
118
+ setAgreementContent({
119
+ id: forms === null || forms === void 0 || (_forms$nextIndex3 = forms[nextIndex]) === null || _forms$nextIndex3 === void 0 ? void 0 : _forms$nextIndex3.policy_id
120
+ });
121
+ setShowAgreement(true);
122
+ } else {
123
+ setLoading(false);
124
+ }
125
+ } else {
126
+ nextStep();
127
+ }
128
+ };
64
129
 
65
130
  /**
66
131
  * @title: 更新表单状态
@@ -74,6 +139,10 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
74
139
  if (status === 'error') {
75
140
  setLoading(false);
76
141
  }
142
+ var newFormStatus = updateLists(formStatus, 'id', formId, {
143
+ status: status
144
+ });
145
+ setFormStatus(newFormStatus);
77
146
  };
78
147
 
79
148
  /**
@@ -85,13 +154,15 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
85
154
  * @Date: 2025-04-28 11:32
86
155
  */
87
156
  var setFormStorage = function setFormStorage(values) {
157
+ var _forms$currentFormInd2;
158
+ var cart_id = forms === null || forms === void 0 || (_forms$currentFormInd2 = forms[currentFormIndex]) === null || _forms$currentFormInd2 === void 0 ? void 0 : _forms$currentFormInd2.cart_id;
88
159
  var oldData = getOtherData(key);
89
- var newData = updateBookingFormStorage(oldData, currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key, values);
160
+ var newData = updateBookingFormStorage(oldData, cart_id, values);
90
161
  setOtherData(key, _objectSpread({}, newData));
91
162
 
92
163
  // 更新表单购物车
93
164
  appointmentBooking.updateCart({
94
- _id: appointmentBoard === null || appointmentBoard === void 0 ? void 0 : appointmentBoard.cart_id,
165
+ _id: cart_id,
95
166
  relationForms: [{
96
167
  form_id: formId,
97
168
  form_record_ids: [values === null || values === void 0 ? void 0 : values.form_record_id]
@@ -109,40 +180,69 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
109
180
  * @Date: 2025-04-28 11:34
110
181
  */
111
182
  var handleFormFinish = function handleFormFinish(status, values) {
112
- try {
113
- setIsClearData(false);
114
- updateFormStatus(status);
115
- if (status === 'success') {
116
- setFormStorage(values);
117
- nextStep();
183
+ setIsClearData(false);
184
+ updateFormStatus(status);
185
+ if (status === 'success') {
186
+ var _forms$currentFormInd3;
187
+ setFormStorage(values);
188
+
189
+ // 判断当前表单是否有协议
190
+ if (forms !== null && forms !== void 0 && (_forms$currentFormInd3 = forms[currentFormIndex]) !== null && _forms$currentFormInd3 !== void 0 && _forms$currentFormInd3.policy_id) {
191
+ var _forms$currentFormInd4;
192
+ setAgreementContent({
193
+ id: forms === null || forms === void 0 || (_forms$currentFormInd4 = forms[currentFormIndex]) === null || _forms$currentFormInd4 === void 0 ? void 0 : _forms$currentFormInd4.policy_id
194
+ });
195
+ setShowAgreement(true);
196
+ } else {
197
+ goToNextForm();
118
198
  }
119
- } catch (error) {
120
- setLoading(false);
121
199
  }
122
200
  };
123
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
124
- className: "appointment-form-wrap"
125
- }, /*#__PURE__*/React.createElement(FormCard, {
126
- id: formId,
127
- ref: manualRef,
128
- isGetLastData: false,
129
- setting: {
130
- isHidden: 1
131
- },
132
- formWrapStyle: {
133
- padding: '16px'
201
+ var handleAgreementOk = function handleAgreementOk() {
202
+ setShowAgreement(false);
203
+ goToNextForm();
204
+ };
205
+ var formCom = useMemo(function () {
206
+ var _forms$currentFormInd5;
207
+ if (!formId) return;
208
+ return /*#__PURE__*/React.createElement("div", {
209
+ className: "appointment-form-wrap"
210
+ }, /*#__PURE__*/React.createElement(FormCard, {
211
+ id: formId,
212
+ ref: manualRef,
213
+ isGetLastData: false,
214
+ setting: {
215
+ isHidden: 1
216
+ },
217
+ formWrapStyle: {
218
+ padding: '16px'
219
+ },
220
+ isV2API: true,
221
+ isShowSkeleton: true,
222
+ onSubmit: function onSubmit(status, values) {
223
+ handleFormFinish(status, values);
224
+ },
225
+ onFinishFailed: function onFinishFailed(e) {
226
+ updateFormStatus('error');
227
+ },
228
+ onFormValueChange: function onFormValueChange(values) {},
229
+ defaultValues: (formStorage === null || formStorage === void 0 ? void 0 : formStorage[forms === null || forms === void 0 || (_forms$currentFormInd5 = forms[currentFormIndex]) === null || _forms$currentFormInd5 === void 0 ? void 0 : _forms$currentFormInd5.cart_id]) || {},
230
+ isClearData: false
231
+ }));
232
+ }, [currentFormIndex, formId]);
233
+ return /*#__PURE__*/React.createElement(React.Fragment, null, formCom, showAgreement ? /*#__PURE__*/React.createElement(PolicyModal, {
234
+ open: showAgreement,
235
+ onCancel: function onCancel() {
236
+ return setShowAgreement(false);
134
237
  },
135
- isV2API: true,
136
- isShowSkeleton: true,
137
- onSubmit: function onSubmit(status, values) {
138
- handleFormFinish(status, values);
238
+ onConfirm: function onConfirm() {
239
+ return handleAgreementOk();
139
240
  },
140
- onFinishFailed: function onFinishFailed(e) {
141
- updateFormStatus('error');
241
+ item: agreementContent,
242
+ onChange: function onChange() {
243
+ return setLoading(false);
142
244
  },
143
- onFormValueChange: function onFormValueChange(values) {},
144
- defaultValues: (formStorage === null || formStorage === void 0 ? void 0 : formStorage[currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key]) || {},
145
- isClearData: false
146
- })));
245
+ isHideCheckout: false
246
+ }) : null);
147
247
  });
148
248
  export default Form;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const GuestOptionsModal: (props: any) => JSX.Element;
4
3
  export default GuestOptionsModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Header: () => JSX.Element;
3
4
  export default Header;