@pisell/private-materials 3.3.77 → 3.3.79

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 (166) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +4 -4
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/booking/addons/model.d.ts +10 -1
  12. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  13. package/es/components/booking/components/browserSelect/index.js +1 -1
  14. package/es/components/booking/components/footer/utils.d.ts +1 -0
  15. package/es/components/booking/components/footer/utils.js +2 -2
  16. package/es/components/booking/editBookingModal/index.d.ts +5 -0
  17. package/es/components/booking/editBookingModal/index.js +386 -0
  18. package/es/components/booking/editBookingModal/index.less +8 -0
  19. package/es/components/booking/editBookingModal/locales.d.ts +21 -0
  20. package/es/components/booking/editBookingModal/locales.js +20 -0
  21. package/es/components/booking/editBookingModal/mock.d.ts +807 -0
  22. package/es/components/booking/editBookingModal/mock.js +2993 -0
  23. package/es/components/booking/editBookingModal/serve.d.ts +51 -0
  24. package/es/components/booking/editBookingModal/serve.js +288 -0
  25. package/es/components/booking/editBookingModal/type.d.ts +12 -0
  26. package/es/components/booking/editBookingModal/type.js +1 -0
  27. package/es/components/booking/editBookingModal/utils.d.ts +12 -0
  28. package/es/components/booking/editBookingModal/utils.js +157 -0
  29. package/es/components/booking/forms/model.d.ts +10 -1
  30. package/es/components/booking/forms/model.js +5 -5
  31. package/es/components/booking/info/model.d.ts +10 -1
  32. package/es/components/booking/info/service/like/index.js +1 -1
  33. package/es/components/booking/info/service2/utils.js +3 -2
  34. package/es/components/booking/info2/service/addService/utils.d.ts +10 -0
  35. package/es/components/booking/info2/service/addService/utils.js +43 -13
  36. package/es/components/booking/info2/service/editService/Resources/index.js +22 -8
  37. package/es/components/booking/info2/service/editService/Resources/index.less +6 -0
  38. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  39. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +26 -0
  40. package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  41. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +308 -0
  42. package/es/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  43. package/es/components/booking/info2/utilsByBooking.js +9 -0
  44. package/es/components/booking/locales.d.ts +3 -0
  45. package/es/components/booking/locales.js +3 -0
  46. package/es/components/booking/materiels/startTime/index.js +1 -1
  47. package/es/components/booking/model.d.ts +9 -1
  48. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  49. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  50. package/es/components/booking/notes/model.d.ts +10 -1
  51. package/es/components/booking/notes/model.js +5 -5
  52. package/es/components/booking/payments/model.d.ts +10 -1
  53. package/es/components/booking/payments/model.js +5 -5
  54. package/es/components/booking/utils.d.ts +2 -2
  55. package/es/components/eftposPay/amount.d.ts +1 -1
  56. package/es/components/eftposPay/device.d.ts +1 -1
  57. package/es/components/eftposPay/hooks.d.ts +2 -2
  58. package/es/components/eftposPay/store/index.d.ts +6 -6
  59. package/es/components/index.d.ts +2 -1
  60. package/es/components/index.js +2 -1
  61. package/es/components/listComponent/index.js +5 -5
  62. package/es/components/pay/toC/model.d.ts +9 -1
  63. package/es/components/productExtension/card/index.js +3 -3
  64. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  65. package/es/components/productExtension/fields/Forms/index.js +12 -12
  66. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  67. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  68. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  69. package/es/components/productExtension/server.js +2 -2
  70. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  71. package/es/components/schedules/calendar/index.js +4 -4
  72. package/es/components/schedules/calendar/serve.js +2 -2
  73. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  74. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  75. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  76. package/es/components/schedules/components/ResourceList/index.js +1 -1
  77. package/es/components/schedules/components/Search/index.js +5 -5
  78. package/es/components/schedules/model.d.ts +9 -1
  79. package/es/components/schedules/model.js +5 -5
  80. package/es/components/schedules/openHours/index.js +1 -1
  81. package/es/components/schedules/openHours/serve.js +2 -2
  82. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  83. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  84. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  85. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  86. package/es/components/schedules/products/serve.js +2 -2
  87. package/es/components/schedules/products/utils.js +5 -5
  88. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  89. package/es/components/schedules/resources/detail/index.js +10 -10
  90. package/es/components/schedules/resources/list/index.js +2 -2
  91. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  92. package/es/components/schedules/resources/serve.js +2 -2
  93. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  94. package/es/components/schedules/utils.d.ts +1 -1
  95. package/es/components/schedules/utils.js +4 -4
  96. package/es/components/selectModal/index.js +2 -2
  97. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  98. package/es/components/ticketBooking/components/ticketBooking/index.js +137 -137
  99. package/es/components/wallet/Detail/model.d.ts +13 -1
  100. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  101. package/es/components/wallet/PointCard/model.d.ts +13 -1
  102. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  103. package/es/components/wallet/Voucher/model.d.ts +13 -1
  104. package/es/components/wallet/model.d.ts +9 -1
  105. package/es/hooks/useComponents.js +1 -1
  106. package/es/index.d.ts +1 -0
  107. package/es/index.js +2 -1
  108. package/es/utils/index.d.ts +1 -1
  109. package/lib/components/booking/addons/model.d.ts +10 -1
  110. package/lib/components/booking/components/footer/utils.d.ts +1 -0
  111. package/lib/components/booking/components/footer/utils.js +3 -1
  112. package/lib/components/booking/editBookingModal/index.d.ts +5 -0
  113. package/lib/components/booking/editBookingModal/index.js +363 -0
  114. package/lib/components/booking/editBookingModal/index.less +8 -0
  115. package/lib/components/booking/editBookingModal/locales.d.ts +21 -0
  116. package/lib/components/booking/editBookingModal/locales.js +44 -0
  117. package/lib/components/booking/editBookingModal/mock.d.ts +807 -0
  118. package/lib/components/booking/editBookingModal/mock.js +3314 -0
  119. package/lib/components/booking/editBookingModal/serve.d.ts +51 -0
  120. package/lib/components/booking/editBookingModal/serve.js +178 -0
  121. package/lib/components/booking/editBookingModal/type.d.ts +12 -0
  122. package/lib/components/booking/editBookingModal/type.js +17 -0
  123. package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
  124. package/lib/components/booking/editBookingModal/utils.js +158 -0
  125. package/lib/components/booking/forms/model.d.ts +10 -1
  126. package/lib/components/booking/info/model.d.ts +10 -1
  127. package/lib/components/booking/info/service2/utils.js +2 -2
  128. package/lib/components/booking/info2/service/addService/utils.d.ts +10 -0
  129. package/lib/components/booking/info2/service/addService/utils.js +26 -4
  130. package/lib/components/booking/info2/service/editService/Resources/index.js +54 -10
  131. package/lib/components/booking/info2/service/editService/Resources/index.less +6 -0
  132. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  133. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +53 -0
  134. package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  135. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +311 -0
  136. package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  137. package/lib/components/booking/info2/utilsByBooking.js +6 -0
  138. package/lib/components/booking/locales.d.ts +3 -0
  139. package/lib/components/booking/locales.js +3 -0
  140. package/lib/components/booking/model.d.ts +9 -1
  141. package/lib/components/booking/notes/model.d.ts +10 -1
  142. package/lib/components/booking/payments/model.d.ts +10 -1
  143. package/lib/components/booking/utils.d.ts +2 -2
  144. package/lib/components/eftposPay/amount.d.ts +1 -1
  145. package/lib/components/eftposPay/device.d.ts +1 -1
  146. package/lib/components/eftposPay/hooks.d.ts +2 -2
  147. package/lib/components/eftposPay/store/index.d.ts +6 -6
  148. package/lib/components/index.d.ts +2 -1
  149. package/lib/components/index.js +3 -0
  150. package/lib/components/pay/toC/model.d.ts +9 -1
  151. package/lib/components/schedules/model.d.ts +9 -1
  152. package/lib/components/schedules/utils.d.ts +1 -1
  153. package/lib/components/schedules/utils.js +1 -1
  154. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  155. package/lib/components/ticketBooking/components/ticketBooking/index.js +143 -138
  156. package/lib/components/wallet/Detail/model.d.ts +13 -1
  157. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  158. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  159. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  160. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  161. package/lib/components/wallet/model.d.ts +9 -1
  162. package/lib/index.d.ts +1 -0
  163. package/lib/index.js +3 -0
  164. package/lib/utils/index.d.ts +1 -1
  165. package/lowcode/edit-booking-modal/meta.ts +53 -0
  166. package/package.json +3 -3
@@ -8,7 +8,7 @@ import { PosProps } from './const';
8
8
  */
9
9
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
10
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
11
+ onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
12
12
  [keys: string]: unknown;
13
13
  } | undefined, other?: any) => void) | undefined;
14
14
  onClose: () => void;
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
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<"tyro" | "windcave" | "stripe" | "payo">;
22
+ readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "success" | "loading" | "warn" | "fail" | "question";
177
+ status: "success" | "warn" | "loading" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
298
+ mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "tyro" | "windcave" | "stripe" | "payo" | undefined;
301
- action?: "amount" | "pay" | "deviceList" | undefined;
300
+ eftpos?: "payo" | "tyro" | "windcave" | "stripe" | undefined;
301
+ action?: "amount" | "deviceList" | "pay" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
305
305
  subTitle?: string | undefined;
306
- type?: "unset" | "step" | undefined;
306
+ type?: "step" | "unset" | undefined;
307
307
  render?: boolean | undefined;
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -16,4 +16,5 @@ import WorkspaceList from './workSpaceList';
16
16
  import PisellSelectCustomerModal from './pisellSelectCustomerModal';
17
17
  import SubTotal from './subTotal';
18
18
  import StepController from './stepController';
19
- export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, StepController, };
19
+ import EditBookingModal from './booking/editBookingModal';
20
+ export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, StepController, EditBookingModal };
@@ -34,6 +34,7 @@ __export(components_exports, {
34
34
  BookingForms: () => import_forms.default,
35
35
  BookingInfo: () => import_info.default,
36
36
  BookingNotes: () => import_notes.default,
37
+ EditBookingModal: () => import_editBookingModal.default,
37
38
  Login: () => import_login.default,
38
39
  PisellSelectCustomerModal: () => import_pisellSelectCustomerModal.default,
39
40
  ProductExtension: () => import_productExtension.default,
@@ -67,6 +68,7 @@ var import_workSpaceList = __toESM(require("./workSpaceList"));
67
68
  var import_pisellSelectCustomerModal = __toESM(require("./pisellSelectCustomerModal"));
68
69
  var import_subTotal = __toESM(require("./subTotal"));
69
70
  var import_stepController = __toESM(require("./stepController"));
71
+ var import_editBookingModal = __toESM(require("./booking/editBookingModal"));
70
72
  // Annotate the CommonJS export names for ESM import in node:
71
73
  0 && (module.exports = {
72
74
  Booking,
@@ -74,6 +76,7 @@ var import_stepController = __toESM(require("./stepController"));
74
76
  BookingForms,
75
77
  BookingInfo,
76
78
  BookingNotes,
79
+ EditBookingModal,
77
80
  Login,
78
81
  PisellSelectCustomerModal,
79
82
  ProductExtension,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -28,4 +29,11 @@ export interface PayGroup {
28
29
  pay_number?: string;
29
30
  _order: any;
30
31
  }
31
- export declare const Provider: any, Context: any;
32
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
33
+ state: FormState;
34
+ } & {
35
+ dispatch: (params: {
36
+ type: string;
37
+ payload: any;
38
+ }) => void;
39
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem, ScheduleItem } from "./type";
2
3
  import dayjs from "dayjs";
3
4
  export interface FormState {
@@ -68,4 +69,11 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: any, Context: any;
72
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
+ state: FormState;
74
+ } & {
75
+ dispatch: (params: {
76
+ type: string;
77
+ payload: any;
78
+ }) => void;
79
+ }>;
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -27,8 +27,8 @@ __export(utils_exports, {
27
27
  module.exports = __toCommonJS(utils_exports);
28
28
  var import_utils = require("@pisell/utils");
29
29
  var Request = class {
30
- request = {};
31
30
  constructor() {
31
+ this.request = {};
32
32
  }
33
33
  setRequest(val) {
34
34
  this.request = val;
@@ -1,3 +1,4 @@
1
1
  import './index.less';
2
+ export declare const _formatBookingDetail: (data: any, modalState: any) => any;
2
3
  declare const TicketBooking: () => JSX.Element;
3
4
  export default TicketBooking;
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/components/ticketBooking/components/ticketBooking/index.tsx
30
30
  var ticketBooking_exports = {};
31
31
  __export(ticketBooking_exports, {
32
+ _formatBookingDetail: () => _formatBookingDetail,
32
33
  default: () => ticketBooking_default
33
34
  });
34
35
  module.exports = __toCommonJS(ticketBooking_exports);
@@ -48,6 +49,144 @@ var import_index = require("./index.less");
48
49
  var import_utils3 = require("../../../booking/info/service2/utils");
49
50
  var import_amount = require("../../../booking/components/footer/amount");
50
51
  var import_formatProductMessage = __toESM(require("../../utils/formatProductMessage"));
52
+ var _formatBookingDetail = (data, modalState) => {
53
+ var _a, _b, _c, _d;
54
+ let {
55
+ customer_id,
56
+ holder,
57
+ customer_name,
58
+ email,
59
+ phone,
60
+ country_calling_code,
61
+ bookings,
62
+ customer,
63
+ note,
64
+ payment_status,
65
+ is_other_entrance_edited,
66
+ shop_discount
67
+ } = data;
68
+ const clientValue = {
69
+ name: ((customer == null ? void 0 : customer.display_name) || "").trim() || ((customer == null ? void 0 : customer.nickname) || "").trim() || "",
70
+ id: customer_id || (customer == null ? void 0 : customer.id) || (customer == null ? void 0 : customer.customer_id) || 1,
71
+ email: customer == null ? void 0 : customer.email,
72
+ phone: (customer == null ? void 0 : customer.phone) || "",
73
+ country_calling_code: (customer == null ? void 0 : customer.country_calling_code) || "",
74
+ cover: (customer == null ? void 0 : customer.cover) || ""
75
+ };
76
+ const start_date = (_b = (_a = bookings == null ? void 0 : bookings.list) == null ? void 0 : _a[0]) == null ? void 0 : _b.start_date;
77
+ const dateValue = (0, import_dayjs.default)(
78
+ start_date ? start_date + " " + ((_d = (_c = bookings == null ? void 0 : bookings.list) == null ? void 0 : _c[0]) == null ? void 0 : _d.start_time) : /* @__PURE__ */ new Date()
79
+ );
80
+ const petsValue = holder;
81
+ const getCapacity = (resetD) => {
82
+ var _a2;
83
+ return (_a2 = resetD.metadata) == null ? void 0 : _a2.capacity;
84
+ };
85
+ const getResource = (resetD) => {
86
+ var _a2;
87
+ if (!bookings.relation_type) {
88
+ try {
89
+ if ((resetD == null ? void 0 : resetD.event_resources) && ((_a2 = resetD == null ? void 0 : resetD.event_resources) == null ? void 0 : _a2.length)) {
90
+ return resetD.event_resources.reduce((pre, cur) => {
91
+ if (pre[cur.form_id]) {
92
+ pre[cur.form_id].push(cur);
93
+ } else {
94
+ pre[cur.form_id] = [cur];
95
+ }
96
+ return pre;
97
+ }, {});
98
+ }
99
+ } catch (err) {
100
+ console.error(err);
101
+ }
102
+ }
103
+ return resetD.relation_id;
104
+ };
105
+ const serviceValue = bookings.list.map((d) => {
106
+ let { detail, product, ...resetD } = d;
107
+ let _detail = detail || mockProduct;
108
+ let start_date2 = (0, import_dayjs.default)(resetD.start_date + " " + resetD.start_time);
109
+ let end_date = (0, import_dayjs.default)(resetD.end_date + " " + resetD.end_time);
110
+ return {
111
+ _id: (Math.random() + "").replace(/\D/g, "").substring(0, 11),
112
+ ..._detail,
113
+ booking_id: resetD.id,
114
+ id: _detail.product_id,
115
+ title: _detail.product_title,
116
+ quantity: Number(_detail.product_quantity),
117
+ cover: _detail.product_cover,
118
+ // 商品本身的价格
119
+ price: Number(_detail.source_product_price),
120
+ relation_form_name: resetD.relation_form_name,
121
+ product_resource: product == null ? void 0 : product.product_resource,
122
+ capacity: product == null ? void 0 : product.capacity,
123
+ _extend: {
124
+ ...resetD,
125
+ quantity: Number(_detail.product_quantity),
126
+ startDate: start_date2,
127
+ start_date: start_date2,
128
+ endDate: end_date,
129
+ end_date,
130
+ // 商品本身的价格
131
+ price: Number(_detail.source_product_price),
132
+ product_name: _detail.product_title,
133
+ discount_reason: _detail.product_discount_reason,
134
+ // resource: resetD.relation_id,
135
+ order_detail_id: _detail.order_detail_id,
136
+ // 总价: 商品本身价格 + 套餐价格 + 单规格价格 包含折扣
137
+ total: Number(_detail.selling_price),
138
+ // 原总价: 商品本身价格 + 套餐价格 + 单规格价格 不包含折扣
139
+ origin_total: Number(_detail.original_price),
140
+ payment_price: Number(_detail.payment_price),
141
+ other: (0, import_utils2.restoreProductOtherData)(d),
142
+ // 是否编辑了套餐 默认为0 如果编辑之后为1
143
+ bundle_edit: 0,
144
+ discount_per: _detail.discount_per,
145
+ discount_type: _detail.discount_type,
146
+ discountway: _detail.discountway,
147
+ capacity: getCapacity(resetD),
148
+ resource: getResource(resetD)
149
+ }
150
+ };
151
+ });
152
+ let disabledEdit = (0, import_utils2.getDisabledEdit)(data);
153
+ let channelDisabledEdit = !!is_other_entrance_edited;
154
+ return {
155
+ ...modalState,
156
+ client: {
157
+ ...modalState.client,
158
+ value: clientValue,
159
+ edit: false,
160
+ showModal: false
161
+ },
162
+ date: {
163
+ ...modalState.date,
164
+ value: dateValue,
165
+ edit: false,
166
+ showModal: false
167
+ },
168
+ pet: {
169
+ ...modalState.pet,
170
+ showModal: false,
171
+ edit: false
172
+ },
173
+ service: {
174
+ ...modalState.service,
175
+ value: serviceValue,
176
+ addModal: false,
177
+ editModal: false,
178
+ edit: false
179
+ },
180
+ notes: {
181
+ ...modalState.notes,
182
+ orderNote: note,
183
+ edit: false
184
+ },
185
+ disabledEdit,
186
+ channelDisabledEdit,
187
+ appointment_status: bookings == null ? void 0 : bookings.appointment_status
188
+ };
189
+ };
51
190
  var TicketBooking = () => {
52
191
  var _a;
53
192
  const [state, setState] = (0, import_miniRedux.useStore)();
@@ -425,144 +564,6 @@ var TicketBooking = () => {
425
564
  (_a2 = dom == null ? void 0 : dom.scrollIntoView) == null ? void 0 : _a2.call(dom, { block: "center", behavior: "smooth" });
426
565
  }
427
566
  };
428
- const _formatBookingDetail = (data, modalState) => {
429
- var _a2, _b, _c, _d;
430
- let {
431
- customer_id,
432
- holder,
433
- customer_name,
434
- email,
435
- phone,
436
- country_calling_code,
437
- bookings,
438
- customer,
439
- note,
440
- payment_status,
441
- is_other_entrance_edited,
442
- shop_discount
443
- } = data;
444
- const clientValue = {
445
- name: ((customer == null ? void 0 : customer.display_name) || "").trim() || ((customer == null ? void 0 : customer.nickname) || "").trim() || "",
446
- id: customer_id || (customer == null ? void 0 : customer.id) || (customer == null ? void 0 : customer.customer_id) || 1,
447
- email: customer == null ? void 0 : customer.email,
448
- phone: (customer == null ? void 0 : customer.phone) || "",
449
- country_calling_code: (customer == null ? void 0 : customer.country_calling_code) || "",
450
- cover: (customer == null ? void 0 : customer.cover) || ""
451
- };
452
- const start_date = (_b = (_a2 = bookings == null ? void 0 : bookings.list) == null ? void 0 : _a2[0]) == null ? void 0 : _b.start_date;
453
- const dateValue = (0, import_dayjs.default)(
454
- start_date ? start_date + " " + ((_d = (_c = bookings == null ? void 0 : bookings.list) == null ? void 0 : _c[0]) == null ? void 0 : _d.start_time) : /* @__PURE__ */ new Date()
455
- );
456
- const petsValue = holder;
457
- const getCapacity = (resetD) => {
458
- var _a3;
459
- return (_a3 = resetD.metadata) == null ? void 0 : _a3.capacity;
460
- };
461
- const getResource = (resetD) => {
462
- var _a3;
463
- if (!bookings.relation_type) {
464
- try {
465
- if ((resetD == null ? void 0 : resetD.event_resources) && ((_a3 = resetD == null ? void 0 : resetD.event_resources) == null ? void 0 : _a3.length)) {
466
- return resetD.event_resources.reduce((pre, cur) => {
467
- if (pre[cur.form_id]) {
468
- pre[cur.form_id].push(cur);
469
- } else {
470
- pre[cur.form_id] = [cur];
471
- }
472
- return pre;
473
- }, {});
474
- }
475
- } catch (err) {
476
- console.error(err);
477
- }
478
- }
479
- return resetD.relation_id;
480
- };
481
- const serviceValue = bookings.list.map((d) => {
482
- let { detail, product, ...resetD } = d;
483
- let _detail = detail || mockProduct;
484
- let start_date2 = (0, import_dayjs.default)(resetD.start_date + " " + resetD.start_time);
485
- let end_date = (0, import_dayjs.default)(resetD.end_date + " " + resetD.end_time);
486
- return {
487
- _id: (Math.random() + "").replace(/\D/g, "").substring(0, 11),
488
- ..._detail,
489
- booking_id: resetD.id,
490
- id: _detail.product_id,
491
- title: _detail.product_title,
492
- quantity: Number(_detail.product_quantity),
493
- cover: _detail.product_cover,
494
- // 商品本身的价格
495
- price: Number(_detail.source_product_price),
496
- relation_form_name: resetD.relation_form_name,
497
- product_resource: product == null ? void 0 : product.product_resource,
498
- capacity: product == null ? void 0 : product.capacity,
499
- _extend: {
500
- ...resetD,
501
- quantity: Number(_detail.product_quantity),
502
- startDate: start_date2,
503
- start_date: start_date2,
504
- endDate: end_date,
505
- end_date,
506
- // 商品本身的价格
507
- price: Number(_detail.source_product_price),
508
- product_name: _detail.product_title,
509
- discount_reason: _detail.product_discount_reason,
510
- // resource: resetD.relation_id,
511
- order_detail_id: _detail.order_detail_id,
512
- // 总价: 商品本身价格 + 套餐价格 + 单规格价格 包含折扣
513
- total: Number(_detail.selling_price),
514
- // 原总价: 商品本身价格 + 套餐价格 + 单规格价格 不包含折扣
515
- origin_total: Number(_detail.original_price),
516
- payment_price: Number(_detail.payment_price),
517
- other: (0, import_utils2.restoreProductOtherData)(d),
518
- // 是否编辑了套餐 默认为0 如果编辑之后为1
519
- bundle_edit: 0,
520
- discount_per: _detail.discount_per,
521
- discount_type: _detail.discount_type,
522
- discountway: _detail.discountway,
523
- capacity: getCapacity(resetD),
524
- resource: getResource(resetD)
525
- }
526
- };
527
- });
528
- let disabledEdit = (0, import_utils2.getDisabledEdit)(data);
529
- let channelDisabledEdit = !!is_other_entrance_edited;
530
- return {
531
- ...modalState,
532
- client: {
533
- ...modalState.client,
534
- value: clientValue,
535
- edit: false,
536
- showModal: false
537
- },
538
- date: {
539
- ...modalState.date,
540
- value: dateValue,
541
- edit: false,
542
- showModal: false
543
- },
544
- pet: {
545
- ...modalState.pet,
546
- showModal: false,
547
- edit: false
548
- },
549
- service: {
550
- ...modalState.service,
551
- value: serviceValue,
552
- addModal: false,
553
- editModal: false,
554
- edit: false
555
- },
556
- notes: {
557
- ...modalState.notes,
558
- orderNote: note,
559
- edit: false
560
- },
561
- disabledEdit,
562
- channelDisabledEdit,
563
- appointment_status: bookings == null ? void 0 : bookings.appointment_status
564
- };
565
- };
566
567
  const _initBookingData = (type, data) => {
567
568
  var _a2, _b, _c, _d, _e, _f, _g;
568
569
  let initState = _getInitState({
@@ -907,3 +908,7 @@ var TicketBooking = () => {
907
908
  ));
908
909
  };
909
910
  var ticketBooking_default = TicketBooking;
911
+ // Annotate the CommonJS export names for ESM import in node:
912
+ 0 && (module.exports = {
913
+ _formatBookingDetail
914
+ });
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ addWalletCard: any;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ walletDetailState: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,14 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ setup?: 'menu' | 'list' | 'detail' | string;
5
+ }
6
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
7
+ state: RechargeState;
8
+ } & {
9
+ dispatch: (params: {
10
+ type: string;
11
+ payload: any;
12
+ }) => void;
13
+ }>;
14
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: number;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1 +1,29 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ selectedGiftOptionId: string | null;
4
+ cardList: Array<{
5
+ id: string;
6
+ name: string;
7
+ price: number;
8
+ }>;
9
+ selectedItem: {
10
+ id?: string;
11
+ gift_price?: number;
12
+ price?: number;
13
+ name?: string;
14
+ variant_id?: string;
15
+ };
16
+ productId?: string;
17
+ detailId?: string;
18
+ total: string | number;
19
+ rechargeModalOpen: boolean;
20
+ }
21
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
22
+ state: RechargeState;
23
+ } & {
24
+ dispatch: (params: {
25
+ type: string;
26
+ payload: any;
27
+ }) => void;
28
+ }>;
29
+ export {};
@@ -1 +1,13 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ interface RechargeState {
3
+ total: 0;
4
+ }
5
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
+ state: RechargeState;
7
+ } & {
8
+ dispatch: (params: {
9
+ type: string;
10
+ payload: any;
11
+ }) => void;
12
+ }>;
13
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IWalletListItemProps } from './serve';
2
3
  export interface WalletCardItemProps {
3
4
  id: string;
@@ -26,4 +27,11 @@ export interface WalletListProps {
26
27
  currentSearchListItemCode?: string;
27
28
  [key: string]: any;
28
29
  }
29
- export declare const Provider: any, Context: any;
30
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
31
+ global_wallet: WalletListProps;
32
+ } & {
33
+ dispatch: (params: {
34
+ type: string;
35
+ payload: any;
36
+ }) => void;
37
+ }>;
package/lib/index.d.ts CHANGED
@@ -44,3 +44,4 @@ export { default as AppointmentDeposit } from './components/appointmentBooking/d
44
44
  export { default as TicketBooking } from './components/ticketBooking';
45
45
  export { default as SubTotal } from './components/subTotal';
46
46
  export { default as StepController } from './components/stepController';
47
+ export { default as EditBookingModal } from './components/booking/editBookingModal';
package/lib/index.js CHANGED
@@ -43,6 +43,7 @@ __export(src_exports, {
43
43
  BookingPayment: () => import_payments.default,
44
44
  BookingResources: () => import_resources.default,
45
45
  BookingStartTime: () => import_startTime.default,
46
+ EditBookingModal: () => import_editBookingModal.default,
46
47
  Eftpos: () => import_eftpos.default,
47
48
  EftposPay: () => import_eftposPay.default,
48
49
  EventBooking: () => import_eventBooking.default,
@@ -124,6 +125,7 @@ var import_deposit2 = __toESM(require("./components/appointmentBooking/deposit")
124
125
  var import_ticketBooking = __toESM(require("./components/ticketBooking"));
125
126
  var import_subTotal = __toESM(require("./components/subTotal"));
126
127
  var import_stepController = __toESM(require("./components/stepController"));
128
+ var import_editBookingModal = __toESM(require("./components/booking/editBookingModal"));
127
129
  import_dayjs.default.extend(import_weekday.default);
128
130
  import_dayjs.default.extend(import_localeData.default);
129
131
  // Annotate the CommonJS export names for ESM import in node:
@@ -142,6 +144,7 @@ import_dayjs.default.extend(import_localeData.default);
142
144
  BookingPayment,
143
145
  BookingResources,
144
146
  BookingStartTime,
147
+ EditBookingModal,
145
148
  Eftpos,
146
149
  EftposPay,
147
150
  EventBooking,
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
18
  export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
19
  export declare const saveConfirm: () => Promise<{
20
20
  destroy: () => void;
21
- update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };