@zeniai/client-epic-state 5.0.2-betaRR9 → 5.0.3-beta0ND
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/coreEpics.js +2 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +44 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +55 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
- package/lib/entity/file/fileState.d.ts +4 -4
- package/lib/entity/file/fileState.js +0 -4
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.js +0 -2
- package/lib/entity/task/taskPayload.d.ts +0 -3
- package/lib/entity/task/taskPayload.js +0 -5
- package/lib/entity/task/taskState.d.ts +0 -3
- package/lib/entity/tenant/SessionManager.d.ts +38 -0
- package/lib/entity/tenant/SessionManager.js +171 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
- package/lib/entity/tenant/clearAllEpic.js +4 -0
- package/lib/entity/tenant/epic/sessionHeartbeatEpic.d.ts +16 -0
- package/lib/entity/tenant/epic/sessionHeartbeatEpic.js +16 -0
- package/lib/entity/tenant/sessionTypes.d.ts +26 -0
- package/lib/entity/tenant/sessionTypes.js +12 -0
- package/lib/entity/tenant/tenantReducer.d.ts +5 -1
- package/lib/entity/tenant/tenantReducer.js +23 -2
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/entity/transaction/stateTypes/attachment.d.ts +2 -2
- package/lib/entity/userRole/userRoleType.d.ts +2 -2
- package/lib/epic.d.ts +5 -3
- package/lib/epic.js +5 -3
- package/lib/esm/coreEpics.js +2 -1
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +49 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
- package/lib/esm/entity/file/fileState.js +0 -4
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -2
- package/lib/esm/entity/task/taskPayload.js +0 -5
- package/lib/esm/entity/tenant/SessionManager.js +167 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +4 -0
- package/lib/esm/entity/tenant/epic/sessionHeartbeatEpic.js +12 -0
- package/lib/esm/entity/tenant/sessionTypes.js +9 -0
- package/lib/esm/entity/tenant/tenantReducer.js +21 -1
- package/lib/esm/epic.js +5 -3
- package/lib/esm/index.js +16 -6
- package/lib/esm/reducer.js +6 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +149 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +72 -0
- package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
- package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +52 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/archiveTaskEpic.js +0 -3
- package/lib/esm/view/taskManager/taskDetailView/epics/deleteTaskEpic.js +0 -5
- package/lib/esm/view/taskManager/taskDetailView/taskDetail.js +0 -4
- package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +1 -49
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -15
- package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +21 -56
- package/lib/esm/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +0 -1
- package/lib/esm/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -13
- package/lib/esm/view/taskManager/taskListView/taskList.js +0 -7
- package/lib/esm/view/taskManager/taskListView/taskListReducer.js +12 -91
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +15 -56
- package/lib/index.d.ts +18 -6
- package/lib/index.js +63 -35
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +31 -0
- package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
- package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
- package/lib/view/aiAccountantView/aiAccountantViewReducer.js +153 -0
- package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +14 -0
- package/lib/view/aiAccountantView/aiAccountantViewSelector.js +78 -0
- package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +26 -0
- package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +56 -0
- package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +2 -2
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/lib/view/taskManager/taskDetailView/epics/archiveTaskEpic.d.ts +1 -2
- package/lib/view/taskManager/taskDetailView/epics/archiveTaskEpic.js +0 -3
- package/lib/view/taskManager/taskDetailView/epics/deleteTaskEpic.d.ts +1 -2
- package/lib/view/taskManager/taskDetailView/epics/deleteTaskEpic.js +0 -5
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +0 -1
- package/lib/view/taskManager/taskDetailView/taskDetail.js +0 -4
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +1 -10
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +2 -50
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +0 -5
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -15
- package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +7 -6
- package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +22 -56
- package/lib/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +0 -1
- package/lib/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -13
- package/lib/view/taskManager/taskListView/taskList.d.ts +1 -14
- package/lib/view/taskManager/taskListView/taskList.js +1 -8
- package/lib/view/taskManager/taskListView/taskListPayload.d.ts +0 -3
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +2 -6
- package/lib/view/taskManager/taskListView/taskListReducer.js +13 -92
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +3 -9
- package/lib/view/taskManager/taskListView/taskListSelector.js +15 -56
- package/package.json +1 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/snoozeTaskEpic.js +0 -65
- package/lib/esm/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +0 -56
- package/lib/view/taskManager/taskDetailView/epics/snoozeTaskEpic.d.ts +0 -9
- package/lib/view/taskManager/taskDetailView/epics/snoozeTaskEpic.js +0 -69
- package/lib/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.d.ts +0 -9
- package/lib/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +0 -60
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggerAiAccountantJobEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
7
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
8
|
+
const aiAccountantViewReducer_1 = require("../aiAccountantViewReducer");
|
|
9
|
+
const triggerAiAccountantJobEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiAccountantViewReducer_1.triggerAiAccountantJob.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
+
const { operationType, startDate, endDate } = action.payload;
|
|
11
|
+
const rootState = state$.value;
|
|
12
|
+
const selectedTenantIds = rootState.aiAccountantViewState.selectedTenantIdsForJobTrigger;
|
|
13
|
+
const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
|
|
14
|
+
const url = `${base}/ai-accountant/jobs`;
|
|
15
|
+
const params = operationType === 'offboard'
|
|
16
|
+
? {}
|
|
17
|
+
: { start_date: startDate, end_date: endDate };
|
|
18
|
+
return zeniAPI
|
|
19
|
+
.postAndGetJSON(url, {
|
|
20
|
+
tenant_ids: selectedTenantIds,
|
|
21
|
+
operation_type: operationType,
|
|
22
|
+
params,
|
|
23
|
+
})
|
|
24
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
25
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
26
|
+
return (0, rxjs_1.from)([
|
|
27
|
+
(0, aiAccountantViewReducer_1.triggerAiAccountantJobSuccess)(),
|
|
28
|
+
(0, aiAccountantViewReducer_1.fetchAiAccountantCustomers)(),
|
|
29
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
30
|
+
messageSection: 'common',
|
|
31
|
+
messageText: 'success',
|
|
32
|
+
type: 'success',
|
|
33
|
+
}),
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return (0, rxjs_1.from)([
|
|
38
|
+
(0, aiAccountantViewReducer_1.triggerAiAccountantJobFailure)(response.status),
|
|
39
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
40
|
+
messageSection: 'common',
|
|
41
|
+
messageText: 'failed',
|
|
42
|
+
type: 'error',
|
|
43
|
+
}),
|
|
44
|
+
]);
|
|
45
|
+
}
|
|
46
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
|
|
47
|
+
(0, aiAccountantViewReducer_1.triggerAiAccountantJobFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant trigger job failed: ' +
|
|
48
|
+
JSON.stringify(error))),
|
|
49
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
50
|
+
messageSection: 'common',
|
|
51
|
+
messageText: 'failed',
|
|
52
|
+
type: 'error',
|
|
53
|
+
}),
|
|
54
|
+
])));
|
|
55
|
+
}));
|
|
56
|
+
exports.triggerAiAccountantJobEpic = triggerAiAccountantJobEpic;
|
|
@@ -3,16 +3,17 @@ import { ZeniDate } from '../../../zeniDayJS';
|
|
|
3
3
|
import { SubscriptionViewSortKey } from '../../subscriptionView/types/subscriptionTypes';
|
|
4
4
|
import { FilterCategoryValueType } from '../helpers/cockpitHelpers';
|
|
5
5
|
import { CockpitDownloadTabsID, CockpitTabsFileType } from './cockpitTabsID';
|
|
6
|
-
export declare const toPortfolioSortKeyType: (v: string) => "
|
|
7
|
-
export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "
|
|
8
|
-
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "businessVerified" | "identityVerified" | "bankAccountLinked" | "customerCreated" | "groupCreated" | "qboLinked" | "
|
|
9
|
-
export declare const toHealthSortKeyType: (v: string) => "
|
|
6
|
+
export declare const toPortfolioSortKeyType: (v: string) => "companyName" | "expenses" | "runway" | "cashBalance" | "revenues" | "netIncome";
|
|
7
|
+
export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "companyName" | "group" | "controller" | "plans" | "monthlyRecurringRevenue" | "notes" | "taxStatus" | "preparer" | "reviewer" | "annualRecurringRevenue" | "task" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
|
|
8
|
+
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "notes" | "businessVerified" | "identityVerified" | "bankAccountLinked" | "customerCreated" | "groupCreated" | "qboLinked" | "enroller" | "invite" | "latestCreated";
|
|
9
|
+
export declare const toHealthSortKeyType: (v: string) => "companyName" | "group" | "controller" | "monthlyRecurringRevenue" | "runway" | "companyEngagementMetricsUpdatedAt" | "customerSatisfactionScore" | "externalProductServiceExposure" | "netPromoterScore" | "customerSuccessManager" | "issues" | "productVerticals" | "churnProbability" | "lastReportSent" | "subscriptionDate" | "renewalDate" | "dashboardLastSeen" | "lastEngagement";
|
|
10
10
|
export declare const toTaskManagerSortKeyType: (v: string) => "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "taskName";
|
|
11
11
|
export type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
|
|
12
12
|
export type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
|
|
13
13
|
export type OnboardingViewSortKey = ReturnType<typeof toOnboardingSortKeyType>;
|
|
14
14
|
export type HealthViewSortKey = ReturnType<typeof toHealthSortKeyType>;
|
|
15
15
|
export type TaskManagerViewSortKey = ReturnType<typeof toTaskManagerSortKeyType>;
|
|
16
|
+
export type AiAccountantFilterCategoryField = 'enrollmentStatus';
|
|
16
17
|
export type ManagementViewFilterCategoryField = 'controllerUserIds' | 'customerSuccessManagerUserIds' | 'preparerUserIds' | 'reviewerUserIds' | 'apAnalystUserIds' | 'taxLeadUserIds' | 'companyGroupId' | 'taxStatusCode' | 'statusCode' | 'plans' | 'annualRecurringRevenue' | 'monthlyRecurringRevenue' | 'customerSatisfaction' | 'zeniSatisfaction';
|
|
17
18
|
export type SubscriptionViewFilterCategoryField = 'controllerUserIds' | 'statusCode' | 'recommendedActionCode' | 'subscriptionPlans' | 'subscriptionAddOns' | 'avg2MonthExpenses' | 'slabLowerLimit' | 'slabUpperLimit' | 'monthlyRecurringRevenue';
|
|
18
19
|
export type PortfolioViewFilterCategoryField = 'netBurnOrIncome' | 'cashPosition' | 'income' | 'expenses' | 'runway';
|
|
@@ -21,7 +22,7 @@ export interface CockpitFilterCategory {
|
|
|
21
22
|
matchingOperator: 'equal' | 'not-equal';
|
|
22
23
|
values: FilterCategoryValueType[];
|
|
23
24
|
valuesCombinationOperator: 'ANY' | 'ALL';
|
|
24
|
-
field?: ManagementViewFilterCategoryField | SubscriptionViewFilterCategoryField | PortfolioViewFilterCategoryField | HealthMonitorViewFilterCategoryField;
|
|
25
|
+
field?: AiAccountantFilterCategoryField | ManagementViewFilterCategoryField | SubscriptionViewFilterCategoryField | PortfolioViewFilterCategoryField | HealthMonitorViewFilterCategoryField;
|
|
25
26
|
}
|
|
26
27
|
export interface CockpitFilters {
|
|
27
28
|
categories?: CockpitFilterCategory[];
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -37,8 +37,8 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
|
|
|
37
37
|
export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
|
|
38
38
|
export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
|
|
39
39
|
export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
|
|
40
|
-
messageSection: "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" | "
|
|
41
|
-
messageText: "notification" | "
|
|
40
|
+
messageSection: "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" | "receipts_bulk_match" | "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" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "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" | "accounting_classes_enabled_update";
|
|
41
|
+
messageText: "notification" | "failed" | "success";
|
|
42
42
|
type: "error" | "success" | "info";
|
|
43
43
|
variables: {
|
|
44
44
|
variableName: string;
|
|
@@ -17,7 +17,7 @@ export interface MissingReceiptsViewUIState {
|
|
|
17
17
|
* Kept in sync with `ManualSearchInput` in web-components (fires search only when length ≥ this).
|
|
18
18
|
*/
|
|
19
19
|
export declare const MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = 2;
|
|
20
|
-
export declare const toBatchStatusValue: (v: string) => "pending" | "
|
|
20
|
+
export declare const toBatchStatusValue: (v: string) => "pending" | "completed" | "processing";
|
|
21
21
|
export type BatchStatusValue = ReturnType<typeof toBatchStatusValue>;
|
|
22
22
|
/** Canonical batch file statuses (API ingress may use aliases; see `parseBatchFileStatus`). */
|
|
23
23
|
export declare const BATCH_FILE_STATUSES: readonly ["exact_match", "possible_matches", "no_match", "failed"];
|
|
@@ -3,7 +3,7 @@ import { CompanyWithSchema } from '../../../../entity/company/companySelector';
|
|
|
3
3
|
import { OnboardingCustomerInfo } from '../../../../entity/onboardingCustomer/onboardingCustomerState';
|
|
4
4
|
import { Tenant } from '../../../../entity/tenant/tenantState';
|
|
5
5
|
import { CompanyDetailsLocalData, PrimaryContactLocalData } from '../../../spendManagement/commonSetup/setupViewState';
|
|
6
|
-
declare const toProductGroupType: (v: string) => "
|
|
6
|
+
declare const toProductGroupType: (v: string) => "other" | "bookkeeping" | "banking" | "spend_management" | "cards";
|
|
7
7
|
export type ProductGroupType = ReturnType<typeof toProductGroupType>;
|
|
8
8
|
export declare const toProductType: (v: string) => "zeni_treasury" | "other" | "bookkeeping" | "zeni_checking" | "zeni_bill_pay" | "zeni_reimbursements" | "zeni_cards" | "zeni_payroll" | "zeni_cfo" | "zeni_tax";
|
|
9
9
|
export declare const toProductTypeStrict: (v: string) => "zeni_treasury" | "other" | "bookkeeping" | "zeni_checking" | "zeni_bill_pay" | "zeni_reimbursements" | "zeni_cards" | "zeni_payroll" | "zeni_cfo" | "zeni_tax" | undefined;
|
|
@@ -3,7 +3,7 @@ import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
|
3
3
|
import { OnboardingInfo } from '../../entity/company/companyStateTypes';
|
|
4
4
|
import { ZeniDate } from '../../zeniDayJS';
|
|
5
5
|
import { AuditSummaryPayload, ReviewCompanyPayload } from './reviewCompanyPayload';
|
|
6
|
-
export declare const toReviewColumnKeyType: (v: string) => "
|
|
6
|
+
export declare const toReviewColumnKeyType: (v: string) => "companyName" | "notes" | "uncategorized" | "auditScore" | "miscategorized" | "warnings" | "vendorReview" | "reviewVendor";
|
|
7
7
|
export type ReviewCompanyColumnKey = ReturnType<typeof toReviewColumnKeyType>;
|
|
8
8
|
export type ReviewTransactionsType = 'income' | 'expense';
|
|
9
9
|
export interface AuditSummary {
|
|
@@ -21,7 +21,7 @@ export declare const fetchBillList: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
21
21
|
period: TimePeriod;
|
|
22
22
|
tab: "paid" | "pending_approval" | "scheduled" | "draft";
|
|
23
23
|
error: ZeniAPIStatus<Record<string, unknown>>;
|
|
24
|
-
}, "billList/updateBillListFailure", never, never>, updateTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"paid" | "pending_approval" | "scheduled" | "draft", "billList/updateTab">, updateSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"
|
|
24
|
+
}, "billList/updateBillListFailure", never, never>, updateTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"paid" | "pending_approval" | "scheduled" | "draft", "billList/updateTab">, updateSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline", "billList/updateSubTab">, updateSelectedBillId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "billList/updateSelectedBillId">, clearBillList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"billList/clearBillList">, updateBillDetailSaveBillCode: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<SaveBillStageCode, "billList/updateBillDetailSaveBillCode">, updateBillListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
25
25
|
period: TimePeriod;
|
|
26
26
|
uiState: Partial<BillListUIState>;
|
|
27
27
|
}, "billList/updateBillListUIState">, updateSearchResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "billList/updateSearchResult">, updateFilterResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -35,7 +35,7 @@ export type SaveBillStageCode = 'draft' | 'pending_approval' | undefined;
|
|
|
35
35
|
export declare const ALL_BILL_TABS: readonly ["paid", "pending_approval", "scheduled", "draft"];
|
|
36
36
|
declare const toBillTabType: (v: string) => "paid" | "pending_approval" | "scheduled" | "draft";
|
|
37
37
|
export type BillTab = ReturnType<typeof toBillTabType>;
|
|
38
|
-
declare const toBillsSubTabType: (v: string) => "
|
|
38
|
+
declare const toBillsSubTabType: (v: string) => "failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline";
|
|
39
39
|
export type BillsSubTabType = ReturnType<typeof toBillsSubTabType>;
|
|
40
40
|
declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceNumber" | "invoiceDate";
|
|
41
41
|
export declare type BillPayViewSortKey = ReturnType<typeof toBillPaySortKeyType>;
|
|
@@ -42,7 +42,7 @@ interface TwoFAState {
|
|
|
42
42
|
otpChallenge?: string;
|
|
43
43
|
phone?: string;
|
|
44
44
|
}
|
|
45
|
-
export declare const toChargeCardTransactionSortKeyType: (v: string) => "amount" | "type" | "
|
|
45
|
+
export declare const toChargeCardTransactionSortKeyType: (v: string) => "amount" | "type" | "merchant" | "paymentDate" | "receipts";
|
|
46
46
|
export declare type ChargeCardTransactionSortKey = ReturnType<typeof toChargeCardTransactionSortKeyType>;
|
|
47
47
|
export interface ChargeCardDetailTransactionList extends FetchStateAndError {
|
|
48
48
|
isViewReceiptClickedImmediatelyAfterUploadTransactionId: Record<ID, boolean>;
|
|
@@ -52,12 +52,12 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
52
52
|
chargeCardId: ID;
|
|
53
53
|
fetchState: FetchState;
|
|
54
54
|
error?: ZeniAPIStatus;
|
|
55
|
-
}, "chargeCardDetail/updatePhysicalChargeCardAttemptSuccessOrFailure">, updatePhysicalChargeCardAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "
|
|
55
|
+
}, "chargeCardDetail/updatePhysicalChargeCardAttemptSuccessOrFailure">, updatePhysicalChargeCardAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "failed" | "success"], {
|
|
56
56
|
chargeCardId: string;
|
|
57
|
-
statusCode: "
|
|
58
|
-
}, "chargeCardDetail/updatePhysicalChargeCardAttempt", never, never>, updateDebitCardPinAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "
|
|
57
|
+
statusCode: "failed" | "success";
|
|
58
|
+
}, "chargeCardDetail/updatePhysicalChargeCardAttempt", never, never>, updateDebitCardPinAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "failed" | "success"], {
|
|
59
59
|
chargeCardId: string;
|
|
60
|
-
statusCode: "
|
|
60
|
+
statusCode: "failed" | "success";
|
|
61
61
|
}, "chargeCardDetail/updateDebitCardPinAttempt", never, never>, updateDebitCardPinAttemptSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
62
62
|
chargeCardId: ID;
|
|
63
63
|
fetchState: FetchState;
|
|
@@ -27,7 +27,7 @@ export declare const fetchRemiList: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
27
27
|
}, "remiList/updateRemiListFailure", never, never>, updateRemiListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
28
28
|
period: TimePeriod;
|
|
29
29
|
uiState: Partial<RemiListUIState>;
|
|
30
|
-
}, "remiList/updateRemiListUIState">, updateTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"paid" | "pending_approval" | "scheduled" | "draft", "remiList/updateTab">, updateSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"
|
|
30
|
+
}, "remiList/updateRemiListUIState">, updateTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"paid" | "pending_approval" | "scheduled" | "draft", "remiList/updateTab">, updateSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "myDrafts" | "awaitingApproval" | "awaitingMyApproval" | "awaitingAllApproval", "remiList/updateSubTab">, updateSelectedRemiId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "remiList/updateSelectedRemiId">, clearRemiList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"remiList/clearRemiList">, updateRemiDetailSaveRemiCode: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<SaveRemiStageCode, "remiList/updateRemiDetailSaveRemiCode">, updateSearchResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "remiList/updateSearchResult">, updateFilterResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
31
31
|
filters: ReimbursementFilters;
|
|
32
32
|
}, "remiList/updateFilterResult">, updateRemiListDownloadUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
33
33
|
uiState: Partial<RemiListDownloadUIState>;
|
|
@@ -33,10 +33,10 @@ export declare const ALL_REMI_TABS: readonly ["paid", "pending_approval", "sched
|
|
|
33
33
|
export declare const toRemiTabType: (v: string) => "paid" | "pending_approval" | "scheduled" | "draft";
|
|
34
34
|
export declare const toRemiTabTypeStrict: (v: string) => "paid" | "pending_approval" | "scheduled" | "draft" | undefined;
|
|
35
35
|
export type RemiTabType = ReturnType<typeof toRemiTabType>;
|
|
36
|
-
export declare const toRemiSubTabType: (v: string) => "
|
|
37
|
-
export declare const toRemiSubTabTypeStrict: (v: string) => "
|
|
36
|
+
export declare const toRemiSubTabType: (v: string) => "failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "myDrafts" | "awaitingApproval" | "awaitingMyApproval" | "awaitingAllApproval";
|
|
37
|
+
export declare const toRemiSubTabTypeStrict: (v: string) => "failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "myDrafts" | "awaitingApproval" | "awaitingMyApproval" | "awaitingAllApproval" | undefined;
|
|
38
38
|
export type RemiSubTabType = ReturnType<typeof toRemiSubTabType>;
|
|
39
|
-
export declare const toRemiSubTabUnderScoreType: (v: string) => "
|
|
39
|
+
export declare const toRemiSubTabUnderScoreType: (v: string) => "failed" | "cancelled" | "rejected" | "ach" | "wire" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "my_drafts" | "awaiting_all_approval";
|
|
40
40
|
export type RemiSubTabUnderScoreType = ReturnType<typeof toRemiSubTabUnderScoreType>;
|
|
41
41
|
declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "createdBy" | "submittedOn" | "reportName";
|
|
42
42
|
export type ReimbursementViewSortKey = ReturnType<typeof toReimbursementSortKeyType>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const toSubscriptionSortKeyType: (v: string) => "status" | "
|
|
1
|
+
export declare const toSubscriptionSortKeyType: (v: string) => "status" | "companyName" | "controller" | "plans" | "planLowerLimit" | "planHigherLimit" | "avg2MonthExpenses" | "addons" | "upgradeStatus" | "monthlyRecurringRevenue" | "notes";
|
|
2
2
|
export type SubscriptionViewSortKey = ReturnType<typeof toSubscriptionSortKeyType>;
|
|
3
3
|
export declare const SUBSCRIPTION_STATUS_CODES: string[];
|
|
4
4
|
declare const toSubscriptionStatusCodeType: (v: string) => string;
|
|
@@ -3,7 +3,6 @@ import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
|
3
3
|
import { updateTasks } from '../../../../entity/task/taskReducer';
|
|
4
4
|
import { RootState } from '../../../../reducer';
|
|
5
5
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
6
|
-
import { fetchTaskList, removeTaskFromList } from '../../taskListView/taskListReducer';
|
|
7
6
|
import { archiveTask, archiveTaskSuccessOrFailure } from '../taskDetailReducer';
|
|
8
|
-
export type ActionType = ReturnType<typeof archiveTask> | ReturnType<typeof updateTasks> | ReturnType<typeof openSnackbar> | ReturnType<typeof
|
|
7
|
+
export type ActionType = ReturnType<typeof archiveTask> | ReturnType<typeof updateTasks> | ReturnType<typeof openSnackbar> | ReturnType<typeof archiveTaskSuccessOrFailure>;
|
|
9
8
|
export declare const archiveTaskEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
|
|
@@ -7,7 +7,6 @@ const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer")
|
|
|
7
7
|
const taskReducer_1 = require("../../../../entity/task/taskReducer");
|
|
8
8
|
const taskSelector_1 = require("../../../../entity/task/taskSelector");
|
|
9
9
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
10
|
-
const taskListReducer_1 = require("../../taskListView/taskListReducer");
|
|
11
10
|
const taskDetailReducer_1 = require("../taskDetailReducer");
|
|
12
11
|
// Epic function to handle archiving of tasks
|
|
13
12
|
const archiveTaskEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskDetailReducer_1.archiveTask.match), (0, operators_1.mergeMap)((action) => handleArchiveTask(action.payload.taskId, state$, zeniAPI)));
|
|
@@ -30,8 +29,6 @@ const handleApiResponse = (response, taskId) => {
|
|
|
30
29
|
response.data.tasks.length > 0) {
|
|
31
30
|
const fetchActions = [
|
|
32
31
|
(0, taskReducer_1.updateTasks)(response.data.tasks),
|
|
33
|
-
(0, taskListReducer_1.removeTaskFromList)(taskId),
|
|
34
|
-
(0, taskListReducer_1.fetchTaskList)(),
|
|
35
32
|
(0, taskDetailReducer_1.archiveTaskSuccessOrFailure)({
|
|
36
33
|
fetchState: 'Completed',
|
|
37
34
|
taskId,
|
|
@@ -2,7 +2,6 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
3
3
|
import { RootState } from '../../../../reducer';
|
|
4
4
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
-
import { fetchTaskList, removeTaskFromList } from '../../taskListView/taskListReducer';
|
|
6
5
|
import { deleteTask, deleteTaskSuccessOrFailure } from '../taskDetailReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof deleteTask> | ReturnType<typeof openSnackbar> | ReturnType<typeof
|
|
6
|
+
export type ActionType = ReturnType<typeof deleteTask> | ReturnType<typeof openSnackbar> | ReturnType<typeof deleteTaskSuccessOrFailure>;
|
|
8
7
|
export declare const deleteTaskEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
|
|
@@ -5,7 +5,6 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
8
|
-
const taskListReducer_1 = require("../../taskListView/taskListReducer");
|
|
9
8
|
const taskDetailReducer_1 = require("../taskDetailReducer");
|
|
10
9
|
const deleteTaskEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskDetailReducer_1.deleteTask.match), (0, operators_1.mergeMap)((action) => {
|
|
11
10
|
const { taskId } = action.payload;
|
|
@@ -14,10 +13,6 @@ const deleteTaskEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operato
|
|
|
14
13
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
14
|
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
16
15
|
const actions = [];
|
|
17
|
-
if (taskId != null) {
|
|
18
|
-
actions.push((0, taskListReducer_1.removeTaskFromList)(taskId));
|
|
19
|
-
}
|
|
20
|
-
actions.push((0, taskListReducer_1.fetchTaskList)());
|
|
21
16
|
actions.push((0, taskDetailReducer_1.deleteTaskSuccessOrFailure)({ fetchState: 'Completed', taskId }));
|
|
22
17
|
return (0, rxjs_1.from)(actions);
|
|
23
18
|
}
|
|
@@ -40,16 +40,7 @@ export declare const fetchTaskDetailPage: import("@reduxjs/toolkit").ActionCreat
|
|
|
40
40
|
fetchState: FetchState;
|
|
41
41
|
error?: ZeniAPIStatus;
|
|
42
42
|
taskId?: ID;
|
|
43
|
-
}, "taskDetailView/deleteTaskSuccessOrFailure">,
|
|
44
|
-
taskId: string;
|
|
45
|
-
snoozedUntil: string;
|
|
46
|
-
}, "taskDetailView/snoozeTask", never, never>, snoozeTaskSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
47
|
-
fetchState: FetchState;
|
|
48
|
-
taskId: ID;
|
|
49
|
-
error?: ZeniAPIStatus;
|
|
50
|
-
}, "taskDetailView/snoozeTaskSuccessOrFailure">, unsnoozeTask: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskId: string], {
|
|
51
|
-
taskId: string;
|
|
52
|
-
}, "taskDetailView/unsnoozeTask", never, never>, fetchTaskHistory: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskId: string, cacheOverride?: any], {
|
|
43
|
+
}, "taskDetailView/deleteTaskSuccessOrFailure">, fetchTaskHistory: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskId: string, cacheOverride?: any], {
|
|
53
44
|
taskId: string;
|
|
54
45
|
cacheOverride: any;
|
|
55
46
|
}, "taskDetailView/fetchTaskHistory", never, never>, updateTaskHistory: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.updateDeletedTagToLocalStore = exports.updateCreatedTagToLocalStore = exports.clearTaskDetail = exports.updateTaskHistoryFetchStatus = exports.updateTaskHistory = exports.fetchTaskHistory = exports.
|
|
7
|
+
exports.updateDeletedTagToLocalStore = exports.updateCreatedTagToLocalStore = exports.clearTaskDetail = exports.updateTaskHistoryFetchStatus = exports.updateTaskHistory = exports.fetchTaskHistory = exports.deleteTaskSuccessOrFailure = exports.removeTaskDetail = exports.deleteTask = exports.saveTaskSuccessOrFailure = exports.archiveTaskSuccessOrFailure = exports.archiveTask = exports.saveTaskDetail = exports.discardTaskUpdatesInLocalStore = exports.saveTaskUpdatesToLocalStore = exports.updateEditTaskFetchStatus = exports.initializeTaskToLocalStore = exports.fetchTaskDetail = exports.fetchTaskDetailPage = exports.initialState = void 0;
|
|
8
8
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
10
10
|
const commonHistory_1 = require("../../spendManagement/commonHistoryView/commonHistory");
|
|
@@ -236,54 +236,6 @@ const taskDetailView = (0, toolkit_1.createSlice)({
|
|
|
236
236
|
draft.newTaskState.deleteTaskStatus.error = action.payload.error;
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
|
-
snoozeTask: {
|
|
240
|
-
reducer(draft, action) {
|
|
241
|
-
const { taskId } = action.payload;
|
|
242
|
-
draft.editTaskStateById[taskId] = {
|
|
243
|
-
...(draft.editTaskStateById[taskId] != null
|
|
244
|
-
? draft.editTaskStateById[taskId]
|
|
245
|
-
: taskDetail_1.initialTaskDetail),
|
|
246
|
-
snoozeStatus: {
|
|
247
|
-
fetchState: 'In-Progress',
|
|
248
|
-
error: undefined,
|
|
249
|
-
},
|
|
250
|
-
};
|
|
251
|
-
},
|
|
252
|
-
prepare(taskId, snoozedUntil) {
|
|
253
|
-
return {
|
|
254
|
-
payload: {
|
|
255
|
-
taskId,
|
|
256
|
-
snoozedUntil,
|
|
257
|
-
},
|
|
258
|
-
};
|
|
259
|
-
},
|
|
260
|
-
},
|
|
261
|
-
snoozeTaskSuccessOrFailure(draft, action) {
|
|
262
|
-
const { taskId, fetchState, error } = action.payload;
|
|
263
|
-
draft.editTaskStateById[taskId].snoozeStatus.fetchState = fetchState;
|
|
264
|
-
draft.editTaskStateById[taskId].snoozeStatus.error = error;
|
|
265
|
-
},
|
|
266
|
-
unsnoozeTask: {
|
|
267
|
-
reducer(draft, action) {
|
|
268
|
-
const { taskId } = action.payload;
|
|
269
|
-
draft.editTaskStateById[taskId] = {
|
|
270
|
-
...(draft.editTaskStateById[taskId] != null
|
|
271
|
-
? draft.editTaskStateById[taskId]
|
|
272
|
-
: taskDetail_1.initialTaskDetail),
|
|
273
|
-
snoozeStatus: {
|
|
274
|
-
fetchState: 'In-Progress',
|
|
275
|
-
error: undefined,
|
|
276
|
-
},
|
|
277
|
-
};
|
|
278
|
-
},
|
|
279
|
-
prepare(taskId) {
|
|
280
|
-
return {
|
|
281
|
-
payload: {
|
|
282
|
-
taskId,
|
|
283
|
-
},
|
|
284
|
-
};
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
239
|
fetchTaskHistory: {
|
|
288
240
|
reducer(draft, action) {
|
|
289
241
|
const { taskId, cacheOverride } = action.payload;
|
|
@@ -325,5 +277,5 @@ const taskDetailView = (0, toolkit_1.createSlice)({
|
|
|
325
277
|
},
|
|
326
278
|
},
|
|
327
279
|
});
|
|
328
|
-
_a = taskDetailView.actions, exports.fetchTaskDetailPage = _a.fetchTaskDetailPage, exports.fetchTaskDetail = _a.fetchTaskDetail, exports.initializeTaskToLocalStore = _a.initializeTaskToLocalStore, exports.updateEditTaskFetchStatus = _a.updateEditTaskFetchStatus, exports.saveTaskUpdatesToLocalStore = _a.saveTaskUpdatesToLocalStore, exports.discardTaskUpdatesInLocalStore = _a.discardTaskUpdatesInLocalStore, exports.saveTaskDetail = _a.saveTaskDetail, exports.archiveTask = _a.archiveTask, exports.archiveTaskSuccessOrFailure = _a.archiveTaskSuccessOrFailure, exports.saveTaskSuccessOrFailure = _a.saveTaskSuccessOrFailure, exports.deleteTask = _a.deleteTask, exports.removeTaskDetail = _a.removeTaskDetail, exports.deleteTaskSuccessOrFailure = _a.deleteTaskSuccessOrFailure, exports.
|
|
280
|
+
_a = taskDetailView.actions, exports.fetchTaskDetailPage = _a.fetchTaskDetailPage, exports.fetchTaskDetail = _a.fetchTaskDetail, exports.initializeTaskToLocalStore = _a.initializeTaskToLocalStore, exports.updateEditTaskFetchStatus = _a.updateEditTaskFetchStatus, exports.saveTaskUpdatesToLocalStore = _a.saveTaskUpdatesToLocalStore, exports.discardTaskUpdatesInLocalStore = _a.discardTaskUpdatesInLocalStore, exports.saveTaskDetail = _a.saveTaskDetail, exports.archiveTask = _a.archiveTask, exports.archiveTaskSuccessOrFailure = _a.archiveTaskSuccessOrFailure, exports.saveTaskSuccessOrFailure = _a.saveTaskSuccessOrFailure, exports.deleteTask = _a.deleteTask, exports.removeTaskDetail = _a.removeTaskDetail, exports.deleteTaskSuccessOrFailure = _a.deleteTaskSuccessOrFailure, exports.fetchTaskHistory = _a.fetchTaskHistory, exports.updateTaskHistory = _a.updateTaskHistory, exports.updateTaskHistoryFetchStatus = _a.updateTaskHistoryFetchStatus, exports.clearTaskDetail = _a.clearTaskDetail, exports.updateCreatedTagToLocalStore = _a.updateCreatedTagToLocalStore, exports.updateDeletedTagToLocalStore = _a.updateDeletedTagToLocalStore;
|
|
329
281
|
exports.default = taskDetailView.reducer;
|
|
@@ -3,7 +3,6 @@ import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndRep
|
|
|
3
3
|
import { Class } from '../../../entity/class/classState';
|
|
4
4
|
import { File } from '../../../entity/file/fileState';
|
|
5
5
|
import { TaskPriority, TaskStatus } from '../../../entity/task/taskState';
|
|
6
|
-
import { ZeniDate } from '../../../zeniDayJS';
|
|
7
6
|
import { RootState } from '../../../reducer';
|
|
8
7
|
import { UserAndRole } from '../../companyView/types/userAndRole';
|
|
9
8
|
import { HistoricEvent } from '../../spendManagement/commonHistoryView/commonHistory';
|
|
@@ -19,10 +18,6 @@ export interface TaskDetailSelectorView extends SelectorView {
|
|
|
19
18
|
updateFileStatusById: Record<ID, FetchStateAndError | undefined>;
|
|
20
19
|
userList: UserListSelectorView;
|
|
21
20
|
createdByUser?: UserAndRole;
|
|
22
|
-
isArchived?: boolean;
|
|
23
|
-
isDeleted?: boolean;
|
|
24
|
-
recurringSourceTaskId?: ID;
|
|
25
|
-
snoozedUntil?: ZeniDate | null;
|
|
26
21
|
}
|
|
27
22
|
export declare const getTaskDetail: (state: RootState, taskId?: ID) => TaskDetailSelectorView;
|
|
28
23
|
export declare const allTaskStatus: TaskStatus[];
|
|
@@ -12,14 +12,13 @@ const taskSelector_1 = require("../../../entity/task/taskSelector");
|
|
|
12
12
|
const userAndRole_1 = require("../../companyView/types/userAndRole");
|
|
13
13
|
const fileViewSelector_1 = require("../../fileView/fileViewSelector");
|
|
14
14
|
const userListViewSelector_1 = require("../../userListView/userListViewSelector");
|
|
15
|
-
const taskDetail_1 = require("./taskDetail");
|
|
16
15
|
const getTaskDetail = (state, taskId) => {
|
|
17
16
|
const { taskDetailState, classListState, classState, fileState, fileViewState, userState, userRoleState, userListViewState, addressState, taskState, } = state;
|
|
18
17
|
const deleteFileStatusById = {};
|
|
19
18
|
const updateFileStatusById = {};
|
|
20
19
|
let showTaskDetailFormFooter = false;
|
|
21
20
|
const sourceTaskDetail = taskId != null
|
|
22
|
-
?
|
|
21
|
+
? taskDetailState.editTaskStateById[taskId]
|
|
23
22
|
: taskDetailState.newTaskState;
|
|
24
23
|
const userList = (0, userListViewSelector_1.getUserList)(userState, userRoleState, userListViewState, 'taskManagerCandidate');
|
|
25
24
|
let fetchStatus = {
|
|
@@ -28,19 +27,11 @@ const getTaskDetail = (state, taskId) => {
|
|
|
28
27
|
};
|
|
29
28
|
let taskHistory = [];
|
|
30
29
|
let createdByUser = undefined;
|
|
31
|
-
let isArchived = undefined;
|
|
32
|
-
let isDeleted = undefined;
|
|
33
|
-
let recurringSourceTaskId = undefined;
|
|
34
|
-
let snoozedUntil = undefined;
|
|
35
30
|
if (taskId != null && sourceTaskDetail != null) {
|
|
36
31
|
const taskEntity = (0, taskSelector_1.getTaskById)(taskState, taskId);
|
|
37
32
|
const fileIdsInEntity = taskEntity?.fileIds ?? [];
|
|
38
33
|
if (taskEntity != null) {
|
|
39
34
|
createdByUser = (0, userAndRole_1.getUserAndUserRole)(userState, userRoleState, addressState, taskEntity.createdBy);
|
|
40
|
-
isArchived = taskEntity.isArchived;
|
|
41
|
-
isDeleted = taskEntity.isDeleted;
|
|
42
|
-
recurringSourceTaskId = taskEntity.recurringSourceTaskId;
|
|
43
|
-
snoozedUntil = taskEntity.snoozedUntil;
|
|
44
35
|
}
|
|
45
36
|
if (fileIdsInEntity.length > 0) {
|
|
46
37
|
fetchStatus = (0, reduceFetchState_1.reduceFetchState)([
|
|
@@ -58,7 +49,7 @@ const getTaskDetail = (state, taskId) => {
|
|
|
58
49
|
]);
|
|
59
50
|
}
|
|
60
51
|
showTaskDetailFormFooter = showFormFooter(sourceTaskDetail.taskDetailLocalData, taskEntity);
|
|
61
|
-
taskHistory = taskDetailState.taskHistoryById[taskId]
|
|
52
|
+
taskHistory = taskDetailState.taskHistoryById[taskId].historicEvents;
|
|
62
53
|
}
|
|
63
54
|
else if (taskId == null) {
|
|
64
55
|
fetchStatus = (0, reduceFetchState_1.reduceFetchState)([userList, classListState]);
|
|
@@ -88,11 +79,7 @@ const getTaskDetail = (state, taskId) => {
|
|
|
88
79
|
error: fetchStatus.error,
|
|
89
80
|
version: 0,
|
|
90
81
|
createdByUser,
|
|
91
|
-
isArchived,
|
|
92
|
-
isDeleted,
|
|
93
|
-
recurringSourceTaskId,
|
|
94
82
|
showTaskDetailFormFooter,
|
|
95
|
-
snoozedUntil,
|
|
96
83
|
};
|
|
97
84
|
};
|
|
98
85
|
exports.getTaskDetail = getTaskDetail;
|
|
@@ -5,23 +5,23 @@ import { updateTasks } from '../../../../entity/task/taskReducer';
|
|
|
5
5
|
import { Task } from '../../../../entity/task/taskState';
|
|
6
6
|
import { RootState } from '../../../../reducer';
|
|
7
7
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
8
|
-
import { bulkUpdateTaskList,
|
|
9
|
-
export type ActionType = ReturnType<typeof bulkUpdateTaskList> | ReturnType<typeof
|
|
10
|
-
export declare const bulkUpdateTaskListEpic: (actions$: ActionsObservable<ActionType>,
|
|
8
|
+
import { bulkUpdateTaskList, updateTasksListOnBulkUpdateTasksFailure, updateTasksListOnBulkUpdateTasksSuccess } from '../taskListReducer';
|
|
9
|
+
export type ActionType = ReturnType<typeof bulkUpdateTaskList> | ReturnType<typeof updateTasks> | ReturnType<typeof updateTasksListOnBulkUpdateTasksFailure> | ReturnType<typeof updateTasksListOnBulkUpdateTasksSuccess>;
|
|
10
|
+
export declare const bulkUpdateTaskListEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
11
|
+
/**
|
|
12
|
+
* Helpers
|
|
13
|
+
*/
|
|
11
14
|
interface UpdateTaskPayload {
|
|
12
15
|
assignees: string[];
|
|
13
16
|
description: string;
|
|
14
17
|
due_date: string | null;
|
|
15
18
|
file_ids: ID[];
|
|
16
19
|
group_assignees: string[];
|
|
17
|
-
is_archived: boolean;
|
|
18
|
-
is_deleted: boolean;
|
|
19
20
|
name: string;
|
|
20
21
|
priority: string;
|
|
21
22
|
recurring_end_date: string | null;
|
|
22
23
|
recurring_frequency: string | null;
|
|
23
24
|
recurring_start_date: string | null;
|
|
24
|
-
snoozed_until: string | null;
|
|
25
25
|
status: string;
|
|
26
26
|
tags: string[];
|
|
27
27
|
task_group_ids: string[];
|
|
@@ -29,5 +29,6 @@ interface UpdateTaskPayload {
|
|
|
29
29
|
time_spent: number;
|
|
30
30
|
type: string;
|
|
31
31
|
}
|
|
32
|
+
export declare const getTasksListPayload: (state: RootState, taskIds: ID[], updates: Partial<Task>) => UpdateTaskPayload[];
|
|
32
33
|
export declare const getTaskPayload: (state: RootState, taskId: ID, updates: Partial<Task>) => UpdateTaskPayload;
|
|
33
34
|
export {};
|