@zeniai/client-epic-state 4.9.79 → 4.9.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -2
- package/lib/index.js +2 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListHelper.d.ts +1 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListHelper.js +1 -18
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +17 -5
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +32 -44
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -593,7 +593,6 @@ export { fetchApAgingDetail, AgingReportInvoice, ApAgingDetail, getApAgingDetail
|
|
|
593
593
|
import { JEScheduledTransaction, ScheduledJournalEntry } from './entity/jeSchedules/jeSchedulesSelector';
|
|
594
594
|
import { ScheduleTypes, ScheduleJournalEntryStatusCodeType, toScheduleTypesType, toScheduleTypesTypeStrict, ScheduleStatusCodeType, JEScheduleKey, ALL_SCHEDULES_TYPES } from './entity/jeSchedules/jeSchedulesTypes';
|
|
595
595
|
import { ScheduleTransaction } from './entity/transaction/stateTypes/scheduleTransaction';
|
|
596
|
-
import { getDefaultSelectedTimeframeForScheduleType } from './view/scheduleView/scheduleListView/scheduleListHelper';
|
|
597
596
|
import { ScheduleListLocalData } from './view/scheduleView/scheduleListView/scheduleListState';
|
|
598
597
|
import { ScheduleSubTabType, ScheduleListSortKey, toScheduleSubTabType, DownloadJEScheduleTabOptions, ScheduleListTabsFileType, toScheduleListTabsFileTypeStrict } from './view/scheduleView/scheduleListView/scheduleListTypes';
|
|
599
598
|
import { fetchScheduleList, fetchSchedulesAccount, updateScheduleListLocalData, updateScheduleListSearchText, updateScheduleListSubTab, updateScheduleListScrollState, updateScheduleListSortState, updateScheduleListDownloadState, fetchDownloadSchedules } from './view/scheduleView/scheduleListView/scheduleListReducer';
|
|
@@ -603,7 +602,7 @@ import { JELinkType, JEScheduleDetailsLocalData, JETransactionLink, ScheduleDeta
|
|
|
603
602
|
import { ScheduleDetailSortKey } from './view/scheduleView/scheduleDetailView/scheduleDetailTypes';
|
|
604
603
|
import { createNewSchedules, fetchScheduleDetails, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, updateSelectedJEScheduleKey, updateScheduleDetailsLocalData, updatedSelectedJELinkRowIndex, updatedJELinkInLocalData, updateAmountsInScheduleDetail, resetJELinkInLocalData, updatedJELinkWithRecommendedLocalData } from './view/scheduleView/scheduleDetailView/scheduleDetailReducer';
|
|
605
604
|
import { getQBOUrlForLink, getThirdPartyIDFromQBOURL } from './view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper';
|
|
606
|
-
export { JEScheduleKey, ALL_SCHEDULES_TYPES, JEScheduledTransaction, ScheduleTypes, ScheduleJournalEntryStatusCodeType, ScheduleListReport, getScheduleListReport, ScheduleSubTabType, ScheduleListSortKey, fetchScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, ScheduleListLocalData, ScheduleDetailsLocalDataFixedAssets, ScheduleDetailsView, JEScheduleDetailsLocalData, ScheduleDetailsLocalData, toScheduleSubTabType, ScheduleStatusCodeType, ScheduleTransaction, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, ScheduleDetailSortKey, ScheduledJournalEntry, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, JETransactionLink, updateScheduleListDownloadState, DownloadJEScheduleTabOptions, updatedSelectedJELinkRowIndex, ScheduleListTabsFileType, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, ScheduleDetailUIState, resetJELinkInLocalData, JEScheduledTransactionWithBalance, JELinkType, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType,
|
|
605
|
+
export { JEScheduleKey, ALL_SCHEDULES_TYPES, JEScheduledTransaction, ScheduleTypes, ScheduleJournalEntryStatusCodeType, ScheduleListReport, getScheduleListReport, ScheduleSubTabType, ScheduleListSortKey, fetchScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, ScheduleListLocalData, ScheduleDetailsLocalDataFixedAssets, ScheduleDetailsView, JEScheduleDetailsLocalData, ScheduleDetailsLocalData, toScheduleSubTabType, ScheduleStatusCodeType, ScheduleTransaction, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, ScheduleDetailSortKey, ScheduledJournalEntry, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, JETransactionLink, updateScheduleListDownloadState, DownloadJEScheduleTabOptions, updatedSelectedJELinkRowIndex, ScheduleListTabsFileType, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, ScheduleDetailUIState, resetJELinkInLocalData, JEScheduledTransactionWithBalance, JELinkType, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, };
|
|
607
606
|
import { GlobalMerchant, GlobalMerchantBase, TenantMerchant } from './entity/globalMerchant/globalMerchantState';
|
|
608
607
|
export { GlobalMerchant, GlobalMerchantBase, TenantMerchant };
|
|
609
608
|
import { ReviewStatus, VendorReviewRecommendationViewState, VendorReviewRowCurrentSelection } from './view/vendorReviewView/common/state/commonTypes';
|
package/lib/index.js
CHANGED
|
@@ -45,8 +45,8 @@ exports.getAllDepostAccounts = exports.getDepositAccountDetail = exports.unlinkP
|
|
|
45
45
|
exports.clearOnboardingCustomerView = exports.saveOnboardingCustomerViewDataInLocalStore = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.updateOnboardingCustomerViewUIState = exports.updateCurrentStep = exports.updateOnboardingCustomerViewLocalStoreData = exports.updateOnboardingCustomerView = exports.updateOnboardingPaymentAccountStatus = exports.updateOnboardingPaymentAccountLoginStatus = exports.updateOnboardingCustomerViewCompleteStatus = exports.updateOnboardingCustomerViewAccountDetails = exports.establishOnboardingPlaidConnection = exports.getOnboardingPlaidLinkToken = exports.fetchOnboardingCustomerSetupView = exports.fetchOnboardingCustomerView = exports.isZeniClearingAccount = exports.ZENI_CLEARING_ACCOUNT = exports.isZeniClearingAccountReport = exports.getCompanyConfig = exports.fetchCompanyConfig = exports.clearTransactionVendorSaveStatus = exports.resetTransactionVendorLocalData = exports.updateTransactionVendorLocalData = exports.saveTransactionVendorSuccessOrFailure = exports.saveTransactionVendor = exports.getTransactionVendorView = exports.getZeniAccStatements = exports.fetchZeniAccStatementPage = exports.getDepositAccountTransactionList = exports.fetchDepositAccountTransactionList = exports.fetchDepositAccountHistoryFailure = exports.fetchDepositAccountHistorySuccess = exports.updateDepositAccount = exports.getCheckDepositDetail = exports.clearCheckDeposit = exports.updateCheckDepositLocalData = exports.depositCheck = exports.ZENI_ACCOUNTS_TAB = exports.fetchDepositAccountDetail = exports.fetchReviewTransferDetail = exports.clearReviewTransferDetail = exports.clearTransferDetail = exports.getTransferDetail = exports.transferMoney = exports.updateDepositToLocalData = exports.updateTransferToLocalData = exports.updateTransferMoneyLocalData = exports.fetchZeniAccountsConfig = exports.fetchDepositAccount = exports.getDepositAccountDetailForPDF = void 0;
|
|
46
46
|
exports.fetchChargeCardDetailPage = exports.getChargeCardListView = exports.fetchChargeCardListPage = exports.getChargeCardBusinessVerificationDetails = exports.companyHealthMetricDropDownOptions = exports.hasCompanyHealthMetricFormFieldChanged = exports.getCompanyHealthMetricView = exports.isCompanyRunwayInfinite = exports.updateCompanyHealthViewUIState = exports.updateCompanyHealthMetricViewSuccessStatus = exports.updateCompanyHealthMetricViewErrorStatus = exports.updateCompanyHealthMetricLocalStore = exports.saveCompanyHealthMetricById = exports.removeSelectedCompanyId = exports.initializeCompanyHealthMetricViewLocalData = exports.fetchCompanyHealthMetricView = exports.clearCompanyHealthMetricView = exports.updateCompanyHealth = exports.updateCompaniesHealth = exports.getUserRoleConfig = exports.fetchUserRoleConfig = exports.clearInternationalWire = exports.deletePaymentInstrument = exports.createPaymentInstrumentUpdateStatus = exports.createPaymentInstrument = exports.fetchInternationalWireDynamicForm = exports.initializeDynamicForm = exports.updateInternationalWireLocalStoreData = exports.initializeInternationalWireLocalData = exports.getInternationalWireView = exports.fetchWiseRedirectStatus = exports.getWiseRedirect = exports.saveMagicLinkAddressInLocalStore = exports.fetchMagicLinkBankNameBySwift = exports.fetchMagicLinkBankNameByRouting = exports.updateMagicLinkInternationalBankAccountLocalStoreData = exports.updateMagicLinkBankAccountLocalStoreData = exports.saveBankAccount = exports.fetchBillAttachment = exports.fetchMagicLinkTenant = exports.getMagicLinkCurrentAddressState = exports.getMagicLinkBankAccountView = exports.getMagicLinkView = exports.initializeAccountMappingView = exports.getAccountMappingView = exports.clearAccountMappingLocalData = exports.saveAccountMappingLocalData = exports.saveAccountMapping = exports.getOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = void 0;
|
|
47
47
|
exports.updatedJELinkWithRecommendedLocalData = exports.resetJELinkInLocalData = exports.updateAmountsInScheduleDetail = exports.updatedJELinkInLocalData = exports.getThirdPartyIDFromQBOURL = exports.getQBOUrlForLink = exports.updatedSelectedJELinkRowIndex = exports.updateScheduleListDownloadState = exports.updateScheduleDetailsLocalData = exports.createNewSchedules = exports.deleteScheduleDetail = exports.saveScheduleDetails = exports.fetchScheduleDetailsPage = exports.getScheduleDetailsView = exports.fetchScheduleDetails = exports.updateSelectedJEScheduleKey = exports.updateScheduleListSortState = exports.updateScheduleListScrollState = exports.updateScheduleListSearchText = exports.updateScheduleListSubTab = exports.toScheduleSubTabType = exports.toScheduleListTabsFileTypeStrict = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.getFetchStateForScheduleAccountList = exports.updateScheduleListLocalData = exports.fetchSchedulesAccount = exports.fetchDownloadSchedules = exports.fetchScheduleList = exports.getScheduleListReport = exports.ALL_SCHEDULES_TYPES = exports.updateApAgingDetailUIState = exports.getApAgingDetailForVendor = exports.fetchApAgingDetail = exports.updateApAgingUIState = exports.getApAgingReport = exports.fetchApAging = exports.updateChargeCardDetail = exports.updateChargeCardListUIState = exports.updateChargeCardListSearchText = exports.resetIssueChargeCardForm = exports.updateChargeCardLocalStore = exports.issueChargeCard = exports.acceptChargeCardTerms = exports.fetchChargeCardSetupView = exports.getChargeCardSetupViewDetails = exports.toCreditLimitFrequencyCodeType = exports.toChargeCardSortKeyType = exports.fetchChargeCardTransactionList = exports.getChargeCardDetailView = void 0;
|
|
48
|
-
exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.allTaskTags = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.
|
|
49
|
-
exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.discardTaskUpdatesInLocalStore =
|
|
48
|
+
exports.deleteTask = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.allTaskTags = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.getFetchStateForScheduleListByType = void 0;
|
|
49
|
+
exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.discardTaskUpdatesInLocalStore = void 0;
|
|
50
50
|
const zeniDayJS_1 = require("./zeniDayJS");
|
|
51
51
|
Object.defineProperty(exports, "Dayjs", { enumerable: true, get: function () { return zeniDayJS_1.Dayjs; } });
|
|
52
52
|
Object.defineProperty(exports, "updateZeniDateLocaleID", { enumerable: true, get: function () { return zeniDayJS_1.updateZeniDateLocaleID; } });
|
|
@@ -1239,8 +1239,6 @@ const jeSchedulesTypes_1 = require("./entity/jeSchedules/jeSchedulesTypes");
|
|
|
1239
1239
|
Object.defineProperty(exports, "toScheduleTypesType", { enumerable: true, get: function () { return jeSchedulesTypes_1.toScheduleTypesType; } });
|
|
1240
1240
|
Object.defineProperty(exports, "toScheduleTypesTypeStrict", { enumerable: true, get: function () { return jeSchedulesTypes_1.toScheduleTypesTypeStrict; } });
|
|
1241
1241
|
Object.defineProperty(exports, "ALL_SCHEDULES_TYPES", { enumerable: true, get: function () { return jeSchedulesTypes_1.ALL_SCHEDULES_TYPES; } });
|
|
1242
|
-
const scheduleListHelper_1 = require("./view/scheduleView/scheduleListView/scheduleListHelper");
|
|
1243
|
-
Object.defineProperty(exports, "getDefaultSelectedTimeframeForScheduleType", { enumerable: true, get: function () { return scheduleListHelper_1.getDefaultSelectedTimeframeForScheduleType; } });
|
|
1244
1242
|
const scheduleListTypes_1 = require("./view/scheduleView/scheduleListView/scheduleListTypes");
|
|
1245
1243
|
Object.defineProperty(exports, "toScheduleSubTabType", { enumerable: true, get: function () { return scheduleListTypes_1.toScheduleSubTabType; } });
|
|
1246
1244
|
Object.defineProperty(exports, "toScheduleListTabsFileTypeStrict", { enumerable: true, get: function () { return scheduleListTypes_1.toScheduleListTabsFileTypeStrict; } });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NestedAccountHeirarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { Amount } from '../../../commonStateTypes/amount';
|
|
3
3
|
import { COABalance, COABalanceGroupedByPeriod } from '../../../commonStateTypes/coaBalance/coaBalance';
|
|
4
|
-
import {
|
|
4
|
+
import { TimeframeTickWithMetaData } from '../../../commonStateTypes/timeframeTick';
|
|
5
5
|
import { AccountBase, AccountLabel, AccountType } from '../../../entity/account/accountState';
|
|
6
6
|
import { JEScheduledTransaction, ScheduledJournalEntry } from '../../../entity/jeSchedules/jeSchedulesSelector';
|
|
7
7
|
import { ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
@@ -94,5 +94,4 @@ export declare const getAccountLabelForScheduleType: (scheduleType: ScheduleType
|
|
|
94
94
|
* @returns
|
|
95
95
|
*/
|
|
96
96
|
export declare const getAccountsTypesForScheduleEpics: () => AccountListTypesPayload;
|
|
97
|
-
export declare const getDefaultSelectedTimeframeForScheduleType: (scheduleType: ScheduleTypes) => TimeframeTick;
|
|
98
97
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getAccountsTypesForScheduleEpics = exports.getAccountLabelForScheduleType = exports.getAccountsTypesForScheduleList = exports.getDurationOfMonthOutTotalMonth = exports.calculateCOABalanceGroupedByPeriod = exports.mapScheduleJournalToCOABalance = exports.calculateTotalBalanceTimeframeTick = exports.setDefaultTotalBalanceTimeframeTicks = exports.mapTotalBalanceTimeframeTickToCOAGroupedBalance = exports.getAllTimeframeTicks = exports.getAllAccountNested = exports.getAllAccountBase = exports.getAccountLabelForSchedulesTab = exports.getAccountListKeyForSchedules = exports.getCalculatedScheduleTotals = exports.scheduleTypesAccountLabels = void 0;
|
|
4
4
|
const amount_1 = require("../../../commonStateTypes/amount");
|
|
5
5
|
const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
6
6
|
const getFYMonths_1 = require("../../../commonStateTypes/fiscalYearHelpers/getFYMonths");
|
|
@@ -268,20 +268,3 @@ const getAccountsTypesForScheduleEpics = () => {
|
|
|
268
268
|
};
|
|
269
269
|
};
|
|
270
270
|
exports.getAccountsTypesForScheduleEpics = getAccountsTypesForScheduleEpics;
|
|
271
|
-
const getDefaultSelectedTimeframeForScheduleType = (scheduleType) => {
|
|
272
|
-
const thisMonthStart = (0, zeniDayJS_1.dateNow)().startOf('month');
|
|
273
|
-
const thisMonthEnd = (0, zeniDayJS_1.dateNow)().endOf('month');
|
|
274
|
-
switch (scheduleType) {
|
|
275
|
-
case 'fixed_assets':
|
|
276
|
-
return {
|
|
277
|
-
startDate: thisMonthStart.subtract(7, 'year'),
|
|
278
|
-
endDate: thisMonthEnd,
|
|
279
|
-
};
|
|
280
|
-
default:
|
|
281
|
-
return {
|
|
282
|
-
startDate: thisMonthStart.subtract(13, 'month'),
|
|
283
|
-
endDate: thisMonthEnd,
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
exports.getDefaultSelectedTimeframeForScheduleType = getDefaultSelectedTimeframeForScheduleType;
|
|
@@ -3,10 +3,10 @@ var _a;
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.getState = exports.clearScheduleList = exports.updateScheduleListDownloadState = exports.updateScheduleListSearchText = exports.updateScheduleListLocalData = exports.updateScheduleListSortState = exports.updateScheduleListScrollState = exports.updateScheduleListSubTab = exports.updateDownloadScheduleSuccess = exports.updateDownloadScheduleFailure = exports.updateScheduleListFailure = exports.updateScheduleListSuccess = exports.fetchSchedulesAccount = exports.fetchScheduleList = exports.fetchDownloadSchedules = exports.initialState = exports.initialFixedAssetsScheduleListStateByType = exports.initialScheduleListStateByType = exports.initialJESchedulesForTypeState = exports.initialUIState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
6
7
|
const transactionIDPayload_1 = require("../../../entity/transaction/payloadTypes/transactionIDPayload");
|
|
7
8
|
const scheduleListTypes_1 = require("./scheduleListTypes");
|
|
8
9
|
const transactionDetailState_1 = require("../../transactionDetail/transactionDetailState");
|
|
9
|
-
const scheduleListHelper_1 = require("./scheduleListHelper");
|
|
10
10
|
exports.initialUIState = {
|
|
11
11
|
sortKey: 'transactionDate',
|
|
12
12
|
sortOrder: 'descending',
|
|
@@ -31,10 +31,16 @@ exports.initialScheduleListStateByType = {
|
|
|
31
31
|
jeScheduleKeysByListKey: {},
|
|
32
32
|
scheduleListLocalData: {
|
|
33
33
|
selectedCategoryId: 'all',
|
|
34
|
-
selectedTimeframe:
|
|
34
|
+
selectedTimeframe: {
|
|
35
|
+
startDate: (0, zeniDayJS_1.dateNow)().subtract(1, 'year'),
|
|
36
|
+
endDate: (0, zeniDayJS_1.dateNow)(),
|
|
37
|
+
},
|
|
35
38
|
},
|
|
36
39
|
selectedCategoryId: 'all',
|
|
37
|
-
selectedTimeframe:
|
|
40
|
+
selectedTimeframe: {
|
|
41
|
+
startDate: (0, zeniDayJS_1.dateNow)().subtract(1, 'year'),
|
|
42
|
+
endDate: (0, zeniDayJS_1.dateNow)(),
|
|
43
|
+
},
|
|
38
44
|
downloadState: {
|
|
39
45
|
fetchState: 'Not-Started',
|
|
40
46
|
error: undefined,
|
|
@@ -43,8 +49,14 @@ exports.initialScheduleListStateByType = {
|
|
|
43
49
|
};
|
|
44
50
|
exports.initialFixedAssetsScheduleListStateByType = Object.assign(Object.assign({}, exports.initialScheduleListStateByType), { scheduleListLocalData: {
|
|
45
51
|
selectedCategoryId: 'all',
|
|
46
|
-
selectedTimeframe:
|
|
47
|
-
|
|
52
|
+
selectedTimeframe: {
|
|
53
|
+
startDate: (0, zeniDayJS_1.dateNow)().subtract(7, 'year'),
|
|
54
|
+
endDate: (0, zeniDayJS_1.dateNow)(),
|
|
55
|
+
},
|
|
56
|
+
}, selectedTimeframe: {
|
|
57
|
+
startDate: (0, zeniDayJS_1.dateNow)().subtract(7, 'year'),
|
|
58
|
+
endDate: (0, zeniDayJS_1.dateNow)(),
|
|
59
|
+
} });
|
|
48
60
|
exports.initialState = {
|
|
49
61
|
listByScheduleType: {
|
|
50
62
|
prepaid_expenses: exports.initialScheduleListStateByType,
|
|
@@ -20,18 +20,17 @@ const billDetailViewState_1 = require("../../billDetailView/billDetailViewState"
|
|
|
20
20
|
const billPayConfigState_1 = require("../../billPayConfig/billPayConfigState");
|
|
21
21
|
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
22
22
|
const billPayConfigPayload_1 = require("../../billPayConfig/billPayConfigPayload");
|
|
23
|
-
const vendorSelector_1 = require("../../../../../entity/vendor/vendorSelector");
|
|
24
23
|
const recurringBillsPayload_1 = require("../../../../../entity/billPay/recurringBills/recurringBillsPayload");
|
|
25
24
|
const workingDayHelper_1 = require("../../../../../commonStateTypes/workingDayHelper");
|
|
26
25
|
const helpers_1 = require("../../../helpers");
|
|
27
26
|
const saveBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(editBillViewReducer_1.saveBillDetail.match), (0, operators_1.mergeMap)((action) => {
|
|
28
27
|
const state = state$.value;
|
|
29
|
-
const { billStageCode, billId
|
|
28
|
+
const { billStageCode, billId } = action.payload;
|
|
30
29
|
const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId !== null && billId !== void 0 ? billId : '');
|
|
31
30
|
const billDetail = billId != null
|
|
32
31
|
? state.editBillDetailViewState.editBillStateById[key]
|
|
33
32
|
: state.editBillDetailViewState.newBillState;
|
|
34
|
-
const payload = prepareSaveBillPayload(state.accountState, state.billTransactionState, state.paymentAccountState, state.
|
|
33
|
+
const payload = prepareSaveBillPayload(state.accountState, state.billTransactionState, state.paymentAccountState, state.recurringBillState, billDetail, billStageCode);
|
|
35
34
|
const isRecurringBill = billDetail.billDetailLocalData.isRecurring;
|
|
36
35
|
const saveBillBaseURL = `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/bills/transactions`;
|
|
37
36
|
const saveBillApi = billId != null
|
|
@@ -83,79 +82,68 @@ const getSaveBillApiURL = (saveBillBaseURL, isRecurring, billId, billTransaction
|
|
|
83
82
|
return isRecurring ? `${saveBillBaseURL}/recurring` : `${saveBillBaseURL}`;
|
|
84
83
|
}
|
|
85
84
|
};
|
|
86
|
-
function prepareSaveBillPayload(accountState, billTransactionState, paymentAccountState,
|
|
87
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22;
|
|
85
|
+
function prepareSaveBillPayload(accountState, billTransactionState, paymentAccountState, recurringBillState, billDetail, billStageCode) {
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24;
|
|
88
87
|
const billId = billDetail.billId;
|
|
89
88
|
let detail;
|
|
90
89
|
const withdrawFromAccount = (_a = billDetail.billDetailLocalData.paymentDetailsSection) === null || _a === void 0 ? void 0 : _a.withdrawFrom;
|
|
91
90
|
// In case if withdraw from account is a payment account we need a connected zeni account id
|
|
92
91
|
const zeniAccountId = (_c = (0, paymentAccountSelector_1.getPaymentAccountByPaymentAccountId)(paymentAccountState, (_b = withdrawFromAccount === null || withdrawFromAccount === void 0 ? void 0 : withdrawFromAccount.id) !== null && _b !== void 0 ? _b : '')) === null || _c === void 0 ? void 0 : _c.zeniAccountId;
|
|
93
|
-
const recommendedVendor = billDetail.billDetailLocalData.recommendedVendorId != null
|
|
94
|
-
? (0, vendorSelector_1.getVendorByVendorId)(vendorState, billDetail.billDetailLocalData.recommendedVendorId)
|
|
95
|
-
: undefined;
|
|
96
|
-
const isRecommendedVendor = isVendorRecommendationEnabled &&
|
|
97
|
-
recommendedVendor != null &&
|
|
98
|
-
billDetail.addBillAutoFields.tentativeVendorName != null;
|
|
99
92
|
const isRecurring = Boolean(billDetail.billDetailLocalData.isRecurring) === true;
|
|
100
93
|
const payload = {
|
|
101
|
-
vendor_id:
|
|
102
|
-
|
|
103
|
-
: (_d = billDetail.billDetailLocalData.vendor) === null || _d === void 0 ? void 0 : _d.qboId,
|
|
104
|
-
vendor_name: isRecommendedVendor
|
|
105
|
-
? recommendedVendor.name
|
|
106
|
-
: (_e = billDetail.billDetailLocalData.vendor) === null || _e === void 0 ? void 0 : _e.name,
|
|
94
|
+
vendor_id: (_e = (_d = billDetail.billDetailLocalData.vendor) === null || _d === void 0 ? void 0 : _d.qboId) !== null && _e !== void 0 ? _e : '',
|
|
95
|
+
vendor_name: (_g = (_f = billDetail.billDetailLocalData.vendor) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : '',
|
|
107
96
|
//pass candidate_vendor_name only when we are not adding vendor(recommended or actual) to the bill
|
|
108
|
-
candidate_vendor_name:
|
|
109
|
-
((_f = billDetail.billDetailLocalData.vendor) === null || _f === void 0 ? void 0 : _f.qboId) != null
|
|
97
|
+
candidate_vendor_name: ((_h = billDetail.billDetailLocalData.vendor) === null || _h === void 0 ? void 0 : _h.qboId) != null
|
|
110
98
|
? undefined
|
|
111
|
-
: (
|
|
99
|
+
: (_j = billDetail.addBillAutoFields.tentativeVendorName) !== null && _j !== void 0 ? _j : billDetail.billDetailLocalData.candidateVendorname,
|
|
112
100
|
ocr_parsed_vendor_term: Boolean(billDetail.addBillAutoFields.tentativeVendorName) === true
|
|
113
101
|
? billDetail.addBillAutoFields.tentativeVendorName
|
|
114
102
|
: null,
|
|
115
103
|
transaction_type: 'bill',
|
|
116
104
|
bill_pay_provider: 'zeni',
|
|
117
105
|
account_id: zeniAccountId != null
|
|
118
|
-
? (
|
|
106
|
+
? (_k = (0, accountSelector_1.getAccountBase)(accountState, zeniAccountId, 'bill_pay')) === null || _k === void 0 ? void 0 : _k.qboId
|
|
119
107
|
: '',
|
|
120
|
-
file_id: (
|
|
121
|
-
transaction_date: (
|
|
122
|
-
due_date: (
|
|
123
|
-
total_amount: (
|
|
108
|
+
file_id: (_l = billDetail.billDetailLocalData.file) === null || _l === void 0 ? void 0 : _l.fileId,
|
|
109
|
+
transaction_date: (_p = (_o = (_m = billDetail.billDetailLocalData.whatForSection) === null || _m === void 0 ? void 0 : _m.invoiceDate) === null || _o === void 0 ? void 0 : _o.format('YYYY-MM-DD')) !== null && _p !== void 0 ? _p : (0, zeniDayJS_1.dateNow)().format('YYYY-MM-DD'),
|
|
110
|
+
due_date: (_s = (_r = (_q = billDetail.billDetailLocalData.whatForSection) === null || _q === void 0 ? void 0 : _q.billDueDate) === null || _r === void 0 ? void 0 : _r.format('YYYY-MM-DD')) !== null && _s !== void 0 ? _s : null,
|
|
111
|
+
total_amount: (_u = (_t = billDetail.billDetailLocalData.totalAmount) === null || _t === void 0 ? void 0 : _t.amount) !== null && _u !== void 0 ? _u : 0,
|
|
124
112
|
bill_pay_info: {
|
|
125
113
|
stage: {
|
|
126
114
|
code: billStageCode,
|
|
127
115
|
},
|
|
128
|
-
payment_date: (
|
|
116
|
+
payment_date: (_x = (_w = (_v = billDetail.billDetailLocalData.paymentDetailsSection) === null || _v === void 0 ? void 0 : _v.paymentDate) === null || _w === void 0 ? void 0 : _w.format('YYYY-MM-DD')) !== null && _x !== void 0 ? _x : null,
|
|
129
117
|
from_account: {
|
|
130
|
-
account_id: (
|
|
131
|
-
account_type: (
|
|
118
|
+
account_id: (_0 = (_z = (_y = billDetail.billDetailLocalData.paymentDetailsSection) === null || _y === void 0 ? void 0 : _y.withdrawFrom) === null || _z === void 0 ? void 0 : _z.id) !== null && _0 !== void 0 ? _0 : '',
|
|
119
|
+
account_type: (_3 = (0, helpers_1.accountTypeSubConfigCodeToAccType)((_2 = (_1 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _1 === void 0 ? void 0 : _1.withdrawFrom) === null || _2 === void 0 ? void 0 : _2.accType)) !== null && _3 !== void 0 ? _3 : '',
|
|
132
120
|
},
|
|
133
|
-
to_account: Object.assign({}, (((
|
|
121
|
+
to_account: Object.assign({}, (((_5 = (_4 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _4 === void 0 ? void 0 : _4.paymentType) === null || _5 === void 0 ? void 0 : _5.method.includes('international')) === true
|
|
134
122
|
? {
|
|
135
123
|
payment_instrument_id: Boolean(billDetail.billDetailLocalData
|
|
136
124
|
.isCollectToAccountInfoFromVendorContact) === false
|
|
137
|
-
? (
|
|
125
|
+
? (_7 = (_6 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _6 === void 0 ? void 0 : _6.paymentTo) !== null && _7 !== void 0 ? _7 : null
|
|
138
126
|
: null,
|
|
139
127
|
}
|
|
140
128
|
: {
|
|
141
129
|
account_id: Boolean(billDetail.billDetailLocalData
|
|
142
130
|
.isCollectToAccountInfoFromVendorContact) === false
|
|
143
|
-
? (
|
|
131
|
+
? (_9 = (_8 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _8 === void 0 ? void 0 : _8.paymentTo) !== null && _9 !== void 0 ? _9 : null
|
|
144
132
|
: null,
|
|
145
133
|
})),
|
|
146
|
-
to_account_vendor_email: (
|
|
134
|
+
to_account_vendor_email: (_10 = billDetail.billDetailLocalData.toAccountVendorEmail) !== null && _10 !== void 0 ? _10 : null,
|
|
147
135
|
is_collect_to_account_info_from_vendor_contact: billDetail.billDetailLocalData.isCollectToAccountInfoFromVendorContact,
|
|
148
136
|
is_cancelled: false,
|
|
149
|
-
bill_payment_method_type: getBillPaymentMethodTypePayload((
|
|
150
|
-
international_transfer_fee_bearer_payment_method: ((
|
|
151
|
-
((
|
|
152
|
-
? (
|
|
153
|
-
.internationalTransferFeeBearerPaymentMethod) !== null &&
|
|
137
|
+
bill_payment_method_type: getBillPaymentMethodTypePayload((_11 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _11 === void 0 ? void 0 : _11.paymentType),
|
|
138
|
+
international_transfer_fee_bearer_payment_method: ((_13 = (_12 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _12 === void 0 ? void 0 : _12.paymentType) === null || _13 === void 0 ? void 0 : _13.method.includes('international')) === true &&
|
|
139
|
+
((_14 = billDetail.billDetailLocalData.vendor) === null || _14 === void 0 ? void 0 : _14.vendorCurrencyCode) === 'USD'
|
|
140
|
+
? (_15 = billDetail.billDetailLocalData.paymentDetailsSection
|
|
141
|
+
.internationalTransferFeeBearerPaymentMethod) !== null && _15 !== void 0 ? _15 : 'swift_our' //default value for international method and USD currency
|
|
154
142
|
: null,
|
|
155
143
|
},
|
|
156
|
-
document_id: (
|
|
157
|
-
transaction_memo: (
|
|
158
|
-
currency_code: (
|
|
144
|
+
document_id: (_16 = billDetail.billDetailLocalData.whatForSection) === null || _16 === void 0 ? void 0 : _16.invoiceNumber,
|
|
145
|
+
transaction_memo: (_17 = billDetail.billDetailLocalData.whatForSection) === null || _17 === void 0 ? void 0 : _17.memo,
|
|
146
|
+
currency_code: (_19 = (_18 = billDetail.billDetailLocalData.whatForSection) === null || _18 === void 0 ? void 0 : _18.currencyCode) !== null && _19 !== void 0 ? _19 : 'USD',
|
|
159
147
|
lines: Object.keys(billDetail.billDetailLocalData.updatesByLineId).map((lineId) => {
|
|
160
148
|
const line = billDetail.billDetailLocalData.updatesByLineId[lineId];
|
|
161
149
|
const lineAsTransactionLinePayload = (0, editBillViewPayload_1.fromLineLocalDataToTransactionLinePayload)(line);
|
|
@@ -163,12 +151,12 @@ function prepareSaveBillPayload(accountState, billTransactionState, paymentAccou
|
|
|
163
151
|
}),
|
|
164
152
|
};
|
|
165
153
|
if (!isRecurring) {
|
|
166
|
-
payload.vendor_name = (
|
|
154
|
+
payload.vendor_name = (_21 = (_20 = billDetail.billDetailLocalData.vendor) === null || _20 === void 0 ? void 0 : _20.name) !== null && _21 !== void 0 ? _21 : '';
|
|
167
155
|
}
|
|
168
156
|
if (billId != null) {
|
|
169
157
|
detail = (0, get_1.default)(billTransactionState.transactionById, billId, undefined);
|
|
170
|
-
payload.sync_token = (
|
|
171
|
-
payload.update_time = (
|
|
158
|
+
payload.sync_token = (_22 = detail === null || detail === void 0 ? void 0 : detail.syncToken) !== null && _22 !== void 0 ? _22 : null;
|
|
159
|
+
payload.update_time = (_23 = detail === null || detail === void 0 ? void 0 : detail.updateTime.format('YYYY-MM-DD')) !== null && _23 !== void 0 ? _23 : null;
|
|
172
160
|
//required by platform to clear old recurring details
|
|
173
161
|
if ((detail === null || detail === void 0 ? void 0 : detail.isRecurring) === true &&
|
|
174
162
|
Boolean(billDetail.billDetailLocalData.isRecurring) === false) {
|
|
@@ -179,7 +167,7 @@ function prepareSaveBillPayload(accountState, billTransactionState, paymentAccou
|
|
|
179
167
|
payload.are_approvals_serialized = true;
|
|
180
168
|
}
|
|
181
169
|
if (billStageCode === 'pending_approval' &&
|
|
182
|
-
((
|
|
170
|
+
((_24 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _24 === void 0 ? void 0 : _24.conversionRate) != null) {
|
|
183
171
|
// required by platform
|
|
184
172
|
payload.exchange_rate =
|
|
185
173
|
1 / billDetail.billDetailLocalData.paymentDetailsSection.conversionRate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.80",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|