@pisell/private-materials 3.0.197 → 3.0.199

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 (198) 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 +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/booking/components/customSelect/index.d.ts +0 -1
  12. package/es/components/booking/components/customSelect/index.js +2 -6
  13. package/es/components/booking/components/footer/amount.js +22 -45
  14. package/es/components/booking/components/footer/index.js +40 -84
  15. package/es/components/booking/components/footer/utils.js +32 -218
  16. package/es/components/booking/info/addServiceVariant/index.js +1 -8
  17. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  18. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
  19. package/es/components/booking/info/clientVariant/vertical/index.js +4 -33
  20. package/es/components/booking/info/main.js +8 -20
  21. package/es/components/booking/info/model.js +0 -3
  22. package/es/components/booking/info/pet/index.js +5 -54
  23. package/es/components/booking/info/service/addService/index.js +20 -127
  24. package/es/components/booking/info/service/addService/index.less +3 -13
  25. package/es/components/booking/info/service/addService/utils.d.ts +2 -11
  26. package/es/components/booking/info/service/addService/utils.js +24 -49
  27. package/es/components/booking/info/service/editService/index.js +41 -232
  28. package/es/components/booking/info/service/editService/index.less +13 -18
  29. package/es/components/booking/info/utils.d.ts +0 -9
  30. package/es/components/booking/info/utils.js +0 -13
  31. package/es/components/booking/locales.d.ts +0 -60
  32. package/es/components/booking/locales.js +3 -75
  33. package/es/components/booking/model.d.ts +1 -4
  34. package/es/components/booking/model.js +2 -4
  35. package/es/components/booking/utils.d.ts +3 -12
  36. package/es/components/booking/utils.js +22 -126
  37. package/es/components/eftpos/form/index.js +12 -6
  38. package/es/components/eftpos/group/index.d.ts +1 -2
  39. package/es/components/eftpos/group/index.js +1 -2
  40. package/es/components/eftpos/index.js +2 -2
  41. package/es/components/eftpos/receipt/index.d.ts +24 -0
  42. package/es/components/eftpos/receipt/index.js +96 -0
  43. package/es/components/eftposPay/helper.d.ts +1 -0
  44. package/es/components/eftposPay/helper.js +14 -0
  45. package/es/components/eftposPay/hooks.d.ts +1 -1
  46. package/es/components/eftposPay/tyro/index.js +51 -20
  47. package/es/index.d.ts +0 -1
  48. package/es/index.js +1 -2
  49. package/lib/components/booking/components/customSelect/index.d.ts +0 -1
  50. package/lib/components/booking/components/customSelect/index.js +2 -6
  51. package/lib/components/booking/components/footer/amount.js +8 -26
  52. package/lib/components/booking/components/footer/index.js +4 -25
  53. package/lib/components/booking/components/footer/utils.js +31 -144
  54. package/lib/components/booking/info/addServiceVariant/index.js +0 -5
  55. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  56. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
  57. package/lib/components/booking/info/clientVariant/vertical/index.js +10 -36
  58. package/lib/components/booking/info/main.js +4 -11
  59. package/lib/components/booking/info/model.js +0 -3
  60. package/lib/components/booking/info/pet/index.js +25 -61
  61. package/lib/components/booking/info/service/addService/index.js +28 -95
  62. package/lib/components/booking/info/service/addService/index.less +3 -13
  63. package/lib/components/booking/info/service/addService/utils.d.ts +2 -11
  64. package/lib/components/booking/info/service/addService/utils.js +10 -31
  65. package/lib/components/booking/info/service/editService/index.js +122 -271
  66. package/lib/components/booking/info/service/editService/index.less +13 -18
  67. package/lib/components/booking/info/utils.d.ts +0 -9
  68. package/lib/components/booking/info/utils.js +0 -6
  69. package/lib/components/booking/locales.d.ts +0 -60
  70. package/lib/components/booking/locales.js +3 -63
  71. package/lib/components/booking/model.d.ts +1 -4
  72. package/lib/components/booking/model.js +2 -4
  73. package/lib/components/booking/utils.d.ts +3 -12
  74. package/lib/components/booking/utils.js +15 -79
  75. package/lib/components/eftpos/form/index.js +12 -6
  76. package/lib/components/eftpos/group/index.d.ts +1 -2
  77. package/lib/components/eftpos/group/index.js +0 -1
  78. package/lib/components/eftpos/index.js +2 -2
  79. package/lib/components/eftpos/receipt/index.d.ts +24 -0
  80. package/lib/components/eftpos/receipt/index.js +88 -0
  81. package/lib/components/eftposPay/helper.d.ts +1 -0
  82. package/lib/components/eftposPay/helper.js +21 -0
  83. package/lib/components/eftposPay/hooks.d.ts +1 -1
  84. package/lib/components/eftposPay/tyro/index.js +36 -7
  85. package/lib/index.d.ts +0 -1
  86. package/lib/index.js +0 -3
  87. package/package.json +3 -3
  88. package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  89. package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -37
  90. package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  91. package/es/components/booking/info/dateRange/index.d.ts +0 -5
  92. package/es/components/booking/info/dateRange/index.js +0 -98
  93. package/es/components/booking/info/dateRange/index.less +0 -21
  94. package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  95. package/es/components/booking/info/pet/ChangePetModal/index.js +0 -118
  96. package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
  97. package/es/components/booking/info/service2/Lists.d.ts +0 -3
  98. package/es/components/booking/info/service2/Lists.js +0 -158
  99. package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  100. package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
  101. package/es/components/booking/info/service2/index.d.ts +0 -3
  102. package/es/components/booking/info/service2/index.js +0 -58
  103. package/es/components/booking/info/service2/status.d.ts +0 -31
  104. package/es/components/booking/info/service2/status.js +0 -78
  105. package/es/components/booking/info/service2/utils.d.ts +0 -145
  106. package/es/components/booking/info/service2/utils.js +0 -436
  107. package/es/components/booking/materiels/holder/index.d.ts +0 -7
  108. package/es/components/booking/materiels/holder/index.js +0 -51
  109. package/es/components/shoppingCart/Provider.d.ts +0 -3
  110. package/es/components/shoppingCart/Provider.js +0 -86
  111. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  112. package/es/components/shoppingCart/components/Cart/Product.js +0 -96
  113. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
  114. package/es/components/shoppingCart/components/Cart/index.js +0 -72
  115. package/es/components/shoppingCart/components/Cart/index.less +0 -68
  116. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
  117. package/es/components/shoppingCart/components/Empty/index.js +0 -14
  118. package/es/components/shoppingCart/components/Empty/index.less +0 -19
  119. package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
  120. package/es/components/shoppingCart/components/Render/index.js +0 -68
  121. package/es/components/shoppingCart/components/Render/index.less +0 -2
  122. package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  123. package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
  124. package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  125. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  126. package/es/components/shoppingCart/hooks/useAddService.js +0 -23
  127. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  128. package/es/components/shoppingCart/hooks/useClearCart.js +0 -54
  129. package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
  130. package/es/components/shoppingCart/hooks/useContext.js +0 -5
  131. package/es/components/shoppingCart/index.d.ts +0 -4
  132. package/es/components/shoppingCart/index.js +0 -24
  133. package/es/components/shoppingCart/locales.d.ts +0 -33
  134. package/es/components/shoppingCart/locales.js +0 -38
  135. package/es/components/shoppingCart/mock.d.ts +0 -40
  136. package/es/components/shoppingCart/mock.js +0 -40
  137. package/es/components/shoppingCart/status.d.ts +0 -2
  138. package/es/components/shoppingCart/status.js +0 -22
  139. package/es/components/shoppingCart/type.d.ts +0 -39
  140. package/es/components/shoppingCart/type.js +0 -1
  141. package/es/components/shoppingCart/utils.d.ts +0 -63
  142. package/es/components/shoppingCart/utils.js +0 -119
  143. package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
  144. package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -59
  145. package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
  146. package/lib/components/booking/info/dateRange/index.d.ts +0 -5
  147. package/lib/components/booking/info/dateRange/index.js +0 -111
  148. package/lib/components/booking/info/dateRange/index.less +0 -21
  149. package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
  150. package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -110
  151. package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
  152. package/lib/components/booking/info/service2/Lists.d.ts +0 -3
  153. package/lib/components/booking/info/service2/Lists.js +0 -113
  154. package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
  155. package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
  156. package/lib/components/booking/info/service2/index.d.ts +0 -3
  157. package/lib/components/booking/info/service2/index.js +0 -75
  158. package/lib/components/booking/info/service2/status.d.ts +0 -31
  159. package/lib/components/booking/info/service2/status.js +0 -81
  160. package/lib/components/booking/info/service2/utils.d.ts +0 -145
  161. package/lib/components/booking/info/service2/utils.js +0 -320
  162. package/lib/components/booking/materiels/holder/index.d.ts +0 -7
  163. package/lib/components/booking/materiels/holder/index.js +0 -65
  164. package/lib/components/shoppingCart/Provider.d.ts +0 -3
  165. package/lib/components/shoppingCart/Provider.js +0 -110
  166. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
  167. package/lib/components/shoppingCart/components/Cart/Product.js +0 -89
  168. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
  169. package/lib/components/shoppingCart/components/Cart/index.js +0 -77
  170. package/lib/components/shoppingCart/components/Cart/index.less +0 -68
  171. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
  172. package/lib/components/shoppingCart/components/Empty/index.js +0 -43
  173. package/lib/components/shoppingCart/components/Empty/index.less +0 -19
  174. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
  175. package/lib/components/shoppingCart/components/Render/index.js +0 -79
  176. package/lib/components/shoppingCart/components/Render/index.less +0 -2
  177. package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
  178. package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -116
  179. package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
  180. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
  181. package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
  182. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
  183. package/lib/components/shoppingCart/hooks/useClearCart.js +0 -71
  184. package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
  185. package/lib/components/shoppingCart/hooks/useContext.js +0 -31
  186. package/lib/components/shoppingCart/index.d.ts +0 -4
  187. package/lib/components/shoppingCart/index.js +0 -60
  188. package/lib/components/shoppingCart/locales.d.ts +0 -33
  189. package/lib/components/shoppingCart/locales.js +0 -56
  190. package/lib/components/shoppingCart/mock.d.ts +0 -40
  191. package/lib/components/shoppingCart/mock.js +0 -76
  192. package/lib/components/shoppingCart/status.d.ts +0 -2
  193. package/lib/components/shoppingCart/status.js +0 -60
  194. package/lib/components/shoppingCart/type.d.ts +0 -39
  195. package/lib/components/shoppingCart/type.js +0 -17
  196. package/lib/components/shoppingCart/utils.d.ts +0 -63
  197. package/lib/components/shoppingCart/utils.js +0 -92
  198. package/lowcode/shopping-cart/meta.ts +0 -98
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { RadioGroupProps } from 'antd';
3
3
  export declare const CheckboxGroup: ({ direction, options, ...props }: any) => React.JSX.Element;
4
- export declare const RadioGroup: ({ direction, options, component, ...props }: RadioGroupProps & {
4
+ export declare const RadioGroup: ({ direction, options, ...props }: RadioGroupProps & {
5
5
  direction?: "vertical" | undefined;
6
- component: string;
7
6
  }) => React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["direction", "options"],
2
2
  _excluded2 = ["label", "value"],
3
- _excluded3 = ["direction", "options", "component"],
3
+ _excluded3 = ["direction", "options"],
4
4
  _excluded4 = ["label", "value"];
5
5
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6
6
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
@@ -38,7 +38,6 @@ export var CheckboxGroup = function CheckboxGroup(_ref) {
38
38
  export var RadioGroup = function RadioGroup(_ref2) {
39
39
  var direction = _ref2.direction,
40
40
  options = _ref2.options,
41
- component = _ref2.component,
42
41
  props = _objectWithoutProperties(_ref2, _excluded3);
43
42
  if (direction === 'vertical') {
44
43
  return /*#__PURE__*/React.createElement(Radio.Group, props, /*#__PURE__*/React.createElement(Space, {
@@ -24,8 +24,8 @@ import Drawer from "../booking/components/drawer";
24
24
  import Log from "./log";
25
25
  import localeTexts from "./locales";
26
26
  import { usePairTerminalo } from "./hooks";
27
- import ApiKeyIcon from "./icon/apiKey";
28
- import DeviceIcon from "./icon/device";
27
+ import DeviceIcon from "./icon/apiKey";
28
+ import ApiKeyIcon from "./icon/device";
29
29
  import { Eftpos, getCommByFields, DeviceEnum, getDefaultValue } from "./const";
30
30
  import "./index.less";
31
31
  locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ /**
3
+ * @title: 自定义组件设置
4
+ * @description: 自定义组件设置
5
+ * @param {any} commConfig 当前组件配置
6
+ * @param {string} name 上游name(用于嵌套 xxx:{yyy:''})
7
+ * @return {*}
8
+ * @Author: hongbing.wang
9
+ * @Date: 2024-08-20 11:10
10
+ */
11
+ export declare const getCommName: (commConfig: any, name: string[]) => any;
12
+ /**
13
+ * @title: 自定义组件结果设置
14
+ * @description: 自定义组件结果设置
15
+ * @param {any} commConfig 当前组件配置
16
+ * @return {*}
17
+ * @Author: hongbing.wang
18
+ * @Date: 2024-08-20 11:11
19
+ */
20
+ export declare const getCommDefaultVal: (commConfig: any) => {
21
+ [x: number]: any;
22
+ };
23
+ declare const _default: (props: any) => React.JSX.Element;
24
+ export default _default;
@@ -0,0 +1,96 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _excluded = ["input"],
3
+ _excluded2 = ["input"];
4
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
10
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
15
+ 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."); }
16
+ 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); }
17
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
18
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
19
+ 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; }
20
+ import React, { useMemo, useState } from 'react';
21
+ import { Form } from 'antd';
22
+ import { CheckboxGroup, RadioGroup } from "../group";
23
+
24
+ /**
25
+ * @title: 自定义组件设置
26
+ * @description: 自定义组件设置
27
+ * @param {any} commConfig 当前组件配置
28
+ * @param {string} name 上游name(用于嵌套 xxx:{yyy:''})
29
+ * @return {*}
30
+ * @Author: hongbing.wang
31
+ * @Date: 2024-08-20 11:10
32
+ */
33
+ export var getCommName = function getCommName(commConfig, name) {
34
+ commConfig.receipts.__sourceName = commConfig.receipts.name;
35
+ commConfig.receiptList.__sourceName = commConfig.receiptList.name;
36
+ commConfig.receipts.name = name.length > 0 ? [].concat(_toConsumableArray(name), [commConfig.receipts.name]) : commConfig.receipts.name;
37
+ commConfig.receiptList.name = name.length > 0 ? [].concat(_toConsumableArray(name), [commConfig.receiptList.name]) : commConfig.receiptList.name;
38
+ return commConfig;
39
+ };
40
+
41
+ /**
42
+ * @title: 自定义组件结果设置
43
+ * @description: 自定义组件结果设置
44
+ * @param {any} commConfig 当前组件配置
45
+ * @return {*}
46
+ * @Author: hongbing.wang
47
+ * @Date: 2024-08-20 11:11
48
+ */
49
+ export var getCommDefaultVal = function getCommDefaultVal(commConfig) {
50
+ var _ref;
51
+ var receipts = commConfig.receipts.input.defaultValue;
52
+ var receiptList = commConfig.receiptList.input.defaultValue;
53
+ console.log('receipts = ', receipts);
54
+ return _ref = {}, _defineProperty(_ref, commConfig.receipts.__sourceName, typeof receipts === 'undefined' ? true : receipts), _defineProperty(_ref, commConfig.receiptList.__sourceName, typeof receiptList === 'undefined' ? ['merchant', 'customer'] : receiptList), _ref;
55
+ };
56
+ export default (function (props) {
57
+ var receipts = props.receipts,
58
+ receiptList = props.receiptList;
59
+ // const {input:receiptsInput,...receiptsOther} = receipts
60
+ var _useMemo = useMemo(function () {
61
+ var input = receipts.input,
62
+ other = _objectWithoutProperties(receipts, _excluded);
63
+ return [input, other];
64
+ }, [receipts]),
65
+ _useMemo2 = _slicedToArray(_useMemo, 2),
66
+ receiptsInput = _useMemo2[0],
67
+ receiptsOther = _useMemo2[1];
68
+ var _useMemo3 = useMemo(function () {
69
+ var input = receiptList.input,
70
+ other = _objectWithoutProperties(receiptList, _excluded2);
71
+ return [input, other];
72
+ }, [receipts]),
73
+ _useMemo4 = _slicedToArray(_useMemo3, 2),
74
+ receiptListInput = _useMemo4[0],
75
+ receiptListOther = _useMemo4[1];
76
+ var _useState = useState(receiptsInput.defaultValue),
77
+ _useState2 = _slicedToArray(_useState, 2),
78
+ type = _useState2[0],
79
+ setType = _useState2[1];
80
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Item, _extends({
81
+ style: {
82
+ marginBottom: '12px'
83
+ }
84
+ }, receiptsOther), /*#__PURE__*/React.createElement(RadioGroup, _extends({}, receiptsInput, {
85
+ onChange: function onChange(event) {
86
+ setType(event.target.value);
87
+ }
88
+ }))), /*#__PURE__*/React.createElement(Form.Item, _extends({}, receiptListOther, {
89
+ style: type ? {
90
+ marginLeft: '24px',
91
+ display: 'none'
92
+ } : {
93
+ marginLeft: '24px'
94
+ }
95
+ }), /*#__PURE__*/React.createElement(CheckboxGroup, receiptListInput)));
96
+ });
@@ -74,4 +74,5 @@ export declare function getPayAmonunt({ money, amount, surRate, surMoney }: Amou
74
74
  surRateMoney: string;
75
75
  totalUnit: string;
76
76
  };
77
+ export declare function getBrowserVersion(): string;
77
78
  export {};
@@ -216,4 +216,18 @@ export function getPayAmonunt(_ref, formatAmount) {
216
216
  surRateMoney: "".concat(surRateMoney),
217
217
  totalUnit: formatAmount(total)
218
218
  };
219
+ }
220
+ export function getBrowserVersion() {
221
+ var Sys = {};
222
+ var ua = navigator.userAgent.toLowerCase();
223
+ var s;
224
+ (s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] : (s = ua.match(/msie ([\d\.]+)/)) ? Sys.ie = s[1] : (s = ua.match(/edge\/([\d\.]+)/)) ? Sys.edge = s[1] : (s = ua.match(/firefox\/([\d\.]+)/)) ? Sys.firefox = s[1] : (s = ua.match(/(?:opera|opr).([\d\.]+)/)) ? Sys.opera = s[1] : (s = ua.match(/chrome\/([\d\.]+)/)) ? Sys.chrome = s[1] : (s = ua.match(/version\/([\d\.]+).*safari/)) ? Sys.safari = s[1] : 0;
225
+ // 根据关系进行判断
226
+ if (Sys.ie) return 'IE: ' + Sys.ie;
227
+ if (Sys.edge) return 'EDGE: ' + Sys.edge;
228
+ if (Sys.firefox) return 'Firefox: ' + Sys.firefox;
229
+ if (Sys.chrome) return 'Chrome: ' + Sys.chrome;
230
+ if (Sys.opera) return 'Opera: ' + Sys.opera;
231
+ if (Sys.safari) return 'Safari: ' + Sys.safari;
232
+ return 'Unkonwn';
219
233
  }
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe">;
22
+ readonly eftposRef: React.MutableRefObject<"windcave" | "tyro" | "payo" | "stripe">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  };
25
25
  /**
@@ -21,7 +21,7 @@ import { Button } from 'antd';
21
21
  import { useDispatch, useContextData, updateState, updateCustom, updateComponent } from "../store";
22
22
  import { ModeEnum, ClientEnum } from "../const";
23
23
  import { Decimal } from 'decimal.js';
24
- import { getUuid, getPayParams } from "../helper";
24
+ import { getUuid, getPayParams, getBrowserVersion } from "../helper";
25
25
  import Step from "../component/step/step";
26
26
  import { useStoreRef } from "../hooks";
27
27
  var Minute = 1000 * 60;
@@ -68,6 +68,22 @@ export default (function (_ref) {
68
68
  var requestIdRef = useRef((custom === null || custom === void 0 ? void 0 : custom.requestId) || '');
69
69
  var unloadRef = useRef(false);
70
70
  var clearRef = useRef();
71
+ var isPrint = function isPrint(key) {
72
+ var _deviceRef$current, _deviceRef$current$se, _deviceRef$current2, _deviceRef$current2$s;
73
+ if ((_deviceRef$current = deviceRef.current) !== null && _deviceRef$current !== void 0 && (_deviceRef$current$se = _deviceRef$current.setting) !== null && _deviceRef$current$se !== void 0 && _deviceRef$current$se.receipts) {
74
+ return false;
75
+ }
76
+ var receiptList = (_deviceRef$current2 = deviceRef.current) === null || _deviceRef$current2 === void 0 ? void 0 : (_deviceRef$current2$s = _deviceRef$current2.setting) === null || _deviceRef$current2$s === void 0 ? void 0 : _deviceRef$current2$s.receiptList;
77
+ if (!Array.isArray(receiptList)) {
78
+ return true;
79
+ }
80
+ if (Array.isArray(receiptList) && receiptList.some(function (item) {
81
+ return item === key;
82
+ })) {
83
+ return true;
84
+ }
85
+ return false;
86
+ };
71
87
  useEffect(function () {
72
88
  listRef.current = (custom === null || custom === void 0 ? void 0 : custom.list) || [];
73
89
  }, [custom === null || custom === void 0 ? void 0 : custom.list]);
@@ -117,7 +133,7 @@ export default (function (_ref) {
117
133
  * @Date: 2024-08-19 11:32
118
134
  */
119
135
  var refundOrder = function refundOrder() {
120
- var _deviceRef$current, _deviceRef$current$se, _deviceRef$current2;
136
+ var _deviceRef$current3, _deviceRef$current3$s, _deviceRef$current4;
121
137
  var iClient = iClientRef.current;
122
138
  if (!iClient) {
123
139
  return;
@@ -135,12 +151,16 @@ export default (function (_ref) {
135
151
  }));
136
152
  requestParams.current = {
137
153
  amount: new Decimal(amountRef.current || 0).mul(100).toFixed(0, Decimal.ROUND_HALF_UP),
138
- // 打印小票 true 打印到系统上 false 打印到pos机上
139
- integratedReceipt: !((_deviceRef$current = deviceRef.current) !== null && _deviceRef$current !== void 0 && (_deviceRef$current$se = _deviceRef$current.setting) !== null && _deviceRef$current$se !== void 0 && _deviceRef$current$se.receipts),
154
+ // 打印小票 true 打印到Pisell系统上 false 打印到pos机上
155
+ integratedReceipt: !((_deviceRef$current3 = deviceRef.current) !== null && _deviceRef$current3 !== void 0 && (_deviceRef$current3$s = _deviceRef$current3.setting) !== null && _deviceRef$current3$s !== void 0 && _deviceRef$current3$s.receipts),
140
156
  integrationKey: integrationKey,
141
157
  transactionId: numRef.current,
142
158
  mid: mid,
143
- tid: tid
159
+ tid: tid,
160
+ device: JSON.stringify(deviceRef.current),
161
+ isPrintMerchant: isPrint('merchant'),
162
+ isPrintCustomer: isPrint('customer'),
163
+ browserVersion: getBrowserVersion()
144
164
  };
145
165
  dispatch(updateCustom({
146
166
  requestParams: requestParams.current
@@ -151,7 +171,7 @@ export default (function (_ref) {
151
171
  api.addTransaction({
152
172
  order_id: orderIdRef.current,
153
173
  number: numRef.current,
154
- card_reader_id: (_deviceRef$current2 = deviceRef.current) === null || _deviceRef$current2 === void 0 ? void 0 : _deviceRef$current2.id,
174
+ card_reader_id: (_deviceRef$current4 = deviceRef.current) === null || _deviceRef$current4 === void 0 ? void 0 : _deviceRef$current4.id,
155
175
  card_reader_type: eftpos,
156
176
  amount: requestParams.current.amount,
157
177
  action: modeRef.current === ModeEnum.FullPay ? ModeEnum.Pay : modeRef.current,
@@ -183,7 +203,7 @@ export default (function (_ref) {
183
203
  * @Date: 2024-08-19 11:33
184
204
  */
185
205
  var payOrder = function payOrder() {
186
- var _deviceRef$current3, _deviceRef$current3$s, _payRef$current, _deviceRef$current4, _deviceRef$current4$s, _deviceRef$current5, _deviceRef$current5$s, _deviceRef$current6;
206
+ var _deviceRef$current5, _deviceRef$current5$s, _payRef$current, _deviceRef$current6, _deviceRef$current6$s, _deviceRef$current7, _deviceRef$current7$s, _deviceRef$current8;
187
207
  var iClient = iClientRef.current;
188
208
  if (!iClient) {
189
209
  return;
@@ -199,18 +219,22 @@ export default (function (_ref) {
199
219
  dispatch(updateState({
200
220
  number: numRef.current
201
221
  }));
202
- console.log('deviceRef.current?.settings?.useOriginSurcharge = ', (_deviceRef$current3 = deviceRef.current) === null || _deviceRef$current3 === void 0 ? void 0 : (_deviceRef$current3$s = _deviceRef$current3.setting) === null || _deviceRef$current3$s === void 0 ? void 0 : _deviceRef$current3$s.useOriginSurcharge);
222
+ console.log('deviceRef.current?.settings?.useOriginSurcharge = ', (_deviceRef$current5 = deviceRef.current) === null || _deviceRef$current5 === void 0 ? void 0 : (_deviceRef$current5$s = _deviceRef$current5.setting) === null || _deviceRef$current5$s === void 0 ? void 0 : _deviceRef$current5$s.useOriginSurcharge);
203
223
  // (deviceRef.current?.setting as { receipts?: boolean })
204
224
  requestParams.current = {
205
225
  amount: new Decimal((_payRef$current = payRef.current) === null || _payRef$current === void 0 ? void 0 : _payRef$current.total).mul(100).toFixed(0, Decimal.ROUND_HALF_UP),
206
226
  // 手续费 true tyro 手续费, false 系统手续费
207
- enableSurcharge: ((_deviceRef$current4 = deviceRef.current) === null || _deviceRef$current4 === void 0 ? void 0 : (_deviceRef$current4$s = _deviceRef$current4.setting) === null || _deviceRef$current4$s === void 0 ? void 0 : _deviceRef$current4$s.useOriginSurcharge) || false,
227
+ enableSurcharge: ((_deviceRef$current6 = deviceRef.current) === null || _deviceRef$current6 === void 0 ? void 0 : (_deviceRef$current6$s = _deviceRef$current6.setting) === null || _deviceRef$current6$s === void 0 ? void 0 : _deviceRef$current6$s.useOriginSurcharge) || false,
208
228
  // 打印小票 true 打印到系统上 false 打印到pos机上
209
- integratedReceipt: !((_deviceRef$current5 = deviceRef.current) !== null && _deviceRef$current5 !== void 0 && (_deviceRef$current5$s = _deviceRef$current5.setting) !== null && _deviceRef$current5$s !== void 0 && _deviceRef$current5$s.receipts),
229
+ integratedReceipt: !((_deviceRef$current7 = deviceRef.current) !== null && _deviceRef$current7 !== void 0 && (_deviceRef$current7$s = _deviceRef$current7.setting) !== null && _deviceRef$current7$s !== void 0 && _deviceRef$current7$s.receipts),
210
230
  integrationKey: integrationKey,
211
231
  transactionId: numRef.current,
212
232
  mid: mid,
213
- tid: tid
233
+ tid: tid,
234
+ device: JSON.stringify(deviceRef.current),
235
+ isPrintMerchant: isPrint('merchant'),
236
+ isPrintCustomer: isPrint('customer'),
237
+ browserVersion: getBrowserVersion()
214
238
  };
215
239
  dispatch(updateCustom({
216
240
  requestParams: requestParams.current
@@ -221,7 +245,7 @@ export default (function (_ref) {
221
245
  api.addTransaction({
222
246
  order_id: orderIdRef.current,
223
247
  number: numRef.current,
224
- card_reader_id: (_deviceRef$current6 = deviceRef.current) === null || _deviceRef$current6 === void 0 ? void 0 : _deviceRef$current6.id,
248
+ card_reader_id: (_deviceRef$current8 = deviceRef.current) === null || _deviceRef$current8 === void 0 ? void 0 : _deviceRef$current8.id,
225
249
  card_reader_type: eftpos,
226
250
  amount: requestParams.current.amount,
227
251
  action: modeRef.current === ModeEnum.FullPay ? ModeEnum.Pay : modeRef.current,
@@ -284,11 +308,17 @@ export default (function (_ref) {
284
308
  var receipt = [merchantReceipt].filter(function (item) {
285
309
  return typeof item === 'string';
286
310
  }).filter(Boolean);
287
- onChange('print', receipt);
288
311
  merchantReceiptRef.current = {
289
312
  signatureRequired: signatureRequired,
290
313
  merchantReceipt: merchantReceipt
291
314
  };
315
+ if (signatureRequired) {
316
+ onChange('print', receipt);
317
+ return;
318
+ }
319
+ if (isPrint('merchant')) {
320
+ onChange('print', receipt);
321
+ }
292
322
  };
293
323
 
294
324
  /**
@@ -373,7 +403,7 @@ export default (function (_ref) {
373
403
  * @Date: 2024-08-19 11:35
374
404
  */
375
405
  var transactionCompleteCallbackImpl = function transactionCompleteCallbackImpl(response) {
376
- var _deviceRef$current7;
406
+ var _deviceRef$current9;
377
407
  setStatus(-1);
378
408
  setManually(false);
379
409
  console.log('Response = ' + JSON.stringify(response), ', Request = ', JSON.stringify(requestParams.current));
@@ -385,7 +415,7 @@ export default (function (_ref) {
385
415
  api.editTransaction(requestIdRef.current, {
386
416
  order_id: orderIdRef.current,
387
417
  number: numRef.current,
388
- card_reader_id: (_deviceRef$current7 = deviceRef.current) === null || _deviceRef$current7 === void 0 ? void 0 : _deviceRef$current7.id,
418
+ card_reader_id: (_deviceRef$current9 = deviceRef.current) === null || _deviceRef$current9 === void 0 ? void 0 : _deviceRef$current9.id,
389
419
  card_reader_type: eftpos,
390
420
  amount: requestParams.current.amount,
391
421
  action: modeRef.current === ModeEnum.FullPay ? ModeEnum.Pay : modeRef.current,
@@ -413,7 +443,6 @@ export default (function (_ref) {
413
443
  card_reader_surcharge: response.surchargeAmount || 0
414
444
  }));
415
445
  clearRef.current = setTimeout(function () {
416
- var _deviceRef$current8;
417
446
  var params = getPayParams({
418
447
  mode: modeRef.current,
419
448
  amount: amountRef.current,
@@ -426,15 +455,17 @@ export default (function (_ref) {
426
455
  }
427
456
  }, 'success');
428
457
  onChange('success', _objectSpread(_objectSpread({}, params), {}, {
429
- receipt: (_deviceRef$current8 = deviceRef.current) !== null && _deviceRef$current8 !== void 0 && _deviceRef$current8.setting.receipts ? [] : receipt
458
+ receipt: isPrint('customer') ? receipt : []
430
459
  }));
431
460
  }, 1000);
432
461
  return;
433
462
  } else {
434
- var _deviceRef$current9;
435
- var current = (_deviceRef$current9 = deviceRef.current) !== null && _deviceRef$current9 !== void 0 && _deviceRef$current9.setting.receipts ? [] : receipt;
463
+ var _deviceRef$current10;
464
+ var current = (_deviceRef$current10 = deviceRef.current) !== null && _deviceRef$current10 !== void 0 && _deviceRef$current10.setting.receipts ? [] : receipt;
436
465
  if (current.length > 0) {
437
- onChange('print', current);
466
+ if (isPrint('customer')) {
467
+ onChange('print', receipt);
468
+ }
438
469
  }
439
470
  }
440
471
  if (response.result === 'UNKNOWN') {
package/es/index.d.ts CHANGED
@@ -22,4 +22,3 @@ export { default as Eftpos } from './components/eftpos';
22
22
  export { default as EftposPay } from './components/eftposPay';
23
23
  export { default as BookingDashboard } from './components/booking/dashboard';
24
24
  export { default as PisellSelectCustomerModal } from './components/pisellSelectCustomerModal';
25
- export { default as ShoppingCart } from './components/shoppingCart';
package/es/index.js CHANGED
@@ -25,5 +25,4 @@ export { default as ToCPay } from "./components/pay/toC";
25
25
  export { default as Eftpos } from "./components/eftpos";
26
26
  export { default as EftposPay } from "./components/eftposPay";
27
27
  export { default as BookingDashboard } from "./components/booking/dashboard";
28
- export { default as PisellSelectCustomerModal } from "./components/pisellSelectCustomerModal";
29
- export { default as ShoppingCart } from "./components/shoppingCart";
28
+ export { default as PisellSelectCustomerModal } from "./components/pisellSelectCustomerModal";
@@ -32,7 +32,6 @@ interface CustomSelectProps {
32
32
  autoFocus?: boolean;
33
33
  showDropDown?: boolean;
34
34
  handleOpenModal?: () => void;
35
- handleDayChange?: (value: any) => void;
36
35
  }
37
36
  declare const _default: React.ForwardRefExoticComponent<CustomSelectProps & React.RefAttributes<unknown>>;
38
37
  export default _default;
@@ -75,8 +75,7 @@ var CustomSelect = (props, ref) => {
75
75
  closeCallback,
76
76
  autoFocus,
77
77
  showDropDown = true,
78
- handleOpenModal: propsHandleOpenModal,
79
- handleDayChange
78
+ handleOpenModal: propsHandleOpenModal
80
79
  } = props;
81
80
  const searchRef = (0, import_react.useRef)();
82
81
  const [_value, set_value] = (0, import_react.useState)([]);
@@ -112,7 +111,7 @@ var CustomSelect = (props, ref) => {
112
111
  }
113
112
  closeCallback == null ? void 0 : closeCallback();
114
113
  };
115
- const handleOpenModal = (item) => {
114
+ const handleOpenModal = () => {
116
115
  if (disabled) {
117
116
  return;
118
117
  }
@@ -146,9 +145,6 @@ var CustomSelect = (props, ref) => {
146
145
  handleViewItem == null ? void 0 : handleViewItem(item);
147
146
  };
148
147
  const handleRemoveItem = (item) => {
149
- if (handleDayChange) {
150
- handleDayChange(item);
151
- }
152
148
  let _arr = (0, import_utils.changeArray)(_value, item, rowKey);
153
149
  _onValueChange(_arr);
154
150
  set_value(_arr);
@@ -25,7 +25,6 @@ __export(amount_exports, {
25
25
  module.exports = __toCommonJS(amount_exports);
26
26
  var import_utils = require("../../utils");
27
27
  var import_utils2 = require("@pisell/utils");
28
- var import_utils3 = require("../../info/service2/utils");
29
28
  var getRelationDetailsTotal = (relation_details) => {
30
29
  let total = 0;
31
30
  for (let item of relation_details) {
@@ -39,44 +38,27 @@ var getProductAmount = (state, isEdit) => {
39
38
  var _a, _b;
40
39
  let price = 0;
41
40
  let duration = 0;
42
- const isDay = (0, import_utils3.isDayBooking)(state);
43
41
  if (isEdit) {
44
42
  if ((state == null ? void 0 : state.service) || (state == null ? void 0 : state.addons)) {
45
43
  for (let item of state == null ? void 0 : state.service.value) {
46
- if (isDay) {
47
- price += Number(item._extend.total) * Number(item._extend.quantity);
48
- const _duration = (0, import_utils3.isAppointment)(item, state) ? item._extend.duration : 0;
49
- duration += _duration;
50
- } else {
51
- price += Number(item._extend.total);
52
- price += getRelationDetailsTotal(item._extend.relation_details || []);
53
- duration += import_utils.flexibleObj.getValue(item._extend.duration);
54
- }
44
+ price += Number(item._extend.total);
45
+ price += getRelationDetailsTotal(item._extend.relation_details || []);
46
+ duration += import_utils.flexibleObj.getValue(item._extend.duration);
55
47
  }
56
- if (!isDay) {
57
- for (let item of state.addons.value) {
58
- price += Number(item._extend.total) * item._extend.quantity;
59
- }
48
+ for (let item of state.addons.value) {
49
+ price += Number(item._extend.total) * item._extend.quantity;
60
50
  }
61
51
  }
62
52
  } else {
63
53
  price = Number((_a = state.bookingDetail) == null ? void 0 : _a.product_expect_amount);
64
- let services = ((_b = state == null ? void 0 : state.service) == null ? void 0 : _b.value) || [];
65
- duration = services.reduce((pre, cur) => {
54
+ duration = (((_b = state == null ? void 0 : state.service) == null ? void 0 : _b.value) || []).reduce((pre, cur) => {
66
55
  var _a2;
67
- let current = 0;
68
- if (isDay) {
69
- const _duration = (0, import_utils3.isAppointment)(cur, state) ? cur._extend.duration : 0;
70
- current = _duration || 0;
71
- } else {
72
- current = import_utils.flexibleObj.getValue(((_a2 = cur._extend) == null ? void 0 : _a2.duration) || 0);
73
- }
74
- return pre + current;
56
+ return pre + import_utils.flexibleObj.getValue(((_a2 = cur._extend) == null ? void 0 : _a2.duration) || 0);
75
57
  }, 0);
76
58
  }
77
59
  return {
78
60
  price: Number(price),
79
- duration: (0, import_utils.getDiscountTime)(duration, isDay)
61
+ duration: (0, import_utils.getDiscountTime)(duration)
80
62
  };
81
63
  };
82
64
  var getProductItemTax = (item, bookingDetail) => {
@@ -48,8 +48,6 @@ var import_icons = require("@ant-design/icons");
48
48
  var import_serve = require("./serve");
49
49
  var import_serve2 = require("../../info2/serve");
50
50
  var import_utils3 = require("../../info/utils");
51
- var import_utils4 = require("../../info/service2/utils");
52
- var import_AppointmentProductModal = __toESM(require("./AppointmentProductModal"));
53
51
  var Footer = (props) => {
54
52
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
55
53
  const { state, buttons, dispatch, source } = props;
@@ -57,7 +55,6 @@ var Footer = (props) => {
57
55
  const [loading, setLoading] = (0, import_react.useState)(false);
58
56
  const [checkoutLoading, setCheckoutLoading] = (0, import_react.useState)(false);
59
57
  const [isShowPaymentLink, setIsShowPaymentLink] = (0, import_react.useState)(false);
60
- const appointmentProductRef = (0, import_react.useRef)(null);
61
58
  const context = (0, import_useEngineContext.default)();
62
59
  const { isTerminal, interaction, store, storage } = (_a = context.appHelper) == null ? void 0 : _a.utils;
63
60
  (0, import_react.useEffect)(() => {
@@ -213,11 +210,6 @@ var Footer = (props) => {
213
210
  };
214
211
  const handleCheckout = async () => {
215
212
  if (isEdit) {
216
- if ((0, import_utils4.isDayBooking)(state)) {
217
- const isHasDayProducts = handleDaySubmit();
218
- if (isHasDayProducts)
219
- return;
220
- }
221
213
  const res = await handleSave({ type: "checkout" });
222
214
  goCheckout((res == null ? void 0 : res.order_id) || state.bookingId);
223
215
  return;
@@ -244,7 +236,7 @@ var Footer = (props) => {
244
236
  if ((0, import_utils3.isBooking4Shop)(
245
237
  (_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id,
246
238
  state.renderType
247
- ) || state.renderType === "dayBooking") {
239
+ )) {
248
240
  return {
249
241
  editBooking: import_serve2.editBookings,
250
242
  createBooking: import_serve2.createBookings
@@ -255,24 +247,11 @@ var Footer = (props) => {
255
247
  createBooking: state.apis.createBooking
256
248
  };
257
249
  };
258
- const handleDaySubmit = () => {
259
- var _a2;
260
- const _isHasDayProducts = (0, import_utils4.isHasDayAppointmentProduct)(state);
261
- if (_isHasDayProducts) {
262
- (_a2 = appointmentProductRef == null ? void 0 : appointmentProductRef.current) == null ? void 0 : _a2.open();
263
- }
264
- return _isHasDayProducts;
265
- };
266
250
  const handleSave = async ({
267
251
  type,
268
252
  messageShow = true
269
253
  }) => {
270
254
  var _a2;
271
- if ((0, import_utils4.isDayBooking)(state)) {
272
- const isHasDayProducts = handleDaySubmit();
273
- if (isHasDayProducts)
274
- return;
275
- }
276
255
  let _setLoading = type === "checkout" ? setCheckoutLoading : setLoading;
277
256
  _setLoading(true);
278
257
  const { createBooking, editBooking } = getApis();
@@ -668,7 +647,7 @@ var Footer = (props) => {
668
647
  }
669
648
  if (transaction_habit_selection.button_rows == 1) {
670
649
  if (state.appointment_status !== "cancelled") {
671
- if (!state.disabledEdit && !state.isBookingCreatePage && !(0, import_utils4.isDayBooking)(state)) {
650
+ if (!state.disabledEdit && !state.isBookingCreatePage) {
672
651
  arr.push(actionMap.sale);
673
652
  }
674
653
  }
@@ -882,7 +861,7 @@ var Footer = (props) => {
882
861
  className: "pisell-lowcode__booking-footer-buttons",
883
862
  style: { marginTop: 12 }
884
863
  },
885
- state.appointment_status !== "cancelled" && !state.isBookingCreatePage && !(0, import_utils4.isDayBooking)(state) ? /* @__PURE__ */ import_react.default.createElement(
864
+ state.appointment_status !== "cancelled" && !state.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(
886
865
  import_antd2.Button,
887
866
  {
888
867
  onClick: () => handleSale(),
@@ -900,6 +879,6 @@ var Footer = (props) => {
900
879
  },
901
880
  actionMap.orderDetail.label
902
881
  )
903
- ) : null, contextHolder, /* @__PURE__ */ import_react.default.createElement(import_AppointmentProductModal.default, { ref: appointmentProductRef }));
882
+ ) : null, contextHolder);
904
883
  };
905
884
  var footer_default = Footer;