@pisell/pisellos 2.1.13 → 2.1.14
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/Product/index.d.ts +1 -1
- package/dist/modules/Rules/index.js +2 -0
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/modules/Rules/index.js +2 -0
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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(): "duration" | "session" | "normal";
|
|
53
53
|
}
|
|
@@ -329,6 +329,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
329
329
|
tag: discountType,
|
|
330
330
|
discount: {
|
|
331
331
|
discount_card_type: discount === null || discount === void 0 || (_discount$metadata = discount.metadata) === null || _discount$metadata === void 0 ? void 0 : _discount$metadata.discount_card_type,
|
|
332
|
+
fixed_amount: product.price,
|
|
332
333
|
resource_id: discount.id,
|
|
333
334
|
title: discount.format_title,
|
|
334
335
|
original_amount: product.origin_total,
|
|
@@ -498,6 +499,7 @@ export var RulesModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
498
499
|
type: discountType,
|
|
499
500
|
discount: {
|
|
500
501
|
discount_card_type: _selectedDiscount === null || _selectedDiscount === void 0 || (_selectedDiscount$met = _selectedDiscount.metadata) === null || _selectedDiscount$met === void 0 ? void 0 : _selectedDiscount$met.discount_card_type,
|
|
502
|
+
fixed_amount: new Decimal(productOriginTotal).minus(new Decimal(targetProductTotal)).toNumber(),
|
|
501
503
|
resource_id: _selectedDiscount.id,
|
|
502
504
|
title: _selectedDiscount.format_title,
|
|
503
505
|
original_amount: productOriginTotal,
|
|
@@ -314,7 +314,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
314
314
|
}[];
|
|
315
315
|
setOtherData(key: string, value: any): void;
|
|
316
316
|
getOtherData(key: string): any;
|
|
317
|
-
getProductTypeById(id: number): Promise<"
|
|
317
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
318
318
|
/**
|
|
319
319
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
320
320
|
*
|
|
@@ -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(): "duration" | "session" | "normal";
|
|
53
53
|
}
|
|
@@ -212,6 +212,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
212
212
|
tag: discountType,
|
|
213
213
|
discount: {
|
|
214
214
|
discount_card_type: (_d = discount == null ? void 0 : discount.metadata) == null ? void 0 : _d.discount_card_type,
|
|
215
|
+
fixed_amount: product.price,
|
|
215
216
|
resource_id: discount.id,
|
|
216
217
|
title: discount.format_title,
|
|
217
218
|
original_amount: product.origin_total,
|
|
@@ -346,6 +347,7 @@ var RulesModule = class extends import_BaseModule.BaseModule {
|
|
|
346
347
|
type: discountType,
|
|
347
348
|
discount: {
|
|
348
349
|
discount_card_type: (_j = selectedDiscount2 == null ? void 0 : selectedDiscount2.metadata) == null ? void 0 : _j.discount_card_type,
|
|
350
|
+
fixed_amount: new import_decimal.default(productOriginTotal).minus(new import_decimal.default(targetProductTotal)).toNumber(),
|
|
349
351
|
resource_id: selectedDiscount2.id,
|
|
350
352
|
title: selectedDiscount2.format_title,
|
|
351
353
|
original_amount: productOriginTotal,
|
|
@@ -314,7 +314,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
314
314
|
}[];
|
|
315
315
|
setOtherData(key: string, value: any): void;
|
|
316
316
|
getOtherData(key: string): any;
|
|
317
|
-
getProductTypeById(id: number): Promise<"
|
|
317
|
+
getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
|
|
318
318
|
/**
|
|
319
319
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
320
320
|
*
|