Skip to content

Commit

Permalink
fix: view event without org unit
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikmv committed Jan 2, 2025
1 parent 8665d75 commit 5f2ce88
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const styles = {
tooltip: { display: 'inline-flex' },
};

export const WidgetEventEditPlain = ({
const WidgetEventEditPlain = ({
eventStatus,
initialScheduleDate,
stage,
Expand All @@ -93,10 +93,12 @@ export const WidgetEventEditPlain = ({

const supportsChangelog = useFeature(FEATURES.changelogs);
const { currentPageMode } = useEnrollmentEditEventPageMode(eventStatus);
const { orgUnit, error } = useCoreOrgUnit(orgUnitId);
const [changeLogIsOpen, setChangeLogIsOpen] = useState(false);
// "Edit event"-button depends on loadedValues. Delay rendering component until loadedValues has been initialized.
const loadedValues = useSelector(({ viewEventPage }) => viewEventPage.loadedValues);

Check failure on line 99 in src/core_modules/capture-core/components/WidgetEventEdit/WidgetEventEdit.container.js

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
const { orgUnit: coreOrgUnit, error } = useCoreOrgUnit(orgUnitId);
const orgUnit = coreOrgUnit || loadedValues?.orgUnit;

const availableProgramStages = useAvailableProgramStages(stage, teiId, enrollmentId, programId);
if (error) {
Expand Down

0 comments on commit 5f2ce88

Please sign in to comment.