@zeniai/client-epic-state 4.11.15 → 4.11.16
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 +0 -9
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +2 -15
- package/lib/entity/billPay/billTransaction/billTransactionReducer.d.ts +1 -2
- package/lib/entity/billPay/billTransaction/billTransactionReducer.js +2 -25
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +1 -11
- package/lib/entity/billPay/billTransaction/billTransactionState.js +1 -9
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -6
- package/lib/entity/task/taskPayload.d.ts +2 -2
- package/lib/entity/task/taskPayload.js +0 -1
- package/lib/entity/task/taskState.d.ts +2 -3
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -5
- package/lib/entity/tenant/clearAllEpic.js +0 -8
- package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
- package/lib/entity/transaction/stateTypes/attachment.d.ts +0 -6
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +0 -3
- package/lib/entity/transaction/stateTypes/transactionType.js +3 -7
- package/lib/entity/vendor/vendorPayload.d.ts +0 -2
- package/lib/entity/vendor/vendorPayload.js +1 -5
- package/lib/entity/vendor/vendorState.d.ts +0 -2
- package/lib/epic.d.ts +1 -12
- package/lib/epic.js +1 -12
- package/lib/index.d.ts +12 -18
- package/lib/index.js +10 -37
- package/lib/reducer.d.ts +0 -9
- package/lib/reducer.js +0 -9
- package/lib/view/companyView/selector/companyManagementViewSelector.js +7 -13
- package/lib/view/companyView/selector/companyPortfolioViewSelector.js +6 -1
- package/lib/view/fileView/fileUploadHelpers.d.ts +0 -5
- 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/reviewCompanyView/reviewCompanyViewSelector.js +9 -26
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +2 -3
- package/lib/view/spendManagement/billPay/billList/billListReducer.js +3 -9
- package/lib/view/spendManagement/billPay/billList/billListSelector.d.ts +2 -19
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +3 -150
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +0 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigReducer.js +0 -2
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +0 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +8 -9
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +4 -6
- package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -1
- package/lib/view/spendManagement/helpers.d.ts +0 -3
- package/lib/view/spendManagement/helpers.js +1 -17
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
- package/lib/view/subscriptionView/subscriptionViewSelector.js +1 -5
- package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
- package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.d.ts +1 -2
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +4 -11
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +1 -2
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +1 -2
- package/lib/view/taskManager/taskListView/fetchTaskListPageEpic.d.ts +1 -3
- package/lib/view/taskManager/taskListView/fetchTaskListPageEpic.js +0 -12
- package/lib/view/taskManager/taskListView/taskList.d.ts +1 -14
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +2 -31
- package/lib/view/taskManager/taskListView/taskListReducer.js +9 -136
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +2 -12
- package/lib/view/taskManager/taskListView/taskListSelector.js +23 -59
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +5 -22
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewViewEpic.js +0 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +5 -11
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewPayload.d.ts +0 -15
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +3 -13
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +3 -45
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.d.ts +0 -8
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.js +2 -17
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.d.ts +2 -6
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.js +1 -2
- package/package.json +1 -1
- package/lib/entity/taskGroup/taskGroupPayload.d.ts +0 -9
- package/lib/entity/taskGroup/taskGroupPayload.js +0 -14
- package/lib/entity/taskGroup/taskGroupReducer.d.ts +0 -6
- package/lib/entity/taskGroup/taskGroupReducer.js +0 -33
- package/lib/entity/taskGroup/taskGroupSelector.d.ts +0 -4
- package/lib/entity/taskGroup/taskGroupSelector.js +0 -18
- package/lib/entity/taskGroup/taskGroupState.d.ts +0 -12
- package/lib/entity/taskGroup/taskGroupState.js +0 -2
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewPayload.d.ts +0 -32
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewPayload.js +0 -2
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewReducer.d.ts +0 -17
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewReducer.js +0 -166
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewSelector.d.ts +0 -24
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewSelector.js +0 -45
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewState.d.ts +0 -28
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewState.js +0 -7
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/approveOrRejectBillsBulkActionEpic.d.ts +0 -9
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/approveOrRejectBillsBulkActionEpic.js +0 -73
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/cancelOrDeleteBillsBulkActionEpic.d.ts +0 -8
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/cancelOrDeleteBillsBulkActionEpic.js +0 -74
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/reviewDraftBillsBulkActionEpic.ts.d.ts +0 -7
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/reviewDraftBillsBulkActionEpic.ts.js +0 -29
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/submitDraftBillsBulkActionEpic.d.ts +0 -8
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/submitDraftBillsBulkActionEpic.js +0 -62
- package/lib/view/taskManager/taskGroupView/epics/createNewTaskGroupEpic.d.ts +0 -10
- package/lib/view/taskManager/taskGroupView/epics/createNewTaskGroupEpic.js +0 -57
- package/lib/view/taskManager/taskGroupView/epics/deleteTaskGroupEpic.d.ts +0 -10
- package/lib/view/taskManager/taskGroupView/epics/deleteTaskGroupEpic.js +0 -41
- package/lib/view/taskManager/taskGroupView/epics/fetchAllTaskGroupsEpic.d.ts +0 -8
- package/lib/view/taskManager/taskGroupView/epics/fetchAllTaskGroupsEpic.js +0 -33
- package/lib/view/taskManager/taskGroupView/epics/updateTaskGroupNameEpic.d.ts +0 -10
- package/lib/view/taskManager/taskGroupView/epics/updateTaskGroupNameEpic.js +0 -51
- package/lib/view/taskManager/taskGroupView/taskGroupViewPayload.d.ts +0 -6
- package/lib/view/taskManager/taskGroupView/taskGroupViewPayload.js +0 -2
- package/lib/view/taskManager/taskGroupView/taskGroupViewReducer.d.ts +0 -34
- package/lib/view/taskManager/taskGroupView/taskGroupViewReducer.js +0 -123
- package/lib/view/taskManager/taskGroupView/taskGroupViewState.d.ts +0 -7
- package/lib/view/taskManager/taskGroupView/taskGroupViewState.js +0 -2
- package/lib/view/taskManager/taskListView/bulkUpdateTaskListEpic.d.ts +0 -8
- package/lib/view/taskManager/taskListView/bulkUpdateTaskListEpic.js +0 -88
- package/lib/view/taskManager/taskListView/dragNDropTasksEpic.d.ts +0 -6
- package/lib/view/taskManager/taskListView/dragNDropTasksEpic.js +0 -20
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewAttachmentsEpic.d.ts +0 -10
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewAttachmentsEpic.js +0 -37
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.bulkUpdateTaskListEpic = void 0;
|
|
7
|
-
const rxjs_1 = require("rxjs");
|
|
8
|
-
const operators_1 = require("rxjs/operators");
|
|
9
|
-
const get_1 = __importDefault(require("lodash/get"));
|
|
10
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
11
|
-
const taskListReducer_1 = require("./taskListReducer");
|
|
12
|
-
const taskReducer_1 = require("../../../entity/task/taskReducer");
|
|
13
|
-
const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
14
|
-
const bulkUpdateTaskListEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskListReducer_1.bulkUpdateTaskList.match), (0, operators_1.switchMap)((action) => {
|
|
15
|
-
const state = state$.value;
|
|
16
|
-
const { taskIds, updates } = action.payload;
|
|
17
|
-
const payload = {
|
|
18
|
-
tasks: getTasksListPayload(state, taskIds, updates),
|
|
19
|
-
};
|
|
20
|
-
return zeniAPI
|
|
21
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks`, payload)
|
|
22
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
23
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
24
|
-
return (0, rxjs_1.of)((0, taskReducer_1.updateTasks)(response.data.tasks), (0, taskListReducer_1.updateTasksListOnBulkUpdateTasksSuccess)({
|
|
25
|
-
taskIds,
|
|
26
|
-
groupId: updates.taskGroupIds != null &&
|
|
27
|
-
updates.taskGroupIds.length > 0
|
|
28
|
-
? updates.taskGroupIds[0]
|
|
29
|
-
: null,
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
return (0, rxjs_1.of)((0, taskListReducer_1.updateTasksListOnBulkUpdateTasksFailure)({
|
|
34
|
-
error: response.status,
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
}), (0, operators_1.catchError)((error) => {
|
|
38
|
-
return (0, rxjs_1.of)((0, taskListReducer_1.updateTasksListOnBulkUpdateTasksFailure)({
|
|
39
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Bulk update task list REST API call errored out' +
|
|
40
|
-
JSON.stringify(error)),
|
|
41
|
-
}));
|
|
42
|
-
}));
|
|
43
|
-
}));
|
|
44
|
-
exports.bulkUpdateTaskListEpic = bulkUpdateTaskListEpic;
|
|
45
|
-
const getTasksListPayload = (state, taskIds, updates) => {
|
|
46
|
-
const { taskState } = state;
|
|
47
|
-
const tasksList = taskIds
|
|
48
|
-
.map((taskId) => {
|
|
49
|
-
const task = (0, get_1.default)(taskState.taskByID, taskId);
|
|
50
|
-
return Object.assign(Object.assign({}, task), updates);
|
|
51
|
-
})
|
|
52
|
-
.filter((task) => task != null);
|
|
53
|
-
const tasksPayload = tasksList.map((task) => toTaskPayload(state, task));
|
|
54
|
-
return tasksPayload;
|
|
55
|
-
};
|
|
56
|
-
const toTaskPayload = (state, task) => {
|
|
57
|
-
var _a;
|
|
58
|
-
const { tagState } = state;
|
|
59
|
-
const tags = task.tagIds
|
|
60
|
-
.map((tagId) => {
|
|
61
|
-
return (0, get_1.default)(tagState.tagByID, tagId);
|
|
62
|
-
})
|
|
63
|
-
.filter((tag) => tag != null);
|
|
64
|
-
const tagPayload = tags.map((tag) => {
|
|
65
|
-
return tag.tagId;
|
|
66
|
-
});
|
|
67
|
-
const taskPayload = {
|
|
68
|
-
task_id: task.id,
|
|
69
|
-
name: task.name,
|
|
70
|
-
assignees: task.assignees,
|
|
71
|
-
description: task.description,
|
|
72
|
-
due_date: task.dueDate != null ? task.dueDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT) : null,
|
|
73
|
-
priority: task.priority.code,
|
|
74
|
-
status: task.status.code,
|
|
75
|
-
tags: tagPayload,
|
|
76
|
-
type: task.type.code,
|
|
77
|
-
file_ids: task.fileIds,
|
|
78
|
-
recurring_end_date: task.recurringEndDate != null
|
|
79
|
-
? task.recurringEndDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)
|
|
80
|
-
: null,
|
|
81
|
-
recurring_frequency: (_a = task.recurringFrequency) !== null && _a !== void 0 ? _a : null,
|
|
82
|
-
recurring_start_date: task.recurringStartDate != null
|
|
83
|
-
? task.recurringStartDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)
|
|
84
|
-
: null,
|
|
85
|
-
task_group_ids: task.taskGroupIds,
|
|
86
|
-
};
|
|
87
|
-
return taskPayload;
|
|
88
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { dragNDropTasks, bulkUpdateTaskList, updateTasksListOnBulkUpdateTasksSuccess } from './taskListReducer';
|
|
4
|
-
import { RootState } from '../../../reducer';
|
|
5
|
-
export declare type ActionType = ReturnType<typeof dragNDropTasks> | ReturnType<typeof bulkUpdateTaskList> | ReturnType<typeof updateTasksListOnBulkUpdateTasksSuccess>;
|
|
6
|
-
export declare const dragNDropTasksEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dragNDropTasksEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const taskListReducer_1 = require("./taskListReducer");
|
|
7
|
-
const dragNDropTasksEpic = (actions$,
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
|
-
_state$) => actions$.pipe((0, operators_1.filter)(taskListReducer_1.dragNDropTasks.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
-
const { taskIds, groupId } = action.payload;
|
|
11
|
-
const actions = [
|
|
12
|
-
(0, taskListReducer_1.updateTasksListOnBulkUpdateTasksSuccess)({
|
|
13
|
-
taskIds,
|
|
14
|
-
groupId,
|
|
15
|
-
}),
|
|
16
|
-
(0, taskListReducer_1.bulkUpdateTaskList)(taskIds, { taskGroupIds: [groupId] }),
|
|
17
|
-
];
|
|
18
|
-
return (0, rxjs_1.from)(actions);
|
|
19
|
-
}));
|
|
20
|
-
exports.dragNDropTasksEpic = dragNDropTasksEpic;
|
|
@@ -1,10 +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 { fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewTransactionAttachments, updateVendorFirstReviewViewTransactionAttachmentsFailure } from '../vendorFirstReviewViewReducer';
|
|
6
|
-
export declare type ActionType = ReturnType<typeof fetchVendorFirstReviewAttachments> | ReturnType<typeof updateVendorFirstReviewViewTransactionAttachments> | ReturnType<typeof updateVendorFirstReviewViewTransactionAttachmentsFailure>;
|
|
7
|
-
export declare const fetchVendorFirstReviewAttachmentsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
8
|
-
export interface VendorFirstReviewAttachementQueryPayload {
|
|
9
|
-
attachment_ids: string[];
|
|
10
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchVendorFirstReviewAttachmentsEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
-
const vendorFirstReviewViewReducer_1 = require("../vendorFirstReviewViewReducer");
|
|
8
|
-
const fetchVendorFirstReviewAttachmentsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(vendorFirstReviewViewReducer_1.fetchVendorFirstReviewAttachments.match), (0, operators_1.switchMap)((action) => {
|
|
9
|
-
const { attachmentIds, vendorId } = action.payload;
|
|
10
|
-
let apiUrl = `${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/vendors/${vendorId}/attachments`;
|
|
11
|
-
const queryParam = {
|
|
12
|
-
attachment_ids: attachmentIds,
|
|
13
|
-
};
|
|
14
|
-
apiUrl =
|
|
15
|
-
apiUrl + `?query=${encodeURIComponent(JSON.stringify(queryParam))}`;
|
|
16
|
-
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.switchMap)((response) => {
|
|
17
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
18
|
-
const actions = [];
|
|
19
|
-
actions.push((0, vendorFirstReviewViewReducer_1.updateVendorFirstReviewViewTransactionAttachments)({
|
|
20
|
-
vendorId,
|
|
21
|
-
transactionAttachments: response.data.transaction_attachments,
|
|
22
|
-
}));
|
|
23
|
-
return actions;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
return (0, rxjs_1.of)((0, vendorFirstReviewViewReducer_1.updateVendorFirstReviewViewTransactionAttachmentsFailure)({
|
|
27
|
-
status: response.status,
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
}), (0, operators_1.catchError)((error) => {
|
|
31
|
-
return (0, rxjs_1.of)((0, vendorFirstReviewViewReducer_1.updateVendorFirstReviewViewTransactionAttachmentsFailure)({
|
|
32
|
-
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Vendor First Review View REST API call errored out' +
|
|
33
|
-
JSON.stringify(error)),
|
|
34
|
-
}));
|
|
35
|
-
}));
|
|
36
|
-
}));
|
|
37
|
-
exports.fetchVendorFirstReviewAttachmentsEpic = fetchVendorFirstReviewAttachmentsEpic;
|