@zeniai/client-epic-state 4.19.93 → 4.19.95-betaJK1
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/account/accountPayload.d.ts +2 -0
- package/lib/entity/account/accountPayload.js +2 -0
- package/lib/entity/account/accountState.d.ts +2 -0
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
- package/lib/entity/depositAccount/depositAccount.js +8 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +10 -5
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -2
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -2
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +7 -3
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +3 -1
- package/lib/entity/reimbursement/reimbursementPayload.d.ts +2 -0
- package/lib/entity/reimbursement/reimbursementPayload.js +7 -0
- package/lib/entity/reimbursement/reimbursementState.d.ts +2 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/task/taskPayload.d.ts +1 -0
- package/lib/entity/task/taskPayload.js +1 -0
- package/lib/entity/task/taskState.d.ts +1 -0
- package/lib/entity/transaction/transactionReducer.js +3 -2
- package/lib/entity/transaction/transactionSelector.d.ts +2 -2
- package/lib/entity/transaction/transactionState.d.ts +3 -2
- package/lib/entity/userGroups/userGroupsPayload.d.ts +7 -0
- package/lib/entity/userGroups/userGroupsPayload.js +10 -0
- package/lib/entity/userGroups/userGroupsReducer.d.ts +8 -0
- package/lib/entity/userGroups/userGroupsReducer.js +29 -0
- package/lib/entity/userGroups/userGroupsSelector.d.ts +4 -0
- package/lib/entity/userGroups/userGroupsSelector.js +12 -0
- package/lib/entity/userGroups/userGroupsState.d.ts +9 -0
- package/lib/entity/userGroups/userGroupsState.js +2 -0
- package/lib/epic.d.ts +12 -1
- package/lib/epic.js +12 -1
- package/lib/esm/entity/account/accountPayload.js +2 -0
- package/lib/esm/entity/depositAccount/depositAccount.js +8 -1
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +10 -5
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +3 -3
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +1 -0
- package/lib/esm/entity/reimbursement/reimbursementPayload.js +7 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/esm/entity/task/taskPayload.js +1 -0
- package/lib/esm/entity/transaction/transactionReducer.js +3 -2
- package/lib/esm/entity/userGroups/userGroupsPayload.js +7 -0
- package/lib/esm/entity/userGroups/userGroupsReducer.js +25 -0
- package/lib/esm/entity/userGroups/userGroupsSelector.js +8 -0
- package/lib/esm/entity/userGroups/userGroupsState.js +1 -0
- package/lib/esm/epic.js +12 -1
- package/lib/esm/index.js +11 -5
- package/lib/esm/reducer.js +6 -0
- package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +10 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +8 -3
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +29 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +49 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +40 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +47 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +61 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +33 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +56 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +77 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +79 -0
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +24 -0
- package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +189 -1
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +4 -12
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +433 -2
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +23 -1
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +244 -1
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +44 -0
- package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +2 -1
- package/lib/esm/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -7
- package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +2 -7
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +1 -1
- package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +1 -0
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +3 -1
- package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +65 -0
- package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +16 -0
- package/lib/esm/view/userGroupListView/userGroupListViewState.js +1 -0
- package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +11 -0
- package/lib/esm/zeniAPI.js +0 -2
- package/lib/index.d.ts +10 -6
- package/lib/index.js +83 -32
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +10 -0
- package/lib/view/expenseAutomationView/bulkUploadTiming.js +13 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +8 -3
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +18 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +33 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +53 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +44 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +51 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +65 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +37 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +61 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +14 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +81 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +25 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +85 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +28 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +118 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +201 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +11 -11
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +3 -11
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +76 -3
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +434 -2
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +11 -3
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +24 -2
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +69 -1
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +1 -0
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +243 -0
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +142 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +54 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +2 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -7
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +1 -6
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +1 -1
- package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +1 -0
- package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +1 -0
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +2 -0
- package/lib/view/taskManager/taskListView/taskListSelector.js +3 -1
- package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +23 -0
- package/lib/view/userGroupListView/userGroupListViewReducer.js +69 -0
- package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +7 -0
- package/lib/view/userGroupListView/userGroupListViewSelector.js +20 -0
- package/lib/view/userGroupListView/userGroupListViewState.d.ts +8 -0
- package/lib/view/userGroupListView/userGroupListViewState.js +2 -0
- package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +3 -1
- package/lib/view/userListView/fetchUserListByTypeEpic.js +11 -0
- package/lib/view/userListView/userListViewPayload.d.ts +2 -0
- package/lib/zeniAPI.js +0 -2
- package/package.json +2 -2
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
|
@@ -16,6 +16,8 @@ export interface AccountBasePayload {
|
|
|
16
16
|
is_deleted?: boolean | null;
|
|
17
17
|
last_4_digits?: string | null;
|
|
18
18
|
logo?: URLPayload;
|
|
19
|
+
payment_type?: string | null;
|
|
20
|
+
payment_type_name?: string | null;
|
|
19
21
|
qbo_id?: string;
|
|
20
22
|
reconciliation_source?: string | null;
|
|
21
23
|
tax_1099_config?: Tax1099ConfigPayload | null;
|
|
@@ -13,6 +13,8 @@ const mapAccountBasePayloadToAccountBase = (payload) => ({
|
|
|
13
13
|
accountDescription: payload.account_description ?? '',
|
|
14
14
|
last4Digits: payload.last_4_digits ?? undefined,
|
|
15
15
|
logo: payload.logo == null ? undefined : (0, urlPayload_1.toURL)(payload.logo),
|
|
16
|
+
paymentType: payload.payment_type ?? undefined,
|
|
17
|
+
paymentTypeName: payload.payment_type_name ?? undefined,
|
|
16
18
|
qboId: payload.qbo_id ?? undefined,
|
|
17
19
|
coaId: payload.coa_id ?? undefined,
|
|
18
20
|
labels: toAccountLabelArray(payload.labels ?? []),
|
|
@@ -43,6 +43,8 @@ export interface AccountBase {
|
|
|
43
43
|
isPreFilled?: boolean;
|
|
44
44
|
last4Digits?: string;
|
|
45
45
|
logo?: ZeniUrl;
|
|
46
|
+
paymentType?: string;
|
|
47
|
+
paymentTypeName?: string;
|
|
46
48
|
qboId?: ID;
|
|
47
49
|
reconciliationSource?: ReconciliationAccountSourceType;
|
|
48
50
|
tax1099Config?: Tax1099Config;
|
|
@@ -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" | "canceled" | "authorized" | "declined";
|
|
40
40
|
export type ChargeCardTransactionStatusCode = ReturnType<typeof toCardTransactionStatusCode>;
|
|
41
41
|
export {};
|
|
@@ -40,7 +40,7 @@ export interface DepositSubAccountType {
|
|
|
40
40
|
code: DepositSubAccountTypeCodeType;
|
|
41
41
|
name: string;
|
|
42
42
|
}
|
|
43
|
-
export declare const toDepositSubAccounTypeCodeType: (v: string) => "
|
|
43
|
+
export declare const toDepositSubAccounTypeCodeType: (v: string) => "Zinc" | "Bronze" | "Gold" | "Silver" | "Platinum" | "Checking";
|
|
44
44
|
type DepositSubAccountTypeCodeType = ReturnType<typeof toDepositSubAccounTypeCodeType>;
|
|
45
45
|
export declare const toDepositAccountStatusType: (v: string) => "Open" | "Frozen" | "Closed";
|
|
46
46
|
export type DepositAccountStatus = ReturnType<typeof toDepositAccountStatusType>;
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toDepositAccountStatusType = exports.toDepositSubAccounTypeCodeType = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
|
-
const ALL_DEPOSIT_SUB_ACCOUNT_TYPE_CODE = [
|
|
5
|
+
const ALL_DEPOSIT_SUB_ACCOUNT_TYPE_CODE = [
|
|
6
|
+
'Zinc',
|
|
7
|
+
'Bronze',
|
|
8
|
+
'Gold',
|
|
9
|
+
'Silver',
|
|
10
|
+
'Platinum',
|
|
11
|
+
'Checking',
|
|
12
|
+
];
|
|
6
13
|
const toDepositSubAccounTypeCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_DEPOSIT_SUB_ACCOUNT_TYPE_CODE);
|
|
7
14
|
exports.toDepositSubAccounTypeCodeType = toDepositSubAccounTypeCodeType;
|
|
8
15
|
const ALL_DEPOSIT_ACCOUNT_STATUS_TYPE = ['Closed', 'Open', 'Frozen'];
|
|
@@ -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 getJEScheduleTransactionDetailKeyPayload(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,13 +4,12 @@ exports.toScheduledJournalEntryState = toScheduledJournalEntryState;
|
|
|
4
4
|
exports.toJEAccountPayload = toJEAccountPayload;
|
|
5
5
|
exports.toJEAccruedAccountPayload = toJEAccruedAccountPayload;
|
|
6
6
|
exports.toJEClassPayload = toJEClassPayload;
|
|
7
|
-
exports.
|
|
7
|
+
exports.getJEScheduleTransactionDetailKeyPayload = getJEScheduleTransactionDetailKeyPayload;
|
|
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");
|
|
14
13
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
15
14
|
const transactionIDPayload_1 = require("../transaction/payloadTypes/transactionIDPayload");
|
|
16
15
|
const jeScheduleHelper_1 = require("./jeScheduleHelper");
|
|
@@ -132,9 +131,12 @@ function toJEClassPayload(payload, type) {
|
|
|
132
131
|
: undefined;
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
|
-
function
|
|
134
|
+
function getJEScheduleTransactionDetailKeyPayload(payload) {
|
|
136
135
|
const transactionId = (0, transactionIDPayload_1.toTransactionID)(payload);
|
|
137
|
-
return (0,
|
|
136
|
+
return (0, jeSchedulesTypes_1.getJEScheduleTransactionKey)({
|
|
137
|
+
...transactionId,
|
|
138
|
+
lineId: payload.line_id,
|
|
139
|
+
});
|
|
138
140
|
}
|
|
139
141
|
function getJEScheduleKey(payload) {
|
|
140
142
|
return (0, jeScheduleHelper_1.generateJEScheduleKey)(payload);
|
|
@@ -155,7 +157,10 @@ function toJEScheduledTransaction(payload) {
|
|
|
155
157
|
label: payload.status.label,
|
|
156
158
|
},
|
|
157
159
|
vendorId: payload.vendor.vendor_id,
|
|
158
|
-
baseTransaction:
|
|
160
|
+
baseTransaction: (0, jeSchedulesTypes_1.getJEScheduleTransactionKey)({
|
|
161
|
+
...(0, transactionIDPayload_1.toTransactionID)(payload.base_transaction),
|
|
162
|
+
lineId: payload.base_transaction.line_id,
|
|
163
|
+
}),
|
|
159
164
|
startDate: payload.start_date != null ? (0, zeniDayJS_1.date)(payload.start_date) : undefined,
|
|
160
165
|
endDate: payload.end_date != null ? (0, zeniDayJS_1.date)(payload.end_date) : undefined,
|
|
161
166
|
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}` | `${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}`], {
|
|
22
|
+
jeScheduleTransactionKey: `${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}`;
|
|
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.getJEScheduleTransactionDetailKeyPayload)(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.getJEScheduleTransactionDetailKeyPayload)(transactionKey), jeSchedulePayload, action.payload.scheduledJEntriesPayload ?? [], updateType);
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
},
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
import { ZeniDate } from '../../zeniDayJS';
|
|
6
5
|
import { TransactionID } from '../transaction/stateTypes/transaction';
|
|
7
6
|
import { JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTypes } from './jeSchedulesTypes';
|
|
@@ -42,7 +41,7 @@ export interface ScheduledJournalEntryState {
|
|
|
42
41
|
updateTime?: ZeniDate;
|
|
43
42
|
}
|
|
44
43
|
export interface JEScheduledTransactionState {
|
|
45
|
-
baseTransaction:
|
|
44
|
+
baseTransaction: JEScheduleTransactionKey;
|
|
46
45
|
currencyCode: string;
|
|
47
46
|
currencySymbol: string;
|
|
48
47
|
jeCredit: {
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransactionID } from '../transaction/stateTypes/transaction';
|
|
2
2
|
import { generateJEScheduleKey } from './jeScheduleHelper';
|
|
3
|
-
export
|
|
3
|
+
export interface ScheduleTransactionID extends TransactionID {
|
|
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>;
|
|
4
8
|
export type JEScheduleKey = ReturnType<typeof generateJEScheduleKey>;
|
|
5
9
|
export declare const ALL_SCHEDULES_TYPES: readonly ["prepaid_expenses", "fixed_assets", "accrued_expenses", "deferred_revenue"];
|
|
6
10
|
export declare const toScheduleTypesType: (v: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
|
|
7
11
|
export type ScheduleTypes = ReturnType<typeof toScheduleTypesType>;
|
|
8
12
|
export declare const toScheduleTypesTypeStrict: (v?: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue" | undefined;
|
|
9
|
-
export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "posted" | "
|
|
13
|
+
export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "posted" | "unknown" | "canceled" | "recorded";
|
|
10
14
|
export type ScheduleJournalEntryStatusCodeType = ReturnType<typeof toScheduleJournalEntryStatusCodeType>;
|
|
11
15
|
export declare const toScheduleStatusCodeType: (v: string) => "draft" | "completed" | "new" | "ongoing" | "marked_as_completed";
|
|
12
16
|
export type ScheduleStatusCodeType = ReturnType<typeof toScheduleStatusCodeType>;
|
|
@@ -1,7 +1,9 @@
|
|
|
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 = void 0;
|
|
3
|
+
exports.toJournalEntryErrorCodeType = exports.toScheduleStatusCodeType = exports.toScheduleJournalEntryStatusCodeType = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.ALL_SCHEDULES_TYPES = exports.getJEScheduleTransactionKey = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
|
+
const getJEScheduleTransactionKey = (scheduleTransactionId) => `${scheduleTransactionId.id}_${scheduleTransactionId.type}_${scheduleTransactionId.lineId}`;
|
|
6
|
+
exports.getJEScheduleTransactionKey = getJEScheduleTransactionKey;
|
|
5
7
|
exports.ALL_SCHEDULES_TYPES = [
|
|
6
8
|
'prepaid_expenses',
|
|
7
9
|
'fixed_assets',
|
|
@@ -3,6 +3,7 @@ import { SegregatedReimbursementLineWithRecommendation } from '../../view/spendM
|
|
|
3
3
|
import { AccountBasePayload } from '../account/accountPayload';
|
|
4
4
|
import { BillAccountPayload, BillPaymentMethodPayload, BillPaymentStatusPayload, BillStagePayload, BillStatusPayload, BulkOperationDetailPayload, DeletionInfoPayload } from '../billPay/billTransaction/billTransactionPayload';
|
|
5
5
|
import { ClassBasePayload } from '../class/classPayload';
|
|
6
|
+
import { CustomerBasePayload } from '../customer/customerPayload';
|
|
6
7
|
import { MerchantBasePayload } from '../merchant/merchantPayload';
|
|
7
8
|
import { AttachmentPayload } from '../transaction/payloadTypes/attachmentPayload';
|
|
8
9
|
import { LineDetail, Reimbursement, ReimbursementTypeCode } from './reimbursementState';
|
|
@@ -68,6 +69,7 @@ interface ReimbursementTypePayload {
|
|
|
68
69
|
export interface LineDetailPayload {
|
|
69
70
|
class: ClassBasePayload;
|
|
70
71
|
account?: AccountBasePayload;
|
|
72
|
+
customer?: CustomerBasePayload;
|
|
71
73
|
}
|
|
72
74
|
interface ReimbursementInfoPayload {
|
|
73
75
|
actual_deposit_date: string | null;
|
|
@@ -8,6 +8,7 @@ const zeniDayJS_1 = require("../../zeniDayJS");
|
|
|
8
8
|
const accountPayload_1 = require("../account/accountPayload");
|
|
9
9
|
const billTransactionPayload_1 = require("../billPay/billTransaction/billTransactionPayload");
|
|
10
10
|
const classPayload_1 = require("../class/classPayload");
|
|
11
|
+
const customerPayload_1 = require("../customer/customerPayload");
|
|
11
12
|
const merchantPayload_1 = require("../merchant/merchantPayload");
|
|
12
13
|
const attachmentPayload_1 = require("../transaction/payloadTypes/attachmentPayload");
|
|
13
14
|
const ALL_REIMBURSEMENT_TRANSACTION_TYPE = ['reimbursement'];
|
|
@@ -171,6 +172,9 @@ const toLineDetailPayload = (lineDetail) => ({
|
|
|
171
172
|
account: lineDetail.account != null
|
|
172
173
|
? (0, accountPayload_1.toAccountPayload)(lineDetail.account)
|
|
173
174
|
: undefined,
|
|
175
|
+
customer: lineDetail.customer != null
|
|
176
|
+
? (0, customerPayload_1.toCustomerBasePayload)(undefined, lineDetail.customer)
|
|
177
|
+
: undefined,
|
|
174
178
|
});
|
|
175
179
|
exports.toLineDetailPayload = toLineDetailPayload;
|
|
176
180
|
const toLineDetail = (payload) => ({
|
|
@@ -180,6 +184,9 @@ const toLineDetail = (payload) => ({
|
|
|
180
184
|
account: payload.account?.account_id != null
|
|
181
185
|
? (0, accountPayload_1.mapAccountBasePayloadToAccountBase)(payload.account)
|
|
182
186
|
: undefined,
|
|
187
|
+
customer: payload.customer?.customer_id != null
|
|
188
|
+
? (0, customerPayload_1.toCustomerBase)(payload.customer, false)
|
|
189
|
+
: undefined,
|
|
183
190
|
});
|
|
184
191
|
const toDistanceMilage = (payload) => ({
|
|
185
192
|
unit: payload.unit,
|
|
@@ -6,6 +6,7 @@ import { ZeniUrl as Url } from '../../zeniUrl';
|
|
|
6
6
|
import { AccountBase } from '../account/accountState';
|
|
7
7
|
import { BillPaymentStatus, BillStage, BillStatus, BulkProcessingDetail, DeletionInfo } from '../billPay/billTransaction/billTransactionState';
|
|
8
8
|
import { ClassBase } from '../class/classState';
|
|
9
|
+
import { CustomerBase } from '../customer/customerState';
|
|
9
10
|
import { MerchantBase } from '../merchant/merchant';
|
|
10
11
|
import { Attachment } from '../transaction/stateTypes/attachment';
|
|
11
12
|
import { ReimbursementTransactionType } from './reimbursementPayload';
|
|
@@ -58,6 +59,7 @@ export interface DistanceMilage {
|
|
|
58
59
|
export interface LineDetail {
|
|
59
60
|
account?: AccountBase;
|
|
60
61
|
class?: ClassBase;
|
|
62
|
+
customer?: CustomerBase;
|
|
61
63
|
}
|
|
62
64
|
export interface ReimbursementInfo {
|
|
63
65
|
billPaymentMethodType: RemiPaymentMethod;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const toSnackbarMessageSection: (v: string) => "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipts_upload" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed";
|
|
1
|
+
export declare const toSnackbarMessageSection: (v: string) => "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed";
|
|
2
2
|
export type SnackbarMessageSections = ReturnType<typeof toSnackbarMessageSection>;
|
|
3
3
|
export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "success" | "failed";
|
|
4
4
|
export type SnackbarMessageSectionTexts = ReturnType<typeof toSnackbarMessageSectionTexts>;
|
|
@@ -42,5 +42,6 @@ const mapTaskPayloadToTask = (payload) => ({
|
|
|
42
42
|
timeSpent: payload.time_spent != null
|
|
43
43
|
? (0, formatMinutesToFromHHMM_1.convertMinutesToHHMM)(payload.time_spent)
|
|
44
44
|
: (0, formatMinutesToFromHHMM_1.convertMinutesToHHMM)(0),
|
|
45
|
+
groupAssignees: payload.group_assignees ?? [],
|
|
45
46
|
});
|
|
46
47
|
exports.mapTaskPayloadToTask = mapTaskPayloadToTask;
|
|
@@ -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 jeSchedulesTypes_1 = require("../jeSchedules/jeSchedulesTypes");
|
|
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,9 +75,10 @@ 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, jeSchedulesTypes_1.getJEScheduleTransactionKey)({
|
|
79
79
|
id: value.transaction_id,
|
|
80
80
|
type: (0, transactionType_1.toTransactionType)(value.transaction_type),
|
|
81
|
+
lineId: value.line_id,
|
|
81
82
|
});
|
|
82
83
|
doUpdateScheduleTransaction(draft.scheduleTransactionById, id, value, action.payload.currencyCode, action.payload.currencySymbol, action.meta.updateType);
|
|
83
84
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import {
|
|
2
|
+
import { JEScheduleTransactionKey } from '../jeSchedules/jeSchedulesTypes';
|
|
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: JEScheduleTransactionKey): 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,5 +1,6 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { TransactionDetailKey
|
|
2
|
+
import { TransactionDetailKey } from '../../view/transactionDetail/transactionDetailState';
|
|
3
|
+
import { JEScheduleTransactionKey } from '../jeSchedules/jeSchedulesTypes';
|
|
3
4
|
import { CustomerTransactionPayload } from './payloadTypes/customerTransactionPayload';
|
|
4
5
|
import { TransactionPayload } from './payloadTypes/transactionPayload';
|
|
5
6
|
import { VendorTransactionPayload, VendorTransactionWithCustomerPayload } from './payloadTypes/vendorTransactionPayload';
|
|
@@ -14,6 +15,6 @@ export type SupportedTransactionPayload = TransactionPayload | CustomerTransacti
|
|
|
14
15
|
export type AllSupportedTransactions = SupportedTransaction | undefined;
|
|
15
16
|
export interface TransactionState {
|
|
16
17
|
reconcileTransactionById: Record<ID, MatchedTransaction>;
|
|
17
|
-
scheduleTransactionById: Record<
|
|
18
|
+
scheduleTransactionById: Record<JEScheduleTransactionKey, ScheduleTransaction>;
|
|
18
19
|
transactionById: Record<ID | TransactionDetailKey, SupportedTransaction | undefined>;
|
|
19
20
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapUserGroupPayloadToUserGroup = mapUserGroupPayloadToUserGroup;
|
|
4
|
+
function mapUserGroupPayloadToUserGroup(payload) {
|
|
5
|
+
return {
|
|
6
|
+
userGroupId: payload.id,
|
|
7
|
+
name: payload.name,
|
|
8
|
+
userIds: payload.user_ids ?? [],
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UserGroupPayload } from './userGroupsPayload';
|
|
2
|
+
import { UserGroupsState } from './userGroupsState';
|
|
3
|
+
export declare const initialState: UserGroupsState;
|
|
4
|
+
export declare const updateAllUserGroups: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
5
|
+
userGroups: UserGroupPayload[];
|
|
6
|
+
}, "userGroups/updateAllUserGroups">, removeUserGroup: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "userGroups/removeUserGroup">, clearAllUserGroups: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"userGroups/clearAllUserGroups">;
|
|
7
|
+
declare const _default: import("redux").Reducer<UserGroupsState>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearAllUserGroups = exports.removeUserGroup = exports.updateAllUserGroups = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const userGroupsPayload_1 = require("./userGroupsPayload");
|
|
7
|
+
exports.initialState = {
|
|
8
|
+
userGroupByUserGroupId: {},
|
|
9
|
+
};
|
|
10
|
+
const userGroups = (0, toolkit_1.createSlice)({
|
|
11
|
+
name: 'userGroups',
|
|
12
|
+
initialState: exports.initialState,
|
|
13
|
+
reducers: {
|
|
14
|
+
updateAllUserGroups(draft, action) {
|
|
15
|
+
action.payload.userGroups.forEach((payload) => {
|
|
16
|
+
const userGroup = (0, userGroupsPayload_1.mapUserGroupPayloadToUserGroup)(payload);
|
|
17
|
+
draft.userGroupByUserGroupId[userGroup.userGroupId] = userGroup;
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
removeUserGroup(draft, action) {
|
|
21
|
+
delete draft.userGroupByUserGroupId[action.payload];
|
|
22
|
+
},
|
|
23
|
+
clearAllUserGroups(draft) {
|
|
24
|
+
Object.assign(draft, exports.initialState);
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
_a = userGroups.actions, exports.updateAllUserGroups = _a.updateAllUserGroups, exports.removeUserGroup = _a.removeUserGroup, exports.clearAllUserGroups = _a.clearAllUserGroups;
|
|
29
|
+
exports.default = userGroups.reducer;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { UserGroup, UserGroupsState } from './userGroupsState';
|
|
3
|
+
export declare function getUserGroupsByUserGroupIds(userGroupsState: UserGroupsState, userGroupIds: ID[]): UserGroup[];
|
|
4
|
+
export declare function getUserGroupByUserGroupId(userGroupsState: UserGroupsState, userGroupId: ID): UserGroup | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUserGroupsByUserGroupIds = getUserGroupsByUserGroupIds;
|
|
4
|
+
exports.getUserGroupByUserGroupId = getUserGroupByUserGroupId;
|
|
5
|
+
function getUserGroupsByUserGroupIds(userGroupsState, userGroupIds) {
|
|
6
|
+
return userGroupIds
|
|
7
|
+
.map((id) => getUserGroupByUserGroupId(userGroupsState, id))
|
|
8
|
+
.filter((value) => value != null);
|
|
9
|
+
}
|
|
10
|
+
function getUserGroupByUserGroupId(userGroupsState, userGroupId) {
|
|
11
|
+
return userGroupsState.userGroupByUserGroupId[userGroupId] ?? undefined;
|
|
12
|
+
}
|