@pisell/pisellos 0.0.120 → 0.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.
|
@@ -99,8 +99,13 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
if (order.type === 'appointment_booking') {
|
|
102
|
-
var
|
|
103
|
-
|
|
102
|
+
var _params$cartItems$fil;
|
|
103
|
+
var firstAppointmentCartItem = (_params$cartItems$fil = params.cartItems.filter(function (n) {
|
|
104
|
+
return !isNormalProduct(n._productOrigin);
|
|
105
|
+
})) === null || _params$cartItems$fil === void 0 ? void 0 : _params$cartItems$fil[0];
|
|
106
|
+
if (firstAppointmentCartItem) {
|
|
107
|
+
order.schedule_date = firstAppointmentCartItem.start_date + ' ' + firstAppointmentCartItem.start_time + ':00';
|
|
108
|
+
}
|
|
104
109
|
}
|
|
105
110
|
order.is_deposit = is_deposit;
|
|
106
111
|
}
|
|
@@ -37,6 +37,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
|
|
|
37
37
|
this.request = this.core.getPlugin("request");
|
|
38
38
|
}
|
|
39
39
|
createOrder(params) {
|
|
40
|
+
var _a;
|
|
40
41
|
const order = {
|
|
41
42
|
type: params.type || "appointment_booking",
|
|
42
43
|
// 要从外面拿,virtual
|
|
@@ -71,8 +72,10 @@ var OrderModule = class extends import_BaseModule.BaseModule {
|
|
|
71
72
|
}
|
|
72
73
|
});
|
|
73
74
|
if (order.type === "appointment_booking") {
|
|
74
|
-
const
|
|
75
|
-
|
|
75
|
+
const firstAppointmentCartItem = (_a = params.cartItems.filter((n) => !(0, import_utils2.isNormalProduct)(n._productOrigin))) == null ? void 0 : _a[0];
|
|
76
|
+
if (firstAppointmentCartItem) {
|
|
77
|
+
order.schedule_date = firstAppointmentCartItem.start_date + " " + firstAppointmentCartItem.start_time + ":00";
|
|
78
|
+
}
|
|
76
79
|
}
|
|
77
80
|
order.is_deposit = is_deposit;
|
|
78
81
|
}
|