@aptos-scp/scp-component-store-selling-features-domain-model 2.41.1 → 2.42.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/StoreItem.d.ts +1 -0
- package/lib/domain/model/StoreItem.js +6 -0
- package/lib/domain/model/item/BaseItemLineDecorator.d.ts +1 -0
- package/lib/domain/model/item/BaseItemLineDecorator.js +3 -0
- package/lib/domain/model/item/IItemLine.d.ts +2 -0
- package/lib/domain/model/item/ItemLine.d.ts +2 -0
- package/lib/domain/model/item/ItemLine.js +11 -5
- package/package.json +4 -4
|
@@ -146,6 +146,7 @@ export declare class StoreItem implements ISourceIndication, IStoreItemDescripto
|
|
|
146
146
|
images?: IImage[];
|
|
147
147
|
subscriptionFrequencyCodes?: string[];
|
|
148
148
|
subType?: ItemSubType;
|
|
149
|
+
autoSubscribe?: boolean;
|
|
149
150
|
static createFromJsonObject(storeItemJsonObj: any): StoreItem;
|
|
150
151
|
static convertStoreItemComponentIPriceToPrice(value: IStoreItemsPrice): Price;
|
|
151
152
|
static createFromItemObject(configurationManager: IConfigurationManager, retailLocationIdentity: RetailLocationIdentity, accountingCurrency: string, itemToConvert: IItem, locale?: string, sourceIndicator?: SourceType): StoreItem;
|
|
@@ -325,6 +325,9 @@ class StoreItem {
|
|
|
325
325
|
if (storeItemJsonObj.subType) {
|
|
326
326
|
storeItem.subType = storeItemJsonObj.subType;
|
|
327
327
|
}
|
|
328
|
+
if (storeItemJsonObj.autoSubscribe) {
|
|
329
|
+
storeItem.autoSubscribe = storeItemJsonObj.autoSubscribe;
|
|
330
|
+
}
|
|
328
331
|
storeItem.departmentGroupId = StoreItem.getStringFromJsonObject(storeItemJsonObj.departmentGroupId);
|
|
329
332
|
return storeItem;
|
|
330
333
|
}
|
|
@@ -453,6 +456,9 @@ class StoreItem {
|
|
|
453
456
|
if (item.subType) {
|
|
454
457
|
storeItem.subType = item.subType;
|
|
455
458
|
}
|
|
459
|
+
if (item.autoSubscribe) {
|
|
460
|
+
storeItem.autoSubscribe = item.autoSubscribe;
|
|
461
|
+
}
|
|
456
462
|
}
|
|
457
463
|
catch (err) {
|
|
458
464
|
logger.catching(err, entryMessage);
|
|
@@ -130,6 +130,7 @@ export declare abstract class BaseItemLineDecorator extends BaseLineDecorator<II
|
|
|
130
130
|
get extendedPresentationAmount(): Money;
|
|
131
131
|
get subscriptionFrequencyCodes(): string[];
|
|
132
132
|
get subType(): ItemSubType;
|
|
133
|
+
get autoSubscribe(): boolean;
|
|
133
134
|
get cancelled(): boolean;
|
|
134
135
|
get extensibilityFormData(): IExtensibilityForm[];
|
|
135
136
|
get itemTaxExemptAmount(): Money;
|
|
@@ -339,6 +339,9 @@ class BaseItemLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
|
|
|
339
339
|
get subType() {
|
|
340
340
|
return this.decoratedTransactionLine.subType;
|
|
341
341
|
}
|
|
342
|
+
get autoSubscribe() {
|
|
343
|
+
return this.decoratedTransactionLine.autoSubscribe;
|
|
344
|
+
}
|
|
342
345
|
get cancelled() {
|
|
343
346
|
return this.decoratedTransactionLine.cancelled;
|
|
344
347
|
}
|
|
@@ -212,6 +212,8 @@ export interface IItemLine extends ITransactionLine, IVoidableLine, IPriceProvid
|
|
|
212
212
|
readonly subscriptionFrequencyCodes?: string[];
|
|
213
213
|
/** item sub type */
|
|
214
214
|
readonly subType?: ItemSubType;
|
|
215
|
+
/** flag that indicates if the item is auto subscribed */
|
|
216
|
+
readonly autoSubscribe?: boolean;
|
|
215
217
|
/**
|
|
216
218
|
* For order actions, the line number of the item being acted upon from the order.
|
|
217
219
|
*/
|
|
@@ -91,6 +91,7 @@ export declare class ItemLine extends BaseTransactionLine implements IItemLine,
|
|
|
91
91
|
private _itemSelectedUnitPrice?;
|
|
92
92
|
private _subscriptionFrequencyCodes?;
|
|
93
93
|
private _subType?;
|
|
94
|
+
private _autoSubscribe?;
|
|
94
95
|
private _pricingCalculationSourceIndicator?;
|
|
95
96
|
private _taxationCalculationSourceIndicator?;
|
|
96
97
|
private _pricingDataSourceIndicator?;
|
|
@@ -261,6 +262,7 @@ export declare class ItemLine extends BaseTransactionLine implements IItemLine,
|
|
|
261
262
|
get extendedPresentationAmount(): Money;
|
|
262
263
|
get subscriptionFrequencyCodes(): string[];
|
|
263
264
|
get subType(): ItemSubType;
|
|
265
|
+
get autoSubscribe(): boolean;
|
|
264
266
|
get pricingCalculationSourceIndicator(): SourceIndicator;
|
|
265
267
|
get taxationCalculationSourceIndicator(): SourceIndicator;
|
|
266
268
|
get pricingDataSourceIndicator(): SourceIndicator;
|
|
@@ -39,7 +39,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
39
39
|
// tslint:disable-next-line:cyclomatic-complexity
|
|
40
40
|
// eslint-disable-next-line complexity
|
|
41
41
|
static create(lineNumber, lineType, uiBusinessEvent, collectedData) {
|
|
42
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
42
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
43
43
|
let accountingCurrency = collectedData.get("accountingCurrency");
|
|
44
44
|
const additionalItemInfo = collectedData.get("additionalItemInfo");
|
|
45
45
|
const authResponse = collectedData.get(Constants_1.CollectedDataKey.TenderAuthResponse);
|
|
@@ -105,6 +105,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
105
105
|
itemLine._eligibleForSendSale = (_c = storeItem.treatmentRules) === null || _c === void 0 ? void 0 : _c.eligibleForSendSale;
|
|
106
106
|
itemLine._subscriptionFrequencyCodes = storeItem.subscriptionFrequencyCodes;
|
|
107
107
|
itemLine._subType = (_d = storeItem) === null || _d === void 0 ? void 0 : _d.subType;
|
|
108
|
+
itemLine._autoSubscribe = (_e = storeItem) === null || _e === void 0 ? void 0 : _e.autoSubscribe;
|
|
108
109
|
if (collectedData.get(Constants_1.CollectedDataKey.OriginalAlternativeLookupCodesExternalItem)) {
|
|
109
110
|
itemLine._itemLookupKeys = ItemLine.getItemLookupKeyFromCollectedData(collectedData.get(Constants_1.CollectedDataKey.OriginalAlternativeLookupCodesExternalItem));
|
|
110
111
|
}
|
|
@@ -202,13 +203,13 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
202
203
|
if (taxIndicatorOnReceipt) {
|
|
203
204
|
itemLine._taxIndicatorOnReceipt = taxIndicatorOnReceipt;
|
|
204
205
|
}
|
|
205
|
-
if (((
|
|
206
|
+
if (((_f = originalLoyaltyInformation) === null || _f === void 0 ? void 0 : _f.length) > 0) {
|
|
206
207
|
itemLine._originalLoyaltyInformation = originalLoyaltyInformation;
|
|
207
208
|
}
|
|
208
209
|
if (originalCompetitivePriceInformation) {
|
|
209
210
|
itemLine._originalCompetitivePriceInformation = originalCompetitivePriceInformation;
|
|
210
211
|
}
|
|
211
|
-
if (((
|
|
212
|
+
if (((_g = originalSupervisorOverrideInformation) === null || _g === void 0 ? void 0 : _g.length) > 0) {
|
|
212
213
|
itemLine._originalSupervisorOverrideInformation = originalSupervisorOverrideInformation;
|
|
213
214
|
}
|
|
214
215
|
if (originalTaxOverride) {
|
|
@@ -247,11 +248,11 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
247
248
|
itemLine._originalAdjustments = originalAdjustments;
|
|
248
249
|
}
|
|
249
250
|
const originalRedemptionLoyaltyTransactionKeys = collectedData.get(Constants_1.CollectedDataKey.OriginalRedemptionLoyaltyTransactionKeys);
|
|
250
|
-
if (((
|
|
251
|
+
if (((_h = originalRedemptionLoyaltyTransactionKeys) === null || _h === void 0 ? void 0 : _h.length) > 0) {
|
|
251
252
|
itemLine._originalRedemptionLoyaltyTransactionKeys = originalRedemptionLoyaltyTransactionKeys;
|
|
252
253
|
}
|
|
253
254
|
const originalSaleLoyaltyTransactionKeys = collectedData.get(Constants_1.CollectedDataKey.OriginalSaleLoyaltyTransactionKeys);
|
|
254
|
-
if (((
|
|
255
|
+
if (((_j = originalSaleLoyaltyTransactionKeys) === null || _j === void 0 ? void 0 : _j.length) > 0) {
|
|
255
256
|
itemLine._originalSaleLoyaltyTransactionKeys = originalSaleLoyaltyTransactionKeys;
|
|
256
257
|
}
|
|
257
258
|
const originalTransactionLineReference = collectedData.get(Constants_1.CollectedDataKey.OriginalTransactionLineReference);
|
|
@@ -689,6 +690,9 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
689
690
|
get subType() {
|
|
690
691
|
return this._subType;
|
|
691
692
|
}
|
|
693
|
+
get autoSubscribe() {
|
|
694
|
+
return this._autoSubscribe;
|
|
695
|
+
}
|
|
692
696
|
get pricingCalculationSourceIndicator() {
|
|
693
697
|
return this._pricingCalculationSourceIndicator;
|
|
694
698
|
}
|
|
@@ -944,6 +948,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
944
948
|
newItemLine._itemSelectedUnitPrice = this._itemSelectedUnitPrice;
|
|
945
949
|
newItemLine._subscriptionFrequencyCodes = this._subscriptionFrequencyCodes;
|
|
946
950
|
newItemLine._subType = this._subType;
|
|
951
|
+
newItemLine._autoSubscribe = this._autoSubscribe;
|
|
947
952
|
newItemLine._pricingCalculationSourceIndicator = this._pricingCalculationSourceIndicator;
|
|
948
953
|
newItemLine._taxationCalculationSourceIndicator = this._taxationCalculationSourceIndicator;
|
|
949
954
|
newItemLine._pricingDataSourceIndicator = this._pricingDataSourceIndicator;
|
|
@@ -1089,6 +1094,7 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
1089
1094
|
this._itemSelectedUnitPrice = transactionLineJsonObj._itemSelectedUnitPrice;
|
|
1090
1095
|
this._subscriptionFrequencyCodes = transactionLineJsonObj._subscriptionFrequencyCodes;
|
|
1091
1096
|
this._subType = transactionLineJsonObj._subType;
|
|
1097
|
+
this._autoSubscribe = transactionLineJsonObj._autoSubscribe;
|
|
1092
1098
|
this._pricingCalculationSourceIndicator = transactionLineJsonObj._pricingCalculationSourceIndicator;
|
|
1093
1099
|
this._taxationCalculationSourceIndicator = transactionLineJsonObj._taxationCalculationSourceIndicator;
|
|
1094
1100
|
this._pricingDataSourceIndicator = transactionLineJsonObj._pricingDataSourceIndicator;
|
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.42.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",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@aptos-scp/scp-component-business-core": "^1.12.7",
|
|
58
58
|
"@aptos-scp/scp-component-logging": "^2.1.16",
|
|
59
59
|
"@aptos-scp/scp-component-pricing": "^7.69.0",
|
|
60
|
-
"@aptos-scp/scp-component-store-items": "^1.
|
|
60
|
+
"@aptos-scp/scp-component-store-items": "^1.24.0",
|
|
61
61
|
"@aptos-scp/scp-component-store-selling-core": "^18.9.3",
|
|
62
62
|
"@aptos-scp/scp-component-taxation": "^5.28.0",
|
|
63
63
|
"@aptos-scp/scp-component-user": "^1.4.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@aptos-scp/scp-component-logging": "^2.1.16",
|
|
81
81
|
"@aptos-scp/scp-component-pricing": "^7.69.0",
|
|
82
82
|
"@aptos-scp/scp-component-rn-circuit-breaker": "^1.0.15",
|
|
83
|
-
"@aptos-scp/scp-component-store-items": "^1.
|
|
83
|
+
"@aptos-scp/scp-component-store-items": "^1.24.0",
|
|
84
84
|
"@aptos-scp/scp-component-store-selling-core": "^18.9.3",
|
|
85
85
|
"@aptos-scp/scp-component-taxation": "^5.28.0",
|
|
86
86
|
"@aptos-scp/scp-component-user": "^1.4.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@aptos-scp/scp-types-orders": "^4.11.0",
|
|
99
99
|
"@aptos-scp/scp-types-pricing": "^4.31.1",
|
|
100
100
|
"@aptos-scp/scp-types-ss-transaction-history": "^1.6.0",
|
|
101
|
-
"@aptos-scp/scp-types-store-items": "^1.
|
|
101
|
+
"@aptos-scp/scp-types-store-items": "^1.42.0",
|
|
102
102
|
"@aptos-scp/scp-types-terminal-settings": "^1.3.0",
|
|
103
103
|
"@aptos-scp/scp-types-transaction": "^1.4.3",
|
|
104
104
|
"@aptos-scp/scp-types-user": "^1.5.2",
|