@zeniai/client-epic-state 4.12.58 → 4.12.59
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/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -0
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.d.ts +2 -2
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +3 -0
- package/package.json +1 -1
|
@@ -8,5 +8,5 @@ export declare type ScheduleTypes = ReturnType<typeof toScheduleTypesType>;
|
|
|
8
8
|
export declare const toScheduleTypesTypeStrict: (v?: string | undefined) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue" | undefined;
|
|
9
9
|
export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "canceled" | "pending" | "unknown" | "posted" | "recorded";
|
|
10
10
|
export declare type ScheduleJournalEntryStatusCodeType = ReturnType<typeof toScheduleJournalEntryStatusCodeType>;
|
|
11
|
-
export declare const toScheduleStatusCodeType: (v: string) => "new" | "completed" | "ongoing" | "marked_as_completed";
|
|
11
|
+
export declare const toScheduleStatusCodeType: (v: string) => "new" | "completed" | "draft" | "ongoing" | "marked_as_completed";
|
|
12
12
|
export declare type ScheduleStatusCodeType = ReturnType<typeof toScheduleStatusCodeType>;
|
|
@@ -26,6 +26,7 @@ const SCHEDULE_STATUS_CODE = [
|
|
|
26
26
|
'ongoing',
|
|
27
27
|
'completed',
|
|
28
28
|
'marked_as_completed',
|
|
29
|
+
'draft',
|
|
29
30
|
];
|
|
30
31
|
const toScheduleStatusCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, SCHEDULE_STATUS_CODE);
|
|
31
32
|
exports.toScheduleStatusCodeType = toScheduleStatusCodeType;
|
|
@@ -3,6 +3,6 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { updateJESchedulesDetails, updateJESchedules } from '../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
4
4
|
import { RootState } from '../../../../reducer';
|
|
5
5
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
6
|
-
import { updateScheduleDetailsSuccess, updateScheduleDetailsFailure, fetchScheduleDetails, initializeScheduleDetailLocalData, saveScheduleDetailsSuccessOrFailure, updateSelectedJEScheduleKey } from '../scheduleDetailReducer';
|
|
7
|
-
export declare type ActionType = ReturnType<typeof fetchScheduleDetails> | ReturnType<typeof updateJESchedulesDetails> | ReturnType<typeof updateJESchedules> | ReturnType<typeof updateSelectedJEScheduleKey> | ReturnType<typeof updateScheduleDetailsSuccess> | ReturnType<typeof initializeScheduleDetailLocalData> | ReturnType<typeof saveScheduleDetailsSuccessOrFailure> | ReturnType<typeof updateScheduleDetailsFailure>;
|
|
6
|
+
import { updateScheduleDetailsSuccess, updateScheduleDetailsFailure, fetchScheduleDetails, initializeScheduleDetailLocalData, saveScheduleDetailsSuccessOrFailure, updateSelectedJEScheduleKey, createNewSchedules } from '../scheduleDetailReducer';
|
|
7
|
+
export declare type ActionType = ReturnType<typeof fetchScheduleDetails> | ReturnType<typeof updateJESchedulesDetails> | ReturnType<typeof updateJESchedules> | ReturnType<typeof updateSelectedJEScheduleKey> | ReturnType<typeof updateScheduleDetailsSuccess> | ReturnType<typeof initializeScheduleDetailLocalData> | ReturnType<typeof saveScheduleDetailsSuccessOrFailure> | ReturnType<typeof createNewSchedules> | ReturnType<typeof updateScheduleDetailsFailure>;
|
|
8
8
|
export declare const fetchScheduleDetailsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -33,6 +33,9 @@ const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0
|
|
|
33
33
|
type: (0, transactionType_1.toTransactionType)(transactionData.transaction_type),
|
|
34
34
|
});
|
|
35
35
|
updateActions.push((0, jeSchedulesReducer_1.updateJESchedules)(response.data.je_schedules), (0, scheduleDetailReducer_1.updateSelectedJEScheduleKey)({ selectedJEScheduleKey }), (0, jeSchedulesReducer_1.updateJESchedulesDetails)(response.data.je_schedules, response.data.scheduled_journal_entries), (0, scheduleDetailReducer_1.saveScheduleDetailsSuccessOrFailure)('Not-Started'), (0, scheduleDetailReducer_1.initializeScheduleDetailLocalData)(scheduleType, selectedJEScheduleKey, selectedJeScheduleDetailId), (0, scheduleDetailReducer_1.updateScheduleDetailsSuccess)());
|
|
36
|
+
if (response.data.je_schedules[0].status.code === 'draft') {
|
|
37
|
+
updateActions.push((0, scheduleDetailReducer_1.createNewSchedules)({ scheduleType }));
|
|
38
|
+
}
|
|
36
39
|
return (0, rxjs_1.from)(updateActions);
|
|
37
40
|
}
|
|
38
41
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.59",
|
|
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
|
"types": "lib/index.d.ts",
|