@aptos-scp/scp-component-store-selling-features-domain-model 1.53.0 → 1.53.2
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/lib/domain/model/Constants.d.ts +1 -3
- package/lib/domain/model/Constants.js +0 -2
- package/lib/domain/model/discounts/BaseManualDiscountLine.js +2 -7
- package/lib/domain/model/discounts/lineTypes.js +6 -10
- package/lib/domain/model/fee/BaseFeeLineDecorator.js +1 -2
- package/lib/domain/model/item/IItemLine.d.ts +0 -1
- package/package.json +1 -1
|
@@ -938,9 +938,7 @@ export declare enum CollectedDataKey {
|
|
|
938
938
|
MembershipTypeDescription = "membershipTypeDescription",
|
|
939
939
|
IsPermanentMembershipDiscount = "isPermanentMembershipDiscount",
|
|
940
940
|
TerminalForceClosed = "TerminalForceClosed",
|
|
941
|
-
TotalLineTax = "totalLineTax"
|
|
942
|
-
EmployeeFlag = "employeeFlag",
|
|
943
|
-
TriggeredByLoyaltyAwards = "triggeredByLoyaltyAwards"
|
|
941
|
+
TotalLineTax = "totalLineTax"
|
|
944
942
|
}
|
|
945
943
|
export declare enum ItemLookupType {
|
|
946
944
|
ProductInquiryDetail = "ProductInquiryDetail",
|
|
@@ -948,8 +948,6 @@ var CollectedDataKey;
|
|
|
948
948
|
CollectedDataKey["IsPermanentMembershipDiscount"] = "isPermanentMembershipDiscount";
|
|
949
949
|
CollectedDataKey["TerminalForceClosed"] = "TerminalForceClosed";
|
|
950
950
|
CollectedDataKey["TotalLineTax"] = "totalLineTax";
|
|
951
|
-
CollectedDataKey["EmployeeFlag"] = "employeeFlag";
|
|
952
|
-
CollectedDataKey["TriggeredByLoyaltyAwards"] = "triggeredByLoyaltyAwards";
|
|
953
951
|
})(CollectedDataKey = exports.CollectedDataKey || (exports.CollectedDataKey = {}));
|
|
954
952
|
var ItemLookupType;
|
|
955
953
|
(function (ItemLookupType) {
|
|
@@ -284,9 +284,6 @@ class BaseManualDiscountLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
284
284
|
if (collectedData.has(Constants_1.CollectedDataKey.EmployeeId)) {
|
|
285
285
|
this._isEmployeeDiscount = !!collectedData.get(Constants_1.CollectedDataKey.EmployeeId);
|
|
286
286
|
}
|
|
287
|
-
else {
|
|
288
|
-
this._isEmployeeDiscount = !!collectedData.get(Constants_1.CollectedDataKey.EmployeeFlag);
|
|
289
|
-
}
|
|
290
287
|
}
|
|
291
288
|
loadAutoAppliedFromCollectedData(collectedData) {
|
|
292
289
|
if (collectedData.has(Constants_1.CollectedDataKey.AutoApplied)) {
|
|
@@ -316,12 +313,10 @@ class BaseManualDiscountLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
316
313
|
}
|
|
317
314
|
loadLoyaltyDiscountFromCollectedData(collectedData) {
|
|
318
315
|
if (collectedData.has(Constants_1.CollectedDataKey.LoyaltyPlanKey) ||
|
|
319
|
-
collectedData.has(Constants_1.CollectedDataKey.MembershipTypeKey)
|
|
320
|
-
collectedData.has(Constants_1.CollectedDataKey.TriggeredByLoyaltyAwards)) {
|
|
316
|
+
collectedData.has(Constants_1.CollectedDataKey.MembershipTypeKey)) {
|
|
321
317
|
this._isLoyaltyDiscount =
|
|
322
318
|
!!collectedData.get(Constants_1.CollectedDataKey.LoyaltyPlanKey) ||
|
|
323
|
-
!!collectedData.get(Constants_1.CollectedDataKey.MembershipTypeKey)
|
|
324
|
-
!!collectedData.get(Constants_1.CollectedDataKey.TriggeredByLoyaltyAwards);
|
|
319
|
+
!!collectedData.get(Constants_1.CollectedDataKey.MembershipTypeKey);
|
|
325
320
|
}
|
|
326
321
|
}
|
|
327
322
|
loadAmountFromJsonObject(transactionLineJsonObj) {
|
|
@@ -7,22 +7,18 @@ exports.ITEM_MANUAL_DISCOUNT_LINE_TYPE = "ItemManualDiscount";
|
|
|
7
7
|
exports.TRANSACTION_MANUAL_DISCOUNT_LINE_TYPE = "TransactionManualDiscount";
|
|
8
8
|
exports.LOYALTY_DISCOUNT_LINE_TYPE = "LoyaltyDiscount";
|
|
9
9
|
function isManualItemDiscountLine(transactionLine) {
|
|
10
|
-
return (transactionLine
|
|
11
|
-
(transactionLine
|
|
12
|
-
|
|
13
|
-
transactionLine.itemLineReference !== undefined)));
|
|
10
|
+
return (transactionLine instanceof ManualItemDiscountLine_1.ManualItemDiscountLine ||
|
|
11
|
+
(transactionLine.lineType === exports.ITEM_MANUAL_DISCOUNT_LINE_TYPE &&
|
|
12
|
+
transactionLine.itemLineReference !== undefined));
|
|
14
13
|
}
|
|
15
14
|
exports.isManualItemDiscountLine = isManualItemDiscountLine;
|
|
16
15
|
function isManualTransactionDiscountLine(transactionLine) {
|
|
17
|
-
return (transactionLine
|
|
18
|
-
|
|
19
|
-
transactionLine.lineType === exports.TRANSACTION_MANUAL_DISCOUNT_LINE_TYPE));
|
|
16
|
+
return (transactionLine instanceof ManualTransactionDiscountLine_1.ManualTransactionDiscountLine ||
|
|
17
|
+
transactionLine.lineType === exports.TRANSACTION_MANUAL_DISCOUNT_LINE_TYPE);
|
|
20
18
|
}
|
|
21
19
|
exports.isManualTransactionDiscountLine = isManualTransactionDiscountLine;
|
|
22
20
|
function isLoyaltyDiscountLine(transactionLine) {
|
|
23
|
-
return (transactionLine
|
|
24
|
-
(transactionLine instanceof LoyaltyDiscountLine_1.LoyaltyDiscountLine ||
|
|
25
|
-
transactionLine.lineType === exports.LOYALTY_DISCOUNT_LINE_TYPE));
|
|
21
|
+
return (transactionLine instanceof LoyaltyDiscountLine_1.LoyaltyDiscountLine || transactionLine.lineType === exports.LOYALTY_DISCOUNT_LINE_TYPE);
|
|
26
22
|
}
|
|
27
23
|
exports.isLoyaltyDiscountLine = isLoyaltyDiscountLine;
|
|
28
24
|
function isManualDiscountLine(transactionLine) {
|
|
@@ -64,8 +64,7 @@ class BaseFeeLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
|
|
|
64
64
|
return this.decoratedTransactionLine.extendedAmount;
|
|
65
65
|
}
|
|
66
66
|
get extendedAmountAdjustment() {
|
|
67
|
-
|
|
68
|
-
return this.lineSavings ? (_a = this.extendedAmount) === null || _a === void 0 ? void 0 : _a.minus(this.lineSavings) : this.extendedAmount;
|
|
67
|
+
return this.extendedAmount.minus(this.decoratedTransactionLine.extendedAmount);
|
|
69
68
|
}
|
|
70
69
|
get extendedAmountExcludingTax() {
|
|
71
70
|
return this.decoratedTransactionLine.extendedAmountExcludingTax;
|
|
@@ -284,7 +284,6 @@ export interface IOriginalLoyaltyInformation {
|
|
|
284
284
|
readonly originalDiscountlineNumber?: number;
|
|
285
285
|
readonly discountProratedByService?: boolean;
|
|
286
286
|
readonly itemLineReferences?: IProratedItemLineReference[];
|
|
287
|
-
readonly triggeredByLoyaltyAwards?: boolean;
|
|
288
287
|
}
|
|
289
288
|
export interface IOriginalCompetitivePriceInformation {
|
|
290
289
|
readonly pricingRuleId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-scp/scp-component-store-selling-features-domain-model",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.2",
|
|
4
4
|
"description": "This component library provides the common components to handle the coordination of processing the business events from the UI.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|