@pisell/private-materials 3.2.38 → 3.3.0

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 (372) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/Sales/Summary/utils.d.ts +1 -1
  8. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
  9. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +245 -114
  10. package/es/components/appointmentBooking/components/Cart/Item/Total.js +5 -4
  11. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
  12. package/es/components/appointmentBooking/components/Cart/Item/index.js +98 -17
  13. package/es/components/appointmentBooking/components/Cart/Item/index.less +21 -12
  14. package/es/components/appointmentBooking/components/Cart/index.js +2 -7
  15. package/es/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
  16. package/es/components/appointmentBooking/components/Cart/utils.js +408 -0
  17. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
  18. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -0
  19. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
  20. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  21. package/es/components/appointmentBooking/components/Content/index.js +76 -9
  22. package/es/components/appointmentBooking/components/Content/index.less +21 -0
  23. package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
  24. package/es/components/appointmentBooking/components/Date/index.js +131 -38
  25. package/es/components/appointmentBooking/components/Date/index.less +1 -1
  26. package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  27. package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
  28. package/es/components/appointmentBooking/components/Deposit/index.less +17 -0
  29. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -1
  30. package/es/components/appointmentBooking/components/Footer/index.js +8 -2
  31. package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
  32. package/es/components/appointmentBooking/components/Form/index.js +200 -0
  33. package/es/components/appointmentBooking/components/Form/index.less +3 -0
  34. package/es/components/appointmentBooking/components/Guest/index.js +1 -1
  35. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  36. package/es/components/appointmentBooking/components/Header/index.js +53 -19
  37. package/es/components/appointmentBooking/components/Resource/index.js +67 -12
  38. package/es/components/appointmentBooking/components/Services/index.js +213 -75
  39. package/es/components/appointmentBooking/components/Services/index.less +0 -14
  40. package/es/components/appointmentBooking/components/TimeSlicing/index.js +10 -5
  41. package/es/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
  42. package/es/components/appointmentBooking/components/Voucher/index.js +19 -6
  43. package/es/components/appointmentBooking/components/Voucher/index.less +93 -2
  44. package/es/components/appointmentBooking/context.d.ts +4 -4
  45. package/es/components/appointmentBooking/context.js +42 -33
  46. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  47. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
  48. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  49. package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
  50. package/es/components/appointmentBooking/deposit/index.js +101 -0
  51. package/es/components/appointmentBooking/deposit/index.less +57 -0
  52. package/es/components/appointmentBooking/hooks.d.ts +29 -1
  53. package/es/components/appointmentBooking/hooks.js +382 -114
  54. package/es/components/appointmentBooking/index.d.ts +0 -1
  55. package/es/components/appointmentBooking/index.js +9 -4
  56. package/es/components/appointmentBooking/locales.d.ts +51 -3
  57. package/es/components/appointmentBooking/locales.js +58 -4
  58. package/es/components/appointmentBooking/utils.d.ts +66 -1
  59. package/es/components/appointmentBooking/utils.js +226 -33
  60. package/es/components/booking/addons/index.js +10 -6
  61. package/es/components/booking/components/footer/index.d.ts +0 -1
  62. package/es/components/booking/components/footer/index.js +90 -72
  63. package/es/components/booking/components/footer/utils.d.ts +11 -0
  64. package/es/components/booking/components/footer/utils.js +72 -44
  65. package/es/components/booking/components/voucher/index.js +22 -6
  66. package/es/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
  67. package/es/components/booking/info/hooks/useAddHolder.d.ts +2 -0
  68. package/es/components/booking/info/hooks/useAddHolder.js +70 -0
  69. package/es/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
  70. package/es/components/booking/info/hooks/useHolderConfig.js +40 -0
  71. package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
  72. package/es/components/booking/info/hooks/useInfoHolder.js +99 -0
  73. package/es/components/booking/info/index.js +9 -2
  74. package/es/components/booking/info/main.js +1 -1
  75. package/es/components/booking/info/pet/index.js +18 -17
  76. package/es/components/booking/info/service/Lists.d.ts +2 -0
  77. package/es/components/booking/info/service/Lists.js +119 -0
  78. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  79. package/es/components/booking/info/service/addService/index.js +7 -5
  80. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  81. package/es/components/booking/info/service/editService/index.js +7 -5
  82. package/es/components/booking/info/service/index.js +2 -2
  83. package/es/components/booking/info/service/serviceList/index.js +1 -0
  84. package/es/components/booking/info/service/serviceManager/index.js +12 -7
  85. package/es/components/booking/info/service2/Group/utils.js +2 -1
  86. package/es/components/booking/info/service2/hooks/useSelectPet.js +13 -5
  87. package/es/components/booking/info/service2/utils.d.ts +5 -4
  88. package/es/components/booking/info/service2/utils.js +356 -88
  89. package/es/components/booking/info/utils.d.ts +2 -0
  90. package/es/components/booking/info/utils.js +45 -1
  91. package/es/components/booking/info2/index.js +9 -6
  92. package/es/components/booking/info2/serve.d.ts +2 -2
  93. package/es/components/booking/info2/serve.js +8 -15
  94. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  95. package/es/components/booking/info2/service/addService/index.js +13 -8
  96. package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
  97. package/es/components/booking/info2/service/addService/utils.js +49 -14
  98. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  99. package/es/components/booking/info2/service/addTimeModal/index.js +1 -1
  100. package/es/components/booking/info2/service/editService/Resources/index.js +6 -5
  101. package/es/components/booking/info2/service/editService/index.js +4 -3
  102. package/es/components/booking/info2/service/index.js +18 -37
  103. package/es/components/booking/info2/utils.d.ts +4 -0
  104. package/es/components/booking/info2/utils.js +43 -0
  105. package/es/components/booking/info2/utilsByBooking.js +17 -4
  106. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  107. package/es/components/booking/materiels/holder/index.js +2 -2
  108. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  109. package/es/components/booking/notes/addNote/index.js +1 -1
  110. package/es/components/booking/notes/addNote/index.less +3 -0
  111. package/es/components/booking/utils.d.ts +1 -0
  112. package/es/components/booking/utils.js +20 -8
  113. package/es/components/eftposPay/amount.d.ts +1 -1
  114. package/es/components/eftposPay/device.d.ts +1 -1
  115. package/es/components/eftposPay/hooks.d.ts +1 -1
  116. package/es/components/eftposPay/store/index.d.ts +1 -1
  117. package/es/components/index.d.ts +2 -1
  118. package/es/components/index.js +2 -1
  119. package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
  120. package/es/components/productSelect/components/TabProduct/index.js +176 -0
  121. package/es/components/productSelect/components/gridLayout/index.d.ts +9 -0
  122. package/es/components/productSelect/components/gridLayout/index.js +28 -0
  123. package/es/components/productSelect/components/gridLayout/index.less +6 -0
  124. package/es/components/productSelect/components/productGroup/index.d.ts +34 -0
  125. package/es/components/productSelect/components/productGroup/index.js +145 -0
  126. package/es/components/productSelect/components/productGroup/index.less +208 -0
  127. package/es/components/productSelect/hooks/useToken.d.ts +18 -0
  128. package/es/components/productSelect/hooks/useToken.js +35 -0
  129. package/es/components/productSelect/index.d.ts +23 -0
  130. package/es/components/productSelect/index.js +93 -0
  131. package/es/components/productSelect/index.less +69 -0
  132. package/es/components/productSelect/locales.d.ts +18 -0
  133. package/es/components/productSelect/locales.js +17 -0
  134. package/es/components/productSelect/mock.d.ts +134 -0
  135. package/es/components/productSelect/mock.js +202 -0
  136. package/es/components/productSelect/theme/token.d.ts +17 -0
  137. package/es/components/productSelect/theme/token.js +19 -0
  138. package/es/components/shoppingCart/Provider.d.ts +1 -1
  139. package/es/components/shoppingCart/Provider.js +3 -1
  140. package/es/components/shoppingCart/components/Cart/Product.js +15 -3
  141. package/es/components/shoppingCart/components/Cart/index.less +15 -15
  142. package/es/components/shoppingCart/components/Render/index.less +15 -0
  143. package/es/components/shoppingCart/hooks/useAddService.js +7 -1
  144. package/es/components/shoppingCart/index.d.ts +1 -2
  145. package/es/components/shoppingCart/index.js +3 -1
  146. package/es/components/shoppingCart/status.js +4 -1
  147. package/es/components/shoppingCart/type.d.ts +5 -0
  148. package/es/components/subTotal/index.d.ts +22 -0
  149. package/es/components/subTotal/index.js +234 -0
  150. package/es/components/subTotal/index.less +70 -0
  151. package/es/components/subTotal/locales.d.ts +42 -0
  152. package/es/components/subTotal/locales.js +41 -0
  153. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  154. package/es/components/ticketBooking/components/addServiceVariant/addService.js +410 -0
  155. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
  156. package/es/components/ticketBooking/components/addServiceVariant/index.js +28 -0
  157. package/es/components/ticketBooking/components/addServiceVariant/index.less +0 -0
  158. package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
  159. package/es/components/ticketBooking/components/menuBar/index.js +54 -0
  160. package/es/components/ticketBooking/components/menuBar/index.less +84 -0
  161. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
  162. package/es/components/ticketBooking/components/ticketBooking/index.js +815 -0
  163. package/es/components/ticketBooking/components/ticketBooking/index.less +18 -0
  164. package/es/components/ticketBooking/components/timeBar/index.d.ts +11 -0
  165. package/es/components/ticketBooking/components/timeBar/index.js +113 -0
  166. package/es/components/ticketBooking/components/timeBar/index.less +22 -0
  167. package/es/components/ticketBooking/data.d.ts +58 -0
  168. package/es/components/ticketBooking/data.js +58 -58
  169. package/es/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
  170. package/es/components/ticketBooking/hooks/useNetworkStatus.js +52 -0
  171. package/es/components/ticketBooking/index.d.ts +3 -3
  172. package/es/components/ticketBooking/index.js +139 -5
  173. package/es/components/ticketBooking/index.less +4 -0
  174. package/es/components/ticketBooking/locales.d.ts +144 -0
  175. package/es/components/ticketBooking/locales.js +143 -0
  176. package/es/components/ticketBooking/miniRedux.d.ts +22 -0
  177. package/es/components/ticketBooking/miniRedux.js +105 -0
  178. package/es/components/ticketBooking/serve.d.ts +282 -0
  179. package/es/components/ticketBooking/serve.js +957 -0
  180. package/es/components/ticketBooking/utils/index.d.ts +14 -0
  181. package/es/components/ticketBooking/utils/index.js +102 -0
  182. package/es/components/wallet/components/WalletCard.js +1 -1
  183. package/es/index.d.ts +3 -0
  184. package/es/index.js +4 -1
  185. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  186. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
  187. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +132 -73
  188. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
  189. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
  190. package/lib/components/appointmentBooking/components/Cart/Item/index.js +59 -14
  191. package/lib/components/appointmentBooking/components/Cart/Item/index.less +21 -12
  192. package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
  193. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
  194. package/lib/components/appointmentBooking/components/Cart/utils.js +273 -0
  195. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
  196. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +46 -0
  197. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
  198. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  199. package/lib/components/appointmentBooking/components/Content/index.js +59 -5
  200. package/lib/components/appointmentBooking/components/Content/index.less +21 -0
  201. package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
  202. package/lib/components/appointmentBooking/components/Date/index.js +47 -19
  203. package/lib/components/appointmentBooking/components/Date/index.less +1 -1
  204. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  205. package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
  206. package/lib/components/appointmentBooking/components/Deposit/index.less +17 -0
  207. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -1
  208. package/lib/components/appointmentBooking/components/Footer/index.js +8 -2
  209. package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
  210. package/lib/components/appointmentBooking/components/Form/index.js +157 -0
  211. package/lib/components/appointmentBooking/components/Form/index.less +3 -0
  212. package/lib/components/appointmentBooking/components/Guest/index.js +1 -1
  213. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  214. package/lib/components/appointmentBooking/components/Header/index.js +31 -13
  215. package/lib/components/appointmentBooking/components/Resource/index.js +36 -14
  216. package/lib/components/appointmentBooking/components/Services/index.js +86 -63
  217. package/lib/components/appointmentBooking/components/Services/index.less +0 -14
  218. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +13 -5
  219. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
  220. package/lib/components/appointmentBooking/components/Voucher/index.js +21 -6
  221. package/lib/components/appointmentBooking/components/Voucher/index.less +93 -2
  222. package/lib/components/appointmentBooking/context.d.ts +4 -4
  223. package/lib/components/appointmentBooking/context.js +15 -10
  224. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  225. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
  226. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  227. package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
  228. package/lib/components/appointmentBooking/deposit/index.js +109 -0
  229. package/lib/components/appointmentBooking/deposit/index.less +57 -0
  230. package/lib/components/appointmentBooking/hooks.d.ts +29 -1
  231. package/lib/components/appointmentBooking/hooks.js +148 -22
  232. package/lib/components/appointmentBooking/index.d.ts +0 -1
  233. package/lib/components/appointmentBooking/index.js +6 -4
  234. package/lib/components/appointmentBooking/locales.d.ts +51 -3
  235. package/lib/components/appointmentBooking/locales.js +52 -4
  236. package/lib/components/appointmentBooking/utils.d.ts +66 -1
  237. package/lib/components/appointmentBooking/utils.js +158 -33
  238. package/lib/components/booking/addons/index.js +9 -5
  239. package/lib/components/booking/components/footer/index.d.ts +0 -1
  240. package/lib/components/booking/components/footer/index.js +94 -32
  241. package/lib/components/booking/components/footer/utils.d.ts +11 -0
  242. package/lib/components/booking/components/footer/utils.js +38 -14
  243. package/lib/components/booking/components/voucher/index.js +18 -2
  244. package/lib/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
  245. package/lib/components/booking/info/hooks/useAddHolder.d.ts +2 -0
  246. package/lib/components/booking/info/hooks/useAddHolder.js +73 -0
  247. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
  248. package/lib/components/booking/info/hooks/useHolderConfig.js +59 -0
  249. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
  250. package/lib/components/booking/info/hooks/useInfoHolder.js +106 -0
  251. package/lib/components/booking/info/index.js +5 -1
  252. package/lib/components/booking/info/main.js +1 -1
  253. package/lib/components/booking/info/pet/index.js +3 -2
  254. package/lib/components/booking/info/service/Lists.d.ts +2 -0
  255. package/lib/components/booking/info/service/Lists.js +106 -0
  256. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  257. package/lib/components/booking/info/service/addService/index.js +6 -4
  258. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  259. package/lib/components/booking/info/service/editService/index.js +5 -3
  260. package/lib/components/booking/info/service/index.js +1 -1
  261. package/lib/components/booking/info/service/serviceList/index.js +1 -0
  262. package/lib/components/booking/info/service/serviceManager/index.js +6 -1
  263. package/lib/components/booking/info/service2/Group/utils.js +2 -1
  264. package/lib/components/booking/info/service2/hooks/useSelectPet.js +13 -6
  265. package/lib/components/booking/info/service2/utils.d.ts +5 -4
  266. package/lib/components/booking/info/service2/utils.js +304 -30
  267. package/lib/components/booking/info/utils.d.ts +2 -0
  268. package/lib/components/booking/info/utils.js +40 -1
  269. package/lib/components/booking/info2/index.js +6 -1
  270. package/lib/components/booking/info2/serve.d.ts +2 -2
  271. package/lib/components/booking/info2/serve.js +3 -10
  272. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  273. package/lib/components/booking/info2/service/addService/index.js +11 -6
  274. package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
  275. package/lib/components/booking/info2/service/addService/utils.js +50 -17
  276. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  277. package/lib/components/booking/info2/service/addTimeModal/index.js +2 -2
  278. package/lib/components/booking/info2/service/editService/Resources/index.js +5 -3
  279. package/lib/components/booking/info2/service/editService/index.js +3 -1
  280. package/lib/components/booking/info2/service/index.js +18 -28
  281. package/lib/components/booking/info2/utils.d.ts +4 -0
  282. package/lib/components/booking/info2/utils.js +65 -0
  283. package/lib/components/booking/info2/utilsByBooking.js +12 -3
  284. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  285. package/lib/components/booking/materiels/holder/index.js +2 -2
  286. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  287. package/lib/components/booking/notes/addNote/index.js +1 -1
  288. package/lib/components/booking/notes/addNote/index.less +3 -0
  289. package/lib/components/booking/utils.d.ts +1 -0
  290. package/lib/components/booking/utils.js +25 -10
  291. package/lib/components/eftposPay/amount.d.ts +1 -1
  292. package/lib/components/eftposPay/device.d.ts +1 -1
  293. package/lib/components/eftposPay/hooks.d.ts +1 -1
  294. package/lib/components/eftposPay/store/index.d.ts +1 -1
  295. package/lib/components/index.d.ts +2 -1
  296. package/lib/components/index.js +3 -0
  297. package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
  298. package/lib/components/productSelect/components/TabProduct/index.js +172 -0
  299. package/lib/components/productSelect/components/gridLayout/index.d.ts +9 -0
  300. package/lib/components/productSelect/components/gridLayout/index.js +58 -0
  301. package/lib/components/productSelect/components/gridLayout/index.less +6 -0
  302. package/lib/components/productSelect/components/productGroup/index.d.ts +34 -0
  303. package/lib/components/productSelect/components/productGroup/index.js +122 -0
  304. package/lib/components/productSelect/components/productGroup/index.less +208 -0
  305. package/lib/components/productSelect/hooks/useToken.d.ts +18 -0
  306. package/lib/components/productSelect/hooks/useToken.js +51 -0
  307. package/lib/components/productSelect/index.d.ts +23 -0
  308. package/lib/components/productSelect/index.js +119 -0
  309. package/lib/components/productSelect/index.less +69 -0
  310. package/lib/components/productSelect/locales.d.ts +18 -0
  311. package/lib/components/productSelect/locales.js +41 -0
  312. package/lib/components/productSelect/mock.d.ts +134 -0
  313. package/lib/components/productSelect/mock.js +276 -0
  314. package/lib/components/productSelect/theme/token.d.ts +17 -0
  315. package/lib/components/productSelect/theme/token.js +47 -0
  316. package/lib/components/shoppingCart/Provider.d.ts +1 -1
  317. package/lib/components/shoppingCart/Provider.js +3 -1
  318. package/lib/components/shoppingCart/components/Cart/Product.js +14 -3
  319. package/lib/components/shoppingCart/components/Cart/index.less +15 -15
  320. package/lib/components/shoppingCart/components/Render/index.less +15 -0
  321. package/lib/components/shoppingCart/hooks/useAddService.js +1 -2
  322. package/lib/components/shoppingCart/index.d.ts +1 -2
  323. package/lib/components/shoppingCart/index.js +2 -0
  324. package/lib/components/shoppingCart/status.js +4 -1
  325. package/lib/components/shoppingCart/type.d.ts +5 -0
  326. package/lib/components/subTotal/index.d.ts +22 -0
  327. package/lib/components/subTotal/index.js +175 -0
  328. package/lib/components/subTotal/index.less +70 -0
  329. package/lib/components/subTotal/locales.d.ts +42 -0
  330. package/lib/components/subTotal/locales.js +65 -0
  331. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  332. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +318 -0
  333. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
  334. package/lib/components/ticketBooking/components/addServiceVariant/index.js +56 -0
  335. package/lib/components/ticketBooking/components/addServiceVariant/index.less +0 -0
  336. package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
  337. package/lib/components/ticketBooking/components/menuBar/index.js +87 -0
  338. package/lib/components/ticketBooking/components/menuBar/index.less +84 -0
  339. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
  340. package/lib/components/ticketBooking/components/ticketBooking/index.js +769 -0
  341. package/lib/components/ticketBooking/components/ticketBooking/index.less +18 -0
  342. package/lib/components/ticketBooking/components/timeBar/index.d.ts +11 -0
  343. package/lib/components/ticketBooking/components/timeBar/index.js +148 -0
  344. package/lib/components/ticketBooking/components/timeBar/index.less +22 -0
  345. package/lib/components/ticketBooking/data.d.ts +58 -0
  346. package/lib/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
  347. package/lib/components/ticketBooking/hooks/useNetworkStatus.js +80 -0
  348. package/lib/components/ticketBooking/index.d.ts +3 -3
  349. package/lib/components/ticketBooking/index.js +159 -3
  350. package/lib/components/ticketBooking/index.less +4 -0
  351. package/lib/components/ticketBooking/locales.d.ts +144 -0
  352. package/lib/components/ticketBooking/locales.js +167 -0
  353. package/lib/components/ticketBooking/miniRedux.d.ts +22 -0
  354. package/lib/components/ticketBooking/miniRedux.js +96 -0
  355. package/lib/components/ticketBooking/serve.d.ts +282 -0
  356. package/lib/components/ticketBooking/serve.js +214 -0
  357. package/lib/components/ticketBooking/utils/index.d.ts +14 -0
  358. package/lib/components/ticketBooking/utils/index.js +131 -0
  359. package/lib/components/wallet/components/WalletCard.js +1 -1
  360. package/lib/index.d.ts +3 -0
  361. package/lib/index.js +9 -0
  362. package/lowcode/appointment-deposit/meta.ts +58 -0
  363. package/lowcode/product-select/meta.ts +217 -0
  364. package/lowcode/sub-total/meta.ts +134 -0
  365. package/lowcode/ticket-booking/meta.ts +29 -0
  366. package/package.json +2 -2
  367. package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
  368. package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -115
  369. package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
  370. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
  371. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -109
  372. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
@@ -36,7 +36,7 @@ import TabProduct from "../components/TabProduct";
36
36
  import EmptyBooking from "../components/emptyBooking";
37
37
  import Footer from "../components/footer";
38
38
  import { formatProductBundle } from "../components/footer/utils";
39
- import { formatProductListByCategory, getProductTotalPrice, request } from "../utils";
39
+ import { formatProductListByCategory, getProductTotalPrice, isSessionProduct, request } from "../utils";
40
40
  import { locales, getUniqueId } from '@pisell/utils';
41
41
  import "./index.less";
42
42
  import useEngineContext from "../../../hooks/useEngineContext";
@@ -281,9 +281,10 @@ var Addons = Provider(function (props) {
281
281
  */
282
282
  var handleAddProduct = function handleAddProduct(item, type) {
283
283
  var _list = _toConsumableArray(state.addons.value);
284
+ var isSession = isSessionProduct(item);
284
285
 
285
286
  // 是否有单规格 组合规格 套餐, 如果没有不需要打开弹窗
286
- var isEject = type === 'detail' || item.bundle_group_count > 0;
287
+ var isEject = type === 'detail' || item.bundle_group_count > 0 || isSession;
287
288
  state.action({
288
289
  type: 'pisell1.handleOpenProductModal',
289
290
  data: {
@@ -291,11 +292,12 @@ var Addons = Provider(function (props) {
291
292
  date: state.date.value.format('YYYY-MM-DD'),
292
293
  showConfig: {
293
294
  option: false,
294
- session: false,
295
+ session: isSession,
295
296
  variant: false,
296
297
  package: true
297
298
  },
298
- is_eject: isEject ? 1 : 0
299
+ is_eject: isEject ? 1 : 0,
300
+ isOS: isSession
299
301
  },
300
302
  callback: function callback(e, extension_type, detail) {
301
303
  console.log('e', e);
@@ -488,6 +490,7 @@ var Addons = Provider(function (props) {
488
490
  if (state.channelDisabledEdit) {
489
491
  return;
490
492
  }
493
+ var isSession = isSessionProduct(item);
491
494
  state.action({
492
495
  type: 'pisell1.handleOpenProductModal',
493
496
  data: {
@@ -495,11 +498,12 @@ var Addons = Provider(function (props) {
495
498
  date: state.date.value.format('YYYY-MM-DD'),
496
499
  showConfig: {
497
500
  option: false,
498
- session: false,
501
+ session: isSession,
499
502
  variant: false,
500
503
  package: true
501
504
  },
502
- value: item._extend.other
505
+ value: item._extend.other,
506
+ isOS: isSession
503
507
  },
504
508
  callback: function callback(e, extension_type, detail) {
505
509
  var _product$_extend;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 底部
@@ -35,7 +35,7 @@ import "./index.less";
35
35
  import { createEventBooking, editEventBooking } from "./serve";
36
36
  import { formatValues } from "./utils";
37
37
  import VoucherCard from "../voucher";
38
-
38
+ import { SubTotal } from "../../../../index";
39
39
  /**
40
40
  * @title: 底部
41
41
  * @description:
@@ -45,7 +45,7 @@ import VoucherCard from "../voucher";
45
45
  * @Date: 2024-01-30 16:51
46
46
  */
47
47
  var Footer = function Footer(props) {
48
- var _context$appHelper, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _businessUtils$getApp, _state$addons4, _state$bookingDetail9;
48
+ var _context$appHelper, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _businessUtils$getApp, _state$addons4, _state$bookingDetail12, _state$bookingDetail13;
49
49
  var state = props.state,
50
50
  buttons = props.buttons,
51
51
  dispatch = props.dispatch,
@@ -1168,6 +1168,82 @@ var Footer = function Footer(props) {
1168
1168
  break;
1169
1169
  }
1170
1170
  };
1171
+ var subTotalList = useMemo(function () {
1172
+ var _state$bookingDetail9, _state$bookingDetail10, _state$bookingDetail11;
1173
+ var surcharge = (((_state$bookingDetail9 = state.bookingDetail) === null || _state$bookingDetail9 === void 0 ? void 0 : _state$bookingDetail9.surcharge) || []).map(function (d, index) {
1174
+ return {
1175
+ key: "custom_surcharge_".concat(index),
1176
+ label: d.name[state.locale],
1177
+ value: d.amount
1178
+ };
1179
+ });
1180
+ return [
1181
+ // 小计
1182
+ {
1183
+ key: 'sub_total',
1184
+ value: total.productAmount
1185
+ }].concat(_toConsumableArray(surcharge), [
1186
+ // 税费
1187
+ {
1188
+ hidden: !state.bookingId,
1189
+ key: 'tax',
1190
+ value: total.tax,
1191
+ tax: {
1192
+ rate: state === null || state === void 0 || (_state$bookingDetail10 = state.bookingDetail) === null || _state$bookingDetail10 === void 0 ? void 0 : _state$bookingDetail10.tax_rate,
1193
+ is_price_include_tax: is_price_include_tax(state),
1194
+ title: state === null || state === void 0 || (_state$bookingDetail11 = state.bookingDetail) === null || _state$bookingDetail11 === void 0 ? void 0 : _state$bookingDetail11.tax_title
1195
+ }
1196
+ },
1197
+ // 订单折扣
1198
+ {
1199
+ hidden: !state.bookingId,
1200
+ key: 'discount',
1201
+ value: total.shopDiscount
1202
+ },
1203
+ // 总计
1204
+ {
1205
+ key: 'total',
1206
+ value: total.expectAmount
1207
+ },
1208
+ // 舍入金额
1209
+ {
1210
+ hidden: !total.roundingAmount,
1211
+ key: 'custom_roundingAmount',
1212
+ value: total.roundingAmount,
1213
+ label: locales.getText('pisell1.text.rounding')
1214
+ }]);
1215
+ }, [total, (_state$bookingDetail12 = state.bookingDetail) === null || _state$bookingDetail12 === void 0 ? void 0 : _state$bookingDetail12.surcharge, state, state.bookingId]);
1216
+ var orderTotalList = useMemo(function () {
1217
+ return [
1218
+ // 订单已付金额
1219
+ {
1220
+ hidden: !state.bookingId,
1221
+ key: 'custom_orderPaidAmount',
1222
+ value: total.orderPaidAmount,
1223
+ label: locales.getText('pisell2.text.amount-paid-on-order')
1224
+ },
1225
+ // 支付手续费
1226
+ {
1227
+ hidden: !state.bookingId,
1228
+ key: 'custom_paySurchargeFee',
1229
+ value: total.paySurchargeFee,
1230
+ label: locales.getText('pisell1.text.payment-fee')
1231
+ },
1232
+ // 客户实付金额
1233
+ {
1234
+ hidden: !state.bookingId,
1235
+ key: 'custom_actualPaidAmount',
1236
+ value: total.actualPaidAmount,
1237
+ label: locales.getText('pisell2.text.amount-actually-paid-by-the-customer')
1238
+ },
1239
+ // 退款金额
1240
+ {
1241
+ hidden: !state.bookingId || !total.totalRefundAmount,
1242
+ key: 'custom_totalRefundAmount',
1243
+ value: total.totalRefundAmount,
1244
+ label: locales.getText('pisell2.text.refunded-amount')
1245
+ }];
1246
+ }, [total, (_state$bookingDetail13 = state.bookingDetail) === null || _state$bookingDetail13 === void 0 ? void 0 : _state$bookingDetail13.surcharge, state, state.bookingId]);
1171
1247
  return /*#__PURE__*/React.createElement(Skeleton, {
1172
1248
  title: false,
1173
1249
  round: true,
@@ -1199,79 +1275,21 @@ var Footer = function Footer(props) {
1199
1275
  })
1200
1276
  }, /*#__PURE__*/React.createElement("div", {
1201
1277
  className: "order-total-item-border"
1202
- }), /*#__PURE__*/React.createElement("div", {
1203
- className: "order-total-item"
1204
- }, /*#__PURE__*/React.createElement("span", {
1205
- className: "order-total-item-label"
1206
- }, locales.getText('pisell1.text.subtotal')), /*#__PURE__*/React.createElement("span", {
1207
- className: "order-total-item-value"
1208
- }, formatAmount(total.productAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), (((_state$bookingDetail9 = state.bookingDetail) === null || _state$bookingDetail9 === void 0 ? void 0 : _state$bookingDetail9.surcharge) || []).map(function (d) {
1209
- return /*#__PURE__*/React.createElement("div", {
1210
- className: "order-total-item",
1211
- key: d.id
1212
- }, /*#__PURE__*/React.createElement("span", {
1213
- className: "order-total-item-label"
1214
- }, d.name[state.locale]), /*#__PURE__*/React.createElement("span", {
1215
- className: "order-total-item-value"
1216
- }, formatAmount(d.amount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$')));
1217
- }), state.bookingId ? /*#__PURE__*/React.createElement("div", {
1218
- className: "order-total-item"
1219
- }, /*#__PURE__*/React.createElement("div", {
1220
- className: "order-total-item-label"
1221
- }, /*#__PURE__*/React.createElement("div", {
1222
- className: ""
1223
- }, locales.getText('pisell1.text.tax')), /*#__PURE__*/React.createElement("div", {
1224
- className: "",
1278
+ }), /*#__PURE__*/React.createElement(SubTotal, {
1279
+ mode: "column1",
1280
+ list: subTotalList,
1225
1281
  style: {
1226
- fontSize: 14
1282
+ padding: "0"
1227
1283
  }
1228
- }, taxText)), /*#__PURE__*/React.createElement("span", {
1229
- className: "order-total-item-value"
1230
- }, formatAmount(total.tax, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))) : null, state.bookingId ? /*#__PURE__*/React.createElement("div", {
1231
- className: "order-total-item"
1232
- }, /*#__PURE__*/React.createElement("div", {
1233
- className: "order-total-item-label"
1234
- }, locales.getText('pisell2.text.order-discount')), /*#__PURE__*/React.createElement("span", {
1235
- className: "order-total-item-value"
1236
- }, formatAmount(total.shopDiscount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))) : null, /*#__PURE__*/React.createElement("div", {
1237
- className: "order-total-item"
1238
- }, /*#__PURE__*/React.createElement("span", {
1239
- className: "order-total-item-label order-total-item-label-bold"
1240
- }, locales.getText('pisell1.text.total')), /*#__PURE__*/React.createElement("span", {
1241
- className: "order-total-item-value"
1242
- }, formatAmount(total.expectAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), !!total.roundingAmount && /*#__PURE__*/React.createElement("div", {
1243
- className: "order-total-item"
1244
- }, /*#__PURE__*/React.createElement("span", {
1245
- className: "order-total-item-label"
1246
- }, locales.getText('pisell1.text.rounding')), /*#__PURE__*/React.createElement("span", {
1247
- className: "order-total-item-value"
1248
- }, formatAmount(total.roundingAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), state.bookingId ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1249
- className: "order-total-item-border"
1250
1284
  }), /*#__PURE__*/React.createElement("div", {
1251
- className: "order-total-item"
1252
- }, /*#__PURE__*/React.createElement("span", {
1253
- className: "order-total-item-label order-total-item-label-bold"
1254
- }, locales.getText('pisell2.text.amount-paid-on-order')), /*#__PURE__*/React.createElement("span", {
1255
- className: "order-total-item-value"
1256
- }, formatAmount(total.orderPaidAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), /*#__PURE__*/React.createElement("div", {
1257
- className: "order-total-item"
1258
- }, /*#__PURE__*/React.createElement("span", {
1259
- className: "order-total-item-label"
1260
- }, locales.getText('pisell1.text.payment-fee')), /*#__PURE__*/React.createElement("span", {
1261
- className: "order-total-item-value"
1262
- }, formatAmount(total.paySurchargeFee, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), /*#__PURE__*/React.createElement("div", {
1263
- className: "order-total-item"
1264
- }, /*#__PURE__*/React.createElement("span", {
1265
- className: "order-total-item-label order-total-item-label-bold"
1266
- }, locales.getText('pisell2.text.amount-actually-paid-by-the-customer')), /*#__PURE__*/React.createElement("span", {
1267
- className: "order-total-item-value"
1268
- }, formatAmount(total.actualPaidAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))), total.totalRefundAmount > 0 ? /*#__PURE__*/React.createElement("div", {
1269
- className: "order-total-item"
1270
- }, /*#__PURE__*/React.createElement("span", {
1271
- className: "order-total-item-label order-total-item-label-bold"
1272
- }, locales.getText('pisell2.text.refunded-amount')), /*#__PURE__*/React.createElement("span", {
1273
- className: "order-total-item-value"
1274
- }, formatAmount(total.totalRefundAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'))) : null) : null), !(state !== null && state !== void 0 && state.disableEventBookingEdit) && /*#__PURE__*/React.createElement("div", {
1285
+ className: state.bookingId ? "order-total-item-border" : ""
1286
+ }), !!state.bookingId && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SubTotal, {
1287
+ mode: "column1",
1288
+ list: orderTotalList,
1289
+ style: {
1290
+ padding: " 0 0 16px"
1291
+ }
1292
+ }))), !(state !== null && state !== void 0 && state.disableEventBookingEdit) && /*#__PURE__*/React.createElement("div", {
1275
1293
  className: "pisell-lowcode__booking-footer-buttons"
1276
1294
  }, /*#__PURE__*/React.createElement(FooterMenus, {
1277
1295
  items: moreButton,
@@ -16,4 +16,15 @@ export declare const formatProductOption: (option: any) => any;
16
16
  * @Date: 2024-02-19 09:26
17
17
  */
18
18
  export declare const formatProductBundle: (bundle: any) => any;
19
+ export interface ResourceItem {
20
+ [key: string]: any;
21
+ }
22
+ /**
23
+ * @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
24
+ * @description:
25
+ * @param {object} resource
26
+ * @return {*}
27
+ * @Author: jinglin.tan
28
+ */
29
+ export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
19
30
  export declare const formatValues: (state: any) => any;
@@ -131,24 +131,54 @@ var formatRelationDetails = function formatRelationDetails(list) {
131
131
  };
132
132
  });
133
133
  };
134
+ /**
135
+ * @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
136
+ * @description:
137
+ * @param {object} resource
138
+ * @return {*}
139
+ * @Author: jinglin.tan
140
+ */
141
+ export var checkSubResourcesCapacity = function checkSubResourcesCapacity(resource) {
142
+ if (resource.children && resource.children.length) {
143
+ var countCapacity = resource.capacity;
144
+ resource.children.forEach(function (child) {
145
+ if (child.capacity <= countCapacity) {
146
+ countCapacity -= child.capacity;
147
+ } else {
148
+ child.capacity = countCapacity;
149
+ countCapacity = 0;
150
+ }
151
+ });
152
+ }
153
+ };
154
+ var checkResourcesFormat = function checkResourcesFormat(resources, service, isChild) {
155
+ return resources.map(function (resource) {
156
+ var _resource$children;
157
+ if (!isChild) {
158
+ resource.capacity = getSumCapacity({
159
+ cacheItem: service
160
+ });
161
+ }
162
+ checkSubResourcesCapacity(resource);
163
+ return {
164
+ children: (_resource$children = resource.children) !== null && _resource$children !== void 0 && _resource$children.length ? checkResourcesFormat(resource.children, service, true) : undefined,
165
+ form_id: resource.form_id,
166
+ relation_type: resource.relation_type || 'form',
167
+ relation_id: resource.relation_id || resource.id || 0,
168
+ capacity: resource.capacity,
169
+ like_status: resource.like_status || 'common',
170
+ metadata: resource.metadata || {}
171
+ };
172
+ });
173
+ };
134
174
  var formatResource = function formatResource(service) {
135
175
  if (!service._extend.resource) {
136
176
  return undefined;
137
177
  }
138
178
  try {
139
179
  return Object.values(service._extend.resource).reduce(function (pre, cur) {
140
- pre = pre.concat(cur.map(function (d) {
141
- return {
142
- form_id: d.form_id,
143
- relation_type: d.relation_type || 'form',
144
- relation_id: d.relation_id || 0,
145
- capacity: getSumCapacity({
146
- cacheItem: service
147
- }),
148
- like_status: d.like_status,
149
- metadata: d.metadata
150
- };
151
- }));
180
+ var newList = checkResourcesFormat(cur, service);
181
+ pre = pre.concat(newList);
152
182
  return pre;
153
183
  }, []);
154
184
  } catch (err) {
@@ -167,12 +197,12 @@ var formatResource = function formatResource(service) {
167
197
  * @Date: 2024-12-07 14:52
168
198
  */
169
199
  var formatHolders = function formatHolders(state, item, values) {
170
- var _state$bookingConfig, _item$_extend;
200
+ var _state$bookingConfig, _item$_extend, _item$_extend2;
171
201
  var form_id = (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.appointment_subject) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.form_id) || 0;
172
202
  var obj = {
173
203
  customer_id: values.customer_id,
174
204
  form_id: form_id,
175
- form_record: [((_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.holder_id) || 0]
205
+ form_record: (_item$_extend = item._extend) !== null && _item$_extend !== void 0 && _item$_extend.holder_id ? [(_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.holder_id] : []
176
206
  };
177
207
 
178
208
  // 连锁加盟子店铺 增加参数
@@ -191,9 +221,9 @@ var formatHolders = function formatHolders(state, item, values) {
191
221
  * @Date: 2024-12-23 12:05
192
222
  */
193
223
  var formatProductPrice = function formatProductPrice(item) {
194
- var _item$_extend2, _item$_extend3;
195
- var other = (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.other;
196
- var price = Number((_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.price);
224
+ var _item$_extend3, _item$_extend4;
225
+ var other = (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.other;
226
+ var price = Number((_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.price);
197
227
  // 单规格, 单价 + 单规格价格
198
228
  if (other !== null && other !== void 0 && other.option) {
199
229
  var _other$option;
@@ -204,21 +234,21 @@ var formatProductPrice = function formatProductPrice(item) {
204
234
  return price;
205
235
  };
206
236
  var formatMetaData = function formatMetaData(item) {
207
- var _item$_extend4, _item$_extend5, _item$_extend7;
237
+ var _item$_extend5, _item$_extend6, _item$_extend8;
208
238
  var metadata = {};
209
- if ((_item$_extend4 = item._extend) !== null && _item$_extend4 !== void 0 && _item$_extend4.capacity) {
239
+ if ((_item$_extend5 = item._extend) !== null && _item$_extend5 !== void 0 && _item$_extend5.capacity) {
210
240
  metadata.capacity = item._extend.capacity;
211
241
  }
212
242
  if (item._extend.groupId) {
213
243
  metadata.groupId = item._extend.groupId;
214
244
  }
215
- if ((_item$_extend5 = item._extend) !== null && _item$_extend5 !== void 0 && _item$_extend5.holder_id) {
216
- var _item$_extend6;
217
- metadata.holder_id = (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.holder_id;
245
+ if ((_item$_extend6 = item._extend) !== null && _item$_extend6 !== void 0 && _item$_extend6.holder_id) {
246
+ var _item$_extend7;
247
+ metadata.holder_id = (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.holder_id;
218
248
  }
219
- if ((_item$_extend7 = item._extend) !== null && _item$_extend7 !== void 0 && _item$_extend7.multiDayPrices) {
220
- var _item$_extend8;
221
- metadata.multiDayPrices = (_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.multiDayPrices;
249
+ if ((_item$_extend8 = item._extend) !== null && _item$_extend8 !== void 0 && _item$_extend8.multiDayPrices) {
250
+ var _item$_extend9;
251
+ metadata.multiDayPrices = (_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.multiDayPrices;
222
252
  }
223
253
  return metadata;
224
254
  };
@@ -246,7 +276,7 @@ var formatMetaData = function formatMetaData(item) {
246
276
  * @Date: 2024-12-07 14:21
247
277
  */
248
278
  var formatProducts = function formatProducts(item) {
249
- var _item$_extend9, _item$_extend10, _item$_extend11;
279
+ var _item$_extend10, _item$_extend11, _item$_extend12;
250
280
  var total = Number(item._extend.total);
251
281
  var origin_total = Number(item._extend.origin_total);
252
282
  var discount_amount = origin_total - total;
@@ -271,10 +301,10 @@ var formatProducts = function formatProducts(item) {
271
301
  "discount_per": item._extend.discount_per,
272
302
  "discount_type": item._extend.discount_type || discount_type,
273
303
  "order_detail_id": item._extend.order_detail_id || 0,
274
- "product_bundle": formatProductBundle((_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 || (_item$_extend9 = _item$_extend9.other) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.bundle),
304
+ "product_bundle": formatProductBundle((_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 || (_item$_extend10 = _item$_extend10.other) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.bundle),
275
305
  "bundle_edit": item._extend.bundle_edit,
276
- "product_option_item": formatProductOption((_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 || (_item$_extend10 = _item$_extend10.other) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.option),
277
- "product_variant_id": ((_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 || (_item$_extend11 = _item$_extend11.other) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.product_variant_id) || 0,
306
+ "product_option_item": formatProductOption((_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 || (_item$_extend11 = _item$_extend11.other) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.option),
307
+ "product_variant_id": ((_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 || (_item$_extend12 = _item$_extend12.other) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.product_variant_id) || 0,
278
308
  "discount_list": notManualDiscount,
279
309
  metadata: formatMetaData(item)
280
310
  };
@@ -294,8 +324,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
294
324
 
295
325
  // 过滤出卡片中的普通商品
296
326
  var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
297
- var _item$_extend12;
298
- var holderId = (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.holder_id;
327
+ var _item$_extend13;
328
+ var holderId = (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.holder_id;
299
329
  var bookingHolderId = booking_item._extend.holder_id;
300
330
  var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
301
331
  return holderId && holderId === bookingHolderId && !isDayBookingProduct;
@@ -321,15 +351,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
321
351
 
322
352
  // 找出预约商品
323
353
  list = list.filter(function (item) {
324
- var _item$_extend13;
325
- return ((_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.holder_id) && appointmentTypes.includes(item.extension_type);
354
+ var _item$_extend14;
355
+ return ((_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.holder_id) && appointmentTypes.includes(item.extension_type);
326
356
  });
327
357
 
328
358
  // 对预约商品列表根据holder_id进行分组
329
359
  var groupMap = new Map();
330
360
  list.forEach(function (item) {
331
- var _item$_extend14;
332
- var key = (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.holder_id; // 分组键
361
+ var _item$_extend15;
362
+ var key = (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.holder_id; // 分组键
333
363
  if (!groupMap.has(key)) {
334
364
  groupMap.set(key, []);
335
365
  }
@@ -387,12 +417,13 @@ var formatBookings = function formatBookings(data, values) {
387
417
  if (isNowTime(item._extend.start_time)) {
388
418
  start_time = getNowTime();
389
419
  }
420
+ dayParams.holder = formatHolders(data, item, values);
390
421
 
391
422
  // 跨日预约下的普通商品
392
423
  if (isDay) {
393
- var _item$_extend15, _item$_extend16, _item$_extend17, _item$_extend18;
394
- var startDate = ((_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.startDate) || ((_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.start_date);
395
- var endDate = ((_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.endDate) || ((_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.end_date);
424
+ var _item$_extend16, _item$_extend17, _item$_extend18, _item$_extend19;
425
+ var startDate = ((_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.startDate) || ((_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.start_date);
426
+ var endDate = ((_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.endDate) || ((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.end_date);
396
427
  var _formatDayTime = formatDayTime({
397
428
  startDate: startDate,
398
429
  endDate: endDate
@@ -414,9 +445,6 @@ var formatBookings = function formatBookings(data, values) {
414
445
  }
415
446
  }, 'minutes');
416
447
  }
417
- if (isEvent) {
418
- dayParams.holder = formatHolders(data, item, values);
419
- }
420
448
  return _objectSpread(_objectSpread({
421
449
  "product": formatProducts(item),
422
450
  "relation_products": formatRelationDetails(item._extend.relation_details),
@@ -457,8 +485,8 @@ var formatRelationProducts = function formatRelationProducts(data) {
457
485
  var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
458
486
  // open items 下的商品
459
487
  list = list.filter(function (item) {
460
- var _item$_extend19;
461
- return !((_item$_extend19 = item._extend) !== null && _item$_extend19 !== void 0 && _item$_extend19.holder_id);
488
+ var _item$_extend20;
489
+ return !((_item$_extend20 = item._extend) !== null && _item$_extend20 !== void 0 && _item$_extend20.holder_id);
462
490
  });
463
491
  var relationProducts = [];
464
492
  relationProducts = list.map(function (item) {
@@ -532,7 +560,7 @@ export var formatValues = function formatValues(state) {
532
560
  // 客户
533
561
  var customer = formatCustomer(state);
534
562
  values = _objectSpread(_objectSpread({}, values), customer);
535
- debugger;
563
+
536
564
  // 主体
537
565
  values.holder = formatHolder(state, values);
538
566
  if (isDay) {
@@ -36,12 +36,12 @@ var services = {};
36
36
  var VoucherCard = function VoucherCard(props) {
37
37
  var _context$appHelper, _state$client$value;
38
38
  var context = useEngineContext();
39
- var _useState = useState(true),
39
+ var state = props.state,
40
+ dispatch = props.dispatch;
41
+ var _useState = useState(!state.bookingId),
40
42
  _useState2 = _slicedToArray(_useState, 2),
41
43
  showDetail = _useState2[0],
42
44
  setShowDetail = _useState2[1];
43
- var state = props.state,
44
- dispatch = props.dispatch;
45
45
  var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
46
46
  pisellos = _context$appHelper$ut.pisellos;
47
47
  var _useState3 = useState(''),
@@ -81,6 +81,22 @@ var VoucherCard = function VoucherCard(props) {
81
81
  shopDiscount.setProductList(state.service.value);
82
82
  }
83
83
  }, [state.service.value, isBooking4Shop]);
84
+ var serviceMemo = useMemo(function () {
85
+ var _ref;
86
+ var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
87
+ var _value$_extend, _value$_extend2;
88
+ return {
89
+ booking_id: value.booking_id,
90
+ id: value.id,
91
+ _id: value._id,
92
+ price: value.price,
93
+ total: value === null || value === void 0 || (_value$_extend = value._extend) === null || _value$_extend === void 0 ? void 0 : _value$_extend.total,
94
+ discount_list: value.discount_list,
95
+ origin_total: value === null || value === void 0 || (_value$_extend2 = value._extend) === null || _value$_extend2 === void 0 ? void 0 : _value$_extend2.origin_total
96
+ };
97
+ });
98
+ return val;
99
+ }, [state.service.value]);
84
100
 
85
101
  // 更新productList
86
102
  useEffect(function () {
@@ -99,7 +115,7 @@ var VoucherCard = function VoucherCard(props) {
99
115
  })
100
116
  });
101
117
  }
102
- }, [state.service.value, isBooking4Shop]);
118
+ }, [JSON.stringify(serviceMemo), isBooking4Shop]);
103
119
  var fn = useMemoizedFn(function (result) {
104
120
  if (result.productList.some(function (item) {
105
121
  return !item;
@@ -140,7 +156,7 @@ var VoucherCard = function VoucherCard(props) {
140
156
 
141
157
  // apply code
142
158
  var onScanCode = /*#__PURE__*/function () {
143
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
159
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
144
160
  var val;
145
161
  return _regeneratorRuntime().wrap(function _callee$(_context) {
146
162
  while (1) switch (_context.prev = _context.next) {
@@ -170,7 +186,7 @@ var VoucherCard = function VoucherCard(props) {
170
186
  }, _callee);
171
187
  }));
172
188
  return function onScanCode() {
173
- return _ref.apply(this, arguments);
189
+ return _ref2.apply(this, arguments);
174
190
  };
175
191
  }();
176
192
  if (!isBooking4Shop) return null;
@@ -2,6 +2,9 @@ import React, { useMemo } from 'react';
2
2
  import { locales } from '@pisell/utils';
3
3
  var useCreateBookingPageHeader = function useCreateBookingPageHeader(state) {
4
4
  var createHeader = useMemo(function () {
5
+ if (state.hideCreateText) {
6
+ return null;
7
+ }
5
8
  return state.isBookingCreatePage && !state.bookingId && /*#__PURE__*/React.createElement("div", {
6
9
  className: "booking-info-create-new"
7
10
  }, locales.getText('pisell2.booking.info.text.create-new'));
@@ -0,0 +1,2 @@
1
+ declare const useAddHolder: (state: any, dispatch: any) => () => void;
2
+ export default useAddHolder;
@@ -0,0 +1,70 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
+ 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; }
9
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
13
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
+ import { isWalkIn } from "../../utils";
15
+ import { useMemo } from 'react';
16
+ var useAddHolder = function useAddHolder(state, dispatch) {
17
+ var _state$bookingConfig2;
18
+ var formDataConfig = useMemo(function () {
19
+ var _state$bookingConfig, _holder$form, _holder$form2;
20
+ var _holder = (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.holder;
21
+ if (!_holder) {
22
+ return null;
23
+ }
24
+ return _objectSpread(_objectSpread(_objectSpread({}, _holder), _holder === null || _holder === void 0 ? void 0 : _holder.form), {}, {
25
+ options: [],
26
+ form_id: _holder === null || _holder === void 0 || (_holder$form = _holder.form) === null || _holder$form === void 0 ? void 0 : _holder$form.id,
27
+ field: _holder === null || _holder === void 0 || (_holder$form2 = _holder.form) === null || _holder$form2 === void 0 ? void 0 : _holder$form2.form_field,
28
+ relation_type: 'appointment_booking',
29
+ form_record: []
30
+ });
31
+ }, [(_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.holder]);
32
+ var handleAddHolder = function handleAddHolder() {
33
+ var _state$client;
34
+ var _data = {
35
+ formDataConfig: _objectSpread({}, formDataConfig)
36
+ };
37
+ var isWalkInBol = isWalkIn((_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id);
38
+ if (formDataConfig.data_range === 'customer' && !isWalkInBol) {
39
+ var _state$client2;
40
+ _data.customerId = (_state$client2 = state.client) === null || _state$client2 === void 0 ? void 0 : _state$client2.value.id;
41
+ }
42
+ state.action({
43
+ type: 'pisell1.goCustomFormAddData',
44
+ data: _data,
45
+ callback: function callback(res) {
46
+ var obj = {};
47
+ var _iterator = _createForOfIteratorHelper(res),
48
+ _step;
49
+ try {
50
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
51
+ var item = _step.value;
52
+ obj[item.key] = item.value;
53
+ }
54
+ } catch (err) {
55
+ _iterator.e(err);
56
+ } finally {
57
+ _iterator.f();
58
+ }
59
+ dispatch({
60
+ type: 'setPet',
61
+ payload: {
62
+ holders: !isWalkInBol ? [obj].concat(_toConsumableArray(state.pet.holders)) : state.pet.holders
63
+ }
64
+ });
65
+ }
66
+ });
67
+ };
68
+ return handleAddHolder;
69
+ };
70
+ export default useAddHolder;