@pisell/private-materials 3.0.73 → 3.0.75

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 (93) 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 +15 -15
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/booking/addons/index.d.ts +1 -1
  12. package/es/components/booking/addons/model.d.ts +1 -2
  13. package/es/components/booking/components/drawer/index.d.ts +1 -0
  14. package/es/components/booking/components/drawer/index.js +5 -0
  15. package/es/components/booking/components/drawer/index.less +10 -3
  16. package/es/components/booking/components/footer/amount.js +47 -24
  17. package/es/components/booking/components/footer/index.js +5 -0
  18. package/es/components/booking/components/footer/utils.js +12 -0
  19. package/es/components/booking/forms/forms.d.ts +1 -1
  20. package/es/components/booking/forms/index.d.ts +1 -1
  21. package/es/components/booking/forms/model.d.ts +1 -2
  22. package/es/components/booking/index.d.ts +1 -1
  23. package/es/components/booking/info/index.d.ts +1 -1
  24. package/es/components/booking/info/model.d.ts +1 -2
  25. package/es/components/booking/info/service/actions/index.d.ts +6 -0
  26. package/es/components/booking/info/service/actions/index.js +73 -0
  27. package/es/components/booking/info/service/actions/index.less +9 -0
  28. package/es/components/booking/info/service/addTimeModal/index.d.ts +4 -0
  29. package/es/components/booking/info/service/addTimeModal/index.js +697 -0
  30. package/es/components/booking/info/service/addTimeModal/index.less +138 -0
  31. package/es/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
  32. package/es/components/booking/info/service/addTimeModal/serve.js +50 -0
  33. package/es/components/booking/info/service/addTimeModal/utils.d.ts +31 -0
  34. package/es/components/booking/info/service/addTimeModal/utils.js +174 -0
  35. package/es/components/booking/info/service/index.js +2 -1
  36. package/es/components/booking/info/service/serviceItem/Sales/index.d.ts +0 -0
  37. package/es/components/booking/info/service/serviceItem/Sales/index.js +0 -0
  38. package/es/components/booking/info/service/serviceItem/Sales/index.less +0 -0
  39. package/es/components/booking/info/service/serviceItem/index.js +24 -2
  40. package/es/components/booking/info/service/serviceItem/index.less +28 -0
  41. package/es/components/booking/locales.d.ts +27 -0
  42. package/es/components/booking/locales.js +29 -2
  43. package/es/components/booking/model.d.ts +3 -2
  44. package/es/components/booking/notes/index.d.ts +1 -1
  45. package/es/components/booking/notes/model.d.ts +1 -2
  46. package/es/components/booking/payments/index.d.ts +1 -1
  47. package/es/components/booking/payments/model.d.ts +1 -2
  48. package/es/components/booking/utils.d.ts +12 -0
  49. package/es/components/booking/utils.js +91 -48
  50. package/es/components/schedules/index.d.ts +1 -1
  51. package/es/components/schedules/model.d.ts +1 -2
  52. package/lib/components/booking/addons/index.d.ts +1 -1
  53. package/lib/components/booking/addons/model.d.ts +1 -2
  54. package/lib/components/booking/components/drawer/index.d.ts +1 -0
  55. package/lib/components/booking/components/drawer/index.js +4 -0
  56. package/lib/components/booking/components/drawer/index.less +10 -3
  57. package/lib/components/booking/components/footer/amount.js +10 -0
  58. package/lib/components/booking/components/footer/index.js +5 -0
  59. package/lib/components/booking/components/footer/utils.js +12 -0
  60. package/lib/components/booking/forms/forms.d.ts +1 -1
  61. package/lib/components/booking/forms/index.d.ts +1 -1
  62. package/lib/components/booking/forms/model.d.ts +1 -2
  63. package/lib/components/booking/index.d.ts +1 -1
  64. package/lib/components/booking/info/index.d.ts +1 -1
  65. package/lib/components/booking/info/model.d.ts +1 -2
  66. package/lib/components/booking/info/service/actions/index.d.ts +6 -0
  67. package/lib/components/booking/info/service/actions/index.js +97 -0
  68. package/lib/components/booking/info/service/actions/index.less +9 -0
  69. package/lib/components/booking/info/service/addTimeModal/index.d.ts +4 -0
  70. package/lib/components/booking/info/service/addTimeModal/index.js +553 -0
  71. package/lib/components/booking/info/service/addTimeModal/index.less +138 -0
  72. package/lib/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
  73. package/lib/components/booking/info/service/addTimeModal/serve.js +39 -0
  74. package/lib/components/booking/info/service/addTimeModal/utils.d.ts +31 -0
  75. package/lib/components/booking/info/service/addTimeModal/utils.js +155 -0
  76. package/lib/components/booking/info/service/index.js +2 -1
  77. package/lib/components/booking/info/service/serviceItem/Sales/index.d.ts +0 -0
  78. package/lib/components/booking/info/service/serviceItem/Sales/index.js +0 -0
  79. package/lib/components/booking/info/service/serviceItem/Sales/index.less +0 -0
  80. package/lib/components/booking/info/service/serviceItem/index.js +14 -1
  81. package/lib/components/booking/info/service/serviceItem/index.less +28 -0
  82. package/lib/components/booking/locales.d.ts +27 -0
  83. package/lib/components/booking/locales.js +29 -2
  84. package/lib/components/booking/model.d.ts +3 -2
  85. package/lib/components/booking/notes/index.d.ts +1 -1
  86. package/lib/components/booking/notes/model.d.ts +1 -2
  87. package/lib/components/booking/payments/index.d.ts +1 -1
  88. package/lib/components/booking/payments/model.d.ts +1 -2
  89. package/lib/components/booking/utils.d.ts +12 -0
  90. package/lib/components/booking/utils.js +82 -33
  91. package/lib/components/schedules/index.d.ts +1 -1
  92. package/lib/components/schedules/model.d.ts +1 -2
  93. package/package.json +3 -3
@@ -0,0 +1,39 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/booking/info/service/addTimeModal/serve.ts
20
+ var serve_exports = {};
21
+ __export(serve_exports, {
22
+ getAddTimeProducts: () => getAddTimeProducts,
23
+ saveAddTimeProduct: () => saveAddTimeProduct
24
+ });
25
+ module.exports = __toCommonJS(serve_exports);
26
+ var import_utils = require("../../../utils");
27
+ var getAddTimeProducts = async (params, config) => {
28
+ let { data } = await import_utils.request.getRequest().post(`/shop/product/query`, params, config);
29
+ return data;
30
+ };
31
+ var saveAddTimeProduct = async ({ orderId, params }) => {
32
+ let { data } = await import_utils.request.getRequest().put(`/shop/order/appointment/child-booking/${orderId}`, params);
33
+ return data;
34
+ };
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ getAddTimeProducts,
38
+ saveAddTimeProduct
39
+ });
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @title: 根据商品生成加时列表
3
+ * @description:
4
+ * @param {any} config
5
+ * @param {number} price
6
+ * @return {*}
7
+ * @Author: zhiwei.Wang
8
+ * @Date: 2024-07-01 09:34
9
+ */
10
+ export declare const getAddTimeSplits: (product: any, cacheItem: any, currentResourceTimeEndDate: any) => {
11
+ label: any;
12
+ value: any;
13
+ price: any;
14
+ }[];
15
+ /**
16
+ * @title: 判断当前商品是否可用
17
+ * @description:
18
+ * @param {any} relationProduct
19
+ * @param {any} currentItem
20
+ * @return {*}
21
+ * @Author: zhiwei.Wang
22
+ * @Date: 2024-07-01 09:33
23
+ */
24
+ export declare const isUsableProduct: (addTime: any, currentItem: any) => any;
25
+ export declare const addTimeRowKey: {
26
+ create: (product_id: number, time: number) => string;
27
+ getValue: (str: string) => {
28
+ product_id: number;
29
+ time: number | string;
30
+ };
31
+ };
@@ -0,0 +1,155 @@
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/booking/info/service/addTimeModal/utils.ts
30
+ var utils_exports = {};
31
+ __export(utils_exports, {
32
+ addTimeRowKey: () => addTimeRowKey,
33
+ getAddTimeSplits: () => getAddTimeSplits,
34
+ isUsableProduct: () => isUsableProduct
35
+ });
36
+ module.exports = __toCommonJS(utils_exports);
37
+ var import_dayjs = __toESM(require("dayjs"));
38
+ var import_utils = require("../../../utils");
39
+ var import_utils2 = require("@pisell/utils");
40
+ var import_lodash = require("lodash");
41
+ var getAddTimeSplits = (product, cacheItem, currentResourceTimeEndDate) => {
42
+ const { add_time = {
43
+ calculate_type: "select_quantity",
44
+ // 最大时长
45
+ max_add_time: 30,
46
+ // 最小时长
47
+ min_add_time: 30,
48
+ // 关联产品
49
+ relation_product: { type: "product_all", products: [] },
50
+ // 单位切片
51
+ unit_duration: 30
52
+ }, price = 0 } = product;
53
+ if (add_time.additional_time_options === "unlimited") {
54
+ let maxEndDate = (0, import_utils.getEndDate)(cacheItem._extend.startDate, "flexible", currentResourceTimeEndDate);
55
+ let _value = maxEndDate.diff(cacheItem._extend.endDate, "minute");
56
+ if (_value > 0) {
57
+ return [
58
+ {
59
+ label: import_utils2.locales.getText("page.booking.text.unlimited"),
60
+ value: _value,
61
+ price
62
+ }
63
+ ];
64
+ } else {
65
+ return [];
66
+ }
67
+ }
68
+ const startTime = (0, import_dayjs.default)().startOf("day");
69
+ const endTime = startTime.add(add_time.max_add_time, "minute");
70
+ const timeSlice = (add_time == null ? void 0 : add_time.unit_duration) || 5;
71
+ let arr = [];
72
+ let currentTime = startTime;
73
+ let lastDuration = 0;
74
+ while (currentTime.isBefore(endTime)) {
75
+ let nextTime = currentTime;
76
+ if (lastDuration === 0) {
77
+ nextTime = nextTime.add(add_time.min_add_time, "minute");
78
+ } else {
79
+ nextTime = currentTime.add(timeSlice, "minute");
80
+ }
81
+ const durationValue = nextTime.diff(startTime, "minute");
82
+ let durationLabel = `${durationValue} ${import_utils2.locales.getText("pisell2.text.min")}`;
83
+ if (durationValue >= 60) {
84
+ durationLabel = (0, import_utils.getDiscountTime)(durationValue);
85
+ }
86
+ arr.push({
87
+ label: durationLabel,
88
+ value: durationValue,
89
+ price: durationValue / timeSlice * price
90
+ });
91
+ lastDuration = durationValue;
92
+ currentTime = nextTime;
93
+ }
94
+ return arr;
95
+ };
96
+ var isUsableProduct = (addTime, currentItem) => {
97
+ var _a;
98
+ const type = (_a = addTime.relation_product) == null ? void 0 : _a.type;
99
+ const relationProduct = addTime.relation_product || [];
100
+ if (!currentItem) {
101
+ return false;
102
+ }
103
+ if (addTime.additional_time_options === "unlimited") {
104
+ let maxEndDate = (0, import_utils.getEndDate)(currentItem._extend.startDate, "flexible", "");
105
+ if (currentItem._extend.endDate.isAfter(maxEndDate)) {
106
+ return false;
107
+ }
108
+ }
109
+ if (type === "product_all") {
110
+ return true;
111
+ } else {
112
+ if (type === "product_collection") {
113
+ return !!(0, import_lodash.intersectionBy)(
114
+ relationProduct.products.map((item) => ({
115
+ ...item,
116
+ id: item.product_collection_id
117
+ })) || [],
118
+ currentItem.collection || [],
119
+ "id"
120
+ ).length;
121
+ } else {
122
+ return relationProduct.products.some(
123
+ (item) => {
124
+ if (type === "products") {
125
+ if (item.product_id == currentItem.product_id) {
126
+ return true;
127
+ }
128
+ }
129
+ }
130
+ );
131
+ }
132
+ }
133
+ };
134
+ var addTimeRowKey = {
135
+ // 创建, 增加前缀
136
+ create: (product_id, time) => {
137
+ return `${product_id}_${time}`;
138
+ },
139
+ // 格式化, 去除前缀
140
+ getValue: (str) => {
141
+ let arr = str.split("_");
142
+ let id = arr[0] || 0;
143
+ let time = arr[1] || 0;
144
+ return {
145
+ product_id: Number(id),
146
+ time: time === "flexible" ? time : Number(arr[1] || 0)
147
+ };
148
+ }
149
+ };
150
+ // Annotate the CommonJS export names for ESM import in node:
151
+ 0 && (module.exports = {
152
+ addTimeRowKey,
153
+ getAddTimeSplits,
154
+ isUsableProduct
155
+ });
@@ -37,10 +37,11 @@ var import_addService = __toESM(require("./addService"));
37
37
  var import_editService = __toESM(require("./editService"));
38
38
  var import_index = require("./index.less");
39
39
  var import_serviceList = __toESM(require("./serviceList"));
40
+ var import_addTimeModal = __toESM(require("./addTimeModal"));
40
41
  var Service = () => {
41
42
  (0, import_react.useEffect)(() => {
42
43
  document.body.id = "body";
43
44
  }, []);
44
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-wrap" }, /* @__PURE__ */ import_react.default.createElement(import_serviceList.default, null), /* @__PURE__ */ import_react.default.createElement(import_addService.default, null)), /* @__PURE__ */ import_react.default.createElement(import_editService.default, null));
45
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-wrap" }, /* @__PURE__ */ import_react.default.createElement(import_serviceList.default, null), /* @__PURE__ */ import_react.default.createElement(import_addService.default, null)), /* @__PURE__ */ import_react.default.createElement(import_editService.default, null), /* @__PURE__ */ import_react.default.createElement(import_addTimeModal.default, null));
45
46
  };
46
47
  var service_default = Service;
@@ -39,6 +39,7 @@ var import_utils2 = require("@pisell/utils");
39
39
  var import_collapsibleList = __toESM(require("../../../components/collapsibleList"));
40
40
  var import_utils3 = require("../../../components/collapsibleList/utils");
41
41
  var import_antd = require("antd");
42
+ var import_actions = __toESM(require("../actions"));
42
43
  var import_index = require("./index.less");
43
44
  var ServiceItem = ({
44
45
  d,
@@ -48,7 +49,7 @@ var ServiceItem = ({
48
49
  resourceItem,
49
50
  errorMessage
50
51
  }) => {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
52
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
52
53
  let resourceName = (resourceItem == null ? void 0 : resourceItem.labelText) || d.relation_form_name;
53
54
  const isDiscount = (0, import_react.useMemo)(() => {
54
55
  var _a2, _b2;
@@ -84,6 +85,18 @@ var ServiceItem = ({
84
85
  ) : null,
85
86
  d.id ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-price-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-service-item-price" }, (0, import_utils2.formatAmount)((_g = d._extend) == null ? void 0 : _g.total, 2, state.amountSymbol)), isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-service-item-original-price" }, (0, import_utils2.formatAmount)(d._extend.origin_total, 2, state.amountSymbol)) : null)) : null,
86
87
  isDiscount && ((_h = d._extend) == null ? void 0 : _h.discount_reason) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-discount-reason" }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils2.locales.getText("pisell2.text.discount-reason"), ":"), " ", (_i = d._extend) == null ? void 0 : _i.discount_reason) : null,
88
+ ((_j = d._extend.relation_details) == null ? void 0 : _j.length) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-relation-details" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-title" }, import_utils2.locales.getText("page.booking.text.sales")), d._extend.relation_details.map((item, index) => {
89
+ return /* @__PURE__ */ import_react.default.createElement(
90
+ "div",
91
+ {
92
+ className: "pisell-lowcode__booking-service-item-relation-detail",
93
+ key: item.id
94
+ },
95
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-relation-detail-title" }, item.product_title),
96
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-relation-detail-info" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-service-item-relation-detail-info-price" }, (0, import_utils2.formatAmount)(item.payment_price, 2, state.amountSymbol)), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-service-item-relation-detail-info-unit" }, "x"), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-service-item-relation-detail-info-quantity" }, item.product_quantity))
97
+ );
98
+ })) : null,
99
+ /* @__PURE__ */ import_react.default.createElement(import_actions.default, { currentService: d }),
87
100
  errorMessage ? /* @__PURE__ */ import_react.default.createElement(
88
101
  import_antd.Alert,
89
102
  {
@@ -94,4 +94,32 @@
94
94
  margin: 0 -20px -16px;
95
95
  border-radius: 0 0 8px 8px;
96
96
  }
97
+ }
98
+
99
+ .pisell-lowcode__booking-service-item-relation-details {
100
+ padding-top: 6px;
101
+ margin-top: 6px;
102
+ border-top: 1px solid #d5d7da;
103
+ margin-bottom: 6px;
104
+ }
105
+
106
+ .pisell-lowcode__booking-service-item-relation-detail {
107
+ display: flex;
108
+ align-items: flex-start;
109
+ justify-content: space-between;
110
+ margin-top: 4px;
111
+ overflow: hidden;
112
+
113
+ .pisell-lowcode__booking-service-item-relation-detail-title {}
114
+
115
+ .pisell-lowcode__booking-service-item-relation-detail-info {
116
+ .pisell-lowcode__booking-service-item-relation-detail-info-quantity {}
117
+
118
+ .pisell-lowcode__booking-service-item-relation-detail-info-unit {
119
+ padding: 0 4px;
120
+ }
121
+
122
+ .pisell-lowcode__booking-service-item-relation-detail-info-price {}
123
+ }
124
+
97
125
  }
@@ -146,6 +146,15 @@ declare const _default: {
146
146
  'pisell2.text.send-mail': string;
147
147
  'pisell2.text.copy-to-clipboard': string;
148
148
  'pisell2.text.ok': string;
149
+ 'page.booking.text.add-time': string;
150
+ 'page.booking.text.quantity': string;
151
+ 'page.booking.text.sales': string;
152
+ 'page.booking.text.update-time': string;
153
+ 'page.booking.text.add-time-success': string;
154
+ 'page.booking.text.unavailable': string;
155
+ 'page.booking.text.available': string;
156
+ 'page.booking.text.fully-booked': string;
157
+ 'page.booking.text.unlimited': string;
149
158
  'pisell2.text.terminal-edit-message': string;
150
159
  };
151
160
  'zh-CN': {
@@ -296,6 +305,15 @@ declare const _default: {
296
305
  'pisell2.text.copy-to-clipboard': string;
297
306
  'pisell2.text.ok': string;
298
307
  'pisell2.text.terminal-edit-message': string;
308
+ 'page.booking.text.add-time': string;
309
+ 'page.booking.text.quantity': string;
310
+ 'page.booking.text.sales': string;
311
+ 'page.booking.text.update-time': string;
312
+ 'page.booking.text.add-time-success': string;
313
+ 'page.booking.text.unavailable': string;
314
+ 'page.booking.text.available': string;
315
+ 'page.booking.text.fully-booked': string;
316
+ 'page.booking.text.unlimited': string;
299
317
  };
300
318
  'zh-HK': {
301
319
  'pisell2.text.refunded-amount': string;
@@ -445,6 +463,15 @@ declare const _default: {
445
463
  'pisell2.text.copy-to-clipboard': string;
446
464
  'pisell2.text.ok': string;
447
465
  'pisell2.text.terminal-edit-message': string;
466
+ 'page.booking.text.add-time': string;
467
+ 'page.booking.text.quantity': string;
468
+ 'page.booking.text.sales': string;
469
+ 'page.booking.text.update-time': string;
470
+ 'page.booking.text.add-time-success': string;
471
+ 'page.booking.text.unavailable': string;
472
+ 'page.booking.text.available': string;
473
+ 'page.booking.text.fully-booked': string;
474
+ 'page.booking.text.unlimited': string;
448
475
  };
449
476
  };
450
477
  export default _default;
@@ -179,6 +179,15 @@ var locales_default = {
179
179
  "pisell2.text.send-mail": "Send email",
180
180
  "pisell2.text.copy-to-clipboard": "Copy to clipboard",
181
181
  "pisell2.text.ok": "OK",
182
+ "page.booking.text.add-time": "Add time",
183
+ "page.booking.text.quantity": "Quantity",
184
+ "page.booking.text.sales": "Sales",
185
+ "page.booking.text.update-time": "Update time",
186
+ "page.booking.text.add-time-success": "Add time successfully",
187
+ "page.booking.text.unavailable": "Unavailable",
188
+ "page.booking.text.available": "Available",
189
+ "page.booking.text.fully-booked": "Fully booked",
190
+ "page.booking.text.unlimited": "Unlimited",
182
191
  "pisell2.text.terminal-edit-message": "This operation cannot be performed. To proceed, please use the Pisell Terminal."
183
192
  },
184
193
  "zh-CN": {
@@ -342,7 +351,16 @@ var locales_default = {
342
351
  "pisell2.text.send-mail": "发送邮件",
343
352
  "pisell2.text.copy-to-clipboard": "复制到剪切板",
344
353
  "pisell2.text.ok": "好的",
345
- "pisell2.text.terminal-edit-message": "此操作不可使用,如需使用请至Pisell 终端设备操作。"
354
+ "pisell2.text.terminal-edit-message": "此操作不可使用,如需使用请至Pisell 终端设备操作。",
355
+ "page.booking.text.add-time": "加时",
356
+ "page.booking.text.quantity": "数量",
357
+ "page.booking.text.sales": "销售",
358
+ "page.booking.text.update-time": "更新后的时间",
359
+ "page.booking.text.add-time-success": "加时成功",
360
+ "page.booking.text.unavailable": "不可用",
361
+ "page.booking.text.available": "可用",
362
+ "page.booking.text.fully-booked": "已约满",
363
+ "page.booking.text.unlimited": "无限制"
346
364
  },
347
365
  "zh-HK": {
348
366
  "pisell2.text.refunded-amount": "已退金額",
@@ -505,6 +523,15 @@ var locales_default = {
505
523
  "pisell2.text.send-mail": "發送郵件",
506
524
  "pisell2.text.copy-to-clipboard": "複製到剪切板",
507
525
  "pisell2.text.ok": "好的",
508
- "pisell2.text.terminal-edit-message": "此操作不可使用,如需使用請至Pisell 終端設備操作。"
526
+ "pisell2.text.terminal-edit-message": "此操作不可使用,如需使用請至Pisell 終端設備操作。",
527
+ "page.booking.text.add-time": "加時",
528
+ "page.booking.text.quantity": "數量",
529
+ "page.booking.text.sales": "銷售",
530
+ "page.booking.text.update-time": "更新後的時間",
531
+ "page.booking.text.add-time-success": "加時成功!",
532
+ "page.booking.text.unavailable": "不可用",
533
+ "page.booking.text.available": "可用",
534
+ "page.booking.text.fully-booked": "已約滿",
535
+ "page.booking.text.unlimited": "無限制"
509
536
  }
510
537
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -39,6 +38,7 @@ export interface FormState {
39
38
  value: any[];
40
39
  cacheItem: any;
41
40
  edit: boolean;
41
+ addTimeModal: boolean;
42
42
  };
43
43
  pet: {
44
44
  showModal: boolean;
@@ -76,6 +76,7 @@ export interface FormState {
76
76
  modalOpen?: boolean;
77
77
  isTerminal?: boolean;
78
78
  isFranchisee?: boolean;
79
+ addTimeProducts: any[];
79
80
  eventOtherParams?: {
80
81
  relation_id: number;
81
82
  number: number;
@@ -92,7 +93,7 @@ export declare const walkInData: {
92
93
  id: number;
93
94
  nickname: string;
94
95
  };
95
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
96
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
96
97
  state: FormState;
97
98
  } & {
98
99
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => any;
7
+ declare const Notes: (props: any) => JSX.Element;
8
8
  export default Notes;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Payments: (props: any) => any;
8
+ declare const Payments: (props: any) => JSX.Element;
9
9
  export default Payments;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -69,6 +69,16 @@ export declare const findNextSlice: ({ timeSlices, index, date }: {
69
69
  }) => any;
70
70
  export declare const findNextDuration: (current: any, array: any, defaultValue?: any) => any;
71
71
  export declare const formatProductListByCategory: (list: any, filterItem: any) => unknown[];
72
+ export declare const getResourceTimeIsUsable: (item: any, cacheItem: any) => any;
73
+ /**
74
+ * @title: 查找是否有可用的time
75
+ * @description:
76
+ * @param {any} resourceItem
77
+ * @return {*}
78
+ * @Author: zhiwei.Wang
79
+ * @Date: 2024-01-09 13:57
80
+ */
81
+ export declare const formatTimes: (resourceItem: any, cacheItem: any) => any;
72
82
  /**
73
83
  * @title: 获取店铺的营业结束时间
74
84
  * @description:
@@ -88,6 +98,7 @@ export declare const flexibleObj: {
88
98
  create: (num: number) => any;
89
99
  getValue: (str: string | number) => number;
90
100
  isFlexible: (str: string | number) => boolean;
101
+ add: (current: number | string, duration: number) => any;
91
102
  };
92
103
  /**
93
104
  * @title: 获取结束时间
@@ -147,4 +158,5 @@ export declare const getDuration: (duration: number | {
147
158
  value: number;
148
159
  } | "flexible";
149
160
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
161
+ export declare const getIsEdit: (state: any) => boolean;
150
162
  export {};