@zeniai/client-epic-state 4.13.5 → 4.13.9

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 (90) hide show
  1. package/lib/entity/account/accountPayload.d.ts +1 -1
  2. package/lib/entity/chargeCard/chargeCard.d.ts +16 -2
  3. package/lib/entity/chargeCard/chargeCard.js +18 -1
  4. package/lib/entity/chargeCard/chargeCardPayload.d.ts +14 -5
  5. package/lib/entity/chargeCard/chargeCardPayload.js +24 -7
  6. package/lib/entity/tenant/clearAllEpic.d.ts +4 -1
  7. package/lib/entity/tenant/clearAllEpic.js +6 -0
  8. package/lib/entity/vendor/__mocks__/vendorMock.js +0 -2
  9. package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +1 -0
  10. package/lib/entity/vendor/__mocks__/vendorStateMocks.js +73 -4
  11. package/lib/entity/vendor/vendorPayload.d.ts +6 -1
  12. package/lib/entity/vendor/vendorPayload.js +3 -3
  13. package/lib/entity/vendor/vendorState.d.ts +8 -1
  14. package/lib/entity/vendor/vendorType.d.ts +2 -0
  15. package/lib/entity/vendor/vendorType.js +4 -1
  16. package/lib/epic.d.ts +5 -2
  17. package/lib/epic.js +5 -2
  18. package/lib/index.d.ts +15 -10
  19. package/lib/index.js +36 -20
  20. package/lib/reducer.d.ts +6 -0
  21. package/lib/reducer.js +6 -0
  22. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.d.ts +11 -0
  23. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +4607 -0
  24. package/lib/view/accountMappingView/accountMappingPayload.js +75 -32
  25. package/lib/view/accountMappingView/accountMappingReducer.js +36 -10
  26. package/lib/view/accountMappingView/accountMappingState.d.ts +1 -1
  27. package/lib/view/accountMappingView/accountMappingViewSelector.d.ts +5 -0
  28. package/lib/view/accountMappingView/accountMappingViewSelector.js +11 -1
  29. package/lib/view/accountMappingView/initializeAccountMappingViewEpic.d.ts +2 -1
  30. package/lib/view/accountMappingView/initializeAccountMappingViewEpic.js +2 -0
  31. package/lib/view/accountMappingView/saveAccountMappingViewEpic.js +6 -1
  32. package/lib/view/addressView/addressViewState.d.ts +1 -1
  33. package/lib/view/addressView/toAddressViewLocalData.d.ts +2 -0
  34. package/lib/view/addressView/toAddressViewLocalData.js +5 -4
  35. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -1
  36. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +1 -2
  37. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +2 -5
  38. package/lib/view/settingsView/epic/updateMyProfileEpic.js +6 -4
  39. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts +3 -1
  40. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js +6 -2
  41. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts +2 -3
  42. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +3 -3
  43. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts +1 -3
  44. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.d.ts +1 -2
  45. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.js +1 -21
  46. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.js +1 -3
  47. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -0
  48. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +4 -0
  49. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +8 -1
  50. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +25 -2
  51. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +1 -0
  52. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +8 -4
  53. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -1
  54. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.d.ts +11 -0
  55. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.js +42 -0
  56. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -14
  57. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +2 -13
  58. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +3 -6
  59. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +2 -17
  60. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +8 -2
  61. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +55 -15
  62. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +9 -0
  63. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +44 -0
  64. package/lib/view/spendManagement/chargeCards/{chargeCardList → issueChargeCard}/issueChargeCardEpic.d.ts +3 -2
  65. package/lib/view/spendManagement/chargeCards/{chargeCardList → issueChargeCard}/issueChargeCardEpic.js +35 -18
  66. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +15 -0
  67. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +65 -0
  68. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +22 -0
  69. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +76 -0
  70. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +28 -0
  71. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +23 -0
  72. package/lib/view/userListView/fetchUserListByTypeEpic.js +4 -1
  73. package/lib/view/vendor1099TypeList/vendor1099TypeListEpic.d.ts +7 -0
  74. package/lib/view/vendor1099TypeList/vendor1099TypeListEpic.js +23 -0
  75. package/lib/view/vendor1099TypeList/vendor1099TypeListPayload.d.ts +15 -0
  76. package/lib/view/vendor1099TypeList/vendor1099TypeListPayload.js +2 -0
  77. package/lib/view/vendor1099TypeList/vendor1099TypeListReducer.d.ts +7 -0
  78. package/lib/view/vendor1099TypeList/vendor1099TypeListReducer.js +52 -0
  79. package/lib/view/vendor1099TypeList/vendor1099TypeListState.d.ts +9 -0
  80. package/lib/view/vendor1099TypeList/vendor1099TypeListState.js +2 -0
  81. package/lib/view/vendorFiling1099/__mock__/json/vendorFiling1099ListSuccess.json +4 -1
  82. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListMock.js +12 -3
  83. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListSelectorMock.js +2 -4
  84. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.d.ts +4 -1
  85. package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.d.ts +2 -2
  86. package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.js +7 -7
  87. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListSelector.js +21 -10
  88. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
  89. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.js +1 -0
  90. package/package.json +1 -1
@@ -1,90 +1,99 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
3
14
  exports.toSaveAccountMappingPayload = void 0;
4
15
  const toSaveAccountMappingPayload = (accountingLocalData) => {
5
16
  const accounts = [];
6
- const initialTax1099Config = {
7
- is_bank_account: false,
8
- is_expense_account: false,
9
- expense_type: null,
10
- type_1099: null,
11
- box_type: null,
12
- };
13
17
  const findAndUpdateAccount = (accountId, label, tax1099Config) => {
14
18
  const existingAccount = accounts.find((account) => account.account_id === accountId);
15
19
  if (existingAccount) {
16
20
  // Add label if not already present
17
- if (label != '' &&
21
+ if (label !== '' &&
18
22
  existingAccount.labels &&
19
23
  !existingAccount.labels.includes(label)) {
20
24
  existingAccount.labels.push(label);
21
25
  }
22
26
  // Merge tax_1099_config fields, updating them if new values are non-null
23
27
  if (tax1099Config != null) {
24
- existingAccount.tax_1099_config = Object.assign(Object.assign({}, existingAccount.tax_1099_config), tax1099Config);
28
+ const { is_bank_account } = tax1099Config, restOfTax1099Config = __rest(tax1099Config, ["is_bank_account"]); // Exclude is_bank_account
29
+ existingAccount.tax_1099_config = Object.assign(Object.assign(Object.assign({}, existingAccount.tax_1099_config), restOfTax1099Config), { is_bank_account: existingAccount.tax_1099_config
30
+ ? existingAccount.tax_1099_config.is_bank_account
31
+ : is_bank_account });
25
32
  }
26
33
  }
27
34
  else {
28
35
  // Add a new account if it doesn't exist
29
- accounts.push({
30
- account_id: accountId,
31
- labels: label.length === 0 ? [] : [label],
32
- tax_1099_config: tax1099Config,
33
- });
36
+ if (accountId !== '') {
37
+ accounts.push({
38
+ account_id: accountId,
39
+ labels: label.length === 0 ? [] : [label],
40
+ tax_1099_config: tax1099Config,
41
+ });
42
+ }
34
43
  }
35
44
  };
36
45
  if (accountingLocalData.selectedIncomeAccountId != null) {
37
- findAndUpdateAccount(accountingLocalData.selectedIncomeAccountId, 'uncategorized_income');
46
+ findAndUpdateAccount(accountingLocalData.selectedIncomeAccountId, 'uncategorized_income', null);
38
47
  }
39
48
  else if (accountingLocalData.previousIncomeAccount) {
40
- findAndUpdateAccount(accountingLocalData.previousIncomeAccount.accountId, '');
49
+ findAndUpdateAccount(accountingLocalData.previousIncomeAccount.accountId, '', null);
41
50
  }
42
51
  if (accountingLocalData.selectedExpenseAccountId != null) {
43
- findAndUpdateAccount(accountingLocalData.selectedExpenseAccountId, 'uncategorized_expense');
52
+ findAndUpdateAccount(accountingLocalData.selectedExpenseAccountId, 'uncategorized_expense', null);
44
53
  }
45
54
  else if (accountingLocalData.previousExpenseAccount) {
46
- findAndUpdateAccount(accountingLocalData.previousExpenseAccount.accountId, '');
55
+ findAndUpdateAccount(accountingLocalData.previousExpenseAccount.accountId, '', null);
47
56
  }
48
57
  if (accountingLocalData.selectedBillPayAccountId != null) {
49
- findAndUpdateAccount(accountingLocalData.selectedBillPayAccountId, 'bank_charges_and_fees');
58
+ findAndUpdateAccount(accountingLocalData.selectedBillPayAccountId, 'bank_charges_and_fees', null);
50
59
  }
51
60
  else if (accountingLocalData.previousBillPayAccount) {
52
- findAndUpdateAccount(accountingLocalData.previousBillPayAccount.accountId, '');
61
+ findAndUpdateAccount(accountingLocalData.previousBillPayAccount.accountId, '', null);
53
62
  }
54
63
  if (accountingLocalData.selectedReimbursementsAccountId != null) {
55
- findAndUpdateAccount(accountingLocalData.selectedReimbursementsAccountId, 'travel_transportation');
64
+ findAndUpdateAccount(accountingLocalData.selectedReimbursementsAccountId, 'travel_transportation', null);
56
65
  }
57
66
  else if (accountingLocalData.previousReimbursementsAccount) {
58
- findAndUpdateAccount(accountingLocalData.previousReimbursementsAccount.accountId, '');
67
+ findAndUpdateAccount(accountingLocalData.previousReimbursementsAccount.accountId, '', null);
59
68
  }
60
69
  if (accountingLocalData.selectedPrepaidExpensesAccountIds.length > 0) {
61
70
  accountingLocalData.selectedPrepaidExpensesAccountIds.forEach((accountId) => {
62
- findAndUpdateAccount(accountId, 'prepaid_expenses');
71
+ findAndUpdateAccount(accountId, 'prepaid_expenses', null);
63
72
  });
64
73
  }
65
74
  else if (accountingLocalData.previousPrepaidExpensesAccount.length > 0) {
66
75
  accountingLocalData.previousPrepaidExpensesAccount.forEach((account) => {
67
- findAndUpdateAccount(account.accountId, '');
76
+ findAndUpdateAccount(account.accountId, '', null);
68
77
  });
69
78
  }
70
79
  if (accountingLocalData.selectedFixedAssetsAccountIds.length > 0) {
71
80
  accountingLocalData.selectedFixedAssetsAccountIds.forEach((accountId) => {
72
- findAndUpdateAccount(accountId, 'fixed_assets');
81
+ findAndUpdateAccount(accountId, 'fixed_assets', null);
73
82
  });
74
83
  }
75
84
  else if (accountingLocalData.previousFixedAssetsAccount.length > 0) {
76
85
  accountingLocalData.previousFixedAssetsAccount.forEach((account) => {
77
- findAndUpdateAccount(account.accountId, '');
86
+ findAndUpdateAccount(account.accountId, '', null);
78
87
  });
79
88
  }
80
89
  if (accountingLocalData.selectedAccruedExpensesAccountIds.length > 0) {
81
90
  accountingLocalData.selectedAccruedExpensesAccountIds.forEach((accountId) => {
82
- findAndUpdateAccount(accountId, 'accrued_expenses');
91
+ findAndUpdateAccount(accountId, 'accrued_expenses', null);
83
92
  });
84
93
  }
85
94
  else if (accountingLocalData.previousAccruedExpensesAccount.length > 0) {
86
95
  accountingLocalData.previousAccruedExpensesAccount.forEach((account) => {
87
- findAndUpdateAccount(account.accountId, '');
96
+ findAndUpdateAccount(account.accountId, '', null);
88
97
  });
89
98
  }
90
99
  if (accountingLocalData.selectedBankAccounts1099FilingAccountIds.length > 0) {
@@ -97,26 +106,60 @@ const toSaveAccountMappingPayload = (accountingLocalData) => {
97
106
  box_type: null,
98
107
  });
99
108
  });
109
+ const missingAccountIds = accountingLocalData.previousBankAccounts1099FilingAccount
110
+ .filter((account) => !accountingLocalData.selectedBankAccounts1099FilingAccountIds.includes(account.accountId))
111
+ .map((account) => account.accountId);
112
+ missingAccountIds.forEach((accountId) => {
113
+ findAndUpdateAccount(accountId, '', null);
114
+ });
100
115
  }
101
116
  else if (accountingLocalData.previousBankAccounts1099FilingAccount.length > 0) {
102
117
  accountingLocalData.previousBankAccounts1099FilingAccount.forEach((account) => {
103
- findAndUpdateAccount(account.accountId, '', initialTax1099Config);
118
+ findAndUpdateAccount(account.accountId, '', null);
104
119
  });
105
120
  }
106
- if (accountingLocalData.selectedExpenseAccounts1099FilingAccountIds.length > 0) {
121
+ if (accountingLocalData.selectedExpenseAccounts1099FilingAccountIds.length > 1) {
107
122
  accountingLocalData.selectedExpenseAccounts1099FilingAccountIds.forEach((account) => {
108
123
  findAndUpdateAccount(account.accountId, '', {
109
- is_bank_account: false,
124
+ is_bank_account: accountingLocalData.selectedBankAccounts1099FilingAccountIds.includes(account.accountId),
110
125
  is_expense_account: true,
111
126
  expense_type: account.expenseType,
112
127
  type_1099: account.type1099,
113
128
  box_type: account.boxType,
114
129
  });
115
130
  });
131
+ const selectedAccountIds = accountingLocalData.selectedExpenseAccounts1099FilingAccountIds.map((item) => item.accountId);
132
+ const missingAccountIds = accountingLocalData.previousExpenseAccounts1099FilingAccount
133
+ .filter((item) => !selectedAccountIds.includes(item.accountId))
134
+ .map((item) => item.accountId);
135
+ missingAccountIds.forEach((accountId) => {
136
+ findAndUpdateAccount(accountId, '', null);
137
+ });
138
+ }
139
+ else if (accountingLocalData.selectedExpenseAccounts1099FilingAccountIds.length ===
140
+ 1 &&
141
+ accountingLocalData.selectedExpenseAccounts1099FilingAccountIds[0]
142
+ .accountId !== '') {
143
+ accountingLocalData.selectedExpenseAccounts1099FilingAccountIds.forEach((account) => {
144
+ findAndUpdateAccount(account.accountId, '', {
145
+ is_bank_account: accountingLocalData.selectedBankAccounts1099FilingAccountIds.includes(account.accountId),
146
+ is_expense_account: true,
147
+ expense_type: account.expenseType,
148
+ type_1099: account.type1099,
149
+ box_type: account.boxType,
150
+ });
151
+ });
152
+ const selectedAccountIds = accountingLocalData.selectedExpenseAccounts1099FilingAccountIds.map((item) => item.accountId);
153
+ const missingAccountIds = accountingLocalData.previousExpenseAccounts1099FilingAccount
154
+ .filter((item) => !selectedAccountIds.includes(item.accountId))
155
+ .map((item) => item.accountId);
156
+ missingAccountIds.forEach((accountId) => {
157
+ findAndUpdateAccount(accountId, '', null);
158
+ });
116
159
  }
117
160
  else if (accountingLocalData.previousExpenseAccounts1099FilingAccount.length > 0) {
118
161
  accountingLocalData.previousExpenseAccounts1099FilingAccount.forEach((account) => {
119
- findAndUpdateAccount(account.accountId, '', initialTax1099Config);
162
+ findAndUpdateAccount(account.accountId, '', null);
120
163
  });
121
164
  }
122
165
  return accounts;
@@ -181,7 +181,7 @@ const doUpdateAccountListForAccountTypes = (draft, accountPayloadList) => {
181
181
  else if (account.account_type === 'bank') {
182
182
  bankAccounts1099FilingList.push(account); // list for bank accounts for Filing 1099
183
183
  }
184
- expenseAccounts1099FilingList.push(account); // list for gl accounts
184
+ expenseAccounts1099FilingList.push(account); // list for expense Category 1099 accounts
185
185
  });
186
186
  draft.incomeAccountIdList = incomeList.map((account) => account.account_id);
187
187
  draft.expenseAccountIdList = expenseList.map((account) => account.account_id);
@@ -259,15 +259,41 @@ const doUpdateAccountListForAccountTypes = (draft, accountPayloadList) => {
259
259
  const expenseAccounts1099FilingAccountMetadata = expenseAccounts1099FilingList.map((acc) => (0, accountPayload_1.mapAccountMetadataPayloadToAccountMetadata)(acc));
260
260
  const expenseAccounts1099FilingAccountBase = expenseAccounts1099FilingList.map((acc) => (0, accountPayload_1.mapAccountBasePayloadToAccountBase)(acc));
261
261
  const expenseAccounts1099FilingAccountsIdentified = expenseAccounts1099FilingAccountBase.filter((account) => { var _a; return (_a = account.tax1099Config) === null || _a === void 0 ? void 0 : _a.isExpenseAccount; });
262
- draft.data = Object.assign(Object.assign({}, draft.data), { selectedExpenseAccounts1099FilingAccountIds: expenseAccounts1099FilingAccountsIdentified.map((account) => {
263
- var _a, _b, _c, _d, _e, _f;
264
- return ({
265
- accountId: account.accountId,
266
- expenseType: (_b = (_a = account.tax1099Config) === null || _a === void 0 ? void 0 : _a.expenseType1099) !== null && _b !== void 0 ? _b : '',
267
- type1099: (_d = (_c = account.tax1099Config) === null || _c === void 0 ? void 0 : _c.type1099) !== null && _d !== void 0 ? _d : '',
268
- boxType: (_f = (_e = account.tax1099Config) === null || _e === void 0 ? void 0 : _e.boxType) !== null && _f !== void 0 ? _f : '',
269
- });
270
- }), previousExpenseAccounts1099FilingAccount: expenseAccounts1099FilingAccountsIdentified });
262
+ draft.data = Object.assign(Object.assign({}, draft.data), { selectedExpenseAccounts1099FilingAccountIds: expenseAccounts1099FilingAccountsIdentified.length > 0
263
+ ? expenseAccounts1099FilingAccountsIdentified.map((account) => {
264
+ var _a, _b, _c, _d, _e, _f;
265
+ return ({
266
+ accountId: account.accountId,
267
+ expenseType: (_b = (_a = account.tax1099Config) === null || _a === void 0 ? void 0 : _a.expenseType1099) !== null && _b !== void 0 ? _b : '',
268
+ type1099: (_d = (_c = account.tax1099Config) === null || _c === void 0 ? void 0 : _c.type1099) !== null && _d !== void 0 ? _d : '',
269
+ boxType: (_f = (_e = account.tax1099Config) === null || _e === void 0 ? void 0 : _e.boxType) !== null && _f !== void 0 ? _f : '',
270
+ });
271
+ })
272
+ : [
273
+ {
274
+ accountId: '',
275
+ expenseType: '',
276
+ type1099: '',
277
+ boxType: '',
278
+ },
279
+ ], previousExpenseAccounts1099FilingAccount: expenseAccounts1099FilingAccountsIdentified.length > 0
280
+ ? expenseAccounts1099FilingAccountsIdentified.map((account) => {
281
+ var _a, _b, _c, _d, _e, _f;
282
+ return ({
283
+ accountId: account.accountId,
284
+ expenseType: (_b = (_a = account.tax1099Config) === null || _a === void 0 ? void 0 : _a.expenseType1099) !== null && _b !== void 0 ? _b : '',
285
+ type1099: (_d = (_c = account.tax1099Config) === null || _c === void 0 ? void 0 : _c.type1099) !== null && _d !== void 0 ? _d : '',
286
+ boxType: (_f = (_e = account.tax1099Config) === null || _e === void 0 ? void 0 : _e.boxType) !== null && _f !== void 0 ? _f : '',
287
+ });
288
+ })
289
+ : [
290
+ {
291
+ accountId: '',
292
+ expenseType: '',
293
+ type1099: '',
294
+ boxType: '',
295
+ },
296
+ ] });
271
297
  draft.expenseAccounts1099FilingNestedAccountListHierarchy =
272
298
  (0, getNestedAccountIDHierarchyForReport_1.geNestedAccountIDHierarchyForReport)(expenseAccounts1099FilingAccountMetadata);
273
299
  /* 1099 Mapping Section End */
@@ -24,7 +24,7 @@ export interface AccountMappingLocalData {
24
24
  previousFixedAssetsAccount: AccountBase[];
25
25
  previousAccruedExpensesAccount: AccountBase[];
26
26
  previousBankAccounts1099FilingAccount: AccountBase[];
27
- previousExpenseAccounts1099FilingAccount: AccountBase[];
27
+ previousExpenseAccounts1099FilingAccount: ExpenseCategory1099Filing[];
28
28
  }
29
29
  export interface ExpenseCategory1099Filing {
30
30
  accountId: ID;
@@ -5,6 +5,8 @@ import { AccountBase } from '../../entity/account/accountState';
5
5
  import { RootState } from '../../reducer';
6
6
  import { AccountMappingLocalData } from './accountMappingState';
7
7
  import { FetchStateAndError } from '../../commonStateTypes/common';
8
+ import { Expense1099Type } from '../vendor1099TypeList/vendor1099TypeListPayload';
9
+ import { VendorType } from '../vendorTypeList/vendorTypeListPayload';
8
10
  export interface AccountMappingView extends SelectorView {
9
11
  incomeAccountList: AccountBase[];
10
12
  expenseAccountList: AccountBase[];
@@ -15,6 +17,9 @@ export interface AccountMappingView extends SelectorView {
15
17
  accruedExpensesAccountList: AccountBase[];
16
18
  bankAccounts1099FilingAccountList: AccountBase[];
17
19
  expenseAccounts1099FilingAccountList: AccountBase[];
20
+ expenseTypeList: VendorType[];
21
+ expense1099TypeList: VendorType[];
22
+ boxTypesList: Expense1099Type;
18
23
  incomeRecommendation?: Recommendation;
19
24
  expenseRecommendation?: Recommendation;
20
25
  billPayRecommendation?: Recommendation;
@@ -4,7 +4,7 @@ exports.getAccountMappingView = void 0;
4
4
  const toolkit_1 = require("@reduxjs/toolkit");
5
5
  const accountSelector_1 = require("../../entity/account/accountSelector");
6
6
  const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
7
- exports.getAccountMappingView = (0, toolkit_1.createSelector)((state) => state.accountMappingState, (state) => state.accountState, (state) => state.tasksCardState, (accountMappingState, accountState, tasksCardState) => {
7
+ exports.getAccountMappingView = (0, toolkit_1.createSelector)((state) => state.accountMappingState, (state) => state.accountState, (state) => state.tasksCardState, (state) => state.vendor1099TypeListState, (accountMappingState, accountState, tasksCardState, vendor1099TypeListState) => {
8
8
  const incomeAccountList = [];
9
9
  accountMappingState.incomeAccountIdList.forEach((accountId) => {
10
10
  const account = (0, accountSelector_1.getAccountBase)(accountState, accountId, 'account_list_by_type');
@@ -68,9 +68,16 @@ exports.getAccountMappingView = (0, toolkit_1.createSelector)((state) => state.a
68
68
  expenseAccounts1099FilingAccountList.push(account);
69
69
  }
70
70
  });
71
+ const expenseTypeList = vendor1099TypeListState.expenseTypes;
72
+ const expense1099TypeList = vendor1099TypeListState.expense1099Types;
73
+ const boxTypesList = vendor1099TypeListState.boxTypes;
71
74
  const fetchState = (0, reduceFetchState_1.reduceAllFetchState)([
72
75
  accountMappingState.accountListFetchState,
73
76
  accountMappingState.recommendationFetchState,
77
+ {
78
+ fetchState: vendor1099TypeListState.fetchState,
79
+ error: vendor1099TypeListState.error,
80
+ },
74
81
  ]);
75
82
  const saveState = getSaveState(accountMappingState.updateFetchState, tasksCardState);
76
83
  return {
@@ -83,6 +90,9 @@ exports.getAccountMappingView = (0, toolkit_1.createSelector)((state) => state.a
83
90
  accruedExpensesAccountList,
84
91
  bankAccounts1099FilingAccountList,
85
92
  expenseAccounts1099FilingAccountList,
93
+ expenseTypeList,
94
+ expense1099TypeList,
95
+ boxTypesList,
86
96
  incomeRecommendation: accountMappingState.incomeRecommendations.length > 0
87
97
  ? accountMappingState.incomeRecommendations[0]
88
98
  : undefined,
@@ -1,6 +1,7 @@
1
1
  import { ActionsObservable } from 'redux-observable';
2
2
  import { fetchAccountListForAccountTypes, fetchRecommendationForAccountMapping } from './accountMappingReducer';
3
- export declare type ActionType = ReturnType<typeof fetchAccountListForAccountTypes> | ReturnType<typeof fetchRecommendationForAccountMapping>;
3
+ import { fetchVendor1099TypeList } from '../vendor1099TypeList/vendor1099TypeListReducer';
4
+ export declare type ActionType = ReturnType<typeof fetchAccountListForAccountTypes> | ReturnType<typeof fetchRecommendationForAccountMapping> | ReturnType<typeof fetchVendor1099TypeList>;
4
5
  export declare const initializeAccountMappingViewEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<{
5
6
  payload: undefined;
6
7
  type: string;
@@ -4,10 +4,12 @@ exports.initializeAccountMappingViewEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const accountMappingReducer_1 = require("./accountMappingReducer");
7
+ const vendor1099TypeListReducer_1 = require("../vendor1099TypeList/vendor1099TypeListReducer");
7
8
  const initializeAccountMappingViewEpic = (actions$) => actions$.pipe((0, operators_1.filter)(accountMappingReducer_1.initializeAccountMappingView.match), (0, operators_1.mergeMap)(() => {
8
9
  const fetchActions = [];
9
10
  fetchActions.push((0, accountMappingReducer_1.fetchAccountListForAccountTypes)());
10
11
  fetchActions.push((0, accountMappingReducer_1.fetchRecommendationForAccountMapping)());
12
+ fetchActions.push((0, vendor1099TypeListReducer_1.fetchVendor1099TypeList)());
11
13
  return (0, rxjs_1.from)(fetchActions);
12
14
  }));
13
15
  exports.initializeAccountMappingViewEpic = initializeAccountMappingViewEpic;
@@ -12,7 +12,12 @@ const saveAccountMappingViewEpic = (actions$, state, zeniAPI) => actions$.pipe((
12
12
  const accountMappingState = state.value.accountMappingState;
13
13
  const payload = (0, accountMappingPayload_1.toSaveAccountMappingPayload)(accountMappingState.data);
14
14
  if (payload.length === 0) {
15
- return (0, rxjs_1.from)([]);
15
+ const action = [
16
+ (0, accountMappingReducer_1.saveAccountMappingFailure)({
17
+ status: (0, responsePayload_1.createZeniAPIStatus)('No Account Mapping Data to Save'),
18
+ }),
19
+ ];
20
+ return (0, rxjs_1.from)(action);
16
21
  }
17
22
  else {
18
23
  return zeniAPI
@@ -2,7 +2,7 @@ import { FetchStateAndError, ID } from '../../commonStateTypes/common';
2
2
  import { Address } from '../../entity/address/addressState';
3
3
  import { OfficerType } from '../companyView/types/companyPassport/companyUsersLocalData';
4
4
  export declare type AddressUpdatableInfo = Omit<Address, 'updateTime' | 'createTime' | 'addressId'>;
5
- export declare type AddressType = 'company_address' | 'company_registered_address' | `officer_${OfficerType}_address` | 'vendor_address' | 'user_address';
5
+ export declare type AddressType = 'company_address' | 'company_registered_address' | `officer_${OfficerType}_address` | 'vendor_address' | 'user_address' | `custom_shipping_${ID}_address`;
6
6
  export interface NewAddressData {
7
7
  addressType: AddressType;
8
8
  parentEntityId?: {
@@ -1,3 +1,5 @@
1
1
  import { CompanyView } from '../companyView/types/companyView';
2
+ import { Address } from '../../entity/address/addressState';
2
3
  import { AddressType, AddressUpdatableInfo } from './addressViewState';
3
4
  export declare function toAddressViewLocalData(companyView: CompanyView): Record<AddressType, AddressUpdatableInfo> | undefined;
5
+ export declare const getAddressUpdatableInfoFromAddress: (address: Address) => AddressUpdatableInfo;
@@ -11,18 +11,18 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  return t;
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.toAddressViewLocalData = void 0;
14
+ exports.getAddressUpdatableInfoFromAddress = exports.toAddressViewLocalData = void 0;
15
15
  const companyUsersLocalData_1 = require("../companyView/types/companyPassport/companyUsersLocalData");
16
16
  function toAddressViewLocalData(companyView) {
17
17
  let newAddresses = undefined;
18
18
  if (companyView.companyAddress != null) {
19
19
  newAddresses = Object.assign({}, newAddresses, {
20
- company_address: getAddressUpdatableInfoFromAddress(companyView.companyAddress),
20
+ company_address: (0, exports.getAddressUpdatableInfoFromAddress)(companyView.companyAddress),
21
21
  });
22
22
  }
23
23
  if (companyView.registeredAddress != null) {
24
24
  newAddresses = Object.assign({}, newAddresses, {
25
- company_registered_address: getAddressUpdatableInfoFromAddress(companyView.registeredAddress),
25
+ company_registered_address: (0, exports.getAddressUpdatableInfoFromAddress)(companyView.registeredAddress),
26
26
  });
27
27
  }
28
28
  companyView.companyOfficers
@@ -33,7 +33,7 @@ function toAddressViewLocalData(companyView) {
33
33
  const addressType = `officer_${index + 1}_address`;
34
34
  if (address != null) {
35
35
  newAddresses = Object.assign({}, newAddresses, {
36
- [addressType]: getAddressUpdatableInfoFromAddress(address),
36
+ [addressType]: (0, exports.getAddressUpdatableInfoFromAddress)(address),
37
37
  });
38
38
  }
39
39
  });
@@ -45,3 +45,4 @@ const getAddressUpdatableInfoFromAddress = (address) => {
45
45
  const { updateTime, createTime, addressId } = address, updateableAddress = __rest(address, ["updateTime", "createTime", "addressId"]);
46
46
  return updateableAddress;
47
47
  };
48
+ exports.getAddressUpdatableInfoFromAddress = getAddressUpdatableInfoFromAddress;
@@ -45,7 +45,7 @@ function getExpenseAutomationView(state) {
45
45
  if (currentTenantId != null) {
46
46
  auditSummary = (_a = (0, monthEndCloseChecksSelector_1.getMonthEndCloseChecksForATenantForSelectedPeriod)(monthEndCloseChecksState, currentTenantId, selectedPeriod)) === null || _a === void 0 ? void 0 : _a.auditSummary;
47
47
  }
48
- allSteps = (0, expenseAutomationViewSelectorTypes_1.getAllSteps)(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId, auditSummary, loggedInUser);
48
+ allSteps = (0, expenseAutomationViewSelectorTypes_1.getAllSteps)(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId, auditSummary);
49
49
  allSteps.forEach((stepDetail, index, allStepsOriginal) => {
50
50
  switch (stepDetail.step) {
51
51
  case 'je_schedules':
@@ -1,4 +1,3 @@
1
- import { LoggedInUser } from '../../..';
2
1
  import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonStateTypes/common';
3
2
  import { MonthYearPeriod, MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
4
3
  import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
@@ -18,7 +17,7 @@ export interface ExpenseAutomationStepDetails {
18
17
  isPrevDisabled: boolean;
19
18
  isNextDisabled: boolean;
20
19
  }
21
- export declare const getAllSteps: (monthEndCloseChecksState: MonthEndCloseChecksState, monthYearId: MonthYearPeriodId, tenantId: ID, auditSummary?: MonthEndAuditSummary | undefined, loggedInUser?: LoggedInUser | undefined) => ExpenseAutomationStepDetails[];
20
+ export declare const getAllSteps: (monthEndCloseChecksState: MonthEndCloseChecksState, monthYearId: MonthYearPeriodId, tenantId: ID, auditSummary?: MonthEndAuditSummary | undefined) => ExpenseAutomationStepDetails[];
22
21
  export interface ExpenseAutomationViewSelector extends SelectorView {
23
22
  currentSelectedView: ExpenseAutomationViewType;
24
23
  selectedPeriod: MonthYearPeriod;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAllSteps = void 0;
4
4
  const common_1 = require("../../../commonStateTypes/common");
5
- const getAllSteps = (monthEndCloseChecksState, monthYearId, tenantId, auditSummary, loggedInUser) => {
6
- var _a, _b;
5
+ const getAllSteps = (monthEndCloseChecksState, monthYearId, tenantId, auditSummary) => {
6
+ var _a;
7
7
  if (((_a = monthEndCloseChecksState.monthEndCloseChecksByTenantId[tenantId]) === null || _a === void 0 ? void 0 : _a[monthYearId]) != null) {
8
8
  const steps = monthEndCloseChecksState.monthEndCloseChecksByTenantId[tenantId][monthYearId].monthEndCloseCheckList.map((check) => {
9
9
  switch (check.id) {
@@ -37,9 +37,6 @@ const getAllSteps = (monthEndCloseChecksState, monthYearId, tenantId, auditSumma
37
37
  };
38
38
  }
39
39
  });
40
- if (((_b = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.userEmail) === null || _b === void 0 ? void 0 : _b.includes('zeni.ai')) === false) {
41
- return steps.filter((step) => step.step !== 'month_end_insights');
42
- }
43
40
  return steps;
44
41
  }
45
42
  return [];
@@ -19,6 +19,7 @@ const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/
19
19
  const userSelector_1 = require("../../../entity/user/userSelector");
20
20
  const addressViewSelector_1 = require("../../addressView/addressViewSelector");
21
21
  const addressSelector_1 = require("../../../entity/address/addressSelector");
22
+ const toAddressViewLocalData_1 = require("../../addressView/toAddressViewLocalData");
22
23
  const updateMyProfileEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(settingsViewReducer_1.updateMyProfile.match), (0, operators_1.switchMap)((action) => {
23
24
  var _a;
24
25
  const userId = (_a = state$.value.tenantState.loggedInUser) === null || _a === void 0 ? void 0 : _a.userId;
@@ -79,8 +80,9 @@ const toMyProfileUpdatePayload = (payload, user, userAddress) => {
79
80
  returnValue = Object.assign(Object.assign({}, returnValue), { phone, phone_verification: { otp_challenge: otpChallenge } });
80
81
  }
81
82
  return origin === 'CardUserOnboarding'
82
- ? Object.assign(Object.assign({}, returnValue), { is_card_issue_fulfilment_request: phone != null &&
83
- otpChallenge != null &&
84
- birthday != null &&
85
- address != null }) : returnValue;
83
+ ? Object.assign(Object.assign({}, returnValue), { is_card_issue_fulfilment_request: phone != null && otpChallenge != null && birthday != null, address:
84
+ //if user address is there pass it otherwise send undefined, platform will default it to company address
85
+ userAddress != null
86
+ ? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)((0, toAddressViewLocalData_1.getAddressUpdatableInfoFromAddress)(userAddress))
87
+ : undefined }) : returnValue;
86
88
  };
@@ -8,6 +8,8 @@ export declare const initializeCardUserOnboardingLocalData: import("@reduxjs/too
8
8
  localData: CardUserOnboardingLocalData;
9
9
  }, string>, sendOtpCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, sendOtpCardUserOnboardingSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
10
10
  otpChallenge: string;
11
- }, string>, sendOtpCardUserOnboardingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, resendOtpCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboardingSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboardingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, saveCardOnboardingUserDetails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, startActivationWait: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, completeActivationWait: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setFirstViewAfterActivation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setFirstViewCompleteAfterActivation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, clearCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
11
+ }, string>, sendOtpCardUserOnboardingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, resendOtpCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboardingSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpCardUserOnboardingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, saveCardOnboardingUserDetails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, startActivationWait: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, completeActivationWait: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setFirstViewAfterActivation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setFirstViewCompleteAfterActivation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, setCurrentDisplayedCardId: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
12
+ cardId: ID;
13
+ }, string>, clearCardUserOnboarding: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
12
14
  declare const _default: import("@reduxjs/toolkit").Reducer<CardUserOnboardingState, import("@reduxjs/toolkit").AnyAction>;
13
15
  export default _default;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearCardUserOnboarding = exports.setFirstViewCompleteAfterActivation = exports.setFirstViewAfterActivation = exports.completeActivationWait = exports.startActivationWait = exports.saveCardOnboardingUserDetails = exports.verifyOtpCardUserOnboardingFailure = exports.verifyOtpCardUserOnboardingSuccess = exports.verifyOtpCardUserOnboarding = exports.resendOtpCardUserOnboarding = exports.sendOtpCardUserOnboardingFailure = exports.sendOtpCardUserOnboardingSuccess = exports.sendOtpCardUserOnboarding = exports.updateCardUserOnboardingLocalData = exports.initializeCardUserOnboardingLocalData = exports.initialState = void 0;
4
+ exports.clearCardUserOnboarding = exports.setCurrentDisplayedCardId = exports.setFirstViewCompleteAfterActivation = exports.setFirstViewAfterActivation = exports.completeActivationWait = exports.startActivationWait = exports.saveCardOnboardingUserDetails = exports.verifyOtpCardUserOnboardingFailure = exports.verifyOtpCardUserOnboardingSuccess = exports.verifyOtpCardUserOnboarding = exports.resendOtpCardUserOnboarding = exports.sendOtpCardUserOnboardingFailure = exports.sendOtpCardUserOnboardingSuccess = exports.sendOtpCardUserOnboarding = exports.updateCardUserOnboardingLocalData = exports.initializeCardUserOnboardingLocalData = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  exports.initialState = {
7
7
  cardUserOnboardingLocalData: undefined,
@@ -68,6 +68,10 @@ const cardUserOnboarding = (0, toolkit_1.createSlice)({
68
68
  draft.verifyOtpStatus.fetchState = 'Error';
69
69
  draft.verifyOtpStatus.error = action.payload;
70
70
  },
71
+ setCurrentDisplayedCardId(draft, action) {
72
+ const { cardId } = action.payload;
73
+ draft.currentDisplayedCardId = cardId;
74
+ },
71
75
  saveCardOnboardingUserDetails(
72
76
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
73
77
  _draft) {
@@ -90,5 +94,5 @@ const cardUserOnboarding = (0, toolkit_1.createSlice)({
90
94
  },
91
95
  },
92
96
  });
93
- _a = cardUserOnboarding.actions, exports.initializeCardUserOnboardingLocalData = _a.initializeCardUserOnboardingLocalData, exports.updateCardUserOnboardingLocalData = _a.updateCardUserOnboardingLocalData, exports.sendOtpCardUserOnboarding = _a.sendOtpCardUserOnboarding, exports.sendOtpCardUserOnboardingSuccess = _a.sendOtpCardUserOnboardingSuccess, exports.sendOtpCardUserOnboardingFailure = _a.sendOtpCardUserOnboardingFailure, exports.resendOtpCardUserOnboarding = _a.resendOtpCardUserOnboarding, exports.verifyOtpCardUserOnboarding = _a.verifyOtpCardUserOnboarding, exports.verifyOtpCardUserOnboardingSuccess = _a.verifyOtpCardUserOnboardingSuccess, exports.verifyOtpCardUserOnboardingFailure = _a.verifyOtpCardUserOnboardingFailure, exports.saveCardOnboardingUserDetails = _a.saveCardOnboardingUserDetails, exports.startActivationWait = _a.startActivationWait, exports.completeActivationWait = _a.completeActivationWait, exports.setFirstViewAfterActivation = _a.setFirstViewAfterActivation, exports.setFirstViewCompleteAfterActivation = _a.setFirstViewCompleteAfterActivation, exports.clearCardUserOnboarding = _a.clearCardUserOnboarding;
97
+ _a = cardUserOnboarding.actions, exports.initializeCardUserOnboardingLocalData = _a.initializeCardUserOnboardingLocalData, exports.updateCardUserOnboardingLocalData = _a.updateCardUserOnboardingLocalData, exports.sendOtpCardUserOnboarding = _a.sendOtpCardUserOnboarding, exports.sendOtpCardUserOnboardingSuccess = _a.sendOtpCardUserOnboardingSuccess, exports.sendOtpCardUserOnboardingFailure = _a.sendOtpCardUserOnboardingFailure, exports.resendOtpCardUserOnboarding = _a.resendOtpCardUserOnboarding, exports.verifyOtpCardUserOnboarding = _a.verifyOtpCardUserOnboarding, exports.verifyOtpCardUserOnboardingSuccess = _a.verifyOtpCardUserOnboardingSuccess, exports.verifyOtpCardUserOnboardingFailure = _a.verifyOtpCardUserOnboardingFailure, exports.saveCardOnboardingUserDetails = _a.saveCardOnboardingUserDetails, exports.startActivationWait = _a.startActivationWait, exports.completeActivationWait = _a.completeActivationWait, exports.setFirstViewAfterActivation = _a.setFirstViewAfterActivation, exports.setFirstViewCompleteAfterActivation = _a.setFirstViewCompleteAfterActivation, exports.setCurrentDisplayedCardId = _a.setCurrentDisplayedCardId, exports.clearCardUserOnboarding = _a.clearCardUserOnboarding;
94
98
  exports.default = cardUserOnboarding.reducer;
@@ -1,8 +1,7 @@
1
1
  import { View } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
2
2
  import { RootState } from '../../../../reducer';
3
3
  import { CardUserOnboardingLocalData } from './cardUserOnboardingState';
4
- import { FetchStateAndError } from '../../../../commonStateTypes/common';
5
- import { NewAddressData } from '../../../addressView/addressViewState';
4
+ import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
6
5
  import { TwoFactorAuthenticationView } from '../../../twoFactorAuthentication/twoFactorAuthenticationSelector';
7
6
  export interface CardUserOnboardingView extends View {
8
7
  cardUserOnboardingLocalData?: CardUserOnboardingLocalData;
@@ -13,6 +12,6 @@ export interface CardUserOnboardingView extends View {
13
12
  updateStatus: FetchStateAndError;
14
13
  sendOtpStatus: FetchStateAndError;
15
14
  verifyOtpStatus: FetchStateAndError;
16
- addressData?: NewAddressData;
15
+ currentDisplayedCardId?: ID;
17
16
  }
18
17
  export declare const getCardUserOnboardingView: (state: RootState) => CardUserOnboardingView;
@@ -5,8 +5,8 @@ const toolkit_1 = require("@reduxjs/toolkit");
5
5
  const twoFactorAuthenticationSelector_1 = require("../../../twoFactorAuthentication/twoFactorAuthenticationSelector");
6
6
  const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
7
7
  const userSelector_1 = require("../../../../entity/user/userSelector");
8
- exports.getCardUserOnboardingView = (0, toolkit_1.createSelector)((state) => state, (state) => state.addressViewState, (state) => state.cardUserOnboardingState, (state) => state.settingsViewState, (state) => state.tenantState, (state) => state.userState, (state, addressViewState, cardUserOnboardingState, settingsViewState, tenantState, userState) => {
9
- var _a, _b;
8
+ exports.getCardUserOnboardingView = (0, toolkit_1.createSelector)((state) => state, (state) => state.cardUserOnboardingState, (state) => state.settingsViewState, (state) => state.tenantState, (state) => state.userState, (state, cardUserOnboardingState, settingsViewState, tenantState, userState) => {
9
+ var _a;
10
10
  const twoFAView = (0, twoFactorAuthenticationSelector_1.getTwoFactorAuthenticationView)(state);
11
11
  const updateStatus = (0, reduceFetchState_1.reduceAllFetchState)([
12
12
  settingsViewState.profile.updateStatus,
@@ -22,7 +22,6 @@ exports.getCardUserOnboardingView = (0, toolkit_1.createSelector)((state) => sta
22
22
  const isDOBPresent = (user === null || user === void 0 ? void 0 : user.birthday) != null;
23
23
  return {
24
24
  cardUserOnboardingLocalData: cardUserOnboardingState.cardUserOnboardingLocalData,
25
- addressData: (_b = addressViewState.newAddressState) === null || _b === void 0 ? void 0 : _b['user_address'],
26
25
  onboardingProgressStatus: updateStatus,
27
26
  updateStatus: settingsViewState.profile.updateStatus,
28
27
  sendOtpStatus: cardUserOnboardingState.sendOtpStatus,
@@ -30,5 +29,6 @@ exports.getCardUserOnboardingView = (0, toolkit_1.createSelector)((state) => sta
30
29
  twoFAView,
31
30
  isDOBPresent,
32
31
  firstViewAfterActivation: cardUserOnboardingState.firstViewAfterActivation,
32
+ currentDisplayedCardId: cardUserOnboardingState.currentDisplayedCardId,
33
33
  };
34
34
  });
@@ -2,9 +2,6 @@ import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
2
2
  import { ZeniDate } from '../../../../zeniDayJS';
3
3
  export interface CardUserOnboardingLocalData {
4
4
  userId: ID;
5
- firstName: string;
6
- lastName: string;
7
- email: string;
8
5
  phone?: string;
9
6
  isPhoneVerified?: boolean;
10
7
  otpChallenge?: string;
@@ -17,4 +14,5 @@ export interface CardUserOnboardingState {
17
14
  verifyOtpStatus: FetchStateAndError;
18
15
  activationWaitStatus: FetchStateAndError;
19
16
  firstViewAfterActivation: boolean;
17
+ currentDisplayedCardId?: ID;
20
18
  }
@@ -1,7 +1,6 @@
1
1
  import { ActionsObservable, StateObservable } from 'redux-observable';
2
2
  import { Observable } from 'rxjs';
3
3
  import { RootState } from '../../../../../reducer';
4
- import { newAddressInLocalStore, resetNewAddressDataInLocalStore } from '../../../../addressView/addressViewReducer';
5
4
  import { initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData } from '../cardUserOnboardingReducer';
6
- export declare type ActionType = ReturnType<typeof initializeCardUserOnboardingLocalData> | ReturnType<typeof updateCardUserOnboardingLocalData> | ReturnType<typeof newAddressInLocalStore> | ReturnType<typeof resetNewAddressDataInLocalStore>;
5
+ export declare type ActionType = ReturnType<typeof initializeCardUserOnboardingLocalData> | ReturnType<typeof updateCardUserOnboardingLocalData>;
7
6
  export declare const initializeCardUserOnboardingLocalDataEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;