@pisell/private-materials 3.2.17 → 3.2.18
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 +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.js +19 -10
- package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.js +10 -20
- package/es/components/appointmentBooking/components/Cart/Item/index.js +73 -0
- package/es/components/appointmentBooking/components/Content/index.js +29 -15
- package/es/components/appointmentBooking/components/Date/index.js +77 -12
- package/es/components/appointmentBooking/components/Date/index.less +1 -0
- package/es/components/appointmentBooking/components/Footer/index.js +3 -3
- package/es/components/appointmentBooking/components/Guest/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/{Provider/Information → Guest}/index.js +50 -59
- package/es/components/appointmentBooking/components/Header/index.js +6 -4
- package/es/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Resource/index.js +62 -29
- package/es/components/appointmentBooking/components/Resource/index.less +6 -0
- package/es/components/appointmentBooking/components/Services/index.js +25 -135
- package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/TimeSlicing/index.js +44 -755
- package/es/components/appointmentBooking/context.d.ts +23 -0
- package/es/components/appointmentBooking/context.js +71 -0
- package/es/components/appointmentBooking/hooks.d.ts +6 -8
- package/es/components/appointmentBooking/hooks.js +119 -62
- package/es/components/appointmentBooking/index.js +2 -3
- package/es/components/appointmentBooking/locales.d.ts +12 -0
- package/es/components/appointmentBooking/locales.js +21 -3
- package/es/components/appointmentBooking/utils.d.ts +12 -0
- package/es/components/appointmentBooking/utils.js +70 -0
- package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.js +18 -16
- package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.js +7 -11
- package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.js +22 -21
- package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.js +1 -1
- package/lib/components/appointmentBooking/components/Content/index.js +26 -14
- package/lib/components/appointmentBooking/components/Date/index.js +53 -16
- package/lib/components/appointmentBooking/components/Date/index.less +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.js +3 -3
- package/lib/components/appointmentBooking/components/Guest/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/{Provider/Information → Guest}/index.js +43 -52
- package/lib/components/appointmentBooking/components/Header/index.js +2 -3
- package/lib/components/appointmentBooking/components/Resource/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Resource/index.js +55 -41
- package/lib/components/appointmentBooking/components/Resource/index.less +6 -0
- package/lib/components/appointmentBooking/components/Services/index.js +15 -155
- package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/index.js +17 -941
- package/lib/components/appointmentBooking/context.d.ts +23 -0
- package/lib/components/appointmentBooking/context.js +85 -0
- package/lib/components/appointmentBooking/hooks.d.ts +6 -8
- package/lib/components/appointmentBooking/hooks.js +44 -20
- package/lib/components/appointmentBooking/index.js +2 -5
- package/lib/components/appointmentBooking/locales.d.ts +12 -0
- package/lib/components/appointmentBooking/locales.js +15 -3
- package/lib/components/appointmentBooking/utils.d.ts +12 -0
- package/lib/components/appointmentBooking/utils.js +62 -2
- package/package.json +2 -2
- package/es/components/appointmentBooking/components/Information/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Information/index.js +0 -178
- package/es/components/appointmentBooking/components/Provider/Cart/Item/index.js +0 -68
- package/es/components/appointmentBooking/components/Provider/Content/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/Content/index.js +0 -64
- package/es/components/appointmentBooking/components/Provider/Content/index.less +0 -31
- package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.js +0 -34
- package/es/components/appointmentBooking/components/Provider/EmptyHolderModal/index.less +0 -17
- package/es/components/appointmentBooking/components/Provider/Event/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/Event/index.js +0 -93
- package/es/components/appointmentBooking/components/Provider/Event/index.less +0 -20
- package/es/components/appointmentBooking/components/Provider/Information/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.js +0 -34
- package/es/components/appointmentBooking/components/Provider/InformationOptionsModal/index.less +0 -27
- package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.js +0 -27
- package/es/components/appointmentBooking/components/Provider/OrderProductModal/index.less +0 -32
- package/es/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -2
- package/es/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.js +0 -31
- package/es/components/appointmentBooking/components/Provider/Resource/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Provider/Resource/index.js +0 -79
- package/es/components/appointmentBooking/components/Provider/Resource/index.less +0 -46
- package/es/components/appointmentBooking/components/Provider/SelectHolderModal.d.ts +0 -2
- package/es/components/appointmentBooking/components/Provider/SelectHolderModal.js +0 -90
- package/es/components/appointmentBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/es/components/appointmentBooking/components/Provider/SelectProduct/index.js +0 -77
- package/es/components/appointmentBooking/components/Provider/SelectProduct/index.less +0 -131
- package/es/components/booking/info/service2/utils.d.ts +0 -240
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Information/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Information/index.js +0 -151
- package/lib/components/appointmentBooking/components/Information/index.less +0 -92
- package/lib/components/appointmentBooking/components/Provider/Cart/Item/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/Content/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/Content/index.js +0 -90
- package/lib/components/appointmentBooking/components/Provider/Content/index.less +0 -31
- package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.js +0 -60
- package/lib/components/appointmentBooking/components/Provider/EmptyHolderModal/index.less +0 -17
- package/lib/components/appointmentBooking/components/Provider/Event/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/Event/index.js +0 -100
- package/lib/components/appointmentBooking/components/Provider/Event/index.less +0 -20
- package/lib/components/appointmentBooking/components/Provider/Information/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/Information/index.less +0 -92
- package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.js +0 -67
- package/lib/components/appointmentBooking/components/Provider/InformationOptionsModal/index.less +0 -27
- package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.js +0 -57
- package/lib/components/appointmentBooking/components/Provider/OrderProductModal/index.less +0 -32
- package/lib/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -2
- package/lib/components/appointmentBooking/components/Provider/RemoveOptionConfirmModal.js +0 -62
- package/lib/components/appointmentBooking/components/Provider/Resource/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Provider/Resource/index.js +0 -90
- package/lib/components/appointmentBooking/components/Provider/Resource/index.less +0 -46
- package/lib/components/appointmentBooking/components/Provider/SelectHolderModal.d.ts +0 -2
- package/lib/components/appointmentBooking/components/Provider/SelectHolderModal.js +0 -97
- package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.d.ts +0 -4
- package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.js +0 -69
- package/lib/components/appointmentBooking/components/Provider/SelectProduct/index.less +0 -131
- package/lib/components/booking/info/service2/utils.d.ts +0 -240
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.d.ts +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.less +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.d.ts +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.d.ts +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.less +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.d.ts +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.js +0 -0
- /package/es/components/appointmentBooking/components/{Provider/Cart → Cart}/index.less +0 -0
- /package/es/components/appointmentBooking/components/{Information → Guest}/index.less +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.d.ts +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/ContinueButton/index.less +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/Total.d.ts +0 -0
- /package/{es/components/eventBooking/components/Provider → lib/components/appointmentBooking/components}/Cart/Item/index.d.ts +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/Item/index.less +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.d.ts +0 -0
- /package/lib/components/appointmentBooking/components/{Provider/Cart → Cart}/index.less +0 -0
- /package/{es/components/appointmentBooking/components/Provider/Information → lib/components/appointmentBooking/components/Guest}/index.less +0 -0
|
@@ -33,62 +33,76 @@ __export(Resource_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Resource_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
36
37
|
var import_resourceDisplay = __toESM(require("../../../eventBooking/components/resourceDisplay"));
|
|
37
38
|
var import_materials = require("@pisell/materials");
|
|
39
|
+
var import_hooks = require("../../hooks");
|
|
40
|
+
var import_context = require("../../context");
|
|
38
41
|
var import_utils = require("@pisell/utils");
|
|
39
42
|
var import_index = require("./index.less");
|
|
40
|
-
var Resource = () => {
|
|
41
|
-
const [selectedResource, setSelectedResource] = (0, import_react.useState)(
|
|
42
|
-
const
|
|
43
|
+
var Resource = ({ onChange }) => {
|
|
44
|
+
const [selectedResource, setSelectedResource] = (0, import_react.useState)(0);
|
|
45
|
+
const { appointmentBooking, resources, carts } = (0, import_context.useAppointmentBookingContext)();
|
|
46
|
+
const { getResourceList, getResourceTimeSlot } = (0, import_hooks.useAppointmentBookingResource)();
|
|
47
|
+
console.log(resources, carts, appointmentBooking, "lists, products");
|
|
48
|
+
(0, import_react.useEffect)(() => {
|
|
49
|
+
getResourceList();
|
|
50
|
+
}, []);
|
|
51
|
+
const anyResource = [
|
|
43
52
|
{
|
|
44
53
|
id: 0,
|
|
45
54
|
image: "https://cdn-partners-api.fresha.com/employee-avatars/processed/399178/medium/3b77991b-0ee2-4d0f-9d6f-a7501b39afcd-tempImageHYe20U.jpg",
|
|
46
55
|
title: "Any professional",
|
|
47
|
-
subtitle: "
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: "select",
|
|
51
|
-
image: "https://cdn-partners-api.fresha.com/employee-avatars/processed/399178/medium/3b77991b-0ee2-4d0f-9d6f-a7501b39afcd-tempImageHYe20U.jpg",
|
|
52
|
-
title: "Select professional per service",
|
|
53
|
-
subtitle: ""
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: 1,
|
|
57
|
-
image: "https://cdn-partners-api.fresha.com/employee-avatars/processed/399178/medium/3b77991b-0ee2-4d0f-9d6f-a7501b39afcd-tempImageHYe20U.jpg",
|
|
58
|
-
title: "Bella",
|
|
59
|
-
subtitle: "Senior beauty/Derma Therapist"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: 2,
|
|
63
|
-
image: "https://cdn-partners-api.fresha.com/employee-avatars/processed/399178/medium/3b77991b-0ee2-4d0f-9d6f-a7501b39afcd-tempImageHYe20U.jpg",
|
|
64
|
-
title: "Bella",
|
|
65
|
-
subtitle: "Senior beauty/Derma Therapist"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
id: 3,
|
|
69
|
-
title: "Maya",
|
|
70
|
-
subtitle: "Spa Therapist"
|
|
56
|
+
subtitle: "for maximum availability"
|
|
71
57
|
}
|
|
72
58
|
];
|
|
59
|
+
const currentResource = (0, import_react.useMemo)(() => {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
if (resources.length && carts.length) {
|
|
62
|
+
console.log(resources, carts, "lists, products");
|
|
63
|
+
if (carts.length === 1) {
|
|
64
|
+
return (_b = (_a = resources[0]) == null ? void 0 : _a.resources) == null ? void 0 : _b[0];
|
|
65
|
+
} else {
|
|
66
|
+
return {
|
|
67
|
+
renderList: []
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}, [resources, carts]);
|
|
72
|
+
const resourcesResult = (0, import_react.useMemo)(() => {
|
|
73
|
+
console.log(currentResource, resources, "wh98765756");
|
|
74
|
+
return anyResource.concat((currentResource == null ? void 0 : currentResource.renderList) || []);
|
|
75
|
+
}, [currentResource]);
|
|
73
76
|
const onClick = (e) => {
|
|
74
|
-
|
|
77
|
+
var _a;
|
|
75
78
|
setSelectedResource(e.id);
|
|
79
|
+
console.log(currentResource, e, "whcurrentResourcecurrentResource");
|
|
80
|
+
if (e.id) {
|
|
81
|
+
getResourceTimeSlot({
|
|
82
|
+
product: (_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.product,
|
|
83
|
+
resources: currentResource == null ? void 0 : currentResource.renderList,
|
|
84
|
+
currentResourceId: e.id
|
|
85
|
+
});
|
|
86
|
+
}
|
|
76
87
|
};
|
|
77
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-resource-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
88
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-resource-wrap" }, !(resourcesResult == null ? void 0 : resourcesResult.length) ? /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true }) : /* @__PURE__ */ import_react.default.createElement(
|
|
78
89
|
import_materials.PisellCustomCheckboxGroup,
|
|
79
90
|
{
|
|
80
|
-
dataSource:
|
|
81
|
-
renderItem: (item) =>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
dataSource: resourcesResult,
|
|
92
|
+
renderItem: (item) => {
|
|
93
|
+
var _a;
|
|
94
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
95
|
+
import_resourceDisplay.default,
|
|
96
|
+
{
|
|
97
|
+
key: item.id,
|
|
98
|
+
mode: "rule",
|
|
99
|
+
dataSource: item,
|
|
100
|
+
direction: "vertical",
|
|
101
|
+
children: !(item == null ? void 0 : item.image) ? (_a = item == null ? void 0 : item.title) == null ? void 0 : _a.charAt(0).toUpperCase() : null,
|
|
102
|
+
selected: selectedResource === (item == null ? void 0 : item.id)
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
},
|
|
92
106
|
columns: (0, import_utils.isMobile)() ? 2 : 3,
|
|
93
107
|
horizontalGap: 16,
|
|
94
108
|
verticalGap: 16,
|
|
@@ -40,165 +40,20 @@ var import_antd = require("antd");
|
|
|
40
40
|
var import_TabProduct = __toESM(require("../../../booking/components/TabProduct"));
|
|
41
41
|
var import_utils2 = require("../../../booking/utils");
|
|
42
42
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
43
|
-
var
|
|
43
|
+
var import_context = require("../../context");
|
|
44
44
|
var import_index = require("./index.less");
|
|
45
45
|
var Services = () => {
|
|
46
46
|
const searchRef = (0, import_react.useRef)();
|
|
47
47
|
const [search, setSearch] = (0, import_react.useState)("");
|
|
48
48
|
const context = (0, import_useEngineContext.default)();
|
|
49
49
|
const { utils } = context.appHelper || {};
|
|
50
|
-
const appointmentBooking = (0,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
extension_id: 0,
|
|
58
|
-
extension_type: "normal",
|
|
59
|
-
shop_id: 9,
|
|
60
|
-
title: "灵活计价-None",
|
|
61
|
-
slug: "灵活计价-none",
|
|
62
|
-
status: "published",
|
|
63
|
-
stock_quantity: 99998,
|
|
64
|
-
sales_quantity: 3,
|
|
65
|
-
sum_stock: 99998,
|
|
66
|
-
price: "0.01",
|
|
67
|
-
original_price: "0.00",
|
|
68
|
-
cost_price: "0.00",
|
|
69
|
-
cover: "",
|
|
70
|
-
channel_application: [
|
|
71
|
-
"online-store",
|
|
72
|
-
"pos",
|
|
73
|
-
"bbc-module:mebook",
|
|
74
|
-
"google_reserve"
|
|
75
|
-
],
|
|
76
|
-
is_track: 1,
|
|
77
|
-
over_sold: 1,
|
|
78
|
-
is_gst: 1,
|
|
79
|
-
code: "11111",
|
|
80
|
-
barcode: "",
|
|
81
|
-
is_delivery: 1,
|
|
82
|
-
weight_unit: "GRAMS",
|
|
83
|
-
weight_value: "0.00",
|
|
84
|
-
type: "physical",
|
|
85
|
-
unit: "",
|
|
86
|
-
sort: 9999999,
|
|
87
|
-
bundle_group_count: 0,
|
|
88
|
-
option_group_count: 0,
|
|
89
|
-
is_variant: 0,
|
|
90
|
-
variant_count: 0,
|
|
91
|
-
barcode_formatting: "None",
|
|
92
|
-
shelf_product_datas: [],
|
|
93
|
-
step_value: 1,
|
|
94
|
-
min_num_unit: 1,
|
|
95
|
-
schedules: [],
|
|
96
|
-
is_charge_tax: 1,
|
|
97
|
-
base_price: "0.01",
|
|
98
|
-
variant: [],
|
|
99
|
-
category: [
|
|
100
|
-
{
|
|
101
|
-
id: 1268,
|
|
102
|
-
name: "灵活计价",
|
|
103
|
-
icon: "",
|
|
104
|
-
slug: "灵活计价",
|
|
105
|
-
sort: 0
|
|
106
|
-
}
|
|
107
|
-
]
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
id: 57472,
|
|
111
|
-
extension_id: 0,
|
|
112
|
-
extension_type: "normal",
|
|
113
|
-
shop_id: 9,
|
|
114
|
-
title: "测试灵活计价UPC-A",
|
|
115
|
-
slug: "测试灵活计价upc-a",
|
|
116
|
-
status: "published",
|
|
117
|
-
stock_quantity: 2317,
|
|
118
|
-
sales_quantity: 4,
|
|
119
|
-
sum_stock: 2317,
|
|
120
|
-
price: "0.00",
|
|
121
|
-
original_price: "0.00",
|
|
122
|
-
cost_price: "0.00",
|
|
123
|
-
cover: "",
|
|
124
|
-
channel_application: [
|
|
125
|
-
"online-store",
|
|
126
|
-
"pos",
|
|
127
|
-
"bbc-module:mebook",
|
|
128
|
-
"google_reserve"
|
|
129
|
-
],
|
|
130
|
-
is_track: 1,
|
|
131
|
-
over_sold: 0,
|
|
132
|
-
is_gst: 1,
|
|
133
|
-
code: "34523",
|
|
134
|
-
barcode: "",
|
|
135
|
-
is_delivery: 1,
|
|
136
|
-
weight_unit: "GRAMS",
|
|
137
|
-
weight_value: "0.00",
|
|
138
|
-
type: "physical",
|
|
139
|
-
unit: "",
|
|
140
|
-
sort: 9999999,
|
|
141
|
-
bundle_group_count: 0,
|
|
142
|
-
option_group_count: 0,
|
|
143
|
-
is_variant: 0,
|
|
144
|
-
variant_count: 0,
|
|
145
|
-
barcode_formatting: "None",
|
|
146
|
-
shelf_product_datas: [],
|
|
147
|
-
step_value: 1,
|
|
148
|
-
min_num_unit: 1,
|
|
149
|
-
schedules: [],
|
|
150
|
-
is_charge_tax: 1,
|
|
151
|
-
base_price: "0.00",
|
|
152
|
-
variant: [],
|
|
153
|
-
category: []
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
id: 57470,
|
|
157
|
-
extension_id: 0,
|
|
158
|
-
extension_type: "normal",
|
|
159
|
-
shop_id: 9,
|
|
160
|
-
title: "测试灵活计价",
|
|
161
|
-
slug: "测试灵活计价",
|
|
162
|
-
status: "published",
|
|
163
|
-
stock_quantity: 0,
|
|
164
|
-
sales_quantity: 0,
|
|
165
|
-
sum_stock: 0,
|
|
166
|
-
price: "0.00",
|
|
167
|
-
original_price: "0.00",
|
|
168
|
-
cost_price: "0.00",
|
|
169
|
-
cover: "",
|
|
170
|
-
channel_application: [
|
|
171
|
-
"online-store",
|
|
172
|
-
"pos",
|
|
173
|
-
"bbc-module:mebook",
|
|
174
|
-
"google_reserve"
|
|
175
|
-
],
|
|
176
|
-
is_track: 1,
|
|
177
|
-
over_sold: 0,
|
|
178
|
-
is_gst: 1,
|
|
179
|
-
code: "23456",
|
|
180
|
-
barcode: "",
|
|
181
|
-
is_delivery: 1,
|
|
182
|
-
weight_unit: "GRAMS",
|
|
183
|
-
weight_value: "0.00",
|
|
184
|
-
type: "physical",
|
|
185
|
-
unit: "",
|
|
186
|
-
sort: 9999999,
|
|
187
|
-
bundle_group_count: 0,
|
|
188
|
-
option_group_count: 0,
|
|
189
|
-
is_variant: 0,
|
|
190
|
-
variant_count: 0,
|
|
191
|
-
barcode_formatting: "None",
|
|
192
|
-
shelf_product_datas: [],
|
|
193
|
-
step_value: 1,
|
|
194
|
-
min_num_unit: 1,
|
|
195
|
-
schedules: [],
|
|
196
|
-
is_charge_tax: 1,
|
|
197
|
-
base_price: "0.00",
|
|
198
|
-
variant: [],
|
|
199
|
-
category: []
|
|
200
|
-
}
|
|
201
|
-
];
|
|
50
|
+
const { appointmentBooking, products, setProducts } = (0, import_context.useAppointmentBookingContext)();
|
|
51
|
+
(0, import_react.useEffect)(() => {
|
|
52
|
+
const { productModuleParams } = appointmentBooking.otherParams || {};
|
|
53
|
+
appointmentBooking.loadProducts(productModuleParams).then((res) => {
|
|
54
|
+
setProducts(res || []);
|
|
55
|
+
});
|
|
56
|
+
}, []);
|
|
202
57
|
const handleSelectProduct = (item) => {
|
|
203
58
|
utils == null ? void 0 : utils.action({
|
|
204
59
|
type: "pisell1.productDetail",
|
|
@@ -206,8 +61,13 @@ var Services = () => {
|
|
|
206
61
|
detail: item
|
|
207
62
|
},
|
|
208
63
|
callback: (data) => {
|
|
209
|
-
|
|
210
|
-
|
|
64
|
+
const product = {
|
|
65
|
+
...data,
|
|
66
|
+
options: (data == null ? void 0 : data.option) || []
|
|
67
|
+
};
|
|
68
|
+
delete product.option;
|
|
69
|
+
console.log(product, data, appointmentBooking.storeProduct, "wh978796");
|
|
70
|
+
appointmentBooking.storeProduct(product);
|
|
211
71
|
}
|
|
212
72
|
});
|
|
213
73
|
};
|