@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
|
@@ -36,6 +36,6 @@ export interface ChargeCardTransactionState {
|
|
|
36
36
|
}
|
|
37
37
|
export declare const toCardTransactionTypeCode: (v: string) => "expense" | "credit_card_credit" | "transfer" | "purchase";
|
|
38
38
|
export type ChargeCardTransactionTypeCode = ReturnType<typeof toCardTransactionTypeCode>;
|
|
39
|
-
export declare const toCardTransactionStatusCode: (v: string) => "paid" | "
|
|
39
|
+
export declare const toCardTransactionStatusCode: (v: string) => "paid" | "authorized" | "canceled" | "declined";
|
|
40
40
|
export type ChargeCardTransactionStatusCode = ReturnType<typeof toCardTransactionStatusCode>;
|
|
41
41
|
export {};
|
|
@@ -71,7 +71,7 @@ export declare function toScheduledJournalEntryState(payload: ScheduledJournalEn
|
|
|
71
71
|
export declare function toJEAccountPayload(payload: JEScheduledTransactionPayload | JEAccruedScheduledTransactionPayload, type: TransactionCategory): AccountPayload | undefined;
|
|
72
72
|
export declare function toJEAccruedAccountPayload(payload: JEScheduledTransactionPayload | JEAccruedScheduledTransactionPayload, type: TransactionCategory): AccountPayload | undefined;
|
|
73
73
|
export declare function toJEClassPayload(payload: JEScheduledTransactionPayload | JEAccruedScheduledTransactionPayload, type: TransactionCategory): ClassBasePayload | undefined;
|
|
74
|
-
export declare function
|
|
74
|
+
export declare function getTransactionDetailKeyPayload(payload: ScheduleTransactionPayload): JEScheduleTransactionKey;
|
|
75
75
|
export declare function getJEScheduleKey(payload: JEAccruedScheduledTransactionPayload): JEScheduleKey;
|
|
76
76
|
export declare function toJEScheduledTransaction(payload: JEScheduledTransactionPayload): JEScheduledTransactionState;
|
|
77
77
|
export declare function toJEAccruedScheduledTransaction(payload: JEAccruedScheduledTransactionPayload): JEAccruedScheduledTransactionState;
|
|
@@ -4,12 +4,13 @@ exports.toScheduledJournalEntryState = toScheduledJournalEntryState;
|
|
|
4
4
|
exports.toJEAccountPayload = toJEAccountPayload;
|
|
5
5
|
exports.toJEAccruedAccountPayload = toJEAccruedAccountPayload;
|
|
6
6
|
exports.toJEClassPayload = toJEClassPayload;
|
|
7
|
-
exports.
|
|
7
|
+
exports.getTransactionDetailKeyPayload = getTransactionDetailKeyPayload;
|
|
8
8
|
exports.getJEScheduleKey = getJEScheduleKey;
|
|
9
9
|
exports.toJEScheduledTransaction = toJEScheduledTransaction;
|
|
10
10
|
exports.toJEAccruedScheduledTransaction = toJEAccruedScheduledTransaction;
|
|
11
11
|
const amount_1 = require("../../commonStateTypes/amount");
|
|
12
12
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
13
|
+
const transactionDetailState_1 = require("../../view/transactionDetail/transactionDetailState");
|
|
13
14
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
14
15
|
const transactionIDPayload_1 = require("../transaction/payloadTypes/transactionIDPayload");
|
|
15
16
|
const jeScheduleHelper_1 = require("./jeScheduleHelper");
|
|
@@ -131,12 +132,9 @@ function toJEClassPayload(payload, type) {
|
|
|
131
132
|
: undefined;
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
function
|
|
135
|
+
function getTransactionDetailKeyPayload(payload) {
|
|
135
136
|
const transactionId = (0, transactionIDPayload_1.toTransactionID)(payload);
|
|
136
|
-
return (0,
|
|
137
|
-
...transactionId,
|
|
138
|
-
lineId: payload.line_id,
|
|
139
|
-
});
|
|
137
|
+
return (0, transactionDetailState_1.getZeniTransactionDetailKey)(transactionId);
|
|
140
138
|
}
|
|
141
139
|
function getJEScheduleKey(payload) {
|
|
142
140
|
return (0, jeScheduleHelper_1.generateJEScheduleKey)(payload);
|
|
@@ -157,10 +155,7 @@ function toJEScheduledTransaction(payload) {
|
|
|
157
155
|
label: payload.status.label,
|
|
158
156
|
},
|
|
159
157
|
vendorId: payload.vendor.vendor_id,
|
|
160
|
-
baseTransaction: (
|
|
161
|
-
...(0, transactionIDPayload_1.toTransactionID)(payload.base_transaction),
|
|
162
|
-
lineId: payload.base_transaction.line_id,
|
|
163
|
-
}),
|
|
158
|
+
baseTransaction: getTransactionDetailKeyPayload(payload.base_transaction),
|
|
164
159
|
startDate: payload.start_date != null ? (0, zeniDayJS_1.date)(payload.start_date) : undefined,
|
|
165
160
|
endDate: payload.end_date != null ? (0, zeniDayJS_1.date)(payload.end_date) : undefined,
|
|
166
161
|
period: payload.period != null ? Number(payload.period) : undefined,
|
|
@@ -18,8 +18,8 @@ export declare const updateJESchedules: import("@reduxjs/toolkit").ActionCreator
|
|
|
18
18
|
jeSchedulesPayload: JEAccruedScheduledTransactionPayload[];
|
|
19
19
|
scheduledJEntriesPayload: ScheduledJournalEntryPayload[] | undefined;
|
|
20
20
|
updateType: UpdateType;
|
|
21
|
-
}, "jeSchedules/updateAccruedJESchedulesDetails", never, never>, deleteJESchedulesDetails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}
|
|
22
|
-
jeScheduleTransactionKey: `${string}
|
|
21
|
+
}, "jeSchedules/updateAccruedJESchedulesDetails", never, never>, deleteJESchedulesDetails: 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`], {
|
|
22
|
+
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`;
|
|
23
23
|
}, "jeSchedules/deleteJESchedulesDetails", never, never>, deleteAccruedJESchedulesDetails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[JEScheduleKey: `${string}_${string}`], {
|
|
24
24
|
JEScheduleKey: `${string}_${string}`;
|
|
25
25
|
}, "jeSchedules/deleteAccruedJESchedulesDetails", never, never>, clearAllAccruedJESchedules: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"jeSchedules/clearAllAccruedJESchedules">, clearAllJEScheduleTransactions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"jeSchedules/clearAllJEScheduleTransactions">;
|
|
@@ -42,7 +42,7 @@ const jeSchedules = (0, toolkit_1.createSlice)({
|
|
|
42
42
|
},
|
|
43
43
|
updateJEScheduledTransaction: (draft, action) => {
|
|
44
44
|
action.payload.jeSchedulesTransactionsPayload.forEach((schedule) => {
|
|
45
|
-
doUpdateJEScheduledTransaction(draft.schedulesByTransactionKey, (0, jeSchedulesPayload_1.
|
|
45
|
+
doUpdateJEScheduledTransaction(draft.schedulesByTransactionKey, (0, jeSchedulesPayload_1.getTransactionDetailKeyPayload)(schedule.base_transaction), schedule, 'merge');
|
|
46
46
|
});
|
|
47
47
|
},
|
|
48
48
|
updateAccruedJEScheduledTransaction: (draft, action) => {
|
|
@@ -84,7 +84,7 @@ const jeSchedules = (0, toolkit_1.createSlice)({
|
|
|
84
84
|
if (jeSchedulesPayload.length > 0) {
|
|
85
85
|
jeSchedulesPayload.forEach((jeSchedulePayload) => {
|
|
86
86
|
const transactionKey = jeSchedulePayload.base_transaction;
|
|
87
|
-
doUpdateScheduledDetailTransaction(draft.schedulesByTransactionKey, (0, jeSchedulesPayload_1.
|
|
87
|
+
doUpdateScheduledDetailTransaction(draft.schedulesByTransactionKey, (0, jeSchedulesPayload_1.getTransactionDetailKeyPayload)(transactionKey), jeSchedulePayload, action.payload.scheduledJEntriesPayload ?? [], updateType);
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Amount } from '../../commonStateTypes/amount';
|
|
2
2
|
import { ID } from '../../commonStateTypes/common';
|
|
3
3
|
import { ScheduleDaysOfMonth } from '../../commonStateTypes/timePeriod';
|
|
4
|
+
import { TransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
|
|
4
5
|
import { ZeniDate } from '../../zeniDayJS';
|
|
5
6
|
import { TransactionID } from '../transaction/stateTypes/transaction';
|
|
6
7
|
import { JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTypes } from './jeSchedulesTypes';
|
|
@@ -41,7 +42,7 @@ export interface ScheduledJournalEntryState {
|
|
|
41
42
|
updateTime?: ZeniDate;
|
|
42
43
|
}
|
|
43
44
|
export interface JEScheduledTransactionState {
|
|
44
|
-
baseTransaction:
|
|
45
|
+
baseTransaction: TransactionDetailKey;
|
|
45
46
|
currencyCode: string;
|
|
46
47
|
currencySymbol: string;
|
|
47
48
|
jeCredit: {
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getZeniTransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
|
|
2
2
|
import { generateJEScheduleKey } from './jeScheduleHelper';
|
|
3
|
-
export
|
|
4
|
-
lineId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const getJEScheduleTransactionKey: (scheduleTransactionId: ScheduleTransactionID) => `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
|
|
7
|
-
export type JEScheduleTransactionKey = ReturnType<typeof getJEScheduleTransactionKey>;
|
|
3
|
+
export type JEScheduleTransactionKey = ReturnType<typeof getZeniTransactionDetailKey>;
|
|
8
4
|
export type JEScheduleKey = ReturnType<typeof generateJEScheduleKey>;
|
|
9
5
|
export declare const ALL_SCHEDULES_TYPES: readonly ["prepaid_expenses", "fixed_assets", "accrued_expenses", "deferred_revenue"];
|
|
10
6
|
export declare const toScheduleTypesType: (v: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
|
|
11
7
|
export type ScheduleTypes = ReturnType<typeof toScheduleTypesType>;
|
|
12
8
|
export declare const toScheduleTypesTypeStrict: (v?: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue" | undefined;
|
|
13
|
-
export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "posted" | "
|
|
9
|
+
export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "posted" | "canceled" | "unknown" | "recorded";
|
|
14
10
|
export type ScheduleJournalEntryStatusCodeType = ReturnType<typeof toScheduleJournalEntryStatusCodeType>;
|
|
15
11
|
export declare const toScheduleStatusCodeType: (v: string) => "draft" | "completed" | "new" | "ongoing" | "marked_as_completed";
|
|
16
12
|
export type ScheduleStatusCodeType = ReturnType<typeof toScheduleStatusCodeType>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toJournalEntryErrorCodeType = exports.toScheduleStatusCodeType = exports.toScheduleJournalEntryStatusCodeType = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.ALL_SCHEDULES_TYPES =
|
|
3
|
+
exports.toJournalEntryErrorCodeType = exports.toScheduleStatusCodeType = exports.toScheduleJournalEntryStatusCodeType = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.ALL_SCHEDULES_TYPES = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
|
-
const getJEScheduleTransactionKey = (scheduleTransactionId) => `${scheduleTransactionId.id}_${scheduleTransactionId.type}_${scheduleTransactionId.lineId}`;
|
|
6
|
-
exports.getJEScheduleTransactionKey = getJEScheduleTransactionKey;
|
|
7
5
|
exports.ALL_SCHEDULES_TYPES = [
|
|
8
6
|
'prepaid_expenses',
|
|
9
7
|
'fixed_assets',
|
|
@@ -33,6 +33,9 @@ export interface TransactionPayload extends TransactionIDPayload, AccountBasePay
|
|
|
33
33
|
recipient_total_amount?: number;
|
|
34
34
|
recommendations?: RecommendationPayload[];
|
|
35
35
|
sync_token?: string;
|
|
36
|
+
target_account_id?: string | null;
|
|
37
|
+
target_account_integration_id?: string | null;
|
|
38
|
+
target_account_name?: string | null;
|
|
36
39
|
total_amount?: number;
|
|
37
40
|
transaction_type_name?: string;
|
|
38
41
|
transaction_update_time?: string;
|
|
@@ -65,6 +65,17 @@ const toTransaction = (payload) => {
|
|
|
65
65
|
...(payload.customer_name !== null && payload.customer_name !== ''
|
|
66
66
|
? { customerName: payload.customer_name }
|
|
67
67
|
: {}),
|
|
68
|
+
...(payload.target_account_id !== null && payload.target_account_id !== ''
|
|
69
|
+
? { targetAccountId: payload.target_account_id }
|
|
70
|
+
: {}),
|
|
71
|
+
...(payload.target_account_integration_id !== null &&
|
|
72
|
+
payload.target_account_integration_id !== ''
|
|
73
|
+
? { targetAccountIntegrationId: payload.target_account_integration_id }
|
|
74
|
+
: {}),
|
|
75
|
+
...(payload.target_account_name !== null &&
|
|
76
|
+
payload.target_account_name !== ''
|
|
77
|
+
? { targetAccountName: payload.target_account_name }
|
|
78
|
+
: {}),
|
|
68
79
|
linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload)),
|
|
69
80
|
lines: payload?.lines?.map((linePayload) => (0, transactionLinePayload_1.toLine)(linePayload, amount, recipientAmount)),
|
|
70
81
|
account: payloadHasAccountInfo(payload)
|
|
@@ -40,6 +40,9 @@ export interface Transaction extends BaseTransaction {
|
|
|
40
40
|
qboId?: string;
|
|
41
41
|
recommendations?: RecommendationByLineId;
|
|
42
42
|
syncToken?: string;
|
|
43
|
+
targetAccountId?: ID;
|
|
44
|
+
targetAccountIntegrationId?: string;
|
|
45
|
+
targetAccountName?: string;
|
|
43
46
|
updateTime?: ZeniDate;
|
|
44
47
|
vendorId?: ID;
|
|
45
48
|
vendorName?: string;
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.clearAllTransactions = exports.updateTransactionIsMiscategorized = exports.removeTransactionAttachment = exports.removeTransactionCategorization = exports.removeTransaction = exports.updateMultipleReconcileTransactions = exports.updateReconcileTransactions = exports.updateScheduleTransactions = exports.updateTransaction = exports.updateTransactions = exports.initialState = void 0;
|
|
8
8
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
9
|
const assignWith_1 = __importDefault(require("lodash/assignWith"));
|
|
10
|
-
const
|
|
10
|
+
const transactionDetailState_1 = require("../../view/transactionDetail/transactionDetailState");
|
|
11
11
|
const reconciliationTransactionPayloads_1 = require("./payloadTypes/reconciliationTransactionPayloads");
|
|
12
12
|
const scheduleTransactionPayload_1 = require("./payloadTypes/scheduleTransactionPayload");
|
|
13
13
|
const transactionType_1 = require("./stateTypes/transactionType");
|
|
@@ -75,10 +75,9 @@ const transaction = (0, toolkit_1.createSlice)({
|
|
|
75
75
|
updateScheduleTransactions: {
|
|
76
76
|
reducer(draft, action) {
|
|
77
77
|
action.payload.transactionsPayload.forEach((value) => {
|
|
78
|
-
const id = (0,
|
|
78
|
+
const id = (0, transactionDetailState_1.getZeniTransactionDetailKey)({
|
|
79
79
|
id: value.transaction_id,
|
|
80
80
|
type: (0, transactionType_1.toTransactionType)(value.transaction_type),
|
|
81
|
-
lineId: value.line_id,
|
|
82
81
|
});
|
|
83
82
|
doUpdateScheduleTransaction(draft.scheduleTransactionById, id, value, action.payload.currencyCode, action.payload.currencySymbol, action.meta.updateType);
|
|
84
83
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import {
|
|
2
|
+
import { TransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
|
|
3
3
|
import { MatchedTransaction } from './stateTypes/reconciliationTransaction';
|
|
4
4
|
import { ScheduleTransaction } from './stateTypes/scheduleTransaction';
|
|
5
5
|
import { SupportedTransaction, TransactionState } from './transactionState';
|
|
6
|
-
export declare function getScheduleTransactionById(transactionState: TransactionState, transactionId:
|
|
6
|
+
export declare function getScheduleTransactionById(transactionState: TransactionState, transactionId: TransactionDetailKey): ScheduleTransaction | undefined;
|
|
7
7
|
export declare function getSupportedTransactionById(transactionState: TransactionState, transactionId: ID): SupportedTransaction | undefined;
|
|
8
8
|
export declare function getSupportedTransactionsByIds(transactionState: TransactionState, transactionIds: ID[]): SupportedTransaction[];
|
|
9
9
|
export declare function getMatchedTransactionById(transactionState: TransactionState, transactionId: ID): MatchedTransaction | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { TransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
|
|
3
|
-
import { JEScheduleTransactionKey } from '../jeSchedules/jeSchedulesTypes';
|
|
2
|
+
import { TransactionDetailKey, ZeniTransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
|
|
4
3
|
import { CustomerTransactionPayload } from './payloadTypes/customerTransactionPayload';
|
|
5
4
|
import { TransactionPayload } from './payloadTypes/transactionPayload';
|
|
6
5
|
import { VendorTransactionPayload, VendorTransactionWithCustomerPayload } from './payloadTypes/vendorTransactionPayload';
|
|
@@ -15,6 +14,6 @@ export type SupportedTransactionPayload = TransactionPayload | CustomerTransacti
|
|
|
15
14
|
export type AllSupportedTransactions = SupportedTransaction | undefined;
|
|
16
15
|
export interface TransactionState {
|
|
17
16
|
reconcileTransactionById: Record<ID, MatchedTransaction>;
|
|
18
|
-
scheduleTransactionById: Record<
|
|
17
|
+
scheduleTransactionById: Record<ZeniTransactionDetailKey, ScheduleTransaction>;
|
|
19
18
|
transactionById: Record<ID | TransactionDetailKey, SupportedTransaction | undefined>;
|
|
20
19
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { toAmount } from '../../commonStateTypes/amount';
|
|
2
2
|
import { LAST_SCHEDULE_DAY_OF_MONTH, MAX_SCHEDULE_DAY_OF_MONTH, MIN_SCHEDULE_DAY_OF_MONTH, toScheduleDaysOfMonth, } from '../../commonStateTypes/timePeriod';
|
|
3
|
+
import { getZeniTransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
|
|
3
4
|
import { date } from '../../zeniDayJS';
|
|
4
5
|
import { toTransactionID, } from '../transaction/payloadTypes/transactionIDPayload';
|
|
5
6
|
import { generateJEScheduleKey } from './jeScheduleHelper';
|
|
6
|
-
import {
|
|
7
|
+
import { toJournalEntryErrorCodeType, toScheduleJournalEntryStatusCodeType, toScheduleStatusCodeType, toScheduleTypesTypeStrict, } from './jeSchedulesTypes';
|
|
7
8
|
export function toScheduledJournalEntryState(payload, currency_code, currency_symbol) {
|
|
8
9
|
return {
|
|
9
10
|
status: {
|
|
@@ -121,12 +122,9 @@ export function toJEClassPayload(payload, type) {
|
|
|
121
122
|
: undefined;
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
|
-
export function
|
|
125
|
+
export function getTransactionDetailKeyPayload(payload) {
|
|
125
126
|
const transactionId = toTransactionID(payload);
|
|
126
|
-
return
|
|
127
|
-
...transactionId,
|
|
128
|
-
lineId: payload.line_id,
|
|
129
|
-
});
|
|
127
|
+
return getZeniTransactionDetailKey(transactionId);
|
|
130
128
|
}
|
|
131
129
|
export function getJEScheduleKey(payload) {
|
|
132
130
|
return generateJEScheduleKey(payload);
|
|
@@ -147,10 +145,7 @@ export function toJEScheduledTransaction(payload) {
|
|
|
147
145
|
label: payload.status.label,
|
|
148
146
|
},
|
|
149
147
|
vendorId: payload.vendor.vendor_id,
|
|
150
|
-
baseTransaction:
|
|
151
|
-
...toTransactionID(payload.base_transaction),
|
|
152
|
-
lineId: payload.base_transaction.line_id,
|
|
153
|
-
}),
|
|
148
|
+
baseTransaction: getTransactionDetailKeyPayload(payload.base_transaction),
|
|
154
149
|
startDate: payload.start_date != null ? date(payload.start_date) : undefined,
|
|
155
150
|
endDate: payload.end_date != null ? date(payload.end_date) : undefined,
|
|
156
151
|
period: payload.period != null ? Number(payload.period) : undefined,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
2
|
import assignWith from 'lodash/assignWith';
|
|
3
|
-
import { getJEScheduleKey,
|
|
3
|
+
import { getJEScheduleKey, getTransactionDetailKeyPayload, toJEAccruedScheduledTransaction, toJEScheduledTransaction, toScheduledJournalEntryState, } from './jeSchedulesPayload';
|
|
4
4
|
export const initialState = {
|
|
5
5
|
schedulesByTransactionKey: {},
|
|
6
6
|
schedulesByAccruedJEScheduleKey: {},
|
|
@@ -35,7 +35,7 @@ const jeSchedules = createSlice({
|
|
|
35
35
|
},
|
|
36
36
|
updateJEScheduledTransaction: (draft, action) => {
|
|
37
37
|
action.payload.jeSchedulesTransactionsPayload.forEach((schedule) => {
|
|
38
|
-
doUpdateJEScheduledTransaction(draft.schedulesByTransactionKey,
|
|
38
|
+
doUpdateJEScheduledTransaction(draft.schedulesByTransactionKey, getTransactionDetailKeyPayload(schedule.base_transaction), schedule, 'merge');
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
41
|
updateAccruedJEScheduledTransaction: (draft, action) => {
|
|
@@ -77,7 +77,7 @@ const jeSchedules = createSlice({
|
|
|
77
77
|
if (jeSchedulesPayload.length > 0) {
|
|
78
78
|
jeSchedulesPayload.forEach((jeSchedulePayload) => {
|
|
79
79
|
const transactionKey = jeSchedulePayload.base_transaction;
|
|
80
|
-
doUpdateScheduledDetailTransaction(draft.schedulesByTransactionKey,
|
|
80
|
+
doUpdateScheduledDetailTransaction(draft.schedulesByTransactionKey, getTransactionDetailKeyPayload(transactionKey), jeSchedulePayload, action.payload.scheduledJEntriesPayload ?? [], updateType);
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { stringToUnion, stringToUnionStrict, } from '../../commonStateTypes/stringToUnion';
|
|
2
|
-
export const getJEScheduleTransactionKey = (scheduleTransactionId) => `${scheduleTransactionId.id}_${scheduleTransactionId.type}_${scheduleTransactionId.lineId}`;
|
|
3
2
|
export const ALL_SCHEDULES_TYPES = [
|
|
4
3
|
'prepaid_expenses',
|
|
5
4
|
'fixed_assets',
|
|
@@ -61,6 +61,17 @@ export const toTransaction = (payload) => {
|
|
|
61
61
|
...(payload.customer_name !== null && payload.customer_name !== ''
|
|
62
62
|
? { customerName: payload.customer_name }
|
|
63
63
|
: {}),
|
|
64
|
+
...(payload.target_account_id !== null && payload.target_account_id !== ''
|
|
65
|
+
? { targetAccountId: payload.target_account_id }
|
|
66
|
+
: {}),
|
|
67
|
+
...(payload.target_account_integration_id !== null &&
|
|
68
|
+
payload.target_account_integration_id !== ''
|
|
69
|
+
? { targetAccountIntegrationId: payload.target_account_integration_id }
|
|
70
|
+
: {}),
|
|
71
|
+
...(payload.target_account_name !== null &&
|
|
72
|
+
payload.target_account_name !== ''
|
|
73
|
+
? { targetAccountName: payload.target_account_name }
|
|
74
|
+
: {}),
|
|
64
75
|
linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => toTransactionID(transactionIDPayload)),
|
|
65
76
|
lines: payload?.lines?.map((linePayload) => toLine(linePayload, amount, recipientAmount)),
|
|
66
77
|
account: payloadHasAccountInfo(payload)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
2
|
import assignWith from 'lodash/assignWith';
|
|
3
|
-
import {
|
|
3
|
+
import { getZeniTransactionDetailKey, } from '../../view/transactionDetail/transactionDetailState';
|
|
4
4
|
import { toMatchedTransaction, } from './payloadTypes/reconciliationTransactionPayloads';
|
|
5
5
|
import { toScheduleTransaction, } from './payloadTypes/scheduleTransactionPayload';
|
|
6
6
|
import { toTransactionType } from './stateTypes/transactionType';
|
|
@@ -68,10 +68,9 @@ const transaction = createSlice({
|
|
|
68
68
|
updateScheduleTransactions: {
|
|
69
69
|
reducer(draft, action) {
|
|
70
70
|
action.payload.transactionsPayload.forEach((value) => {
|
|
71
|
-
const id =
|
|
71
|
+
const id = getZeniTransactionDetailKey({
|
|
72
72
|
id: value.transaction_id,
|
|
73
73
|
type: toTransactionType(value.transaction_type),
|
|
74
|
-
lineId: value.line_id,
|
|
75
74
|
});
|
|
76
75
|
doUpdateScheduleTransaction(draft.scheduleTransactionById, id, value, action.payload.currencyCode, action.payload.currencySymbol, action.meta.updateType);
|
|
77
76
|
});
|
package/lib/esm/index.js
CHANGED
|
@@ -50,7 +50,7 @@ import { getForecast } from './entity/forecast/forecastSelector';
|
|
|
50
50
|
import { toEntityType, } from './entity/genericEntity/entity';
|
|
51
51
|
import { clearAllEntities, updateEntities, } from './entity/genericEntity/entityReducer';
|
|
52
52
|
import { getEntityByEntityIDs } from './entity/genericEntity/entitySelector';
|
|
53
|
-
import { ALL_SCHEDULES_TYPES,
|
|
53
|
+
import { ALL_SCHEDULES_TYPES, toScheduleTypesType, toScheduleTypesTypeStrict, } from './entity/jeSchedules/jeSchedulesTypes';
|
|
54
54
|
import { ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
55
55
|
import { updateCommentsNotifications, updateCommentsNotificationsStatuses, } from './entity/notification/notificationReducer';
|
|
56
56
|
import { toNotificationModeStrict, } from './entity/notification/types/notificationTypes';
|
|
@@ -578,7 +578,7 @@ export { fetchApAging, getApAgingReport, updateApAgingUIState, };
|
|
|
578
578
|
export { fetchApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
|
|
579
579
|
export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
|
|
580
580
|
export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
|
|
581
|
-
export {
|
|
581
|
+
export { ALL_SCHEDULES_TYPES, getScheduleListReport, getAccruedScheduleListReport, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, toScheduleSubTabType, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, updatedSelectedJELinkRowIndex, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, resetJELinkInLocalData, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, getVendorTabView, };
|
|
582
582
|
export { toVendorFirstReviewViewColumnKeyType, getGlobalMerchantAutoCompleteResults, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, };
|
|
583
583
|
export { fetchGlobalMerchantRecommendation, createGlobalMerchant, updateCreateGlobalMerchantLocalData, clearGlobalMerchantView, getGlobalMerchantView, };
|
|
584
584
|
export { approveVendorGlobalReview, rejectVendorGlobalReview, fetchVendorGlobalReviewView, updateSelectedGlobalMerchant, updateVendorGlobalReviewViewUIState, getVendorGlobalReviewView, getTenantMerchantByMerchantId, toVendorGlobalReviewColumnSortKeyType, updateVendorGlobalReviewViewLocalData, };
|
|
@@ -2,8 +2,10 @@ import { createSlice } from '@reduxjs/toolkit';
|
|
|
2
2
|
import { geNestedAccountIDHierarchyForReport } from '../../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport';
|
|
3
3
|
import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
|
|
4
4
|
import { mapAccountBasePayloadToAccountBase, mapAccountMetadataPayloadToAccountMetadata, } from '../../../entity/account/accountPayload';
|
|
5
|
-
import {
|
|
5
|
+
import { getTransactionDetailKeyPayload, } from '../../../entity/jeSchedules/jeSchedulesPayload';
|
|
6
|
+
import { toTransactionID } from '../../../entity/transaction/payloadTypes/transactionIDPayload';
|
|
6
7
|
import { mapAccountTypeRecommendationPayloadToAccountRecommendationByType, } from '../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload';
|
|
8
|
+
import { getZeniTransactionDetailKey } from '../../transactionDetail/transactionDetailState';
|
|
7
9
|
export const accountSettingsInitialState = {
|
|
8
10
|
localData: {
|
|
9
11
|
selectedPrepaidExpensesAccountIds: [],
|
|
@@ -97,8 +99,14 @@ const expenseAutomationJESchedulesView = createSlice({
|
|
|
97
99
|
},
|
|
98
100
|
fetchJeSchedulesSuccess(draft, action) {
|
|
99
101
|
const { jeSchedules, selectedPeriod, failedJeSchedules, refreshViewInBackground, } = action.payload;
|
|
100
|
-
const jeScheduleTransactionKeys = jeSchedules.map((schedules) =>
|
|
101
|
-
|
|
102
|
+
const jeScheduleTransactionKeys = jeSchedules.map((schedules) => {
|
|
103
|
+
const transactionID = toTransactionID(schedules.base_transaction);
|
|
104
|
+
return getZeniTransactionDetailKey(transactionID);
|
|
105
|
+
});
|
|
106
|
+
const failedJeScheduleTransactionKeys = failedJeSchedules.map((schedules) => {
|
|
107
|
+
const transactionID = toTransactionID(schedules.base_transaction);
|
|
108
|
+
return getZeniTransactionDetailKey(transactionID);
|
|
109
|
+
});
|
|
102
110
|
if (refreshViewInBackground === true &&
|
|
103
111
|
draft.refreshStatus.fetchState === 'In-Progress') {
|
|
104
112
|
draft.refreshStatus = { fetchState: 'Completed', error: undefined };
|
|
@@ -264,7 +272,7 @@ const expenseAutomationJESchedulesView = createSlice({
|
|
|
264
272
|
return {
|
|
265
273
|
payload: {
|
|
266
274
|
jeScheduleTransactionKeys: [
|
|
267
|
-
...jeSchedules.map((jeSchedule) =>
|
|
275
|
+
...jeSchedules.map((jeSchedule) => getTransactionDetailKeyPayload(jeSchedule.base_transaction)),
|
|
268
276
|
],
|
|
269
277
|
},
|
|
270
278
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { from, of } from 'rxjs';
|
|
2
2
|
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { getJEScheduleTransactionDetailKeyPayload, } from '../../../../entity/jeSchedules/jeSchedulesPayload';
|
|
4
3
|
import { updateJESchedules, updateJESchedulesDetails, } from '../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
4
|
+
import { toTransactionType } from '../../../../entity/transaction/stateTypes/transactionType';
|
|
5
5
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
6
|
+
import { getZeniTransactionDetailKey } from '../../../transactionDetail/transactionDetailState';
|
|
6
7
|
import { createNewSchedules, fetchScheduleDetails, initializeScheduleDetailLocalData, saveScheduleDetailsSuccessOrFailure, updateScheduleDetailsFailure, updateScheduleDetailsSuccess, updateSelectedJEScheduleKey, } from '../scheduleDetailReducer';
|
|
7
8
|
export const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchScheduleDetails.match), mergeMap((action) => {
|
|
8
9
|
const updateActions = [];
|
|
@@ -23,7 +24,11 @@ export const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.
|
|
|
23
24
|
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules/${selectedJeScheduleDetailId}?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
24
25
|
.pipe(mergeMap((response) => {
|
|
25
26
|
if (isSuccessResponse(response) && response.data != null) {
|
|
26
|
-
const
|
|
27
|
+
const transactionData = response.data.je_schedules[0].base_transaction;
|
|
28
|
+
const selectedJEScheduleKey = getZeniTransactionDetailKey({
|
|
29
|
+
id: transactionData.transaction_id,
|
|
30
|
+
type: toTransactionType(transactionData.transaction_type),
|
|
31
|
+
});
|
|
27
32
|
updateActions.push(updateJESchedules(response.data.je_schedules), updateSelectedJEScheduleKey({ selectedJEScheduleKey }), updateJESchedulesDetails(response.data.je_schedules, response.data.scheduled_journal_entries), saveScheduleDetailsSuccessOrFailure('Not-Started'), initializeScheduleDetailLocalData(scheduleType, selectedJEScheduleKey, selectedJeScheduleDetailId), updateScheduleDetailsSuccess());
|
|
28
33
|
if (response.data.je_schedules[0].status.code === 'draft' &&
|
|
29
34
|
isCompleteJEScheduleFormDataPresent(response.data.je_schedules[0])) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
import { getJEScheduleKey,
|
|
2
|
+
import { getJEScheduleKey, } from '../../../entity/jeSchedules/jeSchedulesPayload';
|
|
3
|
+
import { toTransactionID } from '../../../entity/transaction/payloadTypes/transactionIDPayload';
|
|
4
|
+
import { getZeniTransactionDetailKey } from '../../transactionDetail/transactionDetailState';
|
|
3
5
|
import { getDefaultSelectedTimeframeForScheduleType } from './scheduleListHelper';
|
|
4
6
|
import { getScheduleListKey, } from './scheduleListTypes';
|
|
5
7
|
export const initialUIState = {
|
|
@@ -377,7 +379,10 @@ export default scheduleListView.reducer;
|
|
|
377
379
|
function doUpdateScheduleList(draft, payload, scheduleType, selectedTimeframe, selectedCategoryId) {
|
|
378
380
|
if (scheduleType !== 'accrued_expenses') {
|
|
379
381
|
const state = getState(draft, scheduleType);
|
|
380
|
-
const jeScheduleTransactionKeys = payload.map((schedules) =>
|
|
382
|
+
const jeScheduleTransactionKeys = payload.map((schedules) => {
|
|
383
|
+
const transactionID = toTransactionID(schedules.base_transaction);
|
|
384
|
+
return getZeniTransactionDetailKey(transactionID);
|
|
385
|
+
});
|
|
381
386
|
state.selectedCategoryId = selectedCategoryId;
|
|
382
387
|
state.selectedTimeframe = selectedTimeframe;
|
|
383
388
|
const key = getScheduleListKey(selectedCategoryId, selectedTimeframe);
|
|
@@ -416,6 +416,14 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
416
416
|
transactionsWithNoSortKeyValue.push(transaction);
|
|
417
417
|
}
|
|
418
418
|
break;
|
|
419
|
+
case 'invoiceNumber':
|
|
420
|
+
if (transaction.documentId != null) {
|
|
421
|
+
transactionsWithSortKeyValue.push(transaction);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
transactionsWithNoSortKeyValue.push(transaction);
|
|
425
|
+
}
|
|
426
|
+
break;
|
|
419
427
|
case 'dueDate':
|
|
420
428
|
if (currentTab === 'draft') {
|
|
421
429
|
if (Boolean(transaction.dueDate) === true) {
|
|
@@ -518,6 +526,8 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
518
526
|
return transaction.totalAmountInUSD?.amount ?? 0;
|
|
519
527
|
case 'paymentMethod':
|
|
520
528
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
529
|
+
case 'invoiceNumber':
|
|
530
|
+
return transaction.documentId;
|
|
521
531
|
}
|
|
522
532
|
}, getColumnWiseSortOrder(sortOrder));
|
|
523
533
|
return [
|
|
@@ -219,6 +219,8 @@ const getCardsBySortKey = (card, sortKey) => {
|
|
|
219
219
|
return card.cardName.toLowerCase();
|
|
220
220
|
case 'cardType':
|
|
221
221
|
return card.type.code;
|
|
222
|
+
case 'accountType':
|
|
223
|
+
return card.type.code.includes('credit') ? 'credit' : 'debit';
|
|
222
224
|
case 'status':
|
|
223
225
|
return card.status.code;
|
|
224
226
|
case 'utilisation':
|
|
@@ -45,6 +45,7 @@ export const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled
|
|
|
45
45
|
return {
|
|
46
46
|
...reimbursement,
|
|
47
47
|
submittedBy: getUserByUserId(userState, reimbursement.reimburseeUserId),
|
|
48
|
+
createdByUser: getUserByUserId(userState, reimbursement.createdBy),
|
|
48
49
|
approvers: approvers,
|
|
49
50
|
};
|
|
50
51
|
});
|
|
@@ -415,6 +416,14 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
415
416
|
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
416
417
|
}
|
|
417
418
|
break;
|
|
419
|
+
case 'createdBy':
|
|
420
|
+
if (reimbursement.createdByUser != null) {
|
|
421
|
+
reimbursementsWithSortKeyValue.push(reimbursement);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
425
|
+
}
|
|
426
|
+
break;
|
|
418
427
|
}
|
|
419
428
|
});
|
|
420
429
|
const getColumnWiseSortOrder = (sortOrder) => {
|
|
@@ -422,6 +431,7 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
422
431
|
case 'reportName':
|
|
423
432
|
case 'type':
|
|
424
433
|
case 'status':
|
|
434
|
+
case 'createdBy':
|
|
425
435
|
return sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
426
436
|
default:
|
|
427
437
|
return sortOrder === 'ascending' ? 'desc' : 'asc';
|
|
@@ -441,6 +451,8 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
441
451
|
return getStatusPerTab(reimbursement);
|
|
442
452
|
case 'amount':
|
|
443
453
|
return reimbursement.amount.amount ?? 0;
|
|
454
|
+
case 'createdBy':
|
|
455
|
+
return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
|
|
444
456
|
}
|
|
445
457
|
}, getColumnWiseSortOrder(sortOrder));
|
|
446
458
|
return [
|