@aptos-scp/scp-component-store-selling-features-domain-model 1.0.10 → 1.0.12

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.
Files changed (35) hide show
  1. package/lib/config/DiTypes.d.ts +0 -1
  2. package/lib/config/DiTypes.js +0 -1
  3. package/lib/config/inversify/index.d.ts +0 -1
  4. package/lib/config/inversify/index.js +0 -1
  5. package/lib/domain/index.d.ts +0 -1
  6. package/lib/domain/index.js +0 -1
  7. package/lib/domain/model/Constants.d.ts +5 -0
  8. package/lib/domain/model/Constants.js +5 -0
  9. package/lib/domain/model/IReceipt.d.ts +32 -0
  10. package/lib/domain/{service/IReceiptFormattingService.js → model/IReceipt.js} +1 -1
  11. package/lib/domain/model/StoreItem.js +1 -0
  12. package/lib/domain/model/index.d.ts +1 -0
  13. package/lib/domain/model/item/ItemLine.js +6 -2
  14. package/lib/domain/model/receipt/BaseReceiptLineDecorator.d.ts +1 -1
  15. package/lib/domain/model/receipt/FiscalReceiptLine.d.ts +1 -1
  16. package/lib/domain/model/receipt/ReceiptLine.d.ts +1 -1
  17. package/lib/domain/service/index.d.ts +0 -2
  18. package/lib/domain/utility/index.d.ts +0 -1
  19. package/lib/domain/utility/index.js +0 -1
  20. package/lib/domain/utility/utils.d.ts +1 -5
  21. package/lib/domain/utility/utils.js +0 -41
  22. package/package.json +28 -17
  23. package/lib/config/inversify/inversify.terminal.config/index.d.ts +0 -1
  24. package/lib/config/inversify/inversify.terminal.config/index.js +0 -7
  25. package/lib/config/inversify/inversify.terminal.config/transaction-services.config.d.ts +0 -11
  26. package/lib/config/inversify/inversify.terminal.config/transaction-services.config.js +0 -30
  27. package/lib/domain/processing/PosBusinessAction.d.ts +0 -9
  28. package/lib/domain/processing/PosBusinessAction.js +0 -55
  29. package/lib/domain/processing/index.d.ts +0 -1
  30. package/lib/domain/processing/index.js +0 -7
  31. package/lib/domain/service/IReceiptFormattingService.d.ts +0 -48
  32. package/lib/domain/service/ITransactionAccountingService.d.ts +0 -6
  33. package/lib/domain/service/ITransactionAccountingService.js +0 -3
  34. package/lib/domain/utility/supervisorOverride.d.ts +0 -9
  35. package/lib/domain/utility/supervisorOverride.js +0 -152
@@ -1,5 +1,4 @@
1
1
  export declare const DI_TYPES: {
2
- ITransactionAccountingService: any;
3
2
  ITransactionReferenceFormatter: any;
4
3
  };
5
4
  export default DI_TYPES;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const Symbol = require("es-symbol");
4
4
  exports.DI_TYPES = {
5
- ITransactionAccountingService: Symbol("ITransactionAccountingService"),
6
5
  ITransactionReferenceFormatter: Symbol("ITransactionReferenceFormatter"),
7
6
  };
8
7
  exports.default = exports.DI_TYPES;
@@ -1,3 +1,2 @@
1
1
  export * from "./binding-helpers";
2
2
  export * from "./inversify.app.config";
3
- export * from "./inversify.terminal.config";
@@ -5,5 +5,4 @@ function __export(m) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  __export(require("./binding-helpers"));
7
7
  __export(require("./inversify.app.config"));
8
- __export(require("./inversify.terminal.config"));
9
8
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,4 @@
1
1
  export * from "./UIBusinessEventTypes";
2
2
  export * from "./model/";
3
- export * from "./processing/";
4
3
  export * from "./service/";
5
4
  export * from "./utility/";
@@ -5,6 +5,5 @@ function __export(m) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  __export(require("./UIBusinessEventTypes"));
7
7
  __export(require("./model/"));
8
- __export(require("./processing/"));
9
8
  __export(require("./utility/"));
10
9
  //# sourceMappingURL=index.js.map
@@ -300,12 +300,17 @@ export declare enum UiInputKey {
300
300
  TRANSACTION_REFERENCE_NUMBER_FIELD = "input_referenceNumberField",
301
301
  CASH_DRAWER_KEY = "input_cashDrawerKey",
302
302
  CASH_DRAWER_RESET = "input_cashDrawerReset",
303
+ FIRST_NAME = "input_firstName",
304
+ LAST_NAME = "input_lastName",
305
+ POSTAL_CODE = "input_postalCode",
303
306
  ALTERNATE_KEY = "input_alternateKey",
307
+ ALTERNATE_KEY_2 = "input_alternateKey2",
304
308
  ALTERNATE_KEY_ADD = "input_alternateKeyAdd",
305
309
  ALTERNATE_KEY_SWAP = "input_alternateKeySwap",
306
310
  ALTERNATE_KEY_REMOVE = "input_alternateKeyRemove",
307
311
  EMAIL_OR_PHONE = "input_emailOrPhone",
308
312
  EMAIL_ADDRESS = "emailAddress",
313
+ ADDRESS_LINE_1 = "addressLine1",
309
314
  TILL_KEY = "input_tillKey",
310
315
  TILL_ACTUAL_AMOUNT = "input_tillActualAmount",
311
316
  TILL_TRANSFER_AMOUNT = "input_tillTransferAmount",
@@ -303,12 +303,17 @@ var UiInputKey;
303
303
  UiInputKey["TRANSACTION_REFERENCE_NUMBER_FIELD"] = "input_referenceNumberField";
304
304
  UiInputKey["CASH_DRAWER_KEY"] = "input_cashDrawerKey";
305
305
  UiInputKey["CASH_DRAWER_RESET"] = "input_cashDrawerReset";
306
+ UiInputKey["FIRST_NAME"] = "input_firstName";
307
+ UiInputKey["LAST_NAME"] = "input_lastName";
308
+ UiInputKey["POSTAL_CODE"] = "input_postalCode";
306
309
  UiInputKey["ALTERNATE_KEY"] = "input_alternateKey";
310
+ UiInputKey["ALTERNATE_KEY_2"] = "input_alternateKey2";
307
311
  UiInputKey["ALTERNATE_KEY_ADD"] = "input_alternateKeyAdd";
308
312
  UiInputKey["ALTERNATE_KEY_SWAP"] = "input_alternateKeySwap";
309
313
  UiInputKey["ALTERNATE_KEY_REMOVE"] = "input_alternateKeyRemove";
310
314
  UiInputKey["EMAIL_OR_PHONE"] = "input_emailOrPhone";
311
315
  UiInputKey["EMAIL_ADDRESS"] = "emailAddress";
316
+ UiInputKey["ADDRESS_LINE_1"] = "addressLine1";
312
317
  UiInputKey["TILL_KEY"] = "input_tillKey";
313
318
  UiInputKey["TILL_ACTUAL_AMOUNT"] = "input_tillActualAmount";
314
319
  UiInputKey["TILL_TRANSFER_AMOUNT"] = "input_tillTransferAmount";
@@ -0,0 +1,32 @@
1
+ import { Receipt as CoreReceipt } from "@aptos-scp/scp-component-store-selling-core";
2
+ import { ReceiptCategory } from "../../";
3
+ export interface AdditionalReprintInfo {
4
+ originalTransactionEndDateTime?: Date;
5
+ originalTransactionDeviceId: string;
6
+ originalTransactionNumber: number;
7
+ currentReceiptCategory: ReceiptCategory;
8
+ duplicateCopy: boolean;
9
+ taxInvoiceNumber?: string;
10
+ taxInvoicePrintDate?: Date;
11
+ invoiceTransactionNumber?: number;
12
+ invoiceFiscalTransactionNumber?: string;
13
+ }
14
+ export interface ReceiptTypeCount {
15
+ print: ReceiptCount;
16
+ email: ReceiptCount;
17
+ }
18
+ export interface ReceiptCount {
19
+ sale?: number;
20
+ invoice?: number;
21
+ vatReceipt?: number;
22
+ fullPageInvoice?: number;
23
+ japanRSS?: number;
24
+ postVoid?: number;
25
+ }
26
+ export interface Receipt extends CoreReceipt {
27
+ isTemplate?: boolean;
28
+ htmlDocument?: string;
29
+ }
30
+ export interface ReceiptTemplate extends Receipt {
31
+ receiptCategory: ReceiptCategory;
32
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IReceiptFormattingService.js.map
3
+ //# sourceMappingURL=IReceipt.js.map
@@ -246,6 +246,7 @@ class StoreItem {
246
246
  storeItem.itemGroupId = StoreItem.getStringFromJsonObject(storeItemJsonObj.itemGroupId);
247
247
  storeItem.itemType = scp_types_commerce_transaction_1.ItemType[StoreItem.getStringFromJsonObject(storeItemJsonObj.itemType)];
248
248
  storeItem.imageUrl = StoreItem.getStringFromJsonObject(storeItemJsonObj.imageUrl);
249
+ storeItem.name = StoreItem.getStringFromJsonObject(storeItemJsonObj.name);
249
250
  storeItem.shortDescription = StoreItem.getStringFromJsonObject(storeItemJsonObj.shortDescription);
250
251
  storeItem.additionalDescription = StoreItem.getStringFromJsonObject(storeItemJsonObj.additionalDescription);
251
252
  storeItem.longDescription = StoreItem.getStringFromJsonObject(storeItemJsonObj.longDescription);
@@ -105,3 +105,4 @@ export * from "./taxRecord/";
105
105
  export * from "./taxLottery/";
106
106
  export * from "./lottery/";
107
107
  export * from "./ITransactionMetadataPersistanceObject";
108
+ export * from "./IReceipt";
@@ -10,6 +10,7 @@ const Employee_1 = require("../Employee");
10
10
  const StoreItem_1 = require("../StoreItem");
11
11
  const TenderType_1 = require("../TenderType");
12
12
  const FeeLine_1 = require("../../model/fee/FeeLine");
13
+ const UIBusinessEventTypes_1 = require("../../UIBusinessEventTypes");
13
14
  exports.ITEM_SALE_LINE_TYPE = "ItemSale";
14
15
  exports.ITEM_RETURN_LINE_TYPE = "ItemReturn";
15
16
  exports.ITEM_ORDER_LINE_TYPE = "ItemOrder";
@@ -206,8 +207,11 @@ class ItemLine extends BaseTransactionLine_1.BaseTransactionLine {
206
207
  itemLine._originalPriceOverride = originalPriceOverride;
207
208
  }
208
209
  }
209
- if (lineType === exports.ITEM_SALE_LINE_TYPE && collectedData.get(Constants_1.CollectedDataKey.OriginalDiscountReason)) {
210
- itemLine._originalDiscountReason = collectedData.get(Constants_1.CollectedDataKey.OriginalDiscountReason);
210
+ if (lineType === exports.ITEM_SALE_LINE_TYPE && uiBusinessEvent.type === UIBusinessEventTypes_1.ORDER_ITEM_PICKUP_EVENT) {
211
+ const originalDiscountReason = collectedData.get(Constants_1.CollectedDataKey.OriginalDiscountReason);
212
+ if (originalDiscountReason) {
213
+ itemLine._originalDiscountReason = originalDiscountReason;
214
+ }
211
215
  }
212
216
  const originalRedemptionLoyaltyTransactionKeys = collectedData.get(Constants_1.CollectedDataKey.OriginalRedemptionLoyaltyTransactionKeys);
213
217
  if (((_f = originalRedemptionLoyaltyTransactionKeys) === null || _f === void 0 ? void 0 : _f.length) > 0) {
@@ -1,11 +1,11 @@
1
1
  import { IMoney } from "@aptos-scp/scp-component-business-core";
2
2
  import { ITransactionLineReferenceType } from "@aptos-scp/scp-types-commerce-transaction";
3
3
  import { BaseLineDecorator } from "../../model/BaseLineDecorator";
4
- import { Receipt } from "../../service";
5
4
  import { ReceiptStatus, ReceiptType } from "../Constants";
6
5
  import { ReceiptCategory } from "../ReceiptSession";
7
6
  import { IReceiptLine } from "./IReceiptLine";
8
7
  import { ReceiptLine } from "./ReceiptLine";
8
+ import { Receipt } from "../IReceipt";
9
9
  /**
10
10
  * This class acts as the base class for all ReceiptLine decorators. It implements all methods on ReceiptLine, and
11
11
  * passes them through to the decorated ReceiptLine, which might be the original ReceiptLine, or another decorator.
@@ -1,6 +1,6 @@
1
1
  import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
2
2
  import { ITransactionLineReferenceType } from "@aptos-scp/scp-types-commerce-transaction";
3
- import { Receipt } from "../../service";
3
+ import { Receipt } from "../IReceipt";
4
4
  import { BaseTransactionLine } from "../BaseTransactionLine";
5
5
  import { ReceiptStatus, ReceiptType } from "../Constants";
6
6
  import { ReceiptCategory } from "../ReceiptSession";
@@ -1,7 +1,7 @@
1
1
  import { Money } from "@aptos-scp/scp-component-business-core";
2
2
  import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
3
3
  import { BarcodeFormats, ITransactionLineReferenceType, FooterScanCode } from "@aptos-scp/scp-types-commerce-transaction";
4
- import { Receipt } from "../../service";
4
+ import { Receipt } from "../IReceipt";
5
5
  import { BaseTransactionLine } from "../BaseTransactionLine";
6
6
  import { ReceiptStatus, ReceiptType } from "../Constants";
7
7
  import { ReceiptCategory } from "../ReceiptSession";
@@ -1,3 +1 @@
1
- export * from "./IReceiptFormattingService";
2
- export * from "./ITransactionAccountingService";
3
1
  export * from "./ITransactionReferenceFormatter";
@@ -1,3 +1,2 @@
1
1
  export * from "./utils";
2
2
  export * from "./orderUtils";
3
- export * from "./supervisorOverride";
@@ -5,5 +5,4 @@ function __export(m) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  __export(require("./utils"));
7
7
  __export(require("./orderUtils"));
8
- __export(require("./supervisorOverride"));
9
8
  //# sourceMappingURL=index.js.map
@@ -1,12 +1,8 @@
1
- import { IConfigurationManager, ITransaction, PosError } from "@aptos-scp/scp-component-store-selling-core";
1
+ import { ITransaction, PosError } from "@aptos-scp/scp-component-store-selling-core";
2
2
  import { IServiceResult, MerchandiseTransactionTradeType } from "@aptos-scp/scp-types-commerce-transaction";
3
- import { CountryAddressFormat } from "../model";
4
- export declare function getAddressFormatorDefault(configurationManager: IConfigurationManager, countryCode: string, i18nLocation: string): CountryAddressFormat;
5
3
  export declare function getLocaleCodeForTranslationSet<T>(translationSet: {
6
4
  [key: string]: T;
7
5
  }, locale: string): string;
8
6
  export declare const getTradeType: (transaction: ITransaction) => MerchandiseTransactionTradeType;
9
7
  export declare const isTimeOutError: (error: PosError) => boolean;
10
8
  export declare const getServiceResult: (isSuccess: boolean, error?: Error, statusCode?: number) => IServiceResult;
11
- export declare function mapStartTillEventTypeToLineType(): Map<string, string>;
12
- export declare function mapEventTypeToTransferType(): Map<string, string>;
@@ -4,22 +4,6 @@ const i18n = require("i18n-js");
4
4
  const scp_component_store_selling_core_1 = require("@aptos-scp/scp-component-store-selling-core");
5
5
  const scp_types_commerce_transaction_1 = require("@aptos-scp/scp-types-commerce-transaction");
6
6
  const model_1 = require("../model");
7
- const UIBusinessEventTypes_1 = require("../UIBusinessEventTypes");
8
- function getAddressFormatorDefault(configurationManager, countryCode, i18nLocation) {
9
- const addressFormats = configurationManager.getI18nAddressFormats();
10
- const defaultCountryCode = countryCode || i18nLocation;
11
- let formatConfig;
12
- const formatKeys = Object.keys(addressFormats);
13
- formatKeys.forEach((key) => {
14
- const addressFormat = addressFormats[key];
15
- if (key === defaultCountryCode || addressFormat.countryCode === defaultCountryCode) {
16
- formatConfig = Object.assign({}, addressFormat, { country: key });
17
- return;
18
- }
19
- });
20
- return formatConfig;
21
- }
22
- exports.getAddressFormatorDefault = getAddressFormatorDefault;
23
7
  function getLocaleCodeForTranslationSet(translationSet, locale) {
24
8
  if (!locale) {
25
9
  return;
@@ -101,29 +85,4 @@ exports.getServiceResult = (isSuccess, error, statusCode) => {
101
85
  };
102
86
  }
103
87
  };
104
- function mapStartTillEventTypeToLineType() {
105
- return new Map([
106
- [UIBusinessEventTypes_1.START_TILL_AUDIT_EVENT, model_1.START_TILL_AUDIT_LINE_TYPE],
107
- [UIBusinessEventTypes_1.START_TILL_COUNT_EVENT, model_1.START_TILL_COUNT_LINE_TYPE],
108
- [UIBusinessEventTypes_1.START_TILL_IN_EVENT, model_1.START_TILL_IN_LINE_TYPE],
109
- [UIBusinessEventTypes_1.START_TILL_OUT_EVENT, model_1.START_TILL_OUT_LINE_TYPE],
110
- [UIBusinessEventTypes_1.START_TILL_TO_BANK_EVENT, model_1.START_TILL_TO_BANK_LINE_TYPE],
111
- [UIBusinessEventTypes_1.START_TILL_RECONCILIATION_EVENT, model_1.START_TILL_RECONCILIATION_LINE_TYPE],
112
- [UIBusinessEventTypes_1.START_SAFE_TO_TILL_EVENT, model_1.START_SAFE_TO_TILL_LINE_TYPE],
113
- [UIBusinessEventTypes_1.START_TILL_TO_SAFE_EVENT, model_1.START_TILL_TO_SAFE_LINE_TYPE],
114
- [UIBusinessEventTypes_1.START_OPEN_CASH_DRAWER_EVENT, model_1.START_OPEN_CASH_DRAWER_LINE_TYPE],
115
- [UIBusinessEventTypes_1.START_OPEN_TENDER_EXCHANGE_CASH_DRAWER_EVENT, model_1.START_OPEN_CASH_DRAWER_LINE_TYPE],
116
- ]);
117
- }
118
- exports.mapStartTillEventTypeToLineType = mapStartTillEventTypeToLineType;
119
- function mapEventTypeToTransferType() {
120
- return new Map([
121
- [UIBusinessEventTypes_1.TILL_IN_EVENT, model_1.SAFE_TO_TILL_TRANSFER_LINE_TYPE],
122
- [UIBusinessEventTypes_1.TILL_OUT_EVENT, model_1.TILL_TO_SAFE_TRANSFER_LINE_TYPE],
123
- [UIBusinessEventTypes_1.TILL_TO_BANK_EVENT, model_1.TILL_TO_BANK_TRANSFER_LINE_TYPE],
124
- [UIBusinessEventTypes_1.SAFE_TO_TILL_EVENT, model_1.SAFE_TO_TILL_TRANSFER_LINE_TYPE],
125
- [UIBusinessEventTypes_1.TILL_TO_SAFE_EVENT, model_1.TILL_TO_SAFE_TRANSFER_LINE_TYPE],
126
- ]);
127
- }
128
- exports.mapEventTypeToTransferType = mapEventTypeToTransferType;
129
88
  //# sourceMappingURL=utils.js.map
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.0.10",
3
+ "version": "1.0.12",
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",
@@ -39,17 +39,6 @@
39
39
  "prettier:format": "prettier --write ."
40
40
  },
41
41
  "dependencies": {
42
- "@aptos-scp/scp-component-pricing": "^7.53.1",
43
- "@aptos-scp/scp-component-store-items": "^1.19.0",
44
- "@aptos-scp/scp-component-taxation": "^5.23.4",
45
- "@aptos-scp/scp-component-user": "^1.4.0",
46
- "@aptos-scp/scp-types-client-registration": "^1.4.0",
47
- "@aptos-scp/scp-types-customer": "^3.7.0",
48
- "@aptos-scp/scp-types-einvoice": "^1.17.0",
49
- "@aptos-scp/scp-types-inventory": "^2.0.0",
50
- "@aptos-scp/scp-types-loyalty-memberships": "^2.3.0",
51
- "@aptos-scp/scp-types-orders": "^4.11.0",
52
- "@aptos-scp/scp-types-ss-transaction-history": "^1.0.5",
53
42
  "big.js": "^6.1.1",
54
43
  "crc-32": "^1.2.0",
55
44
  "fast-json-patch": "^3.0.0-1",
@@ -65,10 +54,21 @@
65
54
  "peerDependencies": {
66
55
  "@aptos-scp/scp-component-business-core": "^1.12.2",
67
56
  "@aptos-scp/scp-component-logging": "^2.1.16",
57
+ "@aptos-scp/scp-component-pricing": "^7.54.1",
58
+ "@aptos-scp/scp-component-store-items": "^1.19.0",
68
59
  "@aptos-scp/scp-component-store-selling-core": "^18.8.2",
60
+ "@aptos-scp/scp-component-taxation": "^5.25.0",
61
+ "@aptos-scp/scp-component-user": "^1.4.0",
62
+ "@aptos-scp/scp-types-client-registration": "^1.4.0",
69
63
  "@aptos-scp/scp-types-core-config": "^2.2.1",
70
- "@aptos-scp/scp-types-commerce-devices": "^3.1.0",
71
- "@aptos-scp/scp-types-commerce-transaction": "^1.57.2",
64
+ "@aptos-scp/scp-types-commerce-devices": "^3.2.0",
65
+ "@aptos-scp/scp-types-commerce-transaction": "^1.60.0",
66
+ "@aptos-scp/scp-types-customer": "^3.7.0",
67
+ "@aptos-scp/scp-types-einvoice": "^1.17.0",
68
+ "@aptos-scp/scp-types-inventory": "^2.0.0",
69
+ "@aptos-scp/scp-types-loyalty-memberships": "^2.3.0",
70
+ "@aptos-scp/scp-types-orders": "^4.11.0",
71
+ "@aptos-scp/scp-types-ss-transaction-history": "^1.6.0",
72
72
  "inversify": "^5.0.1"
73
73
  },
74
74
  "devDependencies": {
@@ -76,15 +76,26 @@
76
76
  "@aptos-scp/scp-component-business-core": "^1.12.2",
77
77
  "@aptos-scp/scp-component-commit-configs": "^4.1.3",
78
78
  "@aptos-scp/scp-component-logging": "^2.1.16",
79
+ "@aptos-scp/scp-component-pricing": "^7.54.1",
79
80
  "@aptos-scp/scp-component-rn-circuit-breaker": "^1.0.15",
81
+ "@aptos-scp/scp-component-store-items": "^1.19.0",
80
82
  "@aptos-scp/scp-component-store-selling-core": "^18.8.2",
81
- "@aptos-scp/scp-types-commerce-devices": "^3.1.0",
82
- "@aptos-scp/scp-types-commerce-transaction": "^1.57.2",
83
+ "@aptos-scp/scp-component-taxation": "^5.25.0",
84
+ "@aptos-scp/scp-component-user": "^1.4.0",
85
+ "@aptos-scp/scp-types-client-registration": "^1.4.0",
86
+ "@aptos-scp/scp-types-commerce-devices": "^3.2.0",
87
+ "@aptos-scp/scp-types-commerce-transaction": "^1.60.0",
83
88
  "@aptos-scp/scp-types-core": "^1.0.5",
84
89
  "@aptos-scp/scp-types-core-config": "^2.2.1",
85
90
  "@aptos-scp/scp-types-currency-conversion": "^1.2.0",
86
- "@aptos-scp/scp-types-fiscal-transaction": "^1.4.0",
91
+ "@aptos-scp/scp-types-customer": "^3.7.0",
92
+ "@aptos-scp/scp-types-einvoice": "^1.17.0",
93
+ "@aptos-scp/scp-types-fiscal-transaction": "^1.4.3",
94
+ "@aptos-scp/scp-types-inventory": "^2.0.0",
95
+ "@aptos-scp/scp-types-loyalty-memberships": "^2.3.0",
96
+ "@aptos-scp/scp-types-orders": "^4.11.0",
87
97
  "@aptos-scp/scp-types-pricing": "^4.23.0",
98
+ "@aptos-scp/scp-types-ss-transaction-history": "^1.6.0",
88
99
  "@aptos-scp/scp-types-store-items": "^1.23.0",
89
100
  "@aptos-scp/scp-types-terminal-settings": "^1.3.0",
90
101
  "@aptos-scp/scp-types-transaction": "^1.4.3",
@@ -1 +0,0 @@
1
- export * from "./transaction-services.config";
@@ -1,7 +0,0 @@
1
- "use strict";
2
- function __export(m) {
3
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
- }
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- __export(require("./transaction-services.config"));
7
- //# sourceMappingURL=index.js.map
@@ -1,11 +0,0 @@
1
- import { Container, ContainerModule } from "inversify";
2
- import { BindToCallback } from "../binding-helpers";
3
- import { ITransactionAccountingService } from "../../../domain";
4
- /**
5
- * Only call this from the composition root when the DI container bindings are being constructed
6
- */
7
- export declare function loadTransactionServicesDomain(container: Container, external: ITransactionServicesDomainExternalBindings): Promise<void>;
8
- export interface ITransactionServicesDomainExternalBindings {
9
- ITransactionAccountingService: BindToCallback<ITransactionAccountingService>;
10
- }
11
- export declare function createTransactionServicesDomainContainerModule(external: ITransactionServicesDomainExternalBindings): ContainerModule;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const inversify_1 = require("inversify");
13
- const binding_helpers_1 = require("../binding-helpers");
14
- const DiTypes_1 = require("../../DiTypes");
15
- /**
16
- * Only call this from the composition root when the DI container bindings are being constructed
17
- */
18
- function loadTransactionServicesDomain(container, external) {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- container.load(createTransactionServicesDomainContainerModule(external));
21
- });
22
- }
23
- exports.loadTransactionServicesDomain = loadTransactionServicesDomain;
24
- function createTransactionServicesDomainContainerModule(external) {
25
- return new inversify_1.ContainerModule((bind) => {
26
- binding_helpers_1.bindExternal(bind, DiTypes_1.DI_TYPES.ITransactionAccountingService, external.ITransactionAccountingService);
27
- });
28
- }
29
- exports.createTransactionServicesDomainContainerModule = createTransactionServicesDomainContainerModule;
30
- //# sourceMappingURL=transaction-services.config.js.map
@@ -1,9 +0,0 @@
1
- import { Container } from "inversify";
2
- import { IActionContext, IDomainNotificationService, ITransaction, ITransactionLineFactory, ITransactionNumberProvider, PosBusinessAction as CorePosBusinessAction } from "@aptos-scp/scp-component-store-selling-core";
3
- import { ITransactionAccountingService } from "../service";
4
- export declare class PosBusinessAction extends CorePosBusinessAction {
5
- private _transactionAccountingService;
6
- constructor(transactionNumberProvider: ITransactionNumberProvider, transactionAccountingService: ITransactionAccountingService, transactionLineFactory: ITransactionLineFactory, domainNotificationService: IDomainNotificationService, diContainer: Container);
7
- protected updateTransactionAccounting(context: IActionContext): Promise<ITransaction>;
8
- protected transactionShouldClose(transaction: ITransaction): boolean;
9
- }
@@ -1,55 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- const inversify_1 = require("inversify");
25
- const scp_component_store_selling_core_1 = require("@aptos-scp/scp-component-store-selling-core");
26
- const DiTypes_1 = require("../../config/DiTypes");
27
- const model_1 = require("../model");
28
- let PosBusinessAction = class PosBusinessAction extends scp_component_store_selling_core_1.PosBusinessAction {
29
- constructor(transactionNumberProvider, transactionAccountingService, transactionLineFactory, domainNotificationService, diContainer) {
30
- super(transactionNumberProvider, transactionLineFactory, domainNotificationService, diContainer);
31
- this._transactionAccountingService = transactionAccountingService;
32
- }
33
- updateTransactionAccounting(context) {
34
- var _a;
35
- return __awaiter(this, void 0, void 0, function* () {
36
- const transactionFlowStateObject = context.getState(model_1.TRANSACTION_FLOW_STATE);
37
- const transactionFlowState = (_a = transactionFlowStateObject) === null || _a === void 0 ? void 0 : _a.state;
38
- return this._transactionAccountingService.updateTransaction(context.transaction, transactionFlowState);
39
- });
40
- }
41
- transactionShouldClose(transaction) {
42
- return this._transactionAccountingService.transactionShouldClose(transaction);
43
- }
44
- };
45
- PosBusinessAction = __decorate([
46
- inversify_1.injectable(),
47
- __param(0, inversify_1.inject(scp_component_store_selling_core_1.DI_TYPES.ITransactionNumberProvider)),
48
- __param(1, inversify_1.inject(DiTypes_1.DI_TYPES.ITransactionAccountingService)),
49
- __param(2, inversify_1.inject(scp_component_store_selling_core_1.DI_TYPES.ITransactionFactory)),
50
- __param(3, inversify_1.inject(scp_component_store_selling_core_1.DI_TYPES.IDomainNotificationService)),
51
- __param(4, inversify_1.inject(scp_component_store_selling_core_1.DI_TYPES.DependencyInjectionContainer)),
52
- __metadata("design:paramtypes", [Object, Object, Object, Object, inversify_1.Container])
53
- ], PosBusinessAction);
54
- exports.PosBusinessAction = PosBusinessAction;
55
- //# sourceMappingURL=PosBusinessAction.js.map
@@ -1 +0,0 @@
1
- export * from "./PosBusinessAction";
@@ -1,7 +0,0 @@
1
- "use strict";
2
- function __export(m) {
3
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
- }
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- __export(require("./PosBusinessAction"));
7
- //# sourceMappingURL=index.js.map
@@ -1,48 +0,0 @@
1
- import { DeviceIdentity, IReceiptFormattingService as ICoreReceiptFormattingService, ITransaction, Receipt as CoreReceipt } from "@aptos-scp/scp-component-store-selling-core";
2
- import { IPrinterInfo, IReceiptRequiredData, ItemLine, ReceiptCategory } from "../../";
3
- export interface IReceiptFormattingService extends ICoreReceiptFormattingService {
4
- formatBalanceInquiryReceipt(transaction: ITransaction, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
5
- formatReceiptByCategory(transaction: ITransaction, locale: string, receiptCategory: ReceiptCategory, lineNumbers?: number[], printer?: IPrinterInfo, receiptRequiredData?: IReceiptRequiredData[]): Promise<Receipt>;
6
- formatReprintReceipt(lines: string[], deviceIdentity: DeviceIdentity, locale?: string, originalReceiptCategory?: ReceiptCategory, printer?: IPrinterInfo): Promise<Receipt>;
7
- formatGiftReceipt(transaction: ITransaction, giftitems: Array<ItemLine>, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
8
- formatCouponReceipt(transaction: ITransaction, locale: string, receiptRequiredData: IReceiptRequiredData[], printer?: IPrinterInfo): Promise<Receipt>;
9
- formatPostVoidReceipts(transaction: ITransaction, locale?: string, printer?: IPrinterInfo): Promise<Receipt[]>;
10
- formatReceiptTemplate(transaction: ITransaction, locale?: string, printer?: IPrinterInfo, selectedReceiptCategory?: string): Promise<ReceiptTemplate[]>;
11
- formatReceiptTemplateValue(transaction: ITransaction, lines: string[], locale?: string, additionalInfo?: AdditionalReprintInfo, printer?: IPrinterInfo, reprintCount?: number): Promise<Receipt>;
12
- formatTillReceipt(transaction: ITransaction, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
13
- formatNoSaleReceipt(transaction: ITransaction, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
14
- formatPaidOperationReceipt(transaction: ITransaction, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
15
- removeReceiptTemplateValue(receiptLines: string[]): string[];
16
- formatPostVoidReceiptTemplate(transaction: ITransaction, locale?: string, printer?: IPrinterInfo): Promise<ReceiptTemplate[]>;
17
- formatSendSaleReceipt(transaction: ITransaction, sendsaleitems: Array<ItemLine>, locale: string, printer?: IPrinterInfo): Promise<Receipt>;
18
- }
19
- export interface AdditionalReprintInfo {
20
- originalTransactionEndDateTime?: Date;
21
- originalTransactionDeviceId: string;
22
- originalTransactionNumber: number;
23
- currentReceiptCategory: ReceiptCategory;
24
- duplicateCopy: boolean;
25
- taxInvoiceNumber?: string;
26
- taxInvoicePrintDate?: Date;
27
- invoiceTransactionNumber?: number;
28
- invoiceFiscalTransactionNumber?: string;
29
- }
30
- export interface ReceiptTypeCount {
31
- print: ReceiptCount;
32
- email: ReceiptCount;
33
- }
34
- export interface ReceiptCount {
35
- sale?: number;
36
- invoice?: number;
37
- vatReceipt?: number;
38
- fullPageInvoice?: number;
39
- japanRSS?: number;
40
- postVoid?: number;
41
- }
42
- export interface Receipt extends CoreReceipt {
43
- isTemplate?: boolean;
44
- htmlDocument?: string;
45
- }
46
- export interface ReceiptTemplate extends Receipt {
47
- receiptCategory: ReceiptCategory;
48
- }
@@ -1,6 +0,0 @@
1
- import { ITransaction } from "@aptos-scp/scp-component-store-selling-core";
2
- import { TransactionFlowSessionState } from "../model";
3
- export interface ITransactionAccountingService {
4
- updateTransaction(transaction: ITransaction, transactionFlowState?: TransactionFlowSessionState): Promise<ITransaction>;
5
- transactionShouldClose(transaction: ITransaction): boolean;
6
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ITransactionAccountingService.js.map
@@ -1,9 +0,0 @@
1
- import { Container } from "inversify";
2
- import { ITransaction, IUser, QualificationResult } from "@aptos-scp/scp-component-store-selling-core";
3
- import { IAccessPolicyConfig, ISupervisorCredentials } from "../model";
4
- export declare function eventToConfigKeyMap(): Map<string, string>;
5
- export declare function getEventConfigs(diContainer: Container, eventType: string): IAccessPolicyConfig;
6
- export declare function isUserValid(user: IUser): boolean;
7
- export declare function checkUserSecurityLevel(user: IUser, requiredSecurityLevel: number): boolean;
8
- export declare function skipSecurityCheck(transaction: ITransaction, eventType: string, supervisor: ISupervisorCredentials, qualificationResult: QualificationResult): boolean;
9
- export declare function convertDateTimeToDateOnly(date: Date): Date;
@@ -1,152 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const scp_component_store_selling_core_1 = require("@aptos-scp/scp-component-store-selling-core");
4
- const model_1 = require("../model");
5
- const UIBusinessEventTypes_1 = require("../UIBusinessEventTypes");
6
- function eventToConfigKeyMap() {
7
- return new Map([
8
- [UIBusinessEventTypes_1.VOID_ITEM_LINE_EVENT, "itemVoid"],
9
- [UIBusinessEventTypes_1.VOID_TRANSACTION_EVENT, "transactionVoid"],
10
- [UIBusinessEventTypes_1.MANUAL_ITEM_DISCOUNT_EVENT, "itemDiscounts"],
11
- [UIBusinessEventTypes_1.MANUAL_TRANSACTION_DISCOUNT_EVENT, "transactionDiscounts"],
12
- [UIBusinessEventTypes_1.FAST_DISCOUNT_EVENT, "fastDiscount"],
13
- [UIBusinessEventTypes_1.APPLY_DISCOUNT_EVENT, "applyDiscount"],
14
- [UIBusinessEventTypes_1.PRICE_CHANGE_EVENT, "priceOverride"],
15
- [UIBusinessEventTypes_1.APPLY_EMPLOYEE_DISCOUNT_EVENT, "associateDiscounts"],
16
- [UIBusinessEventTypes_1.APPLY_EMPLOYEE_TRANSACTION_DISCOUNT_EVENT, "associateDiscounts"],
17
- [UIBusinessEventTypes_1.ADD_EMPLOYEE_CUSTOMER_EVENT, "addEmployeeCustomer"],
18
- [UIBusinessEventTypes_1.MODIFY_EMPLOYEE_MANUAL_DISCOUNT_EVENT, "associateDiscounts"],
19
- [UIBusinessEventTypes_1.MODIFY_ITEM_MANUAL_DISCOUNT_EVENT, "itemDiscounts"],
20
- [UIBusinessEventTypes_1.MODIFY_TRANSACTION_MANUAL_DISCOUNT_EVENT, "transactionDiscounts"],
21
- [UIBusinessEventTypes_1.POST_VOID_TRANSACTION_EVENT, "postVoid"],
22
- [UIBusinessEventTypes_1.POST_VOID_RESTORED_TRANSACTION_EVENT, "postVoid"],
23
- [UIBusinessEventTypes_1.CLOSE_TERMINAL_EVENT, "openCloseTerminal"],
24
- [UIBusinessEventTypes_1.OPEN_TERMINAL_EVENT, "openCloseTerminal"],
25
- [UIBusinessEventTypes_1.RETURN_TOTAL_EVENT, "returnItemsWithoutReceipt"],
26
- [UIBusinessEventTypes_1.EXIT_RETURN_MODE_EVENT, "returnItemsWithoutReceipt"],
27
- [UIBusinessEventTypes_1.QUANTITY_CHANGE_EVENT, "changeQuantity"],
28
- [UIBusinessEventTypes_1.APPLY_SINGLE_USE_COUPON_EVENT, "expiredValidatedCoupons"],
29
- [UIBusinessEventTypes_1.LOG_ON_EVENT, "login"],
30
- [UIBusinessEventTypes_1.ENTER_ATTENDANT_MODE_EVENT, "login"],
31
- [UIBusinessEventTypes_1.TRANSACTION_TAX_EXEMPT_EVENT, "transactionTaxExempt"],
32
- [UIBusinessEventTypes_1.ITEM_TAX_EXEMPT_EVENT, "itemTaxExempt"],
33
- [UIBusinessEventTypes_1.START_TILL_OUT_EVENT, "tillOut"],
34
- [UIBusinessEventTypes_1.START_TILL_IN_EVENT, "tillIn"],
35
- [UIBusinessEventTypes_1.START_NO_SALE_EVENT, "noSale"],
36
- [UIBusinessEventTypes_1.START_PAID_OUT_EVENT, "paidOut"],
37
- [UIBusinessEventTypes_1.START_PAID_IN_EVENT, "paidIn"],
38
- [UIBusinessEventTypes_1.START_TILL_AUDIT_EVENT, "tillAudit"],
39
- [UIBusinessEventTypes_1.START_TILL_COUNT_EVENT, "tillCount"],
40
- [UIBusinessEventTypes_1.START_TILL_TO_BANK_EVENT, "tillToBank"],
41
- [UIBusinessEventTypes_1.START_SAFE_TO_TILL_EVENT, "safeToTill"],
42
- [UIBusinessEventTypes_1.START_TILL_TO_SAFE_EVENT, "tillToSafe"],
43
- [UIBusinessEventTypes_1.APPLY_RETURN_WITH_TRANSACTION_EVENT, "returnWithTransaction"],
44
- [UIBusinessEventTypes_1.START_TILL_RECONCILIATION_EVENT, "tillReconciliation"],
45
- [UIBusinessEventTypes_1.TRANSACTION_TAX_OVERRIDE_EVENT, "transactionTaxOverride"],
46
- [UIBusinessEventTypes_1.ITEM_TAX_OVERRIDE_EVENT, "itemTaxOverride"],
47
- [UIBusinessEventTypes_1.TENDER_EXCHANGE_EVENT, "tenderExchange"],
48
- [UIBusinessEventTypes_1.START_EXCHANGE_RATE_ENTRY_EVENT, "exchangeRateEntry"],
49
- [UIBusinessEventTypes_1.UPLOAD_DEVICE_LOGS_EVENT, "uploadPaymentLogs"],
50
- [UIBusinessEventTypes_1.BYPASS_REFUNDED_TAX_FREE_WARNING_EVENT, "bypassRefundedTaxFreeWarning"],
51
- [UIBusinessEventTypes_1.REPRINT_LAST_TRANSACTION_RECEIPTS_EVENT, "reprintReceipt"],
52
- [UIBusinessEventTypes_1.REPRINT_TRANSACTION_RECEIPTS_EVENT, "reprintReceipt"],
53
- [UIBusinessEventTypes_1.REPLACE_FISCAL_DEVICE_EVENT, "swapFiscalDevice"],
54
- [UIBusinessEventTypes_1.REPLACE_FISCAL_DEVICE_HOST_EVENT, "swapFiscalDeviceHost"],
55
- [UIBusinessEventTypes_1.SETUP_FISCAL_DEVICE_EVENT, "setUpFiscalDevice"],
56
- ]);
57
- }
58
- exports.eventToConfigKeyMap = eventToConfigKeyMap;
59
- function getEventConfigs(diContainer, eventType) {
60
- const configKey = eventToConfigKeyMap().get(eventType);
61
- return diContainer
62
- .get(scp_component_store_selling_core_1.DI_TYPES.IConfigurationManager)
63
- .getFunctionalBehaviorValues().securityPolicies.accessPolicies[configKey];
64
- }
65
- exports.getEventConfigs = getEventConfigs;
66
- function isUserValid(user) {
67
- if (!user) {
68
- return false;
69
- }
70
- let mergedUser = mergeGlobalUserAndLocationUser(user);
71
- return !!(mergedUser && isMergedUserValid(mergedUser));
72
- }
73
- exports.isUserValid = isUserValid;
74
- function checkUserSecurityLevel(user, requiredSecurityLevel) {
75
- if (!user) {
76
- return false;
77
- }
78
- let mergedUser = mergeGlobalUserAndLocationUser(user);
79
- return !!(mergedUser &&
80
- isMergedUserValid(mergedUser) &&
81
- mergedUser.securityRole &&
82
- parseInt(mergedUser.securityRole.securityLevel, 10) >= requiredSecurityLevel);
83
- }
84
- exports.checkUserSecurityLevel = checkUserSecurityLevel;
85
- function skipSecurityCheck(transaction, eventType, supervisor, qualificationResult) {
86
- /**
87
- * Security check can be skip when the transaction is resuming for either a transaction resume or transaction
88
- * post void
89
- * Don't skip security requirements when a supervisor is provided for POST_VOID_RESTORED_TRANSACTION_EVENT
90
- */
91
- const transactionResumeOrPostVoid = transaction &&
92
- transaction.isResuming() &&
93
- !(supervisor && eventType === UIBusinessEventTypes_1.POST_VOID_RESTORED_TRANSACTION_EVENT);
94
- /**
95
- * The security check was disabled by a previous qualifier
96
- */
97
- const directlyDisabled = qualificationResult.collectedData.get(model_1.CollectedDataKey.DisableSupervisorOverride);
98
- return transactionResumeOrPostVoid || directlyDisabled;
99
- }
100
- exports.skipSecurityCheck = skipSecurityCheck;
101
- function convertDateTimeToDateOnly(date) {
102
- return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()));
103
- }
104
- exports.convertDateTimeToDateOnly = convertDateTimeToDateOnly;
105
- function mergeGlobalUserAndLocationUser(user) {
106
- var _a, _b, _c, _d;
107
- return {
108
- id: user.id,
109
- username: user.username,
110
- displayName: user.displayName,
111
- firstName: user.firstName,
112
- lastName: user.lastName,
113
- middleName: user.middleName,
114
- preferredLanguage: user.preferredLanguage,
115
- securityRole: ((_a = user.retailLocationRole) === null || _a === void 0 ? void 0 : _a.securityRole) ? user.retailLocationRole.securityRole
116
- : user.securityRole,
117
- accountStatus: ((_b = user.retailLocationRole) === null || _b === void 0 ? void 0 : _b.assignmentStatus) ? convertAssignmentStatusToAccountStatus(user.retailLocationRole.assignmentStatus)
118
- : user.accountStatus,
119
- effectiveDate: ((_c = user.retailLocationRole) === null || _c === void 0 ? void 0 : _c.effectiveDate) ? user.retailLocationRole.effectiveDate
120
- : user.effectiveDate,
121
- expirationDate: ((_d = user.retailLocationRole) === null || _d === void 0 ? void 0 : _d.expirationDate) ? user.retailLocationRole.expirationDate
122
- : user.expirationDate,
123
- };
124
- }
125
- function convertAssignmentStatusToAccountStatus(assignmentStatus) {
126
- switch (assignmentStatus) {
127
- case "Active":
128
- case "Inactive":
129
- case "Deleted":
130
- case "Locked":
131
- return assignmentStatus;
132
- default:
133
- return undefined;
134
- }
135
- }
136
- function isMergedUserValid(user) {
137
- const accountStatus = user.accountStatus;
138
- if (!accountStatus || accountStatus !== "Active") {
139
- return false;
140
- }
141
- const nowAsUTC = convertDateTimeToDateOnly(new Date());
142
- const expirationDate = user.expirationDate && convertDateTimeToDateOnly(new Date(user.expirationDate));
143
- if (expirationDate && expirationDate < nowAsUTC) {
144
- return false;
145
- }
146
- const effectiveDate = user.effectiveDate && convertDateTimeToDateOnly(new Date(user.effectiveDate));
147
- if (effectiveDate && effectiveDate > nowAsUTC) {
148
- return false;
149
- }
150
- return true;
151
- }
152
- //# sourceMappingURL=supervisorOverride.js.map