@zeniai/client-epic-state 5.2.54-betaRD1 → 5.2.54
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/plan/planSelector.d.ts +9 -0
- package/lib/entity/invoicing/plan/planSelector.js +3 -2
- package/lib/entity/invoicing/product/productPayload.d.ts +1 -1
- package/lib/entity/invoicing/product/productPayload.js +1 -1
- package/lib/entity/invoicing/product/productState.d.ts +10 -0
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +1 -4
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +5 -79
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +4 -6
- package/lib/esm/entity/invoicing/plan/planSelector.js +1 -1
- package/lib/esm/entity/invoicing/product/productPayload.js +1 -1
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +4 -78
- package/lib/esm/epic.js +4 -6
- package/lib/esm/index.js +3 -3
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +1 -14
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +13 -10
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +17 -38
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +1 -17
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -74
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +14 -49
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +28 -1
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.js +1 -7
- package/lib/index.d.ts +3 -3
- package/lib/index.js +49 -50
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +0 -13
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +11 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +17 -38
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +1 -17
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +0 -18
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +3 -10
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +3 -76
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -3
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +14 -49
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -16
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +7 -2
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +28 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.js +1 -7
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.js +0 -39
- package/lib/tsconfig.mocks.tsbuildinfo +0 -1
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.d.ts +0 -20
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.js +0 -43
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { InvoicingPlan } from '../../../entity/invoicing/plan/planState';
|
|
2
|
-
import { InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
2
|
+
import { InvoicingCatalogPricingModel, InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
3
3
|
import { InvoicingCatalogItemFormLocalData, InvoicingCatalogItemFormSubFamily, InvoicingCatalogItemFormTier } from './editInvoicingCatalogItemDetailViewState';
|
|
4
4
|
/**
|
|
5
5
|
* Value sets the catalog item form still owns locally: the backend has no enum
|
|
6
6
|
* for pricing model, tier type, proration or applicability yet, so these stay
|
|
7
7
|
* here until it does. Everything else on this form comes from `/1.0/config`.
|
|
8
8
|
*/
|
|
9
|
-
export declare const INVOICING_CATALOG_PRICING_MODEL_VALUES: readonly [
|
|
9
|
+
export declare const INVOICING_CATALOG_PRICING_MODEL_VALUES: readonly InvoicingCatalogPricingModel[];
|
|
10
10
|
export declare const INVOICING_CATALOG_TIER_TYPE_VALUES: readonly ["per_unit", "flat_fee", "package"];
|
|
11
11
|
export declare const INVOICING_CATALOG_PRORATION_VALUES: readonly ["site_default", "partial_term", "full_term"];
|
|
12
12
|
export declare const INVOICING_CATALOG_APPLICABILITY_VALUES: readonly ["all", "restricted"];
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.js
CHANGED
|
@@ -6,13 +6,7 @@ exports.entityToInvoicingCatalogItemFormLocalData = exports.initialInvoicingCata
|
|
|
6
6
|
* for pricing model, tier type, proration or applicability yet, so these stay
|
|
7
7
|
* here until it does. Everything else on this form comes from `/1.0/config`.
|
|
8
8
|
*/
|
|
9
|
-
exports.INVOICING_CATALOG_PRICING_MODEL_VALUES = [
|
|
10
|
-
'flat_fee',
|
|
11
|
-
'per_unit',
|
|
12
|
-
'tiered',
|
|
13
|
-
'volume',
|
|
14
|
-
'stairstep',
|
|
15
|
-
];
|
|
9
|
+
exports.INVOICING_CATALOG_PRICING_MODEL_VALUES = ['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'];
|
|
16
10
|
exports.INVOICING_CATALOG_TIER_TYPE_VALUES = [
|
|
17
11
|
'per_unit',
|
|
18
12
|
'flat_fee',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.54
|
|
3
|
+
"version": "5.2.54",
|
|
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",
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { from, of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, switchMap, takeUntil } from 'rxjs/operators';
|
|
3
|
-
import { updateJESchedules, updateJESchedulesDetails, } from '../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
5
|
-
import { clearAll } from '../../../../rootActions';
|
|
6
|
-
import { fetchFailedJePostings, fetchFailedJePostingsFailure, fetchFailedJePostingsSuccess, initializeJeScheduleLocalData, } from '../../reducers/jeSchedulesViewReducer';
|
|
7
|
-
/**
|
|
8
|
-
* Fetches every currently-failing posting for the tenant, on its own endpoint and with no window.
|
|
9
|
-
*
|
|
10
|
-
* Sends no query at all. The endpoint takes an optional `expected_post_start_date` floor and the
|
|
11
|
-
* client deliberately omits it: a failure is outstanding work until someone resolves it, whatever
|
|
12
|
-
* month it belongs to, and windowing this list is exactly what kept older failures off the only
|
|
13
|
-
* screen that can resolve them.
|
|
14
|
-
*
|
|
15
|
-
* `switchMap`, not `mergeMap`: there is one list per tenant, so a second trigger supersedes the
|
|
16
|
-
* first rather than racing it.
|
|
17
|
-
*/
|
|
18
|
-
export const fetchFailedJePostingsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchFailedJePostings.match), switchMap(() => zeniAPI
|
|
19
|
-
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expenses_automation/failed_je_postings`)
|
|
20
|
-
.pipe(switchMap((response) => {
|
|
21
|
-
if (!isSuccessResponse(response) || response.data == null) {
|
|
22
|
-
return of(fetchFailedJePostingsFailure(response.status));
|
|
23
|
-
}
|
|
24
|
-
const { je_schedules: failedJeSchedules, scheduled_journal_entries: failedScheduledJournalEntries, } = response.data.failed_je_postings;
|
|
25
|
-
// Order matters and matches fetchJeSchedulesEpic: updateJESchedules fans out to the
|
|
26
|
-
// vendor / account / class / user entities, updateJESchedulesDetails then attaches the
|
|
27
|
-
// journal entries, and only then can initializeJeScheduleLocalData read them back.
|
|
28
|
-
return from([
|
|
29
|
-
updateJESchedules(failedJeSchedules),
|
|
30
|
-
updateJESchedulesDetails(failedJeSchedules, failedScheduledJournalEntries),
|
|
31
|
-
initializeJeScheduleLocalData(failedJeSchedules),
|
|
32
|
-
fetchFailedJePostingsSuccess(failedJeSchedules, failedScheduledJournalEntries),
|
|
33
|
-
]);
|
|
34
|
-
}), catchError((error) => of(fetchFailedJePostingsFailure(createZeniAPIStatus('Unexpected Error', 'fetch failed JE postings REST API call errored out' +
|
|
35
|
-
JSON.stringify(error))))),
|
|
36
|
-
// A tenant switch clears the store while this request is still in flight. Without this
|
|
37
|
-
// the old tenant's rows are written back into the freshly cleared store and stay on
|
|
38
|
-
// screen under the new tenant until a manual refresh.
|
|
39
|
-
takeUntil(actions$.pipe(filter(clearAll.match))))));
|