@pisell/private-materials 3.0.155 → 3.0.157-gray
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 +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/booking/addons/index.js +10 -7
- package/es/components/booking/addons/model.d.ts +2 -1
- package/es/components/booking/components/TabProduct/index.js +1 -1
- package/es/components/booking/components/customSelect/index.js +5 -1
- package/es/components/booking/components/drawer/index.d.ts +3 -3
- package/es/components/booking/components/drawer/index.js +15 -13
- package/es/components/booking/components/drawer/index.less +8 -6
- package/es/components/booking/components/footer/index.js +24 -10
- package/es/components/booking/dashboard/index.d.ts +20 -0
- package/es/components/booking/dashboard/index.js +253 -0
- package/es/components/booking/dashboard/serve.d.ts +1 -0
- package/es/components/booking/dashboard/serve.js +27 -0
- package/es/components/booking/deposit/EditDepositModal/index.less +3 -0
- package/es/components/booking/forms/forms.d.ts +1 -0
- package/es/components/booking/forms/forms.js +4 -2
- package/es/components/booking/forms/model.d.ts +2 -1
- package/es/components/booking/forms/single/index.d.ts +1 -1
- package/es/components/booking/forms/single/index.js +4 -3
- package/es/components/booking/info/addServiceVariant/index.d.ts +7 -0
- package/es/components/booking/info/addServiceVariant/index.js +33 -0
- package/es/components/booking/info/client/index.js +35 -15
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +4 -4
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +59 -32
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +3 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.js +14 -0
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +4 -3
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +41 -35
- package/es/components/booking/info/clientVariant/vertical/index.d.ts +1 -1
- package/es/components/booking/info/clientVariant/vertical/index.js +32 -14
- package/es/components/booking/info/clientVariant/vertical/index.less +37 -11
- package/es/components/booking/info/date/index.js +1 -0
- package/es/components/booking/info/date/index.less +2 -0
- package/es/components/booking/info/header/index.js +13 -12
- package/es/components/booking/info/index.less +9 -0
- package/es/components/booking/info/main.js +10 -1
- package/es/components/booking/info/pet/index.js +1 -1
- package/es/components/booking/info/service/addService/index.d.ts +8 -2
- package/es/components/booking/info/service/addService/index.js +92 -44
- package/es/components/booking/info/service/addService/index.less +27 -1
- package/es/components/booking/info/service/addTimeModal/index.js +1 -0
- package/es/components/booking/info/service/addTimeModal/index.less +1 -1
- package/es/components/booking/info/service/editService/index.js +14 -15
- package/es/components/booking/info/service/serviceList/index.js +2 -1
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/index.js +10 -1
- package/es/components/booking/locales.d.ts +48 -0
- package/es/components/booking/locales.js +51 -3
- package/es/components/booking/model.d.ts +4 -0
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +2 -1
- package/es/components/booking/payments/model.d.ts +2 -1
- package/es/components/booking/utils.d.ts +1 -1
- package/es/components/booking/utils.js +54 -51
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +2 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/lib/components/booking/addons/index.js +2 -5
- package/lib/components/booking/addons/model.d.ts +2 -1
- package/lib/components/booking/components/TabProduct/index.js +1 -1
- package/lib/components/booking/components/customSelect/index.js +2 -1
- package/lib/components/booking/components/drawer/index.d.ts +3 -3
- package/lib/components/booking/components/drawer/index.js +13 -11
- package/lib/components/booking/components/drawer/index.less +8 -6
- package/lib/components/booking/components/footer/index.js +19 -15
- package/lib/components/booking/dashboard/index.d.ts +20 -0
- package/lib/components/booking/dashboard/index.js +251 -0
- package/lib/components/booking/dashboard/serve.d.ts +1 -0
- package/lib/components/booking/dashboard/serve.js +33 -0
- package/lib/components/booking/deposit/EditDepositModal/index.less +3 -0
- package/lib/components/booking/forms/forms.d.ts +1 -0
- package/lib/components/booking/forms/forms.js +5 -2
- package/lib/components/booking/forms/model.d.ts +2 -1
- package/lib/components/booking/forms/single/index.d.ts +1 -1
- package/lib/components/booking/forms/single/index.js +4 -2
- package/lib/components/booking/info/addServiceVariant/index.d.ts +7 -0
- package/lib/components/booking/info/addServiceVariant/index.js +58 -0
- package/lib/components/booking/info/client/index.js +33 -21
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +4 -4
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +33 -13
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +3 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.js +36 -0
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +4 -3
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +43 -11
- package/lib/components/booking/info/clientVariant/vertical/index.d.ts +1 -1
- package/lib/components/booking/info/clientVariant/vertical/index.js +121 -88
- package/lib/components/booking/info/clientVariant/vertical/index.less +37 -11
- package/lib/components/booking/info/date/index.js +1 -0
- package/lib/components/booking/info/date/index.less +2 -0
- package/lib/components/booking/info/header/index.js +14 -12
- package/lib/components/booking/info/index.less +9 -0
- package/lib/components/booking/info/main.js +14 -1
- package/lib/components/booking/info/pet/index.js +2 -1
- package/lib/components/booking/info/service/addService/index.d.ts +8 -2
- package/lib/components/booking/info/service/addService/index.js +69 -30
- package/lib/components/booking/info/service/addService/index.less +27 -1
- package/lib/components/booking/info/service/addTimeModal/index.js +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.less +1 -1
- package/lib/components/booking/info/service/editService/index.js +17 -13
- package/lib/components/booking/info/service/serviceList/index.js +4 -3
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/index.js +14 -1
- package/lib/components/booking/locales.d.ts +48 -0
- package/lib/components/booking/locales.js +51 -3
- package/lib/components/booking/model.d.ts +4 -0
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +2 -1
- package/lib/components/booking/payments/model.d.ts +2 -1
- package/lib/components/booking/utils.d.ts +1 -1
- package/lib/components/booking/utils.js +57 -22
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lowcode/booking-dashboard/meta.ts +137 -0
- package/lowcode/booking-vertical-add-service/meta.ts +124 -0
- package/lowcode/vertical-add-service/meta.ts +71 -0
- package/package.json +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.pisell-lowcode__booking-drawer-title-wrap {
|
|
2
|
-
cursor: pointer;
|
|
3
2
|
position: sticky;
|
|
4
3
|
top: 0;
|
|
5
4
|
left: 0;
|
|
@@ -9,18 +8,21 @@
|
|
|
9
8
|
padding: 24px 32px 0 32px;
|
|
10
9
|
|
|
11
10
|
|
|
11
|
+
.pisell-lowcode__booking-drawer-title-line {
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
}
|
|
12
14
|
|
|
13
15
|
.pisell-lowcode__booking-drawer-back {
|
|
14
|
-
font-size:
|
|
16
|
+
font-size: 18px !important;
|
|
15
17
|
color: #000000;
|
|
18
|
+
margin-right: 6px;
|
|
19
|
+
cursor: pointer;
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
.pisell-lowcode__booking-drawer-title {
|
|
19
23
|
color: var(--base-black, #000);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
font-size: 30px;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
font-size: 18px !important;
|
|
24
26
|
font-style: normal;
|
|
25
27
|
font-weight: 500;
|
|
26
28
|
line-height: 38px;
|
|
@@ -49,14 +49,23 @@ var import_serve = require("./serve");
|
|
|
49
49
|
var import_serve2 = require("../../info2/serve");
|
|
50
50
|
var import_utils3 = require("../../info/utils");
|
|
51
51
|
var Footer = (props) => {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
53
53
|
const { state, buttons, dispatch, source } = props;
|
|
54
54
|
const [showDetail, setShowDetail] = (0, import_react.useState)(false);
|
|
55
55
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
56
56
|
const [checkoutLoading, setCheckoutLoading] = (0, import_react.useState)(false);
|
|
57
|
+
const [isShowPaymentLink, setIsShowPaymentLink] = (0, import_react.useState)(false);
|
|
57
58
|
const context = (0, import_useEngineContext.default)();
|
|
58
59
|
const { isTerminal, interaction, store, storage } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
59
|
-
|
|
60
|
+
(0, import_react.useEffect)(() => {
|
|
61
|
+
store == null ? void 0 : store.dispatch({
|
|
62
|
+
type: "global/_getMetadataMap",
|
|
63
|
+
callback: (data) => {
|
|
64
|
+
console.log(data, "data");
|
|
65
|
+
setIsShowPaymentLink(!!data["payment_collection_link_config_switch"]);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}, []);
|
|
60
69
|
const [modal, contextHolder] = import_antd.Modal.useModal();
|
|
61
70
|
const { setActiveTab } = state;
|
|
62
71
|
const isTeam = (0, import_react.useMemo)(() => {
|
|
@@ -112,29 +121,24 @@ var Footer = (props) => {
|
|
|
112
121
|
});
|
|
113
122
|
}
|
|
114
123
|
}, [state.bookingDetail]);
|
|
115
|
-
(0, import_react.useEffect)(() => {
|
|
116
|
-
store == null ? void 0 : store.dispatch({
|
|
117
|
-
type: "global/_getPaymentLinkBtnShow"
|
|
118
|
-
});
|
|
119
|
-
}, []);
|
|
120
124
|
const params = (0, import_react.useMemo)(() => {
|
|
121
125
|
var _a2, _b2, _c2;
|
|
122
126
|
return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.appointment_subject) || {};
|
|
123
|
-
}, [(
|
|
127
|
+
}, [(_d = (_c = (_b = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.appointment_subject]);
|
|
124
128
|
const transaction_habit_selection = (0, import_react.useMemo)(() => {
|
|
125
129
|
var _a2, _b2, _c2;
|
|
126
130
|
return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.information_tab) == null ? void 0 : _c2.transaction_habit_selection) || {
|
|
127
131
|
type: "service_now_pay_later",
|
|
128
132
|
button_rows: 1
|
|
129
133
|
};
|
|
130
|
-
}, [(
|
|
134
|
+
}, [(_f = (_e = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _e.config) == null ? void 0 : _f.information_tab]);
|
|
131
135
|
const addonsEdit = (0, import_react.useMemo)(() => {
|
|
132
136
|
var _a2;
|
|
133
137
|
if ((_a2 = state.addons) == null ? void 0 : _a2.edit) {
|
|
134
138
|
return true;
|
|
135
139
|
}
|
|
136
140
|
return false;
|
|
137
|
-
}, [(
|
|
141
|
+
}, [(_g = state.addons) == null ? void 0 : _g.edit]);
|
|
138
142
|
const infoEdit = (0, import_react.useMemo)(() => {
|
|
139
143
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
140
144
|
if (!state.bookingId) {
|
|
@@ -618,7 +622,7 @@ var Footer = (props) => {
|
|
|
618
622
|
}
|
|
619
623
|
if (transaction_habit_selection.button_rows == 1) {
|
|
620
624
|
if (state.appointment_status !== "cancelled") {
|
|
621
|
-
if (!state.disabledEdit) {
|
|
625
|
+
if (!state.disabledEdit && !state.isBookingCreatePage) {
|
|
622
626
|
arr.push(actionMap.sale);
|
|
623
627
|
}
|
|
624
628
|
}
|
|
@@ -718,7 +722,7 @@ var Footer = (props) => {
|
|
|
718
722
|
if (!state.bookingDetail) {
|
|
719
723
|
return true;
|
|
720
724
|
}
|
|
721
|
-
if (!((_a2 = state.addons) == null ? void 0 : _a2.load) && state.renderType !== "eventBooking") {
|
|
725
|
+
if (!((_a2 = state.addons) == null ? void 0 : _a2.load) && state.renderType !== "eventBooking" && !state.isBookingCreatePage) {
|
|
722
726
|
return true;
|
|
723
727
|
}
|
|
724
728
|
}
|
|
@@ -726,7 +730,7 @@ var Footer = (props) => {
|
|
|
726
730
|
}, [
|
|
727
731
|
state.bookingId,
|
|
728
732
|
state.bookingDetail,
|
|
729
|
-
(
|
|
733
|
+
(_h = state.addons) == null ? void 0 : _h.load,
|
|
730
734
|
state.renderType
|
|
731
735
|
]);
|
|
732
736
|
const menuChange = (e) => {
|
|
@@ -787,7 +791,7 @@ var Footer = (props) => {
|
|
|
787
791
|
},
|
|
788
792
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-border" }),
|
|
789
793
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, import_utils.locales.getText("pisell1.text.subtotal")), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.productAmount, 2, (state == null ? void 0 : state.amountSymbol) || "$"))),
|
|
790
|
-
(((
|
|
794
|
+
(((_i = state.bookingDetail) == null ? void 0 : _i.surcharge) || []).map((d) => {
|
|
791
795
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item", key: d.id }, /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-label" }, d.name[state.locale]), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(d.amount, 2, (state == null ? void 0 : state.amountSymbol) || "$")));
|
|
792
796
|
}),
|
|
793
797
|
state.bookingId ? /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "order-total-item-label" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, import_utils.locales.getText("pisell1.text.tax")), /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { fontSize: 14 } }, taxText)), /* @__PURE__ */ import_react.default.createElement("span", { className: "order-total-item-value" }, (0, import_utils.formatAmount)(total.tax, 2, (state == null ? void 0 : state.amountSymbol) || "$"))) : null,
|
|
@@ -832,7 +836,7 @@ var Footer = (props) => {
|
|
|
832
836
|
className: "pisell-lowcode__booking-footer-buttons",
|
|
833
837
|
style: { marginTop: 12 }
|
|
834
838
|
},
|
|
835
|
-
state.appointment_status !== "cancelled" ? /* @__PURE__ */ import_react.default.createElement(
|
|
839
|
+
state.appointment_status !== "cancelled" && !state.isBookingCreatePage ? /* @__PURE__ */ import_react.default.createElement(
|
|
836
840
|
import_antd2.Button,
|
|
837
841
|
{
|
|
838
842
|
onClick: () => handleSale(),
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BookingDashboardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
backgroundColors?: string[];
|
|
4
|
+
labelColor?: string;
|
|
5
|
+
valueColor?: string;
|
|
6
|
+
otherParams?: Record<string, any>;
|
|
7
|
+
refreshKey?: string;
|
|
8
|
+
onDataChange?: (data: {
|
|
9
|
+
groupsOnSiteNow: string | number;
|
|
10
|
+
peopleOnSiteNow: string | number;
|
|
11
|
+
totalVisitorsToday: string | number;
|
|
12
|
+
ongoing: string | number;
|
|
13
|
+
upcoming: string | number;
|
|
14
|
+
overdue: string | number;
|
|
15
|
+
completed: string | number;
|
|
16
|
+
departed: string | number;
|
|
17
|
+
}, dataList: string[]) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const BookingDashboard: (props: BookingDashboardProps) => React.JSX.Element;
|
|
20
|
+
export default BookingDashboard;
|
|
@@ -0,0 +1,251 @@
|
|
|
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/dashboard/index.tsx
|
|
30
|
+
var dashboard_exports = {};
|
|
31
|
+
__export(dashboard_exports, {
|
|
32
|
+
default: () => dashboard_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(dashboard_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_materials = require("@pisell/materials");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
39
|
+
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
40
|
+
var import_utils2 = require("../utils");
|
|
41
|
+
var import_serve = require("./serve");
|
|
42
|
+
var import_locales = __toESM(require("../locales"));
|
|
43
|
+
import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
44
|
+
var BookingDashboard = (props) => {
|
|
45
|
+
const {
|
|
46
|
+
otherParams = {},
|
|
47
|
+
backgroundColors,
|
|
48
|
+
labelColor,
|
|
49
|
+
valueColor,
|
|
50
|
+
refreshKey,
|
|
51
|
+
onDataChange,
|
|
52
|
+
...others
|
|
53
|
+
} = props;
|
|
54
|
+
const context = (0, import_useEngineContext.default)();
|
|
55
|
+
import_utils2.request.setRequest(context.appHelper.utils.request);
|
|
56
|
+
const [data, setData] = (0, import_react.useState)([
|
|
57
|
+
// 当前在场团体
|
|
58
|
+
{
|
|
59
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.groups-on-site-now"),
|
|
60
|
+
value: "-",
|
|
61
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.groups-on-site-now-tip")
|
|
62
|
+
},
|
|
63
|
+
// 当前在场人数
|
|
64
|
+
{
|
|
65
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.people-on-site-now"),
|
|
66
|
+
value: "-",
|
|
67
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.people-on-site-now-tip")
|
|
68
|
+
},
|
|
69
|
+
// 今日游客总数
|
|
70
|
+
{
|
|
71
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.total-visitors-today"),
|
|
72
|
+
value: "-",
|
|
73
|
+
tip: import_utils.locales.getText(
|
|
74
|
+
"pisell2.booking.dashboard.total-visitors-today-tip"
|
|
75
|
+
)
|
|
76
|
+
},
|
|
77
|
+
// 正在进行中的游客
|
|
78
|
+
{
|
|
79
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.ongoing-visitors"),
|
|
80
|
+
value: "-",
|
|
81
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.ongoing-visitors-tip")
|
|
82
|
+
},
|
|
83
|
+
// 即将到达的游客
|
|
84
|
+
{
|
|
85
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.upcoming-visitors"),
|
|
86
|
+
value: "-",
|
|
87
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.upcoming-visitors-tip")
|
|
88
|
+
},
|
|
89
|
+
// 超时的游客
|
|
90
|
+
{
|
|
91
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.overdue-visitors"),
|
|
92
|
+
value: "-",
|
|
93
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.overdue-visitors-tip")
|
|
94
|
+
},
|
|
95
|
+
// 已完成的游客
|
|
96
|
+
{
|
|
97
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.completed-visitors"),
|
|
98
|
+
value: "-",
|
|
99
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.completed-visitors-tip")
|
|
100
|
+
},
|
|
101
|
+
// 已离场的游客
|
|
102
|
+
{
|
|
103
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.departed-visitors"),
|
|
104
|
+
value: "-",
|
|
105
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.departed-visitors-tip")
|
|
106
|
+
}
|
|
107
|
+
]);
|
|
108
|
+
const [bookingData, setBookingData] = (0, import_react.useState)([]);
|
|
109
|
+
const getData = async () => {
|
|
110
|
+
const data2 = await (0, import_serve.getBookingList)({
|
|
111
|
+
...otherParams,
|
|
112
|
+
item_type: "appointment_booking",
|
|
113
|
+
parent_id: 0,
|
|
114
|
+
with: ["children"],
|
|
115
|
+
child_booking: 0,
|
|
116
|
+
skip: 1,
|
|
117
|
+
num: 1e3
|
|
118
|
+
});
|
|
119
|
+
setBookingData(data2.list);
|
|
120
|
+
};
|
|
121
|
+
const calcBookingDataCount = (data2) => {
|
|
122
|
+
let groupsOnSiteNow = "-";
|
|
123
|
+
let peopleOnSiteNow = "-";
|
|
124
|
+
let totalVisitorsToday = 0;
|
|
125
|
+
let ongoing = 0;
|
|
126
|
+
let upcoming = 0;
|
|
127
|
+
let overdue = "-";
|
|
128
|
+
let completed = 0;
|
|
129
|
+
let departed = "-";
|
|
130
|
+
data2.forEach((item) => {
|
|
131
|
+
if ((0, import_utils.isArr)(item.children)) {
|
|
132
|
+
item.children.forEach((child) => {
|
|
133
|
+
const start = (0, import_dayjs.default)(`${child.start_date} ${child.start_time}`);
|
|
134
|
+
const end = (0, import_dayjs.default)(`${child.end_date} ${child.end_time}`);
|
|
135
|
+
totalVisitorsToday += child.number;
|
|
136
|
+
if (start < (0, import_dayjs.default)() && end > (0, import_dayjs.default)()) {
|
|
137
|
+
ongoing += child.number || 1;
|
|
138
|
+
}
|
|
139
|
+
if ((0, import_dayjs.default)() < start) {
|
|
140
|
+
upcoming += child.number || 1;
|
|
141
|
+
}
|
|
142
|
+
if ((0, import_dayjs.default)() > end) {
|
|
143
|
+
completed += child.number || 1;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
onDataChange == null ? void 0 : onDataChange(
|
|
149
|
+
{
|
|
150
|
+
groupsOnSiteNow,
|
|
151
|
+
peopleOnSiteNow,
|
|
152
|
+
totalVisitorsToday,
|
|
153
|
+
ongoing,
|
|
154
|
+
upcoming,
|
|
155
|
+
overdue,
|
|
156
|
+
completed,
|
|
157
|
+
departed
|
|
158
|
+
},
|
|
159
|
+
data2
|
|
160
|
+
);
|
|
161
|
+
setData([
|
|
162
|
+
// 当前在场团体
|
|
163
|
+
{
|
|
164
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.groups-on-site-now"),
|
|
165
|
+
tip: import_utils.locales.getText(
|
|
166
|
+
"pisell2.booking.dashboard.groups-on-site-now-tip"
|
|
167
|
+
),
|
|
168
|
+
value: `${groupsOnSiteNow}`
|
|
169
|
+
},
|
|
170
|
+
// 当前在场人数
|
|
171
|
+
{
|
|
172
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.people-on-site-now"),
|
|
173
|
+
tip: import_utils.locales.getText(
|
|
174
|
+
"pisell2.booking.dashboard.people-on-site-now-tip"
|
|
175
|
+
),
|
|
176
|
+
value: `${peopleOnSiteNow}`
|
|
177
|
+
},
|
|
178
|
+
// 今日游客总数
|
|
179
|
+
{
|
|
180
|
+
label: import_utils.locales.getText(
|
|
181
|
+
"pisell2.booking.dashboard.total-visitors-today"
|
|
182
|
+
),
|
|
183
|
+
tip: import_utils.locales.getText(
|
|
184
|
+
"pisell2.booking.dashboard.total-visitors-today-tip"
|
|
185
|
+
),
|
|
186
|
+
value: `${totalVisitorsToday}`
|
|
187
|
+
},
|
|
188
|
+
// 正在进行中的游客
|
|
189
|
+
{
|
|
190
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.ongoing-visitors"),
|
|
191
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.ongoing-visitors-tip"),
|
|
192
|
+
value: `${ongoing}`
|
|
193
|
+
},
|
|
194
|
+
// 即将到达的游客
|
|
195
|
+
{
|
|
196
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.upcoming-visitors"),
|
|
197
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.upcoming-visitors-tip"),
|
|
198
|
+
value: `${upcoming}`
|
|
199
|
+
},
|
|
200
|
+
// 超时的游客
|
|
201
|
+
{
|
|
202
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.overdue-visitors"),
|
|
203
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.overdue-visitors-tip"),
|
|
204
|
+
value: `${overdue}`
|
|
205
|
+
},
|
|
206
|
+
// 已完成的游客
|
|
207
|
+
{
|
|
208
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.completed-visitors"),
|
|
209
|
+
tip: import_utils.locales.getText(
|
|
210
|
+
"pisell2.booking.dashboard.completed-visitors-tip"
|
|
211
|
+
),
|
|
212
|
+
value: `${completed}`
|
|
213
|
+
},
|
|
214
|
+
// 已离场的游客
|
|
215
|
+
{
|
|
216
|
+
label: import_utils.locales.getText("pisell2.booking.dashboard.departed-visitors"),
|
|
217
|
+
tip: import_utils.locales.getText("pisell2.booking.dashboard.departed-visitors-tip"),
|
|
218
|
+
value: `${departed}`
|
|
219
|
+
}
|
|
220
|
+
]);
|
|
221
|
+
};
|
|
222
|
+
(0, import_react.useEffect)(() => {
|
|
223
|
+
calcBookingDataCount(bookingData);
|
|
224
|
+
const timer = setInterval(() => {
|
|
225
|
+
calcBookingDataCount(bookingData);
|
|
226
|
+
}, 60 * 1e3);
|
|
227
|
+
return () => {
|
|
228
|
+
clearInterval(timer);
|
|
229
|
+
};
|
|
230
|
+
}, [bookingData]);
|
|
231
|
+
(0, import_react.useEffect)(() => {
|
|
232
|
+
getData();
|
|
233
|
+
const timer = setInterval(() => {
|
|
234
|
+
getData();
|
|
235
|
+
}, 10 * 60 * 1e3);
|
|
236
|
+
return () => {
|
|
237
|
+
clearInterval(timer);
|
|
238
|
+
};
|
|
239
|
+
}, [JSON.stringify(otherParams), refreshKey]);
|
|
240
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
241
|
+
import_materials.PisellStatisticList,
|
|
242
|
+
{
|
|
243
|
+
...others,
|
|
244
|
+
data,
|
|
245
|
+
backgroundColors,
|
|
246
|
+
labelColor,
|
|
247
|
+
valueColor
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
};
|
|
251
|
+
var dashboard_default = BookingDashboard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getBookingList: (params: any) => Promise<any>;
|
|
@@ -0,0 +1,33 @@
|
|
|
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/dashboard/serve.ts
|
|
20
|
+
var serve_exports = {};
|
|
21
|
+
__export(serve_exports, {
|
|
22
|
+
getBookingList: () => getBookingList
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(serve_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var getBookingList = async (params) => {
|
|
27
|
+
let { data } = await import_utils.request.getRequest().get(`/shop/schedule/booking`, params);
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
+
0 && (module.exports = {
|
|
32
|
+
getBookingList
|
|
33
|
+
});
|
|
@@ -53,7 +53,8 @@ var Forms = (0, import_model.Provider)((props) => {
|
|
|
53
53
|
addCallback,
|
|
54
54
|
client,
|
|
55
55
|
loading,
|
|
56
|
-
addButtonProps
|
|
56
|
+
addButtonProps,
|
|
57
|
+
drawerProps
|
|
57
58
|
} = props;
|
|
58
59
|
const onAction = (0, import_ahooks.useMemoizedFn)(
|
|
59
60
|
async (formDataConfig, isAdd) => {
|
|
@@ -150,6 +151,7 @@ var Forms = (0, import_model.Provider)((props) => {
|
|
|
150
151
|
onChange: (val) => {
|
|
151
152
|
onValueChange(d, val);
|
|
152
153
|
},
|
|
154
|
+
drawerProps,
|
|
153
155
|
onAdd: () => {
|
|
154
156
|
onAction(d, true);
|
|
155
157
|
},
|
|
@@ -190,7 +192,8 @@ var Forms = (0, import_model.Provider)((props) => {
|
|
|
190
192
|
client == null ? void 0 : client.id,
|
|
191
193
|
addButtonProps,
|
|
192
194
|
customSelectProps,
|
|
193
|
-
optionRender
|
|
195
|
+
optionRender,
|
|
196
|
+
drawerProps
|
|
194
197
|
]);
|
|
195
198
|
});
|
|
196
199
|
var forms_default = Forms;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -7,5 +7,5 @@ import "./index.less";
|
|
|
7
7
|
* @Author: zhiwei.Wang
|
|
8
8
|
* @Date: 2024-01-30 17:06
|
|
9
9
|
*/
|
|
10
|
-
declare const Single: ({ value, onChange, form, mode, optionRender, loading, customSelectProps, onAdd, addButtonProps, modalOpen, watch, }: any) => React.JSX.Element;
|
|
10
|
+
declare const Single: ({ value, onChange, form, mode, optionRender, loading, customSelectProps, onAdd, addButtonProps, modalOpen, watch, drawerProps, }: any) => React.JSX.Element;
|
|
11
11
|
export default Single;
|
|
@@ -53,7 +53,8 @@ var Single = ({
|
|
|
53
53
|
onAdd,
|
|
54
54
|
addButtonProps,
|
|
55
55
|
modalOpen,
|
|
56
|
-
watch
|
|
56
|
+
watch,
|
|
57
|
+
drawerProps
|
|
57
58
|
}) => {
|
|
58
59
|
var _a, _b;
|
|
59
60
|
const [HumanBodySelector] = (0, import_useComponents.default)({
|
|
@@ -177,7 +178,8 @@ var Single = ({
|
|
|
177
178
|
addButtonProps: _addButtonProps,
|
|
178
179
|
drawerProps: {
|
|
179
180
|
title: `${import_utils.locales.getText("pisell2.text.select")} ${((_b = form.form) == null ? void 0 : _b.title) || "-"}`,
|
|
180
|
-
destroyOnClose: true
|
|
181
|
+
destroyOnClose: true,
|
|
182
|
+
...drawerProps || {}
|
|
181
183
|
},
|
|
182
184
|
optionRender: _optionRender,
|
|
183
185
|
rowKey: "form_record_id",
|
|
@@ -0,0 +1,58 @@
|
|
|
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/addServiceVariant/index.tsx
|
|
30
|
+
var addServiceVariant_exports = {};
|
|
31
|
+
__export(addServiceVariant_exports, {
|
|
32
|
+
default: () => addServiceVariant_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(addServiceVariant_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_addService = __toESM(require("../service/addService"));
|
|
37
|
+
var AddServiceVariant = (props) => {
|
|
38
|
+
const { globalState, setGlobalState } = props;
|
|
39
|
+
const stateRef = (0, import_react.useRef)(globalState);
|
|
40
|
+
stateRef.current = globalState;
|
|
41
|
+
const dispatch = ({ type, payload }) => {
|
|
42
|
+
if (type === "setService") {
|
|
43
|
+
setGlobalState({
|
|
44
|
+
service: { ...stateRef.current.service, ...payload }
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
49
|
+
import_addService.default,
|
|
50
|
+
{
|
|
51
|
+
renderMode: "current",
|
|
52
|
+
dispatch,
|
|
53
|
+
state: globalState,
|
|
54
|
+
drawerProps: { open: true, getContainer: false }
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
var addServiceVariant_default = AddServiceVariant;
|