@zeniai/client-epic-state 5.2.3 → 5.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/invoicing/invoicingCommonPayload.d.ts +27 -0
- package/lib/entity/invoicing/invoicingCommonPayload.js +52 -1
- package/lib/esm/entity/invoicing/invoicingCommonPayload.js +50 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/view/invoicing/auditView/auditViewPayload.js +11 -0
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +2 -0
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.js +7 -4
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +3 -5
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js +0 -31
- package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +5 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +7 -0
- package/lib/esm/view/invoicing/invoicingCouponDetailView/invoicingCouponDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +2 -0
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +2 -1
- package/lib/esm/view/invoicing/recordPayment/recordPaymentSelector.js +2 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +6 -7
- package/lib/view/companyView/types/cockpitTabsID.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
- package/lib/view/invoicing/auditView/auditViewPayload.d.ts +2 -0
- package/lib/view/invoicing/auditView/auditViewPayload.js +11 -0
- package/lib/view/invoicing/couponView/couponViewState.d.ts +1 -1
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +6 -1
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +2 -0
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +1 -0
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +1 -0
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +1 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.d.ts +6 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewPayload.js +6 -3
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +6 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +1 -3
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewState.d.ts +0 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.d.ts +0 -13
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/invoicingSubscriptionFormConfig.js +1 -34
- package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.d.ts +6 -0
- package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.js +2 -0
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.d.ts +6 -1
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +1 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +2 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +4 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +8 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +9 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +3 -1
- package/lib/view/invoicing/invoicingCouponDetailView/invoicingCouponDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingCouponDetailView/invoicingCouponDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.d.ts +1 -1
- package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.d.ts +6 -0
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +2 -0
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.d.ts +6 -1
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +1 -0
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.d.ts +6 -1
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.js +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInvoicingOnboardingGateView = exports.getInvoicingConfigView = void 0;
|
|
3
|
+
exports.invoicingFieldHelpForGroup = exports.getInvoicingOnboardingGateView = exports.getInvoicingConfigView = void 0;
|
|
4
4
|
const invoicingConfigViewPayload_1 = require("./invoicingConfigViewPayload");
|
|
5
5
|
const getInvoicingConfigView = (state) => {
|
|
6
6
|
const { acceptTermsFetchState, enableFetchState, ...configState } = state.invoicingConfigViewState;
|
|
@@ -22,3 +22,11 @@ const getInvoicingOnboardingGateView = (state) => {
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
exports.getInvoicingOnboardingGateView = getInvoicingOnboardingGateView;
|
|
25
|
+
/**
|
|
26
|
+
* One group's help copy, keyed by field code. Composed by the page-level view
|
|
27
|
+
* selectors rather than exported to the UI: a screen receives the slice for its
|
|
28
|
+
* own group, so no screen needs the config shape. Empty when the backend has
|
|
29
|
+
* not populated the group, which the UI reads as "render no icon".
|
|
30
|
+
*/
|
|
31
|
+
const invoicingFieldHelpForGroup = (state, group) => state.invoicingConfigViewState.fieldHelp[group] ?? {};
|
|
32
|
+
exports.invoicingFieldHelpForGroup = invoicingFieldHelpForGroup;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FetchStateAndError, FetchedState } from '../../../commonStateTypes/common';
|
|
2
|
-
import type { AuditLogEntityRouteOption, AuditLogListSortFieldOption, AuditLogSourceLabelOption, InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingDiscountLifecycleActionOption, InvoicingNamedOption, InvoicingNamedOptionsByKey, InvoicingQboAccountMappingKindOption, InvoicingSubscriptionEditFieldOption, InvoicingSubscriptionLifecycleActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
2
|
+
import type { AuditLogEntityRouteOption, AuditLogListSortFieldOption, AuditLogSourceLabelOption, InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingDiscountLifecycleActionOption, InvoicingFieldHelp, InvoicingNamedOption, InvoicingNamedOptionsByKey, InvoicingQboAccountMappingKindOption, InvoicingSubscriptionEditFieldOption, InvoicingSubscriptionLifecycleActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
3
|
import { InvoicingDunningActionOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
export interface InvoicingConfigViewState extends FetchedState {
|
|
5
5
|
acceptTermsFetchState: FetchStateAndError;
|
|
@@ -29,6 +29,8 @@ export interface InvoicingConfigViewState extends FetchedState {
|
|
|
29
29
|
dunningCaseStatusOptions: InvoicingNamedOption[];
|
|
30
30
|
dunningScheduleActionOptions: InvoicingDunningActionOption[];
|
|
31
31
|
enableFetchState: FetchStateAndError;
|
|
32
|
+
/** Help copy per field group, flattened to `code -> description` at load. */
|
|
33
|
+
fieldHelp: InvoicingFieldHelp;
|
|
32
34
|
invoiceStatusOptions: InvoicingNamedOption[];
|
|
33
35
|
manualPaymentMethodOptions: InvoicingNamedOption[];
|
|
34
36
|
netTermDayOptions: InvoicingNamedOption[];
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { InvoicingCoupon } from '../../../entity/invoicing/coupon/couponState';
|
|
4
|
+
import type { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
5
|
import { RootState } from '../../../rootStateTypes';
|
|
5
6
|
/**
|
|
6
7
|
* Read-only view for the discount detail page: the coupon entity + its per-id
|
|
7
8
|
* fetch state. Lets the detail screen depend on this single read selector.
|
|
8
9
|
*/
|
|
9
10
|
export interface InvoicingCouponDetailView extends SelectorView {
|
|
11
|
+
/**
|
|
12
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
13
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
14
|
+
*/
|
|
15
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
10
16
|
coupon?: InvoicingCoupon;
|
|
11
17
|
}
|
|
12
18
|
export declare const getInvoicingCouponDetail: (state: RootState, id: ID) => InvoicingCouponDetailView;
|
|
@@ -6,9 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.getInvoicingCouponDetail = void 0;
|
|
7
7
|
const get_1 = __importDefault(require("lodash/get"));
|
|
8
8
|
const couponSelector_1 = require("../../../entity/invoicing/coupon/couponSelector");
|
|
9
|
+
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
9
10
|
const getInvoicingCouponDetail = (state, id) => {
|
|
10
11
|
const detail = (0, get_1.default)(state.invoicingCouponDetailViewState.detailById, id, undefined);
|
|
11
12
|
return {
|
|
13
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'discount'),
|
|
12
14
|
coupon: (0, couponSelector_1.getInvoicingCouponById)(state.invoicingCouponState, id),
|
|
13
15
|
fetchState: detail?.fetchState ?? 'Not-Started',
|
|
14
16
|
error: detail?.error,
|
package/lib/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { InvoicingCreditNote } from '../../../entity/invoicing/creditNote/creditNoteState';
|
|
4
|
+
import type { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
5
|
import { RootState } from '../../../rootStateTypes';
|
|
5
6
|
/**
|
|
6
7
|
* Read-only view for the credit note detail page: the credit note entity + its
|
|
@@ -8,6 +9,11 @@ import { RootState } from '../../../rootStateTypes';
|
|
|
8
9
|
* selector.
|
|
9
10
|
*/
|
|
10
11
|
export interface InvoicingCreditNoteDetailView extends SelectorView {
|
|
12
|
+
/**
|
|
13
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
14
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
15
|
+
*/
|
|
16
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
11
17
|
creditNote?: InvoicingCreditNote;
|
|
12
18
|
}
|
|
13
19
|
export declare const getInvoicingCreditNoteById: (state: RootState, id: string) => InvoicingCreditNote | undefined;
|
package/lib/view/invoicing/invoicingCreditNoteDetailView/invoicingCreditNoteDetailViewSelector.js
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getInvoicingCreditNoteDetail = exports.getInvoicingCreditNoteById = void 0;
|
|
4
4
|
const creditNoteSelector_1 = require("../../../entity/invoicing/creditNote/creditNoteSelector");
|
|
5
|
+
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
5
6
|
const getInvoicingCreditNoteById = (state, id) => (0, creditNoteSelector_1.getInvoicingCreditNoteById)(state.invoicingCreditNoteState, id);
|
|
6
7
|
exports.getInvoicingCreditNoteById = getInvoicingCreditNoteById;
|
|
7
8
|
const getInvoicingCreditNoteDetail = (state, invoicingCreditNoteID) => {
|
|
8
9
|
const { error, fetchState } = state.invoicingCreditNoteDetailViewState;
|
|
9
10
|
return {
|
|
11
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'credit_note'),
|
|
10
12
|
creditNote: (0, exports.getInvoicingCreditNoteById)(state, invoicingCreditNoteID),
|
|
11
13
|
fetchState,
|
|
12
14
|
error,
|
package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface InvoicingCreditNoteFilters {
|
|
|
6
6
|
search?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare const ALL_INVOICING_CREDIT_NOTE_SORT_KEYS: readonly ["credit_note", "customer", "date", "type", "status", "reference_invoice", "utilization", "total"];
|
|
9
|
-
export declare const toInvoicingCreditNoteSortKey: (v: string) => "type" | "date" | "status" | "customer" | "
|
|
9
|
+
export declare const toInvoicingCreditNoteSortKey: (v: string) => "type" | "date" | "status" | "customer" | "credit_note" | "total" | "reference_invoice" | "utilization";
|
|
10
10
|
export type InvoicingCreditNoteSortKey = ReturnType<typeof toInvoicingCreditNoteSortKey>;
|
|
11
11
|
/**
|
|
12
12
|
* Structural column descriptor owned by CES so the credit-notes-list column set,
|
package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { InvoicingInvoice } from '../../../entity/invoicing/invoice/invoiceState';
|
|
4
|
+
import type { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
5
|
import { InvoicingCustomer, InvoicingCustomerPaymentMethod } from '../../../entity/invoicing/invoicingCustomer/invoicingCustomerState';
|
|
5
6
|
import { RootState } from '../../../rootStateTypes';
|
|
6
7
|
import { InvoicingSetupIntent } from '../customerPaymentMethod/customerPaymentMethodState';
|
|
@@ -13,6 +14,11 @@ import { InvoicingSetupIntent } from '../customerPaymentMethod/customerPaymentMe
|
|
|
13
14
|
* read selector.
|
|
14
15
|
*/
|
|
15
16
|
export interface InvoicingCustomerDetailView extends SelectorView {
|
|
17
|
+
/**
|
|
18
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
19
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
20
|
+
*/
|
|
21
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
16
22
|
invoices: InvoicingInvoice[];
|
|
17
23
|
paymentMethods: InvoicingCustomerPaymentMethod[];
|
|
18
24
|
paymentMethodSaveState: FetchStateAndError;
|
package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js
CHANGED
|
@@ -8,6 +8,7 @@ const get_1 = __importDefault(require("lodash/get"));
|
|
|
8
8
|
const invoiceSelector_1 = require("../../../entity/invoicing/invoice/invoiceSelector");
|
|
9
9
|
const invoicingCustomerSelector_1 = require("../../../entity/invoicing/invoicingCustomer/invoicingCustomerSelector");
|
|
10
10
|
const customerPaymentMethodSelector_1 = require("../customerPaymentMethod/customerPaymentMethodSelector");
|
|
11
|
+
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
11
12
|
const invoicingSettingsHelpers_1 = require("../settingsView/invoicingSettingsHelpers");
|
|
12
13
|
const settingsViewSelector_1 = require("../settingsView/settingsViewSelector");
|
|
13
14
|
const getInvoicingCustomerDetail = (state, invoicingCustomerID) => {
|
|
@@ -16,6 +17,7 @@ const getInvoicingCustomerDetail = (state, invoicingCustomerID) => {
|
|
|
16
17
|
const settings = (0, settingsViewSelector_1.getInvoicingSettings)(state);
|
|
17
18
|
const invoicingCustomer = (0, invoicingCustomerSelector_1.getInvoicingCustomerById)(invoicingCustomerState, invoicingCustomerID);
|
|
18
19
|
return {
|
|
20
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'customer'),
|
|
19
21
|
invoicingCustomer,
|
|
20
22
|
invoices: (0, invoiceSelector_1.getInvoicesByIds)(state.invoicingInvoiceState, state.invoicingInvoiceListState.invoiceByTab[state.invoicingInvoiceListState.activeTab]?.invoiceIds ?? []),
|
|
21
23
|
paymentMethods: (0, invoicingCustomerSelector_1.invoicingCustomerPaymentMethods)(invoicingCustomer),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { InvoicingDunningCase } from '../../../entity/invoicing/dunningCase/dunningCaseState';
|
|
4
|
+
import type { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
5
|
import { RootState } from '../../../rootStateTypes';
|
|
5
6
|
import { InvoicingDunningEmailPreviewState } from './invoicingDunningCaseDetailViewState';
|
|
6
7
|
/**
|
|
@@ -11,6 +12,11 @@ import { InvoicingDunningEmailPreviewState } from './invoicingDunningCaseDetailV
|
|
|
11
12
|
export interface InvoicingDunningCaseDetailView extends SelectorView {
|
|
12
13
|
actionState: FetchStateAndError;
|
|
13
14
|
emailPreview: InvoicingDunningEmailPreviewState;
|
|
15
|
+
/**
|
|
16
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
17
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
18
|
+
*/
|
|
19
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
14
20
|
dunningCase?: InvoicingDunningCase;
|
|
15
21
|
}
|
|
16
22
|
export declare const getInvoicingDunningCaseById: (state: RootState, id: string) => InvoicingDunningCase | undefined;
|
package/lib/view/invoicing/invoicingDunningCaseDetailView/invoicingDunningCaseDetailViewSelector.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getInvoicingDunningEmailPreview = exports.getInvoicingDunningCaseDetail = exports.getInvoicingDunningCaseById = void 0;
|
|
4
4
|
const dunningCaseSelector_1 = require("../../../entity/invoicing/dunningCase/dunningCaseSelector");
|
|
5
5
|
const dunningActionSelector_1 = require("../dunningAction/dunningActionSelector");
|
|
6
|
+
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
6
7
|
const EMAIL_PREVIEW_NOT_STARTED = {
|
|
7
8
|
error: undefined,
|
|
8
9
|
fetchState: 'Not-Started',
|
|
@@ -13,6 +14,7 @@ exports.getInvoicingDunningCaseById = getInvoicingDunningCaseById;
|
|
|
13
14
|
const getInvoicingDunningCaseDetail = (state, invoicingDunningCaseID) => {
|
|
14
15
|
const { emailPreview, error, fetchState, id } = state.invoicingDunningCaseDetailViewState;
|
|
15
16
|
return {
|
|
17
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'dunning'),
|
|
16
18
|
actionState: (0, dunningActionSelector_1.getInvoicingDunningActionState)(invoicingDunningCaseID)(state),
|
|
17
19
|
dunningCase: (0, exports.getInvoicingDunningCaseById)(state, invoicingDunningCaseID),
|
|
18
20
|
emailPreview: id === invoicingDunningCaseID ? emailPreview : EMAIL_PREVIEW_NOT_STARTED,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import type { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
4
|
import { InvoicingSubscription } from '../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionState';
|
|
4
5
|
import { RootState } from '../../../rootStateTypes';
|
|
5
6
|
/**
|
|
@@ -9,6 +10,11 @@ import { RootState } from '../../../rootStateTypes';
|
|
|
9
10
|
*/
|
|
10
11
|
export interface InvoicingSubscriptionDetailView extends SelectorView {
|
|
11
12
|
actionState: FetchStateAndError;
|
|
13
|
+
/**
|
|
14
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
15
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
16
|
+
*/
|
|
17
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
12
18
|
subscription?: InvoicingSubscription;
|
|
13
19
|
}
|
|
14
20
|
export declare const getInvoicingSubscriptionById: (state: RootState, id: string) => InvoicingSubscription | undefined;
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getInvoicingSubscriptionDetail = exports.getInvoicingSubscriptionById = void 0;
|
|
4
4
|
const invoicingSubscriptionSelector_1 = require("../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionSelector");
|
|
5
|
+
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
5
6
|
const subscriptionActionSelector_1 = require("../subscriptionAction/subscriptionActionSelector");
|
|
6
7
|
const getInvoicingSubscriptionById = (state, id) => (0, invoicingSubscriptionSelector_1.getInvoicingSubscriptionById)(state.invoicingSubscriptionState, id);
|
|
7
8
|
exports.getInvoicingSubscriptionById = getInvoicingSubscriptionById;
|
|
8
9
|
const getInvoicingSubscriptionDetail = (state, invoicingSubscriptionID) => {
|
|
9
10
|
const { error, fetchState } = state.invoicingSubscriptionDetailViewState;
|
|
10
11
|
return {
|
|
12
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'subscription'),
|
|
11
13
|
actionState: (0, subscriptionActionSelector_1.getInvoicingSubscriptionActionState)(invoicingSubscriptionID)(state),
|
|
12
14
|
subscription: (0, exports.getInvoicingSubscriptionById)(state, invoicingSubscriptionID),
|
|
13
15
|
fetchState,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { InvoicingInvoice } from '../../../entity/invoicing/invoice/invoiceState';
|
|
4
|
-
import { InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
|
+
import { InvoicingFieldHelpByCode, InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
5
5
|
import { RootState } from '../../../rootStateTypes';
|
|
6
6
|
import { IssueCreditNoteFormLocalData } from './issueCreditNoteState';
|
|
7
7
|
/**
|
|
@@ -11,6 +11,11 @@ import { IssueCreditNoteFormLocalData } from './issueCreditNoteState';
|
|
|
11
11
|
* as `submitState` so a save failure can't be mistaken for a load failure.
|
|
12
12
|
*/
|
|
13
13
|
export interface IssueCreditNoteView extends SelectorView {
|
|
14
|
+
/**
|
|
15
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
16
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
17
|
+
*/
|
|
18
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
14
19
|
/**
|
|
15
20
|
* True once the invoice has loaded and the draft for *this* invoice has line
|
|
16
21
|
* items to credit.
|
|
@@ -16,6 +16,7 @@ const getIssueCreditNoteView = (state, invoiceId) => {
|
|
|
16
16
|
const isDraftForInvoice = draft.invoiceId === invoiceId;
|
|
17
17
|
const { creditNoteReasonCodeOptions, creditNoteTypeOptions } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
18
18
|
return {
|
|
19
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'credit_note'),
|
|
19
20
|
invoice: invoiceView.invoice,
|
|
20
21
|
isPageReady: invoiceView.fetchState === 'Completed' &&
|
|
21
22
|
isDraftForInvoice &&
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
|
+
import { InvoicingFieldHelpByCode, InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
import { RootState } from '../../../rootStateTypes';
|
|
5
5
|
import { RecordPaymentFormLocalData } from './recordPaymentState';
|
|
6
6
|
export interface InvoicingRecordPaymentView extends SelectorView {
|
|
@@ -17,6 +17,11 @@ export declare const getRecordPaymentView: (state: RootState) => InvoicingRecord
|
|
|
17
17
|
* CES-owned payment-method / gateway value sets, and the submit fetch state.
|
|
18
18
|
*/
|
|
19
19
|
export interface RecordPaymentFormView extends SelectorView {
|
|
20
|
+
/**
|
|
21
|
+
* Backend help copy for this screen's field group, keyed by field code.
|
|
22
|
+
* Folded in here so the screen never reaches for the config view itself.
|
|
23
|
+
*/
|
|
24
|
+
fieldHelp: InvoicingFieldHelpByCode;
|
|
20
25
|
gatewayOptions: InvoicingNamedOption[];
|
|
21
26
|
localData: RecordPaymentFormLocalData;
|
|
22
27
|
paymentMethodOptions: InvoicingNamedOption[];
|
|
@@ -23,6 +23,7 @@ const getRecordPaymentFormView = (state) => {
|
|
|
23
23
|
const { contextInvoiceId, error, fetchState, newPaymentDraft } = state.invoicingRecordPaymentState;
|
|
24
24
|
const { manualPaymentMethodOptions, paymentGatewayOptions } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
25
25
|
return {
|
|
26
|
+
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'payment'),
|
|
26
27
|
contextInvoiceId,
|
|
27
28
|
gatewayOptions: paymentGatewayOptions,
|
|
28
29
|
localData: newPaymentDraft,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.4",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|