@zeniai/client-epic-state 5.1.66 → 5.1.68
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/approvalRule/approvalRuleState.d.ts +1 -0
- package/lib/entity/entityApprovalStatus/entityApprovalStatusPayload.d.ts +1 -0
- package/lib/entity/entityApprovalStatus/entityApprovalStatusPayload.js +1 -0
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +1 -0
- package/lib/epic.d.ts +4 -3
- package/lib/epic.js +4 -3
- package/lib/esm/entity/entityApprovalStatus/entityApprovalStatusPayload.js +1 -0
- package/lib/esm/epic.js +4 -3
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/invoicing/createInvoice/createInvoiceReducer.js +15 -1
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +5 -1
- package/lib/esm/view/invoicing/createInvoice/epics/fetchCreateInvoiceFormPageEpic.js +50 -0
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewPayload.js +0 -1
- package/lib/esm/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +76 -37
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +14 -17
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +1 -3
- package/lib/esm/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +0 -14
- package/lib/esm/view/spendManagement/helpers.js +14 -0
- package/lib/esm/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.js +42 -17
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +14 -17
- package/lib/index.d.ts +2 -2
- package/lib/index.js +12 -11
- package/lib/view/invoicing/createInvoice/createInvoiceReducer.d.ts +5 -1
- package/lib/view/invoicing/createInvoice/createInvoiceReducer.js +16 -2
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +1 -0
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +5 -1
- package/lib/view/invoicing/createInvoice/epics/fetchCreateInvoiceFormPageEpic.d.ts +15 -0
- package/lib/view/invoicing/createInvoice/epics/fetchCreateInvoiceFormPageEpic.js +54 -0
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewPayload.js +0 -1
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +3 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +75 -36
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +13 -16
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +1 -3
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.d.ts +1 -2
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +0 -14
- package/lib/view/spendManagement/helpers.d.ts +5 -1
- package/lib/view/spendManagement/helpers.js +18 -1
- package/lib/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.d.ts +2 -0
- package/lib/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.js +41 -16
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +13 -16
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -250,7 +250,7 @@ import { AuditSummaryData, CompanyMonthEndReportData, CompanyMonthReportTemplate
|
|
|
250
250
|
import { fetchCockpitContext, fetchCompanyTaskManagerView, fetchTaskManagerMetrics, updateCompanyTaskManagerViewFilters } from './view/companyTaskManagerView/companyTaskManagerViewReducer';
|
|
251
251
|
import { CompanyTaskManagerSelectorView, TaskWithCompanyDetail, getCompanyTaskManagerView } from './view/companyTaskManagerView/companyTaskManagerViewSelector';
|
|
252
252
|
import { CompanyTaskManagerViewUIState, TaskManagerMetrics } from './view/companyTaskManagerView/companyTaskManagerViewState';
|
|
253
|
-
import { clearCompanyView, companyManagementSaveUpdates, companyPassportClearDataInLocalStore, companyPassportSaveDataInLocalStore, deleteCompanyOfficerInLocalStore, dismissCapitalizationOnboarding, fetchAllCockpitViews, fetchCompanyManagementView, fetchCompanyPassportView, fetchCompanyPortfolioView, fetchManagementView, fetchOnboardingView, fetchParentSubsidiaryManagementView, fetchPortfolioView, fetchSubscriptionView, fetchZeniUsers, saveCompanyPassportDetails, saveIndustryAndIncDateInCompanyPassportLocalStore, updateAccountingClassesEnabled,
|
|
253
|
+
import { clearCompanyView, clearQboProjectsReconnectRequest, companyManagementSaveUpdates, companyPassportClearDataInLocalStore, companyPassportSaveDataInLocalStore, deleteCompanyOfficerInLocalStore, disableAccountingProjects, dismissCapitalizationOnboarding, enableAccountingProjects, fetchAllCockpitViews, fetchCompanyManagementView, fetchCompanyPassportView, fetchCompanyPortfolioView, fetchManagementView, fetchOnboardingView, fetchParentSubsidiaryManagementView, fetchPortfolioView, fetchSubscriptionView, fetchZeniUsers, resumeEnableAccountingProjects, saveCompanyPassportDetails, saveIndustryAndIncDateInCompanyPassportLocalStore, updateAccountingClassesEnabled, updateCapitalizationAccountThreshold, updateCompanyDownloadState, updateCompanyManagementUIState, updateCompanyPassportLocalStoreData, updateCompanyPortfolioUIState } from './view/companyView/companyViewReducer';
|
|
254
254
|
import { FilterCategoryValueType, canSendMonthEndEmailReport, shouldEnableCalendarPickerForLastReportSent } from './view/companyView/helpers/cockpitHelpers';
|
|
255
255
|
import { getParentSubsidiaryManagementView } from './view/companyView/parentSubsidiaryView/parentSubsidiaryViewSelector';
|
|
256
256
|
import { CompanyManagementView, CompanyWithUpdateStatusView, getAddonListZeniSku, getCompanyManagementView, getPlanListZeniSku } from './view/companyView/selector/companyManagementViewSelector';
|
|
@@ -1022,7 +1022,7 @@ export type { InvoiceListView } from './view/invoicing/invoiceList/invoiceListSe
|
|
|
1022
1022
|
export { clearAllInvoiceDetail, fetchInvoiceDetail, } from './view/invoicing/invoiceDetail/invoiceDetailReducer';
|
|
1023
1023
|
export { getInvoiceDetail } from './view/invoicing/invoiceDetail/invoiceDetailSelector';
|
|
1024
1024
|
export type { InvoiceDetailView } from './view/invoicing/invoiceDetail/invoiceDetailSelector';
|
|
1025
|
-
export { createInvoice, resetCreateInvoice, updateInvoicingCreateInvoiceFormDraft, } from './view/invoicing/createInvoice/createInvoiceReducer';
|
|
1025
|
+
export { createInvoice, fetchCreateInvoiceFormPage, resetCreateInvoice, updateInvoicingCreateInvoiceFormDraft, } from './view/invoicing/createInvoice/createInvoiceReducer';
|
|
1026
1026
|
export type { CreateInvoiceLineItemRequest, CreateInvoiceRequest, } from './view/invoicing/createInvoice/createInvoicePayload';
|
|
1027
1027
|
export type { InvoicingCreateInvoiceFormLineItem, InvoicingCreateInvoiceFormLocalData, } from './view/invoicing/createInvoice/createInvoiceState';
|
|
1028
1028
|
export { blankInvoicingCreateInvoiceLineItem, createInvoiceFormLocalDataToRequest, initialInvoicingCreateInvoiceFormLocalData, } from './view/invoicing/createInvoice/createInvoiceFormConfig';
|
package/lib/index.js
CHANGED
|
@@ -77,13 +77,13 @@ exports.getCardPolicySuggestedAllowMerchants = exports.getCardPolicySuggestedAll
|
|
|
77
77
|
exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION = exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT = exports.getManualCardPolicyFormDraft = exports.getLastCreatedCardPolicyTemplateIds = exports.getLastCreatedCardPolicyTemplateId = exports.getLastCreateCardPolicyTemplateErrors = exports.getLastCreateCardPolicySourceChatSessionId = exports.getCreateCardPolicyTemplateRequestState = exports.getAiCardPolicyFormDraft = exports.updateManualCardPolicyFormDraft = exports.updateCreateCardPolicyTemplateRequestState = exports.updateAiCardPolicyFormDraftFromUploadPlan = exports.updateAiCardPolicyFormDraft = exports.seedManualCardPolicyFormDraft = exports.seedAiCardPolicyFormDraft = exports.createCardPolicyTemplates = exports.clearManualCardPolicyFormDraft = exports.clearCreateCardPolicy = exports.clearAiCardPolicyFormDraft = exports.applyExtractedPolicyToManualCardPolicyDraft = exports.applyExtractedPolicyToAiCardPolicyDraft = exports.toUpdateCardPolicyTemplateRequestBody = exports.toExtractedCardPolicyRules = exports.toCreateCardPolicyTemplatesRequestBody = exports.toCreateCardPolicyTemplateRequestBody = exports.toCardPolicyVendorSearchOption = exports.toCardPolicyTemplateList = exports.toCardPolicyTemplate = exports.toCardPolicyStats = exports.toCardPolicyEditFormDraft = exports.toBulkCreateCardPolicyTemplateError = exports.toCardPolicyTemplateStatus = exports.toCardPolicyTemplateMode = exports.ALL_CARD_POLICY_TEMPLATE_STATUSES = exports.ALL_CARD_POLICY_TEMPLATE_MODES = exports.getUploadedPolicyDocumentFileName = exports.getPolicyRecommendationFromUploadFetchState = exports.getPolicyRecommendationFromUploadError = exports.getPolicyRecommendationFromUploadChatSessionId = exports.getPolicyRecommendationFromUploadAnswerId = exports.getPolicyDocumentExtractionFetchState = exports.getPolicyDocumentExtractionError = exports.getExtractedCardPolicyRules = exports.getCardPolicyVendorSearchString = exports.getCardPolicyVendorSearchOptions = exports.getCardPolicyVendorSearchFetchState = exports.getCardPolicyTemplatesByIds = exports.getCardPolicyTemplateById = exports.getCardPolicySuggestedBlockMerchants = exports.getCardPolicySuggestedBlockCategories = void 0;
|
|
78
78
|
exports.createAutoTransferRule = exports.fetchAutoTransferRules = exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.getUpdateCardPolicyFetchState = exports.getCardPolicyFormDraft = exports.getCardPolicyDetailView = exports.getCardPolicyDetailFetchState = exports.updateCardPolicyFormDraft = exports.updateCardPolicyFetchStatus = exports.updateCardPolicyDetailFetchStatus = exports.updateCardPolicy = exports.fetchCardPolicyDetail = exports.clearCardPolicyDetail = exports.getCardPolicyTemplateIds = exports.getCardPolicyListView = exports.getCardPolicyListFetchState = exports.getArchiveCardPolicyFetchState = exports.updateCardPolicyListFetchStatus = exports.updateArchiveCardPolicyFetchStatus = exports.prependCardPolicyTemplateIds = exports.fetchCardPolicyList = exports.clearCardPolicyList = exports.archiveCardPolicy = exports.toManualCardPolicyTemplateRequestFromDraft = exports.toBulkCardPolicyTemplateRequestsFromDraft = exports.toCardPolicyTemplateRequestFromDraft = exports.applyAiCardPolicyFormDraftUpdate = exports.deriveAiPolicyReviewRowsFromInputs = exports.buildManualCardPolicyFormDraftSeed = exports.buildUploadReviewRows = exports.buildEmptyLimitRows = exports.buildAiCardPolicyFormDraftSeed = exports.toVendorChipFieldValue = exports.toMccCategoryChipFieldValue = exports.buildVendorChipId = exports.buildMccCategoryChipId = exports.VENDOR_CHIP_ID_PREFIX = exports.MCC_CHIP_ID_PREFIX = exports.toMccCategoryLike = void 0;
|
|
79
79
|
exports.clearAllInvoiceDetail = exports.getInvoiceListView = exports.INVOICING_INVOICE_TABS = exports.ALL_INVOICING_INVOICE_TAB_IDS = exports.updateInvoiceListFilters = exports.fetchInvoiceListPage = exports.fetchInvoiceList = exports.fetchInvoiceKPIs = exports.fetchInvoiceCounts = exports.clearInvoiceList = exports.getInvoicesByIds = exports.getInvoiceById = exports.updateInvoices = exports.removeInvoice = exports.clearAllInvoices = exports.mapAuditLogEntry = exports.toAuditLogEntityRouteOption = exports.isInvoicingEntityLinkable = exports.buildInvoicingEntityPath = exports.toInvoicingDiscountLifecycleActionOption = exports.toInvoicingDiscountLifecycleAction = exports.toInvoicingCatalogProductLifecycleActionOption = exports.toInvoicingCatalogItemLifecycleActionOption = exports.toInvoicingCatalogProductLifecycleAction = exports.toInvoicingCatalogItemLifecycleAction = exports.toInvoicingSubscriptionLifecycleActionOption = exports.toInvoicingSubscriptionLifecycleAction = exports.toInvoicingDunningAction = exports.INVOICING_DISCOUNT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_PRODUCT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_ITEM_LIFECYCLE_ACTIONS = exports.INVOICING_SUBSCRIPTION_LIFECYCLE_ACTIONS = exports.INVOICING_DUNNING_ACTIONS = exports.toKycProvidedDocumentTypeFromAllowed = exports.toKycProvidedDocumentType = exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule = void 0;
|
|
80
|
-
exports.
|
|
81
|
-
exports.
|
|
82
|
-
exports.
|
|
83
|
-
exports.
|
|
84
|
-
exports.
|
|
85
|
-
exports.
|
|
86
|
-
exports.getInvoicingConfigView = exports.updateInvoicingConfig = exports.resetInvoicingConfigActionStates = exports.fetchInvoicingConfig = exports.enableInvoicing = exports.clearInvoicingConfig = exports.acceptInvoicingTerms = exports.isStripeConnectedFromSettings = exports.initialInvoicingBrandingFormLocalData = exports.entityToInvoicingBrandingFormLocalData = exports.INVOICING_BUSINESS_ADDRESS_TYPE = exports.getInvoicingSettingsView = exports.getInvoicingSettingsFetchState = exports.getInvoicingSettings = exports.getInvoicingBrandingFormView = void 0;
|
|
80
|
+
exports.getRecordPaymentFormView = exports.getCreateInvoiceFormView = exports.getInvoicingAuditView = exports.fetchInvoicingAuditLog = exports.clearInvoicingAuditView = exports.getInvoicingOverview = exports.buildPeriodOptions = exports.fetchInvoicingOverview = exports.clearInvoicingOverview = exports.initialRecordPaymentFormLocalData = exports.INVOICING_PAYMENT_METHOD_VALUES = exports.INVOICING_PAYMENT_GATEWAY_VALUES = exports.localDataToRecordPaymentPayload = exports.localDataToInvoiceRecordPaymentBody = exports.initializeRecordPaymentDraftFromInvoice = exports.getCreateCreditNoteView = exports.getCreateCreditNoteFormView = exports.initialCreateCreditNoteFormLocalData = exports.localDataToCreateCreditNotePayload = exports.updateCreateCreditNoteFormDraft = exports.submitCreateCreditNote = exports.resetCreateCreditNote = exports.createCreditNoteSuccess = exports.createCreditNoteFailure = exports.getIssueCreditNoteView = exports.getIssueCreditNoteFormView = exports.initialIssueCreditNoteFormLocalData = exports.INVOICING_CREDIT_NOTE_REASON_CODES = exports.localDataToIssueCreditNotePayload = exports.initializeIssueCreditNoteDraftFromInvoice = exports.computeIssueCreditNoteTotal = exports.updateIssueCreditNoteFormDraft = exports.submitIssueCreditNote = exports.resetIssueCreditNote = exports.issueCreditNoteSuccess = exports.issueCreditNoteFailure = exports.initializeIssueCreditNoteDraft = exports.updateRecordPaymentFormDraft = exports.submitRecordPayment = exports.initializeRecordPaymentDraft = exports.resetRecordPayment = exports.initialInvoicingCreateInvoiceFormLocalData = exports.createInvoiceFormLocalDataToRequest = exports.blankInvoicingCreateInvoiceLineItem = exports.updateInvoicingCreateInvoiceFormDraft = exports.resetCreateInvoice = exports.fetchCreateInvoiceFormPage = exports.createInvoice = exports.getInvoiceDetail = exports.fetchInvoiceDetail = void 0;
|
|
81
|
+
exports.getEditInvoicingCatalogItemDetailViewState = exports.isTieredCatalogPricingModel = exports.initialInvoicingCatalogItemFormLocalData = exports.entityToInvoicingCatalogItemFormLocalData = exports.blankInvoicingCatalogTier = exports.blankInvoicingCatalogSubFamily = exports.INVOICING_CATALOG_TYPE_VALUES = exports.INVOICING_CATALOG_TRIAL_UNIT_VALUES = exports.INVOICING_CATALOG_TRIAL_END_ACTION_VALUES = exports.INVOICING_CATALOG_TIER_TYPE_VALUES = exports.INVOICING_CATALOG_PRORATION_VALUES = exports.INVOICING_CATALOG_PRICING_MODEL_VALUES = exports.INVOICING_CATALOG_PERIOD_UNIT_VALUES = exports.INVOICING_CATALOG_APPLICABILITY_VALUES = exports.productToCreateSubFamilyFormValues = exports.planToCatalogDetailEditValues = exports.createSubFamilyFormToPayload = exports.catalogDetailEditValuesToSavePayload = exports.updateInvoicingCatalogItemFormDraft = exports.submitInvoicingCatalogItemForm = exports.saveInvoicingCatalogItem = exports.resetEditInvoicingCatalogItemDetailView = exports.createInvoicingCatalogSubFamily = exports.archiveInvoicingCatalogSubFamily = exports.getInvoicingSubscriptionFormView = exports.getEditInvoicingSubscriptionDetailViewState = exports.initialInvoicingSubscriptionFormLocalData = exports.entityToInvoicingSubscriptionFormLocalData = exports.INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE = exports.INVOICING_SUBSCRIPTION_BILLING_FREQUENCY_VALUES = exports.updateInvoicingSubscriptionFormDraft = exports.submitInvoicingSubscriptionForm = exports.resetEditInvoicingSubscriptionDetailView = exports.initializeInvoicingSubscriptionAddress = exports.fetchInvoicingSubscriptionFormPage = exports.getInvoicingCustomerFormView = exports.initialInvoicingCustomerFormLocalData = exports.entityToInvoicingCustomerFormLocalData = exports.INVOICING_TAXABILITY_VALUES = exports.INVOICING_NET_TERM_DAY_VALUES = exports.INVOICING_CUSTOMER_TYPE_VALUES = exports.INVOICING_CUSTOMER_BILLING_ADDRESS_TYPE = exports.updateInvoicingCustomerFormDraft = exports.submitInvoicingCustomerFormSuccess = exports.submitInvoicingCustomerFormFailure = exports.submitInvoicingCustomerForm = exports.resetEditInvoicingCustomerDetailView = exports.initializeInvoicingCustomerAddress = exports.getRecordPaymentView = exports.getRecordPaymentInvoiceOptions = void 0;
|
|
82
|
+
exports.updateInvoicingCustomers = exports.removeInvoicingCustomer = exports.clearAllInvoicingCustomers = exports.INVOICING_LIST_PAGE_SIZE = exports.getInvoicingDataImportActionState = exports.uploadInvoicingMigrationFiles = exports.startInvoicingMigration = exports.rollbackInvoicingMigration = exports.retryInvoicingMigration = exports.connectInvoicingChargebee = exports.clearAllInvoicingDataImportActions = exports.getInvoicingDataImportView = exports.setInvoicingActiveMigrationSessionId = exports.fetchInvoicingMigrationSessions = exports.fetchInvoicingMigrationSession = exports.fetchInvoicingMigrationDiagnostics = exports.fetchInvoicingDataImportStatus = exports.clearInvoicingDataImportView = exports.getInvoicingPaymentActionState = exports.runInvoicingPaymentAction = exports.clearInvoicingPaymentAction = exports.getInvoicingDunningActionState = exports.runInvoicingDunningAction = exports.clearInvoicingDunningAction = exports.getInvoicingSubscriptionActionState = exports.runInvoicingSubscriptionAction = exports.clearInvoicingSubscriptionAction = exports.getInvoicingDiscountActionState = exports.runInvoicingDiscountAction = exports.clearInvoicingDiscountAction = exports.getInvoicingCatalogActionState = exports.runInvoicingCatalogProductAction = exports.runInvoicingCatalogPlanAction = exports.clearInvoicingCatalogAction = exports.getInvoicingInvoiceActionState = exports.updateInvoicingInvoice = exports.runInvoicingInvoiceAction = exports.clearInvoicingInvoiceAction = exports.getInvoicingCouponFormView = exports.getEditInvoicingCouponDetailViewState = exports.initialInvoicingCouponFormLocalData = exports.entityToInvoicingCouponFormLocalData = exports.updateInvoicingCouponFormDraft = exports.submitInvoicingCouponForm = exports.saveInvoicingCoupon = exports.resetEditInvoicingCouponDetailView = exports.getSavedInvoicingCatalogItemKind = exports.getSavedInvoicingCatalogItemId = exports.getInvoicingCatalogItemFormView = exports.getInvoicingApplicableCatalogItemOptions = void 0;
|
|
83
|
+
exports.clearInvoicingTransactionListView = exports.updateInvoicingTransactions = exports.removeInvoicingTransaction = exports.clearAllInvoicingTransactions = exports.getInvoicingSubscriptionDetail = exports.getInvoicingSubscriptionById = exports.fetchInvoicingSubscriptionDetail = exports.clearInvoicingSubscriptionDetailView = exports.getInvoicingSubscriptionListView = exports.INVOICING_SUBSCRIPTION_TABS = exports.INVOICING_SUBSCRIPTION_COLUMNS = exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS = exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = exports.updateInvoicingSubscriptionFilters = exports.fetchInvoicingSubscriptionListPage = exports.fetchInvoicingSubscriptionList = exports.fetchInvoicingSubscriptionCounts = exports.clearInvoicingSubscriptionListView = exports.updateInvoicingSubscriptions = exports.removeInvoicingSubscription = exports.clearAllInvoicingSubscriptions = exports.resetPromotionalCreditAction = exports.submitAddPromotionalCredits = exports.getInvoicingSetupIntentFetchState = exports.getInvoicingSetupIntent = exports.getInvoicingSentPaymentLinkMagicUrl = exports.getInvoicingSentPaymentLinkEmail = exports.getInvoicingPlaidLinkTokenFetchState = exports.getInvoicingPlaidLinkToken = exports.getInvoicingPaymentMethodSaveState = exports.getInvoicingPaymentLinkSendState = exports.sendInvoicingPaymentLink = exports.saveInvoicingPaymentMethod = exports.resetInvoicingCustomerPaymentMethod = exports.fetchInvoicingPlaidLinkToken = exports.createInvoicingSetupIntent = exports.getInvoicingCustomerDetail = exports.fetchInvoicingCustomerDetailPage = exports.fetchInvoicingCustomerDetail = exports.clearInvoicingCustomerDetailView = exports.getInvoicingCustomerListView = exports.INVOICING_CUSTOMER_TABS = exports.INVOICING_CUSTOMER_COLUMNS = exports.ALL_INVOICING_CUSTOMER_TAB_IDS = exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = exports.updateInvoicingCustomerFilters = exports.fetchInvoicingCustomerListPage = exports.fetchInvoicingCustomerList = exports.fetchInvoicingCustomerCounts = exports.clearInvoicingCustomerListView = void 0;
|
|
84
|
+
exports.clearInvoicingCouponDetailView = exports.getInvoicingCouponById = exports.getInvoicingCouponListView = exports.getInvoicingCouponListNextCursor = exports.getInvoicingCouponListItems = exports.getInvoicingCouponListHasMore = exports.getInvoicingCouponListFilters = exports.getInvoicingCouponListFetchState = exports.getInvoicingCouponCounts = exports.INVOICING_COUPON_TABS = exports.INVOICING_COUPON_COLUMNS = exports.ALL_INVOICING_COUPON_TAB_IDS = exports.ALL_INVOICING_COUPON_SORT_KEYS = exports.updateInvoicingCouponFilters = exports.fetchInvoicingCouponListPage = exports.fetchInvoicingCouponList = exports.fetchInvoicingCouponCounts = exports.clearInvoicingCouponView = exports.updateInvoicingCoupons = exports.removeInvoicingCoupon = exports.clearAllInvoicingCoupons = exports.getInvoicingCreditNoteDetail = exports.getInvoicingCreditNoteById = exports.fetchInvoicingCreditNoteDetail = exports.clearInvoicingCreditNoteDetailView = exports.getInvoicingCreditNoteListView = exports.INVOICING_CREDIT_NOTE_TABS = exports.INVOICING_CREDIT_NOTE_COLUMNS = exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS = exports.ALL_INVOICING_CREDIT_NOTE_SORT_KEYS = exports.updateInvoicingCreditNoteFilters = exports.fetchInvoicingCreditNoteListPage = exports.fetchInvoicingCreditNoteList = exports.fetchInvoicingCreditNoteCounts = exports.clearInvoicingCreditNoteListView = exports.updateInvoicingCreditNotes = exports.removeInvoicingCreditNote = exports.clearAllInvoicingCreditNotes = exports.getInvoicingTransactionDetail = exports.getInvoicingTransactionById = exports.fetchInvoicingTransactionDetail = exports.clearInvoicingTransactionDetailView = exports.getInvoicingTransactionListView = exports.INVOICING_TRANSACTION_TABS = exports.INVOICING_TRANSACTION_COLUMNS = exports.ALL_INVOICING_TRANSACTION_TAB_IDS = exports.ALL_INVOICING_TRANSACTION_SORT_KEYS = exports.updateInvoicingTransactionFilters = exports.fetchInvoicingTransactionListPage = exports.fetchInvoicingTransactionList = void 0;
|
|
85
|
+
exports.updateInvoicingBrandingFormDraft = exports.submitInvoicingBrandingForm = exports.saveInvoicingSettings = exports.resetSaveInvoicingSettings = exports.resetInvoicingBrandingFormDraft = exports.fetchInvoicingSettings = exports.disconnectInvoicingStripe = exports.connectInvoicingStripe = exports.clearInvoicingSettings = exports.getInvoicingProductById = exports.getInvoicingPlanById = exports.getInvoicingCatalogItemDetail = exports.fetchInvoicingCatalogItemDetail = exports.clearInvoicingCatalogItemDetailView = exports.getInvoicingCatalogListView = exports.INVOICING_PRODUCT_COLUMNS = exports.ALL_INVOICING_PRODUCT_SORT_KEYS = exports.updateInvoicingCatalogProductFilters = exports.updateInvoicingCatalogPlanFilters = exports.fetchInvoicingCatalogProductList = exports.fetchInvoicingCatalogPlanList = exports.fetchInvoicingCatalogListPage = exports.fetchInvoicingCatalogCounts = exports.clearInvoicingCatalogListView = exports.updateInvoicingProducts = exports.removeInvoicingProduct = exports.clearAllInvoicingProducts = exports.updateInvoicingPlans = exports.removeInvoicingPlan = exports.mergeInvoicingPlanSubFamily = exports.clearAllInvoicingPlans = exports.getInvoicingDunningCaseDetail = exports.getInvoicingDunningCaseById = exports.fetchInvoicingDunningCaseDetail = exports.clearInvoicingDunningCaseDetailView = exports.getInvoicingDunningCaseListView = exports.INVOICING_DUNNING_CASE_TABS = exports.INVOICING_DUNNING_CASE_COLUMNS = exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS = exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = exports.updateInvoicingDunningCaseFilters = exports.fetchInvoicingDunningCaseListPage = exports.fetchInvoicingDunningCaseList = exports.fetchInvoicingDunningCaseCounts = exports.clearInvoicingDunningCaseListView = exports.updateInvoicingDunningCases = exports.removeInvoicingDunningCase = exports.clearAllInvoicingDunningCases = exports.getInvoicingCouponDetail = exports.fetchInvoicingCouponDetail = void 0;
|
|
86
|
+
exports.getInvoicingConfigView = exports.updateInvoicingConfig = exports.resetInvoicingConfigActionStates = exports.fetchInvoicingConfig = exports.enableInvoicing = exports.clearInvoicingConfig = exports.acceptInvoicingTerms = exports.isStripeConnectedFromSettings = exports.initialInvoicingBrandingFormLocalData = exports.entityToInvoicingBrandingFormLocalData = exports.INVOICING_BUSINESS_ADDRESS_TYPE = exports.getInvoicingSettingsView = exports.getInvoicingSettingsFetchState = exports.getInvoicingSettings = exports.getInvoicingBrandingFormView = exports.updateInvoicingSettings = void 0;
|
|
87
87
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
88
88
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
89
89
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -703,11 +703,14 @@ const companyTaskManagerViewSelector_1 = require("./view/companyTaskManagerView/
|
|
|
703
703
|
Object.defineProperty(exports, "getCompanyTaskManagerView", { enumerable: true, get: function () { return companyTaskManagerViewSelector_1.getCompanyTaskManagerView; } });
|
|
704
704
|
const companyViewReducer_1 = require("./view/companyView/companyViewReducer");
|
|
705
705
|
Object.defineProperty(exports, "clearCompanyView", { enumerable: true, get: function () { return companyViewReducer_1.clearCompanyView; } });
|
|
706
|
+
Object.defineProperty(exports, "clearQboProjectsReconnectRequest", { enumerable: true, get: function () { return companyViewReducer_1.clearQboProjectsReconnectRequest; } });
|
|
706
707
|
Object.defineProperty(exports, "companyManagementSaveUpdates", { enumerable: true, get: function () { return companyViewReducer_1.companyManagementSaveUpdates; } });
|
|
707
708
|
Object.defineProperty(exports, "companyPassportClearDataInLocalStore", { enumerable: true, get: function () { return companyViewReducer_1.companyPassportClearDataInLocalStore; } });
|
|
708
709
|
Object.defineProperty(exports, "companyPassportSaveDataInLocalStore", { enumerable: true, get: function () { return companyViewReducer_1.companyPassportSaveDataInLocalStore; } });
|
|
709
710
|
Object.defineProperty(exports, "deleteCompanyOfficerInLocalStore", { enumerable: true, get: function () { return companyViewReducer_1.deleteCompanyOfficerInLocalStore; } });
|
|
711
|
+
Object.defineProperty(exports, "disableAccountingProjects", { enumerable: true, get: function () { return companyViewReducer_1.disableAccountingProjects; } });
|
|
710
712
|
Object.defineProperty(exports, "dismissCapitalizationOnboarding", { enumerable: true, get: function () { return companyViewReducer_1.dismissCapitalizationOnboarding; } });
|
|
713
|
+
Object.defineProperty(exports, "enableAccountingProjects", { enumerable: true, get: function () { return companyViewReducer_1.enableAccountingProjects; } });
|
|
711
714
|
Object.defineProperty(exports, "fetchAllCockpitViews", { enumerable: true, get: function () { return companyViewReducer_1.fetchAllCockpitViews; } });
|
|
712
715
|
Object.defineProperty(exports, "fetchCompanyManagementView", { enumerable: true, get: function () { return companyViewReducer_1.fetchCompanyManagementView; } });
|
|
713
716
|
Object.defineProperty(exports, "fetchCompanyPassportView", { enumerable: true, get: function () { return companyViewReducer_1.fetchCompanyPassportView; } });
|
|
@@ -718,13 +721,10 @@ Object.defineProperty(exports, "fetchParentSubsidiaryManagementView", { enumerab
|
|
|
718
721
|
Object.defineProperty(exports, "fetchPortfolioView", { enumerable: true, get: function () { return companyViewReducer_1.fetchPortfolioView; } });
|
|
719
722
|
Object.defineProperty(exports, "fetchSubscriptionView", { enumerable: true, get: function () { return companyViewReducer_1.fetchSubscriptionView; } });
|
|
720
723
|
Object.defineProperty(exports, "fetchZeniUsers", { enumerable: true, get: function () { return companyViewReducer_1.fetchZeniUsers; } });
|
|
724
|
+
Object.defineProperty(exports, "resumeEnableAccountingProjects", { enumerable: true, get: function () { return companyViewReducer_1.resumeEnableAccountingProjects; } });
|
|
721
725
|
Object.defineProperty(exports, "saveCompanyPassportDetails", { enumerable: true, get: function () { return companyViewReducer_1.saveCompanyPassportDetails; } });
|
|
722
726
|
Object.defineProperty(exports, "saveIndustryAndIncDateInCompanyPassportLocalStore", { enumerable: true, get: function () { return companyViewReducer_1.saveIndustryAndIncDateInCompanyPassportLocalStore; } });
|
|
723
727
|
Object.defineProperty(exports, "updateAccountingClassesEnabled", { enumerable: true, get: function () { return companyViewReducer_1.updateAccountingClassesEnabled; } });
|
|
724
|
-
Object.defineProperty(exports, "enableAccountingProjects", { enumerable: true, get: function () { return companyViewReducer_1.enableAccountingProjects; } });
|
|
725
|
-
Object.defineProperty(exports, "resumeEnableAccountingProjects", { enumerable: true, get: function () { return companyViewReducer_1.resumeEnableAccountingProjects; } });
|
|
726
|
-
Object.defineProperty(exports, "disableAccountingProjects", { enumerable: true, get: function () { return companyViewReducer_1.disableAccountingProjects; } });
|
|
727
|
-
Object.defineProperty(exports, "clearQboProjectsReconnectRequest", { enumerable: true, get: function () { return companyViewReducer_1.clearQboProjectsReconnectRequest; } });
|
|
728
728
|
Object.defineProperty(exports, "updateCapitalizationAccountThreshold", { enumerable: true, get: function () { return companyViewReducer_1.updateCapitalizationAccountThreshold; } });
|
|
729
729
|
Object.defineProperty(exports, "updateCompanyDownloadState", { enumerable: true, get: function () { return companyViewReducer_1.updateCompanyDownloadState; } });
|
|
730
730
|
Object.defineProperty(exports, "updateCompanyManagementUIState", { enumerable: true, get: function () { return companyViewReducer_1.updateCompanyManagementUIState; } });
|
|
@@ -2664,6 +2664,7 @@ var invoiceDetailSelector_1 = require("./view/invoicing/invoiceDetail/invoiceDet
|
|
|
2664
2664
|
Object.defineProperty(exports, "getInvoiceDetail", { enumerable: true, get: function () { return invoiceDetailSelector_1.getInvoiceDetail; } });
|
|
2665
2665
|
var createInvoiceReducer_1 = require("./view/invoicing/createInvoice/createInvoiceReducer");
|
|
2666
2666
|
Object.defineProperty(exports, "createInvoice", { enumerable: true, get: function () { return createInvoiceReducer_1.createInvoice; } });
|
|
2667
|
+
Object.defineProperty(exports, "fetchCreateInvoiceFormPage", { enumerable: true, get: function () { return createInvoiceReducer_1.fetchCreateInvoiceFormPage; } });
|
|
2667
2668
|
Object.defineProperty(exports, "resetCreateInvoice", { enumerable: true, get: function () { return createInvoiceReducer_1.resetCreateInvoice; } });
|
|
2668
2669
|
Object.defineProperty(exports, "updateInvoicingCreateInvoiceFormDraft", { enumerable: true, get: function () { return createInvoiceReducer_1.updateInvoicingCreateInvoiceFormDraft; } });
|
|
2669
2670
|
var createInvoiceFormConfig_1 = require("./view/invoicing/createInvoice/createInvoiceFormConfig");
|
|
@@ -5,6 +5,10 @@ import { CreateInvoiceState, InvoicingCreateInvoiceFormLocalData } from './creat
|
|
|
5
5
|
export declare const initialState: CreateInvoiceState;
|
|
6
6
|
export declare const createInvoice: import("@reduxjs/toolkit").ActionCreatorWithPayload<CreateInvoiceRequest, "invoicingCreateInvoice/createInvoice">, createInvoiceSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
7
7
|
invoiceId: ID;
|
|
8
|
-
}, "invoicingCreateInvoice/createInvoiceSuccess">, createInvoiceFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingCreateInvoice/createInvoiceFailure">,
|
|
8
|
+
}, "invoicingCreateInvoice/createInvoiceSuccess">, createInvoiceFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingCreateInvoice/createInvoiceFailure">, fetchCreateInvoiceFormPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
9
|
+
cacheOverride: boolean;
|
|
10
|
+
}], {
|
|
11
|
+
cacheOverride: boolean;
|
|
12
|
+
}, "invoicingCreateInvoice/fetchCreateInvoiceFormPage", never, never>, resetCreateInvoice: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingCreateInvoice/resetCreateInvoice">, updateInvoicingCreateInvoiceFormDraft: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingCreateInvoiceFormLocalData, "invoicingCreateInvoice/updateInvoicingCreateInvoiceFormDraft">;
|
|
9
13
|
declare const _default: import("redux").Reducer<CreateInvoiceState>;
|
|
10
14
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateInvoicingCreateInvoiceFormDraft = exports.resetCreateInvoice = exports.createInvoiceFailure = exports.createInvoiceSuccess = exports.createInvoice = exports.initialState = void 0;
|
|
4
|
+
exports.updateInvoicingCreateInvoiceFormDraft = exports.resetCreateInvoice = exports.fetchCreateInvoiceFormPage = exports.createInvoiceFailure = exports.createInvoiceSuccess = exports.createInvoice = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const createInvoiceFormConfig_1 = require("./createInvoiceFormConfig");
|
|
7
7
|
exports.initialState = {
|
|
@@ -18,6 +18,20 @@ const createInvoiceSlice = (0, toolkit_1.createSlice)({
|
|
|
18
18
|
name: 'invoicingCreateInvoice',
|
|
19
19
|
initialState: exports.initialState,
|
|
20
20
|
reducers: {
|
|
21
|
+
/**
|
|
22
|
+
* Trigger-only action for {@link fetchCreateInvoiceFormPageEpic}: fans out to
|
|
23
|
+
* the customer/plan/product/settings fetches, skipping any already cached
|
|
24
|
+
* unless `cacheOverride` is set. Holds no state of its own.
|
|
25
|
+
*/
|
|
26
|
+
fetchCreateInvoiceFormPage: {
|
|
27
|
+
reducer() {
|
|
28
|
+
// No state mutation; fetchCreateInvoiceFormPageEpic fans out to the
|
|
29
|
+
// customer/plan/product/settings fetches in response to this action.
|
|
30
|
+
},
|
|
31
|
+
prepare(payload) {
|
|
32
|
+
return { payload };
|
|
33
|
+
},
|
|
34
|
+
},
|
|
21
35
|
updateInvoicingCreateInvoiceFormDraft(draft, action) {
|
|
22
36
|
draft.formDraft = action.payload;
|
|
23
37
|
},
|
|
@@ -41,5 +55,5 @@ const createInvoiceSlice = (0, toolkit_1.createSlice)({
|
|
|
41
55
|
},
|
|
42
56
|
},
|
|
43
57
|
});
|
|
44
|
-
_a = createInvoiceSlice.actions, exports.createInvoice = _a.createInvoice, exports.createInvoiceSuccess = _a.createInvoiceSuccess, exports.createInvoiceFailure = _a.createInvoiceFailure, exports.resetCreateInvoice = _a.resetCreateInvoice, exports.updateInvoicingCreateInvoiceFormDraft = _a.updateInvoicingCreateInvoiceFormDraft;
|
|
58
|
+
_a = createInvoiceSlice.actions, exports.createInvoice = _a.createInvoice, exports.createInvoiceSuccess = _a.createInvoiceSuccess, exports.createInvoiceFailure = _a.createInvoiceFailure, exports.fetchCreateInvoiceFormPage = _a.fetchCreateInvoiceFormPage, exports.resetCreateInvoice = _a.resetCreateInvoice, exports.updateInvoicingCreateInvoiceFormDraft = _a.updateInvoicingCreateInvoiceFormDraft;
|
|
45
59
|
exports.default = createInvoiceSlice.reducer;
|
|
@@ -8,6 +8,7 @@ import { InvoicingCreateInvoiceFormLocalData } from './createInvoiceState';
|
|
|
8
8
|
export interface CreateInvoiceFormView extends SelectorView {
|
|
9
9
|
customers: InvoicingCustomer[];
|
|
10
10
|
localData: InvoicingCreateInvoiceFormLocalData;
|
|
11
|
+
planNames: string[];
|
|
11
12
|
plans: InvoicingProduct[];
|
|
12
13
|
products: InvoicingProduct[];
|
|
13
14
|
savedInvoiceId?: ID;
|
|
@@ -15,10 +15,14 @@ const settingsViewSelector_1 = require("../settingsView/settingsViewSelector");
|
|
|
15
15
|
const getCreateInvoiceFormView = (state) => {
|
|
16
16
|
const createInvoiceState = state.invoicingCreateInvoiceState;
|
|
17
17
|
const catalogListView = (0, invoicingCatalogListViewSelector_1.getInvoicingCatalogListView)(state);
|
|
18
|
+
const plans = (0, invoicingCatalogListViewSelector_1.getInvoicingCatalogPrices)(catalogListView.plans);
|
|
18
19
|
return {
|
|
19
20
|
customers: (0, invoicingCustomerListViewSelector_1.getInvoicingCustomerListView)(state).customers,
|
|
20
21
|
localData: createInvoiceState.formDraft,
|
|
21
|
-
|
|
22
|
+
planNames: plans
|
|
23
|
+
.map((plan) => plan.name ?? '')
|
|
24
|
+
.filter((name) => name !== ''),
|
|
25
|
+
plans,
|
|
22
26
|
products: (0, invoicingCatalogListViewSelector_1.getInvoicingCatalogPrices)(catalogListView.products),
|
|
23
27
|
savedInvoiceId: createInvoiceState.createdInvoiceId,
|
|
24
28
|
settings: (0, settingsViewSelector_1.getInvoicingSettings)(state),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { fetchInvoicingCatalogPlanList, fetchInvoicingCatalogProductList } from '../../invoicingCatalogListView/invoicingCatalogListViewReducer';
|
|
5
|
+
import { fetchInvoicingCustomerList } from '../../invoicingCustomerListView/invoicingCustomerListViewReducer';
|
|
6
|
+
import { fetchInvoicingSettings } from '../../settingsView/settingsViewReducer';
|
|
7
|
+
import { fetchCreateInvoiceFormPage } from '../createInvoiceReducer';
|
|
8
|
+
export type ActionType = ReturnType<typeof fetchCreateInvoiceFormPage> | ReturnType<typeof fetchInvoicingCustomerList> | ReturnType<typeof fetchInvoicingCatalogPlanList> | ReturnType<typeof fetchInvoicingCatalogProductList> | ReturnType<typeof fetchInvoicingSettings>;
|
|
9
|
+
/**
|
|
10
|
+
* Orchestrates the create-invoice form's option sources: on
|
|
11
|
+
* `fetchCreateInvoiceFormPage`, fans out to the customer, catalog plan, catalog
|
|
12
|
+
* product and settings fetches, skipping any already cached unless
|
|
13
|
+
* `cacheOverride` is set.
|
|
14
|
+
*/
|
|
15
|
+
export declare const fetchCreateInvoiceFormPageEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchCreateInvoiceFormPageEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const invoicingCatalogListViewReducer_1 = require("../../invoicingCatalogListView/invoicingCatalogListViewReducer");
|
|
7
|
+
const invoicingCustomerListViewReducer_1 = require("../../invoicingCustomerListView/invoicingCustomerListViewReducer");
|
|
8
|
+
const settingsViewReducer_1 = require("../../settingsView/settingsViewReducer");
|
|
9
|
+
const createInvoiceReducer_1 = require("../createInvoiceReducer");
|
|
10
|
+
/**
|
|
11
|
+
* Fetch unless the resource is already loaded or in flight — or always when the
|
|
12
|
+
* caller forces a refresh via `cacheOverride` (false on a plain page open, true
|
|
13
|
+
* to force a reload).
|
|
14
|
+
*/
|
|
15
|
+
const shouldFetch = (fetchStateAndError, cacheOverride) => cacheOverride ||
|
|
16
|
+
(fetchStateAndError.fetchState !== 'Completed' &&
|
|
17
|
+
fetchStateAndError.fetchState !== 'In-Progress');
|
|
18
|
+
/**
|
|
19
|
+
* Orchestrates the create-invoice form's option sources: on
|
|
20
|
+
* `fetchCreateInvoiceFormPage`, fans out to the customer, catalog plan, catalog
|
|
21
|
+
* product and settings fetches, skipping any already cached unless
|
|
22
|
+
* `cacheOverride` is set.
|
|
23
|
+
*/
|
|
24
|
+
const fetchCreateInvoiceFormPageEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(createInvoiceReducer_1.fetchCreateInvoiceFormPage.match), (0, operators_1.mergeMap)((action) => {
|
|
25
|
+
const { cacheOverride } = action.payload;
|
|
26
|
+
const state = state$.value;
|
|
27
|
+
const customerState = state.invoicingCustomerListViewState;
|
|
28
|
+
const catalogState = state.invoicingCatalogListViewState;
|
|
29
|
+
const settingsState = state.invoicingSettingsViewState;
|
|
30
|
+
const pageActions = [];
|
|
31
|
+
if (shouldFetch({ fetchState: customerState.fetchState, error: customerState.error }, cacheOverride)) {
|
|
32
|
+
pageActions.push((0, invoicingCustomerListViewReducer_1.fetchInvoicingCustomerList)({
|
|
33
|
+
filters: {},
|
|
34
|
+
keepExistingListItems: false,
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
if (shouldFetch({ fetchState: catalogState.fetchState, error: catalogState.error }, cacheOverride)) {
|
|
38
|
+
pageActions.push((0, invoicingCatalogListViewReducer_1.fetchInvoicingCatalogPlanList)({
|
|
39
|
+
filters: { type: 'plan' },
|
|
40
|
+
keepExistingListItems: false,
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
if (shouldFetch(catalogState.productFetchState, cacheOverride)) {
|
|
44
|
+
pageActions.push((0, invoicingCatalogListViewReducer_1.fetchInvoicingCatalogProductList)({
|
|
45
|
+
filters: { type: 'addon|charge' },
|
|
46
|
+
keepExistingListItems: false,
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
if (shouldFetch({ fetchState: settingsState.fetchState, error: settingsState.error }, cacheOverride)) {
|
|
50
|
+
pageActions.push((0, settingsViewReducer_1.fetchInvoicingSettings)());
|
|
51
|
+
}
|
|
52
|
+
return (0, rxjs_1.from)(pageActions);
|
|
53
|
+
}));
|
|
54
|
+
exports.fetchCreateInvoiceFormPageEpic = fetchCreateInvoiceFormPageEpic;
|
package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewPayload.js
CHANGED
|
@@ -12,7 +12,6 @@ const localDataToSaveInvoicingCouponPayload = (localData, isCreate) => {
|
|
|
12
12
|
discount_type: localData.discountType,
|
|
13
13
|
duration_type: localData.durationType,
|
|
14
14
|
name: localData.name.trim(),
|
|
15
|
-
status: 'active',
|
|
16
15
|
};
|
|
17
16
|
if (isCreate) {
|
|
18
17
|
data.id = localData.couponId.trim();
|
|
@@ -54,6 +54,7 @@ export interface BillDetailViewSelector extends SelectorView {
|
|
|
54
54
|
export interface StepWithStatus extends StepWithUser {
|
|
55
55
|
actorsActivity: ActorActivityWithUser[];
|
|
56
56
|
isOriginalApprovalStep: boolean;
|
|
57
|
+
displayPendingApproverAsAdmin?: boolean;
|
|
57
58
|
}
|
|
58
59
|
export interface ActorActivityWithUser {
|
|
59
60
|
activity: ActivityStatus;
|
|
@@ -62,6 +63,7 @@ export interface ActorActivityWithUser {
|
|
|
62
63
|
type: string;
|
|
63
64
|
userId: ID;
|
|
64
65
|
actor?: User;
|
|
66
|
+
isImplicitActor?: boolean;
|
|
65
67
|
lastUpdateTime?: ZeniDate;
|
|
66
68
|
subType?: string;
|
|
67
69
|
}
|
|
@@ -77,6 +79,7 @@ export interface BillActivity {
|
|
|
77
79
|
currentPendingStepIndex?: number;
|
|
78
80
|
entityApprovalId?: ID;
|
|
79
81
|
isAdminFallbackApprover?: boolean;
|
|
82
|
+
sodExcludedApproverUserId?: ID;
|
|
80
83
|
}
|
|
81
84
|
export declare const getBillActivities: (state: RootState, billId: ID, billStageCode?: BillStageCodeType) => BillActivity[];
|
|
82
85
|
export declare const getBillDetailView: (state: RootState, billId: ID) => BillDetailViewSelector;
|
|
@@ -63,7 +63,7 @@ const getBillActivities = (state, billId, billStageCode) => {
|
|
|
63
63
|
const approvalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, billDetail.approvalRuleIds);
|
|
64
64
|
const entityApprovalStatusByIds = (0, entityApprovalStatusSelector_1.getEntityApprovalStatusByIds)(entityApprovalStatusState, billDetail.entityApprovalIds);
|
|
65
65
|
billActivities = entityApprovalStatusByIds.map((entityApprovalStatus) => {
|
|
66
|
-
const { approvalRuleId, entityType, createTime, updateTime, stepsApprovalStatus, areApprovalsSerialized, isAdminFallbackApprover, isRealTimeApprovalEnabled, currentPendingStepIndex, } = entityApprovalStatus;
|
|
66
|
+
const { approvalRuleId, entityType, createTime, updateTime, stepsApprovalStatus, areApprovalsSerialized, isAdminFallbackApprover, isRealTimeApprovalEnabled, currentPendingStepIndex, sodExcludedApproverUserId, } = entityApprovalStatus;
|
|
67
67
|
const approvalRule = approvalRules.find((rule) => rule.approvalRuleId === approvalRuleId);
|
|
68
68
|
return {
|
|
69
69
|
approvalRuleId,
|
|
@@ -75,21 +75,22 @@ const getBillActivities = (state, billId, billStageCode) => {
|
|
|
75
75
|
isAdminFallbackApprover,
|
|
76
76
|
isRealTimeApprovalEnabled,
|
|
77
77
|
currentPendingStepIndex,
|
|
78
|
+
sodExcludedApproverUserId,
|
|
78
79
|
entityApprovalId: entityApprovalStatus.entityApprovalId,
|
|
79
80
|
stepsWithStatus: stepsApprovalStatus.map((step) => {
|
|
81
|
+
const actorsActivity = step.actorsActivity.map((activity) => ({
|
|
82
|
+
...activity,
|
|
83
|
+
actor: (0, userSelector_1.getUserByUserId)(userState, activity.userId),
|
|
84
|
+
}));
|
|
80
85
|
return {
|
|
81
86
|
...step,
|
|
82
87
|
actors: step.actors
|
|
83
88
|
.map((actor) => (0, userSelector_1.getUserByUserId)(userState, actor.userId))
|
|
84
89
|
.filter((user) => user != null),
|
|
85
90
|
nonUserActors: step.actors.filter((actor) => actor.userId == null && actor.type !== 'user'),
|
|
86
|
-
actorsActivity
|
|
87
|
-
return {
|
|
88
|
-
...activity,
|
|
89
|
-
actor: (0, userSelector_1.getUserByUserId)(userState, activity.userId),
|
|
90
|
-
};
|
|
91
|
-
}),
|
|
91
|
+
actorsActivity,
|
|
92
92
|
isOriginalApprovalStep: step.isOriginalApprovalStep,
|
|
93
|
+
displayPendingApproverAsAdmin: (0, helpers_1.isSodAdminFallbackEligibleForStep)(sodExcludedApproverUserId, isAdminFallbackApprover, actorsActivity),
|
|
93
94
|
};
|
|
94
95
|
}),
|
|
95
96
|
};
|
|
@@ -256,7 +257,7 @@ const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) =>
|
|
|
256
257
|
let isMarkAsPaidBtnVisible = false;
|
|
257
258
|
let rejectedId = -1;
|
|
258
259
|
const stepsWithStatusData = billActivities[0].stepsWithStatus;
|
|
259
|
-
const { areApprovalsSerialized, isAdminFallbackApprover, currentPendingStepIndex, } = billActivities[0];
|
|
260
|
+
const { areApprovalsSerialized, isAdminFallbackApprover, currentPendingStepIndex, sodExcludedApproverUserId, } = billActivities[0];
|
|
260
261
|
for (const [index, stepWithStatus] of stepsWithStatusData.entries()) {
|
|
261
262
|
if (stepWithStatus.action === 'require_approval') {
|
|
262
263
|
for (const actorActivity of stepWithStatus.actorsActivity) {
|
|
@@ -297,23 +298,42 @@ const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) =>
|
|
|
297
298
|
break;
|
|
298
299
|
}
|
|
299
300
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
301
|
+
const sodBlocked = (0, helpers_1.isSodExcludedViewerBlocked)(sodExcludedApproverUserId, signedInUser?.userId, pendingStep.actorsActivity);
|
|
302
|
+
if (isAllActivitiesPending) {
|
|
303
|
+
for (const actorActivity of pendingStep.actorsActivity) {
|
|
304
|
+
if (!sodBlocked &&
|
|
305
|
+
actorActivity.actor?.userId === signedInUser?.userId) {
|
|
306
|
+
isApprovalorRejectBtnVisible = true;
|
|
307
|
+
isMarkAsPaidBtnVisible = isLastApprovalStep;
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
305
310
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
actorActivity.
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
311
|
+
}
|
|
312
|
+
if (!isApprovalorRejectBtnVisible) {
|
|
313
|
+
for (const actorActivity of pendingStep.actorsActivity) {
|
|
314
|
+
// admin will be fallback approver if vendor-owner/manager are not assigned any user id
|
|
315
|
+
if (actorActivity.type === 'attribute' &&
|
|
316
|
+
(actorActivity.subType === 'manager' ||
|
|
317
|
+
actorActivity.subType === 'vendor_owner') &&
|
|
318
|
+
actorActivity.userId === null &&
|
|
319
|
+
isAdminFallbackApprover === true &&
|
|
320
|
+
isUserAdmin &&
|
|
321
|
+
signedInUser?.userId != null &&
|
|
322
|
+
signedInUser.userId !== sodExcludedApproverUserId) {
|
|
323
|
+
isApprovalorRejectBtnVisible = true;
|
|
324
|
+
isMarkAsPaidBtnVisible = isLastApprovalStep;
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
315
327
|
}
|
|
316
328
|
}
|
|
329
|
+
if (!isApprovalorRejectBtnVisible &&
|
|
330
|
+
isUserAdmin &&
|
|
331
|
+
signedInUser?.userId != null &&
|
|
332
|
+
signedInUser.userId !== sodExcludedApproverUserId &&
|
|
333
|
+
pendingStep.displayPendingApproverAsAdmin === true) {
|
|
334
|
+
isApprovalorRejectBtnVisible = true;
|
|
335
|
+
isMarkAsPaidBtnVisible = isLastApprovalStep;
|
|
336
|
+
}
|
|
317
337
|
}
|
|
318
338
|
}
|
|
319
339
|
}
|
|
@@ -327,23 +347,42 @@ const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) =>
|
|
|
327
347
|
break;
|
|
328
348
|
}
|
|
329
349
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
350
|
+
const sodBlocked = (0, helpers_1.isSodExcludedViewerBlocked)(sodExcludedApproverUserId, signedInUser?.userId, stepWithStatus.actorsActivity);
|
|
351
|
+
if (isAllActivitiesPending) {
|
|
352
|
+
for (const actorActivity of stepWithStatus.actorsActivity) {
|
|
353
|
+
if (!sodBlocked &&
|
|
354
|
+
actorActivity.actor?.userId === signedInUser?.userId) {
|
|
355
|
+
isApprovalorRejectBtnVisible = true;
|
|
356
|
+
isMarkAsPaidBtnVisible = true;
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
335
359
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
actorActivity.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
360
|
+
}
|
|
361
|
+
if (!isApprovalorRejectBtnVisible) {
|
|
362
|
+
for (const actorActivity of stepWithStatus.actorsActivity) {
|
|
363
|
+
// admin will be fallback approver if vendor-owner/manager are not assigned any user id
|
|
364
|
+
if (actorActivity.type === 'attribute' &&
|
|
365
|
+
(actorActivity.subType === 'manager' ||
|
|
366
|
+
actorActivity.subType === 'vendor_owner') &&
|
|
367
|
+
actorActivity.userId === null &&
|
|
368
|
+
isAdminFallbackApprover === true &&
|
|
369
|
+
isUserAdmin &&
|
|
370
|
+
signedInUser?.userId != null &&
|
|
371
|
+
signedInUser.userId !== sodExcludedApproverUserId) {
|
|
372
|
+
isApprovalorRejectBtnVisible = true;
|
|
373
|
+
isMarkAsPaidBtnVisible = true;
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
345
376
|
}
|
|
346
377
|
}
|
|
378
|
+
if (!isApprovalorRejectBtnVisible &&
|
|
379
|
+
isUserAdmin &&
|
|
380
|
+
signedInUser?.userId != null &&
|
|
381
|
+
signedInUser.userId !== sodExcludedApproverUserId &&
|
|
382
|
+
stepWithStatus.displayPendingApproverAsAdmin === true) {
|
|
383
|
+
isApprovalorRejectBtnVisible = true;
|
|
384
|
+
isMarkAsPaidBtnVisible = true;
|
|
385
|
+
}
|
|
347
386
|
}
|
|
348
387
|
if (isApprovalorRejectBtnVisible) {
|
|
349
388
|
break;
|
|
@@ -297,7 +297,7 @@ const getApproversOrRejectors = (billTransaction, entityApprovalStatusState, use
|
|
|
297
297
|
};
|
|
298
298
|
if (billTransaction.entityApprovalId !== null) {
|
|
299
299
|
const entityApprovalStatus = entityApprovalStatusState.entityApprovalStatusById[billTransaction.entityApprovalId];
|
|
300
|
-
const { areApprovalsSerialized, isAdminFallbackApprover, currentPendingStepIndex, } = entityApprovalStatus;
|
|
300
|
+
const { areApprovalsSerialized, isAdminFallbackApprover, currentPendingStepIndex, sodExcludedApproverUserId, } = entityApprovalStatus;
|
|
301
301
|
const isBillSerailized = areApprovalsSerialized === true &&
|
|
302
302
|
currentPendingStepIndex != null &&
|
|
303
303
|
currentPendingStepIndex > -1;
|
|
@@ -325,23 +325,20 @@ const getApproversOrRejectors = (billTransaction, entityApprovalStatusState, use
|
|
|
325
325
|
if (isBillSerailized) {
|
|
326
326
|
requireApprovalInfo = [stepsApprovalStatus[currentPendingStepIndex]];
|
|
327
327
|
}
|
|
328
|
-
const pendingActivitiesList = [];
|
|
329
328
|
requireApprovalInfo.forEach((approvalStep) => {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
if (isBillSerailized) {
|
|
333
|
-
pendingActivitiesList.push(...pendingActivities);
|
|
329
|
+
if (approvers.displayPendingApproverAsAdmin === true) {
|
|
330
|
+
return;
|
|
334
331
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
332
|
+
const pendingActivities = approvalStep.actorsActivity.filter((activity) => activity.activity === 'pending');
|
|
333
|
+
const sodDisplayAsAdmin = (0, helpers_1.isSodAdminFallbackEligibleForStep)(sodExcludedApproverUserId, isAdminFallbackApprover, approvalStep.actorsActivity);
|
|
334
|
+
const activitiesToShow = isBillSerailized
|
|
335
|
+
? pendingActivities
|
|
336
|
+
: pendingActivities.slice(0, 1);
|
|
337
|
+
if (sodDisplayAsAdmin) {
|
|
338
|
+
approvers.displayPendingApproverAsAdmin = true;
|
|
339
|
+
return;
|
|
341
340
|
}
|
|
342
|
-
|
|
343
|
-
if (pendingActivitiesList.length > 0) {
|
|
344
|
-
pendingActivitiesList.forEach((activity) => {
|
|
341
|
+
activitiesToShow.forEach((activity) => {
|
|
345
342
|
const user = (0, userSelector_1.getUserByUserId)(userState, activity.userId);
|
|
346
343
|
if (user != null) {
|
|
347
344
|
approvers.users.push(user);
|
|
@@ -353,7 +350,7 @@ const getApproversOrRejectors = (billTransaction, entityApprovalStatusState, use
|
|
|
353
350
|
}
|
|
354
351
|
}
|
|
355
352
|
});
|
|
356
|
-
}
|
|
353
|
+
});
|
|
357
354
|
}
|
|
358
355
|
}
|
|
359
356
|
}
|
|
@@ -38,7 +38,7 @@ const billPayReviewSelector_1 = require("../billPayReview/billPayReviewSelector"
|
|
|
38
38
|
const billPaySetupApproverViewSelector_1 = require("../billPaySetupApproverView/billPaySetupApproverViewSelector");
|
|
39
39
|
const previousBillsSelector_1 = require("../previousBills/previousBillsSelector");
|
|
40
40
|
const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAccountsEnabled, billId) => {
|
|
41
|
-
const { accountListState, accountState, bankAccountState, billDetailViewState, paymentAccountListState, billTransactionState, billPayConfigState, classListState, classState, editBillDetailViewState, paymentAccountState, vendorState, tenantState, companyState, userState, commonHistoryState, contactState, paymentInstrumentState, recurringBillState, depositAccountListState, depositAccountState,
|
|
41
|
+
const { accountListState, accountState, bankAccountState, billDetailViewState, paymentAccountListState, billTransactionState, billPayConfigState, classListState, classState, editBillDetailViewState, paymentAccountState, vendorState, tenantState, companyState, userState, commonHistoryState, contactState, paymentInstrumentState, recurringBillState, depositAccountListState, depositAccountState, plaidAccountViewState, } = state;
|
|
42
42
|
const transaction = (0, get_1.default)(billTransactionState.transactionById, billId ?? '', undefined);
|
|
43
43
|
let recommendations = {};
|
|
44
44
|
if (billId != null) {
|
|
@@ -186,7 +186,6 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
186
186
|
const fetchStateList = [
|
|
187
187
|
sourceBillDetail.fetchStatus,
|
|
188
188
|
accountListState.byReportId.billPayAccountList,
|
|
189
|
-
billPaySetupApproverViewState,
|
|
190
189
|
];
|
|
191
190
|
if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
|
|
192
191
|
fetchStateList.push(classListState);
|
|
@@ -207,7 +206,6 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
207
206
|
else {
|
|
208
207
|
const newBillFetchStateList = [
|
|
209
208
|
accountListState.byReportId.billPayAccountList,
|
|
210
|
-
billPaySetupApproverViewState,
|
|
211
209
|
];
|
|
212
210
|
if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
|
|
213
211
|
newBillFetchStateList.push(classListState);
|
package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { fetchVendorTypeList } from '../../../../vendorTypeList/vendorTypeListRe
|
|
|
8
8
|
import { fetchDepositAccountList } from '../../../zeniAccounts/depositAccountList/depositAccountListReducer';
|
|
9
9
|
import { fetchPaymentAccountList } from '../../../zeniAccounts/paymentAccountList/paymentAccountListReducer';
|
|
10
10
|
import { fetchBillPayConfig } from '../../billPayConfig/billPayConfigReducer';
|
|
11
|
-
import { fetchBillPaySetupApproverView } from '../../billPaySetupApproverView/billPaySetupApproverViewReducer';
|
|
12
11
|
import { fetchBillAndInitializeLocalStore, fetchEditBillDetailPage, updateShowAutofill } from '../editBillViewReducer';
|
|
13
|
-
export type ActionType = ReturnType<typeof fetchEditBillDetailPage> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchVendorTypeList> | ReturnType<typeof fetchAccountList> | ReturnType<typeof fetchPaymentAccountList> | ReturnType<typeof fetchDepositAccountList> | ReturnType<typeof fetchBillPayConfig> | ReturnType<typeof updateShowAutofill> | ReturnType<typeof
|
|
12
|
+
export type ActionType = ReturnType<typeof fetchEditBillDetailPage> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchVendorTypeList> | ReturnType<typeof fetchAccountList> | ReturnType<typeof fetchPaymentAccountList> | ReturnType<typeof fetchDepositAccountList> | ReturnType<typeof fetchBillPayConfig> | ReturnType<typeof updateShowAutofill> | ReturnType<typeof fetchOwnerList> | ReturnType<typeof fetchBillAndInitializeLocalStore>;
|
|
14
13
|
export declare const fetchEditBillDetailPageEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|