@zeniai/client-epic-state 5.2.69 → 5.2.70
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/entity/actualMatching/actualMatchingReducer.d.ts +1 -3
- package/lib/entity/actualMatching/actualMatchingReducer.js +2 -11
- package/lib/entity/aiCfo/aiCfoState.d.ts +2 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/invoicing/plan/planPayload.d.ts +40 -0
- package/lib/entity/invoicing/plan/planPayload.js +51 -0
- package/lib/entity/invoicing/plan/planReducer.d.ts +14 -0
- package/lib/entity/invoicing/{invoicingCatalog/invoicingCatalogReducer.js → plan/planReducer.js} +21 -20
- package/lib/entity/invoicing/{invoicingCatalog/invoicingCatalogSelector.d.ts → plan/planSelector.d.ts} +6 -5
- package/lib/entity/invoicing/{invoicingCatalog/invoicingCatalogSelector.js → plan/planSelector.js} +12 -12
- package/lib/entity/invoicing/plan/planState.d.ts +43 -0
- package/lib/entity/invoicing/{invoicingCatalog/invoicingCatalogPayload.d.ts → product/productPayload.d.ts} +6 -44
- package/lib/entity/invoicing/{invoicingCatalog/invoicingCatalogPayload.js → product/productPayload.js} +6 -50
- package/lib/entity/invoicing/product/productReducer.d.ts +9 -0
- package/lib/entity/invoicing/product/productReducer.js +50 -0
- package/lib/entity/invoicing/product/productSelector.d.ts +4 -0
- package/lib/entity/invoicing/product/productSelector.js +17 -0
- package/lib/entity/invoicing/{invoicingCatalog/invoicingCatalogState.d.ts → product/productState.d.ts} +6 -42
- package/lib/entity/invoicing/product/productState.js +2 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +4 -4
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +10 -2
- package/lib/epic.d.ts +2 -4
- package/lib/epic.js +1 -5
- package/lib/esm/entity/actualMatching/actualMatchingReducer.js +1 -9
- package/lib/esm/entity/invoicing/plan/planPayload.js +47 -0
- package/lib/esm/entity/invoicing/{invoicingCatalog/invoicingCatalogReducer.js → plan/planReducer.js} +20 -19
- package/lib/esm/entity/invoicing/{invoicingCatalog/invoicingCatalogSelector.js → plan/planSelector.js} +8 -8
- package/lib/esm/entity/invoicing/{invoicingCatalog/invoicingCatalogPayload.js → product/productPayload.js} +3 -46
- package/lib/esm/entity/invoicing/product/productReducer.js +43 -0
- package/lib/esm/entity/invoicing/product/productSelector.js +10 -0
- package/lib/esm/entity/invoicing/product/productState.js +1 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -1
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +10 -2
- package/lib/esm/epic.js +1 -5
- package/lib/esm/index.js +11 -9
- package/lib/esm/reducer.js +7 -4
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/actualMatching/fetchActualMatchingMatchEpic.js +2 -4
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/actualMatching/matchAndReverseAccrualsEpic.js +13 -26
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/actualMatching/searchMatchTransactionsEpic.js +23 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -1
- package/lib/esm/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +38 -89
- package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +64 -66
- package/lib/esm/view/expenseAutomationView/types/actualMatchingViewState.js +0 -15
- package/lib/esm/view/invoicing/createInvoice/createInvoiceEpic.js +1 -9
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +3 -5
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.js +2 -2
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.js +2 -2
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogProductActionEpic.js +4 -4
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +7 -3
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +2 -2
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js +1 -5
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +1 -5
- package/lib/esm/view/invoicing/invoiceList/invoiceListReducer.js +1 -8
- package/lib/esm/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogPlanListEpic.js +2 -2
- package/lib/esm/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.js +2 -2
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +4 -4
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +9 -18
- package/lib/esm/view/invoicing/settingsView/submitInvoicingBrandingFormEpic.js +2 -11
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +11 -31
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +1 -2
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +30 -4
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +1 -21
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +1 -2
- package/lib/index.d.ts +16 -13
- package/lib/index.js +60 -65
- package/lib/reducer.d.ts +2 -1
- package/lib/reducer.js +7 -4
- package/lib/rootStateTypes.d.ts +5 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/fetchActualMatchingMatchEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/fetchActualMatchingMatchEpic.js +1 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/matchAndReverseAccrualsEpic.js +11 -24
- package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/searchMatchTransactionsEpic.js +22 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -1
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.d.ts +1 -12
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.d.ts +8 -19
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +39 -90
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.d.ts +8 -20
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.d.ts +4 -7
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +64 -69
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +4 -20
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.js +1 -18
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.d.ts +2 -3
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.js +0 -8
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +2 -2
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +9 -8
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +3 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.d.ts +4 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogProductActionEpic.d.ts +3 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogProductActionEpic.js +4 -4
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts +3 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +7 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.d.ts +1 -3
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js +2 -6
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.d.ts +1 -3
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +1 -5
- package/lib/view/invoicing/invoiceList/invoiceListReducer.d.ts +1 -3
- package/lib/view/invoicing/invoiceList/invoiceListReducer.js +2 -9
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogListPageEpic.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogPlanListEpic.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogPlanListEpic.js +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.js +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewPayload.d.ts +3 -3
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.d.ts +5 -4
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +4 -4
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewState.d.ts +1 -1
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +1 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +1 -1
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +3 -12
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +8 -17
- package/lib/view/invoicing/settingsView/submitInvoicingBrandingFormEpic.js +2 -11
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +11 -31
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +2 -3
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +1 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +0 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +5 -5
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +2 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +1 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +30 -4
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +2 -22
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +0 -1
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +1 -2
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -1
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +1 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewReducer.d.ts +2 -2
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +5 -5
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +2 -2
- package/package.json +1 -1
- package/lib/entity/invoicing/invoicingCatalog/invoicingCatalogReducer.d.ts +0 -12
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.js +0 -50
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/resetKycKybEpic.js +0 -37
- package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.d.ts +0 -10
- package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.js +0 -54
- package/lib/view/spendManagement/commonSetup/epic/setup/resetKycKybEpic.d.ts +0 -8
- package/lib/view/spendManagement/commonSetup/epic/setup/resetKycKybEpic.js +0 -41
- /package/lib/entity/invoicing/{invoicingCatalog/invoicingCatalogState.js → plan/planState.js} +0 -0
- /package/lib/esm/entity/invoicing/{invoicingCatalog/invoicingCatalogState.js → plan/planState.js} +0 -0
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { from, of } from 'rxjs';
|
|
2
|
-
import { catchError, exhaustMap, filter, groupBy, mergeMap, takeUntil, } from 'rxjs/operators';
|
|
3
|
-
import { removeActualMatchingMatch } from '../../../../../entity/actualMatching/actualMatchingReducer';
|
|
4
|
-
import { getActualMatchingMatchById } from '../../../../../entity/actualMatching/actualMatchingSelector';
|
|
5
|
-
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
6
|
-
import { createZeniAPIStatus, isSuccessResponse } from '../../../../../responsePayload';
|
|
7
|
-
import { clearAll } from '../../../../../rootActions';
|
|
8
|
-
import { ignoreActualMatchingSuggestion, ignoreActualMatchingSuggestionFailure, ignoreActualMatchingSuggestionSuccess, } from '../../../reducers/actualMatchingViewReducer';
|
|
9
|
-
import { refreshActualMatchingList } from './refreshActualMatchingList';
|
|
10
|
-
function matchVendorName(state, matchId) {
|
|
11
|
-
return (getActualMatchingMatchById(state.actualMatchingState, matchId)?.vendorName ??
|
|
12
|
-
'');
|
|
13
|
-
}
|
|
14
|
-
function ignoreSuggestionSnackbar(vendorName, succeeded) {
|
|
15
|
-
return openSnackbar({
|
|
16
|
-
messageSection: 'actual_matching_ignore_suggestion',
|
|
17
|
-
messageText: succeeded ? 'success' : 'failed',
|
|
18
|
-
type: succeeded ? 'success' : 'error',
|
|
19
|
-
variables: [{ variableName: '_vendor_name_', variableValue: vendorName }],
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export const ignoreActualMatchingSuggestionEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(ignoreActualMatchingSuggestion.match), groupBy((action) => action.payload.matchId), mergeMap((perMatch$) => perMatch$.pipe(exhaustMap((action) => {
|
|
23
|
-
const { matchId, reason, note } = action.payload;
|
|
24
|
-
const body = {
|
|
25
|
-
reason,
|
|
26
|
-
...(note != null && note !== '' ? { note } : {}),
|
|
27
|
-
};
|
|
28
|
-
const vendorName = matchVendorName(state$.value, matchId);
|
|
29
|
-
return zeniAPI
|
|
30
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accruals/actual-matching/${encodeURIComponent(matchId)}/ignore`, body)
|
|
31
|
-
.pipe(mergeMap((response) => {
|
|
32
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
33
|
-
const successActions = [
|
|
34
|
-
removeActualMatchingMatch(matchId),
|
|
35
|
-
ignoreActualMatchingSuggestionSuccess({ matchId }),
|
|
36
|
-
...refreshActualMatchingList(state$.value),
|
|
37
|
-
ignoreSuggestionSnackbar(vendorName, true),
|
|
38
|
-
];
|
|
39
|
-
return from(successActions);
|
|
40
|
-
}
|
|
41
|
-
return of(ignoreActualMatchingSuggestionFailure({
|
|
42
|
-
matchId,
|
|
43
|
-
status: response.status,
|
|
44
|
-
}), ignoreSuggestionSnackbar(vendorName, false));
|
|
45
|
-
}), catchError((error) => of(ignoreActualMatchingSuggestionFailure({
|
|
46
|
-
matchId,
|
|
47
|
-
status: createZeniAPIStatus('Unexpected Error', 'Ignore actual matching suggestion REST API call errored out' +
|
|
48
|
-
JSON.stringify(error)),
|
|
49
|
-
}), ignoreSuggestionSnackbar(vendorName, false))), takeUntil(actions$.pipe(filter(clearAll.match))));
|
|
50
|
-
}))));
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { from } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
5
|
-
import { resetKycKyb, resetKycKybFailure, resetKycKybSuccess, } from '../../setupViewReducer';
|
|
6
|
-
export const resetKycKybEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(resetKycKyb.match), mergeMap(() => zeniAPI
|
|
7
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/kyc-kyb-reset`, { is_reset_company_officers: false })
|
|
8
|
-
.pipe(mergeMap((response) => {
|
|
9
|
-
if (isSuccessResponse(response)) {
|
|
10
|
-
return from([
|
|
11
|
-
resetKycKybSuccess(),
|
|
12
|
-
openSnackbar({
|
|
13
|
-
messageSection: 'kyc_kyb_reset',
|
|
14
|
-
messageText: 'success',
|
|
15
|
-
type: 'success',
|
|
16
|
-
}),
|
|
17
|
-
]);
|
|
18
|
-
}
|
|
19
|
-
return from([
|
|
20
|
-
resetKycKybFailure(response.status),
|
|
21
|
-
openSnackbar({
|
|
22
|
-
messageSection: 'kyc_kyb_reset',
|
|
23
|
-
messageText: 'failed',
|
|
24
|
-
type: 'error',
|
|
25
|
-
}),
|
|
26
|
-
]);
|
|
27
|
-
}), catchError((error) => from([
|
|
28
|
-
resetKycKybFailure(createZeniAPIStatus('Unexpected error', 'Reset KYC/KYB errored out: ' +
|
|
29
|
-
(error instanceof Error
|
|
30
|
-
? error.message
|
|
31
|
-
: JSON.stringify(error)))),
|
|
32
|
-
openSnackbar({
|
|
33
|
-
messageSection: 'kyc_kyb_reset',
|
|
34
|
-
messageText: 'failed',
|
|
35
|
-
type: 'error',
|
|
36
|
-
}),
|
|
37
|
-
])))));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { removeActualMatchingMatch } from '../../../../../entity/actualMatching/actualMatchingReducer';
|
|
4
|
-
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
5
|
-
import { clearAll } from '../../../../../rootActions';
|
|
6
|
-
import { RootState } from '../../../../../rootStateTypes';
|
|
7
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
8
|
-
import { fetchActualMatching, ignoreActualMatchingSuggestion, ignoreActualMatchingSuggestionFailure, ignoreActualMatchingSuggestionSuccess } from '../../../reducers/actualMatchingViewReducer';
|
|
9
|
-
export type ActionType = ReturnType<typeof clearAll> | ReturnType<typeof fetchActualMatching> | ReturnType<typeof ignoreActualMatchingSuggestion> | ReturnType<typeof ignoreActualMatchingSuggestionFailure> | ReturnType<typeof ignoreActualMatchingSuggestionSuccess> | ReturnType<typeof openSnackbar> | ReturnType<typeof removeActualMatchingMatch>;
|
|
10
|
-
export declare const ignoreActualMatchingSuggestionEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ignoreActualMatchingSuggestionEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const actualMatchingReducer_1 = require("../../../../../entity/actualMatching/actualMatchingReducer");
|
|
7
|
-
const actualMatchingSelector_1 = require("../../../../../entity/actualMatching/actualMatchingSelector");
|
|
8
|
-
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
9
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
10
|
-
const rootActions_1 = require("../../../../../rootActions");
|
|
11
|
-
const actualMatchingViewReducer_1 = require("../../../reducers/actualMatchingViewReducer");
|
|
12
|
-
const refreshActualMatchingList_1 = require("./refreshActualMatchingList");
|
|
13
|
-
function matchVendorName(state, matchId) {
|
|
14
|
-
return ((0, actualMatchingSelector_1.getActualMatchingMatchById)(state.actualMatchingState, matchId)?.vendorName ??
|
|
15
|
-
'');
|
|
16
|
-
}
|
|
17
|
-
function ignoreSuggestionSnackbar(vendorName, succeeded) {
|
|
18
|
-
return (0, snackbarReducer_1.openSnackbar)({
|
|
19
|
-
messageSection: 'actual_matching_ignore_suggestion',
|
|
20
|
-
messageText: succeeded ? 'success' : 'failed',
|
|
21
|
-
type: succeeded ? 'success' : 'error',
|
|
22
|
-
variables: [{ variableName: '_vendor_name_', variableValue: vendorName }],
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
const ignoreActualMatchingSuggestionEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(actualMatchingViewReducer_1.ignoreActualMatchingSuggestion.match), (0, operators_1.groupBy)((action) => action.payload.matchId), (0, operators_1.mergeMap)((perMatch$) => perMatch$.pipe((0, operators_1.exhaustMap)((action) => {
|
|
26
|
-
const { matchId, reason, note } = action.payload;
|
|
27
|
-
const body = {
|
|
28
|
-
reason,
|
|
29
|
-
...(note != null && note !== '' ? { note } : {}),
|
|
30
|
-
};
|
|
31
|
-
const vendorName = matchVendorName(state$.value, matchId);
|
|
32
|
-
return zeniAPI
|
|
33
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accruals/actual-matching/${encodeURIComponent(matchId)}/ignore`, body)
|
|
34
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
35
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
36
|
-
const successActions = [
|
|
37
|
-
(0, actualMatchingReducer_1.removeActualMatchingMatch)(matchId),
|
|
38
|
-
(0, actualMatchingViewReducer_1.ignoreActualMatchingSuggestionSuccess)({ matchId }),
|
|
39
|
-
...(0, refreshActualMatchingList_1.refreshActualMatchingList)(state$.value),
|
|
40
|
-
ignoreSuggestionSnackbar(vendorName, true),
|
|
41
|
-
];
|
|
42
|
-
return (0, rxjs_1.from)(successActions);
|
|
43
|
-
}
|
|
44
|
-
return (0, rxjs_1.of)((0, actualMatchingViewReducer_1.ignoreActualMatchingSuggestionFailure)({
|
|
45
|
-
matchId,
|
|
46
|
-
status: response.status,
|
|
47
|
-
}), ignoreSuggestionSnackbar(vendorName, false));
|
|
48
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, actualMatchingViewReducer_1.ignoreActualMatchingSuggestionFailure)({
|
|
49
|
-
matchId,
|
|
50
|
-
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Ignore actual matching suggestion REST API call errored out' +
|
|
51
|
-
JSON.stringify(error)),
|
|
52
|
-
}), ignoreSuggestionSnackbar(vendorName, false))), (0, operators_1.takeUntil)(actions$.pipe((0, operators_1.filter)(rootActions_1.clearAll.match))));
|
|
53
|
-
}))));
|
|
54
|
-
exports.ignoreActualMatchingSuggestionEpic = ignoreActualMatchingSuggestionEpic;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
4
|
-
import { RootState } from '../../../../../rootStateTypes';
|
|
5
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
-
import { resetKycKyb, resetKycKybFailure, resetKycKybSuccess } from '../../setupViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof openSnackbar> | ReturnType<typeof resetKycKyb> | ReturnType<typeof resetKycKybSuccess> | ReturnType<typeof resetKycKybFailure>;
|
|
8
|
-
export declare const resetKycKybEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resetKycKybEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
-
const setupViewReducer_1 = require("../../setupViewReducer");
|
|
9
|
-
const resetKycKybEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.resetKycKyb.match), (0, operators_1.mergeMap)(() => zeniAPI
|
|
10
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/kyc-kyb-reset`, { is_reset_company_officers: false })
|
|
11
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
12
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
13
|
-
return (0, rxjs_1.from)([
|
|
14
|
-
(0, setupViewReducer_1.resetKycKybSuccess)(),
|
|
15
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
16
|
-
messageSection: 'kyc_kyb_reset',
|
|
17
|
-
messageText: 'success',
|
|
18
|
-
type: 'success',
|
|
19
|
-
}),
|
|
20
|
-
]);
|
|
21
|
-
}
|
|
22
|
-
return (0, rxjs_1.from)([
|
|
23
|
-
(0, setupViewReducer_1.resetKycKybFailure)(response.status),
|
|
24
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
25
|
-
messageSection: 'kyc_kyb_reset',
|
|
26
|
-
messageText: 'failed',
|
|
27
|
-
type: 'error',
|
|
28
|
-
}),
|
|
29
|
-
]);
|
|
30
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
|
|
31
|
-
(0, setupViewReducer_1.resetKycKybFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Reset KYC/KYB errored out: ' +
|
|
32
|
-
(error instanceof Error
|
|
33
|
-
? error.message
|
|
34
|
-
: JSON.stringify(error)))),
|
|
35
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
36
|
-
messageSection: 'kyc_kyb_reset',
|
|
37
|
-
messageText: 'failed',
|
|
38
|
-
type: 'error',
|
|
39
|
-
}),
|
|
40
|
-
])))));
|
|
41
|
-
exports.resetKycKybEpic = resetKycKybEpic;
|
/package/lib/entity/invoicing/{invoicingCatalog/invoicingCatalogState.js → plan/planState.js}
RENAMED
|
File without changes
|
/package/lib/esm/entity/invoicing/{invoicingCatalog/invoicingCatalogState.js → plan/planState.js}
RENAMED
|
File without changes
|