Skip to content

Commit

Permalink
fix: [DHIS2-17519] app crashing when opening new event from view event (
Browse files Browse the repository at this point in the history
#3781)

* fix: app crashing when openeing new event from view event
  • Loading branch information
alaa-yahia authored Nov 25, 2024
1 parent f70b205 commit 93366ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ export const SingleEventRegistrationEntryComponent = ({ showAddRelationship, eve
</>
);
};

Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ import { defaultDialogProps as dialogConfig } from '../../Dialogs/DiscardDialog.
import { getOpenDataEntryActions } from './DataEntryWrapper/DataEntry';
import type { ContainerProps, StateProps, MapStateToProps } from './SingleEventRegistrationEntry.types';
import { useCategoryCombinations } from '../../DataEntryDhis2Helpers/AOC/useCategoryCombinations';
import { itemId } from './DataEntryWrapper/DataEntry/helpers/constants';

const inEffect = (state: ReduxState) => dataEntryHasChanges(state, 'singleEvent-newEvent') || state.newEventPage.showAddRelationship;

const makeMapStateToProps = (): MapStateToProps => {
const eventAccessSelector = makeEventAccessSelector();
return (state: ReduxState, { id }: ContainerProps): StateProps => ({
ready: state.dataEntries[id],
ready: state.dataEntries[id]?.itemId === itemId,
showAddRelationship: !!state.newEventPage.showAddRelationship,
eventAccess: eventAccessSelector(state),
});
Expand Down

0 comments on commit 93366ef

Please sign in to comment.