@zeniai/client-epic-state 5.2.71 → 5.2.72
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/aiCfo/aiCfoState.d.ts +2 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/invoicing/{product/productPayload.d.ts → invoicingCatalog/invoicingCatalogPayload.d.ts} +44 -6
- package/lib/entity/invoicing/{product/productPayload.js → invoicingCatalog/invoicingCatalogPayload.js} +50 -6
- package/lib/entity/invoicing/invoicingCatalog/invoicingCatalogReducer.d.ts +12 -0
- package/lib/entity/invoicing/{plan/planReducer.js → invoicingCatalog/invoicingCatalogReducer.js} +20 -21
- package/lib/entity/invoicing/{plan/planSelector.d.ts → invoicingCatalog/invoicingCatalogSelector.d.ts} +5 -6
- package/lib/entity/invoicing/{plan/planSelector.js → invoicingCatalog/invoicingCatalogSelector.js} +12 -12
- package/lib/entity/invoicing/{product/productState.d.ts → invoicingCatalog/invoicingCatalogState.d.ts} +42 -6
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +4 -4
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +10 -2
- package/lib/epic.d.ts +3 -2
- package/lib/epic.js +3 -1
- package/lib/esm/entity/invoicing/{product/productPayload.js → invoicingCatalog/invoicingCatalogPayload.js} +46 -3
- package/lib/esm/entity/invoicing/{plan/planReducer.js → invoicingCatalog/invoicingCatalogReducer.js} +19 -20
- package/lib/esm/entity/invoicing/{plan/planSelector.js → invoicingCatalog/invoicingCatalogSelector.js} +8 -8
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +10 -2
- package/lib/esm/epic.js +3 -1
- package/lib/esm/index.js +6 -9
- package/lib/esm/reducer.js +4 -7
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -1
- package/lib/esm/view/invoicing/createInvoice/createInvoiceEpic.js +9 -1
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +5 -3
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.js +2 -2
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.js +2 -2
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogProductActionEpic.js +4 -4
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +3 -7
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +2 -2
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js +5 -1
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +5 -1
- package/lib/esm/view/invoicing/invoiceList/invoiceListReducer.js +8 -1
- package/lib/esm/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogPlanListEpic.js +2 -2
- package/lib/esm/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.js +2 -2
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +55 -22
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewState.js +1 -20
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +31 -11
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +2 -1
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/resetKycKybEpic.js +37 -0
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +21 -1
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +2 -1
- package/lib/index.d.ts +11 -15
- package/lib/index.js +39 -45
- package/lib/reducer.d.ts +1 -2
- package/lib/reducer.js +4 -7
- package/lib/rootStateTypes.d.ts +3 -5
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -1
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.d.ts +3 -2
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.js +8 -0
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +2 -2
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +8 -9
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +5 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.d.ts +3 -4
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogProductActionEpic.d.ts +2 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogProductActionEpic.js +4 -4
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts +2 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +3 -7
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.d.ts +3 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js +6 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.d.ts +3 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +5 -1
- package/lib/view/invoicing/invoiceList/invoiceListReducer.d.ts +3 -1
- package/lib/view/invoicing/invoiceList/invoiceListReducer.js +9 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogListPageEpic.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogPlanListEpic.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogPlanListEpic.js +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.js +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewPayload.d.ts +3 -3
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.d.ts +33 -15
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +57 -23
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewState.d.ts +0 -15
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewState.js +0 -22
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +1 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +1 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +31 -11
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +3 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +2 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +4 -0
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +5 -5
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +2 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/resetKycKybEpic.d.ts +8 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/resetKycKybEpic.js +41 -0
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +22 -2
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +1 -0
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -1
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -0
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +2 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewReducer.d.ts +2 -2
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +5 -5
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +2 -2
- package/package.json +1 -1
- package/lib/entity/invoicing/plan/planPayload.d.ts +0 -40
- package/lib/entity/invoicing/plan/planPayload.js +0 -51
- package/lib/entity/invoicing/plan/planReducer.d.ts +0 -14
- package/lib/entity/invoicing/plan/planState.d.ts +0 -43
- package/lib/entity/invoicing/product/productReducer.d.ts +0 -9
- package/lib/entity/invoicing/product/productReducer.js +0 -50
- package/lib/entity/invoicing/product/productSelector.d.ts +0 -4
- package/lib/entity/invoicing/product/productSelector.js +0 -17
- package/lib/entity/invoicing/product/productState.js +0 -2
- package/lib/esm/entity/invoicing/plan/planPayload.js +0 -47
- package/lib/esm/entity/invoicing/product/productReducer.js +0 -43
- package/lib/esm/entity/invoicing/product/productSelector.js +0 -10
- package/lib/esm/entity/invoicing/product/productState.js +0 -1
- /package/lib/entity/invoicing/{plan/planState.js → invoicingCatalog/invoicingCatalogState.js} +0 -0
- /package/lib/esm/entity/invoicing/{plan/planState.js → invoicingCatalog/invoicingCatalogState.js} +0 -0
package/lib/rootStateTypes.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AccountState } from './entity/account/accountState';
|
|
2
2
|
import { AccountGroupState } from './entity/accountGroup/accountGroupState';
|
|
3
3
|
import { AccountReconState } from './entity/accountRecon/accountReconState';
|
|
4
|
+
import { ActualMatchingState } from './entity/actualMatching/actualMatchingState';
|
|
4
5
|
import { AddressState } from './entity/address/addressState';
|
|
5
6
|
import { AiAccountantCustomerState } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
|
|
6
7
|
import { AiCfoState } from './entity/aiCfo/aiCfoState';
|
|
@@ -39,9 +40,7 @@ import { InvoiceState as InvoicingInvoiceState } from './entity/invoicing/invoic
|
|
|
39
40
|
import { InvoicingCustomerState } from './entity/invoicing/invoicingCustomer/invoicingCustomerState';
|
|
40
41
|
import { InvoicingSubscriptionState } from './entity/invoicing/invoicingSubscription/invoicingSubscriptionState';
|
|
41
42
|
import { InvoicingTransactionState } from './entity/invoicing/invoicingTransaction/invoicingTransactionState';
|
|
42
|
-
import {
|
|
43
|
-
import { InvoicingProductState } from './entity/invoicing/product/productState';
|
|
44
|
-
import { ActualMatchingState } from './entity/actualMatching/actualMatchingState';
|
|
43
|
+
import { InvoicingCatalogState } from './entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
45
44
|
import { JESchedulesState } from './entity/jeSchedules/jeSchedulesState';
|
|
46
45
|
import { MerchantState } from './entity/merchant/merchant';
|
|
47
46
|
import { MonthEndCloseChecksState } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
@@ -306,13 +305,12 @@ export type EntitiesState = {
|
|
|
306
305
|
forecastState: ForecastState;
|
|
307
306
|
globalMerchantState: GlobalMerchantState;
|
|
308
307
|
insightState: InsightState;
|
|
308
|
+
invoicingCatalogState: InvoicingCatalogState;
|
|
309
309
|
invoicingCouponState: InvoicingCouponState;
|
|
310
310
|
invoicingCreditNoteState: InvoicingCreditNoteState;
|
|
311
311
|
invoicingCustomerState: InvoicingCustomerState;
|
|
312
312
|
invoicingDunningCaseState: InvoicingDunningCaseState;
|
|
313
313
|
invoicingInvoiceState: InvoicingInvoiceState;
|
|
314
|
-
invoicingPlanState: InvoicingPlanState;
|
|
315
|
-
invoicingProductState: InvoicingProductState;
|
|
316
314
|
invoicingSubscriptionState: InvoicingSubscriptionState;
|
|
317
315
|
invoicingTransactionState: InvoicingTransactionState;
|
|
318
316
|
jeSchedulesState: JESchedulesState;
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -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" | "recommendation_feedback" | "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" | "actual_matching_match_and_reverse" | "actual_matching_undo_reversal" | "actual_matching_ignore_suggestion" | "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" | "revert_schedule" | "ignore_accrual" | "revert_accrual" | "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" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "confirm_statement_mapping" | "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" | "accounting_projects_qbo_reconnect_failed" | "product_services_update" | "qbo_realm_id_update" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed" | "invoicing_data_import_download";
|
|
42
|
+
messageSection: "common" | "recommendation_feedback" | "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" | "actual_matching_match_and_reverse" | "actual_matching_undo_reversal" | "actual_matching_ignore_suggestion" | "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" | "revert_schedule" | "ignore_accrual" | "revert_accrual" | "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" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "confirm_statement_mapping" | "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" | "accounting_projects_qbo_reconnect_failed" | "product_services_update" | "qbo_realm_id_update" | "kyc_kyb_reset" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed" | "invoicing_data_import_download";
|
|
43
43
|
messageText: "notification" | "failed" | "success";
|
|
44
44
|
type: "error" | "success" | "info";
|
|
45
45
|
variables: {
|
|
@@ -312,7 +312,8 @@ const buildLineItemById = (transaction, recommendations) => {
|
|
|
312
312
|
isClassMiscategorized: false,
|
|
313
313
|
};
|
|
314
314
|
}
|
|
315
|
-
if (line.type === 'transaction_info_line'
|
|
315
|
+
if (line.type === 'transaction_info_line' ||
|
|
316
|
+
line.type === 'transaction_line_base') {
|
|
316
317
|
const infoRecord = line;
|
|
317
318
|
lineItemData[line.id] = {
|
|
318
319
|
...infoRecord,
|
|
@@ -16,9 +16,9 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
|
|
|
16
16
|
localData: NewOneTimeAccrualLocalData;
|
|
17
17
|
}, "expenseAutomationJESchedulesView/createOneTimeAccrual", never, never>, createOneTimeAccrualFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
18
18
|
status: ZeniAPIStatus;
|
|
19
|
-
}, "expenseAutomationJESchedulesView/createOneTimeAccrualFailure">, createOneTimeAccrualSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/createOneTimeAccrualSuccess">, ignoreOneTimeAccrual: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accrualId: string, reason: "
|
|
19
|
+
}, "expenseAutomationJESchedulesView/createOneTimeAccrualFailure">, createOneTimeAccrualSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/createOneTimeAccrualSuccess">, ignoreOneTimeAccrual: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accrualId: string, reason: "no_activity" | "paused" | "too_small" | "need_invoice" | "other_ignore", note?: string | undefined], {
|
|
20
20
|
accrualId: string;
|
|
21
|
-
reason: "
|
|
21
|
+
reason: "no_activity" | "paused" | "too_small" | "need_invoice" | "other_ignore";
|
|
22
22
|
note: string | undefined;
|
|
23
23
|
}, "expenseAutomationJESchedulesView/ignoreOneTimeAccrual", never, never>, oneTimeAccrualActionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
24
24
|
accrualId: ID;
|
|
@@ -5,7 +5,8 @@ import { updateInvoices } from '../../../entity/invoicing/invoice/invoiceReducer
|
|
|
5
5
|
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
6
6
|
import { RootState } from '../../../rootStateTypes';
|
|
7
7
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
8
|
-
import {
|
|
8
|
+
import { invalidateInvoicingCustomerDetail } from '../editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer';
|
|
9
|
+
import { addInvoiceToList, invalidateInvoiceListForCustomer } from '../invoiceList/invoiceListReducer';
|
|
9
10
|
import { createInvoice, createInvoiceFailure, createInvoiceSuccess } from './createInvoiceReducer';
|
|
10
|
-
export type ActionType = ReturnType<typeof createInvoice> | ReturnType<typeof createInvoiceSuccess> | ReturnType<typeof createInvoiceFailure> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateInvoices> | ReturnType<typeof addInvoiceToList> | ReturnType<typeof openSnackbar>;
|
|
11
|
+
export type ActionType = ReturnType<typeof createInvoice> | ReturnType<typeof createInvoiceSuccess> | ReturnType<typeof createInvoiceFailure> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateInvoices> | ReturnType<typeof addInvoiceToList> | ReturnType<typeof invalidateInvoicingCustomerDetail> | ReturnType<typeof invalidateInvoiceListForCustomer> | ReturnType<typeof openSnackbar>;
|
|
11
12
|
export declare const createInvoiceEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -9,6 +9,7 @@ const invoiceReducer_1 = require("../../../entity/invoicing/invoice/invoiceReduc
|
|
|
9
9
|
const snackbarApiError_1 = require("../../../entity/snackbar/snackbarApiError");
|
|
10
10
|
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
11
11
|
const responsePayload_1 = require("../../../responsePayload");
|
|
12
|
+
const editInvoicingCustomerDetailViewReducer_1 = require("../editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer");
|
|
12
13
|
const invoiceListReducer_1 = require("../invoiceList/invoiceListReducer");
|
|
13
14
|
const createInvoiceReducer_1 = require("./createInvoiceReducer");
|
|
14
15
|
const createInvoiceEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(createInvoiceReducer_1.createInvoice.match), (0, operators_1.mergeMap)((action) => {
|
|
@@ -26,6 +27,13 @@ const createInvoiceEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, oper
|
|
|
26
27
|
id: response.data.id,
|
|
27
28
|
status: response.data.status,
|
|
28
29
|
}),
|
|
30
|
+
// The customer's page caches their invoices and totals.
|
|
31
|
+
(0, editInvoicingCustomerDetailViewReducer_1.invalidateInvoicingCustomerDetail)({
|
|
32
|
+
id: response.data.customer_id,
|
|
33
|
+
}),
|
|
34
|
+
(0, invoiceListReducer_1.invalidateInvoiceListForCustomer)({
|
|
35
|
+
customerId: response.data.customer_id,
|
|
36
|
+
}),
|
|
29
37
|
(0, createInvoiceReducer_1.createInvoiceSuccess)({ invoiceId: response.data.id }),
|
|
30
38
|
(0, snackbarReducer_1.openSnackbar)({
|
|
31
39
|
messageSection: 'invoicing_invoice_saved',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { Address } from '../../../entity/address/addressState';
|
|
4
|
+
import { InvoicingCatalogPricePoint } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
4
5
|
import { InvoicingFieldHelpByCode, InvoicingSettingsPayload } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
5
|
-
import { InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
6
6
|
import { RootState } from '../../../rootStateTypes';
|
|
7
7
|
import { InvoicingCreateInvoiceFormLocalData } from './createInvoiceState';
|
|
8
8
|
/**
|
|
@@ -38,7 +38,7 @@ export interface CreateInvoiceFormView extends SelectorView {
|
|
|
38
38
|
fieldHelp: InvoicingFieldHelpByCode;
|
|
39
39
|
localData: InvoicingCreateInvoiceFormLocalData;
|
|
40
40
|
planNames: InvoicingPlanNameOption[];
|
|
41
|
-
products:
|
|
41
|
+
products: InvoicingCatalogPricePoint[];
|
|
42
42
|
savedInvoiceId?: ID;
|
|
43
43
|
settings?: InvoicingSettingsPayload;
|
|
44
44
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCreateInvoiceFormView = void 0;
|
|
4
4
|
const addressSelector_1 = require("../../../entity/address/addressSelector");
|
|
5
|
-
const
|
|
5
|
+
const invoicingCatalogSelector_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogSelector");
|
|
6
6
|
const invoicingCatalogListViewSelector_1 = require("../invoicingCatalogListView/invoicingCatalogListViewSelector");
|
|
7
7
|
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
8
8
|
const invoicingCustomerListViewSelector_1 = require("../invoicingCustomerListView/invoicingCustomerListViewSelector");
|
|
@@ -31,7 +31,7 @@ const hasPerUnitRate = (pricingModel) => pricingModel == null ||
|
|
|
31
31
|
* `undefined` when there is no safe per-unit rate to prefill.
|
|
32
32
|
*/
|
|
33
33
|
const planNamePrefillPrice = (pricePoint) => hasPerUnitRate(pricePoint.pricingModel)
|
|
34
|
-
? (0,
|
|
34
|
+
? (0, invoicingCatalogSelector_1.invoicingPricePointDisplayAmount)(pricePoint)?.amount
|
|
35
35
|
: undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Display name for a customer option: company, else the full name, else the
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
2
2
|
import { ClassBase } from '../../../entity/class/classState';
|
|
3
|
-
import {
|
|
4
|
-
import { InvoicingAccountingDetailPayload, InvoicingProductPayload } from '../../../entity/invoicing/product/productPayload';
|
|
3
|
+
import { InvoicingAccountingDetailPayload, InvoicingCatalogItemPayload, InvoicingCatalogPricePointPayload } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogPayload';
|
|
5
4
|
import { ZeniAPIResponse } from '../../../responsePayload';
|
|
6
5
|
import { InvoicingCatalogItemFormLocalData } from './editInvoicingCatalogItemDetailViewState';
|
|
7
|
-
export type SaveInvoicingCatalogItemResponse = ZeniAPIResponse<
|
|
6
|
+
export type SaveInvoicingCatalogItemResponse = ZeniAPIResponse<InvoicingCatalogItemPayload>;
|
|
8
7
|
/**
|
|
9
|
-
* The price-point half of a save body. `
|
|
8
|
+
* The price-point half of a save body. `InvoicingCatalogPricePointPayload` is the shape
|
|
10
9
|
* the service returns; a save differs in that a field is cleared by sending an
|
|
11
10
|
* explicit `null`, since an absent key reads as "leave it alone".
|
|
12
11
|
*/
|
|
13
|
-
export type InvoicingCatalogSubFamilySavePayload = Omit<Partial<
|
|
12
|
+
export type InvoicingCatalogSubFamilySavePayload = Omit<Partial<InvoicingCatalogPricePointPayload>, 'accounting_detail' | 'description' | 'invoice_notes'> & {
|
|
14
13
|
accounting_detail?: InvoicingAccountingDetailPayload | null;
|
|
15
14
|
description?: string | null;
|
|
16
15
|
invoice_notes?: string | null;
|
|
@@ -25,7 +24,7 @@ export type InvoicingCatalogSubFamilySavePayload = Omit<Partial<InvoicingProduct
|
|
|
25
24
|
* by its own request instead; see
|
|
26
25
|
* `localDataToCreateInvoicingCatalogProductPayloads`.
|
|
27
26
|
*/
|
|
28
|
-
export type InvoicingCatalogItemSavePayload = Omit<Partial<
|
|
27
|
+
export type InvoicingCatalogItemSavePayload = Omit<Partial<InvoicingCatalogItemPayload>, 'sub_families'> & {
|
|
29
28
|
sub_families?: InvoicingCatalogSubFamilySavePayload[];
|
|
30
29
|
};
|
|
31
30
|
/**
|
|
@@ -67,6 +66,6 @@ export declare const localDataToSaveInvoicingCatalogItemPayload: (localData: Inv
|
|
|
67
66
|
* price point that does not exist yet to clear.
|
|
68
67
|
*/
|
|
69
68
|
export declare const localDataToCreateInvoicingCatalogProductPayloads: (localData: InvoicingCatalogItemFormLocalData, itemId: string, lookup: InvoicingCatalogAccountingLookup) => InvoicingCatalogSubFamilySavePayload[];
|
|
70
|
-
export type RunInvoicingCatalogPlanActionResponse = ZeniAPIResponse<
|
|
71
|
-
export type RunInvoicingCatalogProductActionResponse = ZeniAPIResponse<
|
|
72
|
-
export type InvoicingCatalogItemDetailResponse = ZeniAPIResponse<
|
|
69
|
+
export type RunInvoicingCatalogPlanActionResponse = ZeniAPIResponse<InvoicingCatalogItemPayload>;
|
|
70
|
+
export type RunInvoicingCatalogProductActionResponse = ZeniAPIResponse<InvoicingCatalogPricePointPayload>;
|
|
71
|
+
export type InvoicingCatalogItemDetailResponse = ZeniAPIResponse<InvoicingCatalogItemPayload>;
|
|
@@ -2,8 +2,8 @@ import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accou
|
|
|
2
2
|
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
3
3
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
4
4
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
|
+
import { InvoicingCatalogItem } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
5
6
|
import { InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingFieldHelpByCode, InvoicingNamedOption, InvoicingNamedOptionsByKey } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
6
|
-
import { InvoicingPlan } from '../../../entity/invoicing/plan/planState';
|
|
7
7
|
import { RootState } from '../../../rootStateTypes';
|
|
8
8
|
import { InvoicingCatalogItemFormLocalData, InvoicingCatalogItemKind } from './editInvoicingCatalogItemDetailViewState';
|
|
9
9
|
export declare const getEditInvoicingCatalogItemDetailViewState: (state: RootState) => FetchStateAndError;
|
|
@@ -103,7 +103,7 @@ export interface InvoicingCatalogItemFormView extends SelectorView {
|
|
|
103
103
|
*/
|
|
104
104
|
catalogTierTypeOptionsByPricingModel?: InvoicingNamedOptionsByKey;
|
|
105
105
|
kind?: InvoicingCatalogItemKind;
|
|
106
|
-
plan?:
|
|
106
|
+
plan?: InvoicingCatalogItem;
|
|
107
107
|
savedItemId?: ID;
|
|
108
108
|
savedKind?: InvoicingCatalogItemKind;
|
|
109
109
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getInvoicingCatalogItemFormView = exports.getInvoicingApplicableCatalogItemOptions = exports.getSavedInvoicingCatalogItemKind = exports.getSavedInvoicingCatalogItemId = exports.getEditInvoicingCatalogItemDetailViewState = void 0;
|
|
4
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
5
|
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
6
|
-
const
|
|
6
|
+
const invoicingCatalogSelector_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogSelector");
|
|
7
7
|
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
8
8
|
const invoicingFormDraft_1 = require("../invoicingFormDraft");
|
|
9
9
|
const invoicingQboViewSelector_1 = require("../invoicingQboView/invoicingQboViewSelector");
|
|
@@ -42,7 +42,7 @@ const buildApplicableCatalogItemOptions = (plans) => {
|
|
|
42
42
|
* Kept referentially stable across unrelated dispatches; the form view filters
|
|
43
43
|
* out the item being edited (see `getInvoicingCatalogItemFormView`).
|
|
44
44
|
*/
|
|
45
|
-
exports.getInvoicingApplicableCatalogItemOptions = (0, toolkit_1.createSelector)((state) => state.
|
|
45
|
+
exports.getInvoicingApplicableCatalogItemOptions = (0, toolkit_1.createSelector)((state) => state.invoicingCatalogState, (state) => state.invoicingCatalogListViewState, (catalogState, listViewState) => buildApplicableCatalogItemOptions((0, invoicingCatalogSelector_1.getInvoicingCatalogItemsByIds)(catalogState, [
|
|
46
46
|
...listViewState.planIds,
|
|
47
47
|
...listViewState.productIds,
|
|
48
48
|
])));
|
|
@@ -67,7 +67,9 @@ const getInvoicingCatalogIncomeAccountIds = (0, toolkit_1.createSelector)([
|
|
|
67
67
|
: invoicingQboViewSelector_1.NO_INVOICING_ACCOUNT_IDS);
|
|
68
68
|
const getInvoicingCatalogItemFormView = (state, id) => {
|
|
69
69
|
const { editDraftById, error, fetchState, newItemDraft, savedItemId, savedKind, } = state.editInvoicingCatalogItemDetailViewState;
|
|
70
|
-
const plan = id != null
|
|
70
|
+
const plan = id != null
|
|
71
|
+
? (0, invoicingCatalogSelector_1.getInvoicingCatalogItemById)(state.invoicingCatalogState, id)
|
|
72
|
+
: undefined;
|
|
71
73
|
const kind = plan != null ? 'plan' : undefined;
|
|
72
74
|
// No entity fallback: the draft is the one source of form values, seeded from
|
|
73
75
|
// the record by `seedInvoicingCatalogItemFormDraftEpic` when the detail load
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { updateInvoicingCatalogItems } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer';
|
|
4
4
|
import { RootState } from '../../../rootStateTypes';
|
|
5
5
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
6
6
|
import { fetchInvoicingCatalogItemDetail, updateInvoicingCatalogItemDetail, updateInvoicingCatalogItemDetailFailure } from './editInvoicingCatalogItemDetailViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof fetchInvoicingCatalogItemDetail> | ReturnType<typeof updateInvoicingCatalogItemDetail> | ReturnType<typeof updateInvoicingCatalogItemDetailFailure> | ReturnType<typeof
|
|
7
|
+
export type ActionType = ReturnType<typeof fetchInvoicingCatalogItemDetail> | ReturnType<typeof updateInvoicingCatalogItemDetail> | ReturnType<typeof updateInvoicingCatalogItemDetailFailure> | ReturnType<typeof updateInvoicingCatalogItems>;
|
|
8
8
|
export declare const fetchInvoicingCatalogItemDetailEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fetchInvoicingCatalogItemDetailEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
6
|
+
const invoicingCatalogReducer_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const editInvoicingCatalogItemDetailViewReducer_1 = require("./editInvoicingCatalogItemDetailViewReducer");
|
|
9
9
|
const fetchInvoicingCatalogItemDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(editInvoicingCatalogItemDetailViewReducer_1.fetchInvoicingCatalogItemDetail.match), (0, operators_1.switchMap)((action) => {
|
|
@@ -12,7 +12,7 @@ const fetchInvoicingCatalogItemDetailEpic = (actions$, _state$, zeniAPI) => acti
|
|
|
12
12
|
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.switchMap)((response) => {
|
|
13
13
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
14
14
|
return [
|
|
15
|
-
(0,
|
|
15
|
+
(0, invoicingCatalogReducer_1.updateInvoicingCatalogItems)([response.data], 'merge'),
|
|
16
16
|
(0, editInvoicingCatalogItemDetailViewReducer_1.updateInvoicingCatalogItemDetail)({ id: response.data.id, kind }),
|
|
17
17
|
];
|
|
18
18
|
}
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { InvoicingCatalogPricingModel, InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
1
|
+
import { InvoicingCatalogItem, InvoicingCatalogPricePoint, InvoicingCatalogPricingModel } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
3
2
|
import { InvoicingCatalogItemFormLocalData, InvoicingCatalogItemFormSubFamily, InvoicingCatalogItemFormTier } from './editInvoicingCatalogItemDetailViewState';
|
|
4
3
|
/**
|
|
5
4
|
* Value sets the catalog item form still owns locally: the backend has no enum
|
|
@@ -13,9 +12,9 @@ export declare const INVOICING_CATALOG_APPLICABILITY_VALUES: readonly ["all", "r
|
|
|
13
12
|
export declare const isTieredCatalogPricingModel: (model: string) => boolean;
|
|
14
13
|
export declare const blankInvoicingCatalogTier: (startingUnit?: string) => InvoicingCatalogItemFormTier;
|
|
15
14
|
export declare const blankInvoicingCatalogSubFamily: () => InvoicingCatalogItemFormSubFamily;
|
|
16
|
-
export declare const invoicingProductToCatalogItemFormSubFamily: (product?:
|
|
15
|
+
export declare const invoicingProductToCatalogItemFormSubFamily: (product?: InvoicingCatalogPricePoint) => InvoicingCatalogItemFormSubFamily;
|
|
17
16
|
export declare const initialInvoicingCatalogItemFormLocalData: InvoicingCatalogItemFormLocalData;
|
|
18
17
|
/**
|
|
19
18
|
* Seed the form draft from a parent catalog item and its embedded Price points.
|
|
20
19
|
*/
|
|
21
|
-
export declare const entityToInvoicingCatalogItemFormLocalData: (item?:
|
|
20
|
+
export declare const entityToInvoicingCatalogItemFormLocalData: (item?: InvoicingCatalogItem) => InvoicingCatalogItemFormLocalData;
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { updateInvoicingCatalogItems } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer';
|
|
4
4
|
import { RootState } from '../../../rootStateTypes';
|
|
5
5
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
6
6
|
import { runInvoicingCatalogPlanAction, runInvoicingCatalogPlanActionFailure, runInvoicingCatalogPlanActionSuccess } from './editInvoicingCatalogItemDetailViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof runInvoicingCatalogPlanAction> | ReturnType<typeof runInvoicingCatalogPlanActionSuccess> | ReturnType<typeof runInvoicingCatalogPlanActionFailure> | ReturnType<typeof
|
|
7
|
+
export type ActionType = ReturnType<typeof runInvoicingCatalogPlanAction> | ReturnType<typeof runInvoicingCatalogPlanActionSuccess> | ReturnType<typeof runInvoicingCatalogPlanActionFailure> | ReturnType<typeof updateInvoicingCatalogItems>;
|
|
8
8
|
export declare const runInvoicingCatalogPlanActionEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.runInvoicingCatalogPlanActionEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
6
|
+
const invoicingCatalogReducer_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const editInvoicingCatalogItemDetailViewReducer_1 = require("./editInvoicingCatalogItemDetailViewReducer");
|
|
9
9
|
const runInvoicingCatalogPlanActionEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(editInvoicingCatalogItemDetailViewReducer_1.runInvoicingCatalogPlanAction.match), (0, operators_1.mergeMap)((action) => {
|
|
@@ -15,7 +15,7 @@ const runInvoicingCatalogPlanActionEpic = (actions$, _state$, zeniAPI) => action
|
|
|
15
15
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
16
16
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
17
17
|
return [
|
|
18
|
-
(0,
|
|
18
|
+
(0, invoicingCatalogReducer_1.updateInvoicingCatalogItems)([response.data], 'merge'),
|
|
19
19
|
(0, editInvoicingCatalogItemDetailViewReducer_1.runInvoicingCatalogPlanActionSuccess)({ id }),
|
|
20
20
|
];
|
|
21
21
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import { updateInvoicingProducts } from '../../../entity/invoicing/product/productReducer';
|
|
3
|
+
import { mergeInvoicingCatalogPricePoint } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer';
|
|
5
4
|
import { RootState } from '../../../rootStateTypes';
|
|
6
5
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
7
6
|
import { runInvoicingCatalogProductAction, runInvoicingCatalogProductActionFailure, runInvoicingCatalogProductActionSuccess } from './editInvoicingCatalogItemDetailViewReducer';
|
|
8
|
-
export type ActionType = ReturnType<typeof runInvoicingCatalogProductAction> | ReturnType<typeof runInvoicingCatalogProductActionSuccess> | ReturnType<typeof runInvoicingCatalogProductActionFailure> | ReturnType<typeof
|
|
7
|
+
export type ActionType = ReturnType<typeof runInvoicingCatalogProductAction> | ReturnType<typeof runInvoicingCatalogProductActionSuccess> | ReturnType<typeof runInvoicingCatalogProductActionFailure> | ReturnType<typeof mergeInvoicingCatalogPricePoint>;
|
|
9
8
|
export declare const runInvoicingCatalogProductActionEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.runInvoicingCatalogProductActionEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
7
|
-
const productReducer_1 = require("../../../entity/invoicing/product/productReducer");
|
|
6
|
+
const invoicingCatalogReducer_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer");
|
|
8
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
9
8
|
const editInvoicingCatalogItemDetailViewReducer_1 = require("./editInvoicingCatalogItemDetailViewReducer");
|
|
10
9
|
const runInvoicingCatalogProductActionEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(editInvoicingCatalogItemDetailViewReducer_1.runInvoicingCatalogProductAction.match), (0, operators_1.mergeMap)((action) => {
|
|
@@ -19,9 +18,10 @@ const runInvoicingCatalogProductActionEpic = (actions$, _state$, zeniAPI) => act
|
|
|
19
18
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
20
19
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
21
20
|
return [
|
|
22
|
-
(0, productReducer_1.updateInvoicingProducts)([response.data], 'merge'),
|
|
23
21
|
...(parentItemId != null
|
|
24
|
-
? [
|
|
22
|
+
? [
|
|
23
|
+
(0, invoicingCatalogReducer_1.mergeInvoicingCatalogPricePoint)(parentItemId, response.data),
|
|
24
|
+
]
|
|
25
25
|
: []),
|
|
26
26
|
(0, editInvoicingCatalogItemDetailViewReducer_1.runInvoicingCatalogProductActionSuccess)({ id: stateKey }),
|
|
27
27
|
];
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import { updateInvoicingProducts } from '../../../entity/invoicing/product/productReducer';
|
|
3
|
+
import { mergeInvoicingCatalogPricePoint, updateInvoicingCatalogItems } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer';
|
|
5
4
|
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
6
5
|
import { RootState } from '../../../rootStateTypes';
|
|
7
6
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
8
7
|
import { addInvoicingCatalogItem } from '../invoicingCatalogListView/invoicingCatalogListViewReducer';
|
|
9
8
|
import { submitInvoicingCatalogItemForm, submitInvoicingCatalogItemFormFailure, submitInvoicingCatalogItemFormSuccess } from './editInvoicingCatalogItemDetailViewReducer';
|
|
10
|
-
export type ActionType = ReturnType<typeof submitInvoicingCatalogItemForm> | ReturnType<typeof submitInvoicingCatalogItemFormSuccess> | ReturnType<typeof submitInvoicingCatalogItemFormFailure> | ReturnType<typeof
|
|
9
|
+
export type ActionType = ReturnType<typeof submitInvoicingCatalogItemForm> | ReturnType<typeof submitInvoicingCatalogItemFormSuccess> | ReturnType<typeof submitInvoicingCatalogItemFormFailure> | ReturnType<typeof updateInvoicingCatalogItems> | ReturnType<typeof mergeInvoicingCatalogPricePoint> | ReturnType<typeof addInvoicingCatalogItem> | ReturnType<typeof openSnackbar>;
|
|
11
10
|
export declare const saveInvoicingCatalogItemEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js
CHANGED
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.saveInvoicingCatalogItemEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
7
|
-
const productReducer_1 = require("../../../entity/invoicing/product/productReducer");
|
|
6
|
+
const invoicingCatalogReducer_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer");
|
|
8
7
|
const snackbarApiError_1 = require("../../../entity/snackbar/snackbarApiError");
|
|
9
8
|
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
10
9
|
const responsePayload_1 = require("../../../responsePayload");
|
|
@@ -54,11 +53,8 @@ const saveInvoicingCatalogItemEpic = (actions$, state$, zeniAPI) => actions$.pip
|
|
|
54
53
|
}
|
|
55
54
|
const savedProducts = productResponses.flatMap((productResponse) => productResponse.data != null ? [productResponse.data] : []);
|
|
56
55
|
const resultActions = [
|
|
57
|
-
(0,
|
|
58
|
-
...
|
|
59
|
-
? [(0, productReducer_1.updateInvoicingProducts)(savedProducts, 'merge')]
|
|
60
|
-
: []),
|
|
61
|
-
...savedProducts.map((product) => (0, planReducer_1.mergeInvoicingPlanSubFamily)(savedItem.id, product)),
|
|
56
|
+
(0, invoicingCatalogReducer_1.updateInvoicingCatalogItems)([savedItem], 'merge'),
|
|
57
|
+
...savedProducts.map((product) => (0, invoicingCatalogReducer_1.mergeInvoicingCatalogPricePoint)(savedItem.id, product)),
|
|
62
58
|
(0, editInvoicingCatalogItemDetailViewReducer_1.submitInvoicingCatalogItemFormSuccess)({
|
|
63
59
|
itemId: savedItem.id,
|
|
64
60
|
kind: 'plan',
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.seedInvoicingCatalogItemFormDraftEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
6
|
+
const invoicingCatalogSelector_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogSelector");
|
|
7
7
|
const editInvoicingCatalogItemDetailViewReducer_1 = require("./editInvoicingCatalogItemDetailViewReducer");
|
|
8
8
|
const invoicingCatalogItemFormHelper_1 = require("./invoicingCatalogItemFormHelper");
|
|
9
9
|
/**
|
|
@@ -37,7 +37,7 @@ const seedInvoicingCatalogItemFormDraftEpic = (actions$, state$) => actions$.pip
|
|
|
37
37
|
}
|
|
38
38
|
// Nothing to seed from on a cold open; the detail response triggers this
|
|
39
39
|
// again once it lands.
|
|
40
|
-
const plan = (0,
|
|
40
|
+
const plan = (0, invoicingCatalogSelector_1.getInvoicingCatalogItemById)(state.invoicingCatalogState, id);
|
|
41
41
|
if (plan == null) {
|
|
42
42
|
return rxjs_1.EMPTY;
|
|
43
43
|
}
|
|
@@ -44,7 +44,9 @@ export declare const fetchInvoicingPaymentLinkEmailPreview: import("@reduxjs/too
|
|
|
44
44
|
}], {
|
|
45
45
|
cacheOverride: boolean;
|
|
46
46
|
id: string;
|
|
47
|
-
}, "editInvoicingCustomerDetailView/fetchInvoicingCustomerDetailPage", never, never>,
|
|
47
|
+
}, "editInvoicingCustomerDetailView/fetchInvoicingCustomerDetailPage", never, never>, invalidateInvoicingCustomerDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
48
|
+
id: ID;
|
|
49
|
+
}, "editInvoicingCustomerDetailView/invalidateInvoicingCustomerDetail">, seedInvoicingCustomerFormDraft: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
48
50
|
id: ID;
|
|
49
51
|
localData: InvoicingCustomerFormLocalData;
|
|
50
52
|
}, "editInvoicingCustomerDetailView/seedInvoicingCustomerFormDraft">, updateInvoicingCustomerDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.claimInvoicingCustomerBillingAddress = exports.initializeInvoicingCustomerAddress = exports.resetEditInvoicingCustomerDetailView = exports.submitInvoicingCustomerFormFailure = exports.submitInvoicingCustomerFormSuccess = exports.submitInvoicingCustomerForm = exports.updateInvoicingCustomerFormDraft = exports.updateInvoicingCustomerDetailFailure = exports.submitAddPromotionalCredits = exports.resetPromotionalCreditAction = exports.updateInvoicingCustomerDetail = exports.seedInvoicingCustomerFormDraft = exports.fetchInvoicingCustomerDetailPage = exports.fetchInvoicingCustomerDetail = exports.addPromotionalCreditsSuccess = exports.addPromotionalCreditsFailure = exports.updateInvoicingPaymentLinkEmailPreviewFailure = exports.updateInvoicingPaymentLinkEmailPreview = exports.fetchInvoicingPaymentLinkEmailPreviewPage = exports.fetchInvoicingPaymentLinkEmailPreview = exports.initialState = void 0;
|
|
4
|
+
exports.claimInvoicingCustomerBillingAddress = exports.initializeInvoicingCustomerAddress = exports.resetEditInvoicingCustomerDetailView = exports.submitInvoicingCustomerFormFailure = exports.submitInvoicingCustomerFormSuccess = exports.submitInvoicingCustomerForm = exports.updateInvoicingCustomerFormDraft = exports.updateInvoicingCustomerDetailFailure = exports.submitAddPromotionalCredits = exports.resetPromotionalCreditAction = exports.updateInvoicingCustomerDetail = exports.seedInvoicingCustomerFormDraft = exports.invalidateInvoicingCustomerDetail = exports.fetchInvoicingCustomerDetailPage = exports.fetchInvoicingCustomerDetail = exports.addPromotionalCreditsSuccess = exports.addPromotionalCreditsFailure = exports.updateInvoicingPaymentLinkEmailPreviewFailure = exports.updateInvoicingPaymentLinkEmailPreview = exports.fetchInvoicingPaymentLinkEmailPreviewPage = exports.fetchInvoicingPaymentLinkEmailPreview = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const rootActions_1 = require("../../../rootActions");
|
|
7
7
|
const invoicingFormDraft_1 = require("../invoicingFormDraft");
|
|
@@ -99,6 +99,10 @@ const editInvoicingCustomerDetailView = (0, toolkit_1.createSlice)({
|
|
|
99
99
|
error: undefined,
|
|
100
100
|
};
|
|
101
101
|
},
|
|
102
|
+
// Makes the page epic refetch a record that changed server-side (e.g. a new subscription).
|
|
103
|
+
invalidateInvoicingCustomerDetail(draft, action) {
|
|
104
|
+
delete draft.recordStateById[action.payload.id];
|
|
105
|
+
},
|
|
102
106
|
fetchInvoicingCustomerDetail(draft, action) {
|
|
103
107
|
draft.recordStateById[action.payload.id] = {
|
|
104
108
|
fetchState: 'In-Progress',
|
|
@@ -202,5 +206,5 @@ const editInvoicingCustomerDetailView = (0, toolkit_1.createSlice)({
|
|
|
202
206
|
});
|
|
203
207
|
},
|
|
204
208
|
});
|
|
205
|
-
_a = editInvoicingCustomerDetailView.actions, exports.fetchInvoicingPaymentLinkEmailPreview = _a.fetchInvoicingPaymentLinkEmailPreview, exports.fetchInvoicingPaymentLinkEmailPreviewPage = _a.fetchInvoicingPaymentLinkEmailPreviewPage, exports.updateInvoicingPaymentLinkEmailPreview = _a.updateInvoicingPaymentLinkEmailPreview, exports.updateInvoicingPaymentLinkEmailPreviewFailure = _a.updateInvoicingPaymentLinkEmailPreviewFailure, exports.addPromotionalCreditsFailure = _a.addPromotionalCreditsFailure, exports.addPromotionalCreditsSuccess = _a.addPromotionalCreditsSuccess, exports.fetchInvoicingCustomerDetail = _a.fetchInvoicingCustomerDetail, exports.fetchInvoicingCustomerDetailPage = _a.fetchInvoicingCustomerDetailPage, exports.seedInvoicingCustomerFormDraft = _a.seedInvoicingCustomerFormDraft, exports.updateInvoicingCustomerDetail = _a.updateInvoicingCustomerDetail, exports.resetPromotionalCreditAction = _a.resetPromotionalCreditAction, exports.submitAddPromotionalCredits = _a.submitAddPromotionalCredits, exports.updateInvoicingCustomerDetailFailure = _a.updateInvoicingCustomerDetailFailure, exports.updateInvoicingCustomerFormDraft = _a.updateInvoicingCustomerFormDraft, exports.submitInvoicingCustomerForm = _a.submitInvoicingCustomerForm, exports.submitInvoicingCustomerFormSuccess = _a.submitInvoicingCustomerFormSuccess, exports.submitInvoicingCustomerFormFailure = _a.submitInvoicingCustomerFormFailure, exports.resetEditInvoicingCustomerDetailView = _a.resetEditInvoicingCustomerDetailView, exports.initializeInvoicingCustomerAddress = _a.initializeInvoicingCustomerAddress, exports.claimInvoicingCustomerBillingAddress = _a.claimInvoicingCustomerBillingAddress;
|
|
209
|
+
_a = editInvoicingCustomerDetailView.actions, exports.fetchInvoicingPaymentLinkEmailPreview = _a.fetchInvoicingPaymentLinkEmailPreview, exports.fetchInvoicingPaymentLinkEmailPreviewPage = _a.fetchInvoicingPaymentLinkEmailPreviewPage, exports.updateInvoicingPaymentLinkEmailPreview = _a.updateInvoicingPaymentLinkEmailPreview, exports.updateInvoicingPaymentLinkEmailPreviewFailure = _a.updateInvoicingPaymentLinkEmailPreviewFailure, exports.addPromotionalCreditsFailure = _a.addPromotionalCreditsFailure, exports.addPromotionalCreditsSuccess = _a.addPromotionalCreditsSuccess, exports.fetchInvoicingCustomerDetail = _a.fetchInvoicingCustomerDetail, exports.fetchInvoicingCustomerDetailPage = _a.fetchInvoicingCustomerDetailPage, exports.invalidateInvoicingCustomerDetail = _a.invalidateInvoicingCustomerDetail, exports.seedInvoicingCustomerFormDraft = _a.seedInvoicingCustomerFormDraft, exports.updateInvoicingCustomerDetail = _a.updateInvoicingCustomerDetail, exports.resetPromotionalCreditAction = _a.resetPromotionalCreditAction, exports.submitAddPromotionalCredits = _a.submitAddPromotionalCredits, exports.updateInvoicingCustomerDetailFailure = _a.updateInvoicingCustomerDetailFailure, exports.updateInvoicingCustomerFormDraft = _a.updateInvoicingCustomerFormDraft, exports.submitInvoicingCustomerForm = _a.submitInvoicingCustomerForm, exports.submitInvoicingCustomerFormSuccess = _a.submitInvoicingCustomerFormSuccess, exports.submitInvoicingCustomerFormFailure = _a.submitInvoicingCustomerFormFailure, exports.resetEditInvoicingCustomerDetailView = _a.resetEditInvoicingCustomerDetailView, exports.initializeInvoicingCustomerAddress = _a.initializeInvoicingCustomerAddress, exports.claimInvoicingCustomerBillingAddress = _a.claimInvoicingCustomerBillingAddress;
|
|
206
210
|
exports.default = editInvoicingCustomerDetailView.reducer;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Amount } from '../../../commonStateTypes/amount';
|
|
2
2
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
3
3
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
|
+
import { InvoicingCatalogPricePoint } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
4
5
|
import { InvoicingFieldHelpByCode, InvoicingNamedOption, InvoicingSubscriptionLifecycleActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
5
6
|
import { InvoicingSubscription } from '../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionState';
|
|
6
|
-
import { InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
7
7
|
import { RootState } from '../../../rootStateTypes';
|
|
8
8
|
import { InvoicingSubscriptionFormLocalData } from './editInvoicingSubscriptionDetailViewState';
|
|
9
9
|
/**
|
|
@@ -107,7 +107,7 @@ export declare const getEditInvoicingSubscriptionDetailViewState: (state: RootSt
|
|
|
107
107
|
* Lives here rather than in a screen so the create/edit form and the detail
|
|
108
108
|
* page's inline edit narrow their pickers by the same rule.
|
|
109
109
|
*/
|
|
110
|
-
export declare const getInvoicingItemsAllowedForPlan: (products:
|
|
110
|
+
export declare const getInvoicingItemsAllowedForPlan: (products: InvoicingCatalogPricePoint[], plan: InvoicingCatalogPricePoint | undefined) => InvoicingCatalogPricePoint[];
|
|
111
111
|
/**
|
|
112
112
|
* One entry in a subscription-form picker, ready for the screen to render.
|
|
113
113
|
*
|
package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
|
6
6
|
import { RootState } from '../../../rootStateTypes';
|
|
7
7
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
8
8
|
import { resetNewAddressDataInLocalStore } from '../../addressView/addressViewReducer';
|
|
9
|
+
import { invalidateInvoicingCustomerDetail } from '../editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer';
|
|
10
|
+
import { invalidateInvoiceListForCustomer } from '../invoiceList/invoiceListReducer';
|
|
9
11
|
import { addInvoicingSubscriptionToList } from '../invoicingSubscriptionListView/invoicingSubscriptionListViewReducer';
|
|
10
12
|
import { submitInvoicingSubscriptionForm, submitInvoicingSubscriptionFormFailure, submitInvoicingSubscriptionFormSuccess, syncInvoicingSubscriptionCoupons } from './editInvoicingSubscriptionDetailViewReducer';
|
|
11
|
-
export type ActionType = ReturnType<typeof submitInvoicingSubscriptionForm> | ReturnType<typeof submitInvoicingSubscriptionFormSuccess> | ReturnType<typeof submitInvoicingSubscriptionFormFailure> | ReturnType<typeof syncInvoicingSubscriptionCoupons> | ReturnType<typeof resetNewAddressDataInLocalStore> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateInvoicingSubscriptions> | ReturnType<typeof addInvoicingSubscriptionToList> | ReturnType<typeof openSnackbar>;
|
|
13
|
+
export type ActionType = ReturnType<typeof submitInvoicingSubscriptionForm> | ReturnType<typeof submitInvoicingSubscriptionFormSuccess> | ReturnType<typeof submitInvoicingSubscriptionFormFailure> | ReturnType<typeof syncInvoicingSubscriptionCoupons> | ReturnType<typeof resetNewAddressDataInLocalStore> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateInvoicingSubscriptions> | ReturnType<typeof addInvoicingSubscriptionToList> | ReturnType<typeof invalidateInvoicingCustomerDetail> | ReturnType<typeof invalidateInvoiceListForCustomer> | ReturnType<typeof openSnackbar>;
|
|
12
14
|
export declare const saveInvoicingSubscriptionEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js
CHANGED
|
@@ -10,6 +10,8 @@ const snackbarApiError_1 = require("../../../entity/snackbar/snackbarApiError");
|
|
|
10
10
|
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
11
11
|
const responsePayload_1 = require("../../../responsePayload");
|
|
12
12
|
const addressViewReducer_1 = require("../../addressView/addressViewReducer");
|
|
13
|
+
const editInvoicingCustomerDetailViewReducer_1 = require("../editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer");
|
|
14
|
+
const invoiceListReducer_1 = require("../invoiceList/invoiceListReducer");
|
|
13
15
|
const invoicingSubscriptionListViewReducer_1 = require("../invoicingSubscriptionListView/invoicingSubscriptionListViewReducer");
|
|
14
16
|
const editInvoicingSubscriptionDetailViewPayload_1 = require("./editInvoicingSubscriptionDetailViewPayload");
|
|
15
17
|
const editInvoicingSubscriptionDetailViewReducer_1 = require("./editInvoicingSubscriptionDetailViewReducer");
|
|
@@ -89,7 +91,9 @@ const saveInvoicingSubscriptionEpic = (actions$, state$, zeniAPI) => actions$.pi
|
|
|
89
91
|
resultActions.push((0, invoicingSubscriptionListViewReducer_1.addInvoicingSubscriptionToList)({
|
|
90
92
|
id: saved.id,
|
|
91
93
|
status: saved.status,
|
|
92
|
-
})
|
|
94
|
+
}),
|
|
95
|
+
// The service may bill the first invoice on create.
|
|
96
|
+
(0, editInvoicingCustomerDetailViewReducer_1.invalidateInvoicingCustomerDetail)({ id: saved.customer_id }), (0, invoiceListReducer_1.invalidateInvoiceListForCustomer)({ customerId: saved.customer_id }));
|
|
93
97
|
}
|
|
94
98
|
resultActions.push((0, snackbarReducer_1.openSnackbar)({
|
|
95
99
|
messageSection: 'invoicing_subscription_saved',
|