@aptos-scp/scp-component-store-selling-features-domain-model 2.4.0 → 2.4.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.
@@ -22,6 +22,7 @@ export declare class TenderControlTransaction extends RetailTransaction {
22
22
  get referenceNumber(): string;
23
23
  get isTenderExchangeTransaction(): boolean;
24
24
  get isAccountPaymentTransaction(): boolean;
25
+ get hasAccountLookupLines(): boolean;
25
26
  get isCompleteTenderExchangeTransaction(): boolean;
26
27
  get isCompleteAccountPaymentTransaction(): boolean;
27
28
  get transactionStateValues(): Readonly<Map<string, any>>;
@@ -8,6 +8,7 @@ const scp_types_commerce_transaction_1 = require("@aptos-scp/scp-types-commerce-
8
8
  const config_1 = require("../../config");
9
9
  const RetailTransaction_1 = require("./RetailTransaction");
10
10
  const tender_1 = require("./tender");
11
+ const account_1 = require("./account");
11
12
  exports.TENDER_CONTROL_TRANSACTION_TYPE = "TenderControlTransaction";
12
13
  class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
13
14
  constructor(deviceIdentity, businessDayDate, transactionNumber, user, transactionId, accountingCurrency, transactionReferenceFormatter, fiscalTransactionNumber, fiscalSignature) {
@@ -76,6 +77,10 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
76
77
  var _a;
77
78
  return !!((_a = this.lines) === null || _a === void 0 ? void 0 : _a.some((line) => tender_1.isTenderAuthorizationStatusLine(line) && line.status === scp_types_commerce_transaction_1.TenderAuthorizationStatus.PayOnAccountStarted));
78
79
  }
80
+ get hasAccountLookupLines() {
81
+ var _a;
82
+ return !!((_a = this.lines) === null || _a === void 0 ? void 0 : _a.some((line) => account_1.isPaymentAccountLookupLine(line)));
83
+ }
79
84
  get isCompleteTenderExchangeTransaction() {
80
85
  return (this.isTenderExchangeTransaction &&
81
86
  !!(this.lines.find((line) => tender_1.isTenderExchangeLine && line.lineType === tender_1.TENDER_EXCHANGE_IN_LINE_TYPE) &&
@@ -93,6 +98,7 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
93
98
  ["transaction.accountingCurrency", this._accountingCurrency],
94
99
  ["transaction.isTenderExchangeTransaction", this.isTenderExchangeTransaction],
95
100
  ["transaction.isAccountPaymentTransaction", this.isAccountPaymentTransaction],
101
+ ["transaction.hasAccountLookupLines", this.hasAccountLookupLines],
96
102
  ["transaction.fiscalError", this._fiscalError],
97
103
  ]);
98
104
  }
@@ -19,8 +19,8 @@ class AttachmentLine extends BaseTransactionLine_1.BaseTransactionLine {
19
19
  static createFromJsonObject(transactionLineJsonObj) {
20
20
  const lineNumber = BaseTransactionLine_1.BaseTransactionLine.lineNumberFromJsonObject(transactionLineJsonObj);
21
21
  const lineType = BaseTransactionLine_1.BaseTransactionLine.lineTypeFromJsonObject(transactionLineJsonObj);
22
- const attachments = transactionLineJsonObj.attachments;
23
- const userComments = transactionLineJsonObj.userComments;
22
+ const attachments = transactionLineJsonObj._attachments;
23
+ const userComments = transactionLineJsonObj._userComments;
24
24
  const receiptAttachmentLine = new AttachmentLine(lineNumber, lineType, attachments, userComments);
25
25
  receiptAttachmentLine.loadFromJsonObject(transactionLineJsonObj);
26
26
  return receiptAttachmentLine;
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.4.0",
3
+ "version": "2.4.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",