@zeniai/client-epic-state 4.12.50 → 4.12.51
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/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +1 -0
- package/lib/commonStateTypes/fiscalYearHelpers/formatMinutesToFromHHMM.d.ts +2 -0
- package/lib/commonStateTypes/fiscalYearHelpers/formatMinutesToFromHHMM.js +26 -0
- package/lib/entity/billPay/billTransaction/billTransactionPayload.d.ts +13 -1
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +24 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +13 -0
- package/lib/entity/billPay/billTransaction/billTransactionState.js +8 -0
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarState.d.ts +6 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -5
- package/lib/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/entity/task/taskPayload.d.ts +1 -0
- package/lib/entity/task/taskPayload.js +5 -1
- package/lib/entity/task/taskState.d.ts +1 -0
- package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
- package/lib/entity/toastNotification/epic/pushToastNotificationEpic.js +12 -5
- package/lib/entity/toastNotification/toastNotificationConstants.d.ts +4 -0
- package/lib/entity/toastNotification/toastNotificationConstants.js +7 -0
- package/lib/entity/toastNotification/toastNotificationPayload.js +28 -15
- package/lib/entity/toastNotification/toastNotificationState.d.ts +8 -8
- package/lib/entity/toastNotification/toastNotificationState.js +9 -8
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +2 -2
- package/lib/epic.d.ts +8 -6
- package/lib/epic.js +8 -6
- package/lib/index.d.ts +8 -6
- package/lib/index.js +16 -12
- package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -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/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewPayload.d.ts +5 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewReducer.d.ts +22 -1
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewReducer.js +133 -2
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +2 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewState.d.ts +9 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewState.js +14 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.d.ts +2 -2
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +10 -1
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchEligibleActionsForBillEpic.d.ts +7 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchEligibleActionsForBillEpic.js +42 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/retryOrRefundBillEpic.d.ts +9 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/retryOrRefundBillEpic.js +76 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +3 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +6 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +1 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +1 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.d.ts +68 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +2 -1
- 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/initializeTaskToLocalStoreEpic.js +1 -0
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +2 -0
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +1 -0
- package/lib/view/taskManager/taskDetailView/taskDetail.js +1 -0
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -1
- package/lib/view/taskManager/taskListView/{bulkUpdateTaskListEpic.d.ts → epics/bulkUpdateTaskListEpic.d.ts} +8 -6
- package/lib/view/taskManager/taskListView/{bulkUpdateTaskListEpic.js → epics/bulkUpdateTaskListEpic.js} +13 -5
- package/lib/view/taskManager/taskListView/{dragNDropTasksEpic.d.ts → epics/dragNDropTasksEpic.d.ts} +2 -2
- package/lib/view/taskManager/taskListView/{dragNDropTasksEpic.js → epics/dragNDropTasksEpic.js} +2 -2
- package/lib/view/taskManager/taskListView/{fetchTaskListEpic.d.ts → epics/fetchTaskListEpic.d.ts} +5 -5
- package/lib/view/taskManager/taskListView/{fetchTaskListEpic.js → epics/fetchTaskListEpic.js} +4 -4
- package/lib/view/taskManager/taskListView/{fetchTaskListPageEpic.d.ts → epics/fetchTaskListPageEpic.d.ts} +6 -6
- package/lib/view/taskManager/taskListView/{fetchTaskListPageEpic.js → epics/fetchTaskListPageEpic.js} +5 -5
- package/lib/view/taskManager/taskListView/{updateTaskFromListViewEpic.d.ts → epics/updateTaskFromListViewEpic.d.ts} +4 -4
- package/lib/view/taskManager/taskListView/{updateTaskFromListViewEpic.js → epics/updateTaskFromListViewEpic.js} +5 -7
- package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
- package/lib/view/taskManager/taskListView/taskList.js +1 -0
- package/lib/view/taskManager/taskListView/taskListSelector.js +2 -0
- package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
- package/package.json +3 -2
|
@@ -55,7 +55,7 @@ const fetchBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
|
|
|
55
55
|
const getTransactionDetail$ = zeniAPI
|
|
56
56
|
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions/${billId}?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
57
57
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
58
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
58
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
59
59
|
if ((0, responsePayload_1.isSuccessResponse)(response) &&
|
|
60
60
|
((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.transaction) === null || _b === void 0 ? void 0 : _b.transaction_id) != null) {
|
|
61
61
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -110,6 +110,15 @@ const fetchBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
|
|
|
110
110
|
Boolean(vendorInResponse) === true) {
|
|
111
111
|
fetchActions.push((0, billPayReviewReducer_1.fetchDuplicateBill)(vendorInResponse.vendor_name, vendorInResponse.vendor_id, transactionInResponse.total_amount, transactionInResponse.recipient_total_amount, transactionInResponse.document_id, billId));
|
|
112
112
|
}
|
|
113
|
+
const billHasPaymentError = [
|
|
114
|
+
'failed',
|
|
115
|
+
'cancelled',
|
|
116
|
+
'returned',
|
|
117
|
+
].includes((_q = transactionInResponse.bill_pay_info.bill_payment_status
|
|
118
|
+
.code) !== null && _q !== void 0 ? _q : '');
|
|
119
|
+
if (billHasPaymentError) {
|
|
120
|
+
fetchActions.push((0, billDetailViewReducer_1.fetchEligibleActionsForBill)(billId, true));
|
|
121
|
+
}
|
|
113
122
|
}
|
|
114
123
|
return (0, rxjs_1.from)(fetchActions);
|
|
115
124
|
}
|
package/lib/view/spendManagement/billPay/billDetailView/epics/fetchEligibleActionsForBillEpic.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { fetchEligibleActionsForBill, updateFetchEligibleActionsFailureState, updateEligibleActionsForBill } from '../billDetailViewReducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
5
|
+
import { RootState } from '../../../../../reducer';
|
|
6
|
+
export declare type ActionType = ReturnType<typeof fetchEligibleActionsForBill> | ReturnType<typeof updateEligibleActionsForBill> | ReturnType<typeof updateFetchEligibleActionsFailureState>;
|
|
7
|
+
export declare const fetchEligibleActionsForBillEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/spendManagement/billPay/billDetailView/epics/fetchEligibleActionsForBillEpic.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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.fetchEligibleActionsForBillEpic = void 0;
|
|
7
|
+
const rxjs_1 = require("rxjs");
|
|
8
|
+
const operators_1 = require("rxjs/operators");
|
|
9
|
+
const billDetailViewReducer_1 = require("../billDetailViewReducer");
|
|
10
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
11
|
+
const get_1 = __importDefault(require("lodash/get"));
|
|
12
|
+
const billDetailViewState_1 = require("../billDetailViewState");
|
|
13
|
+
const fetchEligibleActionsForBillEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(billDetailViewReducer_1.fetchEligibleActionsForBill.match), (0, operators_1.mergeMap)((action) => {
|
|
14
|
+
const { billId, cacheOverride } = action.payload;
|
|
15
|
+
const detailKey = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
|
|
16
|
+
const state = state$.value;
|
|
17
|
+
const billDetail = (0, get_1.default)(state.billDetailViewState.billDetailById, detailKey, undefined);
|
|
18
|
+
if (cacheOverride == true ||
|
|
19
|
+
billDetail == null ||
|
|
20
|
+
billDetail.zeniAssist.eligibleActionsFetchStatus.fetchState !==
|
|
21
|
+
'In-Progress') {
|
|
22
|
+
return zeniAPI
|
|
23
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions/${billId}/eligible-actions`)
|
|
24
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
27
|
+
const fetchActions = [
|
|
28
|
+
(0, billDetailViewReducer_1.updateEligibleActionsForBill)(billId, (_a = response.data.is_refund_eligible) !== null && _a !== void 0 ? _a : undefined, (_b = response.data.is_retry_eligible) !== null && _b !== void 0 ? _b : undefined),
|
|
29
|
+
];
|
|
30
|
+
return (0, rxjs_1.from)(fetchActions);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return (0, rxjs_1.of)((0, billDetailViewReducer_1.updateFetchEligibleActionsFailureState)(action.payload.billId, response.status));
|
|
34
|
+
}
|
|
35
|
+
}), (0, operators_1.catchError)((error) => {
|
|
36
|
+
console.error(`Fetch eligible actions REST API call errored out ${error}`);
|
|
37
|
+
return (0, rxjs_1.of)((0, billDetailViewReducer_1.updateFetchEligibleActionsFailureState)(action.payload.billId, (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Fetch eligible actions REST API call errored out ${error}`)));
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
return (0, rxjs_1.from)([]);
|
|
41
|
+
}));
|
|
42
|
+
exports.fetchEligibleActionsForBillEpic = fetchEligibleActionsForBillEpic;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
4
|
+
import { RootState } from '../../../../../reducer';
|
|
5
|
+
import { retryOrRefundBillSuccess, retryOrRefundBillFailure } from '../billDetailViewReducer';
|
|
6
|
+
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
7
|
+
import { updateBillTransaction } from '../../../../../entity/billPay/billTransaction/billTransactionReducer';
|
|
8
|
+
export declare type ActionType = ReturnType<typeof updateBillTransaction> | ReturnType<typeof openSnackbar> | ReturnType<typeof retryOrRefundBillSuccess> | ReturnType<typeof retryOrRefundBillFailure>;
|
|
9
|
+
export declare const retryOrRefundBillEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.retryOrRefundBillEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
7
|
+
const billDetailViewReducer_1 = require("../billDetailViewReducer");
|
|
8
|
+
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
9
|
+
const billDetailViewState_1 = require("../billDetailViewState");
|
|
10
|
+
const billTransactionReducer_1 = require("../../../../../entity/billPay/billTransaction/billTransactionReducer");
|
|
11
|
+
const retryOrRefundBillEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(billDetailViewReducer_1.retryOrRefundBill.match), (0, operators_1.mergeMap)((action) => {
|
|
12
|
+
var _a, _b, _c, _d, _e, _f;
|
|
13
|
+
const { billId, actionType } = action.payload;
|
|
14
|
+
const { editBillDetailViewState } = state$.value;
|
|
15
|
+
const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
|
|
16
|
+
const billDetail = editBillDetailViewState.editBillStateById[key];
|
|
17
|
+
let apiUrl = `${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions/${billId}`;
|
|
18
|
+
let payload;
|
|
19
|
+
if (actionType === 'retry') {
|
|
20
|
+
apiUrl = `${apiUrl}/payment/retry`;
|
|
21
|
+
payload = {
|
|
22
|
+
bill_pay_info: {
|
|
23
|
+
to_account: ((_b = (_a = billDetail.billDetailLocalData.paymentDetailsSection) === null || _a === void 0 ? void 0 : _a.paymentType) === null || _b === void 0 ? void 0 : _b.method.includes('international')) === true
|
|
24
|
+
? {
|
|
25
|
+
payment_instrument_id: Boolean(billDetail.billDetailLocalData
|
|
26
|
+
.isCollectToAccountInfoFromVendorContact) === false
|
|
27
|
+
? (_d = (_c = billDetail.billDetailLocalData.paymentDetailsSection) === null || _c === void 0 ? void 0 : _c.paymentTo) !== null && _d !== void 0 ? _d : null
|
|
28
|
+
: null,
|
|
29
|
+
}
|
|
30
|
+
: {
|
|
31
|
+
account_id: Boolean(billDetail.billDetailLocalData
|
|
32
|
+
.isCollectToAccountInfoFromVendorContact) === false
|
|
33
|
+
? (_f = (_e = billDetail.billDetailLocalData.paymentDetailsSection) === null || _e === void 0 ? void 0 : _e.paymentTo) !== null && _f !== void 0 ? _f : null
|
|
34
|
+
: null,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
apiUrl = `${apiUrl}/payment/refund`;
|
|
41
|
+
}
|
|
42
|
+
return zeniAPI.putAndGetJSON(apiUrl, payload).pipe((0, operators_1.mergeMap)((response) => {
|
|
43
|
+
var _a;
|
|
44
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
45
|
+
const actions = [];
|
|
46
|
+
if (response.data != null &&
|
|
47
|
+
((_a = response.data.transactions[0]) === null || _a === void 0 ? void 0 : _a.transaction_id) != null) {
|
|
48
|
+
actions.push((0, billTransactionReducer_1.updateBillTransaction)(response.data.transactions[0]));
|
|
49
|
+
}
|
|
50
|
+
actions.push((0, billDetailViewReducer_1.retryOrRefundBillSuccess)(action.payload.billId, action.payload.actionType));
|
|
51
|
+
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
52
|
+
messageSection: action.payload.actionType === 'refund'
|
|
53
|
+
? 'bill_pay_refund'
|
|
54
|
+
: 'bill_pay_retry',
|
|
55
|
+
messageText: 'success',
|
|
56
|
+
type: 'success',
|
|
57
|
+
}));
|
|
58
|
+
return (0, rxjs_1.from)(actions);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
return (0, rxjs_1.of)((0, billDetailViewReducer_1.retryOrRefundBillFailure)(billId, action.payload.actionType, response.status), (0, snackbarReducer_1.openSnackbar)({
|
|
62
|
+
messageSection: 'bill_pay_cancelled_deleted',
|
|
63
|
+
messageText: 'failed',
|
|
64
|
+
type: 'error',
|
|
65
|
+
variables: [
|
|
66
|
+
{
|
|
67
|
+
variableName: '_api-error_',
|
|
68
|
+
variableValue: response.status.message,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, billDetailViewReducer_1.retryOrRefundBillFailure)(action.payload.billId, action.payload.actionType, (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Retry Refund bill REST API call errored out ` +
|
|
74
|
+
JSON.stringify(error))))));
|
|
75
|
+
}));
|
|
76
|
+
exports.retryOrRefundBillEpic = retryOrRefundBillEpic;
|
|
@@ -26,6 +26,7 @@ export interface BillPayReviewSelectorView extends SelectorView {
|
|
|
26
26
|
isInvoiceDateAutoUpdated: boolean;
|
|
27
27
|
recurringBillInstance?: number;
|
|
28
28
|
recurringConfig?: RecurringBillConfigLocalData;
|
|
29
|
+
isBillMarkedForRetry?: boolean;
|
|
29
30
|
}
|
|
30
31
|
export interface DuplicateBillsSelectorView extends SelectorView {
|
|
31
32
|
bills: BillTransaction[];
|
|
@@ -58,6 +58,7 @@ const getReviewPageBillDetail = (state, billId) => {
|
|
|
58
58
|
let isRecurring = false;
|
|
59
59
|
let recurringBillInstance;
|
|
60
60
|
let recurringConfig;
|
|
61
|
+
let isBillMarkedForRetry = false;
|
|
61
62
|
if (billId != null) {
|
|
62
63
|
const transaction = (0, get_1.default)(billTransactionState.transactionById, billId, undefined);
|
|
63
64
|
toAccountVendorEmail = transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.toAccountVendorEmail;
|
|
@@ -122,6 +123,7 @@ const getReviewPageBillDetail = (state, billId) => {
|
|
|
122
123
|
paymentDetailsSection.paymentTo = (0, editBillViewSelector_1.toPaymentToOption)(contact);
|
|
123
124
|
}
|
|
124
125
|
}
|
|
126
|
+
isBillMarkedForRetry = Boolean(sourceBillDetail.isBillMarkedForRetry);
|
|
125
127
|
}
|
|
126
128
|
const lineDetailSection = {};
|
|
127
129
|
const lineDetailSectionUpdatesByLineId = (_j = (_h = sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.billDetailLocalData) === null || _h === void 0 ? void 0 : _h.updatesByLineId) !== null && _j !== void 0 ? _j : {};
|
|
@@ -170,6 +172,7 @@ const getReviewPageBillDetail = (state, billId) => {
|
|
|
170
172
|
recurringBillInstance,
|
|
171
173
|
recurringConfig,
|
|
172
174
|
isInvoiceDateAutoUpdated: (_y = whatForSection.isInvoiceDateAutoUpdated) !== null && _y !== void 0 ? _y : false,
|
|
175
|
+
isBillMarkedForRetry,
|
|
173
176
|
};
|
|
174
177
|
};
|
|
175
178
|
exports.getReviewPageBillDetail = getReviewPageBillDetail;
|
|
@@ -72,6 +72,8 @@ export declare const fetchEditBillDetailPage: import("@reduxjs/toolkit").ActionC
|
|
|
72
72
|
}, string, never, never>, waitForVendorByIdThenSaveBillUpdatetoLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[vendorId: string, billId?: string | undefined], {
|
|
73
73
|
vendorId: string;
|
|
74
74
|
billId: string | undefined;
|
|
75
|
-
}, string, never, never
|
|
75
|
+
}, string, never, never>, markBillForRetry: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
76
|
+
billId: ID;
|
|
77
|
+
}, string>;
|
|
76
78
|
declare const _default: import("@reduxjs/toolkit").Reducer<EditBillDetailViewState, import("@reduxjs/toolkit").AnyAction>;
|
|
77
79
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.waitForVendorByIdThenSaveBillUpdatetoLocalStore = exports.fetchVendorAndUpdateBillLocalData = exports.updateHomeCurrencyConversion = exports.currencyConversionValueSuccessOrFailure = exports.convertAmountToHomeCurrency = exports.updateVendorContactSuccessOrFailure = exports.updateVendorContact = exports.updateSuggestedVendorIdFromParsedInvoice = exports.updateRecommendedVendorId = exports.updateBillUploadFetchState = exports.updateAddBillAutoFields = exports.updateShowAutofill = exports.updateInternationalTransferFeeBearerPaymentMethodInLocalData = exports.waitForVendorByNameThenParsetoLocalStore = exports.waitForBillDetailThenInitializeLocalStore = exports.clearEditBillViewDetail = exports.parseInvoiceToBill = exports.updateEditBillFetchStateCompleted = exports.saveBillSuccessOrFailure = exports.saveBillDetail = exports.discardBillUpdatesInLocalStore = exports.saveBillUpdatesToLocalStore = exports.initializeBillToLocalStore = exports.fetchVendorByNameAndParseInvoice = exports.fetchBillAndInitializeLocalStore = exports.fetchEditBillDetailPage = exports.initialState = void 0;
|
|
4
|
+
exports.markBillForRetry = exports.waitForVendorByIdThenSaveBillUpdatetoLocalStore = exports.fetchVendorAndUpdateBillLocalData = exports.updateHomeCurrencyConversion = exports.currencyConversionValueSuccessOrFailure = exports.convertAmountToHomeCurrency = exports.updateVendorContactSuccessOrFailure = exports.updateVendorContact = exports.updateSuggestedVendorIdFromParsedInvoice = exports.updateRecommendedVendorId = exports.updateBillUploadFetchState = exports.updateAddBillAutoFields = exports.updateShowAutofill = exports.updateInternationalTransferFeeBearerPaymentMethodInLocalData = exports.waitForVendorByNameThenParsetoLocalStore = exports.waitForBillDetailThenInitializeLocalStore = exports.clearEditBillViewDetail = exports.parseInvoiceToBill = exports.updateEditBillFetchStateCompleted = exports.saveBillSuccessOrFailure = exports.saveBillDetail = exports.discardBillUpdatesInLocalStore = exports.saveBillUpdatesToLocalStore = exports.initializeBillToLocalStore = exports.fetchVendorByNameAndParseInvoice = exports.fetchBillAndInitializeLocalStore = exports.fetchEditBillDetailPage = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const editBillViewState_1 = require("./editBillViewState");
|
|
7
7
|
const billDetailViewState_1 = require("../billDetailView/billDetailViewState");
|
|
@@ -325,12 +325,16 @@ const editBillView = (0, toolkit_1.createSlice)({
|
|
|
325
325
|
return { payload: { vendorId, billId } };
|
|
326
326
|
},
|
|
327
327
|
},
|
|
328
|
+
markBillForRetry(draft, action) {
|
|
329
|
+
const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(action.payload.billId);
|
|
330
|
+
draft.editBillStateById[key].isBillMarkedForRetry = true;
|
|
331
|
+
},
|
|
328
332
|
clearEditBillViewDetail(draft) {
|
|
329
333
|
Object.assign(draft, exports.initialState);
|
|
330
334
|
},
|
|
331
335
|
},
|
|
332
336
|
});
|
|
333
|
-
_a = editBillView.actions, exports.fetchEditBillDetailPage = _a.fetchEditBillDetailPage, exports.fetchBillAndInitializeLocalStore = _a.fetchBillAndInitializeLocalStore, exports.fetchVendorByNameAndParseInvoice = _a.fetchVendorByNameAndParseInvoice, exports.initializeBillToLocalStore = _a.initializeBillToLocalStore, exports.saveBillUpdatesToLocalStore = _a.saveBillUpdatesToLocalStore, exports.discardBillUpdatesInLocalStore = _a.discardBillUpdatesInLocalStore, exports.saveBillDetail = _a.saveBillDetail, exports.saveBillSuccessOrFailure = _a.saveBillSuccessOrFailure, exports.updateEditBillFetchStateCompleted = _a.updateEditBillFetchStateCompleted, exports.parseInvoiceToBill = _a.parseInvoiceToBill, exports.clearEditBillViewDetail = _a.clearEditBillViewDetail, exports.waitForBillDetailThenInitializeLocalStore = _a.waitForBillDetailThenInitializeLocalStore, exports.waitForVendorByNameThenParsetoLocalStore = _a.waitForVendorByNameThenParsetoLocalStore, exports.updateInternationalTransferFeeBearerPaymentMethodInLocalData = _a.updateInternationalTransferFeeBearerPaymentMethodInLocalData, exports.updateShowAutofill = _a.updateShowAutofill, exports.updateAddBillAutoFields = _a.updateAddBillAutoFields, exports.updateBillUploadFetchState = _a.updateBillUploadFetchState, exports.updateRecommendedVendorId = _a.updateRecommendedVendorId, exports.updateSuggestedVendorIdFromParsedInvoice = _a.updateSuggestedVendorIdFromParsedInvoice, exports.updateVendorContact = _a.updateVendorContact, exports.updateVendorContactSuccessOrFailure = _a.updateVendorContactSuccessOrFailure, exports.convertAmountToHomeCurrency = _a.convertAmountToHomeCurrency, exports.currencyConversionValueSuccessOrFailure = _a.currencyConversionValueSuccessOrFailure, exports.updateHomeCurrencyConversion = _a.updateHomeCurrencyConversion, exports.fetchVendorAndUpdateBillLocalData = _a.fetchVendorAndUpdateBillLocalData, exports.waitForVendorByIdThenSaveBillUpdatetoLocalStore = _a.waitForVendorByIdThenSaveBillUpdatetoLocalStore;
|
|
337
|
+
_a = editBillView.actions, exports.fetchEditBillDetailPage = _a.fetchEditBillDetailPage, exports.fetchBillAndInitializeLocalStore = _a.fetchBillAndInitializeLocalStore, exports.fetchVendorByNameAndParseInvoice = _a.fetchVendorByNameAndParseInvoice, exports.initializeBillToLocalStore = _a.initializeBillToLocalStore, exports.saveBillUpdatesToLocalStore = _a.saveBillUpdatesToLocalStore, exports.discardBillUpdatesInLocalStore = _a.discardBillUpdatesInLocalStore, exports.saveBillDetail = _a.saveBillDetail, exports.saveBillSuccessOrFailure = _a.saveBillSuccessOrFailure, exports.updateEditBillFetchStateCompleted = _a.updateEditBillFetchStateCompleted, exports.parseInvoiceToBill = _a.parseInvoiceToBill, exports.clearEditBillViewDetail = _a.clearEditBillViewDetail, exports.waitForBillDetailThenInitializeLocalStore = _a.waitForBillDetailThenInitializeLocalStore, exports.waitForVendorByNameThenParsetoLocalStore = _a.waitForVendorByNameThenParsetoLocalStore, exports.updateInternationalTransferFeeBearerPaymentMethodInLocalData = _a.updateInternationalTransferFeeBearerPaymentMethodInLocalData, exports.updateShowAutofill = _a.updateShowAutofill, exports.updateAddBillAutoFields = _a.updateAddBillAutoFields, exports.updateBillUploadFetchState = _a.updateBillUploadFetchState, exports.updateRecommendedVendorId = _a.updateRecommendedVendorId, exports.updateSuggestedVendorIdFromParsedInvoice = _a.updateSuggestedVendorIdFromParsedInvoice, exports.updateVendorContact = _a.updateVendorContact, exports.updateVendorContactSuccessOrFailure = _a.updateVendorContactSuccessOrFailure, exports.convertAmountToHomeCurrency = _a.convertAmountToHomeCurrency, exports.currencyConversionValueSuccessOrFailure = _a.currencyConversionValueSuccessOrFailure, exports.updateHomeCurrencyConversion = _a.updateHomeCurrencyConversion, exports.fetchVendorAndUpdateBillLocalData = _a.fetchVendorAndUpdateBillLocalData, exports.waitForVendorByIdThenSaveBillUpdatetoLocalStore = _a.waitForVendorByIdThenSaveBillUpdatetoLocalStore, exports.markBillForRetry = _a.markBillForRetry;
|
|
334
338
|
exports.default = editBillView.reducer;
|
|
335
339
|
function doUpdateRecurringBillLocalData(billDetail, currentConfig, prevConfig) {
|
|
336
340
|
var _a, _b, _c, _d;
|
|
@@ -106,6 +106,7 @@ export interface EditBillDetailSelectorView extends SelectorView {
|
|
|
106
106
|
lastRecommendedVendorName?: string;
|
|
107
107
|
recurringConfig?: RecurringBillConfigLocalData;
|
|
108
108
|
recurringBillInstances?: RecurringBillInstance[];
|
|
109
|
+
isBillMarkedForRetry?: boolean;
|
|
109
110
|
}
|
|
110
111
|
export interface EditBillInitialDetails {
|
|
111
112
|
vendor?: Vendor;
|
|
@@ -124,6 +124,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
124
124
|
let isRecurring = false;
|
|
125
125
|
let recurringConfig;
|
|
126
126
|
let recurringBillInstances;
|
|
127
|
+
let isBillMarkedForRetry = false;
|
|
127
128
|
if (billId != null) {
|
|
128
129
|
isDeleted = (_h = transaction === null || transaction === void 0 ? void 0 : transaction.isDeleted) !== null && _h !== void 0 ? _h : false;
|
|
129
130
|
createdBy = (0, userSelector_1.getUserByUserId)(userState, (_j = transaction === null || transaction === void 0 ? void 0 : transaction.createdBy) !== null && _j !== void 0 ? _j : '');
|
|
@@ -275,6 +276,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
275
276
|
recurringConfig = sourceBillDetail.billDetailLocalData.recurringConfig;
|
|
276
277
|
recurringBillInstances =
|
|
277
278
|
sourceBillDetail.billDetailLocalData.recurringBillInstances;
|
|
279
|
+
isBillMarkedForRetry = Boolean(sourceBillDetail.isBillMarkedForRetry);
|
|
278
280
|
//add paymentToOption on initial bill load for collect from email
|
|
279
281
|
if (isCollectToAccountInfoFromVendorContact &&
|
|
280
282
|
toAccountVendorEmail != null &&
|
|
@@ -361,6 +363,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
361
363
|
recurringBillInstances,
|
|
362
364
|
recurringConfig,
|
|
363
365
|
isProcessing,
|
|
366
|
+
isBillMarkedForRetry,
|
|
364
367
|
};
|
|
365
368
|
};
|
|
366
369
|
exports.getEditBillDetail = getEditBillDetail;
|
|
@@ -24,6 +24,7 @@ export interface EditBillDetail {
|
|
|
24
24
|
uploadFetchState: FetchStateAndError;
|
|
25
25
|
suggestedVendorIdFromParsedInvoice?: ID;
|
|
26
26
|
recommendationByLineId: Record<ID, Recommendation[]>;
|
|
27
|
+
isBillMarkedForRetry?: boolean;
|
|
27
28
|
}
|
|
28
29
|
export declare const initialBillDetail: EditBillDetail;
|
|
29
30
|
export interface EditBillDetailViewState {
|
|
@@ -3,7 +3,75 @@ import { ZeniAPI } from '../../../../../zeniAPI';
|
|
|
3
3
|
import { RootState } from '../../../../../reducer';
|
|
4
4
|
import { saveBillDetail, saveBillSuccessOrFailure } from '../editBillViewReducer';
|
|
5
5
|
import { updateBillTransaction } from '../../../../../entity/billPay/billTransaction/billTransactionReducer';
|
|
6
|
+
import { EditBillDetail } from '../editBillViewState';
|
|
7
|
+
import { BillStageCodeType, BillTransactionState } from '../../../../../entity/billPay/billTransaction/billTransactionState';
|
|
8
|
+
import { TransactionWithAccountAndClassLinePayload } from '../../../../../entity/transaction/payloadTypes/transactionLinePayload';
|
|
9
|
+
import { AccountState } from '../../../../../entity/account/accountState';
|
|
10
|
+
import { PaymentAccountState } from '../../../../../entity/paymentAccount/paymentAccountState';
|
|
6
11
|
import { updateRecurringBillConfigs, updateRecurringBills } from '../../../../../entity/billPay/recurringBills/recurringBillsReducer';
|
|
12
|
+
import { RecurringBillState } from '../../../../../entity/billPay/recurringBills/recurringBillsState';
|
|
13
|
+
import { PaymentAchSubConfigCodeType, BillPaymentConfigCodeType, BillPaymentWireSubConfigCodeType } from '../../billPayConfig/billPayConfigState';
|
|
7
14
|
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
15
|
+
import { RecurringBillConfigBodyPayload } from '../../../../../entity/billPay/recurringBills/recurringBillsPayload';
|
|
8
16
|
export declare type ActionType = ReturnType<typeof saveBillDetail> | ReturnType<typeof updateBillTransaction> | ReturnType<typeof openSnackbar> | ReturnType<typeof saveBillSuccessOrFailure> | ReturnType<typeof updateRecurringBillConfigs> | ReturnType<typeof updateRecurringBills>;
|
|
9
17
|
export declare const saveBillDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
|
|
18
|
+
export declare function prepareSaveBillPayload(accountState: AccountState, billTransactionState: BillTransactionState, paymentAccountState: PaymentAccountState, recurringBillState: RecurringBillState, billDetail: EditBillDetail, billStageCode: BillStageCodeType): Partial<SaveBillPayload>;
|
|
19
|
+
interface SaveBillPayload {
|
|
20
|
+
vendor_id: string;
|
|
21
|
+
vendor_name?: string | null;
|
|
22
|
+
candidate_vendor_name: string;
|
|
23
|
+
transaction_type: string;
|
|
24
|
+
bill_pay_provider: string;
|
|
25
|
+
account_id: string;
|
|
26
|
+
file_id: string;
|
|
27
|
+
transaction_date: string | null;
|
|
28
|
+
due_date: string | null;
|
|
29
|
+
total_amount: number;
|
|
30
|
+
recipient_total_amount: number;
|
|
31
|
+
bill_pay_info: {
|
|
32
|
+
stage: {
|
|
33
|
+
code: string;
|
|
34
|
+
};
|
|
35
|
+
payment_date: string | null;
|
|
36
|
+
from_account: {
|
|
37
|
+
account_id: string;
|
|
38
|
+
account_type: string;
|
|
39
|
+
};
|
|
40
|
+
to_account: {
|
|
41
|
+
account_id?: string | null;
|
|
42
|
+
payment_instrument_id?: string | null;
|
|
43
|
+
};
|
|
44
|
+
is_cancelled: boolean;
|
|
45
|
+
bill_payment_method_type: {
|
|
46
|
+
code: BillPaymentConfigCodeType | null;
|
|
47
|
+
name: string;
|
|
48
|
+
sub_code: PaymentAchSubConfigCodeType | BillPaymentWireSubConfigCodeType | null;
|
|
49
|
+
};
|
|
50
|
+
to_account_vendor_email?: string | null;
|
|
51
|
+
is_collect_to_account_info_from_vendor_contact?: boolean;
|
|
52
|
+
international_transfer_fee_bearer_payment_method?: string | null;
|
|
53
|
+
};
|
|
54
|
+
document_id: string;
|
|
55
|
+
transaction_memo: string;
|
|
56
|
+
currency_code: string | null;
|
|
57
|
+
recipient_currency_code: string | null;
|
|
58
|
+
lines: TransactionWithAccountAndClassLinePayload[];
|
|
59
|
+
sync_token: string | null;
|
|
60
|
+
update_time: string | null;
|
|
61
|
+
are_approvals_serialized?: boolean;
|
|
62
|
+
exchange_rate: number | null;
|
|
63
|
+
is_recurring?: boolean | null;
|
|
64
|
+
recurring_bill_config?: RecurringBillConfigBodyPayload | null;
|
|
65
|
+
recurring_bill_instances?: RecurringBillInstancePayload[] | null;
|
|
66
|
+
future_recurring_bill_instances?: RecurringBillInstancePayload[] | null;
|
|
67
|
+
is_update_future_recurring_bills?: boolean | null;
|
|
68
|
+
is_update_recurring_bill_config?: boolean | null;
|
|
69
|
+
ocr_parsed_vendor_term: string | null;
|
|
70
|
+
}
|
|
71
|
+
interface RecurringBillInstancePayload {
|
|
72
|
+
instance: number;
|
|
73
|
+
payment_date: string;
|
|
74
|
+
vendor_receive_date: string;
|
|
75
|
+
vendor_receive_date_notes: string;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -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.saveBillDetailEpic = void 0;
|
|
6
|
+
exports.prepareSaveBillPayload = exports.saveBillDetailEpic = void 0;
|
|
7
7
|
const rxjs_1 = require("rxjs");
|
|
8
8
|
const operators_1 = require("rxjs/operators");
|
|
9
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
@@ -218,6 +218,7 @@ function prepareSaveBillPayload(accountState, billTransactionState, paymentAccou
|
|
|
218
218
|
}
|
|
219
219
|
return payload;
|
|
220
220
|
}
|
|
221
|
+
exports.prepareSaveBillPayload = prepareSaveBillPayload;
|
|
221
222
|
const getBillPaymentMethodTypePayload = (paymentType) => {
|
|
222
223
|
var _a;
|
|
223
224
|
const code = paymentType === null || paymentType === void 0 ? void 0 : paymentType.method.split('_')[1];
|
|
@@ -8,7 +8,7 @@ import { updateCreatedTagToLocalStore } from '../../taskManager/taskDetailView/t
|
|
|
8
8
|
export declare type ActionType = ReturnType<typeof createTag> | ReturnType<typeof updateTagCreateStatus> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateCreatedTagToLocalStore> | ReturnType<typeof updateTags>;
|
|
9
9
|
export declare const createTagEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
10
10
|
payload: {
|
|
11
|
-
messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "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_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" | "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" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "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" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated";
|
|
11
|
+
messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "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_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" | "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" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "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" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation";
|
|
12
12
|
messageText: "failed" | "success" | "notification";
|
|
13
13
|
type: import("../../..").SnackbarMessageType;
|
|
14
14
|
showStatusIcon?: boolean | undefined;
|
|
@@ -9,7 +9,7 @@ export declare const deleteTagEpic: (actions$: ActionsObservable<ActionType>, _s
|
|
|
9
9
|
type: string;
|
|
10
10
|
} | {
|
|
11
11
|
payload: {
|
|
12
|
-
messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "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_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" | "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" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "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" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated";
|
|
12
|
+
messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "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_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" | "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" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "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" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation";
|
|
13
13
|
messageText: "failed" | "success" | "notification";
|
|
14
14
|
type: import("../../..").SnackbarMessageType;
|
|
15
15
|
showStatusIcon?: boolean | undefined;
|
|
@@ -30,6 +30,7 @@ const initializeTaskToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, o
|
|
|
30
30
|
},
|
|
31
31
|
savedRecurringEndDate: task.recurringEndDate,
|
|
32
32
|
recurringStartDate: task.recurringStartDate,
|
|
33
|
+
timeSpent: task.timeSpent,
|
|
33
34
|
};
|
|
34
35
|
const actions = [
|
|
35
36
|
(0, taskDetailReducer_1.saveTaskUpdatesToLocalStore)({ taskDetailLocalData, taskId }),
|
|
@@ -4,6 +4,7 @@ exports.saveTaskDetailEpic = void 0;
|
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const formatMinutesToFromHHMM_1 = require("../../../../commonStateTypes/fiscalYearHelpers/formatMinutesToFromHHMM");
|
|
7
8
|
const taskDetailReducer_1 = require("../taskDetailReducer");
|
|
8
9
|
const taskReducer_1 = require("../../../../entity/task/taskReducer");
|
|
9
10
|
const taskListReducer_1 = require("../../taskListView/taskListReducer");
|
|
@@ -98,5 +99,6 @@ const prepareTaskPayload = (state, taskId, taskGroupId) => {
|
|
|
98
99
|
: null,
|
|
99
100
|
sync_token: syncToken,
|
|
100
101
|
task_group_ids: taskGroupId != null ? [taskGroupId] : [],
|
|
102
|
+
time_spent: (0, formatMinutesToFromHHMM_1.convertHHMMStrToMinutes)(localData.timeSpent),
|
|
101
103
|
};
|
|
102
104
|
};
|
|
@@ -137,7 +137,8 @@ const showFormFooter = (taskDetailLocalData, taskDetailInStore) => {
|
|
|
137
137
|
!(0, isEqual_1.default)(taskDetailLocalData.type, taskDetailInStore.type) ||
|
|
138
138
|
!(0, isEqual_1.default)(taskDetailLocalData.savedRecurringEndDate, taskDetailInStore.recurringEndDate) ||
|
|
139
139
|
!(0, isEqual_1.default)(taskDetailLocalData.recurringFrequency, taskDetailInStore.recurringFrequency) ||
|
|
140
|
-
!(0, isEqual_1.default)(taskDetailLocalData.recurringStartDate, taskDetailInStore.recurringStartDate)
|
|
140
|
+
!(0, isEqual_1.default)(taskDetailLocalData.recurringStartDate, taskDetailInStore.recurringStartDate) ||
|
|
141
|
+
!(0, isEqual_1.default)(taskDetailLocalData.timeSpent, taskDetailInStore.timeSpent)) {
|
|
141
142
|
return true;
|
|
142
143
|
}
|
|
143
144
|
return false;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '
|
|
4
|
-
import { ZeniAPI } from '
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Task } from '
|
|
8
|
-
import { updateTasks } from '
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { ID } from '../../../../commonStateTypes/common';
|
|
6
|
+
import { bulkUpdateTaskList, updateTasksListOnBulkUpdateTasksSuccess, updateTasksListOnBulkUpdateTasksFailure } from '../taskListReducer';
|
|
7
|
+
import { Task } from '../../../../entity/task/taskState';
|
|
8
|
+
import { updateTasks } from '../../../../entity/task/taskReducer';
|
|
9
9
|
export declare type ActionType = ReturnType<typeof bulkUpdateTaskList> | ReturnType<typeof updateTasks> | ReturnType<typeof updateTasksListOnBulkUpdateTasksFailure> | ReturnType<typeof updateTasksListOnBulkUpdateTasksSuccess>;
|
|
10
10
|
export declare const bulkUpdateTaskListEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
11
11
|
/**
|
|
@@ -26,6 +26,8 @@ interface UpdateTaskPayload {
|
|
|
26
26
|
recurring_frequency: string | null;
|
|
27
27
|
recurring_start_date: string | null;
|
|
28
28
|
task_group_ids: string[];
|
|
29
|
+
time_spent: number;
|
|
29
30
|
}
|
|
30
31
|
export declare const getTasksListPayload: (state: RootState, taskIds: ID[], updates: Partial<Task>) => UpdateTaskPayload[];
|
|
32
|
+
export declare const getTaskPayload: (state: RootState, taskId: ID, updates: Partial<Task>) => UpdateTaskPayload;
|
|
31
33
|
export {};
|
|
@@ -3,14 +3,15 @@ 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.getTasksListPayload = exports.bulkUpdateTaskListEpic = void 0;
|
|
6
|
+
exports.getTaskPayload = exports.getTasksListPayload = exports.bulkUpdateTaskListEpic = void 0;
|
|
7
7
|
const rxjs_1 = require("rxjs");
|
|
8
8
|
const operators_1 = require("rxjs/operators");
|
|
9
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
10
|
-
const responsePayload_1 = require("
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
10
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
11
|
+
const formatMinutesToFromHHMM_1 = require("../../../../commonStateTypes/fiscalYearHelpers/formatMinutesToFromHHMM");
|
|
12
|
+
const formatZeniDateFY_1 = require("../../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
13
|
+
const taskListReducer_1 = require("../taskListReducer");
|
|
14
|
+
const taskReducer_1 = require("../../../../entity/task/taskReducer");
|
|
14
15
|
const bulkUpdateTaskListEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskListReducer_1.bulkUpdateTaskList.match), (0, operators_1.switchMap)((action) => {
|
|
15
16
|
const state = state$.value;
|
|
16
17
|
const { taskIds, updates, groupId } = action.payload;
|
|
@@ -51,6 +52,12 @@ const getTasksListPayload = (state, taskIds, updates) => {
|
|
|
51
52
|
return tasksPayload;
|
|
52
53
|
};
|
|
53
54
|
exports.getTasksListPayload = getTasksListPayload;
|
|
55
|
+
const getTaskPayload = (state, taskId, updates) => {
|
|
56
|
+
const { taskState } = state;
|
|
57
|
+
const taskData = (0, get_1.default)(taskState.taskByID, taskId);
|
|
58
|
+
return toTaskPayload(state, Object.assign(Object.assign({}, taskData), updates));
|
|
59
|
+
};
|
|
60
|
+
exports.getTaskPayload = getTaskPayload;
|
|
54
61
|
const toTaskPayload = (state, task) => {
|
|
55
62
|
var _a;
|
|
56
63
|
const { tagState } = state;
|
|
@@ -81,6 +88,7 @@ const toTaskPayload = (state, task) => {
|
|
|
81
88
|
? task.recurringStartDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)
|
|
82
89
|
: null,
|
|
83
90
|
task_group_ids: task.taskGroupIds,
|
|
91
|
+
time_spent: (0, formatMinutesToFromHHMM_1.convertHHMMStrToMinutes)(task.timeSpent),
|
|
84
92
|
};
|
|
85
93
|
return taskPayload;
|
|
86
94
|
};
|
package/lib/view/taskManager/taskListView/{dragNDropTasksEpic.d.ts → epics/dragNDropTasksEpic.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { dragNDropTasks, bulkUpdateTaskList, updateTasksListOnBulkUpdateTasksSuccess } from '
|
|
4
|
-
import { RootState } from '
|
|
3
|
+
import { dragNDropTasks, bulkUpdateTaskList, updateTasksListOnBulkUpdateTasksSuccess } from '../taskListReducer';
|
|
4
|
+
import { RootState } from '../../../../reducer';
|
|
5
5
|
export declare type ActionType = ReturnType<typeof dragNDropTasks> | ReturnType<typeof bulkUpdateTaskList> | ReturnType<typeof updateTasksListOnBulkUpdateTasksSuccess>;
|
|
6
6
|
export declare const dragNDropTasksEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
package/lib/view/taskManager/taskListView/{dragNDropTasksEpic.js → epics/dragNDropTasksEpic.js}
RENAMED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.dragNDropTasksEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const taskListReducer_1 = require("
|
|
7
|
-
const taskListViewHelpers_1 = require("
|
|
6
|
+
const taskListReducer_1 = require("../taskListReducer");
|
|
7
|
+
const taskListViewHelpers_1 = require("../taskListViewHelpers");
|
|
8
8
|
const dragNDropTasksEpic = (actions$,
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
10
|
state$) => actions$.pipe((0, operators_1.filter)(taskListReducer_1.dragNDropTasks.match), (0, operators_1.mergeMap)((action) => {
|
package/lib/view/taskManager/taskListView/{fetchTaskListEpic.d.ts → epics/fetchTaskListEpic.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '
|
|
4
|
-
import { ZeniAPI } from '
|
|
5
|
-
import { fetchTaskList, updateTaskList, updateTaskListFetchStatus } from '
|
|
6
|
-
import { updateTasks } from '
|
|
7
|
-
import { updateTags } from '
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { fetchTaskList, updateTaskList, updateTaskListFetchStatus } from '../taskListReducer';
|
|
6
|
+
import { updateTasks } from '../../../../entity/task/taskReducer';
|
|
7
|
+
import { updateTags } from '../../../../entity/tag/tagReducer';
|
|
8
8
|
export declare type ActionType = ReturnType<typeof fetchTaskList> | ReturnType<typeof updateTasks> | ReturnType<typeof updateTags> | ReturnType<typeof updateTaskList> | ReturnType<typeof updateTaskListFetchStatus>;
|
|
9
9
|
export declare const fetchTaskListEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|