Skip to content

Commit

Permalink
fix: change to useCurrentOrgUnitId after merging in master
Browse files Browse the repository at this point in the history
  • Loading branch information
superskip committed Oct 26, 2023
1 parent 79ff4fa commit ceece60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { ResultsPageSizeContext } from '../../shared-contexts';
import { navigateToEnrollmentOverview } from '../../../../actions/navigateToEnrollmentOverview/navigateToEnrollmentOverview.actions';
import { useLocationQuery } from '../../../../utils/routing';
import { EnrollmentRegistrationEntryWrapper } from '../EnrollmentRegistrationEntryWrapper.component';
import { useCurrentOrgUnitInfo } from '../../../../hooks/useCurrentOrgUnitInfo';
import { useCurrentOrgUnitId } from '../../../../hooks/useCurrentOrgUnitId';

const getStyles = ({ typography }) => ({
container: {
Expand Down Expand Up @@ -97,7 +97,7 @@ const RegistrationDataEntryPlain = ({
const { resultsPageSize } = useContext(ResultsPageSizeContext);
const { scopeType, programName, trackedEntityName } = useScopeInfo(selectedScopeId);
const titleText = useScopeTitleText(selectedScopeId);
const { id: reduxOrgUnitId } = useCurrentOrgUnitInfo();
const currentOrgUnitId = useCurrentOrgUnitId();

const handleRegistrationScopeSelection = (id) => {
setScopeId(id);
Expand Down Expand Up @@ -176,7 +176,7 @@ const RegistrationDataEntryPlain = ({
<Grid item md sm={9} xs={9} >
<EnrollmentRegistrationEntryWrapper
id={dataEntryId}
orgUnitId={reduxOrgUnitId}
orgUnitId={currentOrgUnitId}
teiId={teiId}
selectedScopeId={selectedScopeId}
onSave={onSaveWithEnrollment}
Expand Down Expand Up @@ -231,7 +231,7 @@ const RegistrationDataEntryPlain = ({
<TeiRegistrationEntry
id={dataEntryId}
selectedScopeId={selectedScopeId}
orgUnitId={reduxOrgUnitId}
orgUnitId={currentOrgUnitId}
saveButtonText={i18n.t('Save {{trackedEntityName}}', {
trackedEntityName,
interpolation: { escapeValue: false },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DATA_ENTRY_ID } from '../../registerTei.const';
import teiClasses from './trackedEntityInstance.module.css';
import { TeiRegistrationEntry } from '../../../../../DataEntries';
import type { Props } from './dataEntryTrackedEntityInstance.types';
import { useCurrentOrgUnitInfo } from '../../../../../../hooks/useCurrentOrgUnitInfo';
import { useCurrentOrgUnitId } from '../../../../../../hooks/useCurrentOrgUnitId';

const RelationshipTrackedEntityInstancePlain =
({
Expand All @@ -18,7 +18,7 @@ const RelationshipTrackedEntityInstancePlain =
renderDuplicatesCardActions,
ExistingUniqueValueDialogActions,
}: Props) => {
const { id: orgUnitId } = useCurrentOrgUnitInfo();
const orgUnitId = useCurrentOrgUnitId();
const fieldOptions = { theme, fieldLabelMediaBasedClass: teiClasses.fieldLabelMediaBased };
const { trackedEntityType } = teiRegistrationMetadata || {};
const trackedEntityTypeNameLC = trackedEntityType.name.toLocaleLowerCase();
Expand Down

0 comments on commit ceece60

Please sign in to comment.