@zeniai/client-epic-state 5.0.48-betaRD1 → 5.0.48-betaRD3
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/transaction/payloadTypes/transactionPayload.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +6 -0
- package/lib/entity/transaction/stateTypes/transaction.d.ts +2 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +6 -0
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +5 -5
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +6 -6
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +5 -5
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +6 -6
- package/package.json +1 -1
|
@@ -33,6 +33,7 @@ export interface TransactionPayload extends TransactionIDPayload, AccountBasePay
|
|
|
33
33
|
logo?: URLPayload;
|
|
34
34
|
payment_type?: string;
|
|
35
35
|
payment_type_name?: string;
|
|
36
|
+
project_name?: string | null;
|
|
36
37
|
recipient_currency_code?: string;
|
|
37
38
|
recipient_currency_symbol?: string;
|
|
38
39
|
recipient_total_amount?: number;
|
|
@@ -49,6 +50,7 @@ export interface TransactionPayload extends TransactionIDPayload, AccountBasePay
|
|
|
49
50
|
transaction_update_time?: string;
|
|
50
51
|
vendor_id?: string | null;
|
|
51
52
|
vendor_name?: string | null;
|
|
53
|
+
zeni_project_id?: string | null;
|
|
52
54
|
}
|
|
53
55
|
type LinesWithCOTTracking = LinePayload & {
|
|
54
56
|
cot_viewing_flags?: {
|
|
@@ -101,6 +101,12 @@ const toTransaction = (payload) => {
|
|
|
101
101
|
...(payload.class_name != null && payload.class_name !== ''
|
|
102
102
|
? { className: payload.class_name }
|
|
103
103
|
: {}),
|
|
104
|
+
...(payload.zeni_project_id != null && payload.zeni_project_id !== ''
|
|
105
|
+
? { projectId: payload.zeni_project_id }
|
|
106
|
+
: {}),
|
|
107
|
+
...(payload.project_name != null && payload.project_name !== ''
|
|
108
|
+
? { projectName: payload.project_name }
|
|
109
|
+
: {}),
|
|
104
110
|
...(payload.category_name != null && payload.category_name !== ''
|
|
105
111
|
? { categoryName: payload.category_name }
|
|
106
112
|
: {}),
|
|
@@ -97,6 +97,12 @@ export const toTransaction = (payload) => {
|
|
|
97
97
|
...(payload.class_name != null && payload.class_name !== ''
|
|
98
98
|
? { className: payload.class_name }
|
|
99
99
|
: {}),
|
|
100
|
+
...(payload.zeni_project_id != null && payload.zeni_project_id !== ''
|
|
101
|
+
? { projectId: payload.zeni_project_id }
|
|
102
|
+
: {}),
|
|
103
|
+
...(payload.project_name != null && payload.project_name !== ''
|
|
104
|
+
? { projectName: payload.project_name }
|
|
105
|
+
: {}),
|
|
100
106
|
...(payload.category_name != null && payload.category_name !== ''
|
|
101
107
|
? { categoryName: payload.category_name }
|
|
102
108
|
: {}),
|
package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js
CHANGED
|
@@ -306,7 +306,7 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
|
|
|
306
306
|
});
|
|
307
307
|
return lineItemData;
|
|
308
308
|
};
|
|
309
|
-
export const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, transactionLineId, transactionDetailLocalData, updatedItem, uncategorizedAccounts, selectedTab, vendorId, customerId, selectedAccount, selectedClassBase,
|
|
309
|
+
export const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, transactionLineId, transactionDetailLocalData, updatedItem, uncategorizedAccounts, selectedTab, vendorId, customerId, selectedAccount, selectedClassBase, selectedProjectBase, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled) => {
|
|
310
310
|
let newLineItems = {};
|
|
311
311
|
let selectedCheckBoxTransactionIds = draft.selectedCheckBoxTransactionIds;
|
|
312
312
|
let similarTransactionUpdated = false;
|
|
@@ -335,8 +335,8 @@ export const toSetAllLineItemsToCategoryClass = (draft, transaction, transaction
|
|
|
335
335
|
if (selectedClassBase != null) {
|
|
336
336
|
record.class = selectedClassBase;
|
|
337
337
|
}
|
|
338
|
-
if (
|
|
339
|
-
record.project =
|
|
338
|
+
if (selectedProjectBase != null) {
|
|
339
|
+
record.project = selectedProjectBase;
|
|
340
340
|
}
|
|
341
341
|
const isClassSatisfied = isAccountingClassesEnabled === false || record.class != null;
|
|
342
342
|
if (isClassSatisfied && record.account != null) {
|
|
@@ -389,10 +389,10 @@ export const toSetAllLineItemsToCategoryClass = (draft, transaction, transaction
|
|
|
389
389
|
selectedCheckBoxTransactionIds.push(transaction.id);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
if (
|
|
392
|
+
if (selectedProjectBase != null &&
|
|
393
393
|
updatedItem === 'project' &&
|
|
394
394
|
record.project?.projectId == null) {
|
|
395
|
-
record.project =
|
|
395
|
+
record.project = selectedProjectBase;
|
|
396
396
|
similarTransactionUpdated = true;
|
|
397
397
|
if (record.account != null &&
|
|
398
398
|
selectedCheckBoxTransactionIds.length < MAX_SELECTION_LIMIT &&
|
|
@@ -282,7 +282,7 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
282
282
|
},
|
|
283
283
|
setAllItemsToCategoryClassInLocalDataForCategorization: {
|
|
284
284
|
reducer(draft, action) {
|
|
285
|
-
const { vendorId, customerId, selectedAccount, selectedClassBase,
|
|
285
|
+
const { vendorId, customerId, selectedAccount, selectedClassBase, selectedProjectBase, transactions, transactionId, lineId, selectedTab, uncategorizedAccounts, isAccountingClassesEnabled, isUncategorizedExpenseCategoryEnabled, } = action.payload;
|
|
286
286
|
const transactionLocalData = recordGet(draft.transactionCategorizationView[selectedTab]
|
|
287
287
|
.transactionReviewLocalDataById, transactionId, undefined);
|
|
288
288
|
const existingAccount = transactionLocalData?.transactionReviewLocalData.lineItemById[lineId]
|
|
@@ -296,7 +296,7 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
296
296
|
...transactionLocalData.transactionReviewLocalData.lineItemById[lineId],
|
|
297
297
|
account: selectedAccount,
|
|
298
298
|
class: selectedClassBase,
|
|
299
|
-
project:
|
|
299
|
+
project: selectedProjectBase,
|
|
300
300
|
},
|
|
301
301
|
},
|
|
302
302
|
};
|
|
@@ -331,10 +331,10 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
331
331
|
? 'category'
|
|
332
332
|
: existingClassId !== selectedClassBase?.classId
|
|
333
333
|
? 'class'
|
|
334
|
-
: existingProjectId !==
|
|
334
|
+
: existingProjectId !== selectedProjectBase?.projectId
|
|
335
335
|
? 'project'
|
|
336
336
|
: 'class';
|
|
337
|
-
const { localData, similarTransactionUpdated } = toSetAllLineItemsToCategoryClass(draft.transactionCategorizationView[selectedTab], transaction, transactionId, lineId, transactionLocalData.transactionReviewLocalData, updatedItem, uncategorizedAccounts, selectedTab, vendorId, customerId, selectedAccount, selectedClassBase,
|
|
337
|
+
const { localData, similarTransactionUpdated } = toSetAllLineItemsToCategoryClass(draft.transactionCategorizationView[selectedTab], transaction, transactionId, lineId, transactionLocalData.transactionReviewLocalData, updatedItem, uncategorizedAccounts, selectedTab, vendorId, customerId, selectedAccount, selectedClassBase, selectedProjectBase, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
|
|
338
338
|
draft.transactionCategorizationView[selectedTab].transactionReviewLocalDataById[transaction.id] = {
|
|
339
339
|
transactionId: transaction.id,
|
|
340
340
|
transactionReviewLocalData: localData,
|
|
@@ -353,7 +353,7 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
353
353
|
...dirtyIds,
|
|
354
354
|
]);
|
|
355
355
|
},
|
|
356
|
-
prepare(selectedTab, transactionId, lineId, transactions, uncategorizedAccounts, vendorId, customerId, selectedAccount, selectedClassBase,
|
|
356
|
+
prepare(selectedTab, transactionId, lineId, transactions, uncategorizedAccounts, vendorId, customerId, selectedAccount, selectedClassBase, lineEntity, recommendations, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled, selectedProjectBase) {
|
|
357
357
|
return {
|
|
358
358
|
payload: {
|
|
359
359
|
selectedTab,
|
|
@@ -365,7 +365,7 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
365
365
|
lineEntity,
|
|
366
366
|
selectedAccount,
|
|
367
367
|
selectedClassBase,
|
|
368
|
-
|
|
368
|
+
selectedProjectBase,
|
|
369
369
|
recommendations,
|
|
370
370
|
uncategorizedAccounts,
|
|
371
371
|
isAccountingClassesEnabled,
|