@zeniai/client-epic-state 5.1.45-betaDI2 → 5.1.45

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.
Files changed (85) hide show
  1. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  2. package/lib/entity/snackbar/snackbarTypes.js +0 -3
  3. package/lib/entity/task/taskPayload.d.ts +1 -3
  4. package/lib/entity/task/taskPayload.js +1 -16
  5. package/lib/entity/task/taskReducer.d.ts +1 -8
  6. package/lib/entity/task/taskReducer.js +4 -29
  7. package/lib/entity/task/taskState.d.ts +0 -2
  8. package/lib/entity/tenant/epic/saveExternalConnectionEpic.d.ts +1 -2
  9. package/lib/entity/tenant/epic/saveExternalConnectionEpic.js +0 -17
  10. package/lib/epic.d.ts +3 -6
  11. package/lib/epic.js +3 -6
  12. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
  13. package/lib/esm/entity/task/taskPayload.js +1 -16
  14. package/lib/esm/entity/task/taskReducer.js +3 -28
  15. package/lib/esm/entity/tenant/epic/saveExternalConnectionEpic.js +0 -17
  16. package/lib/esm/epic.js +3 -6
  17. package/lib/esm/index.js +8 -8
  18. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -31
  19. package/lib/esm/view/aiCfoView/epics/fetchSkillsEpic.js +8 -33
  20. package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +0 -3
  21. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +1 -7
  22. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +0 -7
  23. package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -2
  24. package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +9 -70
  25. package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +2 -56
  26. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +9 -32
  27. package/lib/esm/view/taskManager/taskListView/epics/fetchTaskListEpic.js +1 -3
  28. package/lib/esm/view/taskManager/taskListView/taskList.js +0 -1
  29. package/lib/esm/view/taskManager/taskListView/taskListReducer.js +13 -266
  30. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +0 -1
  31. package/lib/esm/view/taskManager/taskListView/taskListViewHelpers.js +0 -58
  32. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +0 -22
  33. package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +3 -75
  34. package/lib/esm/view/transactionDetail/journalEntryLinesViewModel.js +0 -58
  35. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +8 -10
  36. package/lib/esm/view/transactionDetail/transactionDetailReducer.js +1 -66
  37. package/lib/index.d.ts +11 -12
  38. package/lib/index.js +28 -37
  39. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -10
  40. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -7
  41. package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -32
  42. package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -5
  43. package/lib/view/aiCfoView/epics/fetchSkillsEpic.js +8 -33
  44. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +0 -3
  45. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +1 -7
  46. package/lib/view/companyView/types/cockpitTypes.d.ts +0 -3
  47. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  48. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +0 -7
  49. package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -2
  50. package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.d.ts +2 -2
  51. package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +8 -69
  52. package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +0 -16
  53. package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +2 -14
  54. package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +3 -57
  55. package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +1 -2
  56. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +7 -30
  57. package/lib/view/taskManager/taskListView/epics/fetchTaskListEpic.js +1 -3
  58. package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
  59. package/lib/view/taskManager/taskListView/taskList.js +0 -1
  60. package/lib/view/taskManager/taskListView/taskListPayload.d.ts +0 -4
  61. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +2 -6
  62. package/lib/view/taskManager/taskListView/taskListReducer.js +14 -267
  63. package/lib/view/taskManager/taskListView/taskListSelector.js +0 -1
  64. package/lib/view/taskManager/taskListView/taskListViewHelpers.d.ts +0 -11
  65. package/lib/view/taskManager/taskListView/taskListViewHelpers.js +1 -60
  66. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +0 -22
  67. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.d.ts +1 -5
  68. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +4 -77
  69. package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +0 -27
  70. package/lib/view/transactionDetail/journalEntryLinesViewModel.js +1 -61
  71. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +8 -10
  72. package/lib/view/transactionDetail/transactionDetailReducer.d.ts +2 -11
  73. package/lib/view/transactionDetail/transactionDetailReducer.js +2 -67
  74. package/lib/view/transactionDetail/transactionDetailState.d.ts +1 -8
  75. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -2
  76. package/package.json +1 -1
  77. package/lib/esm/view/aiCfoView/epics/submitFeedbackEpic.js +0 -39
  78. package/lib/esm/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +0 -96
  79. package/lib/esm/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +0 -53
  80. package/lib/view/aiCfoView/epics/submitFeedbackEpic.d.ts +0 -13
  81. package/lib/view/aiCfoView/epics/submitFeedbackEpic.js +0 -43
  82. package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.d.ts +0 -9
  83. package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +0 -100
  84. package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.d.ts +0 -8
  85. package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +0 -57
@@ -39,7 +39,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
39
39
  export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
40
40
  export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
41
41
  export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
42
- 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_approval_reorder" | "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_approval_reorder" | "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" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "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" | "snooze_task" | "unsnooze_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" | "create_transfer_entry" | "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" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed";
42
+ 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_approval_reorder" | "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_approval_reorder" | "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" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "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" | "snooze_task" | "unsnooze_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" | "create_transfer_entry" | "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" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
43
43
  messageText: "notification" | "failed" | "success";
44
44
  type: "error" | "success" | "info";
45
45
  variables: {
@@ -175,13 +175,6 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
175
175
  if (searchString !== undefined) {
176
176
  draft.transactionCategorizationView[selectedTab].uiState.searchString =
177
177
  searchString;
178
- // When search is cleared, drop all sub-tab snapshots. A snapshot
179
- // captured while search was active holds filtered row IDs — restoring
180
- // it after the clear would show stale search results instead of the
181
- // full unfiltered list.
182
- if (searchString === '' && selectedTab === 'autoCategorized') {
183
- draft.autoCategorizedSubTabCache = {};
184
- }
185
178
  }
186
179
  draft.transactionCategorizationView[selectedTab].error = undefined;
187
180
  const monthYearPeriod = {
@@ -34,8 +34,6 @@ const initializeTaskToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, o
34
34
  recurringStartDate: task.recurringStartDate,
35
35
  timeSpent: task.timeSpent,
36
36
  isPrivate: task.isPrivate,
37
- taskGroupId: task.taskGroupIds[0],
38
- depth: task.depth,
39
37
  };
40
38
  const actions = [
41
39
  (0, taskDetailReducer_1.saveTaskUpdatesToLocalStore)({ taskDetailLocalData, taskId }),
@@ -3,7 +3,7 @@ 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 { removeTaskFromGroupBucket, updateTaskListOnNewTaskCreationSuccess } from '../../taskListView/taskListReducer';
6
+ import { updateTaskListOnNewTaskCreationSuccess } from '../../taskListView/taskListReducer';
7
7
  import { saveTaskDetail, saveTaskSuccessOrFailure } from '../taskDetailReducer';
8
- export type ActionType = ReturnType<typeof saveTaskDetail> | ReturnType<typeof updateTasks> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateTaskListOnNewTaskCreationSuccess> | ReturnType<typeof removeTaskFromGroupBucket> | ReturnType<typeof saveTaskSuccessOrFailure>;
8
+ export type ActionType = ReturnType<typeof saveTaskDetail> | ReturnType<typeof updateTasks> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateTaskListOnNewTaskCreationSuccess> | ReturnType<typeof saveTaskSuccessOrFailure>;
9
9
  export declare const saveTaskDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
@@ -15,46 +15,17 @@ const saveTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, oper
15
15
  const { taskId, taskGroupId } = action.payload;
16
16
  const state = state$.value;
17
17
  const isTaskListFetched = state.taskListState.fetchState === 'Completed';
18
- // On edit, prefer the locally-edited group; fall back to the entity's
19
- // current group. On create, use the taskGroupId from the action payload.
20
- const localTaskGroupId = taskId != null
21
- ? state.taskDetailState.editTaskStateById[taskId]?.taskDetailLocalData
22
- ?.taskGroupId
23
- : undefined;
24
- // groupWasCleared distinguishes "user explicitly cleared the group"
25
- // (localTaskGroupId === null → send []) from "user did not touch it"
26
- // (undefined → fall back to entity). Without this, the `??` fallback
27
- // would resurrect the stale entity value after a clear.
28
- const groupWasCleared = taskId != null && localTaskGroupId === null;
29
- const entityTaskGroupIds = taskId != null
30
- ? ((0, taskSelector_1.getTaskById)(state.taskState, taskId)?.taskGroupIds ?? [])
31
- : [];
32
- // Distinguish three save shapes:
33
- // - cleared → []
34
- // - user picked a different group locally → [localTaskGroupId]
35
- // - no local edit → entire entityTaskGroupIds (preserves multi-
36
- // group membership; without this, unrelated field edits silently
37
- // drop extra groups).
38
- const localGroupChanged = localTaskGroupId != null;
39
- const taskGroupIdsForPayload = groupWasCleared
40
- ? []
41
- : localGroupChanged
42
- ? [localTaskGroupId]
43
- : taskId != null
44
- ? entityTaskGroupIds
45
- : taskGroupId != null
46
- ? [taskGroupId]
47
- : [];
48
- // Keep `updatedTaskGroupId` (single id) for downstream list-update
49
- // dispatches that still bucket against one group at a time.
50
- const updatedTaskGroupId = taskGroupIdsForPayload[0];
51
- const payload = prepareTaskPayload(state, taskId, taskGroupIdsForPayload);
18
+ const updatedTaskGroupId = taskId == null
19
+ ? taskGroupId
20
+ : (0, taskSelector_1.getTaskById)(state.taskState, taskId)?.taskGroupIds[0];
21
+ const payload = prepareTaskPayload(state, taskId, updatedTaskGroupId);
52
22
  const saveTaskApi = taskId != null
53
23
  ? zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}`, payload)
54
24
  : zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks`, payload);
55
25
  return saveTaskApi.pipe((0, operators_1.mergeMap)((response) => {
56
26
  if ((0, responsePayload_1.isSuccessResponse)(response) &&
57
27
  response.data != null &&
28
+ updatedTaskGroupId != null &&
58
29
  response.data.tasks.length > 0) {
59
30
  const newTaskId = response.data.tasks[0].task_id;
60
31
  const actions = [
@@ -65,24 +36,7 @@ const saveTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, oper
65
36
  taskId,
66
37
  }),
67
38
  ];
68
- // Only suppress the list-insert on the live/completed tabs
69
- // when the saved task's status no longer matches the tab —
70
- // otherwise doUpdateTaskList writes the row back into the
71
- // current tab's grouping arrays even after updateTasks moved
72
- // it to Completed. Archived/snoozed/deleted are owned by
73
- // their dedicated actions and must keep the pre-PR optimistic
74
- // update path so their grouping arrays don't go stale.
75
- const savedTask = response.data.tasks[0];
76
- const savedIsCompleted = savedTask.status?.code === 'resolved';
77
- const activeTab = state.taskListState.currentTab;
78
- const isLiveOrCompletedTab = activeTab === 'live' || activeTab === 'completed';
79
- const statusMatchesActiveTab = !isLiveOrCompletedTab ||
80
- (savedIsCompleted && activeTab === 'completed') ||
81
- (!savedIsCompleted && activeTab === 'live');
82
- if (isTaskListFetched === true &&
83
- groupWasCleared === false &&
84
- updatedTaskGroupId != null &&
85
- statusMatchesActiveTab === true) {
39
+ if (isTaskListFetched === true) {
86
40
  actions.push((0, taskListReducer_1.updateTaskListOnNewTaskCreationSuccess)({
87
41
  taskGroupId: updatedTaskGroupId,
88
42
  task: response.data.tasks[0],
@@ -91,21 +45,6 @@ const saveTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, oper
91
45
  : undefined,
92
46
  }));
93
47
  }
94
- else if (isTaskListFetched === true &&
95
- groupWasCleared === true &&
96
- taskId != null) {
97
- // Group was cleared — skip the list-insert action (no
98
- // destination bucket) and explicitly drop the row from every
99
- // previously-held group so the list re-renders without the
100
- // stale entry under the old group until next refetch.
101
- const previousTask = (0, taskSelector_1.getTaskById)(state.taskState, taskId);
102
- previousTask?.taskGroupIds.forEach((previousGroupId) => {
103
- actions.push((0, taskListReducer_1.removeTaskFromGroupBucket)({
104
- taskId,
105
- taskGroupId: previousGroupId,
106
- }));
107
- });
108
- }
109
48
  return (0, rxjs_1.from)(actions);
110
49
  }
111
50
  else {
@@ -132,7 +71,7 @@ const saveTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, oper
132
71
  }))));
133
72
  }));
134
73
  exports.saveTaskDetailEpic = saveTaskDetailEpic;
135
- const prepareTaskPayload = (state, taskId, taskGroupIds) => {
74
+ const prepareTaskPayload = (state, taskId, taskGroupId) => {
136
75
  const { taskDetailState, taskState } = state;
137
76
  const syncToken = taskId != null ? ((0, taskSelector_1.getTaskById)(taskState, taskId)?.syncToken ?? '') : '';
138
77
  const sourceState = taskId != null
@@ -161,7 +100,7 @@ const prepareTaskPayload = (state, taskId, taskGroupIds) => {
161
100
  ? (localData.recurringDaysOfWeek ?? [])
162
101
  : [],
163
102
  sync_token: syncToken,
164
- task_group_ids: taskGroupIds,
103
+ task_group_ids: taskGroupId != null ? [taskGroupId] : [],
165
104
  time_spent: (0, formatMinutesToFromHHMM_1.convertHHMMStrToMinutes)(localData.timeSpent),
166
105
  group_assignees: localData.groupAssignees,
167
106
  ...(taskId == null ? { is_private: localData.isPrivate ?? false } : {}),
@@ -3,23 +3,9 @@ import { DayOfWeek, PriorityCodeType, TaskStatusCodeType, TaskType } from '../..
3
3
  import { ZeniDate } from '../../../zeniDayJS';
4
4
  import { RecurringDatePickerOptions, RecurringFrequencyType } from '../../common/recurringViewHelper';
5
5
  import { CommonHistoryView } from '../../spendManagement/commonHistoryView/commonHistory';
6
- export interface CreateSubTaskPayload {
7
- assignee: ID[];
8
- description: string;
9
- groupAssignees: ID[];
10
- name: string;
11
- parentTaskId: ID;
12
- priority: PriorityCodeType;
13
- status: TaskStatusCodeType;
14
- tagIds: ID[];
15
- timeSpent: string;
16
- dueDate?: ZeniDate;
17
- }
18
6
  export interface TaskDetailViewState {
19
7
  editTaskStateById: Record<ID, EditTaskDetail>;
20
8
  newTaskState: EditTaskDetail;
21
- subTaskCreateStatus: FetchStateAndError;
22
- subTaskListFetchStatusByParentId: Record<ID, FetchStateAndError>;
23
9
  taskHistoryById: Record<ID, CommonHistoryView>;
24
10
  }
25
11
  export interface EditTaskDetail {
@@ -47,7 +33,6 @@ export interface EditTaskLocalData {
47
33
  tagIds: ID[];
48
34
  timeSpent: string;
49
35
  type: TaskType;
50
- depth?: number;
51
36
  dueDate?: ZeniDate;
52
37
  isPrivate?: boolean;
53
38
  recurringDaysOfWeek?: DayOfWeek[];
@@ -55,7 +40,6 @@ export interface EditTaskLocalData {
55
40
  recurringStartDate?: ZeniDate;
56
41
  savedRecurringEndDate?: ZeniDate;
57
42
  savedRecurringTasksCount?: number;
58
- taskGroupId?: ID | null;
59
43
  }
60
44
  export declare const initialTaskDetailLocalData: EditTaskLocalData;
61
45
  export declare const initialTaskDetail: EditTaskDetail;
@@ -1,7 +1,7 @@
1
1
  import { FetchState, ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniAPIStatus } from '../../../responsePayload';
3
3
  import { HistoricEventPayload } from '../../spendManagement/commonHistoryView/commonHistoryPayload';
4
- import { CreateSubTaskPayload, EditTaskLocalData, TaskDetailViewState } from './taskDetail';
4
+ import { EditTaskLocalData, TaskDetailViewState } from './taskDetail';
5
5
  export declare const initialState: TaskDetailViewState;
6
6
  export declare const fetchTaskDetailPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: boolean, taskId?: string | undefined], {
7
7
  cacheOverride: boolean;
@@ -34,19 +34,7 @@ export declare const fetchTaskDetailPage: import("@reduxjs/toolkit").ActionCreat
34
34
  error?: ZeniAPIStatus;
35
35
  newTaskId?: ID;
36
36
  taskId?: ID;
37
- }, "taskDetailView/saveTaskSuccessOrFailure">, createSubTask: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: CreateSubTaskPayload], CreateSubTaskPayload, "taskDetailView/createSubTask", never, never>, createSubTaskSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
38
- fetchState: FetchState;
39
- error?: ZeniAPIStatus;
40
- newTaskId?: ID;
41
- }, "taskDetailView/createSubTaskSuccessOrFailure">, resetSubTaskCreateStatus: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"taskDetailView/resetSubTaskCreateStatus">, fetchSubTasks: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[parentTaskId: string], {
42
- parentTaskId: string;
43
- }, "taskDetailView/fetchSubTasks", never, never>, updateSubTasks: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
44
- parentTaskId: ID;
45
- }, "taskDetailView/updateSubTasks">, updateSubTasksFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
46
- fetchState: FetchState;
47
- parentTaskId: ID;
48
- error?: ZeniAPIStatus;
49
- }, "taskDetailView/updateSubTasksFetchStatus">, deleteTask: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskId?: string | undefined], {
37
+ }, "taskDetailView/saveTaskSuccessOrFailure">, deleteTask: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskId?: string | undefined], {
50
38
  taskId: string | undefined;
51
39
  }, "taskDetailView/deleteTask", never, never>, removeTaskDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "taskDetailView/removeTaskDetail">, deleteTaskSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
52
40
  fetchState: FetchState;
@@ -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.unsnoozeTask = exports.snoozeTaskSuccessOrFailure = exports.snoozeTask = exports.deleteTaskSuccessOrFailure = exports.removeTaskDetail = exports.deleteTask = exports.updateSubTasksFetchStatus = exports.updateSubTasks = exports.fetchSubTasks = exports.resetSubTaskCreateStatus = exports.createSubTaskSuccessOrFailure = exports.createSubTask = exports.saveTaskSuccessOrFailure = exports.archiveTaskSuccessOrFailure = exports.archiveTask = exports.saveTaskDetail = exports.discardTaskUpdatesInLocalStore = exports.saveTaskUpdatesToLocalStore = exports.updateEditTaskFetchStatus = exports.initializeTaskToLocalStore = exports.fetchTaskDetail = exports.fetchTaskDetailPage = exports.initialState = void 0;
7
+ exports.updateDeletedTagToLocalStore = exports.updateCreatedTagToLocalStore = exports.clearTaskDetail = exports.updateTaskHistoryFetchStatus = exports.updateTaskHistory = exports.fetchTaskHistory = exports.unsnoozeTask = exports.snoozeTaskSuccessOrFailure = exports.snoozeTask = 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");
@@ -13,11 +13,6 @@ const taskDetail_1 = require("./taskDetail");
13
13
  exports.initialState = {
14
14
  newTaskState: taskDetail_1.initialTaskDetail,
15
15
  editTaskStateById: {},
16
- subTaskCreateStatus: {
17
- fetchState: 'Not-Started',
18
- error: undefined,
19
- },
20
- subTaskListFetchStatusByParentId: {},
21
16
  taskHistoryById: {},
22
17
  };
23
18
  const taskDetailView = (0, toolkit_1.createSlice)({
@@ -62,7 +57,7 @@ const taskDetailView = (0, toolkit_1.createSlice)({
62
57
  updateEditTaskFetchStatus(draft, action) {
63
58
  const { taskId, fetchState, error } = action.payload;
64
59
  draft.editTaskStateById[taskId] = {
65
- ...(draft.editTaskStateById[taskId] ?? taskDetail_1.initialTaskDetail),
60
+ ...draft.editTaskStateById[taskId],
66
61
  fetchTaskStatus: {
67
62
  fetchState,
68
63
  error: fetchState === 'Error' ? error : undefined,
@@ -330,59 +325,10 @@ const taskDetailView = (0, toolkit_1.createSlice)({
330
325
  error,
331
326
  };
332
327
  },
333
- createSubTask: {
334
- reducer(draft) {
335
- draft.subTaskCreateStatus = {
336
- fetchState: 'In-Progress',
337
- error: undefined,
338
- };
339
- },
340
- prepare(payload) {
341
- return { payload };
342
- },
343
- },
344
- createSubTaskSuccessOrFailure(draft, action) {
345
- const { fetchState, error } = action.payload;
346
- draft.subTaskCreateStatus = {
347
- fetchState,
348
- error,
349
- };
350
- },
351
- resetSubTaskCreateStatus(draft) {
352
- draft.subTaskCreateStatus = {
353
- ...exports.initialState.subTaskCreateStatus,
354
- };
355
- },
356
- fetchSubTasks: {
357
- reducer(draft, action) {
358
- const { parentTaskId } = action.payload;
359
- draft.subTaskListFetchStatusByParentId[parentTaskId] = {
360
- fetchState: 'In-Progress',
361
- error: undefined,
362
- };
363
- },
364
- prepare(parentTaskId) {
365
- return { payload: { parentTaskId } };
366
- },
367
- },
368
- updateSubTasks(draft, action) {
369
- const { parentTaskId } = action.payload;
370
- draft.subTaskListFetchStatusByParentId[parentTaskId] = {
371
- fetchState: 'Completed',
372
- error: undefined,
373
- };
374
- },
375
- updateSubTasksFetchStatus(draft, action) {
376
- const { parentTaskId, fetchState, error } = action.payload;
377
- draft.subTaskListFetchStatusByParentId[parentTaskId] = {
378
- fetchState,
379
- error,
380
- };
381
- },
382
328
  clearTaskDetail(draft) {
383
329
  Object.assign(draft, exports.initialState);
384
330
  },
385
331
  },
386
332
  });
387
- _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.createSubTask = _a.createSubTask, exports.createSubTaskSuccessOrFailure = _a.createSubTaskSuccessOrFailure, exports.resetSubTaskCreateStatus = _a.resetSubTaskCreateStatus, exports.fetchSubTasks = _a.fetchSubTasks, exports.updateSubTasks = _a.updateSubTasks, exports.updateSubTasksFetchStatus = _a.updateSubTasksFetchStatus, exports.deleteTask = _a.deleteTask, exports.removeTaskDetail = _a.removeTaskDetail, exports.deleteTaskSuccessOrFailure = _a.deleteTaskSuccessOrFailure, exports.snoozeTask = _a.snoozeTask, exports.snoozeTaskSuccessOrFailure = _a.snoozeTaskSuccessOrFailure, exports.unsnoozeTask = _a.unsnoozeTask, exports.fetchTaskHistory = _a.fetchTaskHistory, exports.updateTaskHistory = _a.updateTaskHistory, exports.updateTaskHistoryFetchStatus = _a.updateTaskHistoryFetchStatus, exports.clearTaskDetail = _a.clearTaskDetail, exports.updateCreatedTagToLocalStore = _a.updateCreatedTagToLocalStore, exports.updateDeletedTagToLocalStore = _a.updateDeletedTagToLocalStore;
333
+ _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.snoozeTask = _a.snoozeTask, exports.snoozeTaskSuccessOrFailure = _a.snoozeTaskSuccessOrFailure, exports.unsnoozeTask = _a.unsnoozeTask, exports.fetchTaskHistory = _a.fetchTaskHistory, exports.updateTaskHistory = _a.updateTaskHistory, exports.updateTaskHistoryFetchStatus = _a.updateTaskHistoryFetchStatus, exports.clearTaskDetail = _a.clearTaskDetail, exports.updateCreatedTagToLocalStore = _a.updateCreatedTagToLocalStore, exports.updateDeletedTagToLocalStore = _a.updateDeletedTagToLocalStore;
388
334
  exports.default = taskDetailView.reducer;
@@ -2,7 +2,7 @@ import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
2
  import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
3
3
  import { Class } from '../../../entity/class/classState';
4
4
  import { File } from '../../../entity/file/fileState';
5
- import { Task, TaskPriority, TaskStatus } from '../../../entity/task/taskState';
5
+ import { TaskPriority, TaskStatus } from '../../../entity/task/taskState';
6
6
  import { RootState } from '../../../reducer';
7
7
  import { ZeniDate } from '../../../zeniDayJS';
8
8
  import { UserAndRole } from '../../companyView/types/userAndRole';
@@ -14,7 +14,6 @@ export interface TaskDetailSelectorView extends SelectorView {
14
14
  deleteFileStatusById: Record<ID, FetchStateAndError | undefined>;
15
15
  files: File[];
16
16
  showTaskDetailFormFooter: boolean;
17
- subtasks: Task[];
18
17
  taskDetailView: EditTaskDetail;
19
18
  taskHistory: HistoricEvent[];
20
19
  updateFileStatusById: Record<ID, FetchStateAndError | undefined>;
@@ -33,13 +33,8 @@ const getTaskDetail = (state, taskId) => {
33
33
  let recurringSourceTaskId = undefined;
34
34
  let snoozedUntil = undefined;
35
35
  let taskGroupId = undefined;
36
- let subtasks = [];
37
36
  if (taskId != null && sourceTaskDetail != null) {
38
37
  const taskEntity = (0, taskSelector_1.getTaskById)(taskState, taskId);
39
- subtasks =
40
- taskEntity != null
41
- ? (0, taskSelector_1.getTasksByIds)(taskState, taskEntity.subTasksIds)
42
- : [];
43
38
  const fileIdsInEntity = taskEntity?.fileIds ?? [];
44
39
  if (taskEntity != null) {
45
40
  createdByUser = (0, userAndRole_1.getUserAndUserRole)(userState, userRoleState, addressState, taskEntity.createdBy);
@@ -49,37 +44,26 @@ const getTaskDetail = (state, taskId) => {
49
44
  snoozedUntil = taskEntity.snoozedUntil;
50
45
  taskGroupId = taskEntity.taskGroupIds[0];
51
46
  }
52
- // Treat "no entry" as Completed so it doesn't block the combined
53
- // fetch state. The Not-Started default would pin the detail page
54
- // below Completed forever before the first fetchSubTasks dispatches.
55
- const completedSubTaskStatus = {
56
- fetchState: 'Completed',
57
- error: undefined,
58
- };
59
- const subTaskStatus = taskDetailState.subTaskListFetchStatusByParentId[taskId] ??
60
- completedSubTaskStatus;
61
47
  if (fileIdsInEntity.length > 0) {
62
- fetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
48
+ fetchStatus = (0, reduceFetchState_1.reduceFetchState)([
63
49
  fileViewState.fetchFilesStatus,
64
50
  sourceTaskDetail.fetchTaskStatus,
65
51
  userList,
66
52
  classListState,
67
- subTaskStatus,
68
53
  ]);
69
54
  }
70
55
  else {
71
- fetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
56
+ fetchStatus = (0, reduceFetchState_1.reduceFetchState)([
72
57
  sourceTaskDetail.fetchTaskStatus,
73
58
  userList,
74
59
  classListState,
75
- subTaskStatus,
76
60
  ]);
77
61
  }
78
62
  showTaskDetailFormFooter = showFormFooter(sourceTaskDetail.taskDetailLocalData, taskEntity);
79
63
  taskHistory = taskDetailState.taskHistoryById[taskId]?.historicEvents ?? [];
80
64
  }
81
65
  else if (taskId == null) {
82
- fetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([userList, classListState]);
66
+ fetchStatus = (0, reduceFetchState_1.reduceFetchState)([userList, classListState]);
83
67
  }
84
68
  const { classIds } = classListState;
85
69
  const allAccountingClasses = (0, classSelector_1.getClassesByIds)(classState, {
@@ -112,7 +96,6 @@ const getTaskDetail = (state, taskId) => {
112
96
  showTaskDetailFormFooter,
113
97
  snoozedUntil,
114
98
  taskGroupId,
115
- subtasks,
116
99
  };
117
100
  };
118
101
  exports.getTaskDetail = getTaskDetail;
@@ -161,16 +144,13 @@ exports.allTaskPriority = [
161
144
  },
162
145
  ];
163
146
  const showFormFooter = (taskDetailLocalData, taskDetailInStore) => {
164
- if (taskDetailInStore == null) {
165
- return false;
166
- }
167
- if (taskDetailLocalData.name !== taskDetailInStore.name ||
147
+ if (taskDetailLocalData.name !== taskDetailInStore?.name ||
168
148
  taskDetailLocalData.description !== taskDetailInStore.description ||
169
149
  taskDetailLocalData.priority !== taskDetailInStore.priority.code ||
170
150
  taskDetailLocalData.status !== taskDetailInStore.status.code ||
171
151
  !(0, isEqual_1.default)(taskDetailInStore.tagIds, taskDetailLocalData.tagIds) ||
172
- !(0, isEqual_1.default)(taskDetailLocalData.assignee, taskDetailInStore.assignees ?? []) ||
173
- !(0, isEqual_1.default)(taskDetailLocalData.groupAssignees, taskDetailInStore.groupAssignees ?? []) ||
152
+ !(0, isEqual_1.default)(taskDetailLocalData.assignee, taskDetailInStore?.assignees ?? []) ||
153
+ !(0, isEqual_1.default)(taskDetailLocalData.groupAssignees, taskDetailInStore?.groupAssignees ?? []) ||
174
154
  !(0, isEqual_1.default)(taskDetailLocalData.fileIds, taskDetailInStore.fileIds ?? []) ||
175
155
  !(0, isEqual_1.default)(taskDetailLocalData.dueDate, taskDetailInStore.dueDate) ||
176
156
  !(0, isEqual_1.default)(taskDetailLocalData.type, taskDetailInStore.type) ||
@@ -178,10 +158,7 @@ const showFormFooter = (taskDetailLocalData, taskDetailInStore) => {
178
158
  !(0, isEqual_1.default)(taskDetailLocalData.recurringFrequency, taskDetailInStore.recurringFrequency) ||
179
159
  !(0, isEqual_1.default)(taskDetailLocalData.recurringDaysOfWeek, taskDetailInStore.recurringDaysOfWeek) ||
180
160
  !(0, isEqual_1.default)(taskDetailLocalData.recurringStartDate, taskDetailInStore.recurringStartDate) ||
181
- !(0, isEqual_1.default)(taskDetailLocalData.timeSpent, taskDetailInStore.timeSpent) ||
182
- !(0, isEqual_1.default)(taskDetailLocalData.taskGroupId, taskDetailInStore.taskGroupIds.length > 0
183
- ? taskDetailInStore.taskGroupIds[0]
184
- : undefined)) {
161
+ !(0, isEqual_1.default)(taskDetailLocalData.timeSpent, taskDetailInStore.timeSpent)) {
185
162
  return true;
186
163
  }
187
164
  return false;
@@ -12,17 +12,15 @@ const fetchTaskListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, oper
12
12
  .getJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks?query=${encodeURIComponent(`{"task_type": "all"}`)}`)
13
13
  .pipe((0, operators_1.mergeMap)((response) => {
14
14
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
15
- const { tasks, deleted, archived, snoozed, completed } = response.data;
15
+ const { tasks, deleted, archived, snoozed } = response.data;
16
16
  const allTasks = [
17
17
  ...tasks,
18
- ...(completed ?? []),
19
18
  ...(deleted ?? []),
20
19
  ...(archived ?? []),
21
20
  ...(snoozed ?? []),
22
21
  ];
23
22
  return (0, rxjs_1.of)((0, taskReducer_1.updateTasks)(allTasks), (0, taskListReducer_1.updateTaskList)({
24
23
  data: tasks,
25
- completed: completed ?? [],
26
24
  deleted: deleted ?? [],
27
25
  archived: archived ?? [],
28
26
  snoozed: snoozed ?? [],
@@ -3,7 +3,7 @@ import { PriorityCodeType, TaskStatusCodeType } from '../../../entity/task/taskS
3
3
  import { ZeniDate } from '../../../zeniDayJS';
4
4
  import { SpendManagementUIState } from '../../spendManagement/billPay/billList/billListState';
5
5
  import { CategoryCombinationOperator, FilterCategoryType } from '../../spendManagement/spendManagementFilterHelpers';
6
- export declare const ALL_TASK_LIST_TABS: readonly ["live", "completed", "archived", "deleted", "snoozed"];
6
+ export declare const ALL_TASK_LIST_TABS: readonly ["live", "archived", "deleted", "snoozed"];
7
7
  export type TaskListTab = (typeof ALL_TASK_LIST_TABS)[number];
8
8
  export interface TaskListTabData {
9
9
  taskIds: ID[];
@@ -4,7 +4,6 @@ exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = ex
4
4
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
5
  exports.ALL_TASK_LIST_TABS = [
6
6
  'live',
7
- 'completed',
8
7
  'archived',
9
8
  'deleted',
10
9
  'snoozed',
@@ -3,10 +3,6 @@ import { ZeniAPIResponse } from '../../../responsePayload';
3
3
  interface FetchTaskListPayload {
4
4
  tasks: TaskPayload[];
5
5
  archived?: TaskPayload[];
6
- /** Tasks whose status is "done" or "resolved". Returned as a separate
7
- * bucket so the "Completed" tab can show them without duplicating
8
- * them under Active. */
9
- completed?: TaskPayload[];
10
6
  deleted?: TaskPayload[];
11
7
  snoozed?: TaskPayload[];
12
8
  }
@@ -12,10 +12,9 @@ export declare const fetchTaskListPage: import("@reduxjs/toolkit").ActionCreator
12
12
  }, "taskList/fetchTaskListPage", never, never>, fetchTaskList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"taskList/fetchTaskList">, updateTaskList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
13
13
  data: TaskPayload[];
14
14
  archived?: TaskPayload[];
15
- completed?: TaskPayload[];
16
15
  deleted?: TaskPayload[];
17
16
  snoozed?: TaskPayload[];
18
- }, "taskList/updateTaskList">, updateTaskListTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"completed" | "deleted" | "archived" | "live" | "snoozed", "taskList/updateTaskListTab">, updateTaskListFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
17
+ }, "taskList/updateTaskList">, updateTaskListTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"deleted" | "archived" | "live" | "snoozed", "taskList/updateTaskListTab">, updateTaskListFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
19
18
  fetchState: FetchState;
20
19
  error?: ZeniAPIStatus;
21
20
  }, "taskList/updateTaskListFetchStatus">, updateTaskListSearchText: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -59,9 +58,6 @@ export declare const fetchTaskListPage: import("@reduxjs/toolkit").ActionCreator
59
58
  error: ZeniAPIStatus;
60
59
  }, "taskList/updateTasksListOnUpdateTaskFailure">, updateTaskListOnCreateTaskFromTemplateSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
61
60
  tasks: TaskPayload[];
62
- }, "taskList/updateTaskListOnCreateTaskFromTemplateSuccess">, removeTaskFromList: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "taskList/removeTaskFromList">, removeTaskFromGroupBucket: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
63
- taskGroupId: ID;
64
- taskId: ID;
65
- }, "taskList/removeTaskFromGroupBucket">, clearTaskList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"taskList/clearTaskList">;
61
+ }, "taskList/updateTaskListOnCreateTaskFromTemplateSuccess">, removeTaskFromList: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "taskList/removeTaskFromList">, clearTaskList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"taskList/clearTaskList">;
66
62
  declare const _default: import("redux").Reducer<TaskListState>;
67
63
  export default _default;