@zeniai/client-epic-state 4.20.0-beta8RR → 4.20.0
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/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/entity/task/taskPayload.d.ts +0 -2
- package/lib/entity/task/taskPayload.js +0 -2
- package/lib/entity/task/taskState.d.ts +0 -2
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +1 -2
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/esm/entity/task/taskPayload.js +0 -2
- package/lib/esm/epic.js +1 -2
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/companyView/types/cockpitTypes.js +0 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +0 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetail.js +0 -4
- package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +1 -26
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +0 -3
- package/lib/esm/view/taskManager/taskListView/taskList.js +0 -1
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +2 -8
- package/lib/index.d.ts +2 -2
- package/lib/index.js +4 -5
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
- package/lib/view/companyView/types/cockpitTypes.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.js +0 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -1
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +0 -1
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +0 -2
- package/lib/view/taskManager/taskDetailView/taskDetail.js +0 -4
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +1 -8
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +2 -27
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +0 -2
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +0 -3
- package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
- package/lib/view/taskManager/taskListView/taskList.js +0 -1
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +2 -2
- package/lib/view/taskManager/taskListView/taskListSelector.js +2 -8
- package/package.json +1 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/snoozeTaskEpic.js +0 -62
- package/lib/view/taskManager/taskDetailView/epics/snoozeTaskEpic.d.ts +0 -8
- package/lib/view/taskManager/taskDetailView/epics/snoozeTaskEpic.js +0 -66
|
@@ -4,10 +4,10 @@ import { CompanyTaskManagerViewPayload } from './companyTaskManagerViewPayload';
|
|
|
4
4
|
import { CompanyTaskManagerViewState, CompanyTaskManagerViewUIState } from './companyTaskManagerViewState';
|
|
5
5
|
export declare const initialUIState: CompanyTaskManagerViewUIState;
|
|
6
6
|
export declare const initialState: CompanyTaskManagerViewState;
|
|
7
|
-
export declare const fetchCompanyTaskManagerView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[pageToken: PageToken, sortKey: "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "
|
|
7
|
+
export declare const fetchCompanyTaskManagerView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[pageToken: PageToken, sortKey: "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "taskName", sortOrder: "ascending" | "descending", keepExistingListItems?: any, searchString?: string | undefined], {
|
|
8
8
|
pageToken: PageToken;
|
|
9
9
|
searchString: string | undefined;
|
|
10
|
-
sortKey: "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "
|
|
10
|
+
sortKey: "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "taskName";
|
|
11
11
|
sortOrder: "ascending" | "descending";
|
|
12
12
|
keepExistingListItems: any;
|
|
13
13
|
}, "companyTaskManagerView/fetchCompanyTaskManagerView", never, never>, updateCompanyTaskManagerViewOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -7,7 +7,7 @@ export declare const toPortfolioSortKeyType: (v: string) => "expenses" | "runway
|
|
|
7
7
|
export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "group" | "taxStatus" | "controller" | "preparer" | "reviewer" | "annualRecurringRevenue" | "companyName" | "monthlyRecurringRevenue" | "task" | "notes" | "plans" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
|
|
8
8
|
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "businessVerified" | "identityVerified" | "bankAccountLinked" | "customerCreated" | "groupCreated" | "qboLinked" | "notes" | "enroller" | "invite" | "latestCreated";
|
|
9
9
|
export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "companyName" | "monthlyRecurringRevenue" | "companyEngagementMetricsUpdatedAt" | "customerSatisfactionScore" | "externalProductServiceExposure" | "netPromoterScore" | "customerSuccessManager" | "lastReportSent" | "issues" | "productVerticals" | "churnProbability" | "subscriptionDate" | "renewalDate" | "dashboardLastSeen" | "lastEngagement";
|
|
10
|
-
export declare const toTaskManagerSortKeyType: (v: string) => "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "
|
|
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>;
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ 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" | "
|
|
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" | "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";
|
|
41
41
|
messageText: "notification" | "success" | "failed";
|
|
42
42
|
type: "error" | "success" | "info";
|
|
43
43
|
variables: {
|
|
@@ -31,7 +31,6 @@ const initializeTaskToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, o
|
|
|
31
31
|
savedRecurringEndDate: task.recurringEndDate,
|
|
32
32
|
recurringStartDate: task.recurringStartDate,
|
|
33
33
|
timeSpent: task.timeSpent,
|
|
34
|
-
isPrivate: task.isPrivate,
|
|
35
34
|
};
|
|
36
35
|
const actions = [
|
|
37
36
|
(0, taskDetailReducer_1.saveTaskUpdatesToLocalStore)({ taskDetailLocalData, taskId }),
|
|
@@ -98,6 +98,5 @@ const prepareTaskPayload = (state, taskId, taskGroupId) => {
|
|
|
98
98
|
sync_token: syncToken,
|
|
99
99
|
task_group_ids: taskGroupId != null ? [taskGroupId] : [],
|
|
100
100
|
time_spent: (0, formatMinutesToFromHHMM_1.convertHHMMStrToMinutes)(localData.timeSpent),
|
|
101
|
-
...(taskId == null ? { is_private: localData.isPrivate ?? false } : {}),
|
|
102
101
|
};
|
|
103
102
|
};
|
|
@@ -13,7 +13,6 @@ export interface EditTaskDetail {
|
|
|
13
13
|
deleteTaskStatus: FetchStateAndError;
|
|
14
14
|
fetchTaskStatus: FetchStateAndError;
|
|
15
15
|
saveStatus: FetchStateAndError;
|
|
16
|
-
snoozeStatus: FetchStateAndError;
|
|
17
16
|
taskDetailLocalData: EditTaskLocalData;
|
|
18
17
|
taskId?: ID;
|
|
19
18
|
}
|
|
@@ -33,7 +32,6 @@ export interface EditTaskLocalData {
|
|
|
33
32
|
timeSpent: string;
|
|
34
33
|
type: TaskType;
|
|
35
34
|
dueDate?: ZeniDate;
|
|
36
|
-
isPrivate?: boolean;
|
|
37
35
|
recurringFrequency?: RecurringFrequencyType;
|
|
38
36
|
recurringStartDate?: ZeniDate;
|
|
39
37
|
savedRecurringEndDate?: ZeniDate;
|
|
@@ -29,14 +29,7 @@ export declare const fetchTaskDetailPage: import("@reduxjs/toolkit").ActionCreat
|
|
|
29
29
|
fetchState: FetchState;
|
|
30
30
|
taskId: ID;
|
|
31
31
|
error?: ZeniAPIStatus;
|
|
32
|
-
}, "taskDetailView/archiveTaskSuccessOrFailure">,
|
|
33
|
-
taskId: string;
|
|
34
|
-
snoozedUntil: string;
|
|
35
|
-
}, "taskDetailView/snoozeTask", never, never>, snoozeTaskSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
36
|
-
fetchState: FetchState;
|
|
37
|
-
taskId: ID;
|
|
38
|
-
error?: ZeniAPIStatus;
|
|
39
|
-
}, "taskDetailView/snoozeTaskSuccessOrFailure">, saveTaskSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
32
|
+
}, "taskDetailView/archiveTaskSuccessOrFailure">, saveTaskSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
40
33
|
fetchState: FetchState;
|
|
41
34
|
error?: ZeniAPIStatus;
|
|
42
35
|
newTaskId?: ID;
|
|
@@ -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.deleteTaskSuccessOrFailure = exports.removeTaskDetail = exports.deleteTask = exports.saveTaskSuccessOrFailure = 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");
|
|
@@ -192,31 +192,6 @@ const taskDetailView = (0, toolkit_1.createSlice)({
|
|
|
192
192
|
draft.editTaskStateById[taskId].archiveStatus.fetchState = fetchState;
|
|
193
193
|
draft.editTaskStateById[taskId].archiveStatus.error = error;
|
|
194
194
|
},
|
|
195
|
-
snoozeTask: {
|
|
196
|
-
reducer(draft, action) {
|
|
197
|
-
const { taskId } = action.payload;
|
|
198
|
-
draft.editTaskStateById[taskId] = {
|
|
199
|
-
...draft.editTaskStateById[taskId],
|
|
200
|
-
snoozeStatus: {
|
|
201
|
-
fetchState: 'In-Progress',
|
|
202
|
-
error: undefined,
|
|
203
|
-
},
|
|
204
|
-
};
|
|
205
|
-
},
|
|
206
|
-
prepare(taskId, snoozedUntil) {
|
|
207
|
-
return {
|
|
208
|
-
payload: {
|
|
209
|
-
taskId,
|
|
210
|
-
snoozedUntil,
|
|
211
|
-
},
|
|
212
|
-
};
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
snoozeTaskSuccessOrFailure(draft, action) {
|
|
216
|
-
const { taskId, fetchState, error } = action.payload;
|
|
217
|
-
draft.editTaskStateById[taskId].snoozeStatus.fetchState = fetchState;
|
|
218
|
-
draft.editTaskStateById[taskId].snoozeStatus.error = error;
|
|
219
|
-
},
|
|
220
195
|
deleteTask: {
|
|
221
196
|
reducer(draft, action) {
|
|
222
197
|
const { taskId } = action.payload;
|
|
@@ -302,5 +277,5 @@ const taskDetailView = (0, toolkit_1.createSlice)({
|
|
|
302
277
|
},
|
|
303
278
|
},
|
|
304
279
|
});
|
|
305
|
-
_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.
|
|
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;
|
|
306
281
|
exports.default = taskDetailView.reducer;
|
|
@@ -4,7 +4,6 @@ import { Class } from '../../../entity/class/classState';
|
|
|
4
4
|
import { File } from '../../../entity/file/fileState';
|
|
5
5
|
import { TaskPriority, TaskStatus } from '../../../entity/task/taskState';
|
|
6
6
|
import { RootState } from '../../../reducer';
|
|
7
|
-
import { ZeniDate } from '../../../zeniDayJS';
|
|
8
7
|
import { UserAndRole } from '../../companyView/types/userAndRole';
|
|
9
8
|
import { HistoricEvent } from '../../spendManagement/commonHistoryView/commonHistory';
|
|
10
9
|
import { UserListSelectorView } from '../../userListView/userListViewSelector';
|
|
@@ -19,7 +18,6 @@ export interface TaskDetailSelectorView extends SelectorView {
|
|
|
19
18
|
updateFileStatusById: Record<ID, FetchStateAndError | undefined>;
|
|
20
19
|
userList: UserListSelectorView;
|
|
21
20
|
createdByUser?: UserAndRole;
|
|
22
|
-
snoozedUntil?: ZeniDate;
|
|
23
21
|
}
|
|
24
22
|
export declare const getTaskDetail: (state: RootState, taskId?: ID) => TaskDetailSelectorView;
|
|
25
23
|
export declare const allTaskStatus: TaskStatus[];
|
|
@@ -27,13 +27,11 @@ const getTaskDetail = (state, taskId) => {
|
|
|
27
27
|
};
|
|
28
28
|
let taskHistory = [];
|
|
29
29
|
let createdByUser = undefined;
|
|
30
|
-
let snoozedUntil = undefined;
|
|
31
30
|
if (taskId != null && sourceTaskDetail != null) {
|
|
32
31
|
const taskEntity = (0, taskSelector_1.getTaskById)(taskState, taskId);
|
|
33
32
|
const fileIdsInEntity = taskEntity?.fileIds ?? [];
|
|
34
33
|
if (taskEntity != null) {
|
|
35
34
|
createdByUser = (0, userAndRole_1.getUserAndUserRole)(userState, userRoleState, addressState, taskEntity.createdBy);
|
|
36
|
-
snoozedUntil = taskEntity.snoozedUntil;
|
|
37
35
|
}
|
|
38
36
|
if (fileIdsInEntity.length > 0) {
|
|
39
37
|
fetchStatus = (0, reduceFetchState_1.reduceFetchState)([
|
|
@@ -82,7 +80,6 @@ const getTaskDetail = (state, taskId) => {
|
|
|
82
80
|
version: 0,
|
|
83
81
|
createdByUser,
|
|
84
82
|
showTaskDetailFormFooter,
|
|
85
|
-
snoozedUntil,
|
|
86
83
|
};
|
|
87
84
|
};
|
|
88
85
|
exports.getTaskDetail = getTaskDetail;
|
|
@@ -45,7 +45,7 @@ export interface TaskListUIState extends SpendManagementUIState {
|
|
|
45
45
|
searchText: string;
|
|
46
46
|
sortKey: TaskListViewSortKey;
|
|
47
47
|
}
|
|
48
|
-
declare const toTaskListSortKeyType: (v: string) => "status" | "name" | "dueDate" | "tag" | "priority" | "timeSpent" | "assignee" | "creationDate"
|
|
48
|
+
declare const toTaskListSortKeyType: (v: string) => "status" | "name" | "dueDate" | "tag" | "priority" | "timeSpent" | "assignee" | "creationDate";
|
|
49
49
|
export declare type TaskListViewSortKey = ReturnType<typeof toTaskListSortKeyType>;
|
|
50
50
|
export declare const TASK_LIST_FILTER_CATEGORIES: TaskListFilterCategoryOption[];
|
|
51
51
|
interface TaskListFilterCategoryOption {
|
|
@@ -32,7 +32,6 @@ const ALL_TASK_LIST_SORT_KEYS = [
|
|
|
32
32
|
'status',
|
|
33
33
|
'priority',
|
|
34
34
|
'timeSpent',
|
|
35
|
-
'visibility',
|
|
36
35
|
];
|
|
37
36
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
38
37
|
const toTaskListSortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_TASK_LIST_SORT_KEYS);
|
|
@@ -23,10 +23,10 @@ export declare const fetchTaskListPage: import("@reduxjs/toolkit").ActionCreator
|
|
|
23
23
|
filters: TaskListFilters;
|
|
24
24
|
}, "taskList/updateTaskFilters">, updateTaskListOnNewGroupCreationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
25
25
|
newTaskGroup: TaskGroupPayload;
|
|
26
|
-
}, "taskList/updateTaskListOnNewGroupCreationSuccess">, bulkUpdateTaskList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskIds: string[], groupId: string
|
|
26
|
+
}, "taskList/updateTaskListOnNewGroupCreationSuccess">, bulkUpdateTaskList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskIds: string[], groupId: string, updates: Partial<Task>], {
|
|
27
27
|
taskIds: string[];
|
|
28
28
|
updates: Partial<Task>;
|
|
29
|
-
groupId: string
|
|
29
|
+
groupId: string;
|
|
30
30
|
}, "taskList/bulkUpdateTaskList", never, never>, updateTasksListOnBulkUpdateTasksSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
31
31
|
groupId: ID | null;
|
|
32
32
|
taskIds: ID[];
|
|
@@ -23,12 +23,8 @@ const taskDetailSelector_1 = require("../taskDetailView/taskDetailSelector");
|
|
|
23
23
|
const taskList_1 = require("./taskList");
|
|
24
24
|
const taskListReducer_1 = require("./taskListReducer");
|
|
25
25
|
const isDefaultFilters = (taskListState) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
const hasNoActiveFilters = taskListState.filters.categories == null ||
|
|
30
|
-
taskListState.filters.categories.length === 0;
|
|
31
|
-
return (hasNoActiveFilters || (0, isEqual_1.default)(taskListState.filters, taskListReducer_1.initialState.filters));
|
|
26
|
+
return ((0, isEqual_1.default)(taskListState.filters, taskListReducer_1.initialState.filters) &&
|
|
27
|
+
taskListReducer_1.initialState.uiState.searchText === taskListState.uiState.searchText);
|
|
32
28
|
};
|
|
33
29
|
const sortTasksList = (tagState, tasksList, sortKey, sortOrder) => {
|
|
34
30
|
const tasksInOrder = (0, orderBy_1.default)(tasksList, (task) => {
|
|
@@ -46,8 +42,6 @@ const sortTasksList = (tagState, tasksList, sortKey, sortOrder) => {
|
|
|
46
42
|
return taskState_1.ALL_PRIORITY_CODE.indexOf(task.priority.code);
|
|
47
43
|
case 'timeSpent':
|
|
48
44
|
return task.timeSpent;
|
|
49
|
-
case 'visibility':
|
|
50
|
-
return task.isPrivate ? 1 : 0;
|
|
51
45
|
case 'name':
|
|
52
46
|
default:
|
|
53
47
|
return task.name.toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.20.0
|
|
3
|
+
"version": "4.20.0",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { from, of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
4
|
-
import { updateTasks } from '../../../../entity/task/taskReducer';
|
|
5
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
6
|
-
import { date } from '../../../../zeniDayJS';
|
|
7
|
-
import { snoozeTask, snoozeTaskSuccessOrFailure } from '../taskDetailReducer';
|
|
8
|
-
export const snoozeTaskEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(snoozeTask.match), mergeMap((action) => handleSnoozeTask(action.payload.taskId, action.payload.snoozedUntil, zeniAPI)));
|
|
9
|
-
const formatSnoozedUntilForDisplay = (snoozedUntil) => date(snoozedUntil).format('MMM D, h:mm A');
|
|
10
|
-
const handleSnoozeTask = (taskId, snoozedUntil, zeniAPI) => {
|
|
11
|
-
const snoozeTaskApi$ = zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}/snooze`, { snoozed_until: snoozedUntil });
|
|
12
|
-
return snoozeTaskApi$.pipe(mergeMap((response) => handleApiResponse(response, taskId, snoozedUntil)), catchError((error) => of(snoozeTaskSuccessOrFailure({
|
|
13
|
-
fetchState: 'Error',
|
|
14
|
-
taskId,
|
|
15
|
-
error: createZeniAPIStatus('Unexpected Error', 'Snooze Task REST API call errored out' + JSON.stringify(error)),
|
|
16
|
-
}))));
|
|
17
|
-
};
|
|
18
|
-
const handleApiResponse = (response, taskId, snoozedUntil) => {
|
|
19
|
-
if (isSuccessResponse(response) &&
|
|
20
|
-
response.data != null &&
|
|
21
|
-
response.data.tasks.length > 0) {
|
|
22
|
-
const fetchActions = [
|
|
23
|
-
updateTasks(response.data.tasks),
|
|
24
|
-
snoozeTaskSuccessOrFailure({
|
|
25
|
-
fetchState: 'Completed',
|
|
26
|
-
taskId,
|
|
27
|
-
}),
|
|
28
|
-
openSnackbar({
|
|
29
|
-
messageSection: 'snooze_task',
|
|
30
|
-
messageText: 'success',
|
|
31
|
-
type: 'success',
|
|
32
|
-
variables: [
|
|
33
|
-
{
|
|
34
|
-
variableName: '_snoozed_until_',
|
|
35
|
-
variableValue: formatSnoozedUntilForDisplay(snoozedUntil),
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
}),
|
|
39
|
-
];
|
|
40
|
-
return from(fetchActions);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
return from([
|
|
44
|
-
snoozeTaskSuccessOrFailure({
|
|
45
|
-
fetchState: 'Error',
|
|
46
|
-
taskId,
|
|
47
|
-
error: response.status,
|
|
48
|
-
}),
|
|
49
|
-
openSnackbar({
|
|
50
|
-
messageSection: 'snooze_task',
|
|
51
|
-
messageText: 'failed',
|
|
52
|
-
type: 'error',
|
|
53
|
-
variables: [
|
|
54
|
-
{
|
|
55
|
-
variableName: '_api-error_',
|
|
56
|
-
variableValue: response.status.message,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
}),
|
|
60
|
-
]);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
3
|
-
import { updateTasks } from '../../../../entity/task/taskReducer';
|
|
4
|
-
import { RootState } from '../../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
6
|
-
import { snoozeTask, snoozeTaskSuccessOrFailure } from '../taskDetailReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof snoozeTask> | ReturnType<typeof updateTasks> | ReturnType<typeof openSnackbar> | ReturnType<typeof snoozeTaskSuccessOrFailure>;
|
|
8
|
-
export declare const snoozeTaskEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.snoozeTaskEpic = 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 taskReducer_1 = require("../../../../entity/task/taskReducer");
|
|
8
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
9
|
-
const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
10
|
-
const taskDetailReducer_1 = require("../taskDetailReducer");
|
|
11
|
-
const snoozeTaskEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskDetailReducer_1.snoozeTask.match), (0, operators_1.mergeMap)((action) => handleSnoozeTask(action.payload.taskId, action.payload.snoozedUntil, zeniAPI)));
|
|
12
|
-
exports.snoozeTaskEpic = snoozeTaskEpic;
|
|
13
|
-
const formatSnoozedUntilForDisplay = (snoozedUntil) => (0, zeniDayJS_1.date)(snoozedUntil).format('MMM D, h:mm A');
|
|
14
|
-
const handleSnoozeTask = (taskId, snoozedUntil, zeniAPI) => {
|
|
15
|
-
const snoozeTaskApi$ = zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}/snooze`, { snoozed_until: snoozedUntil });
|
|
16
|
-
return snoozeTaskApi$.pipe((0, operators_1.mergeMap)((response) => handleApiResponse(response, taskId, snoozedUntil)), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, taskDetailReducer_1.snoozeTaskSuccessOrFailure)({
|
|
17
|
-
fetchState: 'Error',
|
|
18
|
-
taskId,
|
|
19
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Snooze Task REST API call errored out' + JSON.stringify(error)),
|
|
20
|
-
}))));
|
|
21
|
-
};
|
|
22
|
-
const handleApiResponse = (response, taskId, snoozedUntil) => {
|
|
23
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) &&
|
|
24
|
-
response.data != null &&
|
|
25
|
-
response.data.tasks.length > 0) {
|
|
26
|
-
const fetchActions = [
|
|
27
|
-
(0, taskReducer_1.updateTasks)(response.data.tasks),
|
|
28
|
-
(0, taskDetailReducer_1.snoozeTaskSuccessOrFailure)({
|
|
29
|
-
fetchState: 'Completed',
|
|
30
|
-
taskId,
|
|
31
|
-
}),
|
|
32
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
33
|
-
messageSection: 'snooze_task',
|
|
34
|
-
messageText: 'success',
|
|
35
|
-
type: 'success',
|
|
36
|
-
variables: [
|
|
37
|
-
{
|
|
38
|
-
variableName: '_snoozed_until_',
|
|
39
|
-
variableValue: formatSnoozedUntilForDisplay(snoozedUntil),
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
}),
|
|
43
|
-
];
|
|
44
|
-
return (0, rxjs_1.from)(fetchActions);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return (0, rxjs_1.from)([
|
|
48
|
-
(0, taskDetailReducer_1.snoozeTaskSuccessOrFailure)({
|
|
49
|
-
fetchState: 'Error',
|
|
50
|
-
taskId,
|
|
51
|
-
error: response.status,
|
|
52
|
-
}),
|
|
53
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
54
|
-
messageSection: 'snooze_task',
|
|
55
|
-
messageText: 'failed',
|
|
56
|
-
type: 'error',
|
|
57
|
-
variables: [
|
|
58
|
-
{
|
|
59
|
-
variableName: '_api-error_',
|
|
60
|
-
variableValue: response.status.message,
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
}),
|
|
64
|
-
]);
|
|
65
|
-
}
|
|
66
|
-
};
|