@aptos-scp/scp-component-store-selling-features-domain-model 2.30.1 → 2.31.0-patch.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.
|
@@ -210,6 +210,7 @@ class Customer {
|
|
|
210
210
|
customer.loyaltyMembershipLookupIndicator = customerFromJson.loyaltyMembershipLookupIndicator;
|
|
211
211
|
customer.hasLoyaltyMemberships = customerFromJson.hasLoyaltyMemberships;
|
|
212
212
|
customer.loyaltyMemberships = customerFromJson.loyaltyMemberships;
|
|
213
|
+
customer.hiddenLoyaltyMemberships = customerFromJson.hiddenLoyaltyMemberships;
|
|
213
214
|
customer.availableLoyaltyPlans = customerFromJson.availableLoyaltyPlans;
|
|
214
215
|
customer.allowPromptForLoyaltyEnrollment = customerFromJson.allowPromptForLoyaltyEnrollment;
|
|
215
216
|
customer.earliestNextLoyaltyEnrollmentPromptDate =
|
|
@@ -95,6 +95,7 @@ export declare class TenderType {
|
|
|
95
95
|
private _eligibleForTaxLottery?;
|
|
96
96
|
private _cashoutThreshold?;
|
|
97
97
|
static getActiveConfiguredTenders(container: Container, accountingCurrency: string): TenderType[];
|
|
98
|
+
static getAllConfiguredTenders(container: Container, accountingCurrency: string): TenderType[];
|
|
98
99
|
static getActiveRefundConfiguredTenders(container: Container, accountingCurrency: string, withTransaction: boolean, withOfflineTransaction: boolean): TenderType[];
|
|
99
100
|
static getActiveSuggestedRefundTenders(container: Container, accountingCurrency: string, withMappedTender?: boolean): TenderType[];
|
|
100
101
|
static getActiveConfiguredTenderGroups(container: Container, accountingCurrency: string, activeTenders: TenderType[]): ITenderGroup[];
|
|
@@ -152,6 +153,7 @@ export declare class TenderType {
|
|
|
152
153
|
get subscriptionEntryMethods(): EntryMethod[];
|
|
153
154
|
get cashoutThreshold(): Money;
|
|
154
155
|
private static getActiveTenders;
|
|
156
|
+
private static mapTenderDefinitionToTenderType;
|
|
155
157
|
private static filterActiveTenderIds;
|
|
156
158
|
private static tenderAuthCategoryIsActive;
|
|
157
159
|
private static tenderTypeIsActive;
|
|
@@ -72,6 +72,13 @@ class TenderType {
|
|
|
72
72
|
static getActiveConfiguredTenders(container, accountingCurrency) {
|
|
73
73
|
return TenderType.getActiveTenders(container, accountingCurrency, false, false, false, false);
|
|
74
74
|
}
|
|
75
|
+
static getAllConfiguredTenders(container, accountingCurrency) {
|
|
76
|
+
const configurationManager = container.get(scp_component_store_selling_core_1.DI_TYPES.IConfigurationManager);
|
|
77
|
+
const configuredTenders = configurationManager.getTendersValues().tenderDefinitions;
|
|
78
|
+
return configuredTenders
|
|
79
|
+
.filter((configuredTender) => configuredTender != null)
|
|
80
|
+
.map((configuredTender) => TenderType.mapTenderDefinitionToTenderType(configuredTender, accountingCurrency));
|
|
81
|
+
}
|
|
75
82
|
static getActiveRefundConfiguredTenders(container, accountingCurrency, withTransaction, withOfflineTransaction) {
|
|
76
83
|
return TenderType.getActiveTenders(container, accountingCurrency, true, withTransaction, false, false, withOfflineTransaction);
|
|
77
84
|
}
|
|
@@ -519,12 +526,15 @@ class TenderType {
|
|
|
519
526
|
const configuredTenders = configurationManager.getTendersValues().tenderDefinitions;
|
|
520
527
|
const activeTenders = configuredTenders
|
|
521
528
|
.filter((configuredTender) => tenderIsActive(configuredTender, isRefund, withTransaction, withReference, withMappedTender, withOfflineTransaction, accountingCurrency))
|
|
522
|
-
.map((configuredTender) =>
|
|
529
|
+
.map((configuredTender) => TenderType.mapTenderDefinitionToTenderType(configuredTender, accountingCurrency));
|
|
530
|
+
return activeTenders;
|
|
531
|
+
}
|
|
532
|
+
static mapTenderDefinitionToTenderType(configuredTender, accountingCurrency) {
|
|
533
|
+
return new TenderType(configuredTender.tenderId, configuredTender.tenderName, configuredTender.tenderType, Constants_1.TenderAuthCategory[configuredTender.tenderAuthCategory], configuredTender.additionalTenderAuthCategories, scp_types_commerce_devices_1.CardType[configuredTender.cardType], TenderSignatureCapturePolicy[configuredTender.signatureCapturePolicy], configuredTender.hasOwnProperty("signatureCaptureFloorLimit")
|
|
523
534
|
? new scp_component_business_core_1.Money(configuredTender.signatureCaptureFloorLimit, accountingCurrency)
|
|
524
535
|
: undefined, configuredTender.printDeclineTenderDetails, configuredTender.printDeclineTenderReceipt, configuredTender.printStoreTenderReceipt, configuredTender.allowPostVoid, configuredTender.allowCallForAuthorization !== false, configuredTender.allowRefund, configuredTender.pluralTenderName, configuredTender.fiscalCode, configuredTender.fiscalType, configuredTender.tenderLabel, configuredTender.actions, configuredTender.overTenderRule && Constants_1.OverTenderRule[configuredTender.overTenderRule], configuredTender.subType, configuredTender.customCardType, configuredTender.promptOnPartialApproval, configuredTender.pinRules, configuredTender.subscriptionEntryMethods, configuredTender.changeBehavior, configuredTender.isForeignTender, configuredTender.currencyCode, configuredTender.eligibleForTaxLottery, configuredTender.printVoidTenderDetails, configuredTender.printVoidTenderReceipt, configuredTender.hasOwnProperty("cashoutThreshold")
|
|
525
536
|
? new scp_component_business_core_1.Money(configuredTender.cashoutThreshold, accountingCurrency)
|
|
526
|
-
: undefined, TenderSignatureCapturePolicy[configuredTender.signatureCapturePolicyForCallForAuth])
|
|
527
|
-
return activeTenders;
|
|
537
|
+
: undefined, TenderSignatureCapturePolicy[configuredTender.signatureCapturePolicyForCallForAuth]);
|
|
528
538
|
}
|
|
529
539
|
static filterActiveTenderIds(tenderIds, configuredTenders, isRefund, withTransaction, withOfflineTransaction, accountingCurrency) {
|
|
530
540
|
return (tenderIds &&
|
|
@@ -292,24 +292,24 @@ class FeeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
292
292
|
return transactionLineJsonObj._taxGroupId;
|
|
293
293
|
}
|
|
294
294
|
static getExtendedAmountFromCollectedData(collectedData) {
|
|
295
|
-
if (collectedData.has(Constants_1.CollectedDataKey.FeeExtendedAmount)
|
|
295
|
+
if (collectedData.has(Constants_1.CollectedDataKey.FeeExtendedAmount)) {
|
|
296
296
|
return collectedData.get(Constants_1.CollectedDataKey.FeeExtendedAmount);
|
|
297
297
|
}
|
|
298
|
-
undefined;
|
|
298
|
+
return undefined;
|
|
299
299
|
}
|
|
300
300
|
static getExtendedAmountExcludingTaxFromCollectedData(collectedData) {
|
|
301
301
|
if (collectedData.has(Constants_1.CollectedDataKey.FeeExtendedAmountExcludingTax) &&
|
|
302
302
|
FeeLine.isPickupFulfilmentTransaction) {
|
|
303
303
|
return collectedData.get(Constants_1.CollectedDataKey.FeeExtendedAmountExcludingTax);
|
|
304
304
|
}
|
|
305
|
-
undefined;
|
|
305
|
+
return undefined;
|
|
306
306
|
}
|
|
307
307
|
static getExtendedAmountIncludingTaxFromCollectedData(collectedData) {
|
|
308
308
|
if (collectedData.has(Constants_1.CollectedDataKey.FeeExtendedAmountIncludingTax) &&
|
|
309
309
|
FeeLine.isPickupFulfilmentTransaction) {
|
|
310
310
|
return collectedData.get(Constants_1.CollectedDataKey.FeeExtendedAmountIncludingTax);
|
|
311
311
|
}
|
|
312
|
-
undefined;
|
|
312
|
+
return undefined;
|
|
313
313
|
}
|
|
314
314
|
copyLineWithNewLineNumber(newLineNumber) {
|
|
315
315
|
const clonedItem = this.clone();
|
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.31.0-patch.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",
|