@pisell/private-materials 3.2.21 → 3.2.22

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 (249) 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 +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +6 -6
  11. package/es/components/appointmentBooking/components/Cart/Item/index.js +7 -2
  12. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/components/Date/index.d.ts +1 -0
  15. package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
  16. package/es/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
  17. package/es/components/appointmentBooking/components/Voucher/index.js +228 -0
  18. package/es/components/appointmentBooking/components/Voucher/index.less +26 -0
  19. package/es/components/appointmentBooking/hooks.d.ts +1 -0
  20. package/es/components/appointmentBooking/hooks.js +4 -0
  21. package/es/components/appointmentBooking/index.d.ts +1 -0
  22. package/es/components/appointmentBooking/locales.d.ts +27 -0
  23. package/es/components/appointmentBooking/locales.js +30 -3
  24. package/es/components/appointmentBooking/utils.js +3 -1
  25. package/es/components/booking/addons/index.js +1 -0
  26. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  27. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  28. package/es/components/booking/components/footer/index.js +5 -1
  29. package/es/components/booking/components/footer/utils.js +18 -2
  30. package/es/components/booking/components/voucher/index.d.ts +3 -0
  31. package/es/components/booking/components/voucher/index.js +237 -0
  32. package/es/components/booking/components/voucher/index.less +88 -0
  33. package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +47 -0
  34. package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +115 -0
  35. package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +52 -0
  36. package/es/components/booking/deposit/index.d.ts +1 -0
  37. package/es/components/booking/forms/single/index.d.ts +1 -0
  38. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  39. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  40. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  41. package/es/components/booking/info/date/index.d.ts +1 -0
  42. package/es/components/booking/info/header/index.d.ts +1 -0
  43. package/es/components/booking/info/index.d.ts +1 -0
  44. package/es/components/booking/info/notes/index.d.ts +1 -0
  45. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  46. package/es/components/booking/info/service/addService/index.d.ts +1 -0
  47. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  48. package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
  49. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  50. package/es/components/booking/info/service2/utils.d.ts +1 -1
  51. package/es/components/booking/info/utils.js +1 -1
  52. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  53. package/es/components/booking/info2/service/addService/index.d.ts +1 -0
  54. package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  55. package/es/components/booking/info2/service/editService/index.js +9 -0
  56. package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
  57. package/es/components/booking/locales.d.ts +18 -0
  58. package/es/components/booking/locales.js +21 -3
  59. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  60. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  61. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  62. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  63. package/es/components/booking/payments/index.js +1 -0
  64. package/es/components/eftpos/form/index.d.ts +1 -0
  65. package/es/components/eftpos/hooks.d.ts +1 -0
  66. package/es/components/eftpos/index.d.ts +1 -0
  67. package/es/components/eftpos/pos.d.ts +1 -0
  68. package/es/components/eftpos/surcharge/index.d.ts +1 -0
  69. package/es/components/eftposPay/amount.d.ts +1 -1
  70. package/es/components/eftposPay/app.d.ts +1 -0
  71. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  72. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  73. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  74. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  75. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  76. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  77. package/es/components/eftposPay/device.d.ts +1 -1
  78. package/es/components/eftposPay/hooks.d.ts +1 -1
  79. package/es/components/eftposPay/index.d.ts +1 -0
  80. package/es/components/eftposPay/pay.d.ts +1 -0
  81. package/es/components/eftposPay/store/index.d.ts +3 -3
  82. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  83. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  84. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  85. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  86. package/es/components/eventBooking/components/Provider/Information/index.d.ts +3 -0
  87. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  88. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  89. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  90. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  91. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  92. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  93. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  94. package/es/components/eventBooking/index.d.ts +1 -0
  95. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
  96. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  97. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  98. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  99. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  100. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  101. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  102. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  103. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  104. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  105. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  106. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  107. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  108. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
  109. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
  110. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  111. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  112. package/es/components/schedules/products/index.d.ts +1 -0
  113. package/es/components/schedules/resources/index.d.ts +1 -0
  114. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  115. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  116. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  117. package/es/components/schedules/schedules/index.d.ts +1 -0
  118. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  119. package/es/components/shoppingCart/index.d.ts +1 -0
  120. package/es/components/taxSelect/index.d.ts +1 -0
  121. package/es/components/wallet/Detail/index.js +20 -14
  122. package/es/components/wallet/Voucher/index.js +1 -0
  123. package/es/components/wallet/index.js +15 -1
  124. package/es/components/wallet/locales.d.ts +3 -0
  125. package/es/components/wallet/locales.js +3 -0
  126. package/es/components/wallet/model.d.ts +1 -1
  127. package/es/components/wallet/utils/formatUtils.js +1 -1
  128. package/es/components/walletList/index.js +5 -1
  129. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  130. package/lib/components/appointmentBooking/components/Cart/Item/index.js +3 -2
  131. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  132. package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
  133. package/lib/components/appointmentBooking/components/Date/index.d.ts +1 -0
  134. package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
  135. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
  136. package/lib/components/appointmentBooking/components/Voucher/index.js +209 -0
  137. package/lib/components/appointmentBooking/components/Voucher/index.less +26 -0
  138. package/lib/components/appointmentBooking/hooks.d.ts +1 -0
  139. package/lib/components/appointmentBooking/hooks.js +8 -2
  140. package/lib/components/appointmentBooking/index.d.ts +1 -0
  141. package/lib/components/appointmentBooking/locales.d.ts +27 -0
  142. package/lib/components/appointmentBooking/locales.js +30 -3
  143. package/lib/components/appointmentBooking/utils.js +3 -1
  144. package/lib/components/booking/addons/index.js +1 -1
  145. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  146. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  147. package/lib/components/booking/components/footer/index.js +2 -1
  148. package/lib/components/booking/components/footer/utils.js +18 -1
  149. package/lib/components/booking/components/voucher/index.d.ts +3 -0
  150. package/lib/components/booking/components/voucher/index.js +211 -0
  151. package/lib/components/booking/components/voucher/index.less +88 -0
  152. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +47 -0
  153. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +109 -0
  154. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +52 -0
  155. package/lib/components/booking/deposit/index.d.ts +1 -0
  156. package/lib/components/booking/forms/single/index.d.ts +1 -0
  157. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  158. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  159. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  160. package/lib/components/booking/info/date/index.d.ts +1 -0
  161. package/lib/components/booking/info/header/index.d.ts +1 -0
  162. package/lib/components/booking/info/index.d.ts +1 -0
  163. package/lib/components/booking/info/notes/index.d.ts +1 -0
  164. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  165. package/lib/components/booking/info/service/addService/index.d.ts +1 -0
  166. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  167. package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
  168. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  169. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  170. package/lib/components/booking/info/utils.js +1 -1
  171. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  172. package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
  173. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  174. package/lib/components/booking/info2/service/editService/index.js +8 -0
  175. package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
  176. package/lib/components/booking/locales.d.ts +18 -0
  177. package/lib/components/booking/locales.js +21 -3
  178. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  179. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  180. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  181. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  182. package/lib/components/booking/payments/index.js +1 -1
  183. package/lib/components/eftpos/form/index.d.ts +1 -0
  184. package/lib/components/eftpos/hooks.d.ts +1 -0
  185. package/lib/components/eftpos/index.d.ts +1 -0
  186. package/lib/components/eftpos/pos.d.ts +1 -0
  187. package/lib/components/eftpos/surcharge/index.d.ts +1 -0
  188. package/lib/components/eftposPay/amount.d.ts +1 -1
  189. package/lib/components/eftposPay/app.d.ts +1 -0
  190. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  191. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  192. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  193. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  194. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  195. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  196. package/lib/components/eftposPay/device.d.ts +1 -1
  197. package/lib/components/eftposPay/hooks.d.ts +1 -1
  198. package/lib/components/eftposPay/index.d.ts +1 -0
  199. package/lib/components/eftposPay/pay.d.ts +1 -0
  200. package/lib/components/eftposPay/store/index.d.ts +3 -3
  201. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  202. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  203. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  204. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  205. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +3 -0
  206. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  207. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  208. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  209. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  210. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  211. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  212. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  213. package/lib/components/eventBooking/index.d.ts +1 -0
  214. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
  215. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  216. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  217. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  218. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  219. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  220. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  221. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  222. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  223. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
  224. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  225. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  226. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  227. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
  228. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
  229. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  230. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  231. package/lib/components/schedules/products/index.d.ts +1 -0
  232. package/lib/components/schedules/resources/index.d.ts +1 -0
  233. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  234. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  235. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  236. package/lib/components/schedules/schedules/index.d.ts +1 -0
  237. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  238. package/lib/components/shoppingCart/index.d.ts +1 -0
  239. package/lib/components/taxSelect/index.d.ts +1 -0
  240. package/lib/components/wallet/Detail/index.js +6 -1
  241. package/lib/components/wallet/Voucher/index.js +1 -0
  242. package/lib/components/wallet/index.js +15 -1
  243. package/lib/components/wallet/locales.d.ts +3 -0
  244. package/lib/components/wallet/locales.js +3 -0
  245. package/lib/components/wallet/model.d.ts +1 -1
  246. package/lib/components/wallet/utils/formatUtils.js +1 -1
  247. package/lib/components/walletList/index.js +6 -2
  248. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  249. package/package.json +3 -3
@@ -55,8 +55,9 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
55
55
  expire_date = _detail$expire_date === void 0 ? '' : _detail$expire_date,
56
56
  _detail$product = detail.product,
57
57
  product = _detail$product === void 0 ? {} : _detail$product;
58
- var _product$description = product.description,
59
- description = _product$description === void 0 ? '' : _product$description;
58
+ var _ref = product || {},
59
+ _ref$description = _ref.description,
60
+ description = _ref$description === void 0 ? '' : _ref$description;
60
61
  var context = useEngineContext();
61
62
  var utils = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
62
63
  var dvaStore = utils === null || utils === void 0 || (_utils$getStore = utils.getStore) === null || _utils$getStore === void 0 || (_utils$getStore = _utils$getStore.call(utils)) === null || _utils$getStore === void 0 ? void 0 : _utils$getStore.getState();
@@ -174,6 +175,11 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
174
175
  label: locales.getText('page.wallet.points'),
175
176
  value: balance ? "".concat(Number(balance)) : ''
176
177
  });
178
+ } else if (tag === 'good_pass') {
179
+ data.splice(2, 0, {
180
+ label: locales.getText('page.wallet.goodPass'),
181
+ value: balance ? "".concat(Number(balance)) : ''
182
+ });
177
183
  } else {
178
184
  data.splice(2, 0, {
179
185
  label: locales.getText('page.wallet.balance'),
@@ -190,10 +196,10 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
190
196
  locales.init(localeTexts, (dvaStore === null || dvaStore === void 0 || (_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.translateLocale) || 'en');
191
197
  // 注册请求
192
198
  request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
193
- var _ref = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils) || {
199
+ var _ref2 = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils) || {
194
200
  store: {}
195
201
  },
196
- store = _ref.store;
202
+ store = _ref2.store;
197
203
  var platform = isMobile() ? 'h5' : 'pc';
198
204
  var timezone = (store === null || store === void 0 || (_store$getState = store.getState) === null || _store$getState === void 0 || (_store$getState = _store$getState.call(store)) === null || _store$getState === void 0 || (_store$getState = _store$getState.global) === null || _store$getState === void 0 || (_store$getState = _store$getState.symbol) === null || _store$getState === void 0 ? void 0 : _store$getState.shop.timezone) || 'Asia/Shanghai';
199
205
  var formatTimeLineDta = function formatTimeLineDta(data) {
@@ -224,7 +230,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
224
230
  return isNegative ? "-".concat(tag !== 'point_card' ? symbol : '').concat(absAmount) : "".concat(tag !== 'point_card' ? symbol : '').concat(amount);
225
231
  };
226
232
  var getDetail = /*#__PURE__*/function () {
227
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
233
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
228
234
  var _yield$getDetailApi, _yield$getDetailApi$a, apple_wallet_url, _yield$getDetailApi$g, google_wallet_url;
229
235
  return _regeneratorRuntime().wrap(function _callee$(_context) {
230
236
  while (1) switch (_context.prev = _context.next) {
@@ -248,7 +254,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
248
254
  }, _callee);
249
255
  }));
250
256
  return function getDetail() {
251
- return _ref2.apply(this, arguments);
257
+ return _ref3.apply(this, arguments);
252
258
  };
253
259
  }();
254
260
  useEffect(function () {
@@ -288,7 +294,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
288
294
  }, amount && currency_symbol ? formatCurrencyAmount(amount, action === 'order_expend') : ''));
289
295
  };
290
296
  var getTimeTreeList = /*#__PURE__*/function () {
291
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
297
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
292
298
  var _yield$getAssetList, _yield$getAssetList$l, list, filterList, i, _filterList$i, _filterList$i2, _filterList$i3, _filterList$i4;
293
299
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
294
300
  while (1) switch (_context2.prev = _context2.next) {
@@ -340,7 +346,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
340
346
  }, _callee2, null, [[1, 12, 15, 18]]);
341
347
  }));
342
348
  return function getTimeTreeList() {
343
- return _ref3.apply(this, arguments);
349
+ return _ref4.apply(this, arguments);
344
350
  };
345
351
  }();
346
352
  useEffect(function () {
@@ -355,7 +361,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
355
361
  * @returns Promise<boolean> 是否添加成功
356
362
  */
357
363
  var addWalletPass = /*#__PURE__*/function () {
358
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url, type) {
364
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url, type) {
359
365
  var response, passData, blob, downloadUrl, a;
360
366
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
361
367
  while (1) switch (_context3.prev = _context3.next) {
@@ -433,11 +439,11 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
433
439
  }, _callee3, null, [[8, 30, 34, 37]]);
434
440
  }));
435
441
  return function addWalletPass(_x, _x2) {
436
- return _ref4.apply(this, arguments);
442
+ return _ref5.apply(this, arguments);
437
443
  };
438
444
  }();
439
445
  var onAppleClick = /*#__PURE__*/function () {
440
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
446
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
441
447
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
442
448
  while (1) switch (_context4.prev = _context4.next) {
443
449
  case 0:
@@ -450,11 +456,11 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
450
456
  }, _callee4);
451
457
  }));
452
458
  return function onAppleClick() {
453
- return _ref5.apply(this, arguments);
459
+ return _ref6.apply(this, arguments);
454
460
  };
455
461
  }();
456
462
  var onGoogleClick = /*#__PURE__*/function () {
457
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
463
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
458
464
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
459
465
  while (1) switch (_context5.prev = _context5.next) {
460
466
  case 0:
@@ -467,7 +473,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
467
473
  }, _callee5);
468
474
  }));
469
475
  return function onGoogleClick() {
470
- return _ref6.apply(this, arguments);
476
+ return _ref7.apply(this, arguments);
471
477
  };
472
478
  }();
473
479
  var isWechat = function isWechat() {
@@ -51,6 +51,7 @@ var Voucher = Provider(function (props) {
51
51
  // 渲染卡片项
52
52
  var renderItem = function renderItem(item) {
53
53
  return /*#__PURE__*/React.createElement(WalletCard, {
54
+ balanceTitle: item.tag === 'good_pass' ? locales.getText('page.wallet.goodPass') : undefined,
54
55
  item: item,
55
56
  currentId: globalState.currentId,
56
57
  onClick: function onClick() {
@@ -87,6 +87,12 @@ var Wallet = Provider(function () {
87
87
  return;
88
88
  }
89
89
  }
90
+ if (tag === 'good_pass') {
91
+ if (!result['product_voucher']) {
92
+ result['product_voucher'] = [];
93
+ }
94
+ result['product_voucher'].push(item);
95
+ }
90
96
  result[tag].push(item);
91
97
  });
92
98
  return result;
@@ -651,8 +657,16 @@ var Wallet = Provider(function () {
651
657
  }
652
658
  });
653
659
  };
660
+ var getBalanceTitle = function getBalanceTitle() {
661
+ if (global_wallet.currentTag === 'point_card') {
662
+ return locales.getText('page.wallet.points');
663
+ } else if (global_wallet.currentTag === 'good_pass') {
664
+ return locales.getText('page.wallet.goodPass');
665
+ }
666
+ return undefined;
667
+ };
654
668
  return /*#__PURE__*/React.createElement(PisellWalletPassCard, {
655
- balanceTitle: global_wallet.currentTag === 'point_card' ? locales.getText('page.wallet.points') : undefined,
669
+ balanceTitle: getBalanceTitle(),
656
670
  showDetail: false,
657
671
  showRedeem: false,
658
672
  showQrCode: false,
@@ -19,6 +19,7 @@ declare const _default: {
19
19
  'page.wallet.cardBalance': string;
20
20
  'page.wallet.voucherBalance': string;
21
21
  'page.wallet.points': string;
22
+ 'page.wallet.goodPass': string;
22
23
  'page.wallet.cardName': string;
23
24
  'page.wallet.carNumber': string;
24
25
  'page.wallet.balance': string;
@@ -61,6 +62,7 @@ declare const _default: {
61
62
  'page.wallet.cardBalance': string;
62
63
  'page.wallet.voucherBalance': string;
63
64
  'page.wallet.points': string;
65
+ 'page.wallet.goodPass': string;
64
66
  'page.wallet.cardName': string;
65
67
  'page.wallet.carNumber': string;
66
68
  'page.wallet.balance': string;
@@ -103,6 +105,7 @@ declare const _default: {
103
105
  'page.wallet.cardBalance': string;
104
106
  'page.wallet.voucherBalance': string;
105
107
  'page.wallet.points': string;
108
+ 'page.wallet.goodPass': string;
106
109
  'page.wallet.cardName': string;
107
110
  'page.wallet.carNumber': string;
108
111
  'page.wallet.balance': string;
@@ -20,6 +20,7 @@ export default {
20
20
  'page.wallet.cardBalance': 'Card balance',
21
21
  'page.wallet.voucherBalance': 'Voucher balance',
22
22
  'page.wallet.points': 'Points',
23
+ 'page.wallet.goodPass': 'Credits remaining',
23
24
  'page.wallet.cardName': 'Card name',
24
25
  'page.wallet.carNumber': 'Card number',
25
26
  'page.wallet.balance': 'Balance',
@@ -65,6 +66,7 @@ export default {
65
66
  'page.wallet.cardBalance': '卡余额',
66
67
  'page.wallet.voucherBalance': '代金券余额',
67
68
  'page.wallet.points': '积分',
69
+ 'page.wallet.goodPass': '剩余额度',
68
70
  'page.wallet.cardName': '卡片名称',
69
71
  'page.wallet.carNumber': '卡号',
70
72
  'page.wallet.balance': '余额',
@@ -109,6 +111,7 @@ export default {
109
111
  'page.wallet.cardBalance': '卡餘額',
110
112
  'page.wallet.voucherBalance': '代金券餘額',
111
113
  'page.wallet.points': '積分',
114
+ 'page.wallet.goodPass': '剩餘額度',
112
115
  'page.wallet.cardName': '卡片名稱',
113
116
  'page.wallet.carNumber': '卡號',
114
117
  'page.wallet.balance': '餘額',
@@ -9,7 +9,7 @@ export interface WalletCardProps {
9
9
  available: WalletCardItemProps[];
10
10
  unavailable: WalletCardItemProps[];
11
11
  }
12
- export declare type WalletCardType = 'gift_card' | 'product_voucher' | 'point_card' | 'product_discount_card';
12
+ export declare type WalletCardType = 'gift_card' | 'product_voucher' | 'point_card' | 'product_discount_card' | 'good_pass';
13
13
  export interface WalletListProps {
14
14
  gift_card: IWalletListItemProps[];
15
15
  product_voucher: IWalletListItemProps[];
@@ -30,7 +30,7 @@ export var formatDataToGroups = function formatDataToGroups(dataList) {
30
30
  export var calculateTotalValue = function calculateTotalValue(dataList) {
31
31
  var valueField = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'balance';
32
32
  var enabledCards = dataList.filter(function (item) {
33
- return item.limit_status === 'enable';
33
+ return item.limit_status === 'enable' && item.tag !== 'good_pass';
34
34
  });
35
35
  return enabledCards.reduce(function (sum, item) {
36
36
  return sum + Number(item[valueField] || 0);
@@ -596,11 +596,15 @@ var WalletList = Provider(function (props) {
596
596
  value = _ref8[1];
597
597
  return value === key;
598
598
  })) === null || _Object$entries$find === void 0 ? void 0 : _Object$entries$find[0];
599
+ var value = balanceKey ? balance[balanceKey] || 0 : 0;
600
+ if (balanceKey === 'voucher_count') {
601
+ value += balance.good_pass_count;
602
+ }
599
603
  return {
600
604
  key: key,
601
605
  label: key,
602
606
  hidden: false,
603
- value: balanceKey ? balance[balanceKey] || 0 : 0
607
+ value: value
604
608
  };
605
609
  });
606
610
  // 构建WalletCard的props
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Modal as AntModal, ModalFuncProps as AntModalFuncProps, ModalProps as AntModalProps } from 'antd';
3
2
  import './index.less';
4
3
  interface ModalProps extends AntModalProps {
@@ -40,13 +40,14 @@ var import_hooks = require("../../../hooks");
40
40
  var import_context = require("../../../context");
41
41
  var import_Total = __toESM(require("./Total"));
42
42
  var import_utils2 = require("../../../utils");
43
+ var import_Voucher = __toESM(require("../../Voucher"));
43
44
  var import_index = require("./index.less");
44
45
  var CartItem = () => {
45
46
  var _a, _b;
46
47
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
47
48
  const appointmentBookingAccount = (0, import_hooks.useAppointmentBookingAccount)();
48
49
  const { carts, summary, isLastStep, currentStep, resources } = (0, import_context.useAppointmentBookingContext)();
49
- const { accountLists } = appointmentBookingAccount;
50
+ const { accountLists, currentUser } = appointmentBookingAccount;
50
51
  console.log(summary, carts, (0, import_utils2.formatCarts)(carts, resources), "accountLists");
51
52
  const holderIds = (0, import_react.useMemo)(() => {
52
53
  return accountLists.map((item) => item.id);
@@ -91,7 +92,7 @@ var CartItem = () => {
91
92
  onChange: (e, type, key) => handleClickCard(e, type, key)
92
93
  }
93
94
  )),
94
- /* @__PURE__ */ import_react.default.createElement("div", { className: "event-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
95
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "event-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Voucher.default, { currentUser, products: carts }), /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
95
96
  ));
96
97
  };
97
98
  var Item_default = CartItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Cart: ({ open, onCancel }: any) => JSX.Element;
4
3
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Layout: () => JSX.Element;
3
4
  export default Layout;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const CalendarDate: (props: any) => JSX.Element;
3
4
  export default CalendarDate;
@@ -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;
@@ -0,0 +1,4 @@
1
+ import '../../../booking/components/voucher/index.less';
2
+ import './index.less';
3
+ declare const VoucherCard: (props: any) => JSX.Element;
4
+ export default VoucherCard;
@@ -0,0 +1,209 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/appointmentBooking/components/Voucher/index.tsx
30
+ var Voucher_exports = {};
31
+ __export(Voucher_exports, {
32
+ default: () => Voucher_default
33
+ });
34
+ module.exports = __toCommonJS(Voucher_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_ChevronDown = __toESM(require("@pisell/icon/es/ChevronDown"));
37
+ var import_UserCircle = __toESM(require("@pisell/icon/es/UserCircle"));
38
+ var import_classnames = __toESM(require("classnames"));
39
+ var import_antd = require("antd");
40
+ var import_utils = require("@pisell/utils");
41
+ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
42
+ var import_materials = require("@pisell/materials");
43
+ var import_icons = require("@ant-design/icons");
44
+ var import_hooks = require("../../hooks");
45
+ var import_voucher = require("../../../booking/components/voucher/index.less");
46
+ var import_index = require("./index.less");
47
+ var ShopDiscountHooks = {
48
+ onInited: "shopDiscount:onInited",
49
+ onDestroy: "shopDiscount:onDestroy",
50
+ onLoadDiscountList: "shopDiscount:onLoadDiscountList",
51
+ onCustomerChange: "shopDiscount:onCustomerChange",
52
+ onDiscountListChange: "shopDiscount:onDiscountListChange",
53
+ onRulesListChange: "shopDiscount:onRulesListChange",
54
+ onLoadPrepareCalcResult: "shopDiscount:onLoadPrepareCalcResult"
55
+ };
56
+ var VoucherCard = (props) => {
57
+ var _a, _b;
58
+ const { products, currentUser } = props;
59
+ const context = (0, import_useEngineContext.default)();
60
+ const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
61
+ const shopDiscount = (0, import_hooks.useShopDiscount)();
62
+ const [showDetail, setShowDetail] = (0, import_react.useState)(true);
63
+ const { pisellos, action, token, store } = (_a = context.appHelper) == null ? void 0 : _a.utils;
64
+ const { utils } = context.appHelper || {};
65
+ const [code, setCode] = (0, import_react.useState)("");
66
+ const [discountList, setDisCountList] = (0, import_react.useState)([]);
67
+ const productRef = (0, import_react.useRef)(products);
68
+ const cart = (_b = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _b.cart;
69
+ const isUserLoggedIn = (0, import_react.useMemo)(() => {
70
+ var _a2, _b2;
71
+ return !!((_b2 = (_a2 = utils == null ? void 0 : utils.token) == null ? void 0 : _a2.get) == null ? void 0 : _b2.call(_a2)) || false;
72
+ }, [store]);
73
+ const availableData = (0, import_react.useMemo)(() => {
74
+ return discountList.filter((item) => !!item.isAvailable).map((discount) => {
75
+ return {
76
+ ...discount,
77
+ savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
78
+ };
79
+ });
80
+ }, [discountList]);
81
+ (0, import_react.useEffect)(() => {
82
+ const shopDiscount2 = pisellos.getModule("shopDiscount");
83
+ shopDiscount2.setCustomer(currentUser);
84
+ }, [currentUser.id]);
85
+ (0, import_react.useEffect)(() => {
86
+ shopDiscount.setProductList(products);
87
+ }, [products]);
88
+ (0, import_react.useEffect)(() => {
89
+ if (productRef.current === products) {
90
+ return;
91
+ }
92
+ const val = shopDiscount.calcDiscount(products);
93
+ console.log("input: ", products);
94
+ console.log("output: ", val);
95
+ productRef.current = val.productList;
96
+ cart == null ? void 0 : cart.batchSetItems(val.productList);
97
+ }, [products]);
98
+ (0, import_react.useEffect)(() => {
99
+ pisellos.effects.on(
100
+ ShopDiscountHooks.onLoadPrepareCalcResult,
101
+ (result) => {
102
+ cart == null ? void 0 : cart.batchSetItems(result.productList);
103
+ }
104
+ );
105
+ pisellos.effects.on(
106
+ ShopDiscountHooks.onDiscountListChange,
107
+ (discount) => {
108
+ console.log(discount, "discountChange");
109
+ setDisCountList(discount);
110
+ }
111
+ );
112
+ }, []);
113
+ const onScanCode = async () => {
114
+ const val = await shopDiscount.scanCode(code);
115
+ if (val == null ? void 0 : val.isAvailable) {
116
+ cart == null ? void 0 : cart.batchSetItems(val.productList);
117
+ } else {
118
+ (0, import_materials.PisellToast)({
119
+ content: import_utils.locales.getText("pisell2.text.goodpass.code-invalid")
120
+ });
121
+ }
122
+ };
123
+ const renderLoginCard = () => {
124
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "login-card" }, /* @__PURE__ */ import_react.default.createElement(import_UserCircle.default, { style: { fontSize: 28 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: "text-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
125
+ import_materials.PisellText,
126
+ {
127
+ className: "login-btn",
128
+ onClick: () => {
129
+ if (!action) return;
130
+ action({
131
+ type: "pisell1.login",
132
+ data: {},
133
+ callback: (status) => {
134
+ if (status === "success") {
135
+ }
136
+ }
137
+ });
138
+ }
139
+ },
140
+ import_utils.locales.getText("pisell2.text.goodpass.login")
141
+ ), /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.text.goodpass.login-tip"))));
142
+ };
143
+ const renderVoucherInfo = () => {
144
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-title" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "voucher-title-left" }, import_utils.locales.getText("pisell2.text.goodpass")), /* @__PURE__ */ import_react.default.createElement(
145
+ "span",
146
+ {
147
+ className: "voucher-title-right",
148
+ onClick: () => {
149
+ console.log("showDetail: ", showDetail);
150
+ setShowDetail(!showDetail);
151
+ }
152
+ },
153
+ import_utils.locales.getText("pisell2.text.details"),
154
+ " ",
155
+ /* @__PURE__ */ import_react.default.createElement(
156
+ import_ChevronDown.default,
157
+ {
158
+ className: (0, import_classnames.default)("voucher-right-icon", {
159
+ show: showDetail
160
+ })
161
+ }
162
+ )
163
+ )), /* @__PURE__ */ import_react.default.createElement(
164
+ "div",
165
+ {
166
+ className: (0, import_classnames.default)("voucher-detail", {
167
+ show: showDetail
168
+ })
169
+ },
170
+ (availableData == null ? void 0 : availableData.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(
171
+ import_materials.PisellGoodPassCard,
172
+ {
173
+ style: { width: "100%" },
174
+ dataSource: availableData,
175
+ onChange: (val) => {
176
+ var _a2, _b2;
177
+ const detail = shopDiscount.setDiscountSelected({
178
+ discountId: val.id,
179
+ isSelected: val.isSelected
180
+ });
181
+ (_b2 = (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a2.cart) == null ? void 0 : _b2.batchSetItems(detail.productList);
182
+ }
183
+ }
184
+ ) : null,
185
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-code-input-wrapper" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "voucher-code-input" }, /* @__PURE__ */ import_react.default.createElement("div", { style: { whiteSpace: "nowrap" } }, import_utils.locales.getText("pisell2.text.goodpass.code"), ":"), /* @__PURE__ */ import_react.default.createElement(
186
+ import_materials.PisellInput,
187
+ {
188
+ value: code,
189
+ onChange: (e) => {
190
+ var _a2;
191
+ setCode((_a2 = e.target) == null ? void 0 : _a2.value);
192
+ },
193
+ size: "small",
194
+ placeholder: import_utils.locales.getText(
195
+ "pisell2.text.goodpass.enter-code"
196
+ ),
197
+ suffix: /* @__PURE__ */ import_react.default.createElement(import_materials.PisellTooltip, { title: "" }, /* @__PURE__ */ import_react.default.createElement(
198
+ import_icons.QuestionCircleOutlined,
199
+ {
200
+ style: { color: "rgba(0,0,0,.45)" }
201
+ }
202
+ ))
203
+ }
204
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "small", onClick: onScanCode, disabled: !code }, import_utils.locales.getText("pisell2.text.apply")))
205
+ ));
206
+ };
207
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-voucher-container" }, isUserLoggedIn ? renderVoucherInfo() : renderLoginCard());
208
+ };
209
+ var Voucher_default = VoucherCard;
@@ -0,0 +1,26 @@
1
+ .pisell-lowcode__booking-footer-voucher-container {
2
+ .login-card {
3
+ border-radius: 8px;
4
+ border: 1px solid var(--Gray-300, #d0d5dd);
5
+ background: #fff;
6
+ display: flex;
7
+ padding: 12px;
8
+ justify-content: center;
9
+ align-items: center;
10
+ gap: 10px;
11
+ color: var(--Gray-500, #667085);
12
+ font-family: Inter;
13
+ font-size: 14px;
14
+ font-style: normal;
15
+ font-weight: 600;
16
+
17
+ .text-wrapper {
18
+ max-width: 200px;
19
+ }
20
+
21
+ .login-btn {
22
+ cursor: pointer;
23
+ color: #8157d5;
24
+ }
25
+ }
26
+ }
@@ -1,4 +1,5 @@
1
1
  export declare const useAppointmentBooking: () => any;
2
+ export declare const useShopDiscount: () => any;
2
3
  export declare const useAppointmentBookingStep: () => void;
3
4
  export declare const useAppointmentBookingProduct: () => void;
4
5
  export declare const useAppointmentBookingCart: () => {
@@ -35,7 +35,8 @@ __export(hooks_exports, {
35
35
  useAppointmentBookingLogin: () => useAppointmentBookingLogin,
36
36
  useAppointmentBookingProduct: () => useAppointmentBookingProduct,
37
37
  useAppointmentBookingResource: () => useAppointmentBookingResource,
38
- useAppointmentBookingStep: () => useAppointmentBookingStep
38
+ useAppointmentBookingStep: () => useAppointmentBookingStep,
39
+ useShopDiscount: () => useShopDiscount
39
40
  });
40
41
  module.exports = __toCommonJS(hooks_exports);
41
42
  var import_useEngineContext = require("../../hooks/useEngineContext");
@@ -48,6 +49,10 @@ var useAppointmentBooking = () => {
48
49
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
49
50
  return pisellOS.getModule("appointmentBooking");
50
51
  };
52
+ var useShopDiscount = () => {
53
+ const pisellOS = (0, import_useEngineContext.usePisellOS)();
54
+ return pisellOS.getModule("shopDiscount");
55
+ };
51
56
  var useAppointmentBookingStep = () => {
52
57
  var _a, _b, _c;
53
58
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
@@ -184,5 +189,6 @@ var useAppointmentBookingResource = () => {
184
189
  useAppointmentBookingLogin,
185
190
  useAppointmentBookingProduct,
186
191
  useAppointmentBookingResource,
187
- useAppointmentBookingStep
192
+ useAppointmentBookingStep,
193
+ useShopDiscount
188
194
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const AppointmentBooking: () => JSX.Element;
3
4
  export default AppointmentBooking;
@@ -75,6 +75,15 @@ declare const _default: {
75
75
  'pisell2.appointment.edit.service': string;
76
76
  'pisell2.appointment.remove.guest': string;
77
77
  'pisell2.appointment.no.available.service': string;
78
+ 'pisell2.text.apply': string;
79
+ 'pisell2.text.goodpass': string;
80
+ 'pisell2.text.goodpass.product-vouchers': string;
81
+ 'pisell2.text.goodpass.view-more': string;
82
+ 'pisell2.text.goodpass.code': string;
83
+ 'pisell2.text.goodpass.enter-code': string;
84
+ 'pisell2.text.goodpass.code-invalid': string;
85
+ 'pisell2.text.goodpass.login': string;
86
+ 'pisell2.text.goodpass.login-tip': string;
78
87
  };
79
88
  'zh-CN': {
80
89
  'pisell2.event.calendar.limit.unavailable': string;
@@ -152,6 +161,15 @@ declare const _default: {
152
161
  'pisell2.appointment.edit.service': string;
153
162
  'pisell2.appointment.remove.guest': string;
154
163
  'pisell2.appointment.no.available.service': string;
164
+ 'pisell2.text.apply': string;
165
+ 'pisell2.text.goodpass': string;
166
+ 'pisell2.text.goodpass.product-vouchers': string;
167
+ 'pisell2.text.goodpass.view-more': string;
168
+ 'pisell2.text.goodpass.code': string;
169
+ 'pisell2.text.goodpass.enter-code': string;
170
+ 'pisell2.text.goodpass.code-invalid': string;
171
+ 'pisell2.text.goodpass.login': string;
172
+ 'pisell2.text.goodpass.login-tip': string;
155
173
  };
156
174
  'zh-HK': {
157
175
  'pisell2.event.calendar.limit.unavailable': string;
@@ -229,6 +247,15 @@ declare const _default: {
229
247
  'pisell2.appointment.edit.service': string;
230
248
  'pisell2.appointment.remove.guest': string;
231
249
  'pisell2.appointment.no.available.service': string;
250
+ 'pisell2.text.apply': string;
251
+ 'pisell2.text.goodpass': string;
252
+ 'pisell2.text.goodpass.product-vouchers': string;
253
+ 'pisell2.text.goodpass.view-more': string;
254
+ 'pisell2.text.goodpass.code': string;
255
+ 'pisell2.text.goodpass.enter-code': string;
256
+ 'pisell2.text.goodpass.code-invalid': string;
257
+ 'pisell2.text.goodpass.login': string;
258
+ 'pisell2.text.goodpass.login-tip': string;
232
259
  };
233
260
  };
234
261
  export default _default;