@zeniai/client-epic-state 4.13.99 → 4.14.0
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/view/companyView/types/cockpitTypes.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.js +1 -0
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +1 -1
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewSelector.js +12 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { FilterCategoryValueType } from '../helpers/cockpitHelpers';
|
|
|
5
5
|
import { CockpitDownloadTabsID, CockpitTabsFileType } from './cockpitTabsID';
|
|
6
6
|
export declare const toPortfolioSortKeyType: (v: string) => "expenses" | "runway" | "cashBalance" | "netIncome" | "companyName" | "revenues";
|
|
7
7
|
export declare const toManagementSortKeyType: (v: string) => "status" | "group" | "bookCloseDate" | "controller" | "preparer" | "reviewer" | "companyName" | "monthlyRecurringRevenue" | "annualRecurringRevenue" | "taxStatus" | "notes" | "plans" | "customerSuccessManager" | "task" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
|
|
8
|
-
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "notes" | "bankAccountLinked" | "qboLinked" | "identityVerified" | "businessVerified" | "groupCreated" | "customerCreated" | "enroller" | "invite";
|
|
8
|
+
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "notes" | "bankAccountLinked" | "qboLinked" | "identityVerified" | "businessVerified" | "groupCreated" | "customerCreated" | "enroller" | "invite" | "latestCreated";
|
|
9
9
|
export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "companyName" | "monthlyRecurringRevenue" | "customerSatisfactionScore" | "netPromoterScore" | "customerSuccessManager" | "lastReportSent" | "externalProductServiceExposure" | "finOpsEngagementFrequency" | "companyEngagementMetricsUpdatedAt" | "issues" | "productVerticals" | "churnProbability" | "subscriptionDate" | "renewalDate";
|
|
10
10
|
export declare const toTaskManagerSortKeyType: (v: string) => "priority" | "name" | "status" | "dueDate" | "taskName" | "assignee" | "tags" | "createdBy";
|
|
11
11
|
export declare type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
|
|
@@ -133,6 +133,7 @@ const getSortedOnboardingCustomers = (onboardingCustomers, sortKey, sortOrder, u
|
|
|
133
133
|
var _a;
|
|
134
134
|
switch (sortKey) {
|
|
135
135
|
case 'companyName':
|
|
136
|
+
case 'latestCreated':
|
|
136
137
|
case 'groupCreated':
|
|
137
138
|
case 'customerCreated':
|
|
138
139
|
case 'bankAccountLinked':
|
|
@@ -161,9 +162,19 @@ const getSortedOnboardingCustomers = (onboardingCustomers, sortKey, sortOrder, u
|
|
|
161
162
|
break;
|
|
162
163
|
}
|
|
163
164
|
});
|
|
165
|
+
const appliedSortOrder = () => {
|
|
166
|
+
if (sortKey === 'latestCreated') {
|
|
167
|
+
return 'desc';
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
return sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
171
|
+
}
|
|
172
|
+
};
|
|
164
173
|
const sortedCompaniesWithSortKeyValue = (0, orderBy_1.default)(companiesWithSortKeyValue, (company) => {
|
|
165
174
|
var _a, _b, _c, _d, _e, _f;
|
|
166
175
|
switch (sortKey) {
|
|
176
|
+
case 'latestCreated':
|
|
177
|
+
return company.company.company.companyInfo.createTime;
|
|
167
178
|
case 'companyName':
|
|
168
179
|
return Boolean(company.company.company.companyInfo.name) === true
|
|
169
180
|
? company.company.company.companyInfo.name.toLowerCase()
|
|
@@ -185,7 +196,7 @@ const getSortedOnboardingCustomers = (onboardingCustomers, sortKey, sortOrder, u
|
|
|
185
196
|
default:
|
|
186
197
|
return (_f = company.company.company.managementInfo.companyGroupId) === null || _f === void 0 ? void 0 : _f.toLowerCase();
|
|
187
198
|
}
|
|
188
|
-
},
|
|
199
|
+
}, appliedSortOrder());
|
|
189
200
|
return [...sortedCompaniesWithSortKeyValue, ...companiesWithNoSortKeyValue];
|
|
190
201
|
};
|
|
191
202
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.0",
|
|
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",
|