@zeniai/client-epic-state 5.1.50-betaRD3 → 5.1.50-betaRD4
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/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +1 -0
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +1 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -1
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +1 -1
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +1 -1
- package/package.json +1 -1
|
@@ -73,6 +73,7 @@ export interface JEScheduledTransactionPayload {
|
|
|
73
73
|
vendor: VendorPayload;
|
|
74
74
|
ai_summaries?: JEScheduleAISummariesPayload;
|
|
75
75
|
confidence_score?: number | null;
|
|
76
|
+
create_time?: string | null;
|
|
76
77
|
created_by?: UserPayload;
|
|
77
78
|
end_date?: string | null;
|
|
78
79
|
recommendations?: JEScheduleRecommendationsPayload;
|
|
@@ -261,6 +261,7 @@ function toJEScheduledTransaction(payload) {
|
|
|
261
261
|
updatedByUserID: payload.updated_by.user_id,
|
|
262
262
|
balanceAsOfToday: payload.balance ?? undefined,
|
|
263
263
|
updatedAt: payload.updated_at != null ? (0, zeniDayJS_1.date)(payload.updated_at) : undefined,
|
|
264
|
+
createTime: payload.create_time != null ? (0, zeniDayJS_1.date)(payload.create_time) : undefined,
|
|
264
265
|
jeCredit: {
|
|
265
266
|
accountId: payload.je_credit_account_id ?? undefined,
|
|
266
267
|
accountingClassId: payload.je_credit_accounting_class_id ?? undefined,
|
|
@@ -81,7 +81,7 @@ exports.getJEAccruedScheduleByJEScheduleKey = getJEAccruedScheduleByJEScheduleKe
|
|
|
81
81
|
const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
|
|
82
82
|
const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
|
|
83
83
|
const jeScheduleTransactionState = (0, get_1.default)(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
|
|
84
|
-
const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, confidenceScore, recommendations, } = jeScheduleTransactionState;
|
|
84
|
+
const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, createTime, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, confidenceScore, recommendations, } = jeScheduleTransactionState;
|
|
85
85
|
const vendorDetails = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
|
|
86
86
|
if (vendorDetails == null) {
|
|
87
87
|
throw new Error(`Vendor with ${vendorId} doesn't exist`);
|
|
@@ -146,6 +146,7 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
|
|
|
146
146
|
aiSummaries,
|
|
147
147
|
confidenceScore,
|
|
148
148
|
createdByUser: createdByUserDetails,
|
|
149
|
+
createTime,
|
|
149
150
|
recommendations,
|
|
150
151
|
};
|
|
151
152
|
};
|
|
@@ -251,6 +251,7 @@ export function toJEScheduledTransaction(payload) {
|
|
|
251
251
|
updatedByUserID: payload.updated_by.user_id,
|
|
252
252
|
balanceAsOfToday: payload.balance ?? undefined,
|
|
253
253
|
updatedAt: payload.updated_at != null ? date(payload.updated_at) : undefined,
|
|
254
|
+
createTime: payload.create_time != null ? date(payload.create_time) : undefined,
|
|
254
255
|
jeCredit: {
|
|
255
256
|
accountId: payload.je_credit_account_id ?? undefined,
|
|
256
257
|
accountingClassId: payload.je_credit_accounting_class_id ?? undefined,
|
|
@@ -74,7 +74,7 @@ export const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
|
|
|
74
74
|
export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
|
|
75
75
|
const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
|
|
76
76
|
const jeScheduleTransactionState = recordGet(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
|
|
77
|
-
const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, confidenceScore, recommendations, } = jeScheduleTransactionState;
|
|
77
|
+
const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, createTime, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, confidenceScore, recommendations, } = jeScheduleTransactionState;
|
|
78
78
|
const vendorDetails = getVendorByVendorId(vendorState, vendorId);
|
|
79
79
|
if (vendorDetails == null) {
|
|
80
80
|
throw new Error(`Vendor with ${vendorId} doesn't exist`);
|
|
@@ -139,6 +139,7 @@ export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTr
|
|
|
139
139
|
aiSummaries,
|
|
140
140
|
confidenceScore,
|
|
141
141
|
createdByUser: createdByUserDetails,
|
|
142
|
+
createTime,
|
|
142
143
|
recommendations,
|
|
143
144
|
};
|
|
144
145
|
};
|
|
@@ -54,7 +54,7 @@ function getJEScheduleSortAccessor(sortKey) {
|
|
|
54
54
|
case 'totalAmount':
|
|
55
55
|
return (s) => s.baseTransaction.amount.amount;
|
|
56
56
|
case 'transactionDate':
|
|
57
|
-
return (s) => s.
|
|
57
|
+
return (s) => s.createTime?.valueOf();
|
|
58
58
|
case 'memo':
|
|
59
59
|
return (s) => s.baseTransaction.memo?.toLowerCase();
|
|
60
60
|
default:
|
|
@@ -60,7 +60,7 @@ function getJEScheduleSortAccessor(sortKey) {
|
|
|
60
60
|
case 'totalAmount':
|
|
61
61
|
return (s) => s.baseTransaction.amount.amount;
|
|
62
62
|
case 'transactionDate':
|
|
63
|
-
return (s) => s.
|
|
63
|
+
return (s) => s.createTime?.valueOf();
|
|
64
64
|
case 'memo':
|
|
65
65
|
return (s) => s.baseTransaction.memo?.toLowerCase();
|
|
66
66
|
default:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.50-
|
|
3
|
+
"version": "5.1.50-betaRD4",
|
|
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",
|