@pisell/private-materials 3.3.49 → 3.3.51

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 (235) 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 +8 -8
  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 +7 -7
  11. package/es/businessModel/SalesModel/index.d.ts +1 -0
  12. package/es/components/appointmentBooking/assets/resource.svg +1 -0
  13. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
  15. package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
  16. package/es/components/appointmentBooking/components/Resource/index.js +44 -5
  17. package/es/components/appointmentBooking/hooks.js +218 -177
  18. package/es/components/appointmentBooking/index.d.ts +1 -0
  19. package/es/components/appointmentBooking/locales.d.ts +3 -0
  20. package/es/components/appointmentBooking/locales.js +9 -0
  21. package/es/components/booking/addons/model.d.ts +10 -1
  22. package/es/components/booking/addons/model.js +5 -5
  23. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  24. package/es/components/booking/components/TabProduct/productItem/index.js +14 -2
  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/drawer/index.js +4 -2
  29. package/es/components/booking/components/footer/index.d.ts +1 -0
  30. package/es/components/booking/components/voucher/index.js +25 -17
  31. package/es/components/booking/forms/model.d.ts +10 -1
  32. package/es/components/booking/forms/model.js +5 -5
  33. package/es/components/booking/info/client/index.js +2 -1
  34. package/es/components/booking/info/index.d.ts +1 -0
  35. package/es/components/booking/info/model.d.ts +10 -1
  36. package/es/components/booking/info/pet/index.js +3 -0
  37. package/es/components/booking/info/service/Lists.d.ts +1 -0
  38. package/es/components/booking/info/service/addService/index.d.ts +1 -0
  39. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  40. package/es/components/booking/info/service/like/index.js +1 -1
  41. package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
  42. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  43. package/es/components/booking/info/service2/utils.d.ts +1 -1
  44. package/es/components/booking/info/service2/utils.js +27 -27
  45. package/es/components/booking/info/utils.js +1 -1
  46. package/es/components/booking/info2/index.js +3 -3
  47. package/es/components/booking/info2/service/addService/utils.d.ts +3 -3
  48. package/es/components/booking/info2/service/addService/utils.js +48 -52
  49. package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  50. package/es/components/booking/info2/service/editService/index.js +1 -0
  51. package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
  52. package/es/components/booking/materiels/startTime/index.js +1 -1
  53. package/es/components/booking/model.d.ts +9 -1
  54. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  55. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  56. package/es/components/booking/notes/model.d.ts +10 -1
  57. package/es/components/booking/notes/model.js +5 -5
  58. package/es/components/booking/payments/model.d.ts +10 -1
  59. package/es/components/booking/payments/model.js +5 -5
  60. package/es/components/booking/utils.d.ts +2 -2
  61. package/es/components/eftposPay/amount.d.ts +1 -1
  62. package/es/components/eftposPay/device.d.ts +1 -1
  63. package/es/components/eftposPay/hooks.d.ts +1 -1
  64. package/es/components/eftposPay/store/index.d.ts +2 -2
  65. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  66. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  67. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  68. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +23 -4
  69. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  70. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  71. package/es/components/eventBooking/index.d.ts +1 -0
  72. package/es/components/listComponent/index.js +5 -5
  73. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  74. package/es/components/pay/toC/model.d.ts +9 -1
  75. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  76. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  77. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  78. package/es/components/productExtension/card/index.js +3 -3
  79. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  80. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  81. package/es/components/productExtension/fields/Forms/index.js +12 -12
  82. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
  83. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +18 -6
  84. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  85. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  86. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  87. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  88. package/es/components/productExtension/index.d.ts +1 -0
  89. package/es/components/productExtension/server.js +2 -2
  90. package/es/components/productSelect/components/TabProduct/index.js +28 -10
  91. package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  92. package/es/components/productSelect/components/TabProduct/tabs/index.js +243 -0
  93. package/es/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  94. package/es/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  95. package/es/components/productSelect/components/pisellPriceText/index.js +43 -0
  96. package/es/components/productSelect/components/productGroup/index.js +20 -7
  97. package/es/components/productSelect/components/productGroup/index.less +14 -1
  98. package/es/components/productSelect/index.less +1 -2
  99. package/es/components/ruleSetting/index.d.ts +1 -0
  100. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  101. package/es/components/schedules/calendar/index.js +4 -4
  102. package/es/components/schedules/calendar/serve.js +2 -2
  103. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  104. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  105. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  106. package/es/components/schedules/components/ResourceList/index.js +1 -1
  107. package/es/components/schedules/components/Search/index.js +5 -5
  108. package/es/components/schedules/model.d.ts +9 -1
  109. package/es/components/schedules/model.js +5 -5
  110. package/es/components/schedules/openHours/index.js +1 -1
  111. package/es/components/schedules/openHours/serve.js +2 -2
  112. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  113. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  114. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  115. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  116. package/es/components/schedules/products/serve.js +2 -2
  117. package/es/components/schedules/products/utils.js +5 -5
  118. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  119. package/es/components/schedules/resources/detail/index.js +10 -10
  120. package/es/components/schedules/resources/list/index.js +2 -2
  121. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  122. package/es/components/schedules/resources/serve.js +2 -2
  123. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  124. package/es/components/schedules/utils.js +4 -4
  125. package/es/components/selectModal/index.js +2 -2
  126. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  127. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  128. package/es/components/shoppingCart/index.d.ts +1 -0
  129. package/es/components/ticketBooking/components/addServiceVariant/addService.js +16 -10
  130. package/es/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  131. package/es/components/ticketBooking/components/ticketBooking/index.js +3 -1
  132. package/es/components/ticketBooking/index.js +2 -1
  133. package/es/components/ticketBooking/locales.d.ts +3 -0
  134. package/es/components/ticketBooking/locales.js +12 -3
  135. package/es/components/ticketBooking/utils/index.d.ts +5 -1
  136. package/es/components/ticketBooking/utils/index.js +35 -3
  137. package/es/components/wallet/Detail/model.d.ts +13 -1
  138. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  139. package/es/components/wallet/PointCard/model.d.ts +13 -1
  140. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  141. package/es/components/wallet/Voucher/model.d.ts +13 -1
  142. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  143. package/es/components/wallet/model.d.ts +9 -1
  144. package/es/hooks/useComponents.js +1 -1
  145. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  146. package/lib/components/appointmentBooking/assets/resource.svg +1 -0
  147. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  148. package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
  149. package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
  150. package/lib/components/appointmentBooking/components/Resource/index.js +44 -5
  151. package/lib/components/appointmentBooking/hooks.js +12 -3
  152. package/lib/components/appointmentBooking/index.d.ts +1 -0
  153. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  154. package/lib/components/appointmentBooking/locales.js +3 -0
  155. package/lib/components/booking/addons/model.d.ts +10 -1
  156. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  157. package/lib/components/booking/components/TabProduct/productItem/index.js +8 -1
  158. package/lib/components/booking/components/drawer/index.js +2 -2
  159. package/lib/components/booking/components/footer/index.d.ts +1 -0
  160. package/lib/components/booking/components/voucher/index.js +31 -27
  161. package/lib/components/booking/forms/model.d.ts +10 -1
  162. package/lib/components/booking/info/client/index.js +2 -1
  163. package/lib/components/booking/info/index.d.ts +1 -0
  164. package/lib/components/booking/info/model.d.ts +10 -1
  165. package/lib/components/booking/info/pet/index.js +3 -0
  166. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  167. package/lib/components/booking/info/service/addService/index.d.ts +1 -0
  168. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  169. package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
  170. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  171. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  172. package/lib/components/booking/info/service2/utils.js +2 -2
  173. package/lib/components/booking/info/utils.js +37 -1
  174. package/lib/components/booking/info2/index.js +7 -4
  175. package/lib/components/booking/info2/service/addService/utils.d.ts +3 -3
  176. package/lib/components/booking/info2/service/addService/utils.js +20 -13
  177. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  178. package/lib/components/booking/info2/service/editService/index.js +1 -0
  179. package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
  180. package/lib/components/booking/model.d.ts +9 -1
  181. package/lib/components/booking/notes/model.d.ts +10 -1
  182. package/lib/components/booking/payments/model.d.ts +10 -1
  183. package/lib/components/booking/utils.d.ts +2 -2
  184. package/lib/components/eftposPay/amount.d.ts +1 -1
  185. package/lib/components/eftposPay/device.d.ts +1 -1
  186. package/lib/components/eftposPay/hooks.d.ts +1 -1
  187. package/lib/components/eftposPay/store/index.d.ts +2 -2
  188. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  189. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  190. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  191. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +18 -8
  192. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  193. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  194. package/lib/components/eventBooking/index.d.ts +1 -0
  195. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  196. package/lib/components/pay/toC/model.d.ts +9 -1
  197. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  198. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  199. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  200. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  201. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
  202. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +8 -1
  203. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  204. package/lib/components/productExtension/index.d.ts +1 -0
  205. package/lib/components/productSelect/components/TabProduct/index.js +19 -6
  206. package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  207. package/lib/components/productSelect/components/TabProduct/tabs/index.js +202 -0
  208. package/lib/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  209. package/lib/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  210. package/lib/components/productSelect/components/pisellPriceText/index.js +72 -0
  211. package/lib/components/productSelect/components/productGroup/index.js +24 -4
  212. package/lib/components/productSelect/components/productGroup/index.less +14 -1
  213. package/lib/components/productSelect/index.less +1 -2
  214. package/lib/components/ruleSetting/index.d.ts +1 -0
  215. package/lib/components/schedules/model.d.ts +9 -1
  216. package/lib/components/schedules/utils.js +1 -1
  217. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  218. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  219. package/lib/components/shoppingCart/index.d.ts +1 -0
  220. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +28 -15
  221. package/lib/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  222. package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -1
  223. package/lib/components/ticketBooking/index.js +2 -1
  224. package/lib/components/ticketBooking/locales.d.ts +3 -0
  225. package/lib/components/ticketBooking/locales.js +6 -3
  226. package/lib/components/ticketBooking/utils/index.d.ts +5 -1
  227. package/lib/components/ticketBooking/utils/index.js +35 -3
  228. package/lib/components/wallet/Detail/model.d.ts +13 -1
  229. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  230. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  231. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  232. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  233. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  234. package/lib/components/wallet/model.d.ts +9 -1
  235. package/package.json +2 -2
@@ -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
+ }>;
@@ -306,7 +306,8 @@ var Client = () => {
306
306
  isPreview: false,
307
307
  drawerProps: {
308
308
  title: import_utils.locales.getText("pisell2.text.select-customer"),
309
- destroyOnClose: true
309
+ destroyOnClose: true,
310
+ mask: state.drawerMask
310
311
  },
311
312
  mode: "single",
312
313
  createItemText: import_utils.locales.getText("pisell2.text.create-new-customer"),
@@ -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
+ }>;
@@ -463,6 +463,9 @@ var Pet = (props) => {
463
463
  ...((_c3 = (_b3 = (_a3 = state.pet) == null ? void 0 : _a3.formData) == null ? void 0 : _b3[0]) == null ? void 0 : _c3.options) || []
464
464
  ]);
465
465
  },
466
+ drawerProps: {
467
+ mask: state.drawerMask
468
+ },
466
469
  getHolders,
467
470
  addCallbackService: addCallback,
468
471
  loading: valueLoading,
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
2
3
  export default Lists;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellDrawerProps } from '../../../components/drawer';
2
3
  import './index.less';
3
4
  interface AddServiceProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const AddTimeModal: () => JSX.Element;
3
4
  export default AddTimeModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceList: ({ onEdit }: {
3
4
  onEdit: any;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
2
3
  export default Lists;
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
244
244
  * @Author: WangHan
245
245
  * @Date: 2024-12-24 11:32
246
246
  */
247
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
247
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -454,7 +454,7 @@ var isAllNormalProductByState = (state) => {
454
454
  return isAllNormalProduct(state.service.value);
455
455
  };
456
456
  var getGeneralParams = (item, state, isParallelResource) => {
457
- var _a, _b, _c, _d, _e, _f, _g;
457
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
458
458
  const { pet, service } = state;
459
459
  const { holders = [], formData } = pet || {};
460
460
  const parallelResourceOtherParams = {};
@@ -519,6 +519,7 @@ var getGeneralParams = (item, state, isParallelResource) => {
519
519
  holder_id: (_d = item == null ? void 0 : item._extend) == null ? void 0 : _d.holder_id,
520
520
  start_date: !isNormalProduct ? (_e = item == null ? void 0 : item._extend) == null ? void 0 : _e.startDate : "",
521
521
  end_date: !isNormalProduct ? ((_f = item == null ? void 0 : item._extend) == null ? void 0 : _f.endDate) || ((_g = item == null ? void 0 : item._extend) == null ? void 0 : _g.end_date) : "",
522
+ rowKey: `rowKey-${(_i = (_h = item == null ? void 0 : item._extend) == null ? void 0 : _h.other) == null ? void 0 : _i.rowKey}`,
522
523
  ...parallelResourceOtherParams
523
524
  };
524
525
  };
@@ -543,7 +544,6 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
543
544
  errorMessage = getErrorMessage(item, resourceItem, isDayBooking(state));
544
545
  }
545
546
  const generalParams = isGeneral ? getGeneralParams(item, state, !!isParallelResource) : {};
546
- console.log(isNormalProduct, "isNormalProduct");
547
547
  return {
548
548
  id: item == null ? void 0 : item.id,
549
549
  _id: item == null ? void 0 : item._id,
@@ -104,7 +104,43 @@ var isBooking4Shop = (shopId, renderType) => {
104
104
  if (renderType === "eventBooking") {
105
105
  return false;
106
106
  }
107
- const booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988];
107
+ const booking4Shops = [
108
+ 8390,
109
+ 1350,
110
+ 1401,
111
+ 3013,
112
+ 7154,
113
+ 7572,
114
+ 7007,
115
+ 8119,
116
+ 7320,
117
+ 7362,
118
+ 6497,
119
+ 6087,
120
+ 6303,
121
+ 6726,
122
+ 8191,
123
+ 6812,
124
+ 6813,
125
+ 6814,
126
+ 7651,
127
+ 8586,
128
+ 8581,
129
+ 9,
130
+ 2155,
131
+ 8030,
132
+ 1749,
133
+ 8194,
134
+ 2327,
135
+ 8609,
136
+ 8610,
137
+ 8782,
138
+ 1285,
139
+ 6124,
140
+ 8727,
141
+ 5538,
142
+ 6988
143
+ ];
108
144
  return booking4Shops.includes(shopId);
109
145
  };
110
146
  function generateDateRange(start, end) {
@@ -92,7 +92,7 @@ var Info = (0, import_model.Provider)((props) => {
92
92
  });
93
93
  }
94
94
  }, []);
95
- (0, import_react.useEffect)(() => {
95
+ (0, import_react.useMemo)(() => {
96
96
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m;
97
97
  const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
98
98
  modal.dispatch({
@@ -165,9 +165,12 @@ var Info = (0, import_model.Provider)((props) => {
165
165
  try {
166
166
  setTimeout(async () => {
167
167
  var _a2;
168
- let data = await (0, import_serve.getResourceList)({
169
- date: currentDate
170
- }, (_a2 = stateRef == null ? void 0 : stateRef.current) == null ? void 0 : _a2.bookingId);
168
+ let data = await (0, import_serve.getResourceList)(
169
+ {
170
+ date: currentDate
171
+ },
172
+ (_a2 = stateRef == null ? void 0 : stateRef.current) == null ? void 0 : _a2.bookingId
173
+ );
171
174
  data.date = currentDate;
172
175
  localStorage.setItem("bookingResourceList", JSON.stringify(data));
173
176
  modal.dispatch({
@@ -55,8 +55,8 @@ export declare const getTimeObj: ({ cacheItem, useStartTime, currentResource, st
55
55
  * @Author: zhiwei.Wang
56
56
  * @Date: 2024-01-09 13:38
57
57
  */
58
- export declare const formatResources: ({ cacheItem, resourcesOrigin }: any) => {
59
- list: any[];
58
+ export declare const formatResources: ({ cacheItem, resourcesOrigin, id }: any) => {
59
+ list: any;
60
60
  maps: any;
61
61
  };
62
62
  export declare const setDefaultResource: ({ cacheItem, resources }: any) => any;
@@ -77,7 +77,7 @@ export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any
77
77
  * @Author: zhiwei.Wang
78
78
  * @Date: 2024-06-01 13:25
79
79
  */
80
- export declare const getProductExtend: ({ cacheItem, state }: any) => any;
80
+ export declare const getProductExtend: ({ cacheItem, state, isDisabledTime }: any) => any;
81
81
  /**
82
82
  * @title: 格式化服务列表
83
83
  * @description: 后端列表返回的product_resource.resources 的optional_resource等不是最新数据
@@ -49,6 +49,7 @@ var import_utils2 = require("@pisell/utils");
49
49
  var import_AlertTriangle = __toESM(require("@pisell/icon/es/AlertTriangle"));
50
50
  var import_utils3 = require("../editService/utils");
51
51
  var import_mock = require("../../../mock");
52
+ var import_lodash = require("lodash");
52
53
  var getUsableTime = (cacheItem) => {
53
54
  try {
54
55
  let items = [];
@@ -166,25 +167,27 @@ var getTimeObj = ({
166
167
  durationSlicesBasedOnTime
167
168
  };
168
169
  };
169
- var formatResources = ({ cacheItem, resourcesOrigin }) => {
170
+ var formatResources = ({ cacheItem, resourcesOrigin, id }) => {
170
171
  try {
171
- let _list = [...resourcesOrigin];
172
+ let _list = [];
172
173
  let maps = {};
173
174
  const _cacheItem = cacheItem;
174
- for (let item of _list) {
175
+ _list = resourcesOrigin.map((item) => {
175
176
  let renderListMaps = {};
176
- item.renderList = item.renderList.map((d) => {
177
+ let _item = (0, import_lodash.cloneDeep)(item);
178
+ _item.renderList = _item.renderList.map((d) => {
177
179
  let res = (0, import_utilsByBooking.formatResource)(d, _cacheItem, (newData) => {
178
180
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "resource-option" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "like-wrap" }), newData.labelText, !newData.usable && /* @__PURE__ */ import_react.default.createElement(import_AlertTriangle.default, { className: "resource-option-alert-icon" }));
179
181
  });
180
182
  renderListMaps[res.id] = res;
181
183
  return res;
182
184
  }).sort((a, b) => b.usable ? 1 : -1);
183
- maps[item.form_id] = {
184
- ...item,
185
+ maps[_item.form_id] = {
186
+ ..._item,
185
187
  renderListMaps
186
188
  };
187
- }
189
+ return _item;
190
+ });
188
191
  return { list: _list, maps };
189
192
  } catch (err) {
190
193
  console.log("formatResourcesErr", err);
@@ -289,11 +292,13 @@ var getResourceByIds = (resourcesOriginMap, cacheItem) => {
289
292
  const getChildrenMetadata = (d) => {
290
293
  const combiningResources = [];
291
294
  if (resourcesOriginMap[d].combined_resource && resourcesOriginMap[d].combined_resource.status === 1) {
292
- resourcesOriginMap[d].combined_resource.resource_ids.forEach((id) => {
293
- if (resourcesOriginMap[id]) {
294
- combiningResources.push(resourcesOriginMap[id]);
295
+ resourcesOriginMap[d].combined_resource.resource_ids.forEach(
296
+ (id) => {
297
+ if (resourcesOriginMap[id]) {
298
+ combiningResources.push(resourcesOriginMap[id]);
299
+ }
295
300
  }
296
- });
301
+ );
297
302
  }
298
303
  return {
299
304
  children: combiningResources,
@@ -350,7 +355,7 @@ var getIsAutoClose = (cacheItem) => {
350
355
  }
351
356
  );
352
357
  };
353
- var getProductExtend = ({ cacheItem, state }) => {
358
+ var getProductExtend = ({ cacheItem, state, isDisabledTime }) => {
354
359
  const isNew = cacheItem.new || !cacheItem._extend.endDate;
355
360
  let _cacheItem = { ...cacheItem };
356
361
  const resourcesOriginMap = state.service.resourcesOriginMap || {};
@@ -404,7 +409,9 @@ var getProductExtend = ({ cacheItem, state }) => {
404
409
  if (_cacheItem._extend.bundle_edit !== void 0) {
405
410
  _cacheItem._extend.bundle_edit = 1;
406
411
  }
407
- _cacheItem._time = (/* @__PURE__ */ new Date()).getTime();
412
+ if (!isDisabledTime) {
413
+ _cacheItem._time = (/* @__PURE__ */ new Date()).getTime();
414
+ }
408
415
  } else {
409
416
  if (!_cacheItem._data.capacitys) {
410
417
  _cacheItem._data.capacitys = cacheItem.capacity;
@@ -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;
@@ -428,6 +428,7 @@ var Info = (_, ref) => {
428
428
  titleNoWrap: true,
429
429
  zIndex: state.service.changeService ? 999 : 1e3,
430
430
  forceRender: true,
431
+ mask: state.drawerMask,
431
432
  open: state.service.editModal && !((_p = state.service.cacheItem) == null ? void 0 : _p.autoClose),
432
433
  title: import_utils.locales.getText("pisell2.text.edit-service"),
433
434
  onClose: () => {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceList: ({ onEdit }: {
3
4
  onEdit: any;
@@ -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
+ }>;
@@ -164,10 +164,10 @@ export declare const getProductTotalPrice: (item: any) => number;
164
164
  export declare const getDuration: (duration: number | {
165
165
  type: string;
166
166
  value: number;
167
- }) => number | "flexible" | {
167
+ }) => number | {
168
168
  type: string;
169
169
  value: number;
170
- };
170
+ } | "flexible";
171
171
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
172
172
  export declare const getIsEdit: (state: any) => boolean;
173
173
  export {};
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -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" | "payo" | "tyro" | "windcave">;
22
+ readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -295,9 +295,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
298
+ mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "payo" | "tyro" | "windcave" | undefined;
300
+ eftpos?: "payo" | "tyro" | "windcave" | "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
  import './index.less';
2
3
  declare const Layout: () => JSX.Element;
3
4
  export default Layout;
@@ -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;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SelectHolderModal: (props: any) => JSX.Element;
2
3
  export default SelectHolderModal;
@@ -37,6 +37,8 @@ var import_OpenCard = __toESM(require("../../OpenCard"));
37
37
  var import_materials = require("@pisell/materials");
38
38
  var import_utils = require("@pisell/utils");
39
39
  var import_Sales = require("../../../../Sales");
40
+ var import_decimal = __toESM(require("decimal.js"));
41
+ var import_pisellPriceText = __toESM(require("../../../../productSelect/components/pisellPriceText"));
40
42
  var BookingOptions = (props) => {
41
43
  var _a, _b;
42
44
  const { detail, currentBookingOption, selectEventDetailBookingOptions } = (0, import_Sales.useEventDetail)();
@@ -63,14 +65,22 @@ var BookingOptions = (props) => {
63
65
  optionClassName: `option-item ${((_b = detail == null ? void 0 : detail.bookingOptions) == null ? void 0 : _b.length) > 1 ? "option-item-pointer" : ""}`,
64
66
  value: currentBookingOption,
65
67
  renderOption: (option) => {
66
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "item" }, /* @__PURE__ */ import_react.default.createElement("span", null, option.label), /* @__PURE__ */ import_react.default.createElement(
67
- import_materials.PisellText.Amount,
68
- {
69
- value: option.price,
70
- showCurrencySymbol: true,
71
- className: "price"
72
- }
73
- ));
68
+ const { price, is_bundle, minimum_markup_price } = option._originData || {};
69
+ if (!option._originData || !is_bundle) {
70
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "item" }, /* @__PURE__ */ import_react.default.createElement("span", null, option.label), /* @__PURE__ */ import_react.default.createElement(
71
+ import_materials.PisellText.Amount,
72
+ {
73
+ value: option.price,
74
+ showCurrencySymbol: true,
75
+ className: "price"
76
+ }
77
+ ));
78
+ }
79
+ let _price = price;
80
+ if (is_bundle) {
81
+ _price = new import_decimal.default(price).plus(new import_decimal.default(minimum_markup_price)).toFixed(2);
82
+ }
83
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "item" }, /* @__PURE__ */ import_react.default.createElement("span", null, option.label), /* @__PURE__ */ import_react.default.createElement(import_pisellPriceText.default, { className: "price", value: _price, isMini: true }));
74
84
  },
75
85
  onChange
76
86
  }
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Resource: (props: any) => JSX.Element;
2
3
  export default Resource;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Schedule: () => JSX.Element;
2
3
  export default Schedule;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const EventBooking: () => JSX.Element;
3
4
  export default EventBooking;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.module.less';
2
3
  declare const StripePayment: () => JSX.Element;
3
4
  export default StripePayment;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -28,4 +29,11 @@ export interface PayGroup {
28
29
  pay_number?: string;
29
30
  _order: any;
30
31
  }
31
- export declare const Provider: any, Context: any;
32
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
33
+ state: FormState;
34
+ } & {
35
+ dispatch: (params: {
36
+ type: string;
37
+ payload: any;
38
+ }) => void;
39
+ }>;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const PhoneField: ({ value, onChange }: any) => JSX.Element;
2
3
  export default PhoneField;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface AddClientProps {
3
4
  onChange: (value: any) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface RightPanelProps {
3
4
  value: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const Actor: ({ name }: {
2
3
  name: string;
3
4
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
- import "./index.less";
1
+ import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -35,6 +35,8 @@ module.exports = __toCommonJS(ProductItem_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
37
  var import_classnames = __toESM(require("classnames"));
38
+ var import_decimal = __toESM(require("decimal.js"));
39
+ var import_pisellPriceText = __toESM(require("../../../../productSelect/components/pisellPriceText"));
38
40
  var import_index = require("./index.less");
39
41
  var ProductItem = ({
40
42
  item = {},
@@ -43,6 +45,11 @@ var ProductItem = ({
43
45
  style,
44
46
  className
45
47
  }) => {
48
+ const { price, is_bundle, minimum_markup_price } = item;
49
+ let _price = price;
50
+ if (is_bundle) {
51
+ _price = new import_decimal.default(price).plus(new import_decimal.default(minimum_markup_price)).toFixed(2);
52
+ }
46
53
  return /* @__PURE__ */ import_react.default.createElement(
47
54
  "div",
48
55
  {
@@ -59,7 +66,7 @@ var ProductItem = ({
59
66
  className: "product-item-card-cover"
60
67
  }
61
68
  ) : null,
62
- /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-title" }, item.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-price" }, (0, import_utils.formatAmount)(item.price, 2, amountSymbol)))
69
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-title" }, item.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-price" }, /* @__PURE__ */ import_react.default.createElement(import_pisellPriceText.default, { value: _price, isMini: is_bundle })))
63
70
  );
64
71
  };
65
72
  var ProductItem_default = ProductItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const SelectResourcesTable: ({ value, onChange }: any) => JSX.Element;
3
4
  export default SelectResourcesTable;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface ProductExtensionProps {
3
4
  onDataChange: any;