@aptos-scp/scp-component-store-selling-features-domain-model 2.18.0 → 2.19.0
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/discounts/IRewardCardDiscountLine.d.ts +1 -0
- package/lib/domain/model/discounts/RewardCardDiscountLine.d.ts +3 -1
- package/lib/domain/model/discounts/RewardCardDiscountLine.js +10 -4
- package/lib/domain/model/discounts/RewardCardDiscountLineDecorator.d.ts +1 -0
- package/lib/domain/model/discounts/RewardCardDiscountLineDecorator.js +3 -0
- package/lib/domain/model/discounts/RewardCardDiscountLineTotalDecorator.d.ts +1 -0
- package/lib/domain/model/discounts/RewardCardDiscountLineTotalDecorator.js +3 -0
- package/lib/domain/model/discounts/VoidedRewardCardDiscountLineDecorator.d.ts +1 -0
- package/lib/domain/model/discounts/VoidedRewardCardDiscountLineDecorator.js +3 -0
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ export interface IRewardCardDiscountLine extends IManualDiscountLine {
|
|
|
11
11
|
readonly rewardCardName: string;
|
|
12
12
|
readonly autoPopulateCardNumberFromCustomer: boolean;
|
|
13
13
|
readonly pin: string;
|
|
14
|
+
readonly inputSource: string;
|
|
14
15
|
/**
|
|
15
16
|
* The tenderId is the id of the tender associated with reward card authorization
|
|
16
17
|
*/
|
|
@@ -15,6 +15,7 @@ export declare class RewardCardDiscountLine extends BaseManualDiscountLine imple
|
|
|
15
15
|
private _rewardCardName;
|
|
16
16
|
private _autoPopulateCardNumberFromCustomer;
|
|
17
17
|
private _pin;
|
|
18
|
+
private _inputSource;
|
|
18
19
|
/**
|
|
19
20
|
* The tenderId is the id of the tender associated with reward card authorization
|
|
20
21
|
*/
|
|
@@ -32,6 +33,7 @@ export declare class RewardCardDiscountLine extends BaseManualDiscountLine imple
|
|
|
32
33
|
*/
|
|
33
34
|
static create(lineNumber: number, lineType: string, uiBusinessEvent: UiBusinessEvent, collectedData: Readonly<Map<string, any>>): RewardCardDiscountLine;
|
|
34
35
|
static createFromJsonObject(transactionLineJsonObj: any): RewardCardDiscountLine;
|
|
36
|
+
get inputSource(): string;
|
|
35
37
|
get discountLevel(): ManualDiscountLevel;
|
|
36
38
|
get autoPopulateCardNumberFromCustomer(): boolean;
|
|
37
39
|
get cardNumber(): string;
|
|
@@ -45,6 +47,6 @@ export declare class RewardCardDiscountLine extends BaseManualDiscountLine imple
|
|
|
45
47
|
get tenderType(): TenderType;
|
|
46
48
|
get authorizationDeviceId(): string;
|
|
47
49
|
get isAuthorized(): boolean;
|
|
48
|
-
protected constructor(lineNumber: number, lineType: string, discountType: ManualDiscountType, discountLevel: ManualDiscountLevel, rewardPrintedName: string, rewardPrintedNumberLabel: string, rewardCardName: string, autoPopulateCardNumberFromCustomer: boolean, tenderId: string, pin: string, cardNumber: string, pricingRuleId?: string, amount?: Money, percent?: string, replacementUnitPrice?: Price, reasonCode?: string, reasonDesc?: string, reasonType?: string, couponCode?: string, supervisorOverrideLineReference?: ITransactionLineReferenceType, isEmployeeDiscount?: boolean, isFastDiscount?: boolean, competitivePrice?: Price, competitor?: string, formOfProof?: string, customCompetitorName?: string, customFormOfProof?: string, competitorCode?: string, formOfProofCode?: string, entryType?: DiscountEntryType);
|
|
50
|
+
protected constructor(lineNumber: number, lineType: string, discountType: ManualDiscountType, discountLevel: ManualDiscountLevel, rewardPrintedName: string, rewardPrintedNumberLabel: string, rewardCardName: string, autoPopulateCardNumberFromCustomer: boolean, tenderId: string, pin: string, cardNumber: string, inputSource: string, pricingRuleId?: string, amount?: Money, percent?: string, replacementUnitPrice?: Price, reasonCode?: string, reasonDesc?: string, reasonType?: string, couponCode?: string, supervisorOverrideLineReference?: ITransactionLineReferenceType, isEmployeeDiscount?: boolean, isFastDiscount?: boolean, competitivePrice?: Price, competitor?: string, formOfProof?: string, customCompetitorName?: string, customFormOfProof?: string, competitorCode?: string, formOfProofCode?: string, entryType?: DiscountEntryType);
|
|
49
51
|
protected newTransactionLine(): BaseTransactionLine;
|
|
50
52
|
}
|
|
@@ -5,7 +5,7 @@ const Constants_1 = require("../Constants");
|
|
|
5
5
|
const BaseManualDiscountLine_1 = require("./BaseManualDiscountLine");
|
|
6
6
|
class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscountLine {
|
|
7
7
|
// Since the constructor is only called from the create methods it is made protected to prevent use by others.
|
|
8
|
-
constructor(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber, pricingRuleId, amount, percent, replacementUnitPrice, reasonCode, reasonDesc, reasonType, couponCode, supervisorOverrideLineReference, isEmployeeDiscount, isFastDiscount, competitivePrice, competitor, formOfProof, customCompetitorName, customFormOfProof, competitorCode, formOfProofCode, entryType) {
|
|
8
|
+
constructor(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber, inputSource, pricingRuleId, amount, percent, replacementUnitPrice, reasonCode, reasonDesc, reasonType, couponCode, supervisorOverrideLineReference, isEmployeeDiscount, isFastDiscount, competitivePrice, competitor, formOfProof, customCompetitorName, customFormOfProof, competitorCode, formOfProofCode, entryType) {
|
|
9
9
|
super(lineNumber, lineType, discountType, pricingRuleId, amount, percent, replacementUnitPrice, reasonCode, reasonDesc, reasonType, couponCode, supervisorOverrideLineReference, isEmployeeDiscount, isFastDiscount, false, competitivePrice, competitor, formOfProof, customCompetitorName, customFormOfProof, competitorCode, formOfProofCode, entryType);
|
|
10
10
|
this._discountLevel = discountLevel;
|
|
11
11
|
this._rewardPrintedName = rewardPrintedName;
|
|
@@ -14,6 +14,7 @@ class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscount
|
|
|
14
14
|
this._tenderId = tenderId;
|
|
15
15
|
this._pin = pin;
|
|
16
16
|
this._cardNumber = cardNumber;
|
|
17
|
+
this._inputSource = inputSource;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
@@ -35,8 +36,9 @@ class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscount
|
|
|
35
36
|
const pin = collectedData.get(Constants_1.CollectedDataKey.GiftCardPin);
|
|
36
37
|
const cardNumber = collectedData.get(Constants_1.CollectedDataKey.CardNumber);
|
|
37
38
|
const rewardCardName = collectedData.get(Constants_1.CollectedDataKey.RewardCardName);
|
|
39
|
+
const inputSource = collectedData.get(Constants_1.CollectedDataKey.InputSource);
|
|
38
40
|
const discountType = BaseManualDiscountLine_1.BaseManualDiscountLine.discountTypeFromCollectedData(collectedData);
|
|
39
|
-
const discountLine = new RewardCardDiscountLine(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber);
|
|
41
|
+
const discountLine = new RewardCardDiscountLine(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber, inputSource);
|
|
40
42
|
discountLine.loadFromCollectedData(collectedData);
|
|
41
43
|
return discountLine;
|
|
42
44
|
}
|
|
@@ -52,10 +54,14 @@ class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscount
|
|
|
52
54
|
const tenderId = transactionLineJsonObj._tenderId;
|
|
53
55
|
const pin = transactionLineJsonObj._pin;
|
|
54
56
|
const cardNumber = transactionLineJsonObj._cardNumber;
|
|
55
|
-
const
|
|
57
|
+
const inputSource = transactionLineJsonObj._inputSource;
|
|
58
|
+
const discountLine = new RewardCardDiscountLine(lineNumber, lineType, discountType, discountLevel, rewardPrintedName, rewardPrintedNumberLabel, rewardCardName, autoPopulateCardNumberFromCustomer, tenderId, pin, cardNumber, inputSource);
|
|
56
59
|
discountLine.loadFromJsonObject(transactionLineJsonObj);
|
|
57
60
|
return discountLine;
|
|
58
61
|
}
|
|
62
|
+
get inputSource() {
|
|
63
|
+
return this._inputSource;
|
|
64
|
+
}
|
|
59
65
|
get discountLevel() {
|
|
60
66
|
return this._discountLevel;
|
|
61
67
|
}
|
|
@@ -96,7 +102,7 @@ class RewardCardDiscountLine extends BaseManualDiscountLine_1.BaseManualDiscount
|
|
|
96
102
|
return false;
|
|
97
103
|
}
|
|
98
104
|
newTransactionLine() {
|
|
99
|
-
return new RewardCardDiscountLine(this.lineNumber, this.lineType, this._discountType, this._discountLevel, this._rewardPrintedName, this._rewardPrintedNumberLabel, this._rewardCardName, this._autoPopulateCardNumberFromCustomer, this._tenderId, this._pin, this._cardNumber, this._pricingRuleId, this._amount, this._percent, this._replacementUnitPrice, this._reasonCode, this._reasonDescription, this._reasonListType, this._couponCode, this._supervisorOverrideLineReference, this._isEmployeeDiscount, this._isFastDiscount, this._competitivePrice, this._competitor, this._formOfProof, this._customCompetitorName, this._customFormOfProof, this._competitorCode, this._formOfProofCode, this._entryType);
|
|
105
|
+
return new RewardCardDiscountLine(this.lineNumber, this.lineType, this._discountType, this._discountLevel, this._rewardPrintedName, this._rewardPrintedNumberLabel, this._rewardCardName, this._autoPopulateCardNumberFromCustomer, this._tenderId, this._pin, this._cardNumber, this._inputSource, this._pricingRuleId, this._amount, this._percent, this._replacementUnitPrice, this._reasonCode, this._reasonDescription, this._reasonListType, this._couponCode, this._supervisorOverrideLineReference, this._isEmployeeDiscount, this._isFastDiscount, this._competitivePrice, this._competitor, this._formOfProof, this._customCompetitorName, this._customFormOfProof, this._competitorCode, this._formOfProofCode, this._entryType);
|
|
100
106
|
}
|
|
101
107
|
}
|
|
102
108
|
exports.RewardCardDiscountLine = RewardCardDiscountLine;
|
|
@@ -15,6 +15,7 @@ export declare class RewardCardDiscountLineDecorator extends BaseManualDiscountL
|
|
|
15
15
|
static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): RewardCardDiscountLineDecorator;
|
|
16
16
|
constructor(manualDiscountLine: IRewardCardDiscountLine, annotationSourceLineNumber: number, authResponse: IAuthorizationResponse, tenderAmount: Money, tenderType: TenderType, authorizationDeviceId: string);
|
|
17
17
|
get discountLevel(): ManualDiscountLevel;
|
|
18
|
+
get inputSource(): string;
|
|
18
19
|
get autoPopulateCardNumberFromCustomer(): boolean;
|
|
19
20
|
get cardNumber(): string;
|
|
20
21
|
get rewardPrintedName(): string;
|
|
@@ -42,6 +42,9 @@ class RewardCardDiscountLineDecorator extends BaseManualDiscountLineDecorator_1.
|
|
|
42
42
|
get discountLevel() {
|
|
43
43
|
return this.decoratedTransactionLine.discountLevel;
|
|
44
44
|
}
|
|
45
|
+
get inputSource() {
|
|
46
|
+
return this.decoratedTransactionLine.inputSource;
|
|
47
|
+
}
|
|
45
48
|
get autoPopulateCardNumberFromCustomer() {
|
|
46
49
|
return this.decoratedTransactionLine.autoPopulateCardNumberFromCustomer;
|
|
47
50
|
}
|
|
@@ -24,5 +24,6 @@ export declare class RewardCardDiscountLineTotalDecorator extends ManualDiscount
|
|
|
24
24
|
get tenderType(): TenderType;
|
|
25
25
|
get authorizationDeviceId(): string;
|
|
26
26
|
get isAuthorized(): boolean;
|
|
27
|
+
get inputSource(): string;
|
|
27
28
|
protected newTransactionLine(): RewardCardDiscountLineTotalDecorator;
|
|
28
29
|
}
|
|
@@ -55,6 +55,9 @@ class RewardCardDiscountLineTotalDecorator extends ManualDiscountLineTotalDecora
|
|
|
55
55
|
get isAuthorized() {
|
|
56
56
|
return this.decoratedTransactionLine.isAuthorized;
|
|
57
57
|
}
|
|
58
|
+
get inputSource() {
|
|
59
|
+
return this.decoratedTransactionLine.inputSource;
|
|
60
|
+
}
|
|
58
61
|
newTransactionLine() {
|
|
59
62
|
return new RewardCardDiscountLineTotalDecorator(this.lineDecoratorType, this.decoratedTransactionLine, this.totalDiscount, this.annotationSourceLineNumber);
|
|
60
63
|
}
|
|
@@ -18,6 +18,7 @@ export declare class VoidedRewardCardDiscountLineDecorator extends VoidedDiscoun
|
|
|
18
18
|
get pin(): string;
|
|
19
19
|
get rewardCardName(): string;
|
|
20
20
|
get autoPopulateCardNumberFromCustomer(): boolean;
|
|
21
|
+
get inputSource(): string;
|
|
21
22
|
get authResponse(): IAuthorizationResponse;
|
|
22
23
|
get tenderAmount(): Money;
|
|
23
24
|
get tenderType(): TenderType;
|
|
@@ -38,6 +38,9 @@ class VoidedRewardCardDiscountLineDecorator extends VoidedDiscountLineDecorator_
|
|
|
38
38
|
get autoPopulateCardNumberFromCustomer() {
|
|
39
39
|
return this.decoratedTransactionLine.autoPopulateCardNumberFromCustomer;
|
|
40
40
|
}
|
|
41
|
+
get inputSource() {
|
|
42
|
+
return this.decoratedTransactionLine.inputSource;
|
|
43
|
+
}
|
|
41
44
|
get authResponse() {
|
|
42
45
|
return this.decoratedTransactionLine.authResponse;
|
|
43
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-scp/scp-component-store-selling-features-domain-model",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
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",
|