@pisell/pisellos 0.0.558 → 0.0.559
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/dist/modules/Order/index.d.ts +1 -1
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/solution/BookingByStep/index.d.ts +2 -2
- package/dist/solution/VenueBooking/index.js +11 -10
- package/lib/model/strategy/adapter/promotion/index.js +0 -49
- package/lib/modules/Order/index.d.ts +1 -1
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.d.ts +2 -2
- package/lib/solution/VenueBooking/index.js +3 -2
- package/package.json +1 -1
|
@@ -84,7 +84,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
84
84
|
enhancePayload?: SubmitPayloadEnhancer;
|
|
85
85
|
}): Promise<T>;
|
|
86
86
|
createOrder(params: CommitOrderParams['query']): {
|
|
87
|
-
type: "
|
|
87
|
+
type: "virtual" | "appointment_booking";
|
|
88
88
|
platform: string;
|
|
89
89
|
sales_channel: string;
|
|
90
90
|
order_sales_channel: string;
|
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "
|
|
52
|
+
getProductType(): "normal" | "duration" | "session";
|
|
53
53
|
}
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 |
|
|
329
|
+
weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -373,7 +373,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
373
373
|
};
|
|
374
374
|
setOtherData(key: string, value: any): void;
|
|
375
375
|
getOtherData(key: string): any;
|
|
376
|
-
getProductTypeById(id: number): Promise<"
|
|
376
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
377
377
|
/**
|
|
378
378
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
379
379
|
*
|
|
@@ -1074,7 +1074,7 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1074
1074
|
key: "_doLoadAllProducts",
|
|
1075
1075
|
value: function () {
|
|
1076
1076
|
var _doLoadAllProducts2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
1077
|
-
var _this$otherParams16, _this$store$venueProd, associatedMenus, menuListIds, allProducts, list, venueList, addonList, venueStore, _this$store$order3, _this$store$order3$ge, products;
|
|
1077
|
+
var _this$otherParams16, _this$store$venueProd, associatedMenus, menuListIds, allProducts, rawList, list, venueList, addonList, venueStore, _this$store$order3, _this$store$order3$ge, products;
|
|
1078
1078
|
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
1079
1079
|
while (1) switch (_context12.prev = _context12.next) {
|
|
1080
1080
|
case 0:
|
|
@@ -1116,9 +1116,10 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1116
1116
|
});
|
|
1117
1117
|
case 15:
|
|
1118
1118
|
allProducts = _context12.sent;
|
|
1119
|
-
|
|
1119
|
+
rawList = Array.isArray(allProducts) ? allProducts : [];
|
|
1120
|
+
list = rawList;
|
|
1121
|
+
this.smartPricingProductCatalog = rawList.slice();
|
|
1120
1122
|
list = formatProductsWithDataVariant(list, this.buildSmartPricingContext(), dayjs().format('YYYY-MM-DD HH:mm:ss'));
|
|
1121
|
-
this.smartPricingProductCatalog = list.slice();
|
|
1122
1123
|
this.clearSlotPriceMapCache();
|
|
1123
1124
|
venueList = list.filter(function (p) {
|
|
1124
1125
|
return p.duration != null;
|
|
@@ -1137,13 +1138,13 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1137
1138
|
|
|
1138
1139
|
// 加载 holder 表单
|
|
1139
1140
|
if (!this.store.order) {
|
|
1140
|
-
_context12.next =
|
|
1141
|
+
_context12.next = 31;
|
|
1141
1142
|
break;
|
|
1142
1143
|
}
|
|
1143
1144
|
products = ((_this$store$order3 = this.store.order) === null || _this$store$order3 === void 0 || (_this$store$order3$ge = _this$store$order3.getOrderProducts) === null || _this$store$order3$ge === void 0 ? void 0 : _this$store$order3$ge.call(_this$store$order3)) || [];
|
|
1144
|
-
_context12.next =
|
|
1145
|
+
_context12.next = 31;
|
|
1145
1146
|
return this.preloadHolderForms(products);
|
|
1146
|
-
case
|
|
1147
|
+
case 31:
|
|
1147
1148
|
this.productsLoaded = true;
|
|
1148
1149
|
this.logMethodSuccess('loadAllProducts', {
|
|
1149
1150
|
total: list.length,
|
|
@@ -1155,16 +1156,16 @@ export var VenueBookingImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1155
1156
|
venueProducts: venueList,
|
|
1156
1157
|
addonProducts: addonList
|
|
1157
1158
|
});
|
|
1158
|
-
case
|
|
1159
|
-
_context12.prev =
|
|
1159
|
+
case 36:
|
|
1160
|
+
_context12.prev = 36;
|
|
1160
1161
|
_context12.t0 = _context12["catch"](1);
|
|
1161
1162
|
this.logMethodError('loadAllProducts', _context12.t0);
|
|
1162
1163
|
throw _context12.t0;
|
|
1163
|
-
case
|
|
1164
|
+
case 40:
|
|
1164
1165
|
case "end":
|
|
1165
1166
|
return _context12.stop();
|
|
1166
1167
|
}
|
|
1167
|
-
}, _callee12, this, [[1,
|
|
1168
|
+
}, _callee12, this, [[1, 36]]);
|
|
1168
1169
|
}));
|
|
1169
1170
|
function _doLoadAllProducts() {
|
|
1170
1171
|
return _doLoadAllProducts2.apply(this, arguments);
|
|
@@ -1,49 +0,0 @@
|
|
|
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/model/strategy/adapter/promotion/index.ts
|
|
30
|
-
var promotion_exports = {};
|
|
31
|
-
__export(promotion_exports, {
|
|
32
|
-
BUY_X_GET_Y_FREE_STRATEGY: () => import_examples.BUY_X_GET_Y_FREE_STRATEGY,
|
|
33
|
-
PromotionAdapter: () => import_adapter.PromotionAdapter,
|
|
34
|
-
PromotionEvaluator: () => import_evaluator.PromotionEvaluator,
|
|
35
|
-
X_ITEMS_FOR_Y_PRICE_STRATEGY: () => import_examples.X_ITEMS_FOR_Y_PRICE_STRATEGY,
|
|
36
|
-
default: () => import_adapter2.default
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(promotion_exports);
|
|
39
|
-
var import_evaluator = require("./evaluator");
|
|
40
|
-
var import_adapter = require("./adapter");
|
|
41
|
-
var import_adapter2 = __toESM(require("./adapter"));
|
|
42
|
-
var import_examples = require("./examples");
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
BUY_X_GET_Y_FREE_STRATEGY,
|
|
46
|
-
PromotionAdapter,
|
|
47
|
-
PromotionEvaluator,
|
|
48
|
-
X_ITEMS_FOR_Y_PRICE_STRATEGY
|
|
49
|
-
});
|
|
@@ -84,7 +84,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
84
84
|
enhancePayload?: SubmitPayloadEnhancer;
|
|
85
85
|
}): Promise<T>;
|
|
86
86
|
createOrder(params: CommitOrderParams['query']): {
|
|
87
|
-
type: "
|
|
87
|
+
type: "virtual" | "appointment_booking";
|
|
88
88
|
platform: string;
|
|
89
89
|
sales_channel: string;
|
|
90
90
|
order_sales_channel: string;
|
|
@@ -49,5 +49,5 @@ export declare class Product extends BaseModule implements Module {
|
|
|
49
49
|
getCategories(): ProductCategory[];
|
|
50
50
|
setOtherParams(key: string, value: any): void;
|
|
51
51
|
getOtherParams(): any;
|
|
52
|
-
getProductType(): "
|
|
52
|
+
getProductType(): "normal" | "duration" | "session";
|
|
53
53
|
}
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 |
|
|
329
|
+
weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -373,7 +373,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
373
373
|
};
|
|
374
374
|
setOtherData(key: string, value: any): void;
|
|
375
375
|
getOtherData(key: string): any;
|
|
376
|
-
getProductTypeById(id: number): Promise<"
|
|
376
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
377
377
|
/**
|
|
378
378
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
379
379
|
*
|
|
@@ -715,13 +715,14 @@ var _VenueBookingImpl = class extends import_BaseModule.BaseModule {
|
|
|
715
715
|
schedule_datetime: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss"),
|
|
716
716
|
with_extra: ["dataVariants"]
|
|
717
717
|
});
|
|
718
|
-
|
|
718
|
+
const rawList = Array.isArray(allProducts) ? allProducts : [];
|
|
719
|
+
let list = rawList;
|
|
720
|
+
this.smartPricingProductCatalog = rawList.slice();
|
|
719
721
|
list = (0, import_smartPricing.formatProductsWithDataVariant)(
|
|
720
722
|
list,
|
|
721
723
|
this.buildSmartPricingContext(),
|
|
722
724
|
(0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
|
|
723
725
|
);
|
|
724
|
-
this.smartPricingProductCatalog = list.slice();
|
|
725
726
|
this.clearSlotPriceMapCache();
|
|
726
727
|
const venueList = list.filter((p) => p.duration != null);
|
|
727
728
|
const addonList = list.filter((p) => p.duration == null);
|