Skip to content

Commit

Permalink
fix: [DHIS2-17052] Unrelated error message on no TETs (#3605)
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikhaugstulen committed May 30, 2024
1 parent dcf9f91 commit 6a38ae3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 5 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-04-05T13:37:32.910Z\n"
"PO-Revision-Date: 2024-04-05T13:37:32.910Z\n"
"POT-Creation-Date: 2024-04-12T20:48:54.429Z\n"
"PO-Revision-Date: 2024-04-12T20:48:54.429Z\n"

msgid "Choose one or more dates..."
msgstr "Choose one or more dates..."
Expand Down Expand Up @@ -1117,6 +1117,9 @@ msgstr "Create new event"
msgid "Search for a {{trackedEntityName}} in {{programName}}"
msgstr "Search for a {{trackedEntityName}} in {{programName}}"

msgid "No tracked entity types available"
msgstr "No tracked entity types available"

msgid "Assigned to"
msgstr "Assigned to"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import React, { useMemo, type ComponentType } from 'react';
import i18n from '@dhis2/d2-i18n';
import withStyles from '@material-ui/core/styles/withStyles';
import {
SingleSelectField,
Expand All @@ -8,8 +9,7 @@ import {
} from '@dhis2/ui';
import type { Props } from './TrackedEntityTypeSelector.types';
import { scopeTypes } from '../../metaData';
import { useTrackedEntityTypesWithCorrelatedPrograms } from '../../hooks/useTrackedEntityTypesWithCorrelatedPrograms';
import { useCurrentTrackedEntityTypeId } from '../../hooks/useCurrentTrackedEntityTypeId';
import { useTrackedEntityTypesWithCorrelatedPrograms, useCurrentTrackedEntityTypeId } from '../../hooks';
import { InfoIconText } from '../InfoIconText';

const styles = ({ typography }) => ({
Expand Down Expand Up @@ -51,7 +51,11 @@ export const TrackedEntityTypeSelectorPlain =
label={headerText}
onChange={handleSelectionChange}
selected={selectedSearchScopeId}
empty={<div className={classes.customEmpty}>Custom empty component</div>}
empty={
<div className={classes.customEmpty}>
{i18n.t('No tracked entity types available')}
</div>
}
>
{
useMemo(() => Object.values(trackedEntityTypesWithCorrelatedPrograms)
Expand Down

0 comments on commit 6a38ae3

Please sign in to comment.