@zeniai/client-epic-state 4.19.88-betaSS1 → 4.19.88-betaVR2
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/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +5 -10
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -2
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +2 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +3 -7
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -3
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +3 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +11 -0
- package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
- package/lib/entity/transaction/transactionReducer.js +2 -3
- package/lib/entity/transaction/transactionSelector.d.ts +2 -2
- package/lib/entity/transaction/transactionState.d.ts +2 -3
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +5 -10
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +3 -3
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +0 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +11 -0
- package/lib/esm/entity/transaction/transactionReducer.js +2 -3
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +12 -4
- package/lib/esm/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +7 -2
- package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +7 -2
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.js +6 -7
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +11 -11
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +11 -3
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +7 -2
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +6 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/package.json +1 -1
|
@@ -22,23 +22,23 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
|
|
|
22
22
|
jeSchedules: JEScheduledTransactionPayload[];
|
|
23
23
|
refreshViewInBackground: boolean;
|
|
24
24
|
selectedPeriod: MonthYearPeriod;
|
|
25
|
-
}, "expenseAutomationJESchedulesView/fetchJeSchedulesSuccess">, fetchRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchRecommendationForAccountSettings">, ignoreRecommendedJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}
|
|
26
|
-
jeScheduleTransactionKey: `${string}
|
|
25
|
+
}, "expenseAutomationJESchedulesView/fetchJeSchedulesSuccess">, fetchRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchRecommendationForAccountSettings">, ignoreRecommendedJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue"], {
|
|
26
|
+
jeScheduleTransactionKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
27
27
|
scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
|
|
28
28
|
}, "expenseAutomationJESchedulesView/ignoreRecommendedJeSchedule", never, never>, ignoreRecommendedJeScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
29
29
|
jeScheduleTransactionKey: JEScheduleTransactionKey;
|
|
30
30
|
status: ZeniAPIStatus;
|
|
31
|
-
}, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleFailure">, ignoreRecommendedJeScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}
|
|
32
|
-
jeScheduleTransactionKey: `${string}
|
|
31
|
+
}, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleFailure">, ignoreRecommendedJeScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`], {
|
|
32
|
+
jeScheduleTransactionKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
33
33
|
}, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleSuccess", never, never>, initializeAccountSettingsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/initializeAccountSettingsView">, initializeJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeSchedules: JEScheduledTransactionPayload[]], {
|
|
34
|
-
jeScheduleTransactionKeys: (`${string}
|
|
35
|
-
}, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}
|
|
36
|
-
failedJeScheduleKey: `${string}
|
|
34
|
+
jeScheduleTransactionKeys: (`${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[];
|
|
35
|
+
}, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
|
|
36
|
+
failedJeScheduleKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
37
37
|
selectedPeriod: MonthYearPeriod;
|
|
38
38
|
}, "expenseAutomationJESchedulesView/removeFailedJeScheduleTransactionKey", never, never>, removeJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
39
39
|
scheduledJournalEntryID: ID;
|
|
40
|
-
}, "expenseAutomationJESchedulesView/removeJeScheduleLocalDataById">, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}
|
|
41
|
-
jeScheduleKey: `${string}
|
|
40
|
+
}, "expenseAutomationJESchedulesView/removeJeScheduleLocalDataById">, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
|
|
41
|
+
jeScheduleKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
42
42
|
selectedPeriod: MonthYearPeriod;
|
|
43
43
|
}, "expenseAutomationJESchedulesView/removeJeScheduleTransactionKey", never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
44
44
|
jeScheduleTransactionKey: JEScheduleTransactionKey;
|
|
@@ -59,8 +59,8 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
|
|
|
59
59
|
}, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
60
60
|
localData: Partial<JEScheduleLocalData>;
|
|
61
61
|
scheduledJournalEntryID: ID;
|
|
62
|
-
}, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}
|
|
63
|
-
jeScheduleKeys: (`${string}
|
|
62
|
+
}, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[], selectedPeriod: MonthYearPeriod], {
|
|
63
|
+
jeScheduleKeys: (`${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[];
|
|
64
64
|
selectedPeriod: MonthYearPeriod;
|
|
65
65
|
}, "expenseAutomationJESchedulesView/updateJeScheduleTransactionKeys", never, never>, updateRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<AccountTypeRecommendationPayload, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettings">, updateRecommendationForAccountSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
66
66
|
status: ZeniAPIStatus;
|
|
@@ -7,7 +7,9 @@ const getNestedAccountIDHierarchyForReport_1 = require("../../../commonStateType
|
|
|
7
7
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
8
8
|
const accountPayload_1 = require("../../../entity/account/accountPayload");
|
|
9
9
|
const jeSchedulesPayload_1 = require("../../../entity/jeSchedules/jeSchedulesPayload");
|
|
10
|
+
const transactionIDPayload_1 = require("../../../entity/transaction/payloadTypes/transactionIDPayload");
|
|
10
11
|
const accountTypeRecommendationPayload_1 = require("../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload");
|
|
12
|
+
const transactionDetailState_1 = require("../../transactionDetail/transactionDetailState");
|
|
11
13
|
exports.accountSettingsInitialState = {
|
|
12
14
|
localData: {
|
|
13
15
|
selectedPrepaidExpensesAccountIds: [],
|
|
@@ -101,8 +103,14 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
101
103
|
},
|
|
102
104
|
fetchJeSchedulesSuccess(draft, action) {
|
|
103
105
|
const { jeSchedules, selectedPeriod, failedJeSchedules, refreshViewInBackground, } = action.payload;
|
|
104
|
-
const jeScheduleTransactionKeys = jeSchedules.map((schedules) =>
|
|
105
|
-
|
|
106
|
+
const jeScheduleTransactionKeys = jeSchedules.map((schedules) => {
|
|
107
|
+
const transactionID = (0, transactionIDPayload_1.toTransactionID)(schedules.base_transaction);
|
|
108
|
+
return (0, transactionDetailState_1.getZeniTransactionDetailKey)(transactionID);
|
|
109
|
+
});
|
|
110
|
+
const failedJeScheduleTransactionKeys = failedJeSchedules.map((schedules) => {
|
|
111
|
+
const transactionID = (0, transactionIDPayload_1.toTransactionID)(schedules.base_transaction);
|
|
112
|
+
return (0, transactionDetailState_1.getZeniTransactionDetailKey)(transactionID);
|
|
113
|
+
});
|
|
106
114
|
if (refreshViewInBackground === true &&
|
|
107
115
|
draft.refreshStatus.fetchState === 'In-Progress') {
|
|
108
116
|
draft.refreshStatus = { fetchState: 'Completed', error: undefined };
|
|
@@ -268,7 +276,7 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
268
276
|
return {
|
|
269
277
|
payload: {
|
|
270
278
|
jeScheduleTransactionKeys: [
|
|
271
|
-
...jeSchedules.map((jeSchedule) => (0, jeSchedulesPayload_1.
|
|
279
|
+
...jeSchedules.map((jeSchedule) => (0, jeSchedulesPayload_1.getTransactionDetailKeyPayload)(jeSchedule.base_transaction)),
|
|
272
280
|
],
|
|
273
281
|
},
|
|
274
282
|
};
|
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fetchScheduleDetailsEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const jeSchedulesPayload_1 = require("../../../../entity/jeSchedules/jeSchedulesPayload");
|
|
7
6
|
const jeSchedulesReducer_1 = require("../../../../entity/jeSchedules/jeSchedulesReducer");
|
|
7
|
+
const transactionType_1 = require("../../../../entity/transaction/stateTypes/transactionType");
|
|
8
8
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
9
|
+
const transactionDetailState_1 = require("../../../transactionDetail/transactionDetailState");
|
|
9
10
|
const scheduleDetailReducer_1 = require("../scheduleDetailReducer");
|
|
10
11
|
const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(scheduleDetailReducer_1.fetchScheduleDetails.match), (0, operators_1.mergeMap)((action) => {
|
|
11
12
|
const updateActions = [];
|
|
@@ -26,7 +27,11 @@ const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0
|
|
|
26
27
|
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules/${selectedJeScheduleDetailId}?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
27
28
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
28
29
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
29
|
-
const
|
|
30
|
+
const transactionData = response.data.je_schedules[0].base_transaction;
|
|
31
|
+
const selectedJEScheduleKey = (0, transactionDetailState_1.getZeniTransactionDetailKey)({
|
|
32
|
+
id: transactionData.transaction_id,
|
|
33
|
+
type: (0, transactionType_1.toTransactionType)(transactionData.transaction_type),
|
|
34
|
+
});
|
|
30
35
|
updateActions.push((0, jeSchedulesReducer_1.updateJESchedules)(response.data.je_schedules), (0, scheduleDetailReducer_1.updateSelectedJEScheduleKey)({ selectedJEScheduleKey }), (0, jeSchedulesReducer_1.updateJESchedulesDetails)(response.data.je_schedules, response.data.scheduled_journal_entries), (0, scheduleDetailReducer_1.saveScheduleDetailsSuccessOrFailure)('Not-Started'), (0, scheduleDetailReducer_1.initializeScheduleDetailLocalData)(scheduleType, selectedJEScheduleKey, selectedJeScheduleDetailId), (0, scheduleDetailReducer_1.updateScheduleDetailsSuccess)());
|
|
31
36
|
if (response.data.je_schedules[0].status.code === 'draft' &&
|
|
32
37
|
isCompleteJEScheduleFormDataPresent(response.data.je_schedules[0])) {
|
|
@@ -36,9 +36,9 @@ export declare const createNewSchedules: import("@reduxjs/toolkit").ActionCreato
|
|
|
36
36
|
}, "scheduleDetailView/updateDeletedScheduleDetail", never, never>, deleteScheduleDetailSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
|
|
37
37
|
fetchState: FetchState;
|
|
38
38
|
error: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
39
|
-
}, "scheduleDetailView/deleteScheduleDetailSuccessOrFailure", never, never>, initializeScheduleDetailLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue", selectedJEScheduleKey: `${string}
|
|
39
|
+
}, "scheduleDetailView/deleteScheduleDetailSuccessOrFailure", never, never>, initializeScheduleDetailLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue", selectedJEScheduleKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedJeScheduleDetailId?: string | undefined], {
|
|
40
40
|
scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
|
|
41
|
-
selectedJEScheduleKey: `${string}
|
|
41
|
+
selectedJEScheduleKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
42
42
|
selectedJeScheduleDetailId: string | undefined;
|
|
43
43
|
}, "scheduleDetailView/initializeScheduleDetailLocalData", never, never>, updateScheduleDetailsLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
44
44
|
localData: Partial<ScheduleDetailsLocalData>;
|
|
@@ -66,9 +66,9 @@ export declare const createNewSchedules: import("@reduxjs/toolkit").ActionCreato
|
|
|
66
66
|
originalScheduledJE: ScheduledJournalEntry;
|
|
67
67
|
rowId: number;
|
|
68
68
|
scheduleType: ScheduleTypes;
|
|
69
|
-
}, "scheduleDetailView/resetJELinkInLocalData">, markAsCompleteScheduleDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue", jeScheduleKey: `${string}
|
|
69
|
+
}, "scheduleDetailView/resetJELinkInLocalData">, markAsCompleteScheduleDetail: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue", jeScheduleKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`], {
|
|
70
70
|
scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
|
|
71
|
-
jeScheduleKey: `${string}
|
|
71
|
+
jeScheduleKey: `${string}_bill` | `${string}_expense` | `${string}_check` | `${string}_refund` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
|
|
72
72
|
}, "scheduleDetailView/markAsCompleteScheduleDetail", never, never>, markAsCompleteScheduleDetailSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
|
|
73
73
|
fetchState: FetchState;
|
|
74
74
|
error: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
@@ -6,6 +6,8 @@ exports.updateState = updateState;
|
|
|
6
6
|
exports.getState = getState;
|
|
7
7
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
8
8
|
const jeSchedulesPayload_1 = require("../../../entity/jeSchedules/jeSchedulesPayload");
|
|
9
|
+
const transactionIDPayload_1 = require("../../../entity/transaction/payloadTypes/transactionIDPayload");
|
|
10
|
+
const transactionDetailState_1 = require("../../transactionDetail/transactionDetailState");
|
|
9
11
|
const scheduleListHelper_1 = require("./scheduleListHelper");
|
|
10
12
|
const scheduleListTypes_1 = require("./scheduleListTypes");
|
|
11
13
|
exports.initialUIState = {
|
|
@@ -383,7 +385,10 @@ exports.default = scheduleListView.reducer;
|
|
|
383
385
|
function doUpdateScheduleList(draft, payload, scheduleType, selectedTimeframe, selectedCategoryId) {
|
|
384
386
|
if (scheduleType !== 'accrued_expenses') {
|
|
385
387
|
const state = getState(draft, scheduleType);
|
|
386
|
-
const jeScheduleTransactionKeys = payload.map((schedules) =>
|
|
388
|
+
const jeScheduleTransactionKeys = payload.map((schedules) => {
|
|
389
|
+
const transactionID = (0, transactionIDPayload_1.toTransactionID)(schedules.base_transaction);
|
|
390
|
+
return (0, transactionDetailState_1.getZeniTransactionDetailKey)(transactionID);
|
|
391
|
+
});
|
|
387
392
|
state.selectedCategoryId = selectedCategoryId;
|
|
388
393
|
state.selectedTimeframe = selectedTimeframe;
|
|
389
394
|
const key = (0, scheduleListTypes_1.getScheduleListKey)(selectedCategoryId, selectedTimeframe);
|
|
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
|
|
|
7
7
|
export type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
|
|
8
8
|
export declare const toScheduleSubTabType: (v: string) => "completed" | "new" | "ongoing" | "all";
|
|
9
9
|
export type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
|
|
10
|
-
declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "
|
|
10
|
+
declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "transactionDate" | "transactionType" | "balanceAsOfToday" | "assetId" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth";
|
|
11
11
|
export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
|
|
12
12
|
export interface DownloadJEScheduleTabOptions {
|
|
13
13
|
categoryId: ID;
|
|
@@ -424,6 +424,14 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
424
424
|
transactionsWithNoSortKeyValue.push(transaction);
|
|
425
425
|
}
|
|
426
426
|
break;
|
|
427
|
+
case 'invoiceNumber':
|
|
428
|
+
if (transaction.documentId != null) {
|
|
429
|
+
transactionsWithSortKeyValue.push(transaction);
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
transactionsWithNoSortKeyValue.push(transaction);
|
|
433
|
+
}
|
|
434
|
+
break;
|
|
427
435
|
case 'dueDate':
|
|
428
436
|
if (currentTab === 'draft') {
|
|
429
437
|
if (Boolean(transaction.dueDate) === true) {
|
|
@@ -526,6 +534,8 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
526
534
|
return transaction.totalAmountInUSD?.amount ?? 0;
|
|
527
535
|
case 'paymentMethod':
|
|
528
536
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
537
|
+
case 'invoiceNumber':
|
|
538
|
+
return transaction.documentId;
|
|
529
539
|
}
|
|
530
540
|
}, getColumnWiseSortOrder(sortOrder));
|
|
531
541
|
return [
|
|
@@ -37,7 +37,7 @@ declare const toBillTabType: (v: string) => "paid" | "pending_approval" | "sched
|
|
|
37
37
|
export type BillTab = ReturnType<typeof toBillTabType>;
|
|
38
38
|
declare const toBillsSubTabType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline";
|
|
39
39
|
export type BillsSubTabType = ReturnType<typeof toBillsSubTabType>;
|
|
40
|
-
declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceDate";
|
|
40
|
+
declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceNumber" | "invoiceDate";
|
|
41
41
|
export declare type BillPayViewSortKey = ReturnType<typeof toBillPaySortKeyType>;
|
|
42
42
|
export interface BillPayFilters {
|
|
43
43
|
categories: BillPayFilterCategory[];
|
|
@@ -47,6 +47,7 @@ const ALL_BILL_PAY_SORT_KEYS = [
|
|
|
47
47
|
'invoiceDate',
|
|
48
48
|
'name',
|
|
49
49
|
'paymentMethod',
|
|
50
|
+
'invoiceNumber',
|
|
50
51
|
];
|
|
51
52
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
52
53
|
const toBillPaySortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_BILL_PAY_SORT_KEYS);
|
|
@@ -61,7 +61,7 @@ export declare const initialCreditAcc: CreditAccount;
|
|
|
61
61
|
export declare const initialDebitCardSummaries: DebitCardSummaries;
|
|
62
62
|
export declare const initialResendRevokeCardInvite: ResendRevokeCardInvite;
|
|
63
63
|
export declare const initialCreditAccountRepayment: CreditAccountRepayment;
|
|
64
|
-
export declare const toChargeCardSortKeyType: (v: string) => "status" | "owner" | "cardName" | "limit" | "department" | "cardType" | "utilisation";
|
|
64
|
+
export declare const toChargeCardSortKeyType: (v: string) => "status" | "accountType" | "owner" | "cardName" | "limit" | "department" | "cardType" | "utilisation";
|
|
65
65
|
export declare type ChargeCardViewSortKey = ReturnType<typeof toChargeCardSortKeyType>;
|
|
66
66
|
export declare const ALL_CASHBACK_SORT_KEYS: readonly ["month", "cashback"];
|
|
67
67
|
export declare const toCashbackSortKeyType: (v: string) => "month" | "cashback";
|
|
@@ -233,6 +233,8 @@ const getCardsBySortKey = (card, sortKey) => {
|
|
|
233
233
|
return card.cardName.toLowerCase();
|
|
234
234
|
case 'cardType':
|
|
235
235
|
return card.type.code;
|
|
236
|
+
case 'accountType':
|
|
237
|
+
return card.type.code.includes('credit') ? 'credit' : 'debit';
|
|
236
238
|
case 'status':
|
|
237
239
|
return card.status.code;
|
|
238
240
|
case 'utilisation':
|
|
@@ -42,6 +42,7 @@ export interface ReimbursementView extends Reimbursement {
|
|
|
42
42
|
approvers: Approvers;
|
|
43
43
|
submittedBy: User | undefined;
|
|
44
44
|
bulkSelectInfo?: RemiBulkSelectInfo;
|
|
45
|
+
createdByUser?: User;
|
|
45
46
|
}
|
|
46
47
|
export declare const getRemiList: (state: RootState, currentTimePeriod: TimePeriod, isBulkActionFeatureEnabled: boolean) => RemiListReport;
|
|
47
48
|
export declare const getApproversOrRejectors: (reimbursement: Reimbursement, entityApprovalStatusState: EntityApprovalStatusState, userState: UserState) => Approvers;
|
|
@@ -51,6 +51,7 @@ const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
|
|
|
51
51
|
return {
|
|
52
52
|
...reimbursement,
|
|
53
53
|
submittedBy: (0, userSelector_1.getUserByUserId)(userState, reimbursement.reimburseeUserId),
|
|
54
|
+
createdByUser: (0, userSelector_1.getUserByUserId)(userState, reimbursement.createdBy),
|
|
54
55
|
approvers: approvers,
|
|
55
56
|
};
|
|
56
57
|
});
|
|
@@ -423,6 +424,14 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
|
|
|
423
424
|
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
424
425
|
}
|
|
425
426
|
break;
|
|
427
|
+
case 'createdBy':
|
|
428
|
+
if (reimbursement.createdByUser != null) {
|
|
429
|
+
reimbursementsWithSortKeyValue.push(reimbursement);
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
433
|
+
}
|
|
434
|
+
break;
|
|
426
435
|
}
|
|
427
436
|
});
|
|
428
437
|
const getColumnWiseSortOrder = (sortOrder) => {
|
|
@@ -430,6 +439,7 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
|
|
|
430
439
|
case 'reportName':
|
|
431
440
|
case 'type':
|
|
432
441
|
case 'status':
|
|
442
|
+
case 'createdBy':
|
|
433
443
|
return sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
434
444
|
default:
|
|
435
445
|
return sortOrder === 'ascending' ? 'desc' : 'asc';
|
|
@@ -449,6 +459,8 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
|
|
|
449
459
|
return getStatusPerTab(reimbursement);
|
|
450
460
|
case 'amount':
|
|
451
461
|
return reimbursement.amount.amount ?? 0;
|
|
462
|
+
case 'createdBy':
|
|
463
|
+
return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
|
|
452
464
|
}
|
|
453
465
|
}, getColumnWiseSortOrder(sortOrder));
|
|
454
466
|
return [
|
|
@@ -38,7 +38,7 @@ export declare const toRemiSubTabTypeStrict: (v: string) => "rejected" | "failed
|
|
|
38
38
|
export type RemiSubTabType = ReturnType<typeof toRemiSubTabType>;
|
|
39
39
|
export declare const toRemiSubTabUnderScoreType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "my_drafts" | "awaiting_all_approval";
|
|
40
40
|
export type RemiSubTabUnderScoreType = ReturnType<typeof toRemiSubTabUnderScoreType>;
|
|
41
|
-
declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "submittedOn" | "reportName";
|
|
41
|
+
declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "createdBy" | "submittedOn" | "reportName";
|
|
42
42
|
export type ReimbursementViewSortKey = ReturnType<typeof toReimbursementSortKeyType>;
|
|
43
43
|
export interface ReimbursementFilters {
|
|
44
44
|
categories: ReimbursementFilterCategory[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.88-
|
|
3
|
+
"version": "4.19.88-betaVR2",
|
|
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
|
"module": "lib/esm/index.js",
|