@zeniai/client-epic-state 4.8.37 → 4.8.39
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.
|
@@ -146,8 +146,9 @@ import { clearAllTaskSummary } from '../taskSummary/taskSummaryReducer';
|
|
|
146
146
|
import { clearCompanyHealthMetricView } from '../../view/companyHealthMetricView/companyHealthMetricViewReducer';
|
|
147
147
|
import { clearCompanyHealthMetric } from '../companyHealthMetric/companyHealthMetricReducer';
|
|
148
148
|
import { clearZeniAccountsPromoCard } from '../../view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer';
|
|
149
|
+
import { clearAllJEScheduleTransactions } from '../jeSchedules/jeSchedulesReducer';
|
|
149
150
|
declare type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearEntityAutoCompleteResults> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard> | ReturnType<typeof clearZeniAccountSetupView>;
|
|
150
|
-
declare type clearActionTypeForEntities = ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
|
|
151
|
+
declare type clearActionTypeForEntities = ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
|
|
151
152
|
export declare type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
|
|
152
153
|
export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
|
|
153
154
|
export {};
|
|
@@ -152,6 +152,7 @@ const taskSummaryReducer_1 = require("../taskSummary/taskSummaryReducer");
|
|
|
152
152
|
const companyHealthMetricViewReducer_1 = require("../../view/companyHealthMetricView/companyHealthMetricViewReducer");
|
|
153
153
|
const companyHealthMetricReducer_1 = require("../companyHealthMetric/companyHealthMetricReducer");
|
|
154
154
|
const zeniAccountsPromoCardReducer_1 = require("../../view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer");
|
|
155
|
+
const jeSchedulesReducer_1 = require("../jeSchedules/jeSchedulesReducer");
|
|
155
156
|
const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.clearAll.match), (0, operators_1.mergeMap)((action) => {
|
|
156
157
|
const { keepTenantCompanyState } = action.payload;
|
|
157
158
|
// Note: Please maintain strict alphabetical order
|
|
@@ -283,6 +284,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
|
|
|
283
284
|
(0, forecastReducer_1.clearAllForecasts)(),
|
|
284
285
|
(0, globalMerchantReducer_1.clearAllGlobalMerchants)(),
|
|
285
286
|
(0, insightReducer_1.clearAllInsights)(),
|
|
287
|
+
(0, jeSchedulesReducer_1.clearAllJEScheduleTransactions)(),
|
|
286
288
|
(0, merchantReducer_1.clearAllMerchants)(),
|
|
287
289
|
(0, onboardingCustomerReducer_1.clearAllOnboardingCustomersInfo)(),
|
|
288
290
|
(0, paymentAccountReducer_1.clearAllPaymentAccounts)(),
|
package/lib/view/scheduleView/scheduleDetailView/epics/initializeScheduleDetailLocalDataEpic.js
CHANGED
|
@@ -22,10 +22,8 @@ const initializeScheduleDetailLocalDataEpic = (actions$, state$) => actions$.pip
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
|
-
// Initialize the start posting date with the start month of transaction
|
|
26
|
-
const transactionStartMonth = jeScheduleTransactionState.baseTransaction.date.endOf('month');
|
|
27
25
|
actions.push((0, scheduleDetailReducer_1.updateScheduleDetailsLocalData)({
|
|
28
|
-
localData: Object.assign(
|
|
26
|
+
localData: Object.assign({}, scheduleDetailState.newScheduleState),
|
|
29
27
|
selectedJeScheduleDetailId: undefined,
|
|
30
28
|
}));
|
|
31
29
|
}
|
|
@@ -128,9 +128,7 @@ const getTotalPayments = (startDate, endDate, frequency, currentInstance) => {
|
|
|
128
128
|
switch (frequency) {
|
|
129
129
|
case 'weekly':
|
|
130
130
|
case 'biweekly':
|
|
131
|
-
totalPayments =
|
|
132
|
-
endDate.diff(currentStartDate, 'day') /
|
|
133
|
-
getRecurringFrequencyInDays(frequency);
|
|
131
|
+
totalPayments = endDate.diff(currentStartDate, 'day') / getRecurringFrequencyInDays(frequency);
|
|
134
132
|
break;
|
|
135
133
|
case 'monthly':
|
|
136
134
|
totalPayments = endDate.diff(currentStartDate, 'month');
|
|
@@ -170,15 +168,9 @@ function getRecurringBillInstances(startDate, frequency, totalPayments, currentI
|
|
|
170
168
|
const getRecurringFrequencyWithOffset = (frequency) => {
|
|
171
169
|
switch (frequency) {
|
|
172
170
|
case 'weekly':
|
|
173
|
-
return {
|
|
174
|
-
offSetValue: getRecurringFrequencyInDays(frequency),
|
|
175
|
-
offSetUnit: 'day',
|
|
176
|
-
};
|
|
171
|
+
return { offSetValue: getRecurringFrequencyInDays(frequency), offSetUnit: 'day' };
|
|
177
172
|
case 'biweekly':
|
|
178
|
-
return {
|
|
179
|
-
offSetValue: getRecurringFrequencyInDays(frequency),
|
|
180
|
-
offSetUnit: 'day',
|
|
181
|
-
};
|
|
173
|
+
return { offSetValue: getRecurringFrequencyInDays(frequency), offSetUnit: 'day' };
|
|
182
174
|
case 'monthly':
|
|
183
175
|
return { offSetValue: 1, offSetUnit: 'month' };
|
|
184
176
|
case 'quarterly':
|
|
@@ -189,6 +181,7 @@ function getRecurringBillInstances(startDate, frequency, totalPayments, currentI
|
|
|
189
181
|
for (let i = 0; i < totalPayments; i++) {
|
|
190
182
|
updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false, amount: billAmount }, checkIfHolidayAndGetNextDate(startDate.add(i * offSetValue, offSetUnit))));
|
|
191
183
|
}
|
|
184
|
+
;
|
|
192
185
|
return updatedInstances;
|
|
193
186
|
}
|
|
194
187
|
function getRecurringFrequencyInDays(frequency) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.39",
|
|
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",
|