@zeniai/client-epic-state 4.8.84 → 4.8.85
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/commonStateTypes/viewAndReport/viewAndReport.d.ts +1 -0
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +3 -3
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.js +2 -0
- package/lib/entity/tenant/tenantSelector.d.ts +12 -4
- package/lib/entity/tenant/tenantSelector.js +95 -31
- package/lib/epic.d.ts +7 -1
- package/lib/epic.js +7 -1
- package/lib/index.d.ts +17 -9
- package/lib/index.js +46 -19
- package/lib/init.js +1 -1
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/view/auditReportView/auditReportViewHelper.d.ts +12 -0
- package/lib/view/auditReportView/auditReportViewHelper.js +79 -0
- package/lib/view/auditReportView/auditReportViewPayload.d.ts +53 -0
- package/lib/view/auditReportView/auditReportViewPayload.js +2 -0
- package/lib/view/auditReportView/auditReportViewReducer.d.ts +27 -0
- package/lib/view/auditReportView/auditReportViewReducer.js +121 -0
- package/lib/view/auditReportView/auditReportViewSelector.d.ts +22 -0
- package/lib/view/auditReportView/auditReportViewSelector.js +34 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +71 -0
- package/lib/view/auditReportView/auditReportViewState.js +22 -0
- package/lib/view/auditReportView/epics/fetchAuditReportGroupViewEpic.d.ts +7 -0
- package/lib/view/auditReportView/epics/fetchAuditReportGroupViewEpic.js +54 -0
- package/lib/view/auditReportView/epics/fetchAuditRuleGroupViewEpic.d.ts +7 -0
- package/lib/view/auditReportView/epics/fetchAuditRuleGroupViewEpic.js +39 -0
- package/lib/view/companyView/types/cockpitTypes.d.ts +4 -2
- package/lib/view/companyView/types/cockpitTypes.js +10 -1
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/referralView/epics/fetchReferralsEpic.d.ts +7 -0
- package/lib/view/referralView/epics/fetchReferralsEpic.js +36 -0
- package/lib/view/referralView/epics/fetchRewardsPlanEpic.d.ts +7 -0
- package/lib/view/referralView/epics/fetchRewardsPlanEpic.js +41 -0
- package/lib/view/referralView/epics/resendReferralInviteEpic.d.ts +8 -0
- package/lib/view/referralView/epics/resendReferralInviteEpic.js +39 -0
- package/lib/view/referralView/epics/sendReferralInviteEpic.d.ts +8 -0
- package/lib/view/referralView/epics/sendReferralInviteEpic.js +44 -0
- package/lib/view/referralView/referralPayload.d.ts +43 -0
- package/lib/view/referralView/referralPayload.js +33 -0
- package/lib/view/referralView/referralReducer.d.ts +23 -0
- package/lib/view/referralView/referralReducer.js +167 -0
- package/lib/view/referralView/referralSelector.d.ts +23 -0
- package/lib/view/referralView/referralSelector.js +88 -0
- package/lib/view/referralView/referralState.d.ts +55 -0
- package/lib/view/referralView/referralState.js +40 -0
- package/lib/view/reviewCompanyView/fetchReviewCompanyViewEpic.js +1 -1
- package/lib/view/reviewCompanyView/reviewCompanyPayload.d.ts +25 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewSelector.d.ts +1 -0
- package/lib/view/reviewCompanyView/reviewCompanyViewSelector.js +31 -8
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +12 -4
- package/lib/view/reviewCompanyView/reviewCompanyViewState.js +15 -5
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewPayload.d.ts +2 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +5 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.d.ts +1 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.js +1 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
2
|
import { OnboardingInfoPayload } from '../../entity/company/companyPayload';
|
|
3
3
|
import { ZeniAPIResponse } from '../../responsePayload';
|
|
4
|
+
export interface AuditSummaryPayload {
|
|
5
|
+
fixes_required: number;
|
|
6
|
+
total_checks: number;
|
|
7
|
+
audit_score_percentage: number;
|
|
8
|
+
audit_report_last_generated_date?: string | null;
|
|
9
|
+
}
|
|
4
10
|
export interface ReviewCompanyPayload {
|
|
5
11
|
company_id: ID;
|
|
6
12
|
name: string;
|
|
@@ -12,11 +18,29 @@ export interface ReviewCompanyPayload {
|
|
|
12
18
|
is_uncategorized_income_transactions_present: boolean;
|
|
13
19
|
is_miscategorized_expenses_transactions_present: boolean;
|
|
14
20
|
is_miscategorized_income_transactions_present: boolean;
|
|
15
|
-
onboarding_info?: OnboardingInfoPayload;
|
|
16
21
|
is_vendor_review_required: boolean;
|
|
22
|
+
onboarding_info?: OnboardingInfoPayload;
|
|
23
|
+
audit_summary: AuditSummaryPayload;
|
|
24
|
+
}
|
|
25
|
+
export interface AuditRuleGroupPayload {
|
|
26
|
+
audit_rule_category: string;
|
|
27
|
+
audit_rule_group_description: string;
|
|
28
|
+
audit_rule_group_id: string;
|
|
29
|
+
audit_rules: AuditRulePayload[];
|
|
30
|
+
sequence: number;
|
|
31
|
+
}
|
|
32
|
+
export interface AuditRulePayload {
|
|
33
|
+
audit_rule_description: string;
|
|
34
|
+
audit_rule_id: string;
|
|
35
|
+
sequence: number;
|
|
36
|
+
}
|
|
37
|
+
export interface AuditRuleGroupsPayload {
|
|
38
|
+
audit_rule_groups: AuditRuleGroupPayload[];
|
|
39
|
+
version: string;
|
|
17
40
|
}
|
|
18
41
|
export interface ReviewCompanyViewPayload {
|
|
19
42
|
companies: ReviewCompanyPayload[];
|
|
20
43
|
}
|
|
21
44
|
export declare type ReviewCompanyListResponse = ZeniAPIResponse<ReviewCompanyViewPayload>;
|
|
45
|
+
export declare type AuditRuleGroupsResponse = ZeniAPIResponse<AuditRuleGroupsPayload>;
|
|
22
46
|
export declare type RetryBankAccountConnectionResponse = ZeniAPIResponse<ReviewCompanyViewPayload>;
|
|
@@ -12,3 +12,4 @@ export interface ReviewCompanySelectorView extends SelectorView {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const getReviewCompanySelectorView: (state: RootState) => ReviewCompanySelectorView;
|
|
14
14
|
export declare const getReviewCompanyListCount: (state: RootState) => number;
|
|
15
|
+
export declare const getAuditWarningsCount: (companyView: ReviewCompanyView) => number;
|
|
@@ -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.getReviewCompanyListCount = exports.getReviewCompanySelectorView = void 0;
|
|
6
|
+
exports.getAuditWarningsCount = exports.getReviewCompanyListCount = exports.getReviewCompanySelectorView = void 0;
|
|
7
7
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
8
8
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
9
9
|
const values_1 = __importDefault(require("lodash/values"));
|
|
@@ -27,7 +27,8 @@ exports.getReviewCompanySelectorView = (0, toolkit_1.createSelector)((state) =>
|
|
|
27
27
|
.filter((value) => value != null);
|
|
28
28
|
const orderedZeniUsers = (0, orderBy_1.default)(zeniUsers, (user) => (0, userSelector_1.getUserName)(user), 'asc');
|
|
29
29
|
const sortedCompanies = (0, orderBy_1.default)(companies, (company) => {
|
|
30
|
-
var _a
|
|
30
|
+
var _a;
|
|
31
|
+
const warningCount = (0, exports.getAuditWarningsCount)(company);
|
|
31
32
|
switch (sortKey) {
|
|
32
33
|
case 'notes':
|
|
33
34
|
return (_a = company.note) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
@@ -37,12 +38,10 @@ exports.getReviewCompanySelectorView = (0, toolkit_1.createSelector)((state) =>
|
|
|
37
38
|
case 'miscategorized':
|
|
38
39
|
return ((company.miscategorizedTransactions.income ? 1 : 0) +
|
|
39
40
|
(company.miscategorizedTransactions.expense ? 1 : 0));
|
|
40
|
-
case '
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
case 'identityVerified':
|
|
45
|
-
return (_d = company.onboardingInfo) === null || _d === void 0 ? void 0 : _d[sortKey].status.toLowerCase();
|
|
41
|
+
case 'warnings':
|
|
42
|
+
return warningCount;
|
|
43
|
+
case 'auditScore':
|
|
44
|
+
return company.auditSummary.fixesRequired;
|
|
46
45
|
case 'reviewVendor':
|
|
47
46
|
return company.isVendorReviewReqiured;
|
|
48
47
|
case 'companyName':
|
|
@@ -62,3 +61,27 @@ exports.getReviewCompanyListCount = (0, toolkit_1.createSelector)((state) => sta
|
|
|
62
61
|
const companies = (0, values_1.default)(rootState.reviewCompanyViewState.reviewCompanyById);
|
|
63
62
|
return companies.length;
|
|
64
63
|
});
|
|
64
|
+
const getAuditWarningsCount = (companyView) => {
|
|
65
|
+
var _a, _b, _c, _d;
|
|
66
|
+
let warningsCount = 0;
|
|
67
|
+
const bankConnectionStepInfo = (_a = companyView.onboardingInfo) === null || _a === void 0 ? void 0 : _a['bankAccountLinked'];
|
|
68
|
+
if ((bankConnectionStepInfo === null || bankConnectionStepInfo === void 0 ? void 0 : bankConnectionStepInfo.error) === true ||
|
|
69
|
+
(bankConnectionStepInfo === null || bankConnectionStepInfo === void 0 ? void 0 : bankConnectionStepInfo.completed) === false) {
|
|
70
|
+
warningsCount++;
|
|
71
|
+
}
|
|
72
|
+
const qboLinkedStepInfo = (_b = companyView.onboardingInfo) === null || _b === void 0 ? void 0 : _b['qboLinked'];
|
|
73
|
+
if ((qboLinkedStepInfo === null || qboLinkedStepInfo === void 0 ? void 0 : qboLinkedStepInfo.error) === true ||
|
|
74
|
+
(qboLinkedStepInfo === null || qboLinkedStepInfo === void 0 ? void 0 : qboLinkedStepInfo.completed) === false) {
|
|
75
|
+
warningsCount++;
|
|
76
|
+
}
|
|
77
|
+
const identityVerificationStepInfo = (_c = companyView.onboardingInfo) === null || _c === void 0 ? void 0 : _c['identityVerified'];
|
|
78
|
+
if ((identityVerificationStepInfo === null || identityVerificationStepInfo === void 0 ? void 0 : identityVerificationStepInfo.status) !== 'Complete') {
|
|
79
|
+
warningsCount++;
|
|
80
|
+
}
|
|
81
|
+
const businessVerificationStepInfo = (_d = companyView.onboardingInfo) === null || _d === void 0 ? void 0 : _d['businessVerified'];
|
|
82
|
+
if ((businessVerificationStepInfo === null || businessVerificationStepInfo === void 0 ? void 0 : businessVerificationStepInfo.status) !== 'Complete') {
|
|
83
|
+
warningsCount++;
|
|
84
|
+
}
|
|
85
|
+
return warningsCount;
|
|
86
|
+
};
|
|
87
|
+
exports.getAuditWarningsCount = getAuditWarningsCount;
|
|
@@ -2,23 +2,30 @@ import { FetchedState, ID, FetchStateAndError } from '../../commonStateTypes/com
|
|
|
2
2
|
import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
3
|
import { OnboardingInfo } from '../../entity/company/companyStateTypes';
|
|
4
4
|
import { ZeniDate } from '../../zeniDayJS';
|
|
5
|
-
import { ReviewCompanyPayload } from './reviewCompanyPayload';
|
|
6
|
-
export declare const REVIEW_COMPANY_COLUMN_KEYS: readonly ["miscategorized", "companyName", "notes", "uncategorized", "
|
|
7
|
-
export declare const toReviewColumnKeyType: (v: string) => "companyName" | "
|
|
5
|
+
import { AuditSummaryPayload, ReviewCompanyPayload } from './reviewCompanyPayload';
|
|
6
|
+
export declare const REVIEW_COMPANY_COLUMN_KEYS: readonly ["auditScore", "miscategorized", "companyName", "notes", "uncategorized", "warnings", "vendorReview", "reviewVendor"];
|
|
7
|
+
export declare const toReviewColumnKeyType: (v: string) => "companyName" | "notes" | "auditScore" | "miscategorized" | "uncategorized" | "warnings" | "vendorReview" | "reviewVendor";
|
|
8
8
|
export declare type ReviewCompanyColumnKey = ReturnType<typeof toReviewColumnKeyType>;
|
|
9
9
|
export declare type ReviewTransactionsType = 'income' | 'expense';
|
|
10
|
+
export interface AuditSummary {
|
|
11
|
+
fixesRequired: number;
|
|
12
|
+
totalChecks: number;
|
|
13
|
+
auditScorePercentage: number;
|
|
14
|
+
auditReportLastGeneratedDate: ZeniDate | null;
|
|
15
|
+
}
|
|
10
16
|
export interface ReviewCompany {
|
|
11
17
|
companyId: ID;
|
|
12
18
|
name: string;
|
|
13
19
|
primaryEmailDomain: string;
|
|
14
20
|
miscategorizedTransactions: Record<ReviewTransactionsType, boolean>;
|
|
15
21
|
uncategorizedTransactions: Record<ReviewTransactionsType, boolean>;
|
|
22
|
+
isVendorReviewReqiured: boolean;
|
|
23
|
+
auditSummary: AuditSummary;
|
|
16
24
|
noteLastUpdatedUserId?: ID;
|
|
17
25
|
noteLastUpdateTime?: ZeniDate;
|
|
18
26
|
note?: string;
|
|
19
27
|
onboardingInfo?: OnboardingInfo;
|
|
20
28
|
retryBankAccountConnectionFetchState: FetchStateAndError;
|
|
21
|
-
isVendorReviewReqiured: boolean;
|
|
22
29
|
}
|
|
23
30
|
export interface ReviewCompanyListUIState {
|
|
24
31
|
filterText: string;
|
|
@@ -29,4 +36,5 @@ export interface ReviewCompanyViewState extends FetchedState {
|
|
|
29
36
|
reviewCompanyById: Record<ID, ReviewCompany>;
|
|
30
37
|
uiState: ReviewCompanyListUIState;
|
|
31
38
|
}
|
|
39
|
+
export declare const toAuditSummary: (auditSummaryPayload: AuditSummaryPayload) => AuditSummary;
|
|
32
40
|
export declare function toReviewCompany(company: ReviewCompanyPayload): ReviewCompany;
|
|
@@ -1,23 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toReviewCompany = exports.toReviewColumnKeyType = exports.REVIEW_COMPANY_COLUMN_KEYS = void 0;
|
|
3
|
+
exports.toReviewCompany = exports.toAuditSummary = exports.toReviewColumnKeyType = exports.REVIEW_COMPANY_COLUMN_KEYS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
5
|
const companyPayload_1 = require("../../entity/company/companyPayload");
|
|
6
6
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
7
7
|
exports.REVIEW_COMPANY_COLUMN_KEYS = [
|
|
8
|
+
'auditScore',
|
|
8
9
|
'miscategorized',
|
|
9
10
|
'companyName',
|
|
10
11
|
'notes',
|
|
11
12
|
'uncategorized',
|
|
13
|
+
'warnings',
|
|
12
14
|
'vendorReview',
|
|
13
|
-
'bankAccountLinked',
|
|
14
|
-
'qboLinked',
|
|
15
|
-
'identityVerified',
|
|
16
|
-
'businessVerified',
|
|
17
15
|
'reviewVendor',
|
|
18
16
|
];
|
|
19
17
|
const toReviewColumnKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.REVIEW_COMPANY_COLUMN_KEYS);
|
|
20
18
|
exports.toReviewColumnKeyType = toReviewColumnKeyType;
|
|
19
|
+
const toAuditSummary = (auditSummaryPayload) => {
|
|
20
|
+
return {
|
|
21
|
+
fixesRequired: auditSummaryPayload.fixes_required,
|
|
22
|
+
totalChecks: auditSummaryPayload.total_checks,
|
|
23
|
+
auditScorePercentage: auditSummaryPayload.audit_score_percentage,
|
|
24
|
+
auditReportLastGeneratedDate: auditSummaryPayload.audit_report_last_generated_date != null
|
|
25
|
+
? (0, zeniDayJS_1.date)(auditSummaryPayload.audit_report_last_generated_date)
|
|
26
|
+
: null,
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
exports.toAuditSummary = toAuditSummary;
|
|
21
30
|
function toReviewCompany(company) {
|
|
22
31
|
const reviewCompany = {
|
|
23
32
|
companyId: company.company_id,
|
|
@@ -35,6 +44,7 @@ function toReviewCompany(company) {
|
|
|
35
44
|
fetchState: 'Not-Started',
|
|
36
45
|
},
|
|
37
46
|
isVendorReviewReqiured: company.is_vendor_review_required,
|
|
47
|
+
auditSummary: (0, exports.toAuditSummary)(company.audit_summary),
|
|
38
48
|
};
|
|
39
49
|
if (company.note != null) {
|
|
40
50
|
reviewCompany.note = company.note;
|
|
@@ -18,7 +18,7 @@ export declare const saveNotificationSettingsEpic: (actions$: ActionsObservable<
|
|
|
18
18
|
type: string;
|
|
19
19
|
} | {
|
|
20
20
|
payload: {
|
|
21
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "notification_settings_saved";
|
|
21
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card" | "notification_settings_saved" | "referral_invite_sent";
|
|
22
22
|
messageText: "failed" | "success";
|
|
23
23
|
type: import("../../..").SnackbarMessageType;
|
|
24
24
|
showStatusIcon?: boolean | undefined;
|
|
@@ -7,6 +7,7 @@ export interface VendorFirstReviewViewPayload extends VendorPayload {
|
|
|
7
7
|
recommendations: VendorReviewViewAllRecommendationsPayload;
|
|
8
8
|
status: ReviewStatusPayload;
|
|
9
9
|
last_updated_vendor_name_by_user: UserBasePayload | null;
|
|
10
|
+
merge_vendor_name: string | null;
|
|
10
11
|
}
|
|
11
12
|
export interface FetchVendorFirstReviewViewQuery {
|
|
12
13
|
search_text: string;
|
|
@@ -36,6 +37,7 @@ export interface SaveVendorFirstReviewViewPayload extends VendorPayload {
|
|
|
36
37
|
recommendations: VendorReviewViewRecommendationsPayload[];
|
|
37
38
|
last_updated_vendor_name_by_user: UserBasePayload | null;
|
|
38
39
|
status: ReviewStatusPayload;
|
|
40
|
+
merge_vendor_name: string | null;
|
|
39
41
|
}
|
|
40
42
|
export interface SaveVendorFirstReviewView {
|
|
41
43
|
vendors?: SaveVendorFirstReviewViewPayload[];
|
|
@@ -249,6 +249,11 @@ const mapPayloadToVendorFirstReviewView = (payload) => {
|
|
|
249
249
|
recommendationIds,
|
|
250
250
|
recommendedNonExistingGlobalMerchants: nonExistingRecommendations,
|
|
251
251
|
lastUpdatedVendorNameByUserId: (_a = payload.last_updated_vendor_name_by_user) === null || _a === void 0 ? void 0 : _a.user_id,
|
|
252
|
+
mergeVendorName: payload.merge_vendor_name != null && payload.merge_vendor_name.length > 0
|
|
253
|
+
? payload.merge_vendor_name
|
|
254
|
+
: undefined,
|
|
255
|
+
/* merge_vendor_name can be an empty string from platform in cases other than `merge_in_qbo` status.
|
|
256
|
+
So, to avoid further string length checks, making this undefined.*/
|
|
252
257
|
};
|
|
253
258
|
};
|
|
254
259
|
_a = vendorFirstReviewView.actions, exports.fetchVendorFirstReviewView = _a.fetchVendorFirstReviewView, exports.updateSavedVendorFirstReviewViewLocalData = _a.updateSavedVendorFirstReviewViewLocalData, exports.updateVendorFirstReviewViewFailure = _a.updateVendorFirstReviewViewFailure, exports.clearVendorReviewView = _a.clearVendorReviewView, exports.updateVendorFirstReviewViewScrollYOffset = _a.updateVendorFirstReviewViewScrollYOffset, exports.updateVendorFirstReviewViewPageToken = _a.updateVendorFirstReviewViewPageToken, exports.saveVendorFirstReviewView = _a.saveVendorFirstReviewView, exports.updateVendorFirstReviewSortUiState = _a.updateVendorFirstReviewSortUiState, exports.initializeVendorFirstReviewViewLocalData = _a.initializeVendorFirstReviewViewLocalData, exports.updateVendorFirstReviewViewLocalData = _a.updateVendorFirstReviewViewLocalData, exports.resetVendorFirstReviewLocalData = _a.resetVendorFirstReviewLocalData, exports.updateRecentlySavedErroredVendorData = _a.updateRecentlySavedErroredVendorData, exports.clearRecentlySavedErroredVendorData = _a.clearRecentlySavedErroredVendorData, exports.saveVendorFirstReviewViewSuccessOrFailure = _a.saveVendorFirstReviewViewSuccessOrFailure;
|
|
@@ -25,6 +25,7 @@ export interface VendorFirstReviewSelectorView {
|
|
|
25
25
|
};
|
|
26
26
|
status: ReviewStatus;
|
|
27
27
|
lastUpdatedVendorNameByUser?: User;
|
|
28
|
+
mergeVendorName: string | undefined;
|
|
28
29
|
saveStatus: FetchStateAndError;
|
|
29
30
|
recommendations: RecommendedNonExistingGlobalMerchant[];
|
|
30
31
|
currentSelection: VendorReviewRowCurrentSelection;
|
|
@@ -60,6 +60,7 @@ const getVendorFirstReviewView = (state) => {
|
|
|
60
60
|
lastUpdatedVendorNameByUser: users.find((user) => user.userId === vendorLocalData.lastUpdatedVendorNameByUserId),
|
|
61
61
|
recommendations,
|
|
62
62
|
currentSelection: vendorLocalData.currentSelection,
|
|
63
|
+
mergeVendorName: vendorLocalData.mergeVendorName,
|
|
63
64
|
};
|
|
64
65
|
});
|
|
65
66
|
let recentlyUpdatedErroredVendorData = undefined;
|
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.85",
|
|
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",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"clean": "rimraf lib",
|
|
78
|
-
"test": "jest --config jest.config.json",
|
|
78
|
+
"test": "jest --config jest.config.json --runInBand --detectOpenHandles",
|
|
79
79
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
|
80
80
|
"find-dead-code": "ts-prune | grep -v '(used in module)'",
|
|
81
81
|
"find-unused-exports": "ts-unused-exports ./tsconfig.json",
|