@zeniai/client-epic-state 4.15.4 → 4.15.6
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/billPay/billTransaction/billTransactionPayload.d.ts +1 -0
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +2 -0
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +1 -0
- package/lib/epic.d.ts +2 -2
- package/lib/epic.js +2 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +12 -11
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewCompleteStatusEpic.js +14 -2
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +4 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.js +1 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +5 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +3 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +2 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +1 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +9 -16
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +23 -17
- package/lib/view/spendManagement/billPay/billList/billListSelector.d.ts +2 -0
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +4 -1
- package/lib/view/spendManagement/billPay/billList/fetchBillListEpic.d.ts +3 -1
- package/lib/view/spendManagement/billPay/billList/fetchBillListEpic.js +22 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewPayload.d.ts +7 -6
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewReducer.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewReducer.js +44 -27
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewSelector.d.ts +5 -2
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewSelector.js +14 -4
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewState.d.ts +7 -6
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewState.js +2 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/submitDraftBillsBulkActionEpic.js +1 -2
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts.d.ts +7 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/{reviewDraftBillsBulkActionEpic.ts.js → validateBillsBulkActionEpic.ts.js} +10 -7
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +7 -16
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +2 -2
- package/lib/view/spendManagement/helpers.d.ts +2 -0
- package/lib/view/spendManagement/helpers.js +9 -1
- package/package.json +1 -1
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/reviewDraftBillsBulkActionEpic.ts.d.ts +0 -7
package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js
CHANGED
|
@@ -185,6 +185,7 @@ const toBusinessVerificationPrimaryContactDataPayload = (primaryContact, isNewPr
|
|
|
185
185
|
};
|
|
186
186
|
exports.toBusinessVerificationPrimaryContactDataPayload = toBusinessVerificationPrimaryContactDataPayload;
|
|
187
187
|
const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAdditionalDocuments, companyOfficerAddressData) => {
|
|
188
|
+
var _a;
|
|
188
189
|
const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday, nationalityCountryCode, phone: userPhone, otpChallenge, isPhoneVerified, titleAtCompany, ownershipInCompany, documentTypeSelectedForVerification, fileIds: userFileIds, additionalSubmittedDocumentsForVerificationFileIds, } = companyOfficer;
|
|
189
190
|
const company_officer = {
|
|
190
191
|
first_name: firstName,
|
|
@@ -213,25 +214,15 @@ const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAd
|
|
|
213
214
|
if (ssn != null) {
|
|
214
215
|
company_officer['ssn'] = ssn;
|
|
215
216
|
}
|
|
216
|
-
|
|
217
|
-
company_officer['birthday'] = birthday.format('YYYY-MM-DD');
|
|
218
|
-
}
|
|
219
|
-
if (nationalityCountryCode != null) {
|
|
220
|
-
company_officer['nationality_country_code'] = nationalityCountryCode;
|
|
221
|
-
}
|
|
217
|
+
company_officer['birthday'] = (_a = birthday === null || birthday === void 0 ? void 0 : birthday.format('YYYY-MM-DD')) !== null && _a !== void 0 ? _a : null;
|
|
222
218
|
if (userPhone != null) {
|
|
223
219
|
company_officer['phone'] = userPhone;
|
|
224
220
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
if (documentTypeSelectedForVerification != null) {
|
|
232
|
-
company_officer['document_type_for_verification'] =
|
|
233
|
-
documentTypeSelectedForVerification;
|
|
234
|
-
}
|
|
221
|
+
company_officer['title_at_company'] = titleAtCompany !== null && titleAtCompany !== void 0 ? titleAtCompany : '';
|
|
222
|
+
company_officer['company_ownership'] = ownershipInCompany !== null && ownershipInCompany !== void 0 ? ownershipInCompany : null;
|
|
223
|
+
company_officer['document_type_for_verification'] =
|
|
224
|
+
documentTypeSelectedForVerification !== null && documentTypeSelectedForVerification !== void 0 ? documentTypeSelectedForVerification : '';
|
|
225
|
+
company_officer['nationality_country_code'] = nationalityCountryCode !== null && nationalityCountryCode !== void 0 ? nationalityCountryCode : '';
|
|
235
226
|
if (companyOfficerAddressPayload != null) {
|
|
236
227
|
company_officer['address'] = companyOfficerAddressPayload;
|
|
237
228
|
}
|
|
@@ -7,10 +7,10 @@ export interface CompanyOfficerVerificationPayload {
|
|
|
7
7
|
phone: string;
|
|
8
8
|
sync_token: string;
|
|
9
9
|
ssn: string;
|
|
10
|
-
birthday: string;
|
|
10
|
+
birthday: string | null;
|
|
11
11
|
nationality_country_code: string;
|
|
12
12
|
title_at_company: string;
|
|
13
|
-
company_ownership: number;
|
|
13
|
+
company_ownership: number | null;
|
|
14
14
|
document_type_for_verification: string;
|
|
15
15
|
are_additional_documents_submitted_for_verification: boolean;
|
|
16
16
|
additional_submitted_documents_for_verification_file_ids: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Amount } from '../../commonStateTypes/amount';
|
|
1
2
|
import { BillPayInfo, BulkProcessingStateType } from '../../entity/billPay/billTransaction/billTransactionState';
|
|
2
3
|
import { RecurringBillConfig } from '../../entity/billPay/recurringBills/recurringBillsState';
|
|
3
4
|
import { ReimbursementTypeCode } from '../../entity/reimbursement/reimbursementState';
|
|
@@ -37,3 +38,4 @@ export interface ZeniAccountsPromoConfig {
|
|
|
37
38
|
export declare const toAccountsPromoConfig: (dynamicConfigValue: Record<string, unknown>) => ZeniAccountsPromoConfig;
|
|
38
39
|
export declare const isPaymentMethodOutsideZeni: (code?: string) => boolean;
|
|
39
40
|
export declare const isAwaitingMarkAsPaid: (code?: string) => boolean;
|
|
41
|
+
export declare const checkIfLowBalance: (totalAmount: Amount, bankBalance: Amount) => boolean;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isAwaitingMarkAsPaid = exports.isPaymentMethodOutsideZeni = exports.toAccountsPromoConfig = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.getActualPaymentDate = exports.accountTypeSubConfigCodeToAccType = exports.isRecurringConfigChanged = exports.updateRecurringBillDetails = exports.getPaymentDateFromVendorReceiveDate = exports.getSelectedCompanyOfficer = exports.getLatestApprovalDate = void 0;
|
|
6
|
+
exports.checkIfLowBalance = exports.isAwaitingMarkAsPaid = exports.isPaymentMethodOutsideZeni = exports.toAccountsPromoConfig = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.getActualPaymentDate = exports.accountTypeSubConfigCodeToAccType = exports.isRecurringConfigChanged = exports.updateRecurringBillDetails = exports.getPaymentDateFromVendorReceiveDate = exports.getSelectedCompanyOfficer = exports.getLatestApprovalDate = void 0;
|
|
7
7
|
exports.getSpendManagementEffectiveListPeriod = getSpendManagementEffectiveListPeriod;
|
|
8
8
|
exports.showReimbursementPromoPage = showReimbursementPromoPage;
|
|
9
9
|
exports.showBillPayPromoPage = showBillPayPromoPage;
|
|
@@ -339,3 +339,11 @@ const isAwaitingMarkAsPaid = (code) => {
|
|
|
339
339
|
return code != null ? code === 'awaiting_to_be_marked_as_paid' : false;
|
|
340
340
|
};
|
|
341
341
|
exports.isAwaitingMarkAsPaid = isAwaitingMarkAsPaid;
|
|
342
|
+
const checkIfLowBalance = (totalAmount, bankBalance) => {
|
|
343
|
+
let isLowBalance = false;
|
|
344
|
+
if (totalAmount.currencyCode === bankBalance.currencyCode) {
|
|
345
|
+
isLowBalance = bankBalance.amount < totalAmount.amount;
|
|
346
|
+
}
|
|
347
|
+
return isLowBalance;
|
|
348
|
+
};
|
|
349
|
+
exports.checkIfLowBalance = checkIfLowBalance;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.6",
|
|
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",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
5
|
-
import { reviewDraftBillsBulkAction, reviewDraftBillsBulkActionFailure, reviewDraftBillsBulkActionSuccess } from '../billsBulkActionViewReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof reviewDraftBillsBulkAction> | ReturnType<typeof reviewDraftBillsBulkActionSuccess> | ReturnType<typeof reviewDraftBillsBulkActionFailure>;
|
|
7
|
-
export declare const reviewDraftBillsBulkActionEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|