@zeniai/client-epic-state 4.12.98 → 4.12.99
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/commonPayloadTypes/commonPayload.d.ts +7 -0
- package/lib/commonStateTypes/common.d.ts +2 -0
- package/lib/commonStateTypes/common.js +5 -1
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +1 -0
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +2 -1
- package/lib/commonStateTypes/timePeriod.d.ts +16 -0
- package/lib/commonStateTypes/timePeriod.js +31 -1
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/company/companyPayload.d.ts +4 -0
- package/lib/entity/company/companyPayload.js +6 -3
- package/lib/entity/company/companyReducer.d.ts +4 -1
- package/lib/entity/company/companyReducer.js +6 -2
- package/lib/entity/company/companyStateTypes.d.ts +5 -1
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/file/fileState.js +2 -0
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +7 -1
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +3 -1
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +3 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +2 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +12 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +32 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +53 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.d.ts +12 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.js +25 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.d.ts +7 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.js +36 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +38 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.js +10 -0
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.d.ts +11 -2
- package/lib/entity/tenant/clearAllEpic.js +18 -0
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +4 -1
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +32 -2
- package/lib/entity/tenant/tenantPayload.d.ts +1 -0
- package/lib/entity/tenant/tenantReducer.js +3 -0
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/entity/transaction/payloadTypes/attachmentPayload.d.ts +1 -1
- package/lib/entity/transaction/payloadTypes/attachmentPayload.js +3 -3
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +2 -2
- package/lib/entity/transaction/transactionSelector.d.ts +1 -0
- package/lib/entity/transaction/transactionSelector.js +7 -1
- package/lib/entity/user/userPayload.d.ts +1 -0
- package/lib/entity/user/userReducer.js +9 -8
- package/lib/entity/user/userState.d.ts +1 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +1 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +35 -1
- package/lib/entity/vendor/vendorPayload.js +3 -2
- package/lib/entity/vendor/vendorState.d.ts +3 -3
- package/lib/entity/vendor/vendorType.d.ts +0 -2
- package/lib/entity/vendor/vendorType.js +1 -4
- package/lib/epic.d.ts +15 -1
- package/lib/epic.js +15 -1
- package/lib/index.d.ts +52 -13
- package/lib/index.js +83 -25
- package/lib/reducer.d.ts +28 -1
- package/lib/reducer.js +28 -1
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +7 -1
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +7 -1
- package/lib/view/addressView/addressViewState.d.ts +1 -1
- package/lib/view/addressView/toAddressViewLocalData.js +5 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -1
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +10 -5
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +10 -7
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportTemplatesEpic.js +4 -4
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +4 -4
- package/lib/view/companyMonthEndReportView/epics/improveUsingZeniGPTEpic.js +5 -3
- package/lib/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +3 -3
- package/lib/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +3 -3
- package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +1 -6
- package/lib/view/companyView/selectorHelpers/getCompanyView.js +4 -0
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +2 -0
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +7 -1
- package/lib/view/companyView/types/companyView.d.ts +1 -0
- package/lib/view/countryList/countryListReducer.d.ts +17 -0
- package/lib/view/countryList/countryListReducer.js +58 -0
- package/lib/view/countryList/countryListSelector.d.ts +7 -0
- package/lib/view/countryList/countryListSelector.js +13 -0
- package/lib/view/countryList/countryListState.d.ts +12 -0
- package/lib/view/countryList/countryListState.js +2 -0
- package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +6 -0
- package/lib/view/countryList/epics/fetchCountryListEpic.js +19 -0
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +7 -0
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +38 -0
- package/lib/view/countryList/payloads/countryListPayload.d.ts +6 -0
- package/lib/view/countryList/payloads/countryListPayload.js +10 -0
- package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +11 -0
- package/lib/view/countryList/payloads/nationalityCountryListPayload.js +2 -0
- package/lib/view/dashboard/dashboardEpic.d.ts +2 -1
- package/lib/view/dashboard/dashboardEpic.js +22 -2
- package/lib/view/dashboard/dashboardReducer.d.ts +3 -2
- package/lib/view/dashboard/dashboardReducer.js +2 -1
- package/lib/view/dashboard/dashboardSelector.d.ts +2 -0
- package/lib/view/dashboard/dashboardSelector.js +10 -2
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +72 -0
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +11 -0
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +53 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.d.ts +11 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +66 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +39 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +22 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +59 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +44 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +28 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +44 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.js +58 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +12 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewPayload.d.ts +3 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewPayload.js +2 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +17 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +66 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.d.ts +3 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +97 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +11 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewState.js +14 -0
- package/lib/view/expenseAutomationView/helpers/helpers.d.ts +7 -0
- package/lib/view/expenseAutomationView/helpers/helpers.js +67 -0
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +76 -0
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +9 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +36 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +16 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +2 -0
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +34 -0
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +205 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +53 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +245 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +31 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +130 -0
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +5 -0
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +45 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +35 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +47 -0
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +32 -0
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +28 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +11 -0
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.d.ts +3 -0
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +55 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +7 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +95 -0
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +3 -0
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +61 -0
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +53 -0
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +5 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +31 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +2 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +20 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +13 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +28 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +15 -0
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.d.ts +8 -0
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +58 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +3 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.js +2 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +16 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +36 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +10 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +27 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +5 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.js +2 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +8 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +3 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +5 -4
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +2 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +6 -3
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +3 -2
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsPageEpic.js +1 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +2 -2
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.js +19 -5
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +8 -3
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +39 -57
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +13 -8
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +19 -12
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +1 -0
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +4 -3
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailState.d.ts +2 -0
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -4
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +2 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +2 -2
- package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +2 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +7 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +36 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +6 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +40 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +9 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +67 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +26 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +22 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +22 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +89 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +15 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +30 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +20 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +2 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +31 -6
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +5 -2
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -1
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -2
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -0
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +4 -0
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/parseReceiptsToRemiEpic.js +2 -2
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.js +2 -2
- package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
- package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +1 -1
- package/lib/view/zeniAccStatementList/zeniAccStatementList.d.ts +2 -5
- package/package.json +1 -1
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +0 -1
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +0 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearAllMonthEndCloseChecksView = exports.updateMonthEndCloseChecksView = exports.fetchMonthEndCloseChecks = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
7
|
+
exports.initialState = {
|
|
8
|
+
monthEndCloseChecksViewByTenantId: {},
|
|
9
|
+
};
|
|
10
|
+
const monthEndCloseChecksView = (0, toolkit_1.createSlice)({
|
|
11
|
+
name: 'monthEndCloseChecksView',
|
|
12
|
+
initialState: exports.initialState,
|
|
13
|
+
reducers: {
|
|
14
|
+
fetchMonthEndCloseChecks(draft, action) {
|
|
15
|
+
const { tenantId, period } = action.payload;
|
|
16
|
+
const monthYearId = (0, timePeriod_1.toMonthYearPeriodId)(period);
|
|
17
|
+
draft.monthEndCloseChecksViewByTenantId = Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId), { [tenantId]: Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId[tenantId]), { [monthYearId]: {
|
|
18
|
+
fetchState: 'In-Progress',
|
|
19
|
+
error: undefined,
|
|
20
|
+
} }) });
|
|
21
|
+
},
|
|
22
|
+
updateMonthEndCloseChecksView(draft, action) {
|
|
23
|
+
const { tenantId, period, error, fetchState } = action.payload;
|
|
24
|
+
const monthYearId = (0, timePeriod_1.toMonthYearPeriodId)(period);
|
|
25
|
+
draft.monthEndCloseChecksViewByTenantId = Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId), { [tenantId]: Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId[tenantId]), { [monthYearId]: {
|
|
26
|
+
fetchState,
|
|
27
|
+
error: error,
|
|
28
|
+
} }) });
|
|
29
|
+
},
|
|
30
|
+
clearAllMonthEndCloseChecksView(draft) {
|
|
31
|
+
draft.monthEndCloseChecksViewByTenantId = {};
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
_a = monthEndCloseChecksView.actions, exports.fetchMonthEndCloseChecks = _a.fetchMonthEndCloseChecks, exports.updateMonthEndCloseChecksView = _a.updateMonthEndCloseChecksView, exports.clearAllMonthEndCloseChecksView = _a.clearAllMonthEndCloseChecksView;
|
|
36
|
+
exports.default = monthEndCloseChecksView.reducer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import { RootState } from '../../reducer';
|
|
4
|
+
import { MonthEndCloseChecksInfo } from '../../entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
5
|
+
import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
6
|
+
export interface MonthEndCloseChecksView extends SelectorView {
|
|
7
|
+
monthEndCloseChecks?: MonthEndCloseChecksInfo;
|
|
8
|
+
selectedPeriod: MonthYearPeriod;
|
|
9
|
+
}
|
|
10
|
+
export declare const getMonthEndCloseChecksViewByTenantId: (state: RootState, tenantId: ID) => MonthEndCloseChecksView;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMonthEndCloseChecksViewByTenantId = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
const monthEndCloseChecksSelector_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksSelector");
|
|
6
|
+
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
7
|
+
exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((state) => state.monthEndCloseChecksState, (state) => state.monthEndCloseChecksViewState, (state) => state.expenseAutomationViewState, (_state, tenantId) => tenantId, (monthEndCloseChecksState, monthEndCloseChecksViewState, expenseAutomationViewState, tenantId) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const selectedPeriod = expenseAutomationViewState.selectedPeriodByTenantId[tenantId];
|
|
10
|
+
const { monthEndCloseChecksViewByTenantId } = monthEndCloseChecksViewState;
|
|
11
|
+
const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
|
|
12
|
+
const monthEndCloseChecksView = monthYearPeriodId != null
|
|
13
|
+
? (_a = monthEndCloseChecksViewByTenantId[tenantId]) === null || _a === void 0 ? void 0 : _a[monthYearPeriodId]
|
|
14
|
+
: undefined;
|
|
15
|
+
const monthEndCloseChecks = monthYearPeriodId != null
|
|
16
|
+
? (0, monthEndCloseChecksSelector_1.getMonthEndCloseChecksByTenantId)(monthEndCloseChecksState, tenantId, monthYearPeriodId)
|
|
17
|
+
: undefined;
|
|
18
|
+
if (monthEndCloseChecksView != null && monthEndCloseChecks != null) {
|
|
19
|
+
return Object.assign(Object.assign({}, monthEndCloseChecksView), { monthEndCloseChecks, reportId: 'expense_automation_card', selectedPeriod });
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
fetchState: 'Not-Started',
|
|
23
|
+
error: undefined,
|
|
24
|
+
reportId: 'expense_automation_card',
|
|
25
|
+
selectedPeriod,
|
|
26
|
+
};
|
|
27
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { MonthYearPeriodId } from '../../commonStateTypes/timePeriod';
|
|
3
|
+
export interface MonthEndCloseChecksViewState {
|
|
4
|
+
monthEndCloseChecksViewByTenantId: Record<ID, Record<MonthYearPeriodId, FetchStateAndError>>;
|
|
5
|
+
}
|
|
@@ -2,10 +2,17 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { RootState } from '../../../../../reducer';
|
|
3
3
|
import { fetchOnboardingCustomerSetupView } from '../../onboardingCustomerViewReducer';
|
|
4
4
|
import { fetchCompanyConfig } from '../../../../companyConfigView/companyConfigReducer';
|
|
5
|
-
|
|
5
|
+
import { fetchCountryList } from '../../../../countryList/countryListReducer';
|
|
6
|
+
export declare type ActionType = ReturnType<typeof fetchOnboardingCustomerSetupView> | ReturnType<typeof fetchCountryList> | ReturnType<typeof fetchCompanyConfig>;
|
|
6
7
|
export declare const fetchOnboardingCustomerViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<{
|
|
7
8
|
payload: undefined;
|
|
8
9
|
type: string;
|
|
10
|
+
} | {
|
|
11
|
+
payload: {
|
|
12
|
+
countryListKey: "nationalityCountryList";
|
|
13
|
+
cacheOverride: any;
|
|
14
|
+
};
|
|
15
|
+
type: string;
|
|
9
16
|
} | {
|
|
10
17
|
payload: {
|
|
11
18
|
companyId: string;
|
package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js
CHANGED
|
@@ -5,14 +5,16 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const onboardingCustomerViewReducer_1 = require("../../onboardingCustomerViewReducer");
|
|
7
7
|
const companyConfigReducer_1 = require("../../../../companyConfigView/companyConfigReducer");
|
|
8
|
+
const countryListReducer_1 = require("../../../../countryList/countryListReducer");
|
|
8
9
|
const fetchOnboardingCustomerViewEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.fetchOnboardingCustomerView.match), (0, operators_1.switchMap)((action) => {
|
|
9
10
|
const { companyId, cacheOverride, reCalculateCurrentStep } = action.payload;
|
|
10
11
|
if (cacheOverride === true) {
|
|
11
|
-
return (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.fetchOnboardingCustomerSetupView)(companyId, cacheOverride, reCalculateCurrentStep), (0, companyConfigReducer_1.fetchCompanyConfig)());
|
|
12
|
+
return (0, rxjs_1.of)((0, countryListReducer_1.fetchCountryList)('nationalityCountryList', true), (0, onboardingCustomerViewReducer_1.fetchOnboardingCustomerSetupView)(companyId, cacheOverride, reCalculateCurrentStep), (0, companyConfigReducer_1.fetchCompanyConfig)());
|
|
12
13
|
}
|
|
13
14
|
else {
|
|
14
15
|
const state = state$.value;
|
|
15
16
|
const fetchActions = [];
|
|
17
|
+
fetchActions.push((0, countryListReducer_1.fetchCountryList)('nationalityCountryList'));
|
|
16
18
|
if (state.onboardingCustomerViewState.fetchState !== 'In-Progress' &&
|
|
17
19
|
!state.onboardingCustomerViewState.hasValidState()) {
|
|
18
20
|
fetchActions.push((0, onboardingCustomerViewReducer_1.fetchOnboardingCustomerSetupView)(companyId, cacheOverride, reCalculateCurrentStep));
|
|
@@ -16,7 +16,7 @@ const getCompanyView_1 = require("../../../../companyView/selectorHelpers/getCom
|
|
|
16
16
|
const onboardingCustomerViewReducer_1 = require("../../onboardingCustomerViewReducer");
|
|
17
17
|
const updateBusinessVerificationDetailsEpic_1 = require("../../../../spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic");
|
|
18
18
|
const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.updateOnboardingCustomerView.match), (0, operators_1.mergeMap)((action) => {
|
|
19
|
-
var _a, _b, _c;
|
|
19
|
+
var _a, _b, _c, _d;
|
|
20
20
|
const { companyId, officerType, sendForVerification, reCalculateCurrentStep = false, } = action.payload;
|
|
21
21
|
const { onboardingCustomerViewState } = state$.value;
|
|
22
22
|
const { companyDetails, primaryContactDetails, companyOfficerUpdateStatus, currentStep, } = onboardingCustomerViewState;
|
|
@@ -27,14 +27,15 @@ const updateOnboardingCustomerViewEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
27
27
|
const companyView = (0, getCompanyView_1.getCompanyView)(state$.value, companyId, []);
|
|
28
28
|
const { newAddressState } = state$.value.addressViewState;
|
|
29
29
|
const companyAddressToCreate = (_a = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_address) === null || _a === void 0 ? void 0 : _a.addressToCreate;
|
|
30
|
+
const registeredAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_registered_address) === null || _b === void 0 ? void 0 : _b.addressToCreate;
|
|
30
31
|
const addressType = officerType
|
|
31
32
|
.toLowerCase()
|
|
32
33
|
.concat('_address');
|
|
33
|
-
const companyOfficerAddressToCreate = (
|
|
34
|
+
const companyOfficerAddressToCreate = (_c = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState[addressType]) === null || _c === void 0 ? void 0 : _c.addressToCreate;
|
|
34
35
|
const isNewPrimaryContactUser = (primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.userId) == null ||
|
|
35
36
|
(primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.email) !==
|
|
36
|
-
((
|
|
37
|
-
const company = (0, updateBusinessVerificationDetailsEpic_1.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate);
|
|
37
|
+
((_d = companyView === null || companyView === void 0 ? void 0 : companyView.primaryContact) === null || _d === void 0 ? void 0 : _d.user.email);
|
|
38
|
+
const company = (0, updateBusinessVerificationDetailsEpic_1.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate, registeredAddressToCreate);
|
|
38
39
|
const primary_contact_user = primaryContactLocalData != null &&
|
|
39
40
|
Boolean(primaryContactLocalData.email) === true // Don't save Empty Primary Contact details
|
|
40
41
|
? (0, updateBusinessVerificationDetailsEpic_1.toBusinessVerificationPrimaryContactDataPayload)(primaryContactLocalData, isNewPrimaryContactUser)
|
|
@@ -14,6 +14,7 @@ import { TenantExternalConnections, TenantProductSettings } from '../../../entit
|
|
|
14
14
|
import { AccountingConnectionCreationMode } from '../../../entity/company/companyStateTypes';
|
|
15
15
|
import { FileState } from '../../../entity/file/fileState';
|
|
16
16
|
import { PlaidConnectionDetails } from '../../spendManagement/plaidAccount/plaidAccountViewState';
|
|
17
|
+
import { Country } from '../../countryList/countryListState';
|
|
17
18
|
export interface OnboardingCustomerView {
|
|
18
19
|
companyDetailsLocalData?: CompanyDetails;
|
|
19
20
|
companyOfficerLocalData: Record<CompanyOfficerType, CompanyOfficersDetails | undefined>;
|
|
@@ -34,6 +35,7 @@ export interface OnboardingCustomerView {
|
|
|
34
35
|
allStepsCompleted: boolean;
|
|
35
36
|
allSteps: OnboardingStep[];
|
|
36
37
|
companyIndustries: AllowedValueWithCode[];
|
|
38
|
+
allNationalityCountries: Country[];
|
|
37
39
|
updateStatus: FetchStateAndError;
|
|
38
40
|
fetchStatus: FetchStateAndError;
|
|
39
41
|
saveStatus: FetchStateAndError;
|
|
@@ -14,7 +14,7 @@ const userRoleSelector_1 = require("../../../entity/userRole/userRoleSelector");
|
|
|
14
14
|
const fileSelector_1 = require("../../../entity/file/fileSelector");
|
|
15
15
|
function getOnboardingCustomerView(state, companyId) {
|
|
16
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
17
|
-
const { fileState, paymentAccountState, onboardingCustomerViewState, userState, userRoleState, subscriptionPaymentAccountState, companyConfigState, cardPaymentViewState, } = state;
|
|
17
|
+
const { fileState, paymentAccountState, onboardingCustomerViewState, userState, userRoleState, subscriptionPaymentAccountState, companyConfigState, cardPaymentViewState, countryListState, } = state;
|
|
18
18
|
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, subscriptionPaymentAccountIds, paymentAccountDetails, plaidConnectionDetails, updateStatus, saveStatus, currentStep, uiState, fetchState, error, } = onboardingCustomerViewState;
|
|
19
19
|
const { paymentAccountIds } = paymentAccountDetails;
|
|
20
20
|
let subscriptionPaymentAccount;
|
|
@@ -94,10 +94,12 @@ function getOnboardingCustomerView(state, companyId) {
|
|
|
94
94
|
{ fetchState: configFetchState, error: configError },
|
|
95
95
|
{ fetchState, error },
|
|
96
96
|
]);
|
|
97
|
+
const allNationalityCountries = countryListState.byCountryListCode.nationalityCountryList.countries;
|
|
97
98
|
return {
|
|
98
99
|
companyDetailsLocalData,
|
|
99
100
|
companyOfficerLocalData,
|
|
100
101
|
companyView,
|
|
102
|
+
allNationalityCountries,
|
|
101
103
|
pendingSaveDetails: {
|
|
102
104
|
companyDetails: isCompanyDetailsSavePending(fileState, companyView, primaryContact, companyDetailsLocalData),
|
|
103
105
|
officer: isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileState, companyOfficerLocalData[selectedOfficerType]),
|
|
@@ -244,8 +246,8 @@ function isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileS
|
|
|
244
246
|
if (selectedOfficerIndex < 0) {
|
|
245
247
|
selectedOfficerIndex = 0;
|
|
246
248
|
}
|
|
247
|
-
const { userId, firstName, lastName, birthday, email, phone: userPhone, ssn, } = companyOfficers[selectedOfficerIndex];
|
|
248
|
-
const { firstName: firstNameLocalData, lastName: lastNameLocalData, birthday: birthdayLocalData, email: emailLocalData, phone, ssn: ssnLocalData, fileIds: officerFileIds, documentTypeSelectedForVerification, ownershipInCompany, titleAtCompany, } = officerDetails;
|
|
249
|
+
const { userId, firstName, lastName, birthday, email, phone: userPhone, ssn, nationalityCountryCode, } = companyOfficers[selectedOfficerIndex];
|
|
250
|
+
const { firstName: firstNameLocalData, lastName: lastNameLocalData, birthday: birthdayLocalData, email: emailLocalData, phone, ssn: ssnLocalData, nationalityCountryCode: nccLocalData, fileIds: officerFileIds, documentTypeSelectedForVerification, ownershipInCompany, titleAtCompany, } = officerDetails;
|
|
249
251
|
const fileIdsLocalData = (0, fileSelector_1.getFilesByFileIds)(fileState, officerFileIds).map((file) => file.fileId);
|
|
250
252
|
const userRole = companyOfficerRoles.find((userRole) => userRole.userId === userId);
|
|
251
253
|
const fileIds = (0, fileSelector_1.getFilesByFileIds)(fileState, (_a = userRole === null || userRole === void 0 ? void 0 : userRole.fileIds) !== null && _a !== void 0 ? _a : []).map((file) => file.fileId);
|
|
@@ -255,6 +257,7 @@ function isOfficerDetailsSavePending(companyOfficers, companyOfficerRoles, fileS
|
|
|
255
257
|
email != emailLocalData ||
|
|
256
258
|
userPhone != phone ||
|
|
257
259
|
ssn != ssnLocalData ||
|
|
260
|
+
nationalityCountryCode != nccLocalData ||
|
|
258
261
|
(userRole === null || userRole === void 0 ? void 0 : userRole.documentTypeSelectedForVerification) !=
|
|
259
262
|
documentTypeSelectedForVerification ||
|
|
260
263
|
(userRole === null || userRole === void 0 ? void 0 : userRole.titleAtCompany) != titleAtCompany ||
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getReimbursementCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing";
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -3,7 +3,7 @@ import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
|
3
3
|
import { OnboardingInfo } from '../../entity/company/companyStateTypes';
|
|
4
4
|
import { ZeniDate } from '../../zeniDayJS';
|
|
5
5
|
import { AuditSummaryPayload, ReviewCompanyPayload } from './reviewCompanyPayload';
|
|
6
|
-
export declare const toReviewColumnKeyType: (v: string) => "companyName" | "
|
|
6
|
+
export declare const toReviewColumnKeyType: (v: string) => "companyName" | "auditScore" | "miscategorized" | "notes" | "uncategorized" | "warnings" | "vendorReview" | "reviewVendor";
|
|
7
7
|
export declare type ReviewCompanyColumnKey = ReturnType<typeof toReviewColumnKeyType>;
|
|
8
8
|
export declare type ReviewTransactionsType = 'income' | 'expense';
|
|
9
9
|
export interface AuditSummary {
|
package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const toLinkBillExpenseKeysType: (v: string) => "attachment" | "name" | "amount" | "
|
|
1
|
+
declare const toLinkBillExpenseKeysType: (v: string) => "attachment" | "name" | "amount" | "transactionType" | "memo" | "creationDate";
|
|
2
2
|
export declare type LinkBillExpenseKey = ReturnType<typeof toLinkBillExpenseKeysType>;
|
|
3
3
|
export {};
|
|
@@ -11,11 +11,12 @@ const transactionDetailState_1 = require("../../../transactionDetail/transaction
|
|
|
11
11
|
const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(scheduleDetailReducer_1.fetchScheduleDetails.match), (0, operators_1.mergeMap)((action) => {
|
|
12
12
|
var _a;
|
|
13
13
|
const updateActions = [];
|
|
14
|
-
const { scheduleType, selectedJeScheduleDetailId } = action.payload;
|
|
14
|
+
const { scheduleType, selectedJeScheduleDetailId, cacheOverride } = action.payload;
|
|
15
15
|
const { scheduleDetailState } = state$.value;
|
|
16
16
|
if (selectedJeScheduleDetailId != null) {
|
|
17
17
|
if (((_a = scheduleDetailState.editScheduleStateByDetailId[scheduleType][selectedJeScheduleDetailId]) === null || _a === void 0 ? void 0 : _a.jeScheduleDetails.length) > 0 &&
|
|
18
|
-
scheduleDetailState.selectedJEScheduleKey != null
|
|
18
|
+
scheduleDetailState.selectedJEScheduleKey != null &&
|
|
19
|
+
cacheOverride !== true) {
|
|
19
20
|
updateActions.push((0, scheduleDetailReducer_1.initializeScheduleDetailLocalData)(scheduleType, scheduleDetailState.selectedJEScheduleKey, selectedJeScheduleDetailId));
|
|
20
21
|
updateActions.push((0, scheduleDetailReducer_1.updateScheduleDetailsSuccess)());
|
|
21
22
|
return (0, rxjs_1.from)(updateActions);
|
|
@@ -21,7 +21,7 @@ const fetchScheduleDetailsPageEpic = (actions$, state$) => actions$.pipe((0, ope
|
|
|
21
21
|
scheduleDetailsActions.push((0, classListReducer_1.fetchClassList)());
|
|
22
22
|
}
|
|
23
23
|
if (action.payload.selectedJeScheduleDetailId != null) {
|
|
24
|
-
scheduleDetailsActions.push((0, scheduleDetailReducer_1.fetchScheduleDetails)(action.payload.scheduleType, action.payload.selectedJeScheduleDetailId));
|
|
24
|
+
scheduleDetailsActions.push((0, scheduleDetailReducer_1.fetchScheduleDetails)(action.payload.scheduleType, action.payload.selectedJeScheduleDetailId, action.payload.cacheOverride));
|
|
25
25
|
}
|
|
26
26
|
return (0, rxjs_1.concat)((0, rxjs_1.from)(scheduleDetailsActions));
|
|
27
27
|
}));
|
|
@@ -13,7 +13,7 @@ const saveScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
|
|
|
13
13
|
var _a;
|
|
14
14
|
const state = state$.value;
|
|
15
15
|
const { scheduleDetailState } = state;
|
|
16
|
-
const { selectedJeScheduleDetailId, scheduleType } = action.payload;
|
|
16
|
+
const { selectedJeScheduleDetailId, scheduleType, isUpdatingVendorCategoryOrClass, } = action.payload;
|
|
17
17
|
const selectedJEScheduleKey = scheduleDetailState.selectedJEScheduleKey;
|
|
18
18
|
const actions = [];
|
|
19
19
|
if (selectedJEScheduleKey == null) {
|
|
@@ -25,7 +25,7 @@ const saveScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
|
|
|
25
25
|
const scheduleDetailsUpdated = scheduleDetailId != null
|
|
26
26
|
? state.scheduleDetailState.editScheduleStateByDetailId[scheduleType][scheduleDetailId]
|
|
27
27
|
: state.scheduleDetailState.newScheduleState[scheduleType];
|
|
28
|
-
const payload = Object.assign({}, (0, scheduleDetailPayload_1.prepareScheduleDetailPayload)(state, scheduleDetailsUpdated, selectedJEScheduleKey, scheduleType));
|
|
28
|
+
const payload = Object.assign({}, (0, scheduleDetailPayload_1.prepareScheduleDetailPayload)(state, scheduleDetailsUpdated, selectedJEScheduleKey, scheduleType, undefined, undefined, isUpdatingVendorCategoryOrClass));
|
|
29
29
|
const queryParam = {
|
|
30
30
|
je_schedule_type: scheduleType,
|
|
31
31
|
};
|
|
@@ -81,16 +81,22 @@ const getInitializedJEScheduleDetailsLocalData = (scheduleType, jeScheduleTransa
|
|
|
81
81
|
jeLink: (0, exports.getJETransactionLinkFromThirdPartyId)(schedule.thirdPartyID, schedule.transactionID, schedule.recommendedTransactionID),
|
|
82
82
|
};
|
|
83
83
|
});
|
|
84
|
-
const
|
|
84
|
+
const errors = scheduleJournalEntryData
|
|
85
|
+
.flatMap((journalEntry) => journalEntry.error)
|
|
86
|
+
.filter((error) => !!error);
|
|
87
|
+
const { startDate, period, jeDebit, dayOfPostingDate, lastDayOfMonth, vendor } = jeScheduleTransactionState;
|
|
85
88
|
return {
|
|
86
89
|
scheduleType,
|
|
87
90
|
jeScheduleDetails: jeScheduleDetailsLocalData,
|
|
88
91
|
selectedDate: startDate,
|
|
89
92
|
selectedMonths: period,
|
|
90
|
-
selectedAccount: (
|
|
93
|
+
selectedAccount: errors.includes('debit_category_deleted')
|
|
94
|
+
? undefined
|
|
95
|
+
: (_a = jeDebit.account) === null || _a === void 0 ? void 0 : _a.accountId,
|
|
91
96
|
selectedClass: (_b = jeDebit.accountingClass) === null || _b === void 0 ? void 0 : _b.classId,
|
|
92
97
|
selectedDayOfMonth: dayOfPostingDate,
|
|
93
98
|
lastDayOfMonth: lastDayOfMonth,
|
|
99
|
+
selectedVendor: errors.includes('vendor_deleted') ? undefined : vendor,
|
|
94
100
|
};
|
|
95
101
|
};
|
|
96
102
|
exports.getInitializedJEScheduleDetailsLocalData = getInitializedJEScheduleDetailsLocalData;
|
|
@@ -107,18 +113,26 @@ const getInitializedFixedAssetsJEScheduleDetailsLocalData = (jeScheduleTransacti
|
|
|
107
113
|
jeLink: (0, exports.getJETransactionLinkFromThirdPartyId)(schedule.thirdPartyID, schedule.transactionID, schedule.recommendedTransactionID),
|
|
108
114
|
};
|
|
109
115
|
});
|
|
110
|
-
const
|
|
116
|
+
const errors = scheduleJournalEntryData
|
|
117
|
+
.flatMap((journalEntry) => journalEntry.error)
|
|
118
|
+
.filter((error) => !!error);
|
|
119
|
+
const { startDate, period, jeDebit, dayOfPostingDate, lastDayOfMonth, jeCredit, otherAttributes, vendor, } = jeScheduleTransactionState;
|
|
111
120
|
return {
|
|
112
121
|
scheduleType: 'fixed_assets',
|
|
113
122
|
jeScheduleDetails: jeScheduleDetailsLocalData,
|
|
114
123
|
selectedDate: startDate,
|
|
115
124
|
selectedMonths: period,
|
|
116
|
-
selectedAccount: (
|
|
125
|
+
selectedAccount: errors.includes('debit_category_deleted')
|
|
126
|
+
? undefined
|
|
127
|
+
: (_a = jeDebit.account) === null || _a === void 0 ? void 0 : _a.accountId,
|
|
117
128
|
selectedClass: (_b = jeDebit.accountingClass) === null || _b === void 0 ? void 0 : _b.classId,
|
|
118
|
-
selectedAccumulatedDepreciationCategory: (
|
|
129
|
+
selectedAccumulatedDepreciationCategory: errors.includes('credit_category_deleted')
|
|
130
|
+
? undefined
|
|
131
|
+
: (_c = jeCredit.account) === null || _c === void 0 ? void 0 : _c.accountId,
|
|
119
132
|
selectedDayOfMonth: dayOfPostingDate,
|
|
120
133
|
assetId: (_d = otherAttributes.assetId) !== null && _d !== void 0 ? _d : undefined,
|
|
121
134
|
lastDayOfMonth: lastDayOfMonth,
|
|
135
|
+
selectedVendor: errors.includes('vendor_deleted') ? undefined : vendor,
|
|
122
136
|
};
|
|
123
137
|
};
|
|
124
138
|
exports.getInitializedFixedAssetsJEScheduleDetailsLocalData = getInitializedFixedAssetsJEScheduleDetailsLocalData;
|
|
@@ -3,14 +3,15 @@ import { ScheduleDetailsLocalData, ScheduleDetailsLocalDataFixedAssets } from '.
|
|
|
3
3
|
import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
4
4
|
import { VendorBasePayload } from '../../../entity/vendor/vendorPayload';
|
|
5
5
|
import { JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
|
|
6
|
-
import { VendorState } from '../../../entity/vendor/vendorState';
|
|
6
|
+
import { Vendor, VendorState } from '../../../entity/vendor/vendorState';
|
|
7
|
+
import { ScheduleTransaction } from '../../../entity/transaction/stateTypes/scheduleTransaction';
|
|
7
8
|
import { AccountBasePayload } from '../../../entity/account/accountPayload';
|
|
8
9
|
import { ClassBasePayload } from '../../../entity/class/classPayload';
|
|
9
10
|
import { TransactionIDPayload } from '../../../entity/transaction/payloadTypes/transactionIDPayload';
|
|
10
11
|
import { StatusCodeWithLabelPayload } from '../../../commonPayloadTypes/statusPayload';
|
|
11
12
|
import { JEScheduleOtherAttributesPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
|
|
12
13
|
declare type BaseScheduleTransactionPayload = SaveScheduleTransactionPayload;
|
|
13
|
-
interface JESchedulePayload {
|
|
14
|
+
export interface JESchedulePayload {
|
|
14
15
|
status: StatusCodeWithLabelPayload;
|
|
15
16
|
vendor: VendorBasePayload;
|
|
16
17
|
currency_code: string;
|
|
@@ -28,7 +29,9 @@ interface JESchedulePayload {
|
|
|
28
29
|
je_debit_accounting_class_id: string | null;
|
|
29
30
|
other_attributes: JEScheduleOtherAttributesPayload;
|
|
30
31
|
is_deleted?: boolean;
|
|
32
|
+
is_reviewed?: boolean;
|
|
31
33
|
je_schedule_id?: string;
|
|
34
|
+
is_update_vendor_category_or_class?: boolean;
|
|
32
35
|
}
|
|
33
36
|
export interface SaveJESchedulePayload {
|
|
34
37
|
status: StatusCodeWithLabelPayload;
|
|
@@ -59,6 +62,8 @@ interface SaveScheduleDetailPayload {
|
|
|
59
62
|
je_schedules: JESchedulePayload[];
|
|
60
63
|
scheduled_journal_entries: SaveJESchedulePayload[];
|
|
61
64
|
}
|
|
65
|
+
export declare const mapVendorToVendorPayload: (payload: Vendor) => VendorBasePayload;
|
|
66
|
+
export declare const mapScheduleTransactionToBaseScheduleTransactionPayload: (payload: ScheduleTransaction) => BaseScheduleTransactionPayload;
|
|
62
67
|
export declare const mapAccruedExpenseJEScheduleTransactionToPayload: (jeScheduleTransactionState: JEScheduledTransaction, vendorState: VendorState, scheduleDetailsLocalData: ScheduleDetailsLocalDataFixedAssets, isDelete?: boolean | undefined, isMarkAsComplete?: boolean | undefined) => JESchedulePayload;
|
|
63
|
-
export declare const prepareScheduleDetailPayload: (state: RootState, scheduleDetailsLocalData: ScheduleDetailsLocalData, selectedJEScheduleKey: JEScheduleTransactionKey, jeScheduleType: ScheduleTypes, isDelete?: boolean | undefined, isMarkAsComplete?: boolean | undefined) => SaveScheduleDetailPayload;
|
|
68
|
+
export declare const prepareScheduleDetailPayload: (state: RootState, scheduleDetailsLocalData: ScheduleDetailsLocalData, selectedJEScheduleKey: JEScheduleTransactionKey, jeScheduleType: ScheduleTypes, isDelete?: boolean | undefined, isMarkAsComplete?: boolean | undefined, isUpdatingVendorCategoryOrClass?: boolean | undefined) => SaveScheduleDetailPayload;
|
|
64
69
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.prepareScheduleDetailPayload = exports.mapAccruedExpenseJEScheduleTransactionToPayload = void 0;
|
|
3
|
+
exports.prepareScheduleDetailPayload = exports.mapAccruedExpenseJEScheduleTransactionToPayload = exports.mapScheduleTransactionToBaseScheduleTransactionPayload = exports.mapVendorToVendorPayload = void 0;
|
|
4
4
|
const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
|
|
5
5
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
6
6
|
const formatZeniDateFY_1 = require("../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
@@ -8,6 +8,7 @@ const mapVendorToVendorPayload = (payload) => ({
|
|
|
8
8
|
vendor_id: payload.id,
|
|
9
9
|
vendor_name: payload.name,
|
|
10
10
|
});
|
|
11
|
+
exports.mapVendorToVendorPayload = mapVendorToVendorPayload;
|
|
11
12
|
const mapScheduleTransactionToBaseScheduleTransactionPayload = (payload) => {
|
|
12
13
|
var _a, _b;
|
|
13
14
|
return {
|
|
@@ -25,6 +26,7 @@ const mapScheduleTransactionToBaseScheduleTransactionPayload = (payload) => {
|
|
|
25
26
|
accounting_class_name: payload.classBase != null ? payload.classBase.className : '',
|
|
26
27
|
};
|
|
27
28
|
};
|
|
29
|
+
exports.mapScheduleTransactionToBaseScheduleTransactionPayload = mapScheduleTransactionToBaseScheduleTransactionPayload;
|
|
28
30
|
const mapJEScheduleLocalDataToScheduleDetailPayload = (jeScheduleDetails, jeScheduleTransactionState, isDelete) => {
|
|
29
31
|
const scheduleJournalEntry = jeScheduleTransactionState.scheduledJournalEntry;
|
|
30
32
|
return jeScheduleDetails.length > 0
|
|
@@ -93,10 +95,10 @@ const getJECreditAccountId = ({ isMarkAsComplete, jeScheduleTransactionState, })
|
|
|
93
95
|
}
|
|
94
96
|
return (_b = (_a = jeCredit.account) === null || _a === void 0 ? void 0 : _a.accountId) !== null && _b !== void 0 ? _b : baseTransaction.account.accountId;
|
|
95
97
|
};
|
|
96
|
-
const mapJEScheduleTransactionToPayload = (jeScheduleTransactionState, vendorState, scheduleDetailsLocalData, jeScheduleType, isDelete, isMarkAsComplete) => {
|
|
97
|
-
var _a, _b;
|
|
98
|
+
const mapJEScheduleTransactionToPayload = (jeScheduleTransactionState, vendorState, scheduleDetailsLocalData, jeScheduleType, isDelete, isMarkAsComplete, isUpdatingVendorCategoryOrClass) => {
|
|
99
|
+
var _a, _b, _c, _d;
|
|
98
100
|
const { vendor, currencyCode, currencySymbol, baseTransaction, status, startDate, endDate, balanceAsOfToday, jeScheduleId, } = jeScheduleTransactionState;
|
|
99
|
-
const { selectedMonths, selectedAccount, selectedClass, selectedDayOfMonth, lastDayOfMonth, } = scheduleDetailsLocalData;
|
|
101
|
+
const { selectedMonths, selectedAccount, selectedClass, selectedDayOfMonth, lastDayOfMonth, selectedVendor, } = scheduleDetailsLocalData;
|
|
100
102
|
let updatedStatus = Object.assign({}, status);
|
|
101
103
|
// if the current status is marked as completed, we need to send the status as new when creating a new schedule.
|
|
102
104
|
if (status.code === 'marked_as_completed') {
|
|
@@ -121,42 +123,32 @@ const mapJEScheduleTransactionToPayload = (jeScheduleTransactionState, vendorSta
|
|
|
121
123
|
: null;
|
|
122
124
|
const vendorID = vendor.id;
|
|
123
125
|
const vendorDetails = vendorState.vendorByID[vendorID];
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
posting_date: postingDate,
|
|
132
|
-
je_schedule_id: status.code === 'marked_as_completed' ? jeScheduleId : undefined,
|
|
133
|
-
balance: getBalanceAmountAsOfToday({
|
|
126
|
+
const updatedVendor = {
|
|
127
|
+
vendor_id: (_a = selectedVendor === null || selectedVendor === void 0 ? void 0 : selectedVendor.id) !== null && _a !== void 0 ? _a : '',
|
|
128
|
+
vendor_name: (_b = selectedVendor === null || selectedVendor === void 0 ? void 0 : selectedVendor.name) !== null && _b !== void 0 ? _b : '',
|
|
129
|
+
};
|
|
130
|
+
const payload = Object.assign(Object.assign({ status: updatedStatus, vendor: (selectedVendor === null || selectedVendor === void 0 ? void 0 : selectedVendor.id) !== ''
|
|
131
|
+
? updatedVendor
|
|
132
|
+
: (0, exports.mapVendorToVendorPayload)(vendorDetails), currency_code: currencyCode, currency_symbol: currencySymbol, period: selectedMonths !== null && selectedMonths !== void 0 ? selectedMonths : null, je_schedule_type: jeScheduleType, posting_date: postingDate, je_schedule_id: status.code === 'marked_as_completed' ? jeScheduleId : undefined, balance: getBalanceAmountAsOfToday({
|
|
134
133
|
isMarkAsComplete,
|
|
135
134
|
balanceAsOfToday,
|
|
136
135
|
baseTransaction,
|
|
137
|
-
}),
|
|
138
|
-
start_date: (_a = startDate === null || startDate === void 0 ? void 0 : startDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _a !== void 0 ? _a : firstJEScheduleDate,
|
|
139
|
-
end_date: (_b = endDate === null || endDate === void 0 ? void 0 : endDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _b !== void 0 ? _b : lastJEScheduleDate,
|
|
140
|
-
je_credit_accounting_class_id: getJECreditAccountingClassId({
|
|
136
|
+
}), start_date: (_c = startDate === null || startDate === void 0 ? void 0 : startDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _c !== void 0 ? _c : firstJEScheduleDate, end_date: (_d = endDate === null || endDate === void 0 ? void 0 : endDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _d !== void 0 ? _d : lastJEScheduleDate, je_credit_accounting_class_id: getJECreditAccountingClassId({
|
|
141
137
|
isMarkAsComplete,
|
|
142
138
|
jeScheduleTransactionState,
|
|
143
|
-
}),
|
|
144
|
-
je_credit_account_id: getJECreditAccountId({
|
|
139
|
+
}), je_credit_account_id: getJECreditAccountId({
|
|
145
140
|
isMarkAsComplete,
|
|
146
141
|
jeScheduleTransactionState,
|
|
147
|
-
}),
|
|
148
|
-
|
|
149
|
-
je_debit_accounting_class_id: selectedClass !== null && selectedClass !== void 0 ? selectedClass : null,
|
|
150
|
-
other_attributes: {},
|
|
151
|
-
base_transaction: mapScheduleTransactionToBaseScheduleTransactionPayload(baseTransaction),
|
|
152
|
-
};
|
|
142
|
+
}) }, (isUpdatingVendorCategoryOrClass === true
|
|
143
|
+
? { is_update_vendor_category_or_class: true }
|
|
144
|
+
: {})), { je_debit_account_id: selectedAccount !== null && selectedAccount !== void 0 ? selectedAccount : null, je_debit_accounting_class_id: selectedClass !== null && selectedClass !== void 0 ? selectedClass : null, other_attributes: {}, base_transaction: (0, exports.mapScheduleTransactionToBaseScheduleTransactionPayload)(baseTransaction) });
|
|
153
145
|
return isDelete === true
|
|
154
146
|
? Object.assign(Object.assign({}, payload), { is_deleted: true }) : payload;
|
|
155
147
|
};
|
|
156
|
-
const mapFixedAssetJEScheduleTransactionToPayload = (jeScheduleTransactionState, vendorState, scheduleDetailsLocalData, isDelete, isMarkAsComplete) => {
|
|
157
|
-
var _a, _b;
|
|
148
|
+
const mapFixedAssetJEScheduleTransactionToPayload = (jeScheduleTransactionState, vendorState, scheduleDetailsLocalData, isDelete, isMarkAsComplete, isUpdatingVendorCategoryOrClass) => {
|
|
149
|
+
var _a, _b, _c, _d;
|
|
158
150
|
const { vendor, currencyCode, currencySymbol, baseTransaction, status, startDate, endDate, balanceAsOfToday, jeScheduleId, } = jeScheduleTransactionState;
|
|
159
|
-
const { selectedMonths, selectedAccount, selectedClass, selectedDayOfMonth, lastDayOfMonth, selectedAccumulatedDepreciationCategory, assetId, } = scheduleDetailsLocalData;
|
|
151
|
+
const { selectedMonths, selectedAccount, selectedClass, selectedDayOfMonth, lastDayOfMonth, selectedAccumulatedDepreciationCategory, assetId, selectedVendor, } = scheduleDetailsLocalData;
|
|
160
152
|
let updatedStatus = Object.assign({}, status);
|
|
161
153
|
// if the current status is marked as completed, we need to send the status as new when creating a new schedule.
|
|
162
154
|
if (status.code === 'marked_as_completed') {
|
|
@@ -181,38 +173,28 @@ const mapFixedAssetJEScheduleTransactionToPayload = (jeScheduleTransactionState,
|
|
|
181
173
|
: null;
|
|
182
174
|
const vendorID = vendor.id;
|
|
183
175
|
const vendorDetails = vendorState.vendorByID[vendorID];
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
posting_date: postingDate,
|
|
192
|
-
je_schedule_id: status.code === 'marked_as_completed' ? jeScheduleId : undefined,
|
|
193
|
-
balance: getBalanceAmountAsOfToday({
|
|
176
|
+
const updatedVendor = {
|
|
177
|
+
vendor_id: (_a = selectedVendor === null || selectedVendor === void 0 ? void 0 : selectedVendor.id) !== null && _a !== void 0 ? _a : '',
|
|
178
|
+
vendor_name: (_b = selectedVendor === null || selectedVendor === void 0 ? void 0 : selectedVendor.name) !== null && _b !== void 0 ? _b : '',
|
|
179
|
+
};
|
|
180
|
+
const payload = Object.assign(Object.assign({ status: updatedStatus, vendor: (selectedVendor === null || selectedVendor === void 0 ? void 0 : selectedVendor.id) !== ''
|
|
181
|
+
? updatedVendor
|
|
182
|
+
: (0, exports.mapVendorToVendorPayload)(vendorDetails), currency_code: currencyCode, currency_symbol: currencySymbol, period: selectedMonths !== null && selectedMonths !== void 0 ? selectedMonths : null, je_schedule_type: 'fixed_assets', posting_date: postingDate, je_schedule_id: status.code === 'marked_as_completed' ? jeScheduleId : undefined, balance: getBalanceAmountAsOfToday({
|
|
194
183
|
isMarkAsComplete,
|
|
195
184
|
balanceAsOfToday,
|
|
196
185
|
baseTransaction,
|
|
197
|
-
}),
|
|
198
|
-
start_date: (_a = startDate === null || startDate === void 0 ? void 0 : startDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _a !== void 0 ? _a : firstJEScheduleDate,
|
|
199
|
-
end_date: (_b = endDate === null || endDate === void 0 ? void 0 : endDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _b !== void 0 ? _b : lastJEScheduleDate,
|
|
200
|
-
je_credit_accounting_class_id: getJECreditAccountingClassId({
|
|
186
|
+
}), start_date: (_c = startDate === null || startDate === void 0 ? void 0 : startDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _c !== void 0 ? _c : firstJEScheduleDate, end_date: (_d = endDate === null || endDate === void 0 ? void 0 : endDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _d !== void 0 ? _d : lastJEScheduleDate, je_credit_accounting_class_id: getJECreditAccountingClassId({
|
|
201
187
|
isMarkAsComplete,
|
|
202
188
|
jeScheduleTransactionState,
|
|
203
|
-
}),
|
|
204
|
-
|
|
189
|
+
}) }, (isUpdatingVendorCategoryOrClass === true
|
|
190
|
+
? { is_update_vendor_category_or_class: true }
|
|
191
|
+
: {})), { je_credit_account_id: isMarkAsComplete === true
|
|
205
192
|
? null
|
|
206
|
-
: selectedAccumulatedDepreciationCategory !== null && selectedAccumulatedDepreciationCategory !== void 0 ? selectedAccumulatedDepreciationCategory : null,
|
|
207
|
-
je_debit_account_id: selectedAccount !== null && selectedAccount !== void 0 ? selectedAccount : null,
|
|
208
|
-
je_debit_accounting_class_id: selectedClass !== null && selectedClass !== void 0 ? selectedClass : null,
|
|
209
|
-
other_attributes: assetId != null
|
|
193
|
+
: selectedAccumulatedDepreciationCategory !== null && selectedAccumulatedDepreciationCategory !== void 0 ? selectedAccumulatedDepreciationCategory : null, je_debit_account_id: selectedAccount !== null && selectedAccount !== void 0 ? selectedAccount : null, je_debit_accounting_class_id: selectedClass !== null && selectedClass !== void 0 ? selectedClass : null, other_attributes: assetId != null
|
|
210
194
|
? {
|
|
211
195
|
asset_id: assetId,
|
|
212
196
|
}
|
|
213
|
-
: {},
|
|
214
|
-
base_transaction: mapScheduleTransactionToBaseScheduleTransactionPayload(baseTransaction),
|
|
215
|
-
};
|
|
197
|
+
: {}, base_transaction: (0, exports.mapScheduleTransactionToBaseScheduleTransactionPayload)(baseTransaction) });
|
|
216
198
|
return isDelete === true
|
|
217
199
|
? Object.assign(Object.assign({}, payload), { is_deleted: true }) : payload;
|
|
218
200
|
};
|
|
@@ -246,7 +228,7 @@ const mapAccruedExpenseJEScheduleTransactionToPayload = (jeScheduleTransactionSt
|
|
|
246
228
|
const vendorDetails = vendorState.vendorByID[vendorID];
|
|
247
229
|
const payload = {
|
|
248
230
|
status: updatedStatus,
|
|
249
|
-
vendor: mapVendorToVendorPayload(vendorDetails),
|
|
231
|
+
vendor: (0, exports.mapVendorToVendorPayload)(vendorDetails),
|
|
250
232
|
currency_code: currencyCode,
|
|
251
233
|
currency_symbol: currencySymbol,
|
|
252
234
|
period: selectedMonths !== null && selectedMonths !== void 0 ? selectedMonths : null,
|
|
@@ -274,13 +256,13 @@ const mapAccruedExpenseJEScheduleTransactionToPayload = (jeScheduleTransactionSt
|
|
|
274
256
|
asset_id: assetId,
|
|
275
257
|
}
|
|
276
258
|
: {},
|
|
277
|
-
base_transaction: mapScheduleTransactionToBaseScheduleTransactionPayload(baseTransaction),
|
|
259
|
+
base_transaction: (0, exports.mapScheduleTransactionToBaseScheduleTransactionPayload)(baseTransaction),
|
|
278
260
|
};
|
|
279
261
|
return isDelete === true
|
|
280
262
|
? Object.assign(Object.assign({}, payload), { is_deleted: true }) : payload;
|
|
281
263
|
};
|
|
282
264
|
exports.mapAccruedExpenseJEScheduleTransactionToPayload = mapAccruedExpenseJEScheduleTransactionToPayload;
|
|
283
|
-
const prepareScheduleDetailPayload = (state, scheduleDetailsLocalData, selectedJEScheduleKey, jeScheduleType, isDelete, isMarkAsComplete) => {
|
|
265
|
+
const prepareScheduleDetailPayload = (state, scheduleDetailsLocalData, selectedJEScheduleKey, jeScheduleType, isDelete, isMarkAsComplete, isUpdatingVendorCategoryOrClass) => {
|
|
284
266
|
const payload = {
|
|
285
267
|
je_schedules: [],
|
|
286
268
|
scheduled_journal_entries: [],
|
|
@@ -291,10 +273,10 @@ const prepareScheduleDetailPayload = (state, scheduleDetailsLocalData, selectedJ
|
|
|
291
273
|
payload.je_schedules =
|
|
292
274
|
jeScheduleType !== 'fixed_assets'
|
|
293
275
|
? [
|
|
294
|
-
mapJEScheduleTransactionToPayload(jeScheduleTransactionState, vendorState, scheduleDetailsLocalData, jeScheduleType, isDelete, isMarkAsComplete),
|
|
276
|
+
mapJEScheduleTransactionToPayload(jeScheduleTransactionState, vendorState, scheduleDetailsLocalData, jeScheduleType, isDelete, isMarkAsComplete, isUpdatingVendorCategoryOrClass),
|
|
295
277
|
]
|
|
296
278
|
: [
|
|
297
|
-
mapFixedAssetJEScheduleTransactionToPayload(jeScheduleTransactionState, vendorState, scheduleDetailsLocalData, isDelete, isMarkAsComplete),
|
|
279
|
+
mapFixedAssetJEScheduleTransactionToPayload(jeScheduleTransactionState, vendorState, scheduleDetailsLocalData, isDelete, isMarkAsComplete, isUpdatingVendorCategoryOrClass),
|
|
298
280
|
];
|
|
299
281
|
payload.scheduled_journal_entries =
|
|
300
282
|
isMarkAsComplete === true
|