Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [DHIS2-17052] Unrelated error message on no TETs #3605

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1120,6 +1120,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')}
simonadomnisoru marked this conversation as resolved.
Show resolved Hide resolved
</div>
}
>
{
useMemo(() => Object.values(trackedEntityTypesWithCorrelatedPrograms)
Expand Down
Loading