Skip to content

Commit b30b75d

Browse files
committed
fix: review temp
1 parent edd478b commit b30b75d

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

src/core_modules/capture-core-utils/types/global.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export type ReduxStore = {
88
programId: string;
99
orgUnitId?: string;
1010
complete?: boolean;
11+
trackedEntityTypeId?: string;
12+
categories?: Record<string, string>;
13+
categoriesMeta?: Record<string, { name: string; writeAccess: boolean }>;
1114
};
1215
possibleDuplicates: {
1316
isLoading: boolean;

src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/epics/newEventDataEntry.epics.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ export const resetDataEntryForNewEventEpic = (action$: EpicAction<any>, store: R
5050
ofType(newEventDataEntryBatchActionTypes.SAVE_NEW_EVENT_ADD_ANOTHER_BATCH),
5151
map(() => {
5252
const state = store.value;
53+
const selectedCategories = state.currentSelections.categories;
5354
const orgUnitId = state.currentSelections.orgUnitId;
5455
const orgUnits = state.organisationUnits;
5556
const orgUnit = orgUnitId && orgUnits
5657
? orgUnits[orgUnitId]
5758
: undefined;
58-
return batchActions(getOpenDataEntryActions(orgUnit));
59+
return batchActions(getOpenDataEntryActions(undefined, selectedCategories, orgUnit));
5960
}),
6061
);
6162

src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/DataEntryWrapper/DataEntry/helpers/getOpenDataEntryActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ const dataEntryPropsToInclude: Array<DataEntryPropToInclude> = [
4949
];
5050

5151
export const getOpenDataEntryActions = (
52-
orgUnit?: CoreOrgUnit | null,
5352
programCategory?: ProgramCategory | null,
5453
selectedCategories?: { [key: string]: string } | null,
54+
orgUnit?: CoreOrgUnit | null,
5555
) => {
5656
let defaultDataEntryValues = {
5757
orgUnit: orgUnit

src/core_modules/capture-core/components/DataEntries/SingleEventRegistrationEntry/SingleEventRegistrationEntry.container.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const openSingleEventDataEntry = (InnerComponent: React.ComponentType<ContainerP
4444
if (!isLoading && !hasRun.current) {
4545
dispatch(
4646
batchActions([
47-
...getOpenDataEntryActions(orgUnit, programCategory, selectedCategories),
47+
...getOpenDataEntryActions(programCategory, selectedCategories, orgUnit),
4848
]),
4949
);
5050
hasRun.current = true;

0 commit comments

Comments
 (0)