@zeniai/client-epic-state 4.10.30 → 4.10.31
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 +3 -3
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +1 -7
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +1 -1
- package/lib/init.js +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +2 -2
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +2 -2
- package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
- package/lib/view/taskManager/taskListView/taskList.js +2 -2
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +1 -0
- package/lib/view/taskManager/taskListView/taskListSelector.js +5 -4
- package/package.json +1 -1
|
@@ -11,9 +11,9 @@ export interface BillTransactionPayload extends VendorTransactionPayload {
|
|
|
11
11
|
is_recurring: boolean;
|
|
12
12
|
recurring_bill_config_id: string | null;
|
|
13
13
|
recurring_bill_instance: number | null;
|
|
14
|
-
home_currency_amount
|
|
15
|
-
home_currency_code
|
|
16
|
-
home_currency_symbol
|
|
14
|
+
home_currency_amount: number;
|
|
15
|
+
home_currency_code: string;
|
|
16
|
+
home_currency_symbol: string;
|
|
17
17
|
class_id?: ID | null;
|
|
18
18
|
class_name?: string | null;
|
|
19
19
|
qbo_class_id?: ID | null;
|
|
@@ -9,13 +9,7 @@ const billTransactionState_1 = require("./billTransactionState");
|
|
|
9
9
|
const billPayConfigPayload_1 = require("../../../view/spendManagement/billPay/billPayConfig/billPayConfigPayload");
|
|
10
10
|
const toBillTransaction = (payload) => {
|
|
11
11
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
12
|
-
return Object.assign(Object.assign({}, (0, vendorTransactionPayload_1.toVendorTransaction)(payload)), { billPayInfo: (0, exports.toBillPayInfo)(payload.bill_pay_info), classId: (_a = payload.class_id) !== null && _a !== void 0 ? _a : '', className: (_b = payload.class_name) !== null && _b !== void 0 ? _b : '', qboClassId: (_c = payload.qbo_class_id) !== null && _c !== void 0 ? _c : '', transactionReferenceId: (_d = payload.transaction_reference_id) !== null && _d !== void 0 ? _d : '', entityApprovalId: payload.entity_approval_id, updateTime: (0, zeniDayJS_1.date)(payload.update_time), createdBy: (_e = payload.created_by_user_id) !== null && _e !== void 0 ? _e : '', candidateVendorName: (_f = payload.candidate_vendor_name) !== null && _f !== void 0 ? _f : '', bookCloseDate: payload.book_close_date != null
|
|
13
|
-
? (0, zeniDayJS_1.date)(payload.book_close_date)
|
|
14
|
-
: undefined, lastUpdatedByUserId: (_g = payload.last_updated_by_user_id) !== null && _g !== void 0 ? _g : '', paymentProcessingTotalFee: (0, amount_1.toAmount)((_h = payload.total_fee) !== null && _h !== void 0 ? _h : 0, payload.currency_code, payload.currency_symbol), isDeleted: payload.is_deleted, deletionInfo: (0, exports.toDeletionInfo)(payload.deletion_info), isRecurring: payload.is_recurring, recurringBillConfigId: (_j = payload.recurring_bill_config_id) !== null && _j !== void 0 ? _j : undefined, recurringBillInstance: (_k = payload.recurring_bill_instance) !== null && _k !== void 0 ? _k : undefined, totalAmountInUSD: payload.home_currency_amount != null &&
|
|
15
|
-
payload.home_currency_code != null &&
|
|
16
|
-
payload.home_currency_symbol != null
|
|
17
|
-
? (0, amount_1.toAmount)(payload.home_currency_amount, payload.home_currency_code, payload.home_currency_symbol)
|
|
18
|
-
: undefined });
|
|
12
|
+
return (Object.assign(Object.assign({}, (0, vendorTransactionPayload_1.toVendorTransaction)(payload)), { billPayInfo: (0, exports.toBillPayInfo)(payload.bill_pay_info), classId: (_a = payload.class_id) !== null && _a !== void 0 ? _a : '', className: (_b = payload.class_name) !== null && _b !== void 0 ? _b : '', qboClassId: (_c = payload.qbo_class_id) !== null && _c !== void 0 ? _c : '', transactionReferenceId: (_d = payload.transaction_reference_id) !== null && _d !== void 0 ? _d : '', entityApprovalId: payload.entity_approval_id, updateTime: (0, zeniDayJS_1.date)(payload.update_time), createdBy: (_e = payload.created_by_user_id) !== null && _e !== void 0 ? _e : '', candidateVendorName: (_f = payload.candidate_vendor_name) !== null && _f !== void 0 ? _f : '', bookCloseDate: payload.book_close_date != null ? (0, zeniDayJS_1.date)(payload.book_close_date) : undefined, lastUpdatedByUserId: (_g = payload.last_updated_by_user_id) !== null && _g !== void 0 ? _g : '', paymentProcessingTotalFee: (0, amount_1.toAmount)((_h = payload.total_fee) !== null && _h !== void 0 ? _h : 0, payload.currency_code, payload.currency_symbol), isDeleted: payload.is_deleted, deletionInfo: (0, exports.toDeletionInfo)(payload.deletion_info), isRecurring: payload.is_recurring, recurringBillConfigId: (_j = payload.recurring_bill_config_id) !== null && _j !== void 0 ? _j : undefined, recurringBillInstance: (_k = payload.recurring_bill_instance) !== null && _k !== void 0 ? _k : undefined, totalAmountInUSD: (0, amount_1.toAmount)(payload.home_currency_amount, payload.home_currency_code, payload.home_currency_symbol) }));
|
|
19
13
|
};
|
|
20
14
|
exports.toBillTransaction = toBillTransaction;
|
|
21
15
|
const toBillPayInfo = (payload) => {
|
|
@@ -19,7 +19,7 @@ export interface BillTransaction extends VendorTransaction {
|
|
|
19
19
|
isDeleted: boolean;
|
|
20
20
|
deletionInfo: DeletionInfo;
|
|
21
21
|
isRecurring: boolean;
|
|
22
|
-
totalAmountInUSD
|
|
22
|
+
totalAmountInUSD: Amount;
|
|
23
23
|
recurringBillConfigId?: ID;
|
|
24
24
|
recurringBillInstance?: number;
|
|
25
25
|
bookCloseDate?: ZeniDate;
|
package/lib/init.js
CHANGED
|
@@ -32,7 +32,7 @@ function initialize(restEndPoints, userId, sessionId, tenantId) {
|
|
|
32
32
|
console.info(`initializing with ${JSON.stringify(restEndPoints)}`);
|
|
33
33
|
initialize3rdPartyExtensions();
|
|
34
34
|
exports.zeniAPI = new zeniAPI_1.ZeniAPIClient(restEndPoints, userId, sessionId, tenantId);
|
|
35
|
-
exports.store = (0, configureStore_1.default)(exports.zeniAPI,
|
|
35
|
+
exports.store = (0, configureStore_1.default)(exports.zeniAPI, true);
|
|
36
36
|
return exports.store;
|
|
37
37
|
}
|
|
38
38
|
exports.default = initialize;
|
|
@@ -400,7 +400,7 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
const sortedTransactionsWithSortKeyValue = (0, orderBy_1.default)(transactionsWithSortKeyValue, (transaction) => {
|
|
403
|
-
var _a, _b
|
|
403
|
+
var _a, _b;
|
|
404
404
|
switch (sortKey) {
|
|
405
405
|
case 'name':
|
|
406
406
|
return (_a = transaction.vendor) === null || _a === void 0 ? void 0 : _a.name.toLowerCase();
|
|
@@ -413,7 +413,7 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
413
413
|
case 'status':
|
|
414
414
|
return getStatusPerTab(transaction);
|
|
415
415
|
case 'amount':
|
|
416
|
-
return (
|
|
416
|
+
return (_b = transaction.totalAmountInUSD.amount) !== null && _b !== void 0 ? _b : 0;
|
|
417
417
|
case 'paymentMethod':
|
|
418
418
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
419
419
|
}
|
|
@@ -189,8 +189,8 @@ const getCategoryValueForTaskList = (key, task) => {
|
|
|
189
189
|
return (_a = task.tag) === null || _a === void 0 ? void 0 : _a.code;
|
|
190
190
|
case 'status':
|
|
191
191
|
return task.status.code;
|
|
192
|
-
case '
|
|
193
|
-
return task.
|
|
192
|
+
case 'createdBy':
|
|
193
|
+
return task.createdBy;
|
|
194
194
|
case 'assignee':
|
|
195
195
|
return task.assignees;
|
|
196
196
|
default:
|
|
@@ -18,12 +18,12 @@ export interface TaskFilterCategory {
|
|
|
18
18
|
values: (string | ZeniDate)[];
|
|
19
19
|
valuesCombinationOperator: 'ANY';
|
|
20
20
|
}
|
|
21
|
-
export declare type TaskListFilterCategoryField = 'status' | 'dueDate' | 'assignee' | '
|
|
21
|
+
export declare type TaskListFilterCategoryField = 'status' | 'dueDate' | 'assignee' | 'createdBy' | 'priority' | 'tag';
|
|
22
22
|
export interface TaskListUIState extends SpendManagementUIState {
|
|
23
23
|
sortKey: TaskListViewSortKey;
|
|
24
24
|
}
|
|
25
|
-
export declare const ALL_TASK_LIST_SORT_KEYS: readonly ["name", "dueDate", "assignee", "
|
|
26
|
-
export declare const toTaskListSortKeyType: (v: string) => "priority" | "name" | "status" | "dueDate" | "
|
|
25
|
+
export declare const ALL_TASK_LIST_SORT_KEYS: readonly ["name", "dueDate", "assignee", "tag", "status", "priority", "createdBy"];
|
|
26
|
+
export declare const toTaskListSortKeyType: (v: string) => "priority" | "name" | "status" | "dueDate" | "createdBy" | "assignee" | "tag";
|
|
27
27
|
export declare type TaskListViewSortKey = ReturnType<typeof toTaskListSortKeyType>;
|
|
28
28
|
export declare const TASK_LIST_FILTER_CATEGORIES: TaskListFilterCategoryOption[];
|
|
29
29
|
export interface TaskListFilterCategoryOption {
|
|
@@ -6,10 +6,10 @@ exports.ALL_TASK_LIST_SORT_KEYS = [
|
|
|
6
6
|
'name',
|
|
7
7
|
'dueDate',
|
|
8
8
|
'assignee',
|
|
9
|
-
'creationDate',
|
|
10
9
|
'tag',
|
|
11
10
|
'status',
|
|
12
11
|
'priority',
|
|
12
|
+
'createdBy',
|
|
13
13
|
];
|
|
14
14
|
const toTaskListSortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_TASK_LIST_SORT_KEYS);
|
|
15
15
|
exports.toTaskListSortKeyType = toTaskListSortKeyType;
|
|
@@ -18,10 +18,10 @@ exports.TASK_LIST_FILTER_CATEGORIES = [
|
|
|
18
18
|
{ value: 'priority', type: 'dropdown', multiple: true },
|
|
19
19
|
{ value: 'tag', type: 'dropdown', multiple: true },
|
|
20
20
|
{ value: 'dueDate', type: 'dateRange', multiple: false },
|
|
21
|
+
{ value: 'createdBy', type: 'user', multiple: true },
|
|
21
22
|
{
|
|
22
23
|
value: 'assignee',
|
|
23
24
|
type: 'user',
|
|
24
25
|
multiple: true,
|
|
25
26
|
},
|
|
26
|
-
{ value: 'creationDate', type: 'dateRange', multiple: true },
|
|
27
27
|
];
|
|
@@ -6,6 +6,7 @@ import { TaskListFilters, TaskListUIState } from './taskList';
|
|
|
6
6
|
import { UserListSelectorView } from '../../userListView/userListViewSelector';
|
|
7
7
|
export interface TaskWithUserDetails extends Task {
|
|
8
8
|
assigneeUsers: UserAndRole[];
|
|
9
|
+
createdByUser?: UserAndRole;
|
|
9
10
|
}
|
|
10
11
|
export interface TaskListSelectorView extends SelectorView {
|
|
11
12
|
taskList: TaskWithUserDetails[];
|
|
@@ -21,7 +21,8 @@ const getAllTasks = (state) => {
|
|
|
21
21
|
const assigneeUsers = task.assignees
|
|
22
22
|
.map((userId) => (0, userAndRole_1.getUserAndUserRole)(userState, userRoleState, addressState, userId))
|
|
23
23
|
.filter((value) => value != null);
|
|
24
|
-
|
|
24
|
+
const createdByUser = (0, userAndRole_1.getUserAndUserRole)(userState, userRoleState, addressState, task.createdBy);
|
|
25
|
+
return Object.assign(Object.assign({}, task), { assigneeUsers, createdByUser });
|
|
25
26
|
}
|
|
26
27
|
return undefined;
|
|
27
28
|
})
|
|
@@ -31,18 +32,18 @@ const getAllTasks = (state) => {
|
|
|
31
32
|
const sortOrder = (0, sortOrderPayload_1.getSortOrder)(taskListState.uiState.sortOrder);
|
|
32
33
|
const filteredTaskList = (0, spendManagementFilterHelpers_1.applyAdvancedFiltersOnList)('task_management', searchedTaskList, taskListState.filters);
|
|
33
34
|
const cardsInOrder = (0, orderBy_1.default)(filteredTaskList, (task) => {
|
|
34
|
-
var _a, _b;
|
|
35
|
+
var _a, _b, _c;
|
|
35
36
|
switch (sortKey) {
|
|
36
37
|
case 'dueDate':
|
|
37
38
|
return task.dueDate;
|
|
38
|
-
case 'creationDate':
|
|
39
|
-
return task.createTime;
|
|
40
39
|
case 'tag':
|
|
41
40
|
return (_b = (_a = task.tag) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : '';
|
|
42
41
|
case 'status':
|
|
43
42
|
return task.status.name;
|
|
44
43
|
case 'priority':
|
|
45
44
|
return taskState_1.ALL_PRORITY_CODE.indexOf(task.priority.code);
|
|
45
|
+
case 'createdBy':
|
|
46
|
+
return (_c = task.createdByUser) === null || _c === void 0 ? void 0 : _c.user.firstName;
|
|
46
47
|
case 'name':
|
|
47
48
|
default:
|
|
48
49
|
return task.name.toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.31",
|
|
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",
|