@zeniai/client-epic-state 4.14.27 → 4.14.29
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/companyHealthMetric/companyHealthMetricPayload.d.ts +11 -0
- package/lib/entity/companyHealthMetric/companyHealthMetricPayload.js +25 -0
- package/lib/entity/companyHealthMetric/companyHealthMetricState.d.ts +11 -0
- package/lib/index.d.ts +2 -2
- package/lib/view/companyHealthMetricView/companyHealthMetricViewSelector.js +3 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.js +2 -0
- package/package.json +1 -1
|
@@ -9,6 +9,16 @@ interface ChurnProbabilityReasonPayload {
|
|
|
9
9
|
interface CompanyRunwayPayload {
|
|
10
10
|
runway_months: number | null;
|
|
11
11
|
}
|
|
12
|
+
interface LastEngagementPayload {
|
|
13
|
+
type: string;
|
|
14
|
+
date: string;
|
|
15
|
+
subject: string | null;
|
|
16
|
+
to: string[] | null;
|
|
17
|
+
from: string | null;
|
|
18
|
+
cc: string[] | null;
|
|
19
|
+
host_name: string | null;
|
|
20
|
+
attendees: string[] | null;
|
|
21
|
+
}
|
|
12
22
|
export interface CompanyHealthMetricPayload {
|
|
13
23
|
company_id: string;
|
|
14
24
|
runway: CompanyRunwayPayload;
|
|
@@ -29,6 +39,7 @@ export interface CompanyHealthMetricPayload {
|
|
|
29
39
|
code: string | null;
|
|
30
40
|
name: string | null;
|
|
31
41
|
} | null;
|
|
42
|
+
last_engagements: LastEngagementPayload[];
|
|
32
43
|
}
|
|
33
44
|
export declare const toCompanyHealthMetrics: (payload: CompanyHealthMetricPayload) => CompanyHealthMetric;
|
|
34
45
|
export {};
|
|
@@ -31,9 +31,34 @@ const toCompanyHealthMetrics = (payload) => {
|
|
|
31
31
|
externalProductServiceExposure: payload.external_product_service_exposure != null
|
|
32
32
|
? (0, companyPayload_1.toAllowedValueWithCode)(payload.external_product_service_exposure)
|
|
33
33
|
: undefined,
|
|
34
|
+
lastEngagements: payload.last_engagements != null
|
|
35
|
+
? toLastEngagements(payload.last_engagements)
|
|
36
|
+
: [],
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
39
|
exports.toCompanyHealthMetrics = toCompanyHealthMetrics;
|
|
40
|
+
const toLastEngagements = (payload) => {
|
|
41
|
+
return payload.map((engagement) => {
|
|
42
|
+
var _a, _b, _c, _d;
|
|
43
|
+
if (engagement.type === 'email') {
|
|
44
|
+
return {
|
|
45
|
+
type: 'email',
|
|
46
|
+
date: (0, zeniDayJS_1.date)(engagement.date),
|
|
47
|
+
subject: (_a = engagement.subject) !== null && _a !== void 0 ? _a : '',
|
|
48
|
+
to: engagement.to != null ? engagement.to.join(', ') : '',
|
|
49
|
+
from: (_b = engagement.from) !== null && _b !== void 0 ? _b : '',
|
|
50
|
+
cc: engagement.cc != null ? engagement.cc.join(', ') : '',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
type: 'meeting',
|
|
55
|
+
date: (0, zeniDayJS_1.date)(engagement.date),
|
|
56
|
+
subject: (_c = engagement.subject) !== null && _c !== void 0 ? _c : '',
|
|
57
|
+
hostName: (_d = engagement.host_name) !== null && _d !== void 0 ? _d : '',
|
|
58
|
+
attendees: engagement.attendees != null ? engagement.attendees.join(', ') : '',
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
};
|
|
37
62
|
const toCompanyRunway = (payload) => {
|
|
38
63
|
if (payload.runway_months != null) {
|
|
39
64
|
return { runwayMonths: payload.runway_months };
|
|
@@ -25,7 +25,18 @@ export interface CompanyHealthMetric {
|
|
|
25
25
|
customerSatisfactionScore?: number;
|
|
26
26
|
finOpsEngagementFrequency?: AllowedValueWithCode;
|
|
27
27
|
externalProductServiceExposure?: AllowedValueWithCode;
|
|
28
|
+
lastEngagements: LastEngagement[];
|
|
28
29
|
}
|
|
29
30
|
export interface CompanyHealthState {
|
|
30
31
|
companyHealthStateByCompanyId: Record<ID, CompanyHealthMetric>;
|
|
31
32
|
}
|
|
33
|
+
export interface LastEngagement {
|
|
34
|
+
type: string;
|
|
35
|
+
date: ZeniDate;
|
|
36
|
+
subject: string;
|
|
37
|
+
to?: string;
|
|
38
|
+
from?: string;
|
|
39
|
+
cc?: string;
|
|
40
|
+
hostName?: string;
|
|
41
|
+
attendees?: string;
|
|
42
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -640,8 +640,8 @@ export { CompanyHealthMetricsLocalData, CompanyHealthViewUIState };
|
|
|
640
640
|
import { CompanyDetailWithHealthMetric, CompanyHealthMetricDropDownOption, companyHealthMetricDropDownOptions, CompanyHealthMetricViewSelector, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, ProductServices, ProductServiceKey, isCompanyRunwayInfinite } from './view/companyHealthMetricView/companyHealthMetricViewSelector';
|
|
641
641
|
import { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState, updateLocalStore as updateCompanyHealthMetricLocalStore } from './view/companyHealthMetricView/companyHealthMetricViewReducer';
|
|
642
642
|
import { updateCompanyHealth, updateCompaniesHealth } from './entity/companyHealthMetric/companyHealthMetricReducer';
|
|
643
|
-
import { CompanyHealthMetric, VerticalProductServices, CompanyRunway } from './entity/companyHealthMetric/companyHealthMetricState';
|
|
644
|
-
export { CompanyHealthMetric, CompanyRunway, updateCompaniesHealth, updateCompanyHealth, VerticalProductServices, };
|
|
643
|
+
import { CompanyHealthMetric, VerticalProductServices, CompanyRunway, LastEngagement } from './entity/companyHealthMetric/companyHealthMetricState';
|
|
644
|
+
export { CompanyHealthMetric, CompanyRunway, updateCompaniesHealth, updateCompanyHealth, VerticalProductServices, LastEngagement, };
|
|
645
645
|
export { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateCompanyHealthMetricLocalStore, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState, };
|
|
646
646
|
import { ChargeCardViewSortKey, ChargeCardListUIState, toChargeCardSortKeyType } from './view/spendManagement/chargeCards/chargeCardList/chargeCardList';
|
|
647
647
|
import { ChargeCardListSelectorView, ChargeCardWithUser, ChargeCardWithUserAndShippingAddress, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyChargeCardListWithShippingAddress, getCreditAccount, anyCardOnHold, ChargeCardListWithShippingAddressSelectorView, MyPendingActivationChargeCardListSelectorView } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector';
|
|
@@ -462,7 +462,7 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, filters, compani
|
|
|
462
462
|
}
|
|
463
463
|
});
|
|
464
464
|
const sortedCompaniesWithSortKeyValue = (0, orderBy_1.default)(companiesWithSortKeyValues, (company) => {
|
|
465
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
465
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
466
466
|
switch (sortKey) {
|
|
467
467
|
case 'productVerticals':
|
|
468
468
|
return company.noOfProductVerticalsEnabled;
|
|
@@ -504,6 +504,8 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, filters, compani
|
|
|
504
504
|
: 0;
|
|
505
505
|
case 'group':
|
|
506
506
|
return (_j = company.managementInfo.companyGroupId) === null || _j === void 0 ? void 0 : _j.toLowerCase();
|
|
507
|
+
case 'lastEngagement':
|
|
508
|
+
return ((_l = (_k = company.companyHealthMetric.lastEngagements[0]) === null || _k === void 0 ? void 0 : _k.date) !== null && _l !== void 0 ? _l : DEFAULT_DATE);
|
|
507
509
|
case 'companyName':
|
|
508
510
|
default:
|
|
509
511
|
return company.companyInfo.name;
|
|
@@ -6,7 +6,7 @@ import { CockpitDownloadTabsID, CockpitTabsFileType } from './cockpitTabsID';
|
|
|
6
6
|
export declare const toPortfolioSortKeyType: (v: string) => "expenses" | "runway" | "companyName" | "cashBalance" | "revenues" | "netIncome";
|
|
7
7
|
export declare const toManagementSortKeyType: (v: string) => "status" | "group" | "bookCloseDate" | "taxStatus" | "controller" | "preparer" | "reviewer" | "annualRecurringRevenue" | "monthlyRecurringRevenue" | "companyName" | "notes" | "plans" | "task" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
|
|
8
8
|
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "identityVerified" | "businessVerified" | "bankAccountLinked" | "qboLinked" | "groupCreated" | "customerCreated" | "notes" | "enroller" | "invite" | "latestCreated";
|
|
9
|
-
export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "monthlyRecurringRevenue" | "companyName" | "customerSuccessManager" | "issues" | "externalProductServiceExposure" | "finOpsEngagementFrequency" | "companyEngagementMetricsUpdatedAt" | "productVerticals" | "churnProbability" | "netPromoterScore" | "customerSatisfactionScore" | "lastReportSent" | "subscriptionDate" | "renewalDate";
|
|
9
|
+
export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "monthlyRecurringRevenue" | "companyName" | "customerSuccessManager" | "issues" | "externalProductServiceExposure" | "finOpsEngagementFrequency" | "companyEngagementMetricsUpdatedAt" | "productVerticals" | "churnProbability" | "netPromoterScore" | "customerSatisfactionScore" | "lastReportSent" | "subscriptionDate" | "renewalDate" | "dashboardLastSeen" | "lastEngagement";
|
|
10
10
|
export declare const toTaskManagerSortKeyType: (v: string) => "priority" | "name" | "status" | "dueDate" | "tags" | "createdBy" | "taskName" | "assignee";
|
|
11
11
|
export declare type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
|
|
12
12
|
export declare type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.29",
|
|
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",
|