@pisell/private-materials 3.0.119 → 3.0.121
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +2 -2
- package/es/components/booking/components/TabProduct/productItem/index.js +8 -7
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/header/index.d.ts +2 -2
- package/es/components/booking/info/header/index.js +436 -44
- package/es/components/booking/info/header/index.less +110 -1
- package/es/components/booking/info/service/addService/index.js +3 -1
- package/es/components/booking/info/service/editService/index.js +3 -1
- package/es/components/booking/locales.d.ts +63 -0
- package/es/components/booking/locales.js +78 -6
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +12 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.js +40 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.less +38 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +5 -4
- package/es/components/schedules/components/ScheduleList/index.js +53 -43
- package/es/components/schedules/hooks/useSchedulesDataSource.js +5 -3
- package/es/components/schedules/products/list/index.d.ts +2 -2
- package/es/components/schedules/products/list/index.js +8 -8
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +3 -3
- package/es/components/schedules/schedules/AllSchedules/index.js +9 -6
- package/es/components/schedules/schedules/AllSchedules/index.less +11 -3
- package/es/components/schedules/schedules/serve.d.ts +7 -0
- package/es/components/schedules/schedules/serve.js +24 -3
- package/es/components/schedules/schedules/utils.d.ts +22 -0
- package/es/components/schedules/schedules/utils.js +143 -1
- package/es/components/schedules/type.d.ts +7 -0
- package/es/components/tabProduct/index.d.ts +3 -2
- package/es/components/tabProduct/index.js +27 -18
- package/es/components/tabProduct/tabs/index.d.ts +3 -3
- package/es/components/tabProduct/tabs/index.js +34 -21
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +2 -2
- package/lib/components/booking/components/TabProduct/productItem/index.js +2 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/header/index.d.ts +2 -2
- package/lib/components/booking/info/header/index.js +212 -11
- package/lib/components/booking/info/header/index.less +110 -1
- package/lib/components/booking/info/service/addService/index.js +3 -1
- package/lib/components/booking/info/service/editService/index.js +3 -1
- package/lib/components/booking/locales.d.ts +63 -0
- package/lib/components/booking/locales.js +72 -6
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +12 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.js +77 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.less +38 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +5 -4
- package/lib/components/schedules/components/ScheduleList/index.js +38 -31
- package/lib/components/schedules/hooks/useSchedulesDataSource.js +8 -2
- package/lib/components/schedules/products/list/index.d.ts +2 -2
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +3 -3
- package/lib/components/schedules/schedules/AllSchedules/index.js +3 -2
- package/lib/components/schedules/schedules/AllSchedules/index.less +11 -3
- package/lib/components/schedules/schedules/serve.d.ts +7 -0
- package/lib/components/schedules/schedules/serve.js +5 -2
- package/lib/components/schedules/schedules/utils.d.ts +22 -0
- package/lib/components/schedules/schedules/utils.js +98 -0
- package/lib/components/schedules/type.d.ts +7 -0
- package/lib/components/tabProduct/index.d.ts +3 -2
- package/lib/components/tabProduct/index.js +15 -6
- package/lib/components/tabProduct/tabs/index.d.ts +3 -3
- package/lib/components/tabProduct/tabs/index.js +10 -6
- package/package.json +4 -4
|
@@ -4,11 +4,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
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; }
|
|
5
5
|
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; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from
|
|
8
|
-
import classNames from
|
|
9
|
-
import { useDebounceFn } from
|
|
10
|
-
import ChevronLeft from
|
|
11
|
-
import ChevronRight from
|
|
7
|
+
import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import { useDebounceFn } from 'ahooks';
|
|
10
|
+
import ChevronLeft from '@pisell/icon/es/ChevronLeft';
|
|
11
|
+
import ChevronRight from '@pisell/icon/es/ChevronRight';
|
|
12
12
|
import "./index.less";
|
|
13
13
|
|
|
14
14
|
// tabs 子组件定义
|
|
@@ -17,7 +17,7 @@ var Tabs = function Tabs(_ref, ref) {
|
|
|
17
17
|
var renderTab = _ref.renderTab,
|
|
18
18
|
rowKey = _ref.rowKey,
|
|
19
19
|
_ref$name = _ref.name,
|
|
20
|
-
name = _ref$name === void 0 ?
|
|
20
|
+
name = _ref$name === void 0 ? 'tabs-' : _ref$name,
|
|
21
21
|
onChange = _ref.onChange,
|
|
22
22
|
tab = _ref.tab,
|
|
23
23
|
className = _ref.className,
|
|
@@ -58,6 +58,19 @@ var Tabs = function Tabs(_ref, ref) {
|
|
|
58
58
|
}
|
|
59
59
|
}, [options]);
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* @title: 一个页面多个tab,id会重复
|
|
63
|
+
* @description:
|
|
64
|
+
* @param {*} useMemo
|
|
65
|
+
* @return {*}
|
|
66
|
+
* @Author: WangHan
|
|
67
|
+
* @Date: 2024-07-30 11:02
|
|
68
|
+
*/
|
|
69
|
+
var _id = useMemo(function () {
|
|
70
|
+
var _id = name ? "pisell-".concat(name, "-tabs") : 'pisell-tabs';
|
|
71
|
+
return _id;
|
|
72
|
+
}, [name]);
|
|
73
|
+
|
|
61
74
|
/**
|
|
62
75
|
* @title: 判断是否展示箭头
|
|
63
76
|
* @description:
|
|
@@ -66,8 +79,8 @@ var Tabs = function Tabs(_ref, ref) {
|
|
|
66
79
|
* @Date: 2023-08-01 15:59
|
|
67
80
|
*/
|
|
68
81
|
var calculateWidth = function calculateWidth() {
|
|
69
|
-
var content = document.querySelector("#
|
|
70
|
-
var itemList = document.querySelector("#
|
|
82
|
+
var content = document.querySelector("#".concat(_id));
|
|
83
|
+
var itemList = document.querySelector("#".concat(_id, "-content"));
|
|
71
84
|
if ((itemList === null || itemList === void 0 ? void 0 : itemList.offsetWidth) + 60 < (content === null || content === void 0 ? void 0 : content.offsetWidth)) {
|
|
72
85
|
setIsShowButton(false);
|
|
73
86
|
}
|
|
@@ -126,8 +139,8 @@ var Tabs = function Tabs(_ref, ref) {
|
|
|
126
139
|
|
|
127
140
|
// 设置滚动位置
|
|
128
141
|
var setTabScroll = function setTabScroll(val) {
|
|
129
|
-
var dom = document.querySelector("#
|
|
130
|
-
console.log(
|
|
142
|
+
var dom = document.querySelector("#".concat(_id, "-content"));
|
|
143
|
+
console.log('domdom', dom);
|
|
131
144
|
if (!dom) {
|
|
132
145
|
return;
|
|
133
146
|
}
|
|
@@ -143,11 +156,11 @@ var Tabs = function Tabs(_ref, ref) {
|
|
|
143
156
|
* @Date: 2023-06-03 10:45
|
|
144
157
|
*/
|
|
145
158
|
var onPageChange = function onPageChange(type) {
|
|
146
|
-
var dom = document.querySelector("#
|
|
159
|
+
var dom = document.querySelector("#".concat(_id, "-content"));
|
|
147
160
|
if (!dom) {
|
|
148
161
|
return;
|
|
149
162
|
}
|
|
150
|
-
if (type ===
|
|
163
|
+
if (type === 'left') {
|
|
151
164
|
setTabScroll((dom === null || dom === void 0 ? void 0 : dom.scrollLeft) - dom.clientWidth / 2);
|
|
152
165
|
} else {
|
|
153
166
|
setTabScroll((dom === null || dom === void 0 ? void 0 : dom.scrollLeft) + dom.clientWidth / 2);
|
|
@@ -162,7 +175,7 @@ var Tabs = function Tabs(_ref, ref) {
|
|
|
162
175
|
width: leftWidth
|
|
163
176
|
},
|
|
164
177
|
onClick: function onClick() {
|
|
165
|
-
onPageChange(
|
|
178
|
+
onPageChange('left');
|
|
166
179
|
}
|
|
167
180
|
}, /*#__PURE__*/React.createElement(ChevronLeft, {
|
|
168
181
|
className: "pisell-tabs-btn-icon"
|
|
@@ -178,10 +191,10 @@ var Tabs = function Tabs(_ref, ref) {
|
|
|
178
191
|
className: "pisell-tabs-btn-right",
|
|
179
192
|
style: {
|
|
180
193
|
width: rightWidth,
|
|
181
|
-
marginRight: !rightWidth ?
|
|
194
|
+
marginRight: !rightWidth ? '20px' : 0
|
|
182
195
|
},
|
|
183
196
|
onClick: function onClick() {
|
|
184
|
-
onPageChange(
|
|
197
|
+
onPageChange('right');
|
|
185
198
|
}
|
|
186
199
|
}, /*#__PURE__*/React.createElement(ChevronRight, {
|
|
187
200
|
className: "pisell-tabs-btn-icon"
|
|
@@ -192,16 +205,16 @@ var Tabs = function Tabs(_ref, ref) {
|
|
|
192
205
|
var content = useMemo(function () {
|
|
193
206
|
return /*#__PURE__*/React.createElement("div", {
|
|
194
207
|
className: "pisell-tabs-content",
|
|
195
|
-
id: "
|
|
208
|
+
id: "".concat(_id, "-content"),
|
|
196
209
|
onScroll: onScroll
|
|
197
210
|
}, _options.map(function (d, i) {
|
|
198
211
|
var _key = rowKey ? d[rowKey] : i;
|
|
199
212
|
return /*#__PURE__*/React.createElement("div", {
|
|
200
|
-
className: classNames(
|
|
201
|
-
|
|
213
|
+
className: classNames('pisell-tabs-tab', {
|
|
214
|
+
'pisell-tabs-tab-active': tab === _key
|
|
202
215
|
}),
|
|
203
216
|
key: _key,
|
|
204
|
-
id: name +
|
|
217
|
+
id: name + '' + _key,
|
|
205
218
|
onClick: function onClick(e) {
|
|
206
219
|
_onChange(_key, d, e);
|
|
207
220
|
}
|
|
@@ -211,8 +224,8 @@ var Tabs = function Tabs(_ref, ref) {
|
|
|
211
224
|
}));
|
|
212
225
|
}, [_options, rowKey, name, tab]);
|
|
213
226
|
return /*#__PURE__*/React.createElement("div", {
|
|
214
|
-
className: classNames(
|
|
215
|
-
id:
|
|
227
|
+
className: classNames('pisell-tabs', className),
|
|
228
|
+
id: _id
|
|
216
229
|
}, isShowButton && leftBtn, content, isShowButton && rightBtn);
|
|
217
230
|
};
|
|
218
231
|
export default /*#__PURE__*/forwardRef(Tabs);
|
|
@@ -13,5 +13,5 @@ export interface InfoProps {
|
|
|
13
13
|
setGlobalState: any;
|
|
14
14
|
}
|
|
15
15
|
export declare const formatProducts: (values: any) => any;
|
|
16
|
-
declare const Addons:
|
|
16
|
+
declare const Addons: any;
|
|
17
17
|
export default Addons;
|
|
@@ -63,7 +63,8 @@ var ProductItem = ({
|
|
|
63
63
|
"img",
|
|
64
64
|
{
|
|
65
65
|
src: import_utils.image.ali(item.cover, 100),
|
|
66
|
-
className: "server-product-cover"
|
|
66
|
+
className: "server-product-cover",
|
|
67
|
+
loading: "lazy"
|
|
67
68
|
}
|
|
68
69
|
) : null,
|
|
69
70
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "server-product-content" }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking:
|
|
1
|
+
declare const Booking: any;
|
|
2
2
|
export default Booking;
|
|
@@ -36,9 +36,19 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_utils = require("@pisell/utils");
|
|
38
38
|
var import_icons = require("@ant-design/icons");
|
|
39
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
39
40
|
var import_index = require("./index.less");
|
|
41
|
+
var import_classnames = __toESM(require("classnames"));
|
|
40
42
|
var header = ({ state, dispatch }) => {
|
|
41
|
-
var _a, _b, _c;
|
|
43
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
44
|
+
const context = (0, import_useEngineContext.default)();
|
|
45
|
+
const [modalContent, setModalContent] = (0, import_react.useState)({
|
|
46
|
+
open: false,
|
|
47
|
+
children: "",
|
|
48
|
+
footer: null,
|
|
49
|
+
title: /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { height: 14 } })
|
|
50
|
+
});
|
|
51
|
+
const { isTerminal, interaction, store, storage } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
42
52
|
const statusList = [
|
|
43
53
|
{
|
|
44
54
|
label: import_utils.locales.getText("pisell2.text.status.new"),
|
|
@@ -61,12 +71,12 @@ var header = ({ state, dispatch }) => {
|
|
|
61
71
|
color: "#155EEF"
|
|
62
72
|
},
|
|
63
73
|
{
|
|
64
|
-
label: import_utils.locales.getText("pisell2.text.status.cancelled"),
|
|
74
|
+
label: /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#D92D20" } }, import_utils.locales.getText("pisell2.text.status.cancelled")),
|
|
65
75
|
key: "cancelled",
|
|
66
76
|
color: "#DC6803"
|
|
67
77
|
},
|
|
68
78
|
{
|
|
69
|
-
label: import_utils.locales.getText("pisell2.text.status.no_show"),
|
|
79
|
+
label: /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#D92D20" } }, import_utils.locales.getText("pisell2.text.status.no_show")),
|
|
70
80
|
key: "no_show",
|
|
71
81
|
color: "#D92D20"
|
|
72
82
|
},
|
|
@@ -80,7 +90,9 @@ var header = ({ state, dispatch }) => {
|
|
|
80
90
|
online_store: import_utils.locales.getText("pisell2.text.order.sales.channel.online"),
|
|
81
91
|
pos: import_utils.locales.getText("pisell2.text.order.sales.channel.pos-terminal"),
|
|
82
92
|
boxlocal: import_utils.locales.getText("pisell2.text.order.sales.channel.boxcocal"),
|
|
83
|
-
"table-order": import_utils.locales.getText(
|
|
93
|
+
"table-order": import_utils.locales.getText(
|
|
94
|
+
"pisell2.text.order.sales.channel.tableorder"
|
|
95
|
+
),
|
|
84
96
|
google_reserve: import_utils.locales.getText("pisell2.text.order.sales.channel.reserve")
|
|
85
97
|
};
|
|
86
98
|
const getStatusMap = () => {
|
|
@@ -91,13 +103,14 @@ var header = ({ state, dispatch }) => {
|
|
|
91
103
|
return obj;
|
|
92
104
|
};
|
|
93
105
|
const statusMps = getStatusMap();
|
|
94
|
-
const items =
|
|
106
|
+
const items = (0, import_react.useMemo)(() => {
|
|
107
|
+
return statusList.filter((item) => item.key !== state.appointment_status);
|
|
108
|
+
}, [statusList]);
|
|
95
109
|
const currentStatus = (0, import_react.useMemo)(() => {
|
|
96
110
|
let status = state.appointment_status;
|
|
97
111
|
return statusMps[status] || statusMps["new"];
|
|
98
112
|
}, [state.appointment_status]);
|
|
99
|
-
const
|
|
100
|
-
const status = e.key;
|
|
113
|
+
const setBookingStatus = async (status) => {
|
|
101
114
|
dispatch({
|
|
102
115
|
type: "setStatus",
|
|
103
116
|
payload: status
|
|
@@ -108,14 +121,202 @@ var header = ({ state, dispatch }) => {
|
|
|
108
121
|
import_antd.message.success(import_utils.locales.getText("pisell1.text.edit-status-success"));
|
|
109
122
|
state == null ? void 0 : state.callback({ order_id: state.bookingId });
|
|
110
123
|
};
|
|
111
|
-
|
|
124
|
+
const onSelect = async (e) => {
|
|
125
|
+
if (e.key === "cancelled") {
|
|
126
|
+
handleCancel();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
await setBookingStatus(e.key);
|
|
130
|
+
};
|
|
131
|
+
const setModalContentState = (values) => {
|
|
132
|
+
setModalContent({ ...modalContent, ...values });
|
|
133
|
+
};
|
|
134
|
+
const goCheckout = async () => {
|
|
135
|
+
var _a2, _b2;
|
|
136
|
+
if (isTerminal == null ? void 0 : isTerminal()) {
|
|
137
|
+
return (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
|
138
|
+
module: "booking",
|
|
139
|
+
key: "booking_checkout",
|
|
140
|
+
data: {
|
|
141
|
+
order_id: state.bookingId
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
state.action({
|
|
146
|
+
type: "pisell1.handlePayment",
|
|
147
|
+
data: {
|
|
148
|
+
orderId: state.bookingId
|
|
149
|
+
},
|
|
150
|
+
callback: () => {
|
|
151
|
+
state == null ? void 0 : state.callback();
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
const isPaid = (0, import_react.useMemo)(() => {
|
|
156
|
+
return ["partially_paid", "paid"].find(
|
|
157
|
+
(d) => {
|
|
158
|
+
var _a2;
|
|
159
|
+
return d === ((_a2 = state.bookingDetail) == null ? void 0 : _a2.payment_status);
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
}, [(_b = state.bookingDetail) == null ? void 0 : _b.payment_status]);
|
|
163
|
+
const isTicket = (0, import_react.useMemo)(() => {
|
|
164
|
+
var _a2;
|
|
165
|
+
return (((_a2 = state.service) == null ? void 0 : _a2.value) || []).some(
|
|
166
|
+
(d) => ["appointment_ticket", "product_package_ticket", "ticket"].includes(
|
|
167
|
+
d.extension_type
|
|
168
|
+
)
|
|
169
|
+
);
|
|
170
|
+
}, [(_c = state.service) == null ? void 0 : _c.value]);
|
|
171
|
+
const isPaymentProcessingPayments = (0, import_react.useMemo)(() => {
|
|
172
|
+
var _a2;
|
|
173
|
+
return !!((_a2 = state.bookingDetail) == null ? void 0 : _a2.payment_processing_payment_nums);
|
|
174
|
+
}, [(_e = (_d = state.bookingDetail) == null ? void 0 : _d.payment_processing_payments) == null ? void 0 : _e.length]);
|
|
175
|
+
const handleCancel = () => {
|
|
176
|
+
if (isPaymentProcessingPayments) {
|
|
177
|
+
return showPaymentModal();
|
|
178
|
+
}
|
|
179
|
+
return showCancelledModal();
|
|
180
|
+
};
|
|
181
|
+
const handleRefund = () => {
|
|
182
|
+
var _a2, _b2;
|
|
183
|
+
if (isTerminal == null ? void 0 : isTerminal()) {
|
|
184
|
+
return (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
|
185
|
+
module: "booking",
|
|
186
|
+
key: "booking_refund",
|
|
187
|
+
data: {
|
|
188
|
+
order_id: state.bookingId
|
|
189
|
+
},
|
|
190
|
+
origin: "/booking"
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
state.action({
|
|
194
|
+
type: "pisell1.handleRefund",
|
|
195
|
+
data: {
|
|
196
|
+
orderId: state.bookingId
|
|
197
|
+
},
|
|
198
|
+
callback: () => {
|
|
199
|
+
state == null ? void 0 : state.callback({ order_id: state.bookingId });
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
const showPaymentModal = () => {
|
|
204
|
+
setModalContentState({
|
|
205
|
+
className: "go-payments-modal-wrap",
|
|
206
|
+
open: true,
|
|
207
|
+
width: 480,
|
|
208
|
+
onCancel: () => {
|
|
209
|
+
setModalContentState({ open: false });
|
|
210
|
+
},
|
|
211
|
+
children: /* @__PURE__ */ import_react.default.createElement("div", { className: "go-payments-modal-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "go-payments-modal-content-title" }, import_utils.locales.getText("page.booking.text.unconfirmed-payements")), /* @__PURE__ */ import_react.default.createElement("div", { className: "go-payments-modal-content-desc" }, import_utils.locales.getText("page.booking.text.unconfirmed-payements.msg")), /* @__PURE__ */ import_react.default.createElement("div", { className: "go-payments-footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
212
|
+
import_antd.Button,
|
|
213
|
+
{
|
|
214
|
+
className: "go-payments-footer-btn",
|
|
215
|
+
size: "large",
|
|
216
|
+
onClick: () => {
|
|
217
|
+
setModalContentState({ open: false });
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
import_utils.locales.getText("pisell2.text.status.cancelled")
|
|
221
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
222
|
+
import_antd.Button,
|
|
223
|
+
{
|
|
224
|
+
className: "go-payments-footer-btn",
|
|
225
|
+
type: "primary",
|
|
226
|
+
size: "large",
|
|
227
|
+
onClick: () => {
|
|
228
|
+
goCheckout();
|
|
229
|
+
setModalContentState({ open: false });
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
import_utils.locales.getText("page.booking.text.go-to-payments")
|
|
233
|
+
))),
|
|
234
|
+
footer: null
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
const showCancelledModal = () => {
|
|
238
|
+
const cancelBtn = /* @__PURE__ */ import_react.default.createElement(
|
|
239
|
+
import_antd.Button,
|
|
240
|
+
{
|
|
241
|
+
className: "go-payments-footer-btn",
|
|
242
|
+
size: "large",
|
|
243
|
+
type: "primary",
|
|
244
|
+
onClick: () => {
|
|
245
|
+
setBookingStatus("cancelled");
|
|
246
|
+
setModalContentState({ open: false });
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
import_utils.locales.getText("page.booking.text.cancel-only")
|
|
250
|
+
);
|
|
251
|
+
const refundBtn = /* @__PURE__ */ import_react.default.createElement(
|
|
252
|
+
import_antd.Button,
|
|
253
|
+
{
|
|
254
|
+
className: "go-payments-footer-btn",
|
|
255
|
+
size: "large",
|
|
256
|
+
danger: true,
|
|
257
|
+
ghost: true,
|
|
258
|
+
onClick: () => {
|
|
259
|
+
handleRefund();
|
|
260
|
+
setModalContentState({ open: false });
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
import_utils.locales.getText("page.booking.text.refund")
|
|
264
|
+
);
|
|
265
|
+
const okBtn = /* @__PURE__ */ import_react.default.createElement(
|
|
266
|
+
import_antd.Button,
|
|
267
|
+
{
|
|
268
|
+
className: "go-payments-footer-btn",
|
|
269
|
+
size: "large",
|
|
270
|
+
type: "primary",
|
|
271
|
+
onClick: () => {
|
|
272
|
+
setBookingStatus("cancelled");
|
|
273
|
+
setModalContentState({ open: false });
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
import_utils.locales.getText("page.booking.text.confirm")
|
|
277
|
+
);
|
|
278
|
+
const backBtn = /* @__PURE__ */ import_react.default.createElement(
|
|
279
|
+
import_antd.Button,
|
|
280
|
+
{
|
|
281
|
+
className: "go-payments-footer-btn",
|
|
282
|
+
size: "large",
|
|
283
|
+
onClick: () => {
|
|
284
|
+
setModalContentState({ open: false });
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
import_utils.locales.getText("page.booking.text.go-back")
|
|
288
|
+
);
|
|
289
|
+
setModalContentState({
|
|
290
|
+
className: "go-payments-modal-wrap",
|
|
291
|
+
open: true,
|
|
292
|
+
width: 480,
|
|
293
|
+
onCancel: () => {
|
|
294
|
+
setModalContentState({ open: false });
|
|
295
|
+
},
|
|
296
|
+
children: /* @__PURE__ */ import_react.default.createElement("div", { className: "go-payments-modal-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "cancelled-modal-content-title" }, import_utils.locales.getText("page.booking.text.cancel-booking")), /* @__PURE__ */ import_react.default.createElement("div", { className: "cancelled-modal-content-desc cancelled-modal-content-desc-red" }, import_utils.locales.getText("page.booking.text.cancel-booking.msg")), isTicket ? /* @__PURE__ */ import_react.default.createElement("div", { className: "cancelled-modal-content-desc" }, import_utils.locales.getText("page.booking.text.disabled-tickets")) : null, isPaid ? /* @__PURE__ */ import_react.default.createElement("div", { className: "cancelled-modal-content-list-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "cancelled-modal-content-list-title" }, import_utils.locales.getText("page.booking.text.paid.msg")(isPaid), " ", import_utils.locales.getText("page.booking.text.please-choose-an-option")), /* @__PURE__ */ import_react.default.createElement("ul", { className: "cancelled-modal-content-ul" }, /* @__PURE__ */ import_react.default.createElement("li", { className: "cancelled-modal-content-li" }, import_utils.locales.getText(
|
|
297
|
+
"page.booking.text.please-choose-an-option-2"
|
|
298
|
+
)), /* @__PURE__ */ import_react.default.createElement("li", { className: "cancelled-modal-content-li" }, import_utils.locales.getText(
|
|
299
|
+
"page.booking.text.please-choose-an-option-1"
|
|
300
|
+
)))) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
301
|
+
"div",
|
|
302
|
+
{
|
|
303
|
+
className: (0, import_classnames.default)("go-payments-footer", {
|
|
304
|
+
"go-payments-footer-column": isPaid
|
|
305
|
+
})
|
|
306
|
+
},
|
|
307
|
+
isPaid ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, cancelBtn, refundBtn, backBtn) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, backBtn, okBtn)
|
|
308
|
+
)),
|
|
309
|
+
footer: null
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
112
313
|
"div",
|
|
113
314
|
{
|
|
114
315
|
className: "booking-header",
|
|
115
316
|
style: { backgroundColor: currentStatus.color }
|
|
116
317
|
},
|
|
117
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-order-sales-channel" }, orderSalesChannel[(
|
|
118
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-header-line-2" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-header-left" }, import_utils.locales.getText("pisell2.text.status.booking_id"), ":", " ", ((
|
|
318
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-order-sales-channel" }, orderSalesChannel[(_f = state.bookingDetail) == null ? void 0 : _f.order_sales_channel] || ""),
|
|
319
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-header-line-2" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-header-left" }, import_utils.locales.getText("pisell2.text.status.booking_id"), ":", " ", ((_h = (_g = state.bookingDetail) == null ? void 0 : _g.bookings) == null ? void 0 : _h.booking_id) || "-"), /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-header-right" }, /* @__PURE__ */ import_react.default.createElement(
|
|
119
320
|
import_antd.Dropdown,
|
|
120
321
|
{
|
|
121
322
|
menu: { items, onClick: onSelect },
|
|
@@ -123,6 +324,6 @@ var header = ({ state, dispatch }) => {
|
|
|
123
324
|
},
|
|
124
325
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-header-right-status" }, currentStatus.label, state.appointment_status !== "cancelled" ? /* @__PURE__ */ import_react.default.createElement(import_icons.DownOutlined, { className: "booking-header-right-status-icon" }) : null)
|
|
125
326
|
)))
|
|
126
|
-
);
|
|
327
|
+
), /* @__PURE__ */ import_react.default.createElement(import_antd.Modal, { ...modalContent }));
|
|
127
328
|
};
|
|
128
329
|
var header_default = header;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
display: flex;
|
|
49
49
|
align-items: center;
|
|
50
50
|
gap: 10px;
|
|
51
|
-
color: var(--Base-White, #FFF);
|
|
51
|
+
color: var(--Base-White, #FFF) !important;
|
|
52
52
|
font-size: 18px;
|
|
53
53
|
font-style: normal;
|
|
54
54
|
font-weight: 400;
|
|
@@ -57,10 +57,119 @@
|
|
|
57
57
|
padding: 4px 12px;
|
|
58
58
|
border-radius: 24px;
|
|
59
59
|
|
|
60
|
+
span {
|
|
61
|
+
color: var(--Base-White, #FFF) !important;
|
|
62
|
+
}
|
|
60
63
|
|
|
61
64
|
.booking-header-right-status-icon {
|
|
62
65
|
font-size: 20px;
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
68
|
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.go-payments-modal-wrap {
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.go-payments-modal-content {
|
|
76
|
+
margin: 0 -24px;
|
|
77
|
+
|
|
78
|
+
.go-payments-modal-content-title {
|
|
79
|
+
color: var(--Gray-900, #101828);
|
|
80
|
+
font-size: 24px;
|
|
81
|
+
font-style: normal;
|
|
82
|
+
font-weight: 600;
|
|
83
|
+
line-height: 32px;
|
|
84
|
+
padding: 0 24px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.go-payments-modal-content-desc {
|
|
88
|
+
color: var(--Gray-900, #101828);
|
|
89
|
+
font-size: 16px;
|
|
90
|
+
font-style: normal;
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
line-height: 24px;
|
|
93
|
+
padding: 0 24px;
|
|
94
|
+
margin-top: 4px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.cancelled-modal-content-title {
|
|
98
|
+
color: var(--Gray-900, #101828);
|
|
99
|
+
font-size: 24px;
|
|
100
|
+
font-style: normal;
|
|
101
|
+
font-weight: 600;
|
|
102
|
+
line-height: 32px;
|
|
103
|
+
padding: 0 24px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.cancelled-modal-content-desc {
|
|
107
|
+
margin-top: 4px;
|
|
108
|
+
color: #101828;
|
|
109
|
+
font-size: 16px;
|
|
110
|
+
font-style: normal;
|
|
111
|
+
font-weight: 500;
|
|
112
|
+
line-height: 24px;
|
|
113
|
+
padding: 0 24px;
|
|
114
|
+
|
|
115
|
+
&.cancelled-modal-content-desc-red {
|
|
116
|
+
color: var(--Error-600, #D92D20);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.cancelled-modal-content-list-wrap {
|
|
121
|
+
padding: 0 24px;
|
|
122
|
+
|
|
123
|
+
.cancelled-modal-content-list-title {
|
|
124
|
+
color: var(--Gray-900, #101828);
|
|
125
|
+
font-size: 16px;
|
|
126
|
+
font-style: normal;
|
|
127
|
+
font-weight: 500;
|
|
128
|
+
line-height: 24px;
|
|
129
|
+
margin-top: 4px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.cancelled-modal-content-ul {
|
|
133
|
+
margin-top: 4px;
|
|
134
|
+
|
|
135
|
+
.cancelled-modal-content-li {
|
|
136
|
+
color: var(--Gray-900, #101828);
|
|
137
|
+
font-size: 16px;
|
|
138
|
+
font-style: normal;
|
|
139
|
+
font-weight: 500;
|
|
140
|
+
line-height: 24px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.go-payments-footer {
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
gap: 12px;
|
|
151
|
+
border-top: 1px solid var(--Gray-200, #EAECF0);
|
|
152
|
+
margin-top: 16px;
|
|
153
|
+
padding: 24px 24px 4px;
|
|
154
|
+
width: 100%;
|
|
155
|
+
|
|
156
|
+
.go-payments-footer-btn {
|
|
157
|
+
flex: 1;
|
|
158
|
+
font-size: 16px;
|
|
159
|
+
font-style: normal;
|
|
160
|
+
font-weight: 600;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.go-payments-footer-column {
|
|
164
|
+
flex-direction: column;
|
|
165
|
+
gap: 12px;
|
|
166
|
+
|
|
167
|
+
.go-payments-footer-btn {
|
|
168
|
+
width: 100%;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
}
|
|
174
|
+
|
|
66
175
|
}
|
|
@@ -251,7 +251,9 @@ var Info = ({ onEdit }) => {
|
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
253
|
if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_g = (_f = state.service) == null ? void 0 : _f.value) == null ? void 0 : _g.length) === 0) {
|
|
254
|
-
|
|
254
|
+
setTimeout(() => {
|
|
255
|
+
handleSelectService();
|
|
256
|
+
}, 10);
|
|
255
257
|
}
|
|
256
258
|
}, [state.modalOpen, state.bookingId, (_b = state.service) == null ? void 0 : _b.value]);
|
|
257
259
|
const showAddButton = (0, import_react.useMemo)(() => {
|
|
@@ -343,7 +343,9 @@ var Info = (_, ref) => {
|
|
|
343
343
|
setResourceLoading(false);
|
|
344
344
|
};
|
|
345
345
|
(0, import_react.useEffect)(() => {
|
|
346
|
-
|
|
346
|
+
setTimeout(() => {
|
|
347
|
+
getResourcesData();
|
|
348
|
+
}, 20);
|
|
347
349
|
}, [state.date.value]);
|
|
348
350
|
const handleEdit = (e) => {
|
|
349
351
|
const item = state.service.cacheItem;
|