@zeniai/client-epic-state 5.1.18-betaAA0 → 5.1.18-betaDI10
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/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/task/taskPayload.d.ts +1 -0
- package/lib/entity/task/taskPayload.js +1 -0
- package/lib/entity/task/taskReducer.d.ts +5 -1
- package/lib/entity/task/taskReducer.js +8 -2
- package/lib/entity/task/taskState.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -39
- package/lib/entity/tenant/clearAllEpic.js +8 -82
- package/lib/entity/tenant/tenantReducer.js +3 -3
- package/lib/entity/transaction/payloadTypes/customerTransactionPayload.js +3 -1
- package/lib/epic.d.ts +4 -31
- package/lib/epic.js +4 -32
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/esm/entity/task/taskPayload.js +1 -0
- package/lib/esm/entity/task/taskReducer.js +7 -1
- package/lib/esm/entity/tenant/clearAllEpic.js +0 -74
- package/lib/esm/entity/tenant/tenantReducer.js +3 -3
- package/lib/esm/entity/transaction/payloadTypes/customerTransactionPayload.js +3 -1
- package/lib/esm/epic.js +4 -32
- package/lib/esm/index.js +3 -80
- package/lib/esm/reducer.js +0 -114
- package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +2 -0
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +8 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +80 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +36 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +13 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +24 -4
- package/lib/esm/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.js +37 -0
- package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +56 -2
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +21 -9
- package/lib/esm/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -1
- package/lib/esm/view/taskManager/taskListView/taskList.js +1 -0
- package/lib/esm/view/taskManager/taskListView/taskListReducer.js +189 -10
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +1 -0
- package/lib/index.d.ts +4 -100
- package/lib/index.js +13 -372
- package/lib/reducer.d.ts +0 -114
- package/lib/reducer.js +12 -126
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +2 -0
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +8 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
- package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.d.ts +9 -0
- package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +84 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.d.ts +8 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +40 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +2 -1
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +13 -0
- package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +24 -4
- package/lib/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.d.ts +20 -0
- package/lib/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.js +41 -0
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +14 -0
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +14 -2
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +57 -3
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +2 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +19 -7
- package/lib/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -1
- package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
- package/lib/view/taskManager/taskListView/taskList.js +1 -0
- package/lib/view/taskManager/taskListView/taskListPayload.d.ts +4 -0
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +2 -1
- package/lib/view/taskManager/taskListView/taskListReducer.js +189 -10
- package/lib/view/taskManager/taskListView/taskListSelector.js +1 -0
- package/lib/zeniAPI.d.ts +0 -1
- package/package.json +1 -1
- package/lib/entity/invoicing/coupon/couponReducer.d.ts +0 -12
- package/lib/entity/invoicing/coupon/couponReducer.js +0 -33
- package/lib/entity/invoicing/creditNote/creditNoteReducer.d.ts +0 -12
- package/lib/entity/invoicing/creditNote/creditNoteReducer.js +0 -35
- package/lib/entity/invoicing/customer/customerReducer.d.ts +0 -12
- package/lib/entity/invoicing/customer/customerReducer.js +0 -33
- package/lib/entity/invoicing/dunningCase/dunningCaseReducer.d.ts +0 -12
- package/lib/entity/invoicing/dunningCase/dunningCaseReducer.js +0 -35
- package/lib/entity/invoicing/invoice/invoiceReducer.d.ts +0 -10
- package/lib/entity/invoicing/invoice/invoiceReducer.js +0 -36
- package/lib/entity/invoicing/invoice/invoiceSelector.d.ts +0 -5
- package/lib/entity/invoicing/invoice/invoiceSelector.js +0 -9
- package/lib/entity/invoicing/invoice/invoiceState.d.ts +0 -5
- package/lib/entity/invoicing/invoice/invoiceState.js +0 -2
- package/lib/entity/invoicing/invoicingTypes.d.ts +0 -766
- package/lib/entity/invoicing/invoicingTypes.js +0 -15
- package/lib/entity/invoicing/plan/planReducer.d.ts +0 -12
- package/lib/entity/invoicing/plan/planReducer.js +0 -33
- package/lib/entity/invoicing/product/productReducer.d.ts +0 -12
- package/lib/entity/invoicing/product/productReducer.js +0 -33
- package/lib/entity/invoicing/subscription/subscriptionReducer.d.ts +0 -12
- package/lib/entity/invoicing/subscription/subscriptionReducer.js +0 -35
- package/lib/entity/invoicing/transaction/transactionReducer.d.ts +0 -12
- package/lib/entity/invoicing/transaction/transactionReducer.js +0 -35
- package/lib/esm/entity/invoicing/coupon/couponReducer.js +0 -29
- package/lib/esm/entity/invoicing/creditNote/creditNoteReducer.js +0 -31
- package/lib/esm/entity/invoicing/customer/customerReducer.js +0 -29
- package/lib/esm/entity/invoicing/dunningCase/dunningCaseReducer.js +0 -31
- package/lib/esm/entity/invoicing/invoice/invoiceReducer.js +0 -32
- package/lib/esm/entity/invoicing/invoice/invoiceSelector.js +0 -4
- package/lib/esm/entity/invoicing/invoice/invoiceState.js +0 -1
- package/lib/esm/entity/invoicing/invoicingTypes.js +0 -14
- package/lib/esm/entity/invoicing/plan/planReducer.js +0 -29
- package/lib/esm/entity/invoicing/product/productReducer.js +0 -29
- package/lib/esm/entity/invoicing/subscription/subscriptionReducer.js +0 -31
- package/lib/esm/entity/invoicing/transaction/transactionReducer.js +0 -31
- package/lib/esm/view/invoicing/analyticsView/analyticsViewEpics.js +0 -42
- package/lib/esm/view/invoicing/analyticsView/analyticsViewReducer.js +0 -45
- package/lib/esm/view/invoicing/analyticsView/analyticsViewSelector.js +0 -10
- package/lib/esm/view/invoicing/approvalAction/approvalActionEpic.js +0 -28
- package/lib/esm/view/invoicing/approvalAction/approvalActionReducer.js +0 -36
- package/lib/esm/view/invoicing/approvalAction/approvalActionSelector.js +0 -5
- package/lib/esm/view/invoicing/approvalsView/approvalsViewEpics.js +0 -37
- package/lib/esm/view/invoicing/approvalsView/approvalsViewReducer.js +0 -62
- package/lib/esm/view/invoicing/approvalsView/approvalsViewSelector.js +0 -8
- package/lib/esm/view/invoicing/auditView/auditViewEpics.js +0 -46
- package/lib/esm/view/invoicing/auditView/auditViewReducer.js +0 -56
- package/lib/esm/view/invoicing/auditView/auditViewSelector.js +0 -8
- package/lib/esm/view/invoicing/catalogView/catalogViewEpics.js +0 -143
- package/lib/esm/view/invoicing/catalogView/catalogViewReducer.js +0 -162
- package/lib/esm/view/invoicing/catalogView/catalogViewSelector.js +0 -31
- package/lib/esm/view/invoicing/catalogWrite/catalogWriteEpic.js +0 -34
- package/lib/esm/view/invoicing/catalogWrite/catalogWriteReducer.js +0 -39
- package/lib/esm/view/invoicing/catalogWrite/catalogWriteSelector.js +0 -6
- package/lib/esm/view/invoicing/couponView/couponViewEpics.js +0 -83
- package/lib/esm/view/invoicing/couponView/couponViewReducer.js +0 -105
- package/lib/esm/view/invoicing/couponView/couponViewSelector.js +0 -18
- package/lib/esm/view/invoicing/couponWrite/couponWriteEpic.js +0 -29
- package/lib/esm/view/invoicing/couponWrite/couponWriteReducer.js +0 -36
- package/lib/esm/view/invoicing/couponWrite/couponWriteSelector.js +0 -5
- package/lib/esm/view/invoicing/createInvoice/createInvoiceEpic.js +0 -23
- package/lib/esm/view/invoicing/createInvoice/createInvoiceReducer.js +0 -36
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +0 -5
- package/lib/esm/view/invoicing/creditNoteView/creditNoteViewEpics.js +0 -87
- package/lib/esm/view/invoicing/creditNoteView/creditNoteViewReducer.js +0 -105
- package/lib/esm/view/invoicing/creditNoteView/creditNoteViewSelector.js +0 -20
- package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.js +0 -63
- package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodReducer.js +0 -84
- package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodSelector.js +0 -7
- package/lib/esm/view/invoicing/customerView/customerViewEpics.js +0 -71
- package/lib/esm/view/invoicing/customerView/customerViewReducer.js +0 -90
- package/lib/esm/view/invoicing/customerView/customerViewSelector.js +0 -17
- package/lib/esm/view/invoicing/customerWrite/customerWriteEpic.js +0 -23
- package/lib/esm/view/invoicing/customerWrite/customerWriteReducer.js +0 -36
- package/lib/esm/view/invoicing/customerWrite/customerWriteSelector.js +0 -5
- package/lib/esm/view/invoicing/dataImportAction/dataImportActionEpic.js +0 -41
- package/lib/esm/view/invoicing/dataImportAction/dataImportActionReducer.js +0 -73
- package/lib/esm/view/invoicing/dataImportAction/dataImportActionSelector.js +0 -5
- package/lib/esm/view/invoicing/dataImportView/dataImportViewEpics.js +0 -41
- package/lib/esm/view/invoicing/dataImportView/dataImportViewReducer.js +0 -66
- package/lib/esm/view/invoicing/dataImportView/dataImportViewSelector.js +0 -6
- package/lib/esm/view/invoicing/dunningAction/dunningActionEpic.js +0 -28
- package/lib/esm/view/invoicing/dunningAction/dunningActionReducer.js +0 -36
- package/lib/esm/view/invoicing/dunningAction/dunningActionSelector.js +0 -5
- package/lib/esm/view/invoicing/dunningCaseView/dunningCaseViewEpics.js +0 -85
- package/lib/esm/view/invoicing/dunningCaseView/dunningCaseViewReducer.js +0 -105
- package/lib/esm/view/invoicing/dunningCaseView/dunningCaseViewSelector.js +0 -20
- package/lib/esm/view/invoicing/invoiceAction/invoiceActionEpic.js +0 -50
- package/lib/esm/view/invoicing/invoiceAction/invoiceActionReducer.js +0 -42
- package/lib/esm/view/invoicing/invoiceAction/invoiceActionSelector.js +0 -5
- package/lib/esm/view/invoicing/invoiceDetail/fetchInvoiceDetailEpic.js +0 -20
- package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailReducer.js +0 -34
- package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailSelector.js +0 -9
- package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailState.js +0 -1
- package/lib/esm/view/invoicing/invoiceList/fetchInvoiceCountsEpic.js +0 -32
- package/lib/esm/view/invoicing/invoiceList/fetchInvoiceKPIsEpic.js +0 -17
- package/lib/esm/view/invoicing/invoiceList/fetchInvoiceListEpic.js +0 -55
- package/lib/esm/view/invoicing/invoiceList/invoiceListReducer.js +0 -90
- package/lib/esm/view/invoicing/invoiceList/invoiceListSelector.js +0 -11
- package/lib/esm/view/invoicing/invoiceList/invoiceListState.js +0 -1
- package/lib/esm/view/invoicing/invoicePdf/invoicePdfEpic.js +0 -37
- package/lib/esm/view/invoicing/invoicePdf/invoicePdfReducer.js +0 -33
- package/lib/esm/view/invoicing/invoicePdf/invoicePdfSelector.js +0 -5
- package/lib/esm/view/invoicing/invoicingApiHelper.js +0 -38
- package/lib/esm/view/invoicing/paymentAction/paymentActionEpic.js +0 -28
- package/lib/esm/view/invoicing/paymentAction/paymentActionReducer.js +0 -36
- package/lib/esm/view/invoicing/paymentAction/paymentActionSelector.js +0 -5
- package/lib/esm/view/invoicing/recordPayment/recordPaymentEpic.js +0 -23
- package/lib/esm/view/invoicing/recordPayment/recordPaymentReducer.js +0 -36
- package/lib/esm/view/invoicing/recordPayment/recordPaymentSelector.js +0 -5
- package/lib/esm/view/invoicing/reportsView/reportsViewEpics.js +0 -28
- package/lib/esm/view/invoicing/reportsView/reportsViewReducer.js +0 -54
- package/lib/esm/view/invoicing/reportsView/reportsViewSelector.js +0 -13
- package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +0 -53
- package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +0 -69
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +0 -7
- package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionEpic.js +0 -28
- package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionReducer.js +0 -36
- package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionSelector.js +0 -5
- package/lib/esm/view/invoicing/subscriptionView/subscriptionViewEpics.js +0 -85
- package/lib/esm/view/invoicing/subscriptionView/subscriptionViewReducer.js +0 -90
- package/lib/esm/view/invoicing/subscriptionView/subscriptionViewSelector.js +0 -19
- package/lib/esm/view/invoicing/subscriptionWrite/subscriptionWriteEpic.js +0 -25
- package/lib/esm/view/invoicing/subscriptionWrite/subscriptionWriteReducer.js +0 -36
- package/lib/esm/view/invoicing/subscriptionWrite/subscriptionWriteSelector.js +0 -5
- package/lib/esm/view/invoicing/transactionView/transactionViewEpics.js +0 -76
- package/lib/esm/view/invoicing/transactionView/transactionViewReducer.js +0 -90
- package/lib/esm/view/invoicing/transactionView/transactionViewSelector.js +0 -19
- package/lib/view/invoicing/analyticsView/analyticsViewEpics.d.ts +0 -7
- package/lib/view/invoicing/analyticsView/analyticsViewEpics.js +0 -46
- package/lib/view/invoicing/analyticsView/analyticsViewReducer.d.ts +0 -22
- package/lib/view/invoicing/analyticsView/analyticsViewReducer.js +0 -49
- package/lib/view/invoicing/analyticsView/analyticsViewSelector.d.ts +0 -10
- package/lib/view/invoicing/analyticsView/analyticsViewSelector.js +0 -20
- package/lib/view/invoicing/approvalAction/approvalActionEpic.d.ts +0 -8
- package/lib/view/invoicing/approvalAction/approvalActionEpic.js +0 -32
- package/lib/view/invoicing/approvalAction/approvalActionReducer.d.ts +0 -20
- package/lib/view/invoicing/approvalAction/approvalActionReducer.js +0 -40
- package/lib/view/invoicing/approvalAction/approvalActionSelector.d.ts +0 -3
- package/lib/view/invoicing/approvalAction/approvalActionSelector.js +0 -9
- package/lib/view/invoicing/approvalsView/approvalsViewEpics.d.ts +0 -7
- package/lib/view/invoicing/approvalsView/approvalsViewEpics.js +0 -41
- package/lib/view/invoicing/approvalsView/approvalsViewReducer.d.ts +0 -33
- package/lib/view/invoicing/approvalsView/approvalsViewReducer.js +0 -66
- package/lib/view/invoicing/approvalsView/approvalsViewSelector.d.ts +0 -9
- package/lib/view/invoicing/approvalsView/approvalsViewSelector.js +0 -16
- package/lib/view/invoicing/auditView/auditViewEpics.d.ts +0 -7
- package/lib/view/invoicing/auditView/auditViewEpics.js +0 -50
- package/lib/view/invoicing/auditView/auditViewReducer.d.ts +0 -36
- package/lib/view/invoicing/auditView/auditViewReducer.js +0 -60
- package/lib/view/invoicing/auditView/auditViewSelector.d.ts +0 -9
- package/lib/view/invoicing/auditView/auditViewSelector.js +0 -16
- package/lib/view/invoicing/catalogView/catalogViewEpics.d.ts +0 -14
- package/lib/view/invoicing/catalogView/catalogViewEpics.js +0 -152
- package/lib/view/invoicing/catalogView/catalogViewReducer.d.ts +0 -76
- package/lib/view/invoicing/catalogView/catalogViewReducer.js +0 -166
- package/lib/view/invoicing/catalogView/catalogViewSelector.d.ts +0 -22
- package/lib/view/invoicing/catalogView/catalogViewSelector.js +0 -52
- package/lib/view/invoicing/catalogWrite/catalogWriteEpic.d.ts +0 -9
- package/lib/view/invoicing/catalogWrite/catalogWriteEpic.js +0 -38
- package/lib/view/invoicing/catalogWrite/catalogWriteReducer.d.ts +0 -21
- package/lib/view/invoicing/catalogWrite/catalogWriteReducer.js +0 -43
- package/lib/view/invoicing/catalogWrite/catalogWriteSelector.d.ts +0 -6
- package/lib/view/invoicing/catalogWrite/catalogWriteSelector.js +0 -12
- package/lib/view/invoicing/couponView/couponViewEpics.d.ts +0 -11
- package/lib/view/invoicing/couponView/couponViewEpics.js +0 -90
- package/lib/view/invoicing/couponView/couponViewReducer.d.ts +0 -42
- package/lib/view/invoicing/couponView/couponViewReducer.js +0 -109
- package/lib/view/invoicing/couponView/couponViewSelector.d.ts +0 -14
- package/lib/view/invoicing/couponView/couponViewSelector.js +0 -31
- package/lib/view/invoicing/couponWrite/couponWriteEpic.d.ts +0 -8
- package/lib/view/invoicing/couponWrite/couponWriteEpic.js +0 -33
- package/lib/view/invoicing/couponWrite/couponWriteReducer.d.ts +0 -17
- package/lib/view/invoicing/couponWrite/couponWriteReducer.js +0 -40
- package/lib/view/invoicing/couponWrite/couponWriteSelector.d.ts +0 -4
- package/lib/view/invoicing/couponWrite/couponWriteSelector.js +0 -10
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.d.ts +0 -8
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.js +0 -27
- package/lib/view/invoicing/createInvoice/createInvoiceReducer.d.ts +0 -34
- package/lib/view/invoicing/createInvoice/createInvoiceReducer.js +0 -40
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +0 -4
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +0 -10
- package/lib/view/invoicing/creditNoteView/creditNoteViewEpics.d.ts +0 -11
- package/lib/view/invoicing/creditNoteView/creditNoteViewEpics.js +0 -94
- package/lib/view/invoicing/creditNoteView/creditNoteViewReducer.d.ts +0 -43
- package/lib/view/invoicing/creditNoteView/creditNoteViewReducer.js +0 -109
- package/lib/view/invoicing/creditNoteView/creditNoteViewSelector.d.ts +0 -14
- package/lib/view/invoicing/creditNoteView/creditNoteViewSelector.js +0 -33
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.d.ts +0 -11
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.js +0 -70
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodReducer.d.ts +0 -42
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodReducer.js +0 -88
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodSelector.d.ts +0 -10
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodSelector.js +0 -17
- package/lib/view/invoicing/customerView/customerViewEpics.d.ts +0 -10
- package/lib/view/invoicing/customerView/customerViewEpics.js +0 -77
- package/lib/view/invoicing/customerView/customerViewReducer.d.ts +0 -41
- package/lib/view/invoicing/customerView/customerViewReducer.js +0 -94
- package/lib/view/invoicing/customerView/customerViewSelector.d.ts +0 -13
- package/lib/view/invoicing/customerView/customerViewSelector.js +0 -29
- package/lib/view/invoicing/customerWrite/customerWriteEpic.d.ts +0 -8
- package/lib/view/invoicing/customerWrite/customerWriteEpic.js +0 -27
- package/lib/view/invoicing/customerWrite/customerWriteReducer.d.ts +0 -17
- package/lib/view/invoicing/customerWrite/customerWriteReducer.js +0 -40
- package/lib/view/invoicing/customerWrite/customerWriteSelector.d.ts +0 -4
- package/lib/view/invoicing/customerWrite/customerWriteSelector.js +0 -10
- package/lib/view/invoicing/dataImportAction/dataImportActionEpic.d.ts +0 -7
- package/lib/view/invoicing/dataImportAction/dataImportActionEpic.js +0 -45
- package/lib/view/invoicing/dataImportAction/dataImportActionReducer.d.ts +0 -23
- package/lib/view/invoicing/dataImportAction/dataImportActionReducer.js +0 -77
- package/lib/view/invoicing/dataImportAction/dataImportActionSelector.d.ts +0 -4
- package/lib/view/invoicing/dataImportAction/dataImportActionSelector.js +0 -9
- package/lib/view/invoicing/dataImportView/dataImportViewEpics.d.ts +0 -9
- package/lib/view/invoicing/dataImportView/dataImportViewEpics.js +0 -47
- package/lib/view/invoicing/dataImportView/dataImportViewReducer.d.ts +0 -15
- package/lib/view/invoicing/dataImportView/dataImportViewReducer.js +0 -70
- package/lib/view/invoicing/dataImportView/dataImportViewSelector.d.ts +0 -9
- package/lib/view/invoicing/dataImportView/dataImportViewSelector.js +0 -15
- package/lib/view/invoicing/dunningAction/dunningActionEpic.d.ts +0 -8
- package/lib/view/invoicing/dunningAction/dunningActionEpic.js +0 -32
- package/lib/view/invoicing/dunningAction/dunningActionReducer.d.ts +0 -21
- package/lib/view/invoicing/dunningAction/dunningActionReducer.js +0 -40
- package/lib/view/invoicing/dunningAction/dunningActionSelector.d.ts +0 -3
- package/lib/view/invoicing/dunningAction/dunningActionSelector.js +0 -9
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewEpics.d.ts +0 -11
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewEpics.js +0 -92
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewReducer.d.ts +0 -42
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewReducer.js +0 -109
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewSelector.d.ts +0 -14
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewSelector.js +0 -33
- package/lib/view/invoicing/invoiceAction/invoiceActionEpic.d.ts +0 -9
- package/lib/view/invoicing/invoiceAction/invoiceActionEpic.js +0 -55
- package/lib/view/invoicing/invoiceAction/invoiceActionReducer.d.ts +0 -26
- package/lib/view/invoicing/invoiceAction/invoiceActionReducer.js +0 -46
- package/lib/view/invoicing/invoiceAction/invoiceActionSelector.d.ts +0 -3
- package/lib/view/invoicing/invoiceAction/invoiceActionSelector.js +0 -9
- package/lib/view/invoicing/invoiceDetail/fetchInvoiceDetailEpic.d.ts +0 -8
- package/lib/view/invoicing/invoiceDetail/fetchInvoiceDetailEpic.js +0 -24
- package/lib/view/invoicing/invoiceDetail/invoiceDetailReducer.d.ts +0 -11
- package/lib/view/invoicing/invoiceDetail/invoiceDetailReducer.js +0 -38
- package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.d.ts +0 -5
- package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.js +0 -14
- package/lib/view/invoicing/invoiceDetail/invoiceDetailState.d.ts +0 -4
- package/lib/view/invoicing/invoiceDetail/invoiceDetailState.js +0 -2
- package/lib/view/invoicing/invoiceList/fetchInvoiceCountsEpic.d.ts +0 -7
- package/lib/view/invoicing/invoiceList/fetchInvoiceCountsEpic.js +0 -36
- package/lib/view/invoicing/invoiceList/fetchInvoiceKPIsEpic.d.ts +0 -7
- package/lib/view/invoicing/invoiceList/fetchInvoiceKPIsEpic.js +0 -21
- package/lib/view/invoicing/invoiceList/fetchInvoiceListEpic.d.ts +0 -8
- package/lib/view/invoicing/invoiceList/fetchInvoiceListEpic.js +0 -59
- package/lib/view/invoicing/invoiceList/invoiceListReducer.d.ts +0 -22
- package/lib/view/invoicing/invoiceList/invoiceListReducer.js +0 -94
- package/lib/view/invoicing/invoiceList/invoiceListSelector.d.ts +0 -11
- package/lib/view/invoicing/invoiceList/invoiceListSelector.js +0 -21
- package/lib/view/invoicing/invoiceList/invoiceListState.d.ts +0 -25
- package/lib/view/invoicing/invoiceList/invoiceListState.js +0 -2
- package/lib/view/invoicing/invoicePdf/invoicePdfEpic.d.ts +0 -7
- package/lib/view/invoicing/invoicePdf/invoicePdfEpic.js +0 -41
- package/lib/view/invoicing/invoicePdf/invoicePdfReducer.d.ts +0 -20
- package/lib/view/invoicing/invoicePdf/invoicePdfReducer.js +0 -37
- package/lib/view/invoicing/invoicePdf/invoicePdfSelector.d.ts +0 -3
- package/lib/view/invoicing/invoicePdf/invoicePdfSelector.js +0 -9
- package/lib/view/invoicing/invoicingApiHelper.d.ts +0 -22
- package/lib/view/invoicing/invoicingApiHelper.js +0 -44
- package/lib/view/invoicing/paymentAction/paymentActionEpic.d.ts +0 -8
- package/lib/view/invoicing/paymentAction/paymentActionEpic.js +0 -32
- package/lib/view/invoicing/paymentAction/paymentActionReducer.d.ts +0 -21
- package/lib/view/invoicing/paymentAction/paymentActionReducer.js +0 -40
- package/lib/view/invoicing/paymentAction/paymentActionSelector.d.ts +0 -3
- package/lib/view/invoicing/paymentAction/paymentActionSelector.js +0 -9
- package/lib/view/invoicing/recordPayment/recordPaymentEpic.d.ts +0 -8
- package/lib/view/invoicing/recordPayment/recordPaymentEpic.js +0 -27
- package/lib/view/invoicing/recordPayment/recordPaymentReducer.d.ts +0 -32
- package/lib/view/invoicing/recordPayment/recordPaymentReducer.js +0 -40
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.d.ts +0 -4
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.js +0 -10
- package/lib/view/invoicing/reportsView/reportsViewEpics.d.ts +0 -7
- package/lib/view/invoicing/reportsView/reportsViewEpics.js +0 -32
- package/lib/view/invoicing/reportsView/reportsViewReducer.d.ts +0 -20
- package/lib/view/invoicing/reportsView/reportsViewReducer.js +0 -58
- package/lib/view/invoicing/reportsView/reportsViewSelector.d.ts +0 -12
- package/lib/view/invoicing/reportsView/reportsViewSelector.js +0 -24
- package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +0 -10
- package/lib/view/invoicing/settingsView/settingsViewEpics.js +0 -60
- package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +0 -12
- package/lib/view/invoicing/settingsView/settingsViewReducer.js +0 -73
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +0 -7
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +0 -14
- package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.d.ts +0 -8
- package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.js +0 -32
- package/lib/view/invoicing/subscriptionAction/subscriptionActionReducer.d.ts +0 -21
- package/lib/view/invoicing/subscriptionAction/subscriptionActionReducer.js +0 -40
- package/lib/view/invoicing/subscriptionAction/subscriptionActionSelector.d.ts +0 -3
- package/lib/view/invoicing/subscriptionAction/subscriptionActionSelector.js +0 -9
- package/lib/view/invoicing/subscriptionView/subscriptionViewEpics.d.ts +0 -10
- package/lib/view/invoicing/subscriptionView/subscriptionViewEpics.js +0 -91
- package/lib/view/invoicing/subscriptionView/subscriptionViewReducer.d.ts +0 -44
- package/lib/view/invoicing/subscriptionView/subscriptionViewReducer.js +0 -94
- package/lib/view/invoicing/subscriptionView/subscriptionViewSelector.d.ts +0 -13
- package/lib/view/invoicing/subscriptionView/subscriptionViewSelector.js +0 -31
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteEpic.d.ts +0 -8
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteEpic.js +0 -29
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteReducer.d.ts +0 -17
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteReducer.js +0 -40
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteSelector.d.ts +0 -4
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteSelector.js +0 -10
- package/lib/view/invoicing/transactionView/transactionViewEpics.d.ts +0 -10
- package/lib/view/invoicing/transactionView/transactionViewEpics.js +0 -82
- package/lib/view/invoicing/transactionView/transactionViewReducer.d.ts +0 -43
- package/lib/view/invoicing/transactionView/transactionViewReducer.js +0 -94
- package/lib/view/invoicing/transactionView/transactionViewSelector.d.ts +0 -13
- package/lib/view/invoicing/transactionView/transactionViewSelector.js +0 -31
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
fetchState: 'Not-Started',
|
|
4
|
-
error: undefined,
|
|
5
|
-
data: undefined,
|
|
6
|
-
savedItemId: undefined,
|
|
7
|
-
savedKind: undefined,
|
|
8
|
-
hasValidState() {
|
|
9
|
-
return this.fetchState === 'Completed';
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
const catalogWrite = createSlice({
|
|
13
|
-
name: 'invoicingCatalogWrite',
|
|
14
|
-
initialState,
|
|
15
|
-
reducers: {
|
|
16
|
-
saveInvoicingCatalogItem(draft, action) {
|
|
17
|
-
draft.fetchState = 'In-Progress';
|
|
18
|
-
draft.error = undefined;
|
|
19
|
-
draft.savedItemId = undefined;
|
|
20
|
-
draft.savedKind = action.payload.kind;
|
|
21
|
-
draft.data = action.payload.data;
|
|
22
|
-
},
|
|
23
|
-
saveInvoicingCatalogItemSuccess(draft, action) {
|
|
24
|
-
draft.fetchState = 'Completed';
|
|
25
|
-
draft.error = undefined;
|
|
26
|
-
draft.savedItemId = action.payload.itemId;
|
|
27
|
-
draft.savedKind = action.payload.kind;
|
|
28
|
-
},
|
|
29
|
-
saveInvoicingCatalogItemFailure(draft, action) {
|
|
30
|
-
draft.fetchState = 'Error';
|
|
31
|
-
draft.error = action.payload;
|
|
32
|
-
},
|
|
33
|
-
resetInvoicingCatalogWrite(draft) {
|
|
34
|
-
Object.assign(draft, initialState);
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
export const { saveInvoicingCatalogItem, saveInvoicingCatalogItemSuccess, saveInvoicingCatalogItemFailure, resetInvoicingCatalogWrite, } = catalogWrite.actions;
|
|
39
|
-
export default catalogWrite.reducer;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export const getInvoicingCatalogWriteState = (state) => ({
|
|
2
|
-
fetchState: state.invoicingCatalogWriteState.fetchState,
|
|
3
|
-
error: state.invoicingCatalogWriteState.error,
|
|
4
|
-
});
|
|
5
|
-
export const getSavedInvoicingCatalogItemId = (state) => state.invoicingCatalogWriteState.savedItemId;
|
|
6
|
-
export const getSavedInvoicingCatalogItemKind = (state) => state.invoicingCatalogWriteState.savedKind;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, switchMap } from 'rxjs/operators';
|
|
3
|
-
import { updateInvoicingCoupons } from '../../../entity/invoicing/coupon/couponReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
|
|
5
|
-
import { INVOICING_LIST_PAGE_SIZE, applyListSortParams, invoicingBaseUrl, withQuery, } from '../invoicingApiHelper';
|
|
6
|
-
import { fetchInvoicingCouponCounts, fetchInvoicingCouponDetail, fetchInvoicingCouponKPIs, fetchInvoicingCouponList, updateInvoicingCouponCounts, updateInvoicingCouponCountsFailure, updateInvoicingCouponDetail, updateInvoicingCouponDetailFailure, updateInvoicingCouponKPIs, updateInvoicingCouponKPIsFailure, updateInvoicingCouponList, updateInvoicingCouponListFailure, } from './couponViewReducer';
|
|
7
|
-
const buildQuery = (filters, cursor, sort) => {
|
|
8
|
-
const params = new URLSearchParams();
|
|
9
|
-
if (filters.status != null && filters.status.length > 0) {
|
|
10
|
-
params.set('status', filters.status);
|
|
11
|
-
}
|
|
12
|
-
if (filters.search != null && filters.search.length > 0) {
|
|
13
|
-
params.set('search', filters.search);
|
|
14
|
-
}
|
|
15
|
-
params.set('limit', String(INVOICING_LIST_PAGE_SIZE));
|
|
16
|
-
if (cursor != null) {
|
|
17
|
-
params.set('cursor', cursor);
|
|
18
|
-
}
|
|
19
|
-
applyListSortParams(params, sort);
|
|
20
|
-
return params;
|
|
21
|
-
};
|
|
22
|
-
export const fetchInvoicingCouponListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCouponList.match), switchMap((action) => {
|
|
23
|
-
const { filters, cursor, keepExistingListItems, sort } = action.payload;
|
|
24
|
-
const apiUrl = withQuery(`${invoicingBaseUrl(zeniAPI)}/discounts`, buildQuery(filters, cursor, sort));
|
|
25
|
-
return zeniAPI
|
|
26
|
-
.getJSON(apiUrl)
|
|
27
|
-
.pipe(switchMap((response) => {
|
|
28
|
-
if (isSuccessResponse(response)) {
|
|
29
|
-
const items = response.data?.items ?? [];
|
|
30
|
-
return [
|
|
31
|
-
updateInvoicingCoupons(items, 'merge'),
|
|
32
|
-
updateInvoicingCouponList({
|
|
33
|
-
ids: items.map((item) => item.id),
|
|
34
|
-
nextCursor: response.data?.next_cursor ?? null,
|
|
35
|
-
keepExistingListItems,
|
|
36
|
-
}),
|
|
37
|
-
];
|
|
38
|
-
}
|
|
39
|
-
return of(updateInvoicingCouponListFailure(response.status));
|
|
40
|
-
}), catchError((error) => of(updateInvoicingCouponListFailure(createZeniAPIStatus('Unexpected Error', 'Fetch discount list REST API call errored out ' +
|
|
41
|
-
JSON.stringify(error))))));
|
|
42
|
-
}));
|
|
43
|
-
export const fetchInvoicingCouponCountsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCouponCounts.match), switchMap(() => {
|
|
44
|
-
const { filters } = state$.value.invoicingCouponViewState;
|
|
45
|
-
const params = new URLSearchParams();
|
|
46
|
-
if (filters.search != null && filters.search.length > 0) {
|
|
47
|
-
params.set('search', filters.search);
|
|
48
|
-
}
|
|
49
|
-
const apiUrl = withQuery(`${invoicingBaseUrl(zeniAPI)}/discounts/counts`, params);
|
|
50
|
-
return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
|
|
51
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
52
|
-
return of(updateInvoicingCouponCounts(response.data));
|
|
53
|
-
}
|
|
54
|
-
return of(updateInvoicingCouponCountsFailure(response.status));
|
|
55
|
-
}), catchError((error) => of(updateInvoicingCouponCountsFailure(createZeniAPIStatus('Unexpected Error', 'Fetch discount counts REST API call errored out ' +
|
|
56
|
-
JSON.stringify(error))))));
|
|
57
|
-
}));
|
|
58
|
-
export const fetchInvoicingCouponKPIsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCouponKPIs.match), switchMap(() => {
|
|
59
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/discounts/kpis`;
|
|
60
|
-
return zeniAPI
|
|
61
|
-
.getJSON(apiUrl)
|
|
62
|
-
.pipe(switchMap((response) => {
|
|
63
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
64
|
-
return of(updateInvoicingCouponKPIs(response.data));
|
|
65
|
-
}
|
|
66
|
-
return of(updateInvoicingCouponKPIsFailure(response.status));
|
|
67
|
-
}), catchError((error) => of(updateInvoicingCouponKPIsFailure(createZeniAPIStatus('Unexpected Error', 'Fetch discount KPIs REST API call errored out ' +
|
|
68
|
-
JSON.stringify(error))))));
|
|
69
|
-
}));
|
|
70
|
-
export const fetchInvoicingCouponDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCouponDetail.match), switchMap((action) => {
|
|
71
|
-
const { id } = action.payload;
|
|
72
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/discounts/${id}`;
|
|
73
|
-
return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
|
|
74
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
75
|
-
return [
|
|
76
|
-
updateInvoicingCoupons([response.data], 'merge'),
|
|
77
|
-
updateInvoicingCouponDetail({ id: response.data.id }),
|
|
78
|
-
];
|
|
79
|
-
}
|
|
80
|
-
return of(updateInvoicingCouponDetailFailure(response.status));
|
|
81
|
-
}), catchError((error) => of(updateInvoicingCouponDetailFailure(createZeniAPIStatus('Unexpected Error', 'Fetch discount detail REST API call errored out ' +
|
|
82
|
-
JSON.stringify(error))))));
|
|
83
|
-
}));
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
fetchState: 'Not-Started',
|
|
4
|
-
error: undefined,
|
|
5
|
-
ids: [],
|
|
6
|
-
nextCursor: null,
|
|
7
|
-
filters: {},
|
|
8
|
-
counts: { all: 0 },
|
|
9
|
-
countsFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
10
|
-
kpis: undefined,
|
|
11
|
-
kpisFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
12
|
-
detailId: undefined,
|
|
13
|
-
detailFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
14
|
-
hasValidState() {
|
|
15
|
-
return this.fetchState === 'Completed';
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
const couponView = createSlice({
|
|
19
|
-
name: 'invoicingCouponView',
|
|
20
|
-
initialState,
|
|
21
|
-
reducers: {
|
|
22
|
-
fetchInvoicingCouponList: {
|
|
23
|
-
reducer(draft, action) {
|
|
24
|
-
if (!action.payload.keepExistingListItems) {
|
|
25
|
-
draft.ids = [];
|
|
26
|
-
draft.nextCursor = null;
|
|
27
|
-
}
|
|
28
|
-
draft.filters = action.payload.filters;
|
|
29
|
-
draft.sort = action.payload.sort;
|
|
30
|
-
draft.fetchState = 'In-Progress';
|
|
31
|
-
draft.error = undefined;
|
|
32
|
-
},
|
|
33
|
-
prepare(payload) {
|
|
34
|
-
return {
|
|
35
|
-
payload: {
|
|
36
|
-
filters: payload.filters ?? {},
|
|
37
|
-
cursor: payload.cursor,
|
|
38
|
-
keepExistingListItems: payload.keepExistingListItems ?? false,
|
|
39
|
-
sort: payload.sort,
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
updateInvoicingCouponList(draft, action) {
|
|
45
|
-
draft.ids = action.payload.keepExistingListItems
|
|
46
|
-
? [...new Set([...draft.ids, ...action.payload.ids])]
|
|
47
|
-
: action.payload.ids;
|
|
48
|
-
draft.nextCursor = action.payload.nextCursor;
|
|
49
|
-
draft.fetchState = 'Completed';
|
|
50
|
-
draft.error = undefined;
|
|
51
|
-
},
|
|
52
|
-
updateInvoicingCouponListFailure(draft, action) {
|
|
53
|
-
draft.fetchState = 'Error';
|
|
54
|
-
draft.error = action.payload;
|
|
55
|
-
},
|
|
56
|
-
fetchInvoicingCouponCounts(draft) {
|
|
57
|
-
draft.countsFetchState.fetchState = 'In-Progress';
|
|
58
|
-
draft.countsFetchState.error = undefined;
|
|
59
|
-
},
|
|
60
|
-
updateInvoicingCouponCounts(draft, action) {
|
|
61
|
-
draft.counts = action.payload;
|
|
62
|
-
draft.countsFetchState.fetchState = 'Completed';
|
|
63
|
-
draft.countsFetchState.error = undefined;
|
|
64
|
-
},
|
|
65
|
-
updateInvoicingCouponCountsFailure(draft, action) {
|
|
66
|
-
draft.countsFetchState.fetchState = 'Error';
|
|
67
|
-
draft.countsFetchState.error = action.payload;
|
|
68
|
-
},
|
|
69
|
-
fetchInvoicingCouponKPIs(draft) {
|
|
70
|
-
draft.kpisFetchState.fetchState = 'In-Progress';
|
|
71
|
-
draft.kpisFetchState.error = undefined;
|
|
72
|
-
},
|
|
73
|
-
updateInvoicingCouponKPIs(draft, action) {
|
|
74
|
-
draft.kpis = action.payload;
|
|
75
|
-
draft.kpisFetchState.fetchState = 'Completed';
|
|
76
|
-
draft.kpisFetchState.error = undefined;
|
|
77
|
-
},
|
|
78
|
-
updateInvoicingCouponKPIsFailure(draft, action) {
|
|
79
|
-
draft.kpisFetchState.fetchState = 'Error';
|
|
80
|
-
draft.kpisFetchState.error = action.payload;
|
|
81
|
-
},
|
|
82
|
-
updateInvoicingCouponFilters(draft, action) {
|
|
83
|
-
draft.filters = action.payload;
|
|
84
|
-
},
|
|
85
|
-
fetchInvoicingCouponDetail(draft, action) {
|
|
86
|
-
draft.detailId = action.payload.id;
|
|
87
|
-
draft.detailFetchState.fetchState = 'In-Progress';
|
|
88
|
-
draft.detailFetchState.error = undefined;
|
|
89
|
-
},
|
|
90
|
-
updateInvoicingCouponDetail(draft, action) {
|
|
91
|
-
draft.detailId = action.payload.id;
|
|
92
|
-
draft.detailFetchState.fetchState = 'Completed';
|
|
93
|
-
draft.detailFetchState.error = undefined;
|
|
94
|
-
},
|
|
95
|
-
updateInvoicingCouponDetailFailure(draft, action) {
|
|
96
|
-
draft.detailFetchState.fetchState = 'Error';
|
|
97
|
-
draft.detailFetchState.error = action.payload;
|
|
98
|
-
},
|
|
99
|
-
clearInvoicingCouponView(draft) {
|
|
100
|
-
Object.assign(draft, initialState);
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
});
|
|
104
|
-
export const { fetchInvoicingCouponList, updateInvoicingCouponList, updateInvoicingCouponListFailure, fetchInvoicingCouponCounts, updateInvoicingCouponCounts, updateInvoicingCouponCountsFailure, fetchInvoicingCouponKPIs, updateInvoicingCouponKPIs, updateInvoicingCouponKPIsFailure, updateInvoicingCouponFilters, fetchInvoicingCouponDetail, updateInvoicingCouponDetail, updateInvoicingCouponDetailFailure, clearInvoicingCouponView, } = couponView.actions;
|
|
105
|
-
export default couponView.reducer;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export const getInvoicingCouponListItems = (state) => state.invoicingCouponViewState.ids
|
|
2
|
-
.map((id) => state.invoicingCouponState.couponByID[id])
|
|
3
|
-
.filter((item) => item != null);
|
|
4
|
-
export const getInvoicingCouponListFetchState = (state) => ({
|
|
5
|
-
fetchState: state.invoicingCouponViewState.fetchState,
|
|
6
|
-
error: state.invoicingCouponViewState.error,
|
|
7
|
-
});
|
|
8
|
-
export const getInvoicingCouponListNextCursor = (state) => state.invoicingCouponViewState.nextCursor;
|
|
9
|
-
export const getInvoicingCouponListHasMore = (state) => state.invoicingCouponViewState.nextCursor != null;
|
|
10
|
-
export const getInvoicingCouponListFilters = (state) => state.invoicingCouponViewState.filters;
|
|
11
|
-
export const getInvoicingCouponCounts = (state) => state.invoicingCouponViewState.counts;
|
|
12
|
-
export const getInvoicingCouponKPIs = (state) => state.invoicingCouponViewState.kpis;
|
|
13
|
-
export const getInvoicingCouponById = (state, id) => state.invoicingCouponState.couponByID[id];
|
|
14
|
-
export const getInvoicingCouponDetail = (state) => {
|
|
15
|
-
const id = state.invoicingCouponViewState.detailId;
|
|
16
|
-
return id != null ? state.invoicingCouponState.couponByID[id] : undefined;
|
|
17
|
-
};
|
|
18
|
-
export const getInvoicingCouponDetailFetchState = (state) => state.invoicingCouponViewState.detailFetchState;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { updateInvoicingCoupons } from '../../../entity/invoicing/coupon/couponReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
|
|
5
|
-
import { invoicingBaseUrl } from '../invoicingApiHelper';
|
|
6
|
-
import { saveInvoicingCoupon, saveInvoicingCouponFailure, saveInvoicingCouponSuccess, } from './couponWriteReducer';
|
|
7
|
-
export const saveInvoicingCouponEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(saveInvoicingCoupon.match), mergeMap((action) => {
|
|
8
|
-
const { data, id } = action.payload;
|
|
9
|
-
const baseUrl = invoicingBaseUrl(zeniAPI);
|
|
10
|
-
const path = id != null
|
|
11
|
-
? `${baseUrl}/discounts/${encodeURIComponent(id)}`
|
|
12
|
-
: `${baseUrl}/discounts`;
|
|
13
|
-
const request$ = id != null
|
|
14
|
-
? zeniAPI.putAndGetJSON(path, {
|
|
15
|
-
...data,
|
|
16
|
-
})
|
|
17
|
-
: zeniAPI.postAndGetJSON(path, {
|
|
18
|
-
...data,
|
|
19
|
-
});
|
|
20
|
-
return request$.pipe(mergeMap((response) => {
|
|
21
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
22
|
-
return [
|
|
23
|
-
updateInvoicingCoupons([response.data], 'merge'),
|
|
24
|
-
saveInvoicingCouponSuccess({ couponId: response.data.id }),
|
|
25
|
-
];
|
|
26
|
-
}
|
|
27
|
-
return of(saveInvoicingCouponFailure(response.status));
|
|
28
|
-
}), catchError((error) => of(saveInvoicingCouponFailure(createZeniAPIStatus('Unexpected Error', 'Save coupon REST API call errored out ' + JSON.stringify(error))))));
|
|
29
|
-
}));
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
fetchState: 'Not-Started',
|
|
4
|
-
error: undefined,
|
|
5
|
-
data: undefined,
|
|
6
|
-
savedCouponId: undefined,
|
|
7
|
-
hasValidState() {
|
|
8
|
-
return this.fetchState === 'Completed';
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
const couponWrite = createSlice({
|
|
12
|
-
name: 'invoicingCouponWrite',
|
|
13
|
-
initialState,
|
|
14
|
-
reducers: {
|
|
15
|
-
saveInvoicingCoupon(draft, action) {
|
|
16
|
-
draft.fetchState = 'In-Progress';
|
|
17
|
-
draft.error = undefined;
|
|
18
|
-
draft.savedCouponId = undefined;
|
|
19
|
-
draft.data = action.payload.data;
|
|
20
|
-
},
|
|
21
|
-
saveInvoicingCouponSuccess(draft, action) {
|
|
22
|
-
draft.fetchState = 'Completed';
|
|
23
|
-
draft.error = undefined;
|
|
24
|
-
draft.savedCouponId = action.payload.couponId;
|
|
25
|
-
},
|
|
26
|
-
saveInvoicingCouponFailure(draft, action) {
|
|
27
|
-
draft.fetchState = 'Error';
|
|
28
|
-
draft.error = action.payload;
|
|
29
|
-
},
|
|
30
|
-
resetInvoicingCouponWrite(draft) {
|
|
31
|
-
Object.assign(draft, initialState);
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
export const { saveInvoicingCoupon, saveInvoicingCouponSuccess, saveInvoicingCouponFailure, resetInvoicingCouponWrite, } = couponWrite.actions;
|
|
36
|
-
export default couponWrite.reducer;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { updateInvoices } from '../../../entity/invoicing/invoice/invoiceReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
|
|
5
|
-
import { invoicingBaseUrl } from '../invoicingApiHelper';
|
|
6
|
-
import { createInvoice, createInvoiceFailure, createInvoiceSuccess, } from './createInvoiceReducer';
|
|
7
|
-
export const createInvoiceEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(createInvoice.match), mergeMap((action) => {
|
|
8
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/invoices`;
|
|
9
|
-
return zeniAPI
|
|
10
|
-
.postAndGetJSON(apiUrl, {
|
|
11
|
-
...action.payload,
|
|
12
|
-
})
|
|
13
|
-
.pipe(mergeMap((response) => {
|
|
14
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
15
|
-
return [
|
|
16
|
-
updateInvoices([response.data], 'merge'),
|
|
17
|
-
createInvoiceSuccess({ invoiceId: response.data.id }),
|
|
18
|
-
];
|
|
19
|
-
}
|
|
20
|
-
return of(createInvoiceFailure(response.status));
|
|
21
|
-
}), catchError((error) => of(createInvoiceFailure(createZeniAPIStatus('Unexpected Error', 'Create invoice REST API call errored out ' +
|
|
22
|
-
JSON.stringify(error))))));
|
|
23
|
-
}));
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
fetchState: 'Not-Started',
|
|
4
|
-
error: undefined,
|
|
5
|
-
createdInvoiceId: undefined,
|
|
6
|
-
request: undefined,
|
|
7
|
-
hasValidState() {
|
|
8
|
-
return this.fetchState === 'Completed';
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
const createInvoiceSlice = createSlice({
|
|
12
|
-
name: 'invoicingCreateInvoice',
|
|
13
|
-
initialState,
|
|
14
|
-
reducers: {
|
|
15
|
-
createInvoice(draft, action) {
|
|
16
|
-
draft.fetchState = 'In-Progress';
|
|
17
|
-
draft.error = undefined;
|
|
18
|
-
draft.createdInvoiceId = undefined;
|
|
19
|
-
draft.request = action.payload;
|
|
20
|
-
},
|
|
21
|
-
createInvoiceSuccess(draft, action) {
|
|
22
|
-
draft.fetchState = 'Completed';
|
|
23
|
-
draft.error = undefined;
|
|
24
|
-
draft.createdInvoiceId = action.payload.invoiceId;
|
|
25
|
-
},
|
|
26
|
-
createInvoiceFailure(draft, action) {
|
|
27
|
-
draft.fetchState = 'Error';
|
|
28
|
-
draft.error = action.payload;
|
|
29
|
-
},
|
|
30
|
-
resetCreateInvoice(draft) {
|
|
31
|
-
Object.assign(draft, initialState);
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
export const { createInvoice, createInvoiceSuccess, createInvoiceFailure, resetCreateInvoice, } = createInvoiceSlice.actions;
|
|
36
|
-
export default createInvoiceSlice.reducer;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, switchMap } from 'rxjs/operators';
|
|
3
|
-
import { updateInvoicingCreditNotes } from '../../../entity/invoicing/creditNote/creditNoteReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
|
|
5
|
-
import { INVOICING_LIST_PAGE_SIZE, applyListSortParams, invoicingBaseUrl, withQuery, } from '../invoicingApiHelper';
|
|
6
|
-
import { fetchInvoicingCreditNoteCounts, fetchInvoicingCreditNoteDetail, fetchInvoicingCreditNoteKPIs, fetchInvoicingCreditNoteList, updateInvoicingCreditNoteCounts, updateInvoicingCreditNoteCountsFailure, updateInvoicingCreditNoteDetail, updateInvoicingCreditNoteDetailFailure, updateInvoicingCreditNoteKPIs, updateInvoicingCreditNoteKPIsFailure, updateInvoicingCreditNoteList, updateInvoicingCreditNoteListFailure, } from './creditNoteViewReducer';
|
|
7
|
-
const buildQuery = (filters, cursor, sort) => {
|
|
8
|
-
const params = new URLSearchParams();
|
|
9
|
-
if (filters.status != null && filters.status.length > 0) {
|
|
10
|
-
params.set('status', filters.status);
|
|
11
|
-
}
|
|
12
|
-
if (filters.customerId != null) {
|
|
13
|
-
params.set('customer_id', filters.customerId);
|
|
14
|
-
}
|
|
15
|
-
if (filters.search != null && filters.search.length > 0) {
|
|
16
|
-
params.set('search', filters.search);
|
|
17
|
-
}
|
|
18
|
-
params.set('limit', String(INVOICING_LIST_PAGE_SIZE));
|
|
19
|
-
if (cursor != null) {
|
|
20
|
-
params.set('cursor', cursor);
|
|
21
|
-
}
|
|
22
|
-
applyListSortParams(params, sort);
|
|
23
|
-
return params;
|
|
24
|
-
};
|
|
25
|
-
export const fetchInvoicingCreditNoteListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCreditNoteList.match), switchMap((action) => {
|
|
26
|
-
const { filters, cursor, keepExistingListItems, sort } = action.payload;
|
|
27
|
-
const apiUrl = withQuery(`${invoicingBaseUrl(zeniAPI)}/credits`, buildQuery(filters, cursor, sort));
|
|
28
|
-
return zeniAPI
|
|
29
|
-
.getJSON(apiUrl)
|
|
30
|
-
.pipe(switchMap((response) => {
|
|
31
|
-
if (isSuccessResponse(response)) {
|
|
32
|
-
const items = response.data?.items ?? [];
|
|
33
|
-
return [
|
|
34
|
-
updateInvoicingCreditNotes(items, 'merge'),
|
|
35
|
-
updateInvoicingCreditNoteList({
|
|
36
|
-
ids: items.map((item) => item.id),
|
|
37
|
-
nextCursor: response.data?.next_cursor ?? null,
|
|
38
|
-
keepExistingListItems,
|
|
39
|
-
}),
|
|
40
|
-
];
|
|
41
|
-
}
|
|
42
|
-
return of(updateInvoicingCreditNoteListFailure(response.status));
|
|
43
|
-
}), catchError((error) => of(updateInvoicingCreditNoteListFailure(createZeniAPIStatus('Unexpected Error', 'Fetch credit note list REST API call errored out ' +
|
|
44
|
-
JSON.stringify(error))))));
|
|
45
|
-
}));
|
|
46
|
-
export const fetchInvoicingCreditNoteCountsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCreditNoteCounts.match), switchMap(() => {
|
|
47
|
-
const { filters } = state$.value.invoicingCreditNoteViewState;
|
|
48
|
-
const params = new URLSearchParams();
|
|
49
|
-
if (filters.search != null && filters.search.length > 0) {
|
|
50
|
-
params.set('search', filters.search);
|
|
51
|
-
}
|
|
52
|
-
if (filters.customerId != null) {
|
|
53
|
-
params.set('customer_id', filters.customerId);
|
|
54
|
-
}
|
|
55
|
-
const apiUrl = withQuery(`${invoicingBaseUrl(zeniAPI)}/credits/counts`, params);
|
|
56
|
-
return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
|
|
57
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
58
|
-
return of(updateInvoicingCreditNoteCounts(response.data));
|
|
59
|
-
}
|
|
60
|
-
return of(updateInvoicingCreditNoteCountsFailure(response.status));
|
|
61
|
-
}), catchError((error) => of(updateInvoicingCreditNoteCountsFailure(createZeniAPIStatus('Unexpected Error', 'Fetch credit note counts REST API call errored out ' +
|
|
62
|
-
JSON.stringify(error))))));
|
|
63
|
-
}));
|
|
64
|
-
export const fetchInvoicingCreditNoteKPIsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCreditNoteKPIs.match), switchMap(() => {
|
|
65
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/credits/kpis`;
|
|
66
|
-
return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
|
|
67
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
68
|
-
return of(updateInvoicingCreditNoteKPIs(response.data));
|
|
69
|
-
}
|
|
70
|
-
return of(updateInvoicingCreditNoteKPIsFailure(response.status));
|
|
71
|
-
}), catchError((error) => of(updateInvoicingCreditNoteKPIsFailure(createZeniAPIStatus('Unexpected Error', 'Fetch credit note KPIs REST API call errored out ' +
|
|
72
|
-
JSON.stringify(error))))));
|
|
73
|
-
}));
|
|
74
|
-
export const fetchInvoicingCreditNoteDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCreditNoteDetail.match), switchMap((action) => {
|
|
75
|
-
const { id } = action.payload;
|
|
76
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/credits/${id}`;
|
|
77
|
-
return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
|
|
78
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
79
|
-
return [
|
|
80
|
-
updateInvoicingCreditNotes([response.data], 'merge'),
|
|
81
|
-
updateInvoicingCreditNoteDetail({ id: response.data.id }),
|
|
82
|
-
];
|
|
83
|
-
}
|
|
84
|
-
return of(updateInvoicingCreditNoteDetailFailure(response.status));
|
|
85
|
-
}), catchError((error) => of(updateInvoicingCreditNoteDetailFailure(createZeniAPIStatus('Unexpected Error', 'Fetch credit note detail REST API call errored out ' +
|
|
86
|
-
JSON.stringify(error))))));
|
|
87
|
-
}));
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
fetchState: 'Not-Started',
|
|
4
|
-
error: undefined,
|
|
5
|
-
ids: [],
|
|
6
|
-
nextCursor: null,
|
|
7
|
-
filters: {},
|
|
8
|
-
counts: { all: 0 },
|
|
9
|
-
countsFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
10
|
-
kpis: undefined,
|
|
11
|
-
kpisFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
12
|
-
detailId: undefined,
|
|
13
|
-
detailFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
14
|
-
hasValidState() {
|
|
15
|
-
return this.fetchState === 'Completed';
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
const creditNoteView = createSlice({
|
|
19
|
-
name: 'invoicingCreditNoteView',
|
|
20
|
-
initialState,
|
|
21
|
-
reducers: {
|
|
22
|
-
fetchInvoicingCreditNoteList: {
|
|
23
|
-
reducer(draft, action) {
|
|
24
|
-
if (!action.payload.keepExistingListItems) {
|
|
25
|
-
draft.ids = [];
|
|
26
|
-
draft.nextCursor = null;
|
|
27
|
-
}
|
|
28
|
-
draft.filters = action.payload.filters;
|
|
29
|
-
draft.sort = action.payload.sort;
|
|
30
|
-
draft.fetchState = 'In-Progress';
|
|
31
|
-
draft.error = undefined;
|
|
32
|
-
},
|
|
33
|
-
prepare(payload) {
|
|
34
|
-
return {
|
|
35
|
-
payload: {
|
|
36
|
-
filters: payload.filters ?? {},
|
|
37
|
-
cursor: payload.cursor,
|
|
38
|
-
keepExistingListItems: payload.keepExistingListItems ?? false,
|
|
39
|
-
sort: payload.sort,
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
updateInvoicingCreditNoteList(draft, action) {
|
|
45
|
-
draft.ids = action.payload.keepExistingListItems
|
|
46
|
-
? [...new Set([...draft.ids, ...action.payload.ids])]
|
|
47
|
-
: action.payload.ids;
|
|
48
|
-
draft.nextCursor = action.payload.nextCursor;
|
|
49
|
-
draft.fetchState = 'Completed';
|
|
50
|
-
draft.error = undefined;
|
|
51
|
-
},
|
|
52
|
-
updateInvoicingCreditNoteListFailure(draft, action) {
|
|
53
|
-
draft.fetchState = 'Error';
|
|
54
|
-
draft.error = action.payload;
|
|
55
|
-
},
|
|
56
|
-
fetchInvoicingCreditNoteCounts(draft) {
|
|
57
|
-
draft.countsFetchState.fetchState = 'In-Progress';
|
|
58
|
-
draft.countsFetchState.error = undefined;
|
|
59
|
-
},
|
|
60
|
-
updateInvoicingCreditNoteCounts(draft, action) {
|
|
61
|
-
draft.counts = action.payload;
|
|
62
|
-
draft.countsFetchState.fetchState = 'Completed';
|
|
63
|
-
draft.countsFetchState.error = undefined;
|
|
64
|
-
},
|
|
65
|
-
updateInvoicingCreditNoteCountsFailure(draft, action) {
|
|
66
|
-
draft.countsFetchState.fetchState = 'Error';
|
|
67
|
-
draft.countsFetchState.error = action.payload;
|
|
68
|
-
},
|
|
69
|
-
fetchInvoicingCreditNoteKPIs(draft) {
|
|
70
|
-
draft.kpisFetchState.fetchState = 'In-Progress';
|
|
71
|
-
draft.kpisFetchState.error = undefined;
|
|
72
|
-
},
|
|
73
|
-
updateInvoicingCreditNoteKPIs(draft, action) {
|
|
74
|
-
draft.kpis = action.payload;
|
|
75
|
-
draft.kpisFetchState.fetchState = 'Completed';
|
|
76
|
-
draft.kpisFetchState.error = undefined;
|
|
77
|
-
},
|
|
78
|
-
updateInvoicingCreditNoteKPIsFailure(draft, action) {
|
|
79
|
-
draft.kpisFetchState.fetchState = 'Error';
|
|
80
|
-
draft.kpisFetchState.error = action.payload;
|
|
81
|
-
},
|
|
82
|
-
updateInvoicingCreditNoteFilters(draft, action) {
|
|
83
|
-
draft.filters = action.payload;
|
|
84
|
-
},
|
|
85
|
-
fetchInvoicingCreditNoteDetail(draft, action) {
|
|
86
|
-
draft.detailId = action.payload.id;
|
|
87
|
-
draft.detailFetchState.fetchState = 'In-Progress';
|
|
88
|
-
draft.detailFetchState.error = undefined;
|
|
89
|
-
},
|
|
90
|
-
updateInvoicingCreditNoteDetail(draft, action) {
|
|
91
|
-
draft.detailId = action.payload.id;
|
|
92
|
-
draft.detailFetchState.fetchState = 'Completed';
|
|
93
|
-
draft.detailFetchState.error = undefined;
|
|
94
|
-
},
|
|
95
|
-
updateInvoicingCreditNoteDetailFailure(draft, action) {
|
|
96
|
-
draft.detailFetchState.fetchState = 'Error';
|
|
97
|
-
draft.detailFetchState.error = action.payload;
|
|
98
|
-
},
|
|
99
|
-
clearInvoicingCreditNoteView(draft) {
|
|
100
|
-
Object.assign(draft, initialState);
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
});
|
|
104
|
-
export const { fetchInvoicingCreditNoteList, updateInvoicingCreditNoteList, updateInvoicingCreditNoteListFailure, fetchInvoicingCreditNoteCounts, updateInvoicingCreditNoteCounts, updateInvoicingCreditNoteCountsFailure, fetchInvoicingCreditNoteKPIs, updateInvoicingCreditNoteKPIs, updateInvoicingCreditNoteKPIsFailure, updateInvoicingCreditNoteFilters, fetchInvoicingCreditNoteDetail, updateInvoicingCreditNoteDetail, updateInvoicingCreditNoteDetailFailure, clearInvoicingCreditNoteView, } = creditNoteView.actions;
|
|
105
|
-
export default creditNoteView.reducer;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export const getInvoicingCreditNoteListItems = (state) => state.invoicingCreditNoteViewState.ids
|
|
2
|
-
.map((id) => state.invoicingCreditNoteState.creditNoteByID[id])
|
|
3
|
-
.filter((item) => item != null);
|
|
4
|
-
export const getInvoicingCreditNoteListFetchState = (state) => ({
|
|
5
|
-
fetchState: state.invoicingCreditNoteViewState.fetchState,
|
|
6
|
-
error: state.invoicingCreditNoteViewState.error,
|
|
7
|
-
});
|
|
8
|
-
export const getInvoicingCreditNoteListNextCursor = (state) => state.invoicingCreditNoteViewState.nextCursor;
|
|
9
|
-
export const getInvoicingCreditNoteListHasMore = (state) => state.invoicingCreditNoteViewState.nextCursor != null;
|
|
10
|
-
export const getInvoicingCreditNoteListFilters = (state) => state.invoicingCreditNoteViewState.filters;
|
|
11
|
-
export const getInvoicingCreditNoteCounts = (state) => state.invoicingCreditNoteViewState.counts;
|
|
12
|
-
export const getInvoicingCreditNoteKPIs = (state) => state.invoicingCreditNoteViewState.kpis;
|
|
13
|
-
export const getInvoicingCreditNoteById = (state, id) => state.invoicingCreditNoteState.creditNoteByID[id];
|
|
14
|
-
export const getInvoicingCreditNoteDetail = (state) => {
|
|
15
|
-
const id = state.invoicingCreditNoteViewState.detailId;
|
|
16
|
-
return id != null
|
|
17
|
-
? state.invoicingCreditNoteState.creditNoteByID[id]
|
|
18
|
-
: undefined;
|
|
19
|
-
};
|
|
20
|
-
export const getInvoicingCreditNoteDetailFetchState = (state) => state.invoicingCreditNoteViewState.detailFetchState;
|