@pisell/pisellos 2.2.129 → 2.2.130

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.
@@ -0,0 +1,9 @@
1
+ // 导出评估器
2
+ export { PromotionEvaluator } from "./evaluator";
3
+
4
+ // 导出适配器
5
+ export { PromotionAdapter } from "./adapter";
6
+ export { default } from "./adapter";
7
+
8
+ // 导出策略配置示例常量
9
+ export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY } from "./examples";
@@ -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(): "normal" | "duration" | "session";
52
+ getProductType(): "duration" | "session" | "normal";
53
53
  }
@@ -136,7 +136,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
136
136
  * 获取当前的客户搜索条件
137
137
  * @returns 当前搜索条件
138
138
  */
139
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
139
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
140
140
  /**
141
141
  * 获取客户列表状态(包含滚动加载相关状态)
142
142
  * @returns 客户状态
@@ -267,7 +267,10 @@ export var SalesImpl = /*#__PURE__*/function (_BaseModule) {
267
267
  if (slotCount <= 0) return [];
268
268
  var diff = new Int32Array(slotCount + 1);
269
269
  for (var i = 0; i < bookingList.length; i++) {
270
+ var _ref2, _booking$appointment_;
270
271
  var booking = bookingList[i];
272
+ var appointmentStatus = String((_ref2 = (_booking$appointment_ = booking.appointment_status) !== null && _booking$appointment_ !== void 0 ? _booking$appointment_ : booking.status) !== null && _ref2 !== void 0 ? _ref2 : '');
273
+ if (appointmentStatus === 'new' || appointmentStatus === 'rejected' || appointmentStatus === 'cancelled') continue;
271
274
  var bookingStartAt = this.toBookingDateTime(booking.start_date, booking.start_time);
272
275
  var bookingEndAt = this.toBookingDateTime(booking.end_date, booking.end_time);
273
276
  if (!bookingStartAt.isValid() || !bookingEndAt.isValid()) continue;
@@ -336,8 +339,8 @@ export var SalesImpl = /*#__PURE__*/function (_BaseModule) {
336
339
  }, {
337
340
  key: "getResourceId",
338
341
  value: function getResourceId(resource) {
339
- var _ref2, _resource$id;
340
- return (_ref2 = (_resource$id = resource.id) !== null && _resource$id !== void 0 ? _resource$id : resource.form_record_id) !== null && _ref2 !== void 0 ? _ref2 : '';
342
+ var _ref3, _resource$id;
343
+ return (_ref3 = (_resource$id = resource.id) !== null && _resource$id !== void 0 ? _resource$id : resource.form_record_id) !== null && _ref3 !== void 0 ? _ref3 : '';
341
344
  }
342
345
 
343
346
  /**
@@ -454,8 +457,8 @@ export var SalesImpl = /*#__PURE__*/function (_BaseModule) {
454
457
  }, {
455
458
  key: "normalizeMatchedBooking",
456
459
  value: function normalizeMatchedBooking(current, deviceCurrent, booking) {
457
- var _ref3, _booking$appointment_;
458
- var appointmentStatus = String((_ref3 = (_booking$appointment_ = booking.appointment_status) !== null && _booking$appointment_ !== void 0 ? _booking$appointment_ : booking.status) !== null && _ref3 !== void 0 ? _ref3 : '');
460
+ var _ref4, _booking$appointment_2;
461
+ var appointmentStatus = String((_ref4 = (_booking$appointment_2 = booking.appointment_status) !== null && _booking$appointment_2 !== void 0 ? _booking$appointment_2 : booking.status) !== null && _ref4 !== void 0 ? _ref4 : '');
459
462
  if (appointmentStatus === 'rejected' || appointmentStatus === 'cancelled') return null;
460
463
  var startAt = this.toBookingDateTime(booking.start_date, booking.start_time);
461
464
  var endAt = this.toBookingDateTime(booking.end_date, booking.end_time);
@@ -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(): "normal" | "duration" | "session";
52
+ getProductType(): "duration" | "session" | "normal";
53
53
  }
@@ -136,7 +136,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
136
136
  * 获取当前的客户搜索条件
137
137
  * @returns 当前搜索条件
138
138
  */
139
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
139
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
140
140
  /**
141
141
  * 获取客户列表状态(包含滚动加载相关状态)
142
142
  * @returns 客户状态
@@ -166,6 +166,9 @@ var SalesImpl = class extends import_BaseModule.BaseModule {
166
166
  const diff = new Int32Array(slotCount + 1);
167
167
  for (let i = 0; i < bookingList.length; i++) {
168
168
  const booking = bookingList[i];
169
+ const appointmentStatus = String(booking.appointment_status ?? booking.status ?? "");
170
+ if (appointmentStatus === "new" || appointmentStatus === "rejected" || appointmentStatus === "cancelled")
171
+ continue;
169
172
  const bookingStartAt = this.toBookingDateTime(booking.start_date, booking.start_time);
170
173
  const bookingEndAt = this.toBookingDateTime(booking.end_date, booking.end_time);
171
174
  if (!bookingStartAt.isValid() || !bookingEndAt.isValid())
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.129",
4
+ "version": "2.2.130",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",