@pisell/pisellos 0.0.544 → 0.0.546
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/Discount/index.js +4 -3
- package/dist/modules/Discount/types.d.ts +1 -0
- 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/lib/modules/Discount/index.js +3 -2
- package/lib/modules/Discount/types.d.ts +1 -0
- 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/package.json +2 -2
|
@@ -189,11 +189,12 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
189
189
|
code: code,
|
|
190
190
|
translate_flag: 1,
|
|
191
191
|
tags: ['good_pass', 'product_discount_card'],
|
|
192
|
-
available: 1,
|
|
192
|
+
// available: 1,
|
|
193
193
|
relation_product: 1,
|
|
194
194
|
with: ['extensionData', 'customScheduleSnapshot', 'holder.detail'],
|
|
195
195
|
order_behavior_count: 1,
|
|
196
|
-
order_behavior_count_customer_id: customerId || 1
|
|
196
|
+
order_behavior_count_customer_id: customerId || 1,
|
|
197
|
+
unified_status_info_flag: 1
|
|
197
198
|
}, orderId ? {
|
|
198
199
|
order_behavior_count_order_id: orderId
|
|
199
200
|
} : {}), {}, {
|
|
@@ -330,7 +331,7 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
330
331
|
|
|
331
332
|
// 可用的列表
|
|
332
333
|
var availableLists = lists.filter(function (item) {
|
|
333
|
-
return !item.usageLimitFailKey;
|
|
334
|
+
return !item.usageLimitFailKey && item.unified_available_status !== 0;
|
|
334
335
|
});
|
|
335
336
|
// 不可用数据
|
|
336
337
|
var currentFailDiscount = lists.find(function (item) {
|
|
@@ -155,6 +155,7 @@ export interface Discount {
|
|
|
155
155
|
start_time?: string;
|
|
156
156
|
discount_rule_uncheck_flag?: boolean;
|
|
157
157
|
usageLimitFailKey?: string | null;
|
|
158
|
+
unified_available_status?: number | undefined | null;
|
|
158
159
|
}
|
|
159
160
|
export interface DiscountState {
|
|
160
161
|
discountList: Discount[];
|
|
@@ -83,7 +83,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
83
83
|
enhancePayload?: SubmitPayloadEnhancer;
|
|
84
84
|
}): Promise<T>;
|
|
85
85
|
createOrder(params: CommitOrderParams['query']): {
|
|
86
|
-
type: "
|
|
86
|
+
type: "virtual" | "appointment_booking";
|
|
87
87
|
platform: string;
|
|
88
88
|
sales_channel: string;
|
|
89
89
|
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
|
}
|
|
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
311
311
|
date: string;
|
|
312
312
|
status: string;
|
|
313
313
|
week: string;
|
|
314
|
-
weekNum: 0 |
|
|
314
|
+
weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
315
315
|
}[]>;
|
|
316
316
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
317
317
|
private getScheduleDataByIds;
|
|
@@ -358,7 +358,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
358
358
|
};
|
|
359
359
|
setOtherData(key: string, value: any): void;
|
|
360
360
|
getOtherData(key: string): any;
|
|
361
|
-
getProductTypeById(id: number): Promise<"
|
|
361
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
362
362
|
/**
|
|
363
363
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
364
364
|
*
|
|
@@ -108,11 +108,12 @@ var DiscountModule = class extends import_BaseModule.BaseModule {
|
|
|
108
108
|
code,
|
|
109
109
|
translate_flag: 1,
|
|
110
110
|
tags: ["good_pass", "product_discount_card"],
|
|
111
|
-
available: 1,
|
|
111
|
+
// available: 1,
|
|
112
112
|
relation_product: 1,
|
|
113
113
|
with: ["extensionData", "customScheduleSnapshot", "holder.detail"],
|
|
114
114
|
order_behavior_count: 1,
|
|
115
115
|
order_behavior_count_customer_id: customerId || 1,
|
|
116
|
+
unified_status_info_flag: 1,
|
|
116
117
|
...orderId ? { order_behavior_count_order_id: orderId } : {},
|
|
117
118
|
request_timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
118
119
|
});
|
|
@@ -184,7 +185,7 @@ var DiscountModule = class extends import_BaseModule.BaseModule {
|
|
|
184
185
|
usageLimitFailKey: limitFailKey
|
|
185
186
|
};
|
|
186
187
|
});
|
|
187
|
-
const availableLists = lists.filter((item) => !item.usageLimitFailKey);
|
|
188
|
+
const availableLists = lists.filter((item) => !item.usageLimitFailKey && item.unified_available_status !== 0);
|
|
188
189
|
const currentFailDiscount = lists.find((item) => item.usageLimitFailKey);
|
|
189
190
|
return {
|
|
190
191
|
discountList: availableLists,
|
|
@@ -155,6 +155,7 @@ export interface Discount {
|
|
|
155
155
|
start_time?: string;
|
|
156
156
|
discount_rule_uncheck_flag?: boolean;
|
|
157
157
|
usageLimitFailKey?: string | null;
|
|
158
|
+
unified_available_status?: number | undefined | null;
|
|
158
159
|
}
|
|
159
160
|
export interface DiscountState {
|
|
160
161
|
discountList: Discount[];
|
|
@@ -83,7 +83,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
|
|
|
83
83
|
enhancePayload?: SubmitPayloadEnhancer;
|
|
84
84
|
}): Promise<T>;
|
|
85
85
|
createOrder(params: CommitOrderParams['query']): {
|
|
86
|
-
type: "
|
|
86
|
+
type: "virtual" | "appointment_booking";
|
|
87
87
|
platform: string;
|
|
88
88
|
sales_channel: string;
|
|
89
89
|
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
|
}
|
|
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
311
311
|
date: string;
|
|
312
312
|
status: string;
|
|
313
313
|
week: string;
|
|
314
|
-
weekNum: 0 |
|
|
314
|
+
weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
315
315
|
}[]>;
|
|
316
316
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
317
317
|
private getScheduleDataByIds;
|
|
@@ -358,7 +358,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
358
358
|
};
|
|
359
359
|
setOtherData(key: string, value: any): void;
|
|
360
360
|
getOtherData(key: string): any;
|
|
361
|
-
getProductTypeById(id: number): Promise<"
|
|
361
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
362
362
|
/**
|
|
363
363
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
364
364
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@pisell/pisellos",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.546",
|
|
5
5
|
"description": "一个可扩展的前端模块化SDK框架,支持插件系统",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
|
|
19
19
|
"changeset": "changeset",
|
|
20
20
|
"version": "changeset version",
|
|
21
|
-
"release": "changeset publish && npm run sync && git push",
|
|
21
|
+
"release": "changeset publish --registry=https://registry.npmjs.com/ && npm run sync && git push",
|
|
22
22
|
"example": "npx parcel-bundler examples/index.html",
|
|
23
23
|
"docs": "typedoc --out docs src/index.ts",
|
|
24
24
|
"sync": "node sync.js",
|