@zeniai/client-epic-state 4.12.66 → 4.12.68
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/paymentAccount/paymentAccountPayload.d.ts +1 -1
- package/lib/entity/paymentAccount/paymentAccountPayload.js +7 -7
- package/lib/entity/tenant/clearAllEpic.d.ts +1 -1
- package/lib/entity/tenant/clearAllEpic.js +1 -1
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +1 -6
- package/lib/entity/vendor/vendorPayload.d.ts +1 -2
- package/lib/entity/vendor/vendorPayload.js +4 -6
- package/lib/entity/vendor/vendorState.d.ts +0 -1
- package/lib/entity/vendor/vendorType.d.ts +1 -2
- package/lib/epic.d.ts +2 -5
- package/lib/epic.js +2 -5
- package/lib/index.d.ts +8 -15
- package/lib/index.js +16 -31
- package/lib/reducer.d.ts +1 -4
- package/lib/reducer.js +1 -4
- package/lib/view/commonVendorView/vendorView/epics/fetchVendorDetailsEpic.js +2 -2
- package/lib/view/commonVendorView/vendorView/vendorViewPayload.d.ts +0 -6
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorDetailPageViewEpic.d.ts +1 -2
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorDetailPageViewEpic.js +1 -6
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorEpic.d.ts +2 -3
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/fetchVendorsTabVendorEpic.js +2 -4
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/resetVendorsTabVendorDetailLocalDataEpic.js +1 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/vendorsTabVendorDetailLocalDataHelpers.d.ts +1 -3
- package/lib/view/commonVendorView/vendorsTabVendorView/epics/vendorsTabVendorDetailLocalDataHelpers.js +3 -14
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewPayload.d.ts +0 -5
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewPayload.js +1 -35
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -7
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.js +3 -23
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -16
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +7 -24
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.d.ts +0 -16
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState.js +0 -3
- package/lib/view/settingsView/settingsViewSelector.js +1 -1
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +2 -2
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +1 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +5 -5
- package/lib/view/spendManagement/chargeCards/chargeCardList/issueChargeCardEpic.js +5 -8
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -11
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +7 -16
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountListEpic.d.ts +2 -2
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountListEpic.js +6 -12
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountList.d.ts +0 -1
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer.d.ts +0 -6
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListReducer.js +2 -25
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.d.ts +0 -1
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListSelector.js +0 -1
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.js +0 -8
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +1 -1
- package/lib/view/twoFactorAuthentication/sendOtpEpic.js +6 -9
- package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/json/vendorFiling1099ListSuccess.json +1 -1
- package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListMock.d.ts +3 -3
- package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListMock.js +3 -17
- package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListSelectorMock.d.ts +1 -1
- package/lib/view/{vendorFiling1099 → vendorFiling1099List}/__mock__/vendorFiling1099ListSelectorMock.js +1 -10
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/fetchVendorsFiling1099ListEpic.d.ts +5 -5
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/fetchVendorsFiling1099ListEpic.js +6 -6
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListPayload.d.ts +3 -3
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListReducer.d.ts +4 -8
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListReducer.js +5 -18
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListSelector.d.ts +6 -6
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListSelector.js +3 -8
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListState.d.ts +3 -3
- package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListState.js +1 -1
- package/lib/view/vendorTabView/fetchVendorTabViewEpic.d.ts +1 -1
- package/lib/view/vendorTabView/fetchVendorTabViewEpic.js +2 -2
- package/package.json +1 -2
- package/lib/entity/vendor/__mocks__/vendorMock.d.ts +0 -7
- package/lib/entity/vendor/__mocks__/vendorMock.js +0 -339
- package/lib/view/addressView/__mocks__/addressViewMocks.d.ts +0 -34
- package/lib/view/addressView/__mocks__/addressViewMocks.js +0 -223
- package/lib/view/addressView/__mocks__/json/createAddressResponse.json +0 -23
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +0 -218
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +0 -345
- package/lib/view/addressView/__mocks__/json/fetchAddressResponse.json +0 -24
- package/lib/view/addressView/__mocks__/json/updateAddressResponse.json +0 -24
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountBalanceEpic.d.ts +0 -9
- package/lib/view/spendManagement/zeniAccounts/paymentAccountList/fetchPaymentAccountBalanceEpic.js +0 -48
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.d.ts +0 -132
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099UploadDetailsMock.js +0 -146
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.d.ts +0 -8
- package/lib/view/vendorFiling1099/vendorFiling1099List/fetchVendorsFiling1099AllEpic.js +0 -30
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsPayload.d.ts +0 -20
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsPayload.js +0 -48
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.d.ts +0 -25
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsReducer.js +0 -180
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSaveEpic.d.ts +0 -11
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSaveEpic.js +0 -58
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSelector.d.ts +0 -14
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsSelector.js +0 -17
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsState.d.ts +0 -26
- package/lib/view/vendorFiling1099/vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsState.js +0 -2
- /package/lib/view/{vendorFiling1099/vendorFiling1099List → vendorFiling1099List}/vendorFiling1099ListPayload.js +0 -0
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.vendorFiling1099UploadDetailsSaveEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
-
const vendorFiling1099UploadDetailsPayload_1 = require("../vendorFiling1099UploadDetails/vendorFiling1099UploadDetailsPayload");
|
|
8
|
-
const vendorFiling1099UploadDetailsReducer_1 = require("./vendorFiling1099UploadDetailsReducer");
|
|
9
|
-
const vendorReducer_1 = require("../../../entity/vendor/vendorReducer");
|
|
10
|
-
const addressReducer_1 = require("../../../entity/address/addressReducer");
|
|
11
|
-
const commonVendorViewHelper_1 = require("../../commonVendorView/commonVendorViewHelper");
|
|
12
|
-
const contactReducer_1 = require("../../../entity/billPay/contact/contactReducer");
|
|
13
|
-
const bankAccountReducer_1 = require("../../../entity/bankAccount/bankAccountReducer");
|
|
14
|
-
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
15
|
-
const vendorFiling1099UploadDetailsSaveEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(vendorFiling1099UploadDetailsReducer_1.vendorFiling1099UploadDetailsSave.match), (0, operators_1.mergeMap)((action) => {
|
|
16
|
-
var _a;
|
|
17
|
-
const state = state$.value;
|
|
18
|
-
const vendorFiling1099ViewState = state.vendorFiling1099UploadDetailsState;
|
|
19
|
-
const address = (_a = state$.value.addressViewState.newAddressState) === null || _a === void 0 ? void 0 : _a.vendor_address.addressToCreate;
|
|
20
|
-
const vendorId = action.payload.vendorId;
|
|
21
|
-
const payload = (0, vendorFiling1099UploadDetailsPayload_1.prepareEditVendor1099DetailsPayload)(state, vendorFiling1099ViewState.vendor1099DetailsLocalData, vendorId, address);
|
|
22
|
-
const saveVendorApi = zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/vendors/${vendorId}`, payload);
|
|
23
|
-
return saveVendorApi.pipe((0, operators_1.mergeMap)((response) => {
|
|
24
|
-
var _a;
|
|
25
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
26
|
-
const flattenedAddresses = (0, commonVendorViewHelper_1.getFlattenedAddress)(response.data.vendors);
|
|
27
|
-
const flattenedBankAccounts = (0, commonVendorViewHelper_1.getFlattenedBankAccounts)(response.data.vendors);
|
|
28
|
-
const actions = [
|
|
29
|
-
(0, vendorReducer_1.updateVendors)(response.data.vendors),
|
|
30
|
-
(0, contactReducer_1.updateContacts)((_a = response.data.vendors[0].contacts) !== null && _a !== void 0 ? _a : []),
|
|
31
|
-
(0, addressReducer_1.updateAddresses)(flattenedAddresses),
|
|
32
|
-
(0, bankAccountReducer_1.updateBankAccounts)(flattenedBankAccounts),
|
|
33
|
-
];
|
|
34
|
-
actions.push((0, vendorFiling1099UploadDetailsReducer_1.vendorFiling1099UploadDetailsResetLocalData)(action.payload.vendorId));
|
|
35
|
-
actions.push((0, vendorFiling1099UploadDetailsReducer_1.vendorFiling1099UploadDetailsSuccessOrFailure)('Completed'));
|
|
36
|
-
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
37
|
-
messageSection: 'update_vendor',
|
|
38
|
-
messageText: 'success',
|
|
39
|
-
type: 'success',
|
|
40
|
-
}));
|
|
41
|
-
return (0, rxjs_1.from)(actions);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return (0, rxjs_1.of)((0, vendorFiling1099UploadDetailsReducer_1.vendorFiling1099UploadDetailsSuccessOrFailure)('Error', response.status), (0, snackbarReducer_1.openSnackbar)({
|
|
45
|
-
messageSection: 'update_vendor',
|
|
46
|
-
messageText: 'failed',
|
|
47
|
-
type: 'error',
|
|
48
|
-
variables: [
|
|
49
|
-
{
|
|
50
|
-
variableName: '_api-error_',
|
|
51
|
-
variableValue: response.status.message,
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
}));
|
|
55
|
-
}
|
|
56
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, vendorFiling1099UploadDetailsReducer_1.vendorFiling1099UploadDetailsSuccessOrFailure)('Error', (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Vendors Filing 1099 Upload Details save REST API call errored out ${JSON.stringify(error)}`)))));
|
|
57
|
-
}));
|
|
58
|
-
exports.vendorFiling1099UploadDetailsSaveEpic = vendorFiling1099UploadDetailsSaveEpic;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { Vendor } from '../../../entity/vendor/vendorState';
|
|
4
|
-
import { RootState } from '../../../reducer';
|
|
5
|
-
import { Attachment } from '../../../entity/transaction/stateTypes/attachment';
|
|
6
|
-
import { VendorType } from '../../vendorTypeList/vendorTypeListPayload';
|
|
7
|
-
import { NewAddressData } from '../../addressView/addressViewState';
|
|
8
|
-
export interface VendorFiling1099UploadDetailsSelectorView extends SelectorView {
|
|
9
|
-
vendor: Vendor;
|
|
10
|
-
vendorTypeList: VendorType[];
|
|
11
|
-
file?: Attachment;
|
|
12
|
-
addressStatus?: NewAddressData;
|
|
13
|
-
}
|
|
14
|
-
export declare const getVendorUploadDetailsByVendorId: (state: RootState, vendorId: ID) => VendorFiling1099UploadDetailsSelectorView;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getVendorUploadDetailsByVendorId = void 0;
|
|
4
|
-
const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
|
|
5
|
-
const getVendorUploadDetailsByVendorId = (state, vendorId) => {
|
|
6
|
-
var _a;
|
|
7
|
-
const vendor = (0, vendorSelector_1.getVendorsByVendorIds)(state.vendorState, [vendorId])[0];
|
|
8
|
-
const { vendorFiling1099UploadDetailsState, vendorTypeListState, addressViewState, } = state;
|
|
9
|
-
const addressStatus = (_a = addressViewState.newAddressState) === null || _a === void 0 ? void 0 : _a.vendor_address;
|
|
10
|
-
return {
|
|
11
|
-
vendor,
|
|
12
|
-
vendorTypeList: vendorTypeListState.vendorTypes,
|
|
13
|
-
fetchState: vendorFiling1099UploadDetailsState.fetchState,
|
|
14
|
-
addressStatus: addressStatus,
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
exports.getVendorUploadDetailsByVendorId = getVendorUploadDetailsByVendorId;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { FetchedState, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import { Attachment } from '../../../entity/transaction/stateTypes/attachment';
|
|
3
|
-
import { Filing1099TinType } from '../../../entity/vendor/vendorType';
|
|
4
|
-
export interface VendorFiling1099UploadDetailsState extends FetchedState {
|
|
5
|
-
w9FormUploadStatus: FetchStateAndError;
|
|
6
|
-
vendor1099DetailsLocalData: VendorsFiling1099UploadDetailsLocalData;
|
|
7
|
-
vendor1099DetailsSaveStatus: FetchStateAndError;
|
|
8
|
-
vendor1099DetailsAutoFilledValues?: Vendor1099DetailsAutoFilledValues;
|
|
9
|
-
}
|
|
10
|
-
export interface VendorsFiling1099UploadDetailsLocalData {
|
|
11
|
-
vendorId: ID;
|
|
12
|
-
legalName: string;
|
|
13
|
-
email: string;
|
|
14
|
-
phone: string;
|
|
15
|
-
taxClassification: string;
|
|
16
|
-
tin: Filing1099TinType;
|
|
17
|
-
w9Documents?: Attachment[];
|
|
18
|
-
}
|
|
19
|
-
export interface Vendor1099DetailsAutoFilledValues {
|
|
20
|
-
tin: {
|
|
21
|
-
type: boolean;
|
|
22
|
-
value: boolean;
|
|
23
|
-
};
|
|
24
|
-
legalName: boolean;
|
|
25
|
-
taxClassification: boolean;
|
|
26
|
-
}
|
|
File without changes
|