@pisell/private-materials 3.2.31 → 3.2.32

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 (160) 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 +5 -5
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/Sales/Event/index.js +7 -7
  12. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +37 -40
  13. package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -5
  14. package/es/components/appointmentBooking/components/Content/index.less +4 -0
  15. package/es/components/appointmentBooking/components/Header/index.js +56 -21
  16. package/es/components/appointmentBooking/components/Services/index.js +11 -3
  17. package/es/components/appointmentBooking/components/Services/index.less +1 -1
  18. package/es/components/appointmentBooking/context.d.ts +2 -2
  19. package/es/components/appointmentBooking/context.js +1 -1
  20. package/es/components/appointmentBooking/hooks.d.ts +13 -1
  21. package/es/components/appointmentBooking/hooks.js +83 -0
  22. package/es/components/appointmentBooking/index.d.ts +1 -0
  23. package/es/components/booking/addons/model.d.ts +10 -1
  24. package/es/components/booking/addons/model.js +5 -5
  25. package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
  26. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  27. package/es/components/booking/components/browserSelect/index.js +1 -1
  28. package/es/components/booking/components/footer/index.d.ts +1 -0
  29. package/es/components/booking/components/footer/index.js +3 -5
  30. package/es/components/booking/forms/model.d.ts +10 -1
  31. package/es/components/booking/forms/model.js +5 -5
  32. package/es/components/booking/info/index.d.ts +1 -0
  33. package/es/components/booking/info/model.d.ts +10 -1
  34. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  35. package/es/components/booking/info/service/like/index.js +1 -1
  36. package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  37. package/es/components/booking/info2/service/addTimeModal/index.js +2 -3
  38. package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +2 -4
  39. package/es/components/booking/info2/service/editService/index.js +11 -4
  40. package/es/components/booking/materiels/startTime/index.js +1 -1
  41. package/es/components/booking/model.d.ts +9 -1
  42. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  43. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  44. package/es/components/booking/notes/addNote/index.js +1 -1
  45. package/es/components/booking/notes/model.d.ts +10 -1
  46. package/es/components/booking/notes/model.js +5 -5
  47. package/es/components/booking/payments/model.d.ts +10 -1
  48. package/es/components/booking/payments/model.js +5 -5
  49. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  50. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  51. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  52. package/es/components/eftposPay/hooks.d.ts +1 -1
  53. package/es/components/eftposPay/index.d.ts +0 -1
  54. package/es/components/eftposPay/pay.d.ts +0 -1
  55. package/es/components/eftposPay/payo/config.d.ts +0 -1
  56. package/es/components/eftposPay/store/index.d.ts +1 -1
  57. package/es/components/listComponent/index.js +5 -5
  58. package/es/components/pay/toC/model.d.ts +9 -1
  59. package/es/components/productExtension/card/index.js +3 -3
  60. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  61. package/es/components/productExtension/fields/Forms/index.js +12 -12
  62. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  63. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  64. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  65. package/es/components/productExtension/server.js +2 -2
  66. package/es/components/ruleSetting/index.d.ts +0 -1
  67. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  68. package/es/components/schedules/calendar/index.js +4 -4
  69. package/es/components/schedules/calendar/serve.js +2 -2
  70. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  71. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  72. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  73. package/es/components/schedules/components/ResourceList/index.js +1 -1
  74. package/es/components/schedules/components/Search/index.js +5 -5
  75. package/es/components/schedules/model.d.ts +9 -1
  76. package/es/components/schedules/model.js +5 -5
  77. package/es/components/schedules/openHours/index.js +1 -1
  78. package/es/components/schedules/openHours/serve.js +2 -2
  79. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  80. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  81. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  82. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  83. package/es/components/schedules/products/serve.js +2 -2
  84. package/es/components/schedules/products/utils.js +5 -5
  85. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  86. package/es/components/schedules/resources/detail/index.js +10 -10
  87. package/es/components/schedules/resources/list/index.js +2 -2
  88. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  89. package/es/components/schedules/resources/serve.js +2 -2
  90. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  91. package/es/components/schedules/utils.d.ts +1 -1
  92. package/es/components/schedules/utils.js +4 -4
  93. package/es/components/selectModal/index.js +2 -2
  94. package/es/components/ticketBooking/data.d.ts +0 -0
  95. package/es/components/ticketBooking/data.js +82 -0
  96. package/es/components/ticketBooking/index.d.ts +3 -0
  97. package/es/components/ticketBooking/index.js +6 -0
  98. package/es/components/wallet/Detail/index.js +1 -1
  99. package/es/components/wallet/Detail/model.d.ts +13 -1
  100. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  101. package/es/components/wallet/PointCard/model.d.ts +13 -1
  102. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  103. package/es/components/wallet/Voucher/model.d.ts +13 -1
  104. package/es/components/wallet/components/WalletCard.js +1 -1
  105. package/es/components/wallet/model.d.ts +9 -1
  106. package/es/hooks/useComponents.js +1 -1
  107. package/es/utils/index.d.ts +1 -1
  108. package/lib/components/Sales/Event/index.js +1 -5
  109. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +19 -7
  110. package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -7
  111. package/lib/components/appointmentBooking/components/Content/index.less +4 -0
  112. package/lib/components/appointmentBooking/components/Header/index.js +10 -1
  113. package/lib/components/appointmentBooking/components/Services/index.js +10 -1
  114. package/lib/components/appointmentBooking/components/Services/index.less +1 -1
  115. package/lib/components/appointmentBooking/context.d.ts +2 -2
  116. package/lib/components/appointmentBooking/context.js +1 -1
  117. package/lib/components/appointmentBooking/hooks.d.ts +13 -1
  118. package/lib/components/appointmentBooking/hooks.js +38 -0
  119. package/lib/components/appointmentBooking/index.d.ts +1 -0
  120. package/lib/components/booking/addons/model.d.ts +10 -1
  121. package/lib/components/booking/components/footer/index.d.ts +1 -0
  122. package/lib/components/booking/components/footer/index.js +5 -7
  123. package/lib/components/booking/forms/model.d.ts +10 -1
  124. package/lib/components/booking/info/index.d.ts +1 -0
  125. package/lib/components/booking/info/model.d.ts +10 -1
  126. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  127. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  128. package/lib/components/booking/info2/service/addTimeModal/index.js +3 -4
  129. package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +1 -2
  130. package/lib/components/booking/info2/service/editService/index.js +11 -4
  131. package/lib/components/booking/model.d.ts +9 -1
  132. package/lib/components/booking/notes/model.d.ts +10 -1
  133. package/lib/components/booking/payments/model.d.ts +10 -1
  134. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  135. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  136. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  137. package/lib/components/eftposPay/hooks.d.ts +1 -1
  138. package/lib/components/eftposPay/index.d.ts +0 -1
  139. package/lib/components/eftposPay/pay.d.ts +0 -1
  140. package/lib/components/eftposPay/payo/config.d.ts +0 -1
  141. package/lib/components/eftposPay/store/index.d.ts +1 -1
  142. package/lib/components/pay/toC/model.d.ts +9 -1
  143. package/lib/components/ruleSetting/index.d.ts +0 -1
  144. package/lib/components/schedules/model.d.ts +9 -1
  145. package/lib/components/schedules/utils.d.ts +1 -1
  146. package/lib/components/schedules/utils.js +1 -1
  147. package/lib/components/ticketBooking/data.d.ts +0 -0
  148. package/lib/components/ticketBooking/data.js +0 -0
  149. package/lib/components/ticketBooking/index.d.ts +3 -0
  150. package/lib/components/ticketBooking/index.js +28 -0
  151. package/lib/components/wallet/Detail/index.js +1 -1
  152. package/lib/components/wallet/Detail/model.d.ts +13 -1
  153. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  154. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  155. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  156. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  157. package/lib/components/wallet/components/WalletCard.js +1 -1
  158. package/lib/components/wallet/model.d.ts +9 -1
  159. package/lib/utils/index.d.ts +1 -1
  160. package/package.json +4 -4
@@ -56,10 +56,14 @@ var ContinueButton = () => {
56
56
  resourceOtherParams,
57
57
  summary
58
58
  } = (0, import_context.useAppointmentBookingContext)();
59
- const { getResourceTimeSlot, getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
59
+ const {
60
+ getResourceTimeSlot,
61
+ getResourceList,
62
+ autoSelectAllProductResources
63
+ } = (0, import_hooks.useAppointmentBookingResource)();
64
+ const { checkSkipResourceStep } = (0, import_hooks.useIsSkipResourceStep)();
65
+ const { getStepIndex } = (0, import_hooks.useAppointmentBookingStep)();
60
66
  const disabled = (0, import_react.useMemo)(() => {
61
- var _a2;
62
- const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
63
67
  if (!carts.length) return true;
64
68
  return false;
65
69
  }, [
@@ -74,7 +78,7 @@ var ContinueButton = () => {
74
78
  (_a2 = shopDiscount == null ? void 0 : shopDiscount.destroy) == null ? void 0 : _a2.call(shopDiscount);
75
79
  };
76
80
  const handleNextStep = async () => {
77
- var _a2, _b, _c;
81
+ var _a2, _b;
78
82
  if (isLastStep) {
79
83
  setLoading(true);
80
84
  try {
@@ -109,14 +113,12 @@ var ContinueButton = () => {
109
113
  if (((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-resource") {
110
114
  getResourceTimeSlot();
111
115
  }
112
- if (((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) === "select-time") {
113
- }
114
116
  return appointmentBooking.next();
115
117
  };
116
118
  const handleContinue = async () => {
117
119
  var _a2;
118
120
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
119
- console.log(currentStep, isLastStep, isLogin, "wh9896788222");
121
+ console.log(currentStep, isLastStep, isLogin, accountLists, "wh9896788222");
120
122
  if (isLastStep) {
121
123
  if (!isLogin) {
122
124
  return openLoginModal({
@@ -133,6 +135,16 @@ var ContinueButton = () => {
133
135
  });
134
136
  }
135
137
  }
138
+ if (key === "select-date") {
139
+ const skipResourceStep = await checkSkipResourceStep();
140
+ if (skipResourceStep) {
141
+ const index = getStepIndex("next", 2);
142
+ getResourceList();
143
+ autoSelectAllProductResources();
144
+ appointmentBooking.gotoStep(index);
145
+ return;
146
+ }
147
+ }
136
148
  if (key === "select-resource" && (0, import_utils2.isEmptyCartsResourceId)(carts)) {
137
149
  (0, import_materials.PisellToast)({
138
150
  content: import_utils.locales.getText("pisell2.appointment.no.available.time")
@@ -45,7 +45,7 @@ var import_Total = __toESM(require("./Total"));
45
45
  var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
46
46
  var import_index = require("./index.less");
47
47
  var CartItem = ({ onConfirm }) => {
48
- var _a, _b, _c;
48
+ var _a, _b, _c, _d;
49
49
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
50
50
  const {
51
51
  carts,
@@ -66,10 +66,8 @@ var CartItem = ({ onConfirm }) => {
66
66
  const holders = (0, import_react.useMemo)(() => {
67
67
  return (0, import_utils2.formatHolder)(accountLists);
68
68
  }, [accountLists]);
69
- const hasGoodPassApp = (0, import_react.useMemo)(() => {
70
- var _a2;
71
- return !!((_a2 = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _a2.call(businessUtils, "goodpass"));
72
- }, []);
69
+ const hasGoodPassApp = !!((_b = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _b.call(businessUtils, "goodpass"));
70
+ console.log("has goodpass app:", hasGoodPassApp);
73
71
  const handleClickCard = (e, type, val) => {
74
72
  if (type === "note") {
75
73
  return appointmentBooking.updateCart({
@@ -107,8 +105,8 @@ var CartItem = ({ onConfirm }) => {
107
105
  hideAddBtn: false,
108
106
  holders,
109
107
  disabledEdit: isLastStep,
110
- isShowChangeResource: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-resource",
111
- isShowDelete: ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) === "select-service",
108
+ isShowChangeResource: ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) === "select-resource",
109
+ isShowDelete: ((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-service",
112
110
  isShowPackageNote: false
113
111
  },
114
112
  collapseParams: {
@@ -59,6 +59,10 @@
59
59
  }
60
60
  }
61
61
 
62
+ .appointment-service-search-wrap {
63
+ padding: 20px 20px 0 !important;
64
+ }
65
+
62
66
  .provider-information-wrap {
63
67
  width: 100%;
64
68
  }
@@ -44,6 +44,8 @@ var Header = () => {
44
44
  const { currentStep, appointmentBooking, resources, setTimes } = (0, import_context.useAppointmentBookingContext)();
45
45
  const shopDiscount = (0, import_hooks.useShopDiscount)();
46
46
  const context = (0, import_useEngineContext.default)();
47
+ const { checkSkipResourceStep } = (0, import_hooks.useIsSkipResourceStep)();
48
+ const { getStepIndex } = (0, import_hooks.useAppointmentBookingStep)();
47
49
  const stepName = (0, import_react.useMemo)(() => {
48
50
  var _a2, _b2, _c, _d, _e;
49
51
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
@@ -53,7 +55,7 @@ var Header = () => {
53
55
  }
54
56
  return (_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.description;
55
57
  }, [(_a = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a.key, resources]);
56
- const handleBack = () => {
58
+ const handleBack = async () => {
57
59
  var _a2;
58
60
  const key = (_a2 = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _a2.key;
59
61
  const types = {
@@ -68,6 +70,13 @@ var Header = () => {
68
70
  }
69
71
  if (key === "select-time") {
70
72
  setTimes([]);
73
+ const skipResourceStep = await checkSkipResourceStep();
74
+ if (skipResourceStep) {
75
+ appointmentBooking.deleteCartItemInfo("resource");
76
+ const index = getStepIndex("prev", 2);
77
+ appointmentBooking.gotoStep(index);
78
+ return;
79
+ }
71
80
  }
72
81
  appointmentBooking.back();
73
82
  };
@@ -54,6 +54,8 @@ var Services = () => {
54
54
  const { productModuleParams } = appointmentBooking.otherParams || {};
55
55
  appointmentBooking.loadProducts(productModuleParams).then((res) => {
56
56
  setProducts(res || []);
57
+ }).catch(() => {
58
+ setProducts([]);
57
59
  });
58
60
  }, []);
59
61
  const handleSelectProduct = (item) => {
@@ -106,7 +108,14 @@ var Services = () => {
106
108
  setSearch(e.target.value);
107
109
  }
108
110
  }
109
- )), (products == null ? void 0 : products.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(
111
+ )), !products ? /* @__PURE__ */ import_react.default.createElement(
112
+ import_antd.Skeleton,
113
+ {
114
+ loading: true,
115
+ active: true,
116
+ style: { padding: (0, import_utils.isMobile)() ? "20px" : 0 }
117
+ }
118
+ ) : (products == null ? void 0 : products.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(
110
119
  import_TabProduct.default,
111
120
  {
112
121
  list: renderList,
@@ -3,7 +3,7 @@
3
3
  top: 0;
4
4
  position: sticky;
5
5
  z-index: 2;
6
- padding: 16px !important;
6
+ padding: 16px 0 !important;
7
7
  margin: 0;
8
8
  .pisell-lowcode-input-affix-wrapper {
9
9
  margin: 0 !important;
@@ -5,10 +5,10 @@ interface AppointmentBookingContextType {
5
5
  resources: any[];
6
6
  setTimes: (times: any[]) => void;
7
7
  setResources: (lists: any[]) => void;
8
- products: any[];
8
+ products: any;
9
9
  carts: any[];
10
10
  summary: any;
11
- setProducts: (val: any[]) => void;
11
+ setProducts: (val: any) => void;
12
12
  setCarts: (val: any[]) => void;
13
13
  setSummary: (val: any) => void;
14
14
  currentStep: any;
@@ -42,7 +42,7 @@ var AppointmentBookingProvider = ({
42
42
  }) => {
43
43
  var _a;
44
44
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
45
- const [products, setProducts] = (0, import_react.useState)([]);
45
+ const [products, setProducts] = (0, import_react.useState)();
46
46
  const [summary, setSummary] = (0, import_react.useState)({});
47
47
  const [times, setTimes] = (0, import_react.useState)([]);
48
48
  const [resources, setResources] = (0, import_react.useState)([]);
@@ -7,7 +7,9 @@ export declare const useShopDiscount: () => any;
7
7
  * @Author: WangHan
8
8
  * @Date: 2025-04-15 11:11
9
9
  */
10
- export declare const useAppointmentBookingStep: () => void;
10
+ export declare const useAppointmentBookingStep: () => {
11
+ getStepIndex: (type: string, skipNumber?: number) => any;
12
+ };
11
13
  /**
12
14
  * @title: 获取商品数据
13
15
  * @description:
@@ -62,3 +64,13 @@ export declare const useAppointmentBookingResource: () => {
62
64
  };
63
65
  autoSelectAllProductResources: (index?: number) => Promise<any>;
64
66
  };
67
+ /**
68
+ * @title: 是否跳过资源选择步骤
69
+ * @description:
70
+ * @return {*}
71
+ * @Author: WangHan
72
+ * @Date: 2025-04-21 11:47
73
+ */
74
+ export declare const useIsSkipResourceStep: () => {
75
+ checkSkipResourceStep: () => Promise<boolean>;
76
+ };
@@ -36,6 +36,7 @@ __export(hooks_exports, {
36
36
  useAppointmentBookingProduct: () => useAppointmentBookingProduct,
37
37
  useAppointmentBookingResource: () => useAppointmentBookingResource,
38
38
  useAppointmentBookingStep: () => useAppointmentBookingStep,
39
+ useIsSkipResourceStep: () => useIsSkipResourceStep,
39
40
  useShopDiscount: () => useShopDiscount
40
41
  });
41
42
  module.exports = __toCommonJS(hooks_exports);
@@ -73,6 +74,19 @@ var useAppointmentBookingStep = () => {
73
74
  }
74
75
  );
75
76
  }, []);
77
+ const getStepIndex = (type, skipNumber = 0) => {
78
+ const currentStep = appointmentBooking.getCurrentStep();
79
+ const index = (currentStep == null ? void 0 : currentStep.index) || 1;
80
+ if (type === "next") {
81
+ const nextIndex = index + skipNumber;
82
+ return nextIndex + 1 > stepList.length ? stepList.length - 1 : nextIndex;
83
+ }
84
+ if (type === "prev") {
85
+ const prevIndex = index - skipNumber;
86
+ return prevIndex < 1 ? 1 : prevIndex;
87
+ }
88
+ };
89
+ return { getStepIndex };
76
90
  };
77
91
  var useAppointmentBookingProduct = () => {
78
92
  const { appointmentBooking, setProducts } = (0, import_context.useAppointmentBookingContext)();
@@ -180,6 +194,29 @@ var useAppointmentBookingResource = () => {
180
194
  };
181
195
  return { getResourceTimeSlot, getResourceList, autoSelectAllProductResources };
182
196
  };
197
+ var useIsSkipResourceStep = () => {
198
+ const { accountLists } = useAppointmentBookingAccount();
199
+ const { getResourceList, autoSelectAllProductResources } = useAppointmentBookingResource();
200
+ const checkSkipResourceStep = async () => {
201
+ var _a, _b, _c, _d, _e;
202
+ try {
203
+ if ((accountLists == null ? void 0 : accountLists.length) === 1) {
204
+ const res = await autoSelectAllProductResources();
205
+ const { resources } = getResourceList();
206
+ if (!((_a = res == null ? void 0 : res.errorList) == null ? void 0 : _a.length) && ((_e = (_d = (_c = (_b = resources == null ? void 0 : resources[0]) == null ? void 0 : _b.resources) == null ? void 0 : _c[0]) == null ? void 0 : _d.renderList) == null ? void 0 : _e.length) === 1) {
207
+ return true;
208
+ } else {
209
+ return false;
210
+ }
211
+ } else {
212
+ return false;
213
+ }
214
+ } catch (error) {
215
+ return false;
216
+ }
217
+ };
218
+ return { checkSkipResourceStep };
219
+ };
183
220
  // Annotate the CommonJS export names for ESM import in node:
184
221
  0 && (module.exports = {
185
222
  useAppointmentBooking,
@@ -189,5 +226,6 @@ var useAppointmentBookingResource = () => {
189
226
  useAppointmentBookingProduct,
190
227
  useAppointmentBookingResource,
191
228
  useAppointmentBookingStep,
229
+ useIsSkipResourceStep,
192
230
  useShopDiscount
193
231
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const AppointmentBooking: () => JSX.Element;
3
4
  export default AppointmentBooking;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  /**
3
4
  * @title: 底部
@@ -51,7 +51,7 @@ var import_serve2 = require("./serve");
51
51
  var import_utils4 = require("./utils");
52
52
  var import_voucher = __toESM(require("../voucher"));
53
53
  var Footer = (props) => {
54
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
54
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
55
55
  const { state, buttons, dispatch, source } = props;
56
56
  const [showDetail, setShowDetail] = (0, import_react.useState)(false);
57
57
  const [loading, setLoading] = (0, import_react.useState)(false);
@@ -189,10 +189,8 @@ var Footer = (props) => {
189
189
  }
190
190
  return false;
191
191
  }, [state, params]);
192
- const hasGoodPassApp = (0, import_react.useMemo)(() => {
193
- var _a2;
194
- return !!((_a2 = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _a2.call(businessUtils, "goodpass"));
195
- }, []);
192
+ const hasGoodPassApp = !!((_h = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _h.call(businessUtils, "goodpass"));
193
+ console.log("has goodpass app:", hasGoodPassApp);
196
194
  const goCheckout = async (order_id) => {
197
195
  var _a2, _b2;
198
196
  if (isTerminal == null ? void 0 : isTerminal()) {
@@ -753,7 +751,7 @@ var Footer = (props) => {
753
751
  }, [
754
752
  state.bookingId,
755
753
  state.bookingDetail,
756
- (_h = state.addons) == null ? void 0 : _h.load,
754
+ (_i = state.addons) == null ? void 0 : _i.load,
757
755
  state.renderType
758
756
  ]);
759
757
  const menuChange = (e) => {
@@ -814,7 +812,7 @@ var Footer = (props) => {
814
812
  },
815
813
  /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-border" }),
816
814
  /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, import_utils.locales.getText("pisell1.text.subtotal")), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.productAmount, 2, (state == null ? void 0 : state.amountSymbol) || "$"))),
817
- (((_i = state.bookingDetail) == null ? void 0 : _i.surcharge) || []).map((d) => {
815
+ (((_j = state.bookingDetail) == null ? void 0 : _j.surcharge) || []).map((d) => {
818
816
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item", key: d.id }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, d.name[state.locale]), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(d.amount, 2, (state == null ? void 0 : state.amountSymbol) || "$")));
819
817
  }),
820
818
  state.bookingId ? /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-label" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, import_utils.locales.getText("pisell1.text.tax")), /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { fontSize: 14 } }, taxText)), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.tax, 2, (state == null ? void 0 : state.amountSymbol) || "$"))) : null,
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InfoProps } from './main';
2
3
  declare const APP: (props: InfoProps) => JSX.Element;
3
4
  export default APP;
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import './index.less';
4
3
  interface AddServiceProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../../../info/service/addTimeModal/index.less';
2
3
  declare const AddTimeModal: () => JSX.Element;
3
4
  export default AddTimeModal;
@@ -118,14 +118,13 @@ var AddTimeModal = () => {
118
118
  arr = [
119
119
  ...arr,
120
120
  ...resource[form_id].map((d) => {
121
- var _a3;
122
- return (_a3 = state.service.cacheItem) == null ? void 0 : _a3._data.resourceMaps[form_id].renderListMaps[d.relation_id];
121
+ var _a3, _b3, _c2, _d2;
122
+ return (_d2 = (_c2 = (_b3 = (_a3 = state.service.cacheItem) == null ? void 0 : _a3._data.resourceMaps) == null ? void 0 : _b3[form_id]) == null ? void 0 : _c2.renderListMaps) == null ? void 0 : _d2[d.relation_id];
123
123
  })
124
124
  ];
125
125
  }
126
- return arr;
126
+ return arr.filter(Boolean);
127
127
  }, [(_f = (_e = (_d = state.service) == null ? void 0 : _d.cacheItem) == null ? void 0 : _e._extend) == null ? void 0 : _f.resource]);
128
- console.log("currentResource", currentResource);
129
128
  const getTimeUsableStatus = (time) => {
130
129
  var _a2, _b2;
131
130
  if (!((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend) || !currentResource.length) {
@@ -45,8 +45,7 @@ var MaxLengthSelect = (props, ref) => {
45
45
  {
46
46
  ...props,
47
47
  onChange: handleChange,
48
- popupMatchSelectWidth: false,
49
- getPopupContainer: () => document.querySelector("#main") || document.body
48
+ popupMatchSelectWidth: false
50
49
  },
51
50
  props.children
52
51
  );
@@ -309,15 +309,14 @@ var Info = (_, ref) => {
309
309
  value: item._extend.other
310
310
  },
311
311
  callback: (e2, extension_type, detail) => {
312
+ var _a2;
312
313
  const _detail = detail || item;
313
314
  let cacheItem = {
315
+ ...item,
314
316
  ..._detail,
315
317
  product_id: item.id,
316
318
  _id: item == null ? void 0 : item._id,
317
319
  _key: e2.key,
318
- _data: {
319
- ...item._data
320
- },
321
320
  _extend: {
322
321
  ...item._extend,
323
322
  // 将当前表单的值覆盖进去
@@ -329,6 +328,13 @@ var Info = (_, ref) => {
329
328
  };
330
329
  let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
331
330
  cacheItem._extend.total = _total;
331
+ try {
332
+ cacheItem._extend.capacity = (0, import_utils4.setDefaultCapacitys)({
333
+ capacitys: cacheItem._data.capacitys,
334
+ cacheItem
335
+ });
336
+ } catch (err) {
337
+ }
332
338
  cacheItem._extend.origin_total = _total;
333
339
  dispatch({
334
340
  type: "setService",
@@ -337,7 +343,8 @@ var Info = (_, ref) => {
337
343
  }
338
344
  });
339
345
  form.setFieldsValue({
340
- total: _total
346
+ total: _total,
347
+ capacity: (_a2 = cacheItem._extend) == null ? void 0 : _a2.capacity
341
348
  });
342
349
  }
343
350
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -104,4 +105,11 @@ export declare const walkInData: {
104
105
  id: number;
105
106
  nickname: string;
106
107
  };
107
- export declare const Provider: any, Context: any;
108
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
109
+ state: FormState;
110
+ } & {
111
+ dispatch: (params: {
112
+ type: string;
113
+ payload: any;
114
+ }) => void;
115
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionProps } from '../../const';
3
2
  declare const _default: ({ className, isMobile, onChange }: ActionProps) => JSX.Element;
4
3
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionProps } from '../../const';
3
2
  declare const _default: ({ onChange, className, isMobile }: ActionProps) => JSX.Element;
4
3
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionProps } from '../../const';
3
2
  /**
4
3
  * @title: 支付状态未知页面
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
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<"stripe" | "tyro" | "windcave" | "payo">;
22
+ readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "payo" | "stripe">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PosProps } from './const';
3
2
  import './index.less';
4
3
  declare const _default: (props: PosProps) => JSX.Element | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PayProps } from './const';
3
2
  import './index.less';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StatusEnum } from '../const';
3
2
  export declare const POS: ({ api, onChange, }: {
4
3
  api: {
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "tyro" | "windcave" | "payo" | undefined;
300
+ eftpos?: "tyro" | "windcave" | "payo" | "stripe" | undefined;
301
301
  action?: "amount" | "deviceList" | "pay" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -24,4 +25,11 @@ export interface PayGroup {
24
25
  pay_number?: string;
25
26
  _order: any;
26
27
  }
27
- export declare const Provider: any, Context: any;
28
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
29
+ state: FormState;
30
+ } & {
31
+ dispatch: (params: {
32
+ type: string;
33
+ payload: any;
34
+ }) => void;
35
+ }>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface RuleSettingProps {
4
3
  value: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem, ScheduleItem } from "./type";
2
3
  import dayjs from "dayjs";
3
4
  export interface FormState {
@@ -68,4 +69,11 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: any, Context: any;
72
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
+ state: FormState;
74
+ } & {
75
+ dispatch: (params: {
76
+ type: string;
77
+ payload: any;
78
+ }) => void;
79
+ }>;
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -27,8 +27,8 @@ __export(utils_exports, {
27
27
  module.exports = __toCommonJS(utils_exports);
28
28
  var import_utils = require("@pisell/utils");
29
29
  var Request = class {
30
- request = {};
31
30
  constructor() {
31
+ this.request = {};
32
32
  }
33
33
  setRequest(val) {
34
34
  this.request = val;
File without changes
File without changes