From 25a3c5a3db37fedb0013065964af9b3effac0940 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Fri, 19 Jul 2024 17:44:37 +0200 Subject: [PATCH 01/36] feat: org unit context in Stages and Events widget --- i18n/en.pot | 12 ++--- .../CardList/CardListItem.component.js | 4 +- .../TeiRegistrationEntry.component.js | 4 +- .../ScopeSelector/ScopeSelector.container.js | 4 +- .../TooltipOrgUnit.component.js | 14 +++++ .../Tooltips/TooltipOrgUnit/index.js | 1 + .../InfoBoxes/InfoBoxes.component.js | 6 +-- .../WidgetEnrollment.component.js | 22 ++++---- .../WidgetEnrollment.container.js | 4 +- .../WidgetEventSchedule.container.js | 4 +- .../WidgetProfile/WidgetProfile.component.js | 30 ++++++----- .../metadataRetrieval/orgUnitName/index.js | 3 +- .../orgUnitName/orgUnitName.js | 51 ++++++++++++++----- .../capture-ui/FlatList/FlatList.component.js | 31 +++++++---- .../capture-ui/FlatList/flatList.types.js | 4 +- 15 files changed, 128 insertions(+), 66 deletions(-) create mode 100644 src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js create mode 100644 src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/index.js diff --git a/i18n/en.pot b/i18n/en.pot index abaccb285f..69e503d714 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -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-06-28T11:23:02.970Z\n" -"PO-Revision-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-04-26T17:02:42.850Z\n" +"PO-Revision-Date: 2024-04-26T17:02:42.850Z\n" msgid "Choose one or more dates..." msgstr "Choose one or more dates..." @@ -1274,11 +1274,11 @@ msgstr "Enrollment widget could not be loaded. Please try again later" msgid "Follow-up" msgstr "Follow-up" -msgid "Started at {{orgUnitName}}" -msgstr "Started at {{orgUnitName}}" +msgid "Started at " +msgstr "Started at " -msgid "Owned by {{ownerOrgUnit}}" -msgstr "Owned by {{ownerOrgUnit}}" +msgid "Owned by " +msgstr "Owned by " msgid "Last updated {{date}}" msgstr "Last updated {{date}}" diff --git a/src/core_modules/capture-core/components/CardList/CardListItem.component.js b/src/core_modules/capture-core/components/CardList/CardListItem.component.js index 328926bdb8..06717e2a5e 100644 --- a/src/core_modules/capture-core/components/CardList/CardListItem.component.js +++ b/src/core_modules/capture-core/components/CardList/CardListItem.component.js @@ -13,7 +13,7 @@ import { searchScopes } from '../SearchBox'; import { enrollmentTypes } from './CardList.constants'; import { ListEntry } from './ListEntry.component'; import { dataElementTypes, getTrackerProgramThrowIfNotFound } from '../../metaData'; -import { useOrgUnitName } from '../../metadataRetrieval/orgUnitName'; +import { useOrgUnitNameWithAncestors } from '../../metadataRetrieval/orgUnitName'; import type { ListItem, RenderCustomCardActions } from './CardList.types'; @@ -139,7 +139,7 @@ const CardListItemIndex = ({ const enrollments = item.tei ? item.tei.enrollments : []; const enrollmentType = deriveEnrollmentType(enrollments, currentProgramId); const { orgUnitId, enrolledAt } = deriveEnrollmentOrgUnitIdAndDate(enrollments, enrollmentType, currentProgramId); - const { displayName: orgUnitName } = useOrgUnitName(orgUnitId); + const { displayName: orgUnitName } = useOrgUnitNameWithAncestors(orgUnitId); const program = enrollments && enrollments.length ? deriveProgramFromEnrollment(enrollments, currentSearchScopeType) : undefined; diff --git a/src/core_modules/capture-core/components/DataEntries/TeiRegistrationEntry/TeiRegistrationEntry.component.js b/src/core_modules/capture-core/components/DataEntries/TeiRegistrationEntry/TeiRegistrationEntry.component.js index 457fe3a112..14d9395f29 100644 --- a/src/core_modules/capture-core/components/DataEntries/TeiRegistrationEntry/TeiRegistrationEntry.component.js +++ b/src/core_modules/capture-core/components/DataEntries/TeiRegistrationEntry/TeiRegistrationEntry.component.js @@ -8,7 +8,7 @@ import { useScopeInfo } from '../../../hooks/useScopeInfo'; import { scopeTypes } from '../../../metaData'; import { TrackedEntityInstanceDataEntry } from '../TrackedEntityInstance'; import { useCurrentOrgUnitId } from '../../../hooks/useCurrentOrgUnitId'; -import { useOrgUnitName } from '../../../metadataRetrieval/orgUnitName'; +import { useOrgUnitNameWithAncestors } from '../../../metadataRetrieval/orgUnitName'; import type { Props, PlainProps } from './TeiRegistrationEntry.types'; import { DiscardDialog } from '../../Dialogs/DiscardDialog.component'; import { withSaveHandler } from '../../DataEntry'; @@ -54,7 +54,7 @@ const TeiRegistrationEntryPlain = const { scopeType } = useScopeInfo(selectedScopeId); const { formId, formFoundation } = useMetadataForRegistrationForm({ selectedScopeId }); const orgUnitId = useCurrentOrgUnitId(); - const { displayName: orgUnitName } = useOrgUnitName(orgUnitId); + const { displayName: orgUnitName } = useOrgUnitNameWithAncestors(orgUnitId); const handleOnCancel = () => { if (!isUserInteractionInProgress) { diff --git a/src/core_modules/capture-core/components/ScopeSelector/ScopeSelector.container.js b/src/core_modules/capture-core/components/ScopeSelector/ScopeSelector.container.js index 0fdb374e16..6199295503 100644 --- a/src/core_modules/capture-core/components/ScopeSelector/ScopeSelector.container.js +++ b/src/core_modules/capture-core/components/ScopeSelector/ScopeSelector.container.js @@ -3,7 +3,7 @@ import React, { type ComponentType, useEffect, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { ScopeSelectorComponent } from './ScopeSelector.component'; import type { OwnProps } from './ScopeSelector.types'; -import { useOrgUnitName } from '../../metadataRetrieval/orgUnitName'; +import { useOrgUnitNameWithAncestors } from '../../metadataRetrieval/orgUnitName'; import { resetOrgUnitIdFromScopeSelector } from './ScopeSelector.actions'; @@ -34,7 +34,7 @@ export const ScopeSelector: ComponentType = ({ }) => { const dispatch = useDispatch(); const [selectedOrgUnit, setSelectedOrgUnit] = useState({ name: undefined, id: selectedOrgUnitId }); - const { displayName, error: ouNameError } = useOrgUnitName(selectedOrgUnit.id); + const { displayName, error: ouNameError } = useOrgUnitNameWithAncestors(selectedOrgUnit.id); useEffect(() => { if (displayName && selectedOrgUnit.name !== displayName) { diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js new file mode 100644 index 0000000000..e7b494f713 --- /dev/null +++ b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js @@ -0,0 +1,14 @@ +import React from 'react'; +import { Tooltip } from '@dhis2/ui'; +import { useFormatOrgUnitNameFullPath } from '../../../metadataRetrieval/orgUnitName'; + +export const TooltipOrgUnit = ({ orgUnitName, ancestors }) => { + const orgUnitNameFullPath = useFormatOrgUnitNameFullPath(orgUnitName, ancestors); + return ( + + + {orgUnitName} + + + ); +}; diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/index.js b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/index.js new file mode 100644 index 0000000000..046747ddff --- /dev/null +++ b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/index.js @@ -0,0 +1 @@ +export { TooltipOrgUnit } from './TooltipOrgUnit.component'; diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/TransferModal/InfoBoxes/InfoBoxes.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/TransferModal/InfoBoxes/InfoBoxes.component.js index 3c91794004..2cb21e6f98 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/TransferModal/InfoBoxes/InfoBoxes.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/TransferModal/InfoBoxes/InfoBoxes.component.js @@ -4,7 +4,7 @@ import cx from 'classnames'; import { withStyles } from '@material-ui/core/styles'; import { colors, IconInfo16, IconWarning16 } from '@dhis2/ui'; import i18n from '@dhis2/d2-i18n'; -import { useOrgUnitName } from '../../../../metadataRetrieval/orgUnitName'; +import { useOrgUnitNameWithAncestors } from '../../../../metadataRetrieval/orgUnitName'; import { OrgUnitScopes } from '../hooks/useTransferValidation'; import { ProgramAccessLevels } from '../hooks/useProgramAccessLevel'; @@ -48,8 +48,8 @@ const InfoBoxesPlain = ({ orgUnitScopes, classes, }: Props) => { - const { displayName: ownerOrgUnitName } = useOrgUnitName(ownerOrgUnitId); - const { displayName: newOrgUnitName } = useOrgUnitName(validOrgUnitId); + const { displayName: ownerOrgUnitName } = useOrgUnitNameWithAncestors(ownerOrgUnitId); + const { displayName: newOrgUnitName } = useOrgUnitNameWithAncestors(validOrgUnitId); const showWarning = [ProgramAccessLevels.PROTECTED, ProgramAccessLevels.CLOSED].includes(programAccessLevel) && orgUnitScopes.destination === OrgUnitScopes.SEARCH; diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js index edb8d05145..18c597306d 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js @@ -16,10 +16,11 @@ import { Widget } from '../Widget'; import type { PlainProps } from './enrollment.types'; import { Status } from './Status'; import { dataElementTypes } from '../../metaData'; -import { useOrgUnitName } from '../../metadataRetrieval/orgUnitName'; +import { useOrgUnitNameWithAncestors } from '../../metadataRetrieval/orgUnitName'; import { Date } from './Date'; import { Actions } from './Actions'; import { MiniMap } from './MiniMap'; +import { TooltipOrgUnit } from '../Tooltips/TooltipOrgUnit'; const styles = { enrollment: { @@ -72,7 +73,9 @@ export const WidgetEnrollmentPlain = ({ const [open, setOpenStatus] = useState(true); const { fromServerDate } = useTimeZoneConversion(); const geometryType = getGeometryType(enrollment?.geometry?.type); - const { displayName: orgUnitName } = useOrgUnitName(enrollment?.orgUnit); + const { displayName: orgUnitName, ancestors } = useOrgUnitNameWithAncestors(enrollment?.orgUnit); + const { displayName: ownerOrgUnitName, ancestors: ownerAncestors } = useOrgUnitNameWithAncestors(ownerOrgUnit?.id); + return (
@@ -129,19 +132,20 @@ export const WidgetEnrollmentPlain = ({ - {i18n.t('Started at {{orgUnitName}}', { - orgUnitName, - interpolation: { escapeValue: false }, - })} + + {i18n.t('Started at ')} + +
- {i18n.t('Owned by {{ownerOrgUnit}}', { - ownerOrgUnit: ownerOrgUnit.displayName, - })} + + {i18n.t('Owned by ')} + +
diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.container.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.container.js index f46827f52b..dba0dc0954 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.container.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.container.js @@ -3,7 +3,7 @@ import React, { useMemo } from 'react'; import { errorCreator } from 'capture-core-utils'; import log from 'loglevel'; import { WidgetEnrollment as WidgetEnrollmentNote } from './WidgetEnrollment.component'; -import { useOrgUnitName } from '../../metadataRetrieval/orgUnitName'; +import { useOrgUnitNameWithAncestors } from '../../metadataRetrieval/orgUnitName'; import { useTrackedEntityInstances } from './hooks/useTrackedEntityInstances'; import { useEnrollment } from './hooks/useEnrollment'; import { useProgram } from './hooks/useProgram'; @@ -68,7 +68,7 @@ export const WidgetEnrollment = ({ enrollments, refetch: refetchTEI, } = useTrackedEntityInstances(teiId, programId); - const { error: errorOrgUnit, displayName } = useOrgUnitName( + const { error: errorOrgUnit, displayName } = useOrgUnitNameWithAncestors( typeof ownerOrgUnit === 'string' ? ownerOrgUnit : undefined, ); const { error: errorLocale, locale } = useUserLocale(); diff --git a/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.container.js b/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.container.js index 24bfdc0016..843e40d96a 100644 --- a/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.container.js +++ b/src/core_modules/capture-core/components/WidgetEventSchedule/WidgetEventSchedule.container.js @@ -4,7 +4,7 @@ import i18n from '@dhis2/d2-i18n'; import { useDispatch } from 'react-redux'; import moment from 'moment'; import { getProgramAndStageForProgram, TrackerProgram, getProgramEventAccess, dataElementTypes } from '../../metaData'; -import { useOrgUnitName } from '../../metadataRetrieval/orgUnitName'; +import { useOrgUnitNameWithAncestors } from '../../metadataRetrieval/orgUnitName'; import { useLocationQuery } from '../../utils/routing'; import type { ContainerProps } from './widgetEventSchedule.types'; import { WidgetEventScheduleComponent } from './WidgetEventSchedule.component'; @@ -37,7 +37,7 @@ export const WidgetEventSchedule = ({ }: ContainerProps) => { const { program, stage } = useMemo(() => getProgramAndStageForProgram(programId, stageId), [programId, stageId]); const dispatch = useDispatch(); - const orgUnit = { id: orgUnitId, name: useOrgUnitName(orgUnitId).displayName }; + const orgUnit = { id: orgUnitId, name: useOrgUnitNameWithAncestors(orgUnitId).displayName }; const { programStageScheduleConfig } = useScheduleConfigFromProgramStage(stageId); const { programConfig } = useScheduleConfigFromProgram(programId); const suggestedScheduleDate = useDetermineSuggestedScheduleDate({ diff --git a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js index 3e98d7db1f..8553c4439c 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js +++ b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js @@ -21,7 +21,7 @@ import { useUserRoles, useTeiDisplayName, } from './hooks'; -import { DataEntry, dataEntryActionTypes, TEI_MODAL_STATE, convertClientToView } from './DataEntry'; +import { DataEntry, dataEntryActionTypes, TEI_MODAL_STATE } from './DataEntry'; import { ReactQueryAppNamespace } from '../../utils/reactQueryHelpers'; import { CHANGELOG_ENTITY_TYPES } from '../WidgetsChangelog'; import { OverflowMenu } from './OverflowMenu'; @@ -86,19 +86,22 @@ const WidgetProfilePlain = ({ const loading = programsLoading || trackedEntityInstancesLoading || userRolesLoading; const error = programsError || trackedEntityInstancesError || userRolesError; - const clientAttributesWithSubvalues = useClientAttributesWithSubvalues(teiId, program, trackedEntityInstanceAttributes); + const clientAttributesWithSubvalues = useClientAttributesWithSubvalues( + teiId, + program, + trackedEntityInstanceAttributes, + ); const teiDisplayName = useTeiDisplayName(program, storedAttributeValues, clientAttributesWithSubvalues, teiId); const displayChangelog = supportsChangelog && program && program.trackedEntityType?.changelogEnabled; - const displayInListAttributes = useMemo(() => clientAttributesWithSubvalues - .filter(item => item.displayInList) - .map((clientAttribute) => { - const { attribute, key } = clientAttribute; - const value = convertClientToView(clientAttribute); - return { - attribute, key, value, reactKey: attribute, - }; - }), [clientAttributesWithSubvalues]); + const displayInListAttributes = useMemo(() => + clientAttributesWithSubvalues + .filter(({ displayInList }) => displayInList) + .map(({ attribute, key, value, valueType }) => ({ + attribute, key, value, valueType, reactKey: attribute, + })), + [clientAttributesWithSubvalues], + ); const onSaveExternal = useCallback(() => { queryClient.removeQueries([ReactQueryAppNamespace, 'changelog', CHANGELOG_ENTITY_TYPES.TRACKED_ENTITY, teiId]); @@ -132,7 +135,10 @@ const WidgetProfilePlain = ({ return (
- +
); }; diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/index.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/index.js index f254f83a12..e452918b15 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/index.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/index.js @@ -1,6 +1,7 @@ // @flow export { - useOrgUnitName, + useOrgUnitNameWithAncestors, + useFormatOrgUnitNameFullPath, useOrgUnitNames, getOrgUnitNames, getCachedOrgUnitName, diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index ca45d9de40..91dbdf442d 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -72,7 +72,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { const onComplete = useCallback(({ organisationUnits }) => { for (const { id, displayName } of organisationUnits.organisationUnits) { - displayNameCache[id] = displayName; + displayNameCache[id].displayName = displayName; } const completeCount = completedBatches + 1; setCompletedBatches(completeCount); @@ -139,35 +139,60 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso .map(batch => querySingleResource(displayNamesQuery.organisationUnits, { filter: batch.join(',') }) .then(({ organisationUnits }) => { for (const { id, displayName } of organisationUnits) { - displayNameCache[id] = displayName; + displayNameCache[id].displayName = displayName; } }))); return orgUnitIds.reduce((acc, orgUnitId) => { acc[orgUnitId] = { id: orgUnitId, - name: displayNameCache[orgUnitId], + name: displayNameCache[orgUnitId].displayName, }; return acc; }, {}); } -export const useOrgUnitName = (orgUnitId: ?string): { +export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { displayName?: string, - error?: any, + ancestors?: Array<{| displayName: string, level: number |}>, + error ?: any, } => { - const cachedOrgUnitName = orgUnitId && displayNameCache[orgUnitId]; - const fetchId = cachedOrgUnitName ? undefined : orgUnitId; - const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName'); - if (cachedOrgUnitName) { - return { displayName: cachedOrgUnitName }; + const cachedOrgUnitNameAndAncestor = orgUnitId && displayNameCache[orgUnitId]; + const fetchId = cachedOrgUnitNameAndAncestor ? undefined : orgUnitId; + const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[displayName,level]'); + + if (cachedOrgUnitNameAndAncestor) { + return { + displayName: cachedOrgUnitNameAndAncestor.displayName, + ancestors: cachedOrgUnitNameAndAncestor.ancestors, + error, + }; } else if (orgUnit && fetchId) { - displayNameCache[orgUnit.id] = orgUnit.displayName; + displayNameCache[orgUnit.id] = { + displayName: orgUnit.displayName, + ancestors: orgUnit.ancestors, + }; if (orgUnit.id === fetchId) { - return { displayName: orgUnit.displayName, error }; + return { displayName: orgUnit.displayName, ancestors: orgUnit.ancestors, error }; } + return { error }; } + return { error }; }; -export const getCachedOrgUnitName = (orgUnitId: string): ?string => displayNameCache[orgUnitId]; +export const useFormatOrgUnitNameFullPath = (orgUnitName: ?string, ancestors?: Array<{| displayName: string, level: number |}>, +): ?string => { + const [path, setPath] = useState(null); + useEffect(() => { + if (orgUnitName && ancestors) { + const ancestorNames = ancestors.map(ancestor => ancestor.displayName); + ancestorNames.push(orgUnitName); + const computedPath = ancestorNames.join(' / '); + setPath(computedPath); + } + }, [orgUnitName, ancestors]); + return path; +}; + +export const getCachedOrgUnitName = (orgUnitId: string): ?string => displayNameCache[orgUnitId].displayName; diff --git a/src/core_modules/capture-ui/FlatList/FlatList.component.js b/src/core_modules/capture-ui/FlatList/FlatList.component.js index 28a5753e60..8a6024df65 100644 --- a/src/core_modules/capture-ui/FlatList/FlatList.component.js +++ b/src/core_modules/capture-ui/FlatList/FlatList.component.js @@ -1,9 +1,9 @@ -// @flow -import React, { type ComponentType } from 'react'; +import React from 'react'; import cx from 'classnames'; import { colors, spacersNum } from '@dhis2/ui'; import { withStyles } from '@material-ui/core'; -import type { Props } from './flatList.types'; +import { TooltipOrgUnit } from '../../capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component'; +import { useOrgUnitNameWithAncestors } from '../../capture-core/metadataRetrieval/orgUnitName'; const itemStyles = { overflow: 'hidden', @@ -36,23 +36,36 @@ const styles = { }, }; -const FlatListPlain = ({ list, classes, dataTest }: Props) => { - const lastItemKey = list[list.length - 1]?.reactKey; - const renderItem = item => ( +const FlatListItem = ({ item, classes, lastItemKey }) => { + const { displayName: orgUnitName, ancestors } = useOrgUnitNameWithAncestors(item.value?.id); + + return (
{item.key}:
-
{item.value}
+
+ {item.valueType === 'ORGANISATION_UNIT' ? ( + + ) : ( + item.value + )} +
); +}; + +const FlatListPlain = ({ list, classes, dataTest }) => { + const lastItemKey = list[list.length - 1]?.reactKey; return (
- {list.map(item => renderItem(item))} + {list.map(item => ( + + ))}
); }; -export const FlatList: ComponentType<$Diff> = withStyles(styles)(FlatListPlain); +export const FlatList = withStyles(styles)(FlatListPlain); diff --git a/src/core_modules/capture-ui/FlatList/flatList.types.js b/src/core_modules/capture-ui/FlatList/flatList.types.js index 94dc5a5b47..90744c1869 100644 --- a/src/core_modules/capture-ui/FlatList/flatList.types.js +++ b/src/core_modules/capture-ui/FlatList/flatList.types.js @@ -1,8 +1,6 @@ // @flow -import { type Node } from 'react'; - export type Props = {| - list: { reactKey: string, key: string, value: Node }[], + list: { reactKey: string, key: string, value: { id: string, name: string }, valueType?: string }[], dataTest?: string, ...CssClasses, |}; From 3dde56b68fc5eadec0efc88a7b75a9a71bcdceaf Mon Sep 17 00:00:00 2001 From: henrikmv Date: Wed, 31 Jul 2024 10:40:53 +0200 Subject: [PATCH 02/36] feat: orgunit in enrollment widget completed --- i18n/en.pot | 16 +++++----- .../TooltipOrgUnit.component.js | 29 +++++++++++++++++-- .../WidgetEnrollment.component.js | 26 ++++++++++++++--- .../WidgetProfile/WidgetProfile.component.js | 19 ++++++------ .../capture-core/converters/clientToView.js | 20 ++++++++++++- 5 files changed, 85 insertions(+), 25 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 69e503d714..89a9faef4e 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -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-26T17:02:42.850Z\n" -"PO-Revision-Date: 2024-04-26T17:02:42.850Z\n" +"POT-Creation-Date: 2024-07-31T08:40:54.689Z\n" +"PO-Revision-Date: 2024-07-31T08:40:54.689Z\n" msgid "Choose one or more dates..." msgstr "Choose one or more dates..." @@ -1268,18 +1268,18 @@ msgstr "Enrollment date" msgid "Incident date" msgstr "Incident date" +msgid "Started at {{orgUnitName}}" +msgstr "Started at {{orgUnitName}}" + +msgid "Owned by {{ownerOrgUnit}}" +msgstr "Owned by {{ownerOrgUnit}}" + msgid "Enrollment widget could not be loaded. Please try again later" msgstr "Enrollment widget could not be loaded. Please try again later" msgid "Follow-up" msgstr "Follow-up" -msgid "Started at " -msgstr "Started at " - -msgid "Owned by " -msgstr "Owned by " - msgid "Last updated {{date}}" msgstr "Last updated {{date}}" diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js index e7b494f713..baa6c4f585 100644 --- a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js +++ b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js @@ -1,13 +1,36 @@ +//@flow import React from 'react'; import { Tooltip } from '@dhis2/ui'; import { useFormatOrgUnitNameFullPath } from '../../../metadataRetrieval/orgUnitName'; -export const TooltipOrgUnit = ({ orgUnitName, ancestors }) => { +type Props = { + orgUnitName: string, + ancestors?: Array<{| displayName: string, level: number |}>, + tooltip?: string, +}; + +export const TooltipOrgUnit = ({ orgUnitName, ancestors, tooltip }: Props) => { const orgUnitNameFullPath = useFormatOrgUnitNameFullPath(orgUnitName, ancestors); + console.log('tooltip', tooltip); + + const tooltipParts = tooltip ? tooltip.split(orgUnitName) : [orgUnitName]; + return ( - - {orgUnitName} + + {tooltip ? ( + <> + {tooltipParts[0]} + + {orgUnitName} + + {tooltipParts[1]} + + ) : ( + + {orgUnitName} + + )} ); diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js index 18c597306d..9d311e5535 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js @@ -16,6 +16,7 @@ import { Widget } from '../Widget'; import type { PlainProps } from './enrollment.types'; import { Status } from './Status'; import { dataElementTypes } from '../../metaData'; +import { convertValue } from '../../converters/clientToView'; import { useOrgUnitNameWithAncestors } from '../../metadataRetrieval/orgUnitName'; import { Date } from './Date'; import { Actions } from './Actions'; @@ -69,6 +70,7 @@ export const WidgetEnrollmentPlain = ({ onUpdateEnrollmentStatusError, onUpdateEnrollmentStatusSuccess, onAccessLostFromTransfer, + type = dataElementTypes.ORGANISATION_UNIT, }: PlainProps) => { const [open, setOpenStatus] = useState(true); const { fromServerDate } = useTimeZoneConversion(); @@ -76,6 +78,24 @@ export const WidgetEnrollmentPlain = ({ const { displayName: orgUnitName, ancestors } = useOrgUnitNameWithAncestors(enrollment?.orgUnit); const { displayName: ownerOrgUnitName, ancestors: ownerAncestors } = useOrgUnitNameWithAncestors(ownerOrgUnit?.id); + const orgUnitClientValue = { + orgUnitName: orgUnitName, + ancestors: ancestors || [], + tooltip: i18n.t('Started at {{orgUnitName}}', { + orgUnitName: orgUnitName, + interpolation: { escapeValue: false }, + }), + }; + + const ownerOrgUnitClientValue = { + orgUnitName: ownerOrgUnitName, + ancestors: ownerAncestors || [], + tooltip: i18n.t('Owned by {{ownerOrgUnit}}', { + ownerOrgUnit: ownerOrgUnitName, + }), + }; + + return (
@@ -133,8 +153,7 @@ export const WidgetEnrollmentPlain = ({ - {i18n.t('Started at ')} - + {convertValue(orgUnitClientValue, type)}
@@ -143,8 +162,7 @@ export const WidgetEnrollmentPlain = ({ - {i18n.t('Owned by ')} - + {convertValue(ownerOrgUnitClientValue, type)}
diff --git a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js index 8553c4439c..85ca8c526f 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js +++ b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js @@ -21,7 +21,7 @@ import { useUserRoles, useTeiDisplayName, } from './hooks'; -import { DataEntry, dataEntryActionTypes, TEI_MODAL_STATE } from './DataEntry'; +import { DataEntry, dataEntryActionTypes, TEI_MODAL_STATE, convertClientToView } from './DataEntry'; import { ReactQueryAppNamespace } from '../../utils/reactQueryHelpers'; import { CHANGELOG_ENTITY_TYPES } from '../WidgetsChangelog'; import { OverflowMenu } from './OverflowMenu'; @@ -94,14 +94,15 @@ const WidgetProfilePlain = ({ const teiDisplayName = useTeiDisplayName(program, storedAttributeValues, clientAttributesWithSubvalues, teiId); const displayChangelog = supportsChangelog && program && program.trackedEntityType?.changelogEnabled; - const displayInListAttributes = useMemo(() => - clientAttributesWithSubvalues - .filter(({ displayInList }) => displayInList) - .map(({ attribute, key, value, valueType }) => ({ - attribute, key, value, valueType, reactKey: attribute, - })), - [clientAttributesWithSubvalues], - ); + const displayInListAttributes = useMemo(() => clientAttributesWithSubvalues + .filter(item => item.displayInList) + .map((clientAttribute) => { + const { attribute, key } = clientAttribute; + const value = convertClientToView(clientAttribute); + return { + attribute, key, value, reactKey: attribute, + }; + }), [clientAttributesWithSubvalues]); const onSaveExternal = useCallback(() => { queryClient.removeQueries([ReactQueryAppNamespace, 'changelog', CHANGELOG_ENTITY_TYPES.TRACKED_ENTITY, teiId]); diff --git a/src/core_modules/capture-core/converters/clientToView.js b/src/core_modules/capture-core/converters/clientToView.js index 51b91f07e5..121df43e04 100644 --- a/src/core_modules/capture-core/converters/clientToView.js +++ b/src/core_modules/capture-core/converters/clientToView.js @@ -8,6 +8,7 @@ import { dataElementTypes, type DataElement } from '../metaData'; import { convertMomentToDateFormatString } from '../utils/converters/date'; import { stringifyNumber } from './common/stringifyNumber'; import { MinimalCoordinates } from '../components/MinimalCoordinates'; +import { TooltipOrgUnit } from '../components/Tooltips/TooltipOrgUnit'; function convertDateForView(rawValue: string): string { @@ -38,6 +39,12 @@ type ImageClientValue = { previewUrl: string, }; +type OrgUnitClientValue = { + orgUnitName: string, + ancestors: Array<{| displayName: string, level: number |}>, + tooltip?: string, +}; + function convertFileForDisplay(clientValue: FileClientValue) { return ( + ); + +} + const valueConvertersForType = { [dataElementTypes.NUMBER]: stringifyNumber, @@ -78,7 +96,7 @@ const valueConvertersForType = { [dataElementTypes.AGE]: convertDateForView, [dataElementTypes.FILE_RESOURCE]: convertFileForDisplay, [dataElementTypes.IMAGE]: convertImageForDisplay, - [dataElementTypes.ORGANISATION_UNIT]: (rawValue: Object) => rawValue.name, + [dataElementTypes.ORGANISATION_UNIT]: convertOrgUnitForDisplay, [dataElementTypes.POLYGON]: () => 'Polygon', }; From c201f96a8a4a4fe3bd16fccf9b81289f6f66c579 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Wed, 31 Jul 2024 10:42:44 +0200 Subject: [PATCH 03/36] fix: lint --- .../Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js | 3 +-- .../WidgetEnrollment/WidgetEnrollment.component.js | 6 ++---- src/core_modules/capture-core/converters/clientToView.js | 1 - 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js index baa6c4f585..feb0e6b409 100644 --- a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js +++ b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js @@ -1,4 +1,4 @@ -//@flow +// @flow import React from 'react'; import { Tooltip } from '@dhis2/ui'; import { useFormatOrgUnitNameFullPath } from '../../../metadataRetrieval/orgUnitName'; @@ -11,7 +11,6 @@ type Props = { export const TooltipOrgUnit = ({ orgUnitName, ancestors, tooltip }: Props) => { const orgUnitNameFullPath = useFormatOrgUnitNameFullPath(orgUnitName, ancestors); - console.log('tooltip', tooltip); const tooltipParts = tooltip ? tooltip.split(orgUnitName) : [orgUnitName]; diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js index 9d311e5535..ea916b581f 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js @@ -21,7 +21,6 @@ import { useOrgUnitNameWithAncestors } from '../../metadataRetrieval/orgUnitName import { Date } from './Date'; import { Actions } from './Actions'; import { MiniMap } from './MiniMap'; -import { TooltipOrgUnit } from '../Tooltips/TooltipOrgUnit'; const styles = { enrollment: { @@ -79,10 +78,10 @@ export const WidgetEnrollmentPlain = ({ const { displayName: ownerOrgUnitName, ancestors: ownerAncestors } = useOrgUnitNameWithAncestors(ownerOrgUnit?.id); const orgUnitClientValue = { - orgUnitName: orgUnitName, + orgUnitName, ancestors: ancestors || [], tooltip: i18n.t('Started at {{orgUnitName}}', { - orgUnitName: orgUnitName, + orgUnitName, interpolation: { escapeValue: false }, }), }; @@ -96,7 +95,6 @@ export const WidgetEnrollmentPlain = ({ }; - return (
); - } From 0f0f3c8421a78f349f19a672801bac04501c4054 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Wed, 31 Jul 2024 14:16:58 +0200 Subject: [PATCH 04/36] feat: profile widget org unit tooltip completed --- .../WidgetProfile/WidgetProfile.component.js | 11 +++++++---- .../capture-ui/FlatList/FlatList.component.js | 8 +++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js index 85ca8c526f..e8f18a6ec6 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js +++ b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js @@ -82,7 +82,7 @@ const WidgetProfilePlain = ({ const isEditable = useMemo(() => trackedEntityInstanceAttributes.length > 0 && trackedEntityTypeAccess?.data?.write && !readOnlyMode, - [trackedEntityInstanceAttributes, readOnlyMode, trackedEntityTypeAccess]); + [trackedEntityInstanceAttributes, readOnlyMode, trackedEntityTypeAccess]); const loading = programsLoading || trackedEntityInstancesLoading || userRolesLoading; const error = programsError || trackedEntityInstancesError || userRolesError; @@ -97,10 +97,13 @@ const WidgetProfilePlain = ({ const displayInListAttributes = useMemo(() => clientAttributesWithSubvalues .filter(item => item.displayInList) .map((clientAttribute) => { - const { attribute, key } = clientAttribute; - const value = convertClientToView(clientAttribute); + const { attribute, key, valueType } = clientAttribute; + const value = valueType === 'ORGANISATION_UNIT' ? ( + clientAttribute.value) : ( + convertClientToView(clientAttribute) + ); return { - attribute, key, value, reactKey: attribute, + attribute, key, value, valueType, reactKey: attribute, }; }), [clientAttributesWithSubvalues]); diff --git a/src/core_modules/capture-ui/FlatList/FlatList.component.js b/src/core_modules/capture-ui/FlatList/FlatList.component.js index 8a6024df65..74c6298fde 100644 --- a/src/core_modules/capture-ui/FlatList/FlatList.component.js +++ b/src/core_modules/capture-ui/FlatList/FlatList.component.js @@ -4,6 +4,7 @@ import { colors, spacersNum } from '@dhis2/ui'; import { withStyles } from '@material-ui/core'; import { TooltipOrgUnit } from '../../capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component'; import { useOrgUnitNameWithAncestors } from '../../capture-core/metadataRetrieval/orgUnitName'; +import { convertValue } from '../../capture-core/converters/clientToView'; const itemStyles = { overflow: 'hidden', @@ -39,6 +40,11 @@ const styles = { const FlatListItem = ({ item, classes, lastItemKey }) => { const { displayName: orgUnitName, ancestors } = useOrgUnitNameWithAncestors(item.value?.id); + const orgUnitClientValue = { + orgUnitName, + ancestors, + }; + return (
{
{item.key}:
{item.valueType === 'ORGANISATION_UNIT' ? ( - + convertValue(orgUnitClientValue, item.valueType) ) : ( item.value )} From 4cd6a58824c37fec32453b6235d473d3dc033f86 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Wed, 31 Jul 2024 14:18:55 +0200 Subject: [PATCH 05/36] fix: remove unused component --- .../components/WidgetProfile/WidgetProfile.component.js | 2 +- src/core_modules/capture-ui/FlatList/FlatList.component.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js index e8f18a6ec6..a5aa26c4ea 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js +++ b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js @@ -82,7 +82,7 @@ const WidgetProfilePlain = ({ const isEditable = useMemo(() => trackedEntityInstanceAttributes.length > 0 && trackedEntityTypeAccess?.data?.write && !readOnlyMode, - [trackedEntityInstanceAttributes, readOnlyMode, trackedEntityTypeAccess]); + [trackedEntityInstanceAttributes, readOnlyMode, trackedEntityTypeAccess]); const loading = programsLoading || trackedEntityInstancesLoading || userRolesLoading; const error = programsError || trackedEntityInstancesError || userRolesError; diff --git a/src/core_modules/capture-ui/FlatList/FlatList.component.js b/src/core_modules/capture-ui/FlatList/FlatList.component.js index 74c6298fde..7b06c8a2f3 100644 --- a/src/core_modules/capture-ui/FlatList/FlatList.component.js +++ b/src/core_modules/capture-ui/FlatList/FlatList.component.js @@ -2,7 +2,6 @@ import React from 'react'; import cx from 'classnames'; import { colors, spacersNum } from '@dhis2/ui'; import { withStyles } from '@material-ui/core'; -import { TooltipOrgUnit } from '../../capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component'; import { useOrgUnitNameWithAncestors } from '../../capture-core/metadataRetrieval/orgUnitName'; import { convertValue } from '../../capture-core/converters/clientToView'; From 06ef38f017272f235ec88f531c94c7daa2d40b87 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Thu, 1 Aug 2024 12:32:21 +0200 Subject: [PATCH 06/36] fix: error in getOrgUnitNames --- .../metadataRetrieval/orgUnitName/orgUnitName.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 91dbdf442d..65cf4af641 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -72,7 +72,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { const onComplete = useCallback(({ organisationUnits }) => { for (const { id, displayName } of organisationUnits.organisationUnits) { - displayNameCache[id].displayName = displayName; + displayNameCache[id] = displayName; } const completeCount = completedBatches + 1; setCompletedBatches(completeCount); @@ -139,14 +139,14 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso .map(batch => querySingleResource(displayNamesQuery.organisationUnits, { filter: batch.join(',') }) .then(({ organisationUnits }) => { for (const { id, displayName } of organisationUnits) { - displayNameCache[id].displayName = displayName; + displayNameCache[id] = displayName; } }))); return orgUnitIds.reduce((acc, orgUnitId) => { acc[orgUnitId] = { id: orgUnitId, - name: displayNameCache[orgUnitId].displayName, + name: displayNameCache[orgUnitId], }; return acc; }, {}); From d453275d6ba76fcb9fc5caf7701d9acfc8855d11 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Thu, 1 Aug 2024 21:19:21 +0200 Subject: [PATCH 07/36] fix: cache --- .../metadataRetrieval/orgUnitName/orgUnitName.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 65cf4af641..06bc92da5e 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -64,7 +64,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { ); const result = useMemo( () => (ready ? orgUnitIds.reduce((acc, id) => { - acc[id] = displayNameCache[id]; + acc[id] = displayNameCache[id] ? displayNameCache[id].displayName : null; return acc; }, {}) : null), [ready, orgUnitIds], @@ -72,7 +72,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { const onComplete = useCallback(({ organisationUnits }) => { for (const { id, displayName } of organisationUnits.organisationUnits) { - displayNameCache[id] = displayName; + displayNameCache[id] = { displayName, ancestors: displayNameCache[id] ? displayNameCache[id].ancestors : [] }; } const completeCount = completedBatches + 1; setCompletedBatches(completeCount); @@ -139,14 +139,14 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso .map(batch => querySingleResource(displayNamesQuery.organisationUnits, { filter: batch.join(',') }) .then(({ organisationUnits }) => { for (const { id, displayName } of organisationUnits) { - displayNameCache[id] = displayName; + displayNameCache[id] = { displayName, ancestors: displayNameCache[id] ? displayNameCache[id].ancestors : [] }; } }))); return orgUnitIds.reduce((acc, orgUnitId) => { acc[orgUnitId] = { id: orgUnitId, - name: displayNameCache[orgUnitId], + name: displayNameCache[orgUnitId] ? displayNameCache[orgUnitId].displayName : null, }; return acc; }, {}); @@ -155,7 +155,7 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { displayName?: string, ancestors?: Array<{| displayName: string, level: number |}>, - error ?: any, + error?: any, } => { const cachedOrgUnitNameAndAncestor = orgUnitId && displayNameCache[orgUnitId]; const fetchId = cachedOrgUnitNameAndAncestor ? undefined : orgUnitId; From efbd81d23928623eb6c63b3026c6e4d06b6af8c6 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Sat, 3 Aug 2024 17:02:04 +0200 Subject: [PATCH 08/36] fix: disabled value --- .../metadataRetrieval/orgUnitName/orgUnitName.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 06bc92da5e..7a2cc5ac39 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -130,8 +130,8 @@ export const useOrgUnitNames = (orgUnitIds: Array): { }; export async function getOrgUnitNames(orgUnitIds: Array, querySingleResource: QuerySingleResource): Promise<{| - [orgUnitId: string]: {| - id: string, +[orgUnitId: string]: {| + id: string, displayName: string, |} |}> { @@ -142,7 +142,6 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso displayNameCache[id] = { displayName, ancestors: displayNameCache[id] ? displayNameCache[id].ancestors : [] }; } }))); - return orgUnitIds.reduce((acc, orgUnitId) => { acc[orgUnitId] = { id: orgUnitId, @@ -155,7 +154,7 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { displayName?: string, ancestors?: Array<{| displayName: string, level: number |}>, - error?: any, + error ?: any, } => { const cachedOrgUnitNameAndAncestor = orgUnitId && displayNameCache[orgUnitId]; const fetchId = cachedOrgUnitNameAndAncestor ? undefined : orgUnitId; @@ -195,4 +194,4 @@ export const useFormatOrgUnitNameFullPath = (orgUnitName: ?string, ancestors?: A return path; }; -export const getCachedOrgUnitName = (orgUnitId: string): ?string => displayNameCache[orgUnitId].displayName; +export const getCachedOrgUnitName = (orgUnitId: string): ?string => displayNameCache[orgUnitId]?.displayName; From 039c1acd3ab0185cb4c44a879abbf9403f931156 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 12 Aug 2024 21:54:06 +0200 Subject: [PATCH 09/36] fix: review changes --- .../TooltipOrgUnit.component.js | 2 +- .../WidgetProfile/WidgetProfile.component.js | 5 +-- .../WidgetProfile/hooks/getSubValueForTei.js | 14 ++++++-- .../capture-ui/FlatList/FlatList.component.js | 35 +++++-------------- .../capture-ui/FlatList/flatList.types.js | 2 +- 5 files changed, 24 insertions(+), 34 deletions(-) diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js index feb0e6b409..e79ced1e8d 100644 --- a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js +++ b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js @@ -15,7 +15,7 @@ export const TooltipOrgUnit = ({ orgUnitName, ancestors, tooltip }: Props) => { const tooltipParts = tooltip ? tooltip.split(orgUnitName) : [orgUnitName]; return ( - + {tooltip ? ( <> diff --git a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js index 094c0b83cf..a69466ca92 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js +++ b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js @@ -102,10 +102,7 @@ const WidgetProfilePlain = ({ .filter(item => item.displayInList) .map((clientAttribute) => { const { attribute, key, valueType } = clientAttribute; - const value = valueType === 'ORGANISATION_UNIT' ? ( - clientAttribute.value) : ( - convertClientToView(clientAttribute) - ); + const value = convertClientToView(clientAttribute); return { attribute, key, value, valueType, reactKey: attribute, }; diff --git a/src/core_modules/capture-core/components/WidgetProfile/hooks/getSubValueForTei.js b/src/core_modules/capture-core/components/WidgetProfile/hooks/getSubValueForTei.js index 241316d4eb..4bb045f726 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/hooks/getSubValueForTei.js +++ b/src/core_modules/capture-core/components/WidgetProfile/hooks/getSubValueForTei.js @@ -51,10 +51,20 @@ const getOrganisationUnitSubvalue = async ({ attribute, querySingleResource }: S resource: 'organisationUnits', id: attribute.value, params: { - fields: 'id,name', + fields: 'id,name,ancestors[displayName,level]', }, }); - return { ...organisationUnit }; + + const orgUnitClientValue = { + id: organisationUnit.id, + orgUnitName: organisationUnit.name, + ancestors: organisationUnit.ancestors.map(ancestor => ({ + displayName: ancestor.displayName, + level: ancestor.level, + })), + }; + + return orgUnitClientValue; }; export const subValueGetterByElementType = { diff --git a/src/core_modules/capture-ui/FlatList/FlatList.component.js b/src/core_modules/capture-ui/FlatList/FlatList.component.js index 7b06c8a2f3..f85de3392b 100644 --- a/src/core_modules/capture-ui/FlatList/FlatList.component.js +++ b/src/core_modules/capture-ui/FlatList/FlatList.component.js @@ -1,9 +1,9 @@ -import React from 'react'; +// @flow +import React, { type ComponentType } from 'react'; import cx from 'classnames'; import { colors, spacersNum } from '@dhis2/ui'; import { withStyles } from '@material-ui/core'; -import { useOrgUnitNameWithAncestors } from '../../capture-core/metadataRetrieval/orgUnitName'; -import { convertValue } from '../../capture-core/converters/clientToView'; +import type { Props } from './flatList.types'; const itemStyles = { overflow: 'hidden', @@ -36,41 +36,24 @@ const styles = { }, }; -const FlatListItem = ({ item, classes, lastItemKey }) => { - const { displayName: orgUnitName, ancestors } = useOrgUnitNameWithAncestors(item.value?.id); - - const orgUnitClientValue = { - orgUnitName, - ancestors, - }; - - return ( +const FlatListPlain = ({ list, classes, dataTest }: Props) => { + const lastItemKey = list[list.length - 1]?.reactKey; + const renderItem = item => (
{item.key}:
-
- {item.valueType === 'ORGANISATION_UNIT' ? ( - convertValue(orgUnitClientValue, item.valueType) - ) : ( - item.value - )} -
+
{item.value}
); -}; -const FlatListPlain = ({ list, classes, dataTest }) => { - const lastItemKey = list[list.length - 1]?.reactKey; return (
- {list.map(item => ( - - ))} + {list.map(item => renderItem(item))}
); }; -export const FlatList = withStyles(styles)(FlatListPlain); +export const FlatList: ComponentType<$Diff> = withStyles(styles)(FlatListPlain); diff --git a/src/core_modules/capture-ui/FlatList/flatList.types.js b/src/core_modules/capture-ui/FlatList/flatList.types.js index 90744c1869..4159c32e1d 100644 --- a/src/core_modules/capture-ui/FlatList/flatList.types.js +++ b/src/core_modules/capture-ui/FlatList/flatList.types.js @@ -1,6 +1,6 @@ // @flow export type Props = {| - list: { reactKey: string, key: string, value: { id: string, name: string }, valueType?: string }[], + list: { reactKey: string, key: string, value: Object, valueType?: string }[], dataTest?: string, ...CssClasses, |}; From 763b4959d27060bbc4bcec390e8d587e0502165d Mon Sep 17 00:00:00 2001 From: henrikmv Date: Thu, 15 Aug 2024 11:53:50 +0200 Subject: [PATCH 10/36] fix: restructure cache --- .../WidgetEnrollment.component.js | 1 + .../orgUnitName/orgUnitName.js | 77 +++++++++++++++---- 2 files changed, 61 insertions(+), 17 deletions(-) diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js index 12764a0428..540ac1f312 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js @@ -92,6 +92,7 @@ export const WidgetEnrollmentPlain = ({ ancestors: ownerAncestors || [], tooltip: i18n.t('Owned by {{ownerOrgUnit}}', { ownerOrgUnit: ownerOrgUnitName, + interpolation: { escapeValue: false }, }), }; diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 7a2cc5ac39..01a09d056a 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -8,6 +8,7 @@ import type { QuerySingleResource } from '../../utils/api'; // Avoid exporting displayNameCache to keep it truly private. // As a consequence all functions using it must be in this file. const displayNameCache = {}; +const testingCache = {}; const maxBatchSize = 50; const displayNamesQuery = { @@ -25,7 +26,7 @@ const createBatches = (orgUnitIds: Array): Array> => { const reducedOrgUnitIds = Array.from(orgUnitIds .filter(id => id) .reduce((acc, id) => { - if (!displayNameCache[id]) { + if (!testingCache[id]) { acc.add(id); } return acc; @@ -64,7 +65,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { ); const result = useMemo( () => (ready ? orgUnitIds.reduce((acc, id) => { - acc[id] = displayNameCache[id] ? displayNameCache[id].displayName : null; + acc[id] = testingCache[id] ? testingCache[id].displayName : null; return acc; }, {}) : null), [ready, orgUnitIds], @@ -72,7 +73,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { const onComplete = useCallback(({ organisationUnits }) => { for (const { id, displayName } of organisationUnits.organisationUnits) { - displayNameCache[id] = { displayName, ancestors: displayNameCache[id] ? displayNameCache[id].ancestors : [] }; + testingCache[id] = { displayName, ancestors: testingCache[id] ? testingCache[id].ancestors : [] }; } const completeCount = completedBatches + 1; setCompletedBatches(completeCount); @@ -121,7 +122,6 @@ export const useOrgUnitNames = (orgUnitIds: Array): { } } }, [fetchNextBatch, setFetchNextBatch, completedBatches, currentBatches, refetch, filter]); - return { loading: !ready && !error, orgUnitNames: ready && !error ? result : undefined, @@ -139,13 +139,13 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso .map(batch => querySingleResource(displayNamesQuery.organisationUnits, { filter: batch.join(',') }) .then(({ organisationUnits }) => { for (const { id, displayName } of organisationUnits) { - displayNameCache[id] = { displayName, ancestors: displayNameCache[id] ? displayNameCache[id].ancestors : [] }; + testingCache[id] = { displayName, ancestors: testingCache[id] ? testingCache[id].ancestors : [] }; } }))); return orgUnitIds.reduce((acc, orgUnitId) => { acc[orgUnitId] = { id: orgUnitId, - name: displayNameCache[orgUnitId] ? displayNameCache[orgUnitId].displayName : null, + name: testingCache[orgUnitId] ? testingCache[orgUnitId].displayName : null, }; return acc; }, {}); @@ -153,33 +153,75 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { displayName?: string, - ancestors?: Array<{| displayName: string, level: number |}>, + ancestors?: Array<{| displayName: string, id: string |}>, error ?: any, } => { - const cachedOrgUnitNameAndAncestor = orgUnitId && displayNameCache[orgUnitId]; - const fetchId = cachedOrgUnitNameAndAncestor ? undefined : orgUnitId; - const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[displayName,level]'); + const cachedOrgUnit = orgUnitId && displayNameCache[orgUnitId]; + const fetchId = cachedOrgUnit ? undefined : orgUnitId; + const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[displayName,id]'); + + if (orgUnitId && cachedOrgUnit) { + const getOrgUnitFromCache = parentOrgUnitId => displayNameCache[parentOrgUnitId]; + + const getFullAncestor = (currentOrgUnitId) => { + const ancestors = []; + let currentOrgUnit = getOrgUnitFromCache(currentOrgUnitId); + const currentAncestorId = currentOrgUnit.ancestor; + + if (currentOrgUnit) { + currentOrgUnit = getOrgUnitFromCache(currentOrgUnit?.ancestor); + } + + let previousAncestorId = currentAncestorId; + + while (currentOrgUnit) { + const ancestor = { + displayName: currentOrgUnit.displayName, + id: previousAncestorId, + }; + ancestors.push(ancestor); + + previousAncestorId = currentOrgUnit.ancestor; + currentOrgUnit = getOrgUnitFromCache(currentOrgUnit?.ancestor); + } + + return ancestors.reverse(); + }; + + const ancestors = getFullAncestor(orgUnitId); - if (cachedOrgUnitNameAndAncestor) { return { - displayName: cachedOrgUnitNameAndAncestor.displayName, - ancestors: cachedOrgUnitNameAndAncestor.ancestors, + displayName: cachedOrgUnit.displayName, + ancestors, error, }; } else if (orgUnit && fetchId) { displayNameCache[orgUnit.id] = { + displayName: orgUnit.displayName, + ancestor: orgUnit.ancestors[orgUnit.ancestors.length - 1].id, + }; + orgUnit.ancestors.forEach((ancestor, index) => { + if (!displayNameCache[ancestor.id]) { + const parentAncestorId = orgUnit.ancestors[index - 1]?.id; + + displayNameCache[ancestor.id] = { + displayName: ancestor.displayName, + ancestor: parentAncestorId, + }; + } + }); + + return { displayName: orgUnit.displayName, ancestors: orgUnit.ancestors, + error, }; - if (orgUnit.id === fetchId) { - return { displayName: orgUnit.displayName, ancestors: orgUnit.ancestors, error }; - } - return { error }; } return { error }; }; + export const useFormatOrgUnitNameFullPath = (orgUnitName: ?string, ancestors?: Array<{| displayName: string, level: number |}>, ): ?string => { const [path, setPath] = useState(null); @@ -194,4 +236,5 @@ export const useFormatOrgUnitNameFullPath = (orgUnitName: ?string, ancestors?: A return path; }; + export const getCachedOrgUnitName = (orgUnitId: string): ?string => displayNameCache[orgUnitId]?.displayName; From 57db7daecfefbc2c6f5922e2c36316fd9e948493 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Thu, 15 Aug 2024 12:28:16 +0200 Subject: [PATCH 11/36] fix: set back to right cache --- .../metadataRetrieval/orgUnitName/orgUnitName.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 01a09d056a..1617280f59 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -8,7 +8,6 @@ import type { QuerySingleResource } from '../../utils/api'; // Avoid exporting displayNameCache to keep it truly private. // As a consequence all functions using it must be in this file. const displayNameCache = {}; -const testingCache = {}; const maxBatchSize = 50; const displayNamesQuery = { @@ -26,7 +25,7 @@ const createBatches = (orgUnitIds: Array): Array> => { const reducedOrgUnitIds = Array.from(orgUnitIds .filter(id => id) .reduce((acc, id) => { - if (!testingCache[id]) { + if (!displayNameCache[id]) { acc.add(id); } return acc; @@ -65,7 +64,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { ); const result = useMemo( () => (ready ? orgUnitIds.reduce((acc, id) => { - acc[id] = testingCache[id] ? testingCache[id].displayName : null; + acc[id] = displayNameCache[id] ? displayNameCache[id].displayName : null; return acc; }, {}) : null), [ready, orgUnitIds], @@ -73,7 +72,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { const onComplete = useCallback(({ organisationUnits }) => { for (const { id, displayName } of organisationUnits.organisationUnits) { - testingCache[id] = { displayName, ancestors: testingCache[id] ? testingCache[id].ancestors : [] }; + displayNameCache[id] = { displayName, ancestors: displayNameCache[id] ? displayNameCache[id].ancestors : [] }; } const completeCount = completedBatches + 1; setCompletedBatches(completeCount); @@ -139,13 +138,13 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso .map(batch => querySingleResource(displayNamesQuery.organisationUnits, { filter: batch.join(',') }) .then(({ organisationUnits }) => { for (const { id, displayName } of organisationUnits) { - testingCache[id] = { displayName, ancestors: testingCache[id] ? testingCache[id].ancestors : [] }; + displayNameCache[id] = { displayName, ancestors: displayNameCache[id] ? displayNameCache[id].ancestors : [] }; } }))); return orgUnitIds.reduce((acc, orgUnitId) => { acc[orgUnitId] = { id: orgUnitId, - name: testingCache[orgUnitId] ? testingCache[orgUnitId].displayName : null, + name: displayNameCache[orgUnitId] ? displayNameCache[orgUnitId].displayName : null, }; return acc; }, {}); From 2b43005f38f0b3bdc054ae404019cc8eb3d355d7 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Thu, 15 Aug 2024 15:39:35 +0200 Subject: [PATCH 12/36] fix: cache structure for useorgunitnames --- .../orgUnitName/orgUnitName.js | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 1617280f59..8825a7b873 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -8,13 +8,14 @@ import type { QuerySingleResource } from '../../utils/api'; // Avoid exporting displayNameCache to keep it truly private. // As a consequence all functions using it must be in this file. const displayNameCache = {}; +console.log('displayNameCache', displayNameCache); const maxBatchSize = 50; const displayNamesQuery = { organisationUnits: { resource: 'organisationUnits', params: ({ filter }) => ({ - fields: 'id,displayName', + fields: 'id,displayName,ancestors[id,displayName]', filter: `id:in:[${filter}]`, pageSize: maxBatchSize, }), @@ -69,13 +70,27 @@ export const useOrgUnitNames = (orgUnitIds: Array): { }, {}) : null), [ready, orgUnitIds], ); - const onComplete = useCallback(({ organisationUnits }) => { - for (const { id, displayName } of organisationUnits.organisationUnits) { - displayNameCache[id] = { displayName, ancestors: displayNameCache[id] ? displayNameCache[id].ancestors : [] }; + for (const orgUnit of organisationUnits.organisationUnits) { + displayNameCache[orgUnit.id] = { + displayName: orgUnit.displayName, + ancestor: orgUnit.ancestors[orgUnit.ancestors.length - 1]?.id, + }; + + orgUnit.ancestors.forEach((ancestor, index) => { + if (!displayNameCache[ancestor.id]) { + const parentAncestorId = orgUnit.ancestors[index - 1]?.id; + displayNameCache[ancestor.id] = { + displayName: ancestor.displayName, + ancestor: parentAncestorId, + }; + } + }); } + const completeCount = completedBatches + 1; setCompletedBatches(completeCount); + if (completeCount === currentBatches.length) { setFetching(false); } else { From 940f45c694d5a3b1b6b58359c523b5c3b7f3e853 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Fri, 16 Aug 2024 09:21:51 +0200 Subject: [PATCH 13/36] feat: follow cache standard for all functions --- .../orgUnitName/orgUnitName.js | 147 +++++++----------- 1 file changed, 60 insertions(+), 87 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 8825a7b873..5e86778760 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -8,7 +8,6 @@ import type { QuerySingleResource } from '../../utils/api'; // Avoid exporting displayNameCache to keep it truly private. // As a consequence all functions using it must be in this file. const displayNameCache = {}; -console.log('displayNameCache', displayNameCache); const maxBatchSize = 50; const displayNamesQuery = { @@ -22,6 +21,25 @@ const displayNamesQuery = { }, }; +const updateCacheWithOrgUnits = (organisationUnits) => { + for (const { id, displayName, ancestors } of organisationUnits) { + displayNameCache[id] = { + displayName, + ancestor: ancestors[ancestors.length - 1]?.id, + }; + + ancestors.forEach((ancestor, index) => { + if (!displayNameCache[ancestor.id]) { + const parentAncestorId = ancestors[index - 1]?.id; + displayNameCache[ancestor.id] = { + displayName: ancestor.displayName, + ancestor: parentAncestorId, + }; + } + }); + } +}; + const createBatches = (orgUnitIds: Array): Array> => { const reducedOrgUnitIds = Array.from(orgUnitIds .filter(id => id) @@ -55,38 +73,15 @@ export const useOrgUnitNames = (orgUnitIds: Array): { const ready = !fetching && orgUnitIds === requestedArray; - const batches = useMemo( - () => createBatches(orgUnitIds), - [orgUnitIds], - ); - const filter = useMemo( - () => (fetching ? currentBatches[completedBatches].join(',') : ''), - [fetching, currentBatches, completedBatches], - ); - const result = useMemo( - () => (ready ? orgUnitIds.reduce((acc, id) => { - acc[id] = displayNameCache[id] ? displayNameCache[id].displayName : null; - return acc; - }, {}) : null), - [ready, orgUnitIds], - ); + const batches = useMemo(() => createBatches(orgUnitIds), [orgUnitIds]); + const filter = useMemo(() => (fetching ? currentBatches[completedBatches].join(',') : ''), [fetching, currentBatches, completedBatches]); + const result = useMemo(() => (ready ? orgUnitIds.reduce((acc, id) => { + acc[id] = displayNameCache[id] ? displayNameCache[id].displayName : null; + return acc; + }, {}) : null), [ready, orgUnitIds]); + const onComplete = useCallback(({ organisationUnits }) => { - for (const orgUnit of organisationUnits.organisationUnits) { - displayNameCache[orgUnit.id] = { - displayName: orgUnit.displayName, - ancestor: orgUnit.ancestors[orgUnit.ancestors.length - 1]?.id, - }; - - orgUnit.ancestors.forEach((ancestor, index) => { - if (!displayNameCache[ancestor.id]) { - const parentAncestorId = orgUnit.ancestors[index - 1]?.id; - displayNameCache[ancestor.id] = { - displayName: ancestor.displayName, - ancestor: parentAncestorId, - }; - } - }); - } + updateCacheWithOrgUnits(organisationUnits.organisationUnits); const completeCount = completedBatches + 1; setCompletedBatches(completeCount); @@ -98,22 +93,17 @@ export const useOrgUnitNames = (orgUnitIds: Array): { } }, [completedBatches, setCompletedBatches, currentBatches, setFetching, setFetchNextBatch]); - const onError = useCallback( - (fetchError) => { - setFetching(false); - setError(fetchError); - }, - [setFetching, setError], - ); + const onError = useCallback((fetchError) => { + setFetching(false); + setError(fetchError); + }, [setFetching, setError]); - const { refetch } = useDataQuery( - displayNamesQuery, { - variables: { filter }, - onComplete, - onError, - lazy: true, - }, - ); + const { refetch } = useDataQuery(displayNamesQuery, { + variables: { filter }, + onComplete, + onError, + lazy: true, + }); useEffect(() => { if (!fetching && orgUnitIds !== requestedArray) { @@ -126,7 +116,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { setCompletedBatches(0); } } - }, [fetching, orgUnitIds, requestedArray, batches, setRequestedArray, setCurrentBatches, setCompletedBatches, setFetching, setError]); + }, [fetching, orgUnitIds, requestedArray, batches]); useEffect(() => { if (fetchNextBatch) { @@ -135,7 +125,8 @@ export const useOrgUnitNames = (orgUnitIds: Array): { refetch({ filter }); } } - }, [fetchNextBatch, setFetchNextBatch, completedBatches, currentBatches, refetch, filter]); + }, [fetchNextBatch, completedBatches, currentBatches, refetch, filter]); + return { loading: !ready && !error, orgUnitNames: ready && !error ? result : undefined, @@ -144,22 +135,23 @@ export const useOrgUnitNames = (orgUnitIds: Array): { }; export async function getOrgUnitNames(orgUnitIds: Array, querySingleResource: QuerySingleResource): Promise<{| -[orgUnitId: string]: {| - id: string, + [orgUnitId: string]: {| + id: string, displayName: string, |} |}> { await Promise.all(createBatches(orgUnitIds) .map(batch => querySingleResource(displayNamesQuery.organisationUnits, { filter: batch.join(',') }) .then(({ organisationUnits }) => { - for (const { id, displayName } of organisationUnits) { - displayNameCache[id] = { displayName, ancestors: displayNameCache[id] ? displayNameCache[id].ancestors : [] }; - } - }))); + updateCacheWithOrgUnits(organisationUnits); + }), + ), + ); + return orgUnitIds.reduce((acc, orgUnitId) => { acc[orgUnitId] = { id: orgUnitId, - name: displayNameCache[orgUnitId] ? displayNameCache[orgUnitId].displayName : null, + name: displayNameCache[orgUnitId].displayName, }; return acc; }, {}); @@ -168,11 +160,11 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { displayName?: string, ancestors?: Array<{| displayName: string, id: string |}>, - error ?: any, + error?: any, } => { const cachedOrgUnit = orgUnitId && displayNameCache[orgUnitId]; const fetchId = cachedOrgUnit ? undefined : orgUnitId; - const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[displayName,id]'); + const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName]'); if (orgUnitId && cachedOrgUnit) { const getOrgUnitFromCache = parentOrgUnitId => displayNameCache[parentOrgUnitId]; @@ -180,20 +172,13 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { const getFullAncestor = (currentOrgUnitId) => { const ancestors = []; let currentOrgUnit = getOrgUnitFromCache(currentOrgUnitId); - const currentAncestorId = currentOrgUnit.ancestor; - - if (currentOrgUnit) { - currentOrgUnit = getOrgUnitFromCache(currentOrgUnit?.ancestor); - } - - let previousAncestorId = currentAncestorId; + let previousAncestorId = currentOrgUnit?.ancestor; while (currentOrgUnit) { - const ancestor = { + ancestors.push({ displayName: currentOrgUnit.displayName, id: previousAncestorId, - }; - ancestors.push(ancestor); + }); previousAncestorId = currentOrgUnit.ancestor; currentOrgUnit = getOrgUnitFromCache(currentOrgUnit?.ancestor); @@ -210,20 +195,7 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { error, }; } else if (orgUnit && fetchId) { - displayNameCache[orgUnit.id] = { - displayName: orgUnit.displayName, - ancestor: orgUnit.ancestors[orgUnit.ancestors.length - 1].id, - }; - orgUnit.ancestors.forEach((ancestor, index) => { - if (!displayNameCache[ancestor.id]) { - const parentAncestorId = orgUnit.ancestors[index - 1]?.id; - - displayNameCache[ancestor.id] = { - displayName: ancestor.displayName, - ancestor: parentAncestorId, - }; - } - }); + updateCacheWithOrgUnits([orgUnit]); return { displayName: orgUnit.displayName, @@ -235,20 +207,21 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { return { error }; }; - -export const useFormatOrgUnitNameFullPath = (orgUnitName: ?string, ancestors?: Array<{| displayName: string, level: number |}>, +export const useFormatOrgUnitNameFullPath = ( + orgUnitName: ?string, + ancestors?: Array<{| displayName: string, level: number |}>, ): ?string => { const [path, setPath] = useState(null); + useEffect(() => { if (orgUnitName && ancestors) { const ancestorNames = ancestors.map(ancestor => ancestor.displayName); ancestorNames.push(orgUnitName); - const computedPath = ancestorNames.join(' / '); - setPath(computedPath); + setPath(ancestorNames.join(' / ')); } }, [orgUnitName, ancestors]); + return path; }; - export const getCachedOrgUnitName = (orgUnitId: string): ?string => displayNameCache[orgUnitId]?.displayName; From 712d78b99d8d2eae058dbc0a89ab65b1b4623d91 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Fri, 16 Aug 2024 11:04:03 +0200 Subject: [PATCH 14/36] fix: move full path hook --- .../TooltipOrgUnit.component.js | 5 ++-- .../metadataRetrieval/orgUnitName/index.js | 1 - .../orgUnitName/orgUnitName.js | 28 ++++++------------- .../capture-ui/FlatList/FlatList.component.js | 1 - 4 files changed, 11 insertions(+), 24 deletions(-) diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js index e79ced1e8d..233c2585a8 100644 --- a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js +++ b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js @@ -1,7 +1,6 @@ // @flow import React from 'react'; import { Tooltip } from '@dhis2/ui'; -import { useFormatOrgUnitNameFullPath } from '../../../metadataRetrieval/orgUnitName'; type Props = { orgUnitName: string, @@ -10,7 +9,9 @@ type Props = { }; export const TooltipOrgUnit = ({ orgUnitName, ancestors, tooltip }: Props) => { - const orgUnitNameFullPath = useFormatOrgUnitNameFullPath(orgUnitName, ancestors); + const ancestorNames = ancestors?.map(ancestor => ancestor.displayName); + ancestorNames?.push(orgUnitName); + const orgUnitNameFullPath = ancestorNames?.join(' / '); const tooltipParts = tooltip ? tooltip.split(orgUnitName) : [orgUnitName]; diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/index.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/index.js index e452918b15..21e8b84212 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/index.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/index.js @@ -1,7 +1,6 @@ // @flow export { useOrgUnitNameWithAncestors, - useFormatOrgUnitNameFullPath, useOrgUnitNames, getOrgUnitNames, getCachedOrgUnitName, diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 5e86778760..5b0b15f6ca 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -159,12 +159,12 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { displayName?: string, - ancestors?: Array<{| displayName: string, id: string |}>, + ancestors?: Array<{| id: string, displayName: string |}>, error?: any, } => { const cachedOrgUnit = orgUnitId && displayNameCache[orgUnitId]; const fetchId = cachedOrgUnit ? undefined : orgUnitId; - const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName]'); + const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName,level]'); if (orgUnitId && cachedOrgUnit) { const getOrgUnitFromCache = parentOrgUnitId => displayNameCache[parentOrgUnitId]; @@ -172,7 +172,12 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { const getFullAncestor = (currentOrgUnitId) => { const ancestors = []; let currentOrgUnit = getOrgUnitFromCache(currentOrgUnitId); - let previousAncestorId = currentOrgUnit?.ancestor; + + if (currentOrgUnit) { + currentOrgUnit = getOrgUnitFromCache(currentOrgUnit?.ancestor); + } + + let previousAncestorId = currentOrgUnit.ancestor; while (currentOrgUnit) { ancestors.push({ @@ -207,21 +212,4 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { return { error }; }; -export const useFormatOrgUnitNameFullPath = ( - orgUnitName: ?string, - ancestors?: Array<{| displayName: string, level: number |}>, -): ?string => { - const [path, setPath] = useState(null); - - useEffect(() => { - if (orgUnitName && ancestors) { - const ancestorNames = ancestors.map(ancestor => ancestor.displayName); - ancestorNames.push(orgUnitName); - setPath(ancestorNames.join(' / ')); - } - }, [orgUnitName, ancestors]); - - return path; -}; - export const getCachedOrgUnitName = (orgUnitId: string): ?string => displayNameCache[orgUnitId]?.displayName; diff --git a/src/core_modules/capture-ui/FlatList/FlatList.component.js b/src/core_modules/capture-ui/FlatList/FlatList.component.js index f85de3392b..28a5753e60 100644 --- a/src/core_modules/capture-ui/FlatList/FlatList.component.js +++ b/src/core_modules/capture-ui/FlatList/FlatList.component.js @@ -48,7 +48,6 @@ const FlatListPlain = ({ list, classes, dataTest }: Props) => {
); - return (
{list.map(item => renderItem(item))} From 5b671b80c1ea5ce818b03c4d43ac7f41f043a040 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Fri, 16 Aug 2024 11:17:45 +0200 Subject: [PATCH 15/36] fix: change cache name --- .../orgUnitName/orgUnitName.js | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 5b0b15f6ca..0df06c210b 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -5,9 +5,9 @@ import { useOrganisationUnit } from '../../dataQueries'; import type { OrgUnitNames } from './orgUnitName.types'; import type { QuerySingleResource } from '../../utils/api'; -// Avoid exporting displayNameCache to keep it truly private. +// Avoid exporting orgUnitCache to keep it truly private. // As a consequence all functions using it must be in this file. -const displayNameCache = {}; +const orgUnitCache = {}; const maxBatchSize = 50; const displayNamesQuery = { @@ -23,15 +23,15 @@ const displayNamesQuery = { const updateCacheWithOrgUnits = (organisationUnits) => { for (const { id, displayName, ancestors } of organisationUnits) { - displayNameCache[id] = { + orgUnitCache[id] = { displayName, ancestor: ancestors[ancestors.length - 1]?.id, }; ancestors.forEach((ancestor, index) => { - if (!displayNameCache[ancestor.id]) { + if (!orgUnitCache[ancestor.id]) { const parentAncestorId = ancestors[index - 1]?.id; - displayNameCache[ancestor.id] = { + orgUnitCache[ancestor.id] = { displayName: ancestor.displayName, ancestor: parentAncestorId, }; @@ -44,7 +44,7 @@ const createBatches = (orgUnitIds: Array): Array> => { const reducedOrgUnitIds = Array.from(orgUnitIds .filter(id => id) .reduce((acc, id) => { - if (!displayNameCache[id]) { + if (!orgUnitCache[id]) { acc.add(id); } return acc; @@ -76,7 +76,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { const batches = useMemo(() => createBatches(orgUnitIds), [orgUnitIds]); const filter = useMemo(() => (fetching ? currentBatches[completedBatches].join(',') : ''), [fetching, currentBatches, completedBatches]); const result = useMemo(() => (ready ? orgUnitIds.reduce((acc, id) => { - acc[id] = displayNameCache[id] ? displayNameCache[id].displayName : null; + acc[id] = orgUnitCache[id] ? orgUnitCache[id].displayName : null; return acc; }, {}) : null), [ready, orgUnitIds]); @@ -151,7 +151,7 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso return orgUnitIds.reduce((acc, orgUnitId) => { acc[orgUnitId] = { id: orgUnitId, - name: displayNameCache[orgUnitId].displayName, + name: orgUnitCache[orgUnitId].displayName, }; return acc; }, {}); @@ -162,12 +162,12 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { ancestors?: Array<{| id: string, displayName: string |}>, error?: any, } => { - const cachedOrgUnit = orgUnitId && displayNameCache[orgUnitId]; + const cachedOrgUnit = orgUnitId && orgUnitCache[orgUnitId]; const fetchId = cachedOrgUnit ? undefined : orgUnitId; const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName,level]'); if (orgUnitId && cachedOrgUnit) { - const getOrgUnitFromCache = parentOrgUnitId => displayNameCache[parentOrgUnitId]; + const getOrgUnitFromCache = parentOrgUnitId => orgUnitCache[parentOrgUnitId]; const getFullAncestor = (currentOrgUnitId) => { const ancestors = []; @@ -212,4 +212,4 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { return { error }; }; -export const getCachedOrgUnitName = (orgUnitId: string): ?string => displayNameCache[orgUnitId]?.displayName; +export const getCachedOrgUnitName = (orgUnitId: string): ?string => orgUnitCache[orgUnitId]?.displayName; From dc7ce33c48d2d4adfed265a67ce1c9a6cf12ff6c Mon Sep 17 00:00:00 2001 From: henrikmv Date: Fri, 16 Aug 2024 16:36:52 +0200 Subject: [PATCH 16/36] fix: undefined value for ancestor --- .../metadataRetrieval/orgUnitName/orgUnitName.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 0df06c210b..15064e3fc8 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -151,7 +151,7 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso return orgUnitIds.reduce((acc, orgUnitId) => { acc[orgUnitId] = { id: orgUnitId, - name: orgUnitCache[orgUnitId].displayName, + name: orgUnitCache[orgUnitId]?.displayName, }; return acc; }, {}); @@ -177,15 +177,15 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { currentOrgUnit = getOrgUnitFromCache(currentOrgUnit?.ancestor); } - let previousAncestorId = currentOrgUnit.ancestor; + let previousAncestorId = currentOrgUnit?.ancestor; while (currentOrgUnit) { ancestors.push({ - displayName: currentOrgUnit.displayName, + displayName: currentOrgUnit?.displayName, id: previousAncestorId, }); - previousAncestorId = currentOrgUnit.ancestor; + previousAncestorId = currentOrgUnit?.ancestor; currentOrgUnit = getOrgUnitFromCache(currentOrgUnit?.ancestor); } From 57eab525ebe4b4b3584541569da54cafa4d8142a Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 19 Aug 2024 14:52:36 +0200 Subject: [PATCH 17/36] fix: remove level --- .../capture-core/metadataRetrieval/orgUnitName/orgUnitName.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 15064e3fc8..475cd7c129 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -164,7 +164,7 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { } => { const cachedOrgUnit = orgUnitId && orgUnitCache[orgUnitId]; const fetchId = cachedOrgUnit ? undefined : orgUnitId; - const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName,level]'); + const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName]'); if (orgUnitId && cachedOrgUnit) { const getOrgUnitFromCache = parentOrgUnitId => orgUnitCache[parentOrgUnitId]; From fbf8410e5f42edb52469ef8197c6f98488029d5e Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 19 Aug 2024 19:29:49 +0200 Subject: [PATCH 18/36] feat: use recursion --- .../orgUnitName/orgUnitName.js | 49 ++++++++++--------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 475cd7c129..65a2c1e167 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -135,8 +135,8 @@ export const useOrgUnitNames = (orgUnitIds: Array): { }; export async function getOrgUnitNames(orgUnitIds: Array, querySingleResource: QuerySingleResource): Promise<{| - [orgUnitId: string]: {| - id: string, +[orgUnitId: string]: {| + id: string, displayName: string, |} |}> { @@ -160,51 +160,56 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { displayName?: string, ancestors?: Array<{| id: string, displayName: string |}>, - error?: any, + error ?: any, } => { const cachedOrgUnit = orgUnitId && orgUnitCache[orgUnitId]; const fetchId = cachedOrgUnit ? undefined : orgUnitId; - const { orgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName]'); + const { orgUnit: fetchedOrgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName]'); if (orgUnitId && cachedOrgUnit) { const getOrgUnitFromCache = parentOrgUnitId => orgUnitCache[parentOrgUnitId]; - const getFullAncestor = (currentOrgUnitId) => { + const getAncestors = (initialOrgUnitId) => { const ancestors = []; - let currentOrgUnit = getOrgUnitFromCache(currentOrgUnitId); - if (currentOrgUnit) { - currentOrgUnit = getOrgUnitFromCache(currentOrgUnit?.ancestor); - } + const initialOrgUnit = getOrgUnitFromCache(initialOrgUnitId); + + const addAncestor = (currentOrgUnitId) => { + const orgUnit = getOrgUnitFromCache(currentOrgUnitId); - let previousAncestorId = currentOrgUnit?.ancestor; + if (!orgUnit) return; - while (currentOrgUnit) { - ancestors.push({ - displayName: currentOrgUnit?.displayName, - id: previousAncestorId, + ancestors.unshift({ + displayName: orgUnit.displayName, + id: currentOrgUnitId, }); - previousAncestorId = currentOrgUnit?.ancestor; - currentOrgUnit = getOrgUnitFromCache(currentOrgUnit?.ancestor); + if (orgUnit.ancestor !== undefined) { + addAncestor(orgUnit.ancestor); + } + }; + + if (initialOrgUnit && initialOrgUnit.ancestor !== undefined) { + addAncestor(initialOrgUnit.ancestor); } - return ancestors.reverse(); + return ancestors; }; - const ancestors = getFullAncestor(orgUnitId); + const ancestors = getAncestors(orgUnitId); + console.log(ancestors); return { displayName: cachedOrgUnit.displayName, ancestors, error, }; - } else if (orgUnit && fetchId) { - updateCacheWithOrgUnits([orgUnit]); + } else if (fetchedOrgUnit && fetchId) { + updateCacheWithOrgUnits([fetchedOrgUnit]); return { - displayName: orgUnit.displayName, - ancestors: orgUnit.ancestors, + displayName: fetchedOrgUnit.displayName, + ancestors: fetchedOrgUnit.ancestors, error, }; } From d78811404b07c41b439188d9c2b57b99ba94b157 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 19 Aug 2024 19:31:42 +0200 Subject: [PATCH 19/36] fix: remove console log --- .../capture-core/metadataRetrieval/orgUnitName/orgUnitName.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 65a2c1e167..46d344c9f5 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -197,7 +197,6 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { }; const ancestors = getAncestors(orgUnitId); - console.log(ancestors); return { displayName: cachedOrgUnit.displayName, From d6c8a918c0f7c2724bc777a04150607a77008ee2 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Tue, 20 Aug 2024 21:03:50 +0200 Subject: [PATCH 20/36] fix: changes on recursion --- .../orgUnitName/orgUnitName.js | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 46d344c9f5..b6922e5ecd 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -169,34 +169,34 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { if (orgUnitId && cachedOrgUnit) { const getOrgUnitFromCache = parentOrgUnitId => orgUnitCache[parentOrgUnitId]; - const getAncestors = (initialOrgUnitId) => { + const getAncestors = (currentOrgUnitId) => { const ancestors = []; - const initialOrgUnit = getOrgUnitFromCache(initialOrgUnitId); - - const addAncestor = (currentOrgUnitId) => { - const orgUnit = getOrgUnitFromCache(currentOrgUnitId); + const addAncestor = (id) => { + const orgUnit = getOrgUnitFromCache(id); if (!orgUnit) return; - ancestors.unshift({ - displayName: orgUnit.displayName, - id: currentOrgUnitId, - }); - if (orgUnit.ancestor !== undefined) { addAncestor(orgUnit.ancestor); } + + ancestors.push({ + displayName: orgUnit.displayName, + id, + }); }; - if (initialOrgUnit && initialOrgUnit.ancestor !== undefined) { - addAncestor(initialOrgUnit.ancestor); - } + addAncestor(currentOrgUnitId); + + ancestors.pop(); return ancestors; }; const ancestors = getAncestors(orgUnitId); + console.log(ancestors); + return { displayName: cachedOrgUnit.displayName, From 707e1a97d4bc5fe81da02e4aea399f0c06e14c8e Mon Sep 17 00:00:00 2001 From: henrikmv Date: Wed, 21 Aug 2024 15:46:48 +0200 Subject: [PATCH 21/36] fix: remove unnecessary function from recursion --- .../orgUnitName/orgUnitName.js | 31 ++++++------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index b6922e5ecd..14bed61ee4 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -167,36 +167,23 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { const { orgUnit: fetchedOrgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName]'); if (orgUnitId && cachedOrgUnit) { - const getOrgUnitFromCache = parentOrgUnitId => orgUnitCache[parentOrgUnitId]; + const getAncestors = (parentOrgUnitId) => { + const orgUnit = orgUnitCache[parentOrgUnitId]; - const getAncestors = (currentOrgUnitId) => { - const ancestors = []; + if (!orgUnit) return []; - const addAncestor = (id) => { - const orgUnit = getOrgUnitFromCache(id); + const ancestors = orgUnit.ancestor !== undefined ? getAncestors(orgUnit.ancestor) : []; - if (!orgUnit) return; - - if (orgUnit.ancestor !== undefined) { - addAncestor(orgUnit.ancestor); - } - - ancestors.push({ - displayName: orgUnit.displayName, - id, - }); - }; - - addAncestor(currentOrgUnitId); - - ancestors.pop(); + ancestors.push({ + displayName: orgUnit.displayName, + id: orgUnitId, + }); return ancestors; }; const ancestors = getAncestors(orgUnitId); - console.log(ancestors); - + ancestors.pop(); return { displayName: cachedOrgUnit.displayName, From 0ff202f1646db1aa4430554da16f1e91de30bf95 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Wed, 21 Aug 2024 18:46:53 +0200 Subject: [PATCH 22/36] fix: code clean up --- .../TooltipOrgUnit/TooltipOrgUnit.component.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js index 233c2585a8..53121bbe14 100644 --- a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js +++ b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js @@ -4,15 +4,14 @@ import { Tooltip } from '@dhis2/ui'; type Props = { orgUnitName: string, - ancestors?: Array<{| displayName: string, level: number |}>, + ancestors?: Array<{| displayName: string, id: number |}>, tooltip?: string, }; -export const TooltipOrgUnit = ({ orgUnitName, ancestors, tooltip }: Props) => { - const ancestorNames = ancestors?.map(ancestor => ancestor.displayName); - ancestorNames?.push(orgUnitName); - const orgUnitNameFullPath = ancestorNames?.join(' / '); - +export const TooltipOrgUnit = ({ orgUnitName, ancestors = [], tooltip }: Props) => { + const ancestorNames = ancestors.map(ancestor => ancestor.displayName); + ancestorNames.push(orgUnitName); + const orgUnitNameFullPath = ancestorNames.join(' / '); const tooltipParts = tooltip ? tooltip.split(orgUnitName) : [orgUnitName]; return ( From b7a18ff948fba8895a9d115bb533508ad596404a Mon Sep 17 00:00:00 2001 From: henrikmv Date: Thu, 22 Aug 2024 19:49:30 +0200 Subject: [PATCH 23/36] feat: change to clienttolist for widgetenrollment --- .../WidgetEnrollment.component.js | 2 +- .../capture-core/converters/clientToList.js | 17 +++++++++++++++-- .../capture-core/converters/clientToView.js | 19 +------------------ 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js index 540ac1f312..d222bb286e 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js @@ -17,7 +17,7 @@ import { Widget } from '../Widget'; import type { PlainProps } from './enrollment.types'; import { Status } from './Status'; import { dataElementTypes } from '../../metaData'; -import { convertValue } from '../../converters/clientToView'; +import { convertValue } from '../../converters/clientToList'; import { useOrgUnitNameWithAncestors } from '../../metadataRetrieval/orgUnitName'; import { Date } from './Date'; import { Actions } from './Actions'; diff --git a/src/core_modules/capture-core/converters/clientToList.js b/src/core_modules/capture-core/converters/clientToList.js index a5f39b4105..d53a81b9b1 100644 --- a/src/core_modules/capture-core/converters/clientToList.js +++ b/src/core_modules/capture-core/converters/clientToList.js @@ -8,6 +8,7 @@ import { dataElementTypes, type DataElement } from '../metaData'; import { convertMomentToDateFormatString } from '../utils/converters/date'; import { stringifyNumber } from './common/stringifyNumber'; import { MinimalCoordinates } from '../components/MinimalCoordinates'; +import { TooltipOrgUnit } from '../components/Tooltips/TooltipOrgUnit'; function convertDateForListDisplay(rawValue: string): string { const momentDate = moment(rawValue); @@ -37,6 +38,12 @@ type ImageClientValue = { previewUrl: string, }; +type OrgUnitClientValue = { + orgUnitName: string, + ancestors: Array<{| displayName: string, id: string |}>, + tooltip?: string, +}; + function convertFileForDisplay(clientValue: FileClientValue) { // Fallback until https://dhis2.atlassian.net/browse/DHIS2-16994 is implemented if (typeof clientValue === 'string' || clientValue instanceof String) { @@ -86,8 +93,14 @@ function convertStatusForDisplay(clientValue: Object) { ); } -function convertOrgUnitForDisplay(rawValue: string | Object) { - return (typeof rawValue === 'string' ? rawValue : rawValue.name); +function convertOrgUnitForDisplay(clientValue: OrgUnitClientValue) { + return ( + + ); } const valueConvertersForType = { diff --git a/src/core_modules/capture-core/converters/clientToView.js b/src/core_modules/capture-core/converters/clientToView.js index 74c48334e8..a1301e6836 100644 --- a/src/core_modules/capture-core/converters/clientToView.js +++ b/src/core_modules/capture-core/converters/clientToView.js @@ -7,7 +7,6 @@ import { dataElementTypes, type DataElement } from '../metaData'; import { convertMomentToDateFormatString } from '../utils/converters/date'; import { stringifyNumber } from './common/stringifyNumber'; import { MinimalCoordinates } from '../components/MinimalCoordinates'; -import { TooltipOrgUnit } from '../components/Tooltips/TooltipOrgUnit'; function convertDateForView(rawValue: string): string { @@ -38,12 +37,6 @@ type ImageClientValue = { previewUrl: string, }; -type OrgUnitClientValue = { - orgUnitName: string, - ancestors: Array<{| displayName: string, level: number |}>, - tooltip?: string, -}; - function convertFileForDisplay(clientValue: FileClientValue) { return ( ; } -function convertOrgUnitForDisplay(clientValue: OrgUnitClientValue) { - return ( - - ); -} - const valueConvertersForType = { [dataElementTypes.NUMBER]: stringifyNumber, [dataElementTypes.INTEGER]: stringifyNumber, @@ -87,7 +70,7 @@ const valueConvertersForType = { [dataElementTypes.AGE]: convertDateForView, [dataElementTypes.FILE_RESOURCE]: convertFileForDisplay, [dataElementTypes.IMAGE]: convertImageForDisplay, - [dataElementTypes.ORGANISATION_UNIT]: convertOrgUnitForDisplay, + [dataElementTypes.ORGANISATION_UNIT]: (rawValue: Object) => rawValue.name, [dataElementTypes.POLYGON]: () => 'Polygon', }; From a66b0a2fde5813e8b84d9292b9c2d99970a1126d Mon Sep 17 00:00:00 2001 From: henrikmv Date: Thu, 22 Aug 2024 20:19:11 +0200 Subject: [PATCH 24/36] fix: missing orgunitname in chip component --- .../OrgUnitField/SingleOrgUnitSelectField.component.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js b/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js index 6c252f087b..05a97ffc1b 100644 --- a/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js +++ b/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js @@ -13,8 +13,8 @@ const getStyles = () => ({ type OrgUnitValue = { id: string, - name: string, - path: string, + displayName: string, + ancestors: Array<{| displayName: string, id: string |}>, } type State = { @@ -44,7 +44,7 @@ class SingleOrgUnitSelectFieldPlain extends React.Component { const { classes } = this.props; return (
- {selectedOrgUnit.name} + {selectedOrgUnit.displayName}
); } From b7f1a363a43f7b88cc9fb6d243bc6b6949f5053b Mon Sep 17 00:00:00 2001 From: henrikmv Date: Thu, 22 Aug 2024 20:40:52 +0200 Subject: [PATCH 25/36] fix: change to orgunitname --- .../Fields/OrgUnitField/SingleOrgUnitSelectField.component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js b/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js index 05a97ffc1b..e294fe3542 100644 --- a/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js +++ b/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js @@ -13,7 +13,7 @@ const getStyles = () => ({ type OrgUnitValue = { id: string, - displayName: string, + orgUnitName: string, ancestors: Array<{| displayName: string, id: string |}>, } @@ -44,7 +44,7 @@ class SingleOrgUnitSelectFieldPlain extends React.Component { const { classes } = this.props; return (
- {selectedOrgUnit.displayName} + {selectedOrgUnit.orgUnitName}
); } From b1d1c06598416d8a6401ab3b87b4c3bcb2cf6e77 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Thu, 22 Aug 2024 20:55:21 +0200 Subject: [PATCH 26/36] fix: change to clienttolist in widgetprofile --- .../DataEntry/helpers/convertClientToList.js | 30 +++++++++++++++++++ .../WidgetProfile/DataEntry/helpers/index.js | 1 + .../WidgetProfile/DataEntry/index.js | 2 +- .../WidgetProfile/WidgetProfile.component.js | 4 +-- 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/convertClientToList.js diff --git a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/convertClientToList.js b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/convertClientToList.js new file mode 100644 index 0000000000..a50b94b347 --- /dev/null +++ b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/convertClientToList.js @@ -0,0 +1,30 @@ +// @flow +import { dataElementTypes, DataElement, OptionSet, Option } from '../../../../metaData'; +import { convertValue } from '../../../../converters/clientToList'; + +type Attribute = { + attribute: string, + value: string, + valueType: $Keys, + optionSet: { options: Array<{ name: string, code: string, displayName: string }> }, +} + +export const convertClientToList = (clientAttribute: Attribute) => { + const { value, attribute, valueType, optionSet } = clientAttribute; + const dataElement = new DataElement((o) => { + o.id = attribute; + o.type = valueType; + }); + + if (optionSet) { + const options = optionSet.options.map( + option => + new Option((o) => { + o.text = option.displayName; + o.value = option.code; + }), + ); + dataElement.optionSet = new OptionSet(attribute, options, null, dataElement); + } + return convertValue(value, valueType, dataElement); +}; diff --git a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/index.js b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/index.js index 290e84906c..00f3f53e8b 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/index.js +++ b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/index.js @@ -14,5 +14,6 @@ export { } from './convertors'; export { GEOMETRY, getFeatureType, getDataElement, getLabel } from './geometry'; export { convertClientToView } from './convertClientToView'; +export { convertClientToList } from './convertClientToList'; export { escapeString } from './escapeString'; export { handleAPIResponse, REQUESTED_ENTITIES } from './handleAPIResponse'; diff --git a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/index.js b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/index.js index 9914182db2..c31977e571 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/index.js +++ b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/index.js @@ -2,4 +2,4 @@ export { DataEntry } from './DataEntry.container'; export { dataEntryActionTypes, TEI_MODAL_STATE, setTeiModalError, cleanTeiModal } from './dataEntry.actions'; export { updateTeiEpic, updateTeiSucceededEpic, updateTeiFailedEpic } from './dataEntry.epics'; -export { convertClientToView } from './helpers'; +export { convertClientToView, convertClientToList } from './helpers'; diff --git a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js index a69466ca92..10dfb45e61 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js +++ b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js @@ -21,7 +21,7 @@ import { useUserRoles, useTeiDisplayName, } from './hooks'; -import { DataEntry, dataEntryActionTypes, TEI_MODAL_STATE, convertClientToView } from './DataEntry'; +import { DataEntry, dataEntryActionTypes, TEI_MODAL_STATE, convertClientToList } from './DataEntry'; import { ReactQueryAppNamespace } from '../../utils/reactQueryHelpers'; import { CHANGELOG_ENTITY_TYPES } from '../WidgetsChangelog'; import { OverflowMenu } from './OverflowMenu'; @@ -102,7 +102,7 @@ const WidgetProfilePlain = ({ .filter(item => item.displayInList) .map((clientAttribute) => { const { attribute, key, valueType } = clientAttribute; - const value = convertClientToView(clientAttribute); + const value = convertClientToList(clientAttribute); return { attribute, key, value, valueType, reactKey: attribute, }; From 6f132f0ee107c8b219ba135bd57ecec6fbde9626 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Fri, 23 Aug 2024 07:50:03 +0200 Subject: [PATCH 27/36] fix: set back to name --- .../OrgUnitField/SingleOrgUnitSelectField.component.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js b/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js index e294fe3542..6c252f087b 100644 --- a/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js +++ b/src/core_modules/capture-core/components/FormFields/New/Fields/OrgUnitField/SingleOrgUnitSelectField.component.js @@ -13,8 +13,8 @@ const getStyles = () => ({ type OrgUnitValue = { id: string, - orgUnitName: string, - ancestors: Array<{| displayName: string, id: string |}>, + name: string, + path: string, } type State = { @@ -44,7 +44,7 @@ class SingleOrgUnitSelectFieldPlain extends React.Component { const { classes } = this.props; return (
- {selectedOrgUnit.orgUnitName} + {selectedOrgUnit.name}
); } From deb46b5f61fe069f99392dfb3d952637d7b26fa6 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Fri, 23 Aug 2024 11:55:34 +0200 Subject: [PATCH 28/36] feat: change from orgunitname to name --- .../orgUnitName/orgUnitName.js | 39 +++++++++++-------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 14bed61ee4..159969f5cd 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -23,20 +23,28 @@ const displayNamesQuery = { const updateCacheWithOrgUnits = (organisationUnits) => { for (const { id, displayName, ancestors } of organisationUnits) { - orgUnitCache[id] = { - displayName, - ancestor: ancestors[ancestors.length - 1]?.id, - }; - - ancestors.forEach((ancestor, index) => { - if (!orgUnitCache[ancestor.id]) { - const parentAncestorId = ancestors[index - 1]?.id; - orgUnitCache[ancestor.id] = { - displayName: ancestor.displayName, - ancestor: parentAncestorId, - }; - } - }); + if (ancestors.length > 0) { + orgUnitCache[id] = { + displayName, + ancestor: ancestors[ancestors.length - 1].id, + }; + + ancestors.findLast((ancestor, index) => { + if (orgUnitCache[ancestor.id]) { + return true; + } else if (index > 0) { + orgUnitCache[ancestor.id] = { + displayName: ancestor.displayName, + ancestor: ancestors[index - 1].id, + }; + return false; + } + orgUnitCache[ancestor.id] = { displayName: ancestor.displayName }; + return true; + }); + } else { + orgUnitCache[id] = { displayName }; + } } }; @@ -172,8 +180,7 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { if (!orgUnit) return []; - const ancestors = orgUnit.ancestor !== undefined ? getAncestors(orgUnit.ancestor) : []; - + const ancestors = getAncestors(orgUnit.ancestor); ancestors.push({ displayName: orgUnit.displayName, id: orgUnitId, From 8af08eea2fa02a3c76d4ce1355ea41d37d4b27f0 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 26 Aug 2024 08:10:48 +0200 Subject: [PATCH 29/36] fix: set back to cleint to view --- .../WidgetEnrollment.component.js | 2 +- .../DataEntry/helpers/convertClientToList.js | 30 ------------------- .../WidgetProfile/DataEntry/helpers/index.js | 1 - .../WidgetProfile/DataEntry/index.js | 2 +- .../WidgetProfile/WidgetProfile.component.js | 15 +++------- .../capture-core/converters/clientToList.js | 17 ++--------- .../capture-core/converters/clientToView.js | 27 +++++++++++------ 7 files changed, 26 insertions(+), 68 deletions(-) delete mode 100644 src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/convertClientToList.js diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js index d222bb286e..540ac1f312 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js @@ -17,7 +17,7 @@ import { Widget } from '../Widget'; import type { PlainProps } from './enrollment.types'; import { Status } from './Status'; import { dataElementTypes } from '../../metaData'; -import { convertValue } from '../../converters/clientToList'; +import { convertValue } from '../../converters/clientToView'; import { useOrgUnitNameWithAncestors } from '../../metadataRetrieval/orgUnitName'; import { Date } from './Date'; import { Actions } from './Actions'; diff --git a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/convertClientToList.js b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/convertClientToList.js deleted file mode 100644 index a50b94b347..0000000000 --- a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/convertClientToList.js +++ /dev/null @@ -1,30 +0,0 @@ -// @flow -import { dataElementTypes, DataElement, OptionSet, Option } from '../../../../metaData'; -import { convertValue } from '../../../../converters/clientToList'; - -type Attribute = { - attribute: string, - value: string, - valueType: $Keys, - optionSet: { options: Array<{ name: string, code: string, displayName: string }> }, -} - -export const convertClientToList = (clientAttribute: Attribute) => { - const { value, attribute, valueType, optionSet } = clientAttribute; - const dataElement = new DataElement((o) => { - o.id = attribute; - o.type = valueType; - }); - - if (optionSet) { - const options = optionSet.options.map( - option => - new Option((o) => { - o.text = option.displayName; - o.value = option.code; - }), - ); - dataElement.optionSet = new OptionSet(attribute, options, null, dataElement); - } - return convertValue(value, valueType, dataElement); -}; diff --git a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/index.js b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/index.js index 00f3f53e8b..290e84906c 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/index.js +++ b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/helpers/index.js @@ -14,6 +14,5 @@ export { } from './convertors'; export { GEOMETRY, getFeatureType, getDataElement, getLabel } from './geometry'; export { convertClientToView } from './convertClientToView'; -export { convertClientToList } from './convertClientToList'; export { escapeString } from './escapeString'; export { handleAPIResponse, REQUESTED_ENTITIES } from './handleAPIResponse'; diff --git a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/index.js b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/index.js index c31977e571..9914182db2 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/DataEntry/index.js +++ b/src/core_modules/capture-core/components/WidgetProfile/DataEntry/index.js @@ -2,4 +2,4 @@ export { DataEntry } from './DataEntry.container'; export { dataEntryActionTypes, TEI_MODAL_STATE, setTeiModalError, cleanTeiModal } from './dataEntry.actions'; export { updateTeiEpic, updateTeiSucceededEpic, updateTeiFailedEpic } from './dataEntry.epics'; -export { convertClientToView, convertClientToList } from './helpers'; +export { convertClientToView } from './helpers'; diff --git a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js index 10dfb45e61..0204ac19a7 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js +++ b/src/core_modules/capture-core/components/WidgetProfile/WidgetProfile.component.js @@ -21,7 +21,7 @@ import { useUserRoles, useTeiDisplayName, } from './hooks'; -import { DataEntry, dataEntryActionTypes, TEI_MODAL_STATE, convertClientToList } from './DataEntry'; +import { DataEntry, dataEntryActionTypes, TEI_MODAL_STATE, convertClientToView } from './DataEntry'; import { ReactQueryAppNamespace } from '../../utils/reactQueryHelpers'; import { CHANGELOG_ENTITY_TYPES } from '../WidgetsChangelog'; import { OverflowMenu } from './OverflowMenu'; @@ -90,11 +90,7 @@ const WidgetProfilePlain = ({ const loading = programsLoading || trackedEntityInstancesLoading || userRolesLoading || !configIsFetched; const error = programsError || trackedEntityInstancesError || userRolesError; - const clientAttributesWithSubvalues = useClientAttributesWithSubvalues( - teiId, - program, - trackedEntityInstanceAttributes, - ); + const clientAttributesWithSubvalues = useClientAttributesWithSubvalues(teiId, program, trackedEntityInstanceAttributes); const teiDisplayName = useTeiDisplayName(program, storedAttributeValues, clientAttributesWithSubvalues, teiId); const displayChangelog = supportsChangelog && program && program.trackedEntityType?.changelogEnabled; @@ -102,7 +98,7 @@ const WidgetProfilePlain = ({ .filter(item => item.displayInList) .map((clientAttribute) => { const { attribute, key, valueType } = clientAttribute; - const value = convertClientToList(clientAttribute); + const value = convertClientToView(clientAttribute); return { attribute, key, value, valueType, reactKey: attribute, }; @@ -140,10 +136,7 @@ const WidgetProfilePlain = ({ return (
- +
); }; diff --git a/src/core_modules/capture-core/converters/clientToList.js b/src/core_modules/capture-core/converters/clientToList.js index d53a81b9b1..a5f39b4105 100644 --- a/src/core_modules/capture-core/converters/clientToList.js +++ b/src/core_modules/capture-core/converters/clientToList.js @@ -8,7 +8,6 @@ import { dataElementTypes, type DataElement } from '../metaData'; import { convertMomentToDateFormatString } from '../utils/converters/date'; import { stringifyNumber } from './common/stringifyNumber'; import { MinimalCoordinates } from '../components/MinimalCoordinates'; -import { TooltipOrgUnit } from '../components/Tooltips/TooltipOrgUnit'; function convertDateForListDisplay(rawValue: string): string { const momentDate = moment(rawValue); @@ -38,12 +37,6 @@ type ImageClientValue = { previewUrl: string, }; -type OrgUnitClientValue = { - orgUnitName: string, - ancestors: Array<{| displayName: string, id: string |}>, - tooltip?: string, -}; - function convertFileForDisplay(clientValue: FileClientValue) { // Fallback until https://dhis2.atlassian.net/browse/DHIS2-16994 is implemented if (typeof clientValue === 'string' || clientValue instanceof String) { @@ -93,14 +86,8 @@ function convertStatusForDisplay(clientValue: Object) { ); } -function convertOrgUnitForDisplay(clientValue: OrgUnitClientValue) { - return ( - - ); +function convertOrgUnitForDisplay(rawValue: string | Object) { + return (typeof rawValue === 'string' ? rawValue : rawValue.name); } const valueConvertersForType = { diff --git a/src/core_modules/capture-core/converters/clientToView.js b/src/core_modules/capture-core/converters/clientToView.js index a1301e6836..7e9a377336 100644 --- a/src/core_modules/capture-core/converters/clientToView.js +++ b/src/core_modules/capture-core/converters/clientToView.js @@ -7,36 +7,39 @@ import { dataElementTypes, type DataElement } from '../metaData'; import { convertMomentToDateFormatString } from '../utils/converters/date'; import { stringifyNumber } from './common/stringifyNumber'; import { MinimalCoordinates } from '../components/MinimalCoordinates'; +import { TooltipOrgUnit } from '../components/Tooltips/TooltipOrgUnit'; function convertDateForView(rawValue: string): string { const momentDate = moment(rawValue); return convertMomentToDateFormatString(momentDate); } - function convertDateTimeForView(rawValue: string): string { const momentDate = moment(rawValue); const dateString = convertMomentToDateFormatString(momentDate); const timeString = momentDate.format('HH:mm'); return `${dateString} ${timeString}`; } - function convertTimeForView(rawValue: string): string { const momentDate = moment(rawValue, 'HH:mm', true); return momentDate.format('HH:mm'); } - type FileClientValue = { name: string, url: string, value: string, }; - type ImageClientValue = { ...FileClientValue, previewUrl: string, }; +type OrgUnitClientValue = { + orgUnitName: string, + ancestors: Array<{| displayName: string, level: number |}>, + tooltip?: string, +}; + function convertFileForDisplay(clientValue: FileClientValue) { return (
); } - function convertImageForDisplay(clientValue: ImageClientValue) { return ; } +function convertOrgUnitForDisplay(clientValue: OrgUnitClientValue) { + return ( + + ); +} + const valueConvertersForType = { [dataElementTypes.NUMBER]: stringifyNumber, [dataElementTypes.INTEGER]: stringifyNumber, @@ -70,7 +82,7 @@ const valueConvertersForType = { [dataElementTypes.AGE]: convertDateForView, [dataElementTypes.FILE_RESOURCE]: convertFileForDisplay, [dataElementTypes.IMAGE]: convertImageForDisplay, - [dataElementTypes.ORGANISATION_UNIT]: (rawValue: Object) => rawValue.name, + [dataElementTypes.ORGANISATION_UNIT]: convertOrgUnitForDisplay, [dataElementTypes.POLYGON]: () => 'Polygon', }; @@ -78,18 +90,15 @@ export function convertValue(value: any, type: $Keys, d if (!value && value !== 0 && value !== false) { return value; } - if (dataElement && dataElement.optionSet) { if (dataElement.type === dataElementTypes.MULTI_TEXT) { return dataElement.optionSet.getMultiOptionsText(value); } return dataElement.optionSet.getOptionText(value); } - // $FlowFixMe dataElementTypes flow error return valueConvertersForType[type] ? valueConvertersForType[type](value) : value; } - export function convertDateWithTimeForView(rawValue?: ?string): string { if (!rawValue) { return ''; } if (!moment(rawValue).hours() && !moment(rawValue).minutes()) { From 5f9e2a63e5cee52e613ea35b25d372a2b4b67e88 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 26 Aug 2024 08:33:31 +0200 Subject: [PATCH 30/36] fix: review changes for orgunitname file --- .../orgUnitName/orgUnitName.js | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index 159969f5cd..e3f02709c6 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -66,6 +66,20 @@ const createBatches = (orgUnitIds: Array): Array> => { return batches; }; +const getAncestors = (orgUnitId) => { + const orgUnit = orgUnitCache[orgUnitId]; + + if (!orgUnit) return []; + + const ancestors = getAncestors(orgUnit.ancestor); + ancestors.push({ + displayName: orgUnit.displayName, + id: orgUnitId, + }); + + return ancestors; +}; + // Works best with memoized input arrays. export const useOrgUnitNames = (orgUnitIds: Array): { loading: boolean, @@ -175,22 +189,7 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { const { orgUnit: fetchedOrgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName]'); if (orgUnitId && cachedOrgUnit) { - const getAncestors = (parentOrgUnitId) => { - const orgUnit = orgUnitCache[parentOrgUnitId]; - - if (!orgUnit) return []; - - const ancestors = getAncestors(orgUnit.ancestor); - ancestors.push({ - displayName: orgUnit.displayName, - id: orgUnitId, - }); - - return ancestors; - }; - - const ancestors = getAncestors(orgUnitId); - ancestors.pop(); + const ancestors = getAncestors(cachedOrgUnit.ancestor); return { displayName: cachedOrgUnit.displayName, From 8cc389a08119405dc6759ec9346a2934396edce0 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 26 Aug 2024 10:32:17 +0200 Subject: [PATCH 31/36] feat: remove id from ancestors --- .../TooltipOrgUnit.component.js | 7 ++-- .../WidgetEnrollment.component.js | 4 +- .../WidgetProfile/hooks/getSubValueForTei.js | 9 ++--- .../capture-core/converters/clientToView.js | 6 +-- .../orgUnitName/orgUnitName.js | 38 +++++++++---------- 5 files changed, 29 insertions(+), 35 deletions(-) diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js index 53121bbe14..15a687f163 100644 --- a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js +++ b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js @@ -4,14 +4,13 @@ import { Tooltip } from '@dhis2/ui'; type Props = { orgUnitName: string, - ancestors?: Array<{| displayName: string, id: number |}>, + ancestors?: Array, tooltip?: string, }; export const TooltipOrgUnit = ({ orgUnitName, ancestors = [], tooltip }: Props) => { - const ancestorNames = ancestors.map(ancestor => ancestor.displayName); - ancestorNames.push(orgUnitName); - const orgUnitNameFullPath = ancestorNames.join(' / '); + ancestors.push(orgUnitName); + const orgUnitNameFullPath = ancestors.join(' / '); const tooltipParts = tooltip ? tooltip.split(orgUnitName) : [orgUnitName]; return ( diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js index 540ac1f312..410e155ae9 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js @@ -79,7 +79,7 @@ export const WidgetEnrollmentPlain = ({ const { displayName: ownerOrgUnitName, ancestors: ownerAncestors } = useOrgUnitNameWithAncestors(ownerOrgUnit?.id); const orgUnitClientValue = { - orgUnitName, + name: orgUnitName, ancestors: ancestors || [], tooltip: i18n.t('Started at {{orgUnitName}}', { orgUnitName, @@ -88,7 +88,7 @@ export const WidgetEnrollmentPlain = ({ }; const ownerOrgUnitClientValue = { - orgUnitName: ownerOrgUnitName, + name: ownerOrgUnitName, ancestors: ownerAncestors || [], tooltip: i18n.t('Owned by {{ownerOrgUnit}}', { ownerOrgUnit: ownerOrgUnitName, diff --git a/src/core_modules/capture-core/components/WidgetProfile/hooks/getSubValueForTei.js b/src/core_modules/capture-core/components/WidgetProfile/hooks/getSubValueForTei.js index 4bb045f726..89a9e819cf 100644 --- a/src/core_modules/capture-core/components/WidgetProfile/hooks/getSubValueForTei.js +++ b/src/core_modules/capture-core/components/WidgetProfile/hooks/getSubValueForTei.js @@ -51,17 +51,14 @@ const getOrganisationUnitSubvalue = async ({ attribute, querySingleResource }: S resource: 'organisationUnits', id: attribute.value, params: { - fields: 'id,name,ancestors[displayName,level]', + fields: 'id,name,ancestors[displayName]', }, }); const orgUnitClientValue = { id: organisationUnit.id, - orgUnitName: organisationUnit.name, - ancestors: organisationUnit.ancestors.map(ancestor => ({ - displayName: ancestor.displayName, - level: ancestor.level, - })), + name: organisationUnit.name, + ancestors: organisationUnit.ancestors.map(ancestor => ancestor.displayName), }; return orgUnitClientValue; diff --git a/src/core_modules/capture-core/converters/clientToView.js b/src/core_modules/capture-core/converters/clientToView.js index 7e9a377336..c36d391b66 100644 --- a/src/core_modules/capture-core/converters/clientToView.js +++ b/src/core_modules/capture-core/converters/clientToView.js @@ -35,8 +35,8 @@ type ImageClientValue = { }; type OrgUnitClientValue = { - orgUnitName: string, - ancestors: Array<{| displayName: string, level: number |}>, + name: string, + ancestors?: Array, tooltip?: string, }; @@ -59,7 +59,7 @@ function convertImageForDisplay(clientValue: ImageClientValue) { function convertOrgUnitForDisplay(clientValue: OrgUnitClientValue) { return ( diff --git a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js index e3f02709c6..43447d2b35 100644 --- a/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js +++ b/src/core_modules/capture-core/metadataRetrieval/orgUnitName/orgUnitName.js @@ -5,9 +5,9 @@ import { useOrganisationUnit } from '../../dataQueries'; import type { OrgUnitNames } from './orgUnitName.types'; import type { QuerySingleResource } from '../../utils/api'; -// Avoid exporting orgUnitCache to keep it truly private. +// Avoid exporting displayNameCache to keep it truly private. // As a consequence all functions using it must be in this file. -const orgUnitCache = {}; +const displayNameCache = {}; const maxBatchSize = 50; const displayNamesQuery = { @@ -24,26 +24,26 @@ const displayNamesQuery = { const updateCacheWithOrgUnits = (organisationUnits) => { for (const { id, displayName, ancestors } of organisationUnits) { if (ancestors.length > 0) { - orgUnitCache[id] = { + displayNameCache[id] = { displayName, ancestor: ancestors[ancestors.length - 1].id, }; ancestors.findLast((ancestor, index) => { - if (orgUnitCache[ancestor.id]) { + if (displayNameCache[ancestor.id]) { return true; } else if (index > 0) { - orgUnitCache[ancestor.id] = { + displayNameCache[ancestor.id] = { displayName: ancestor.displayName, ancestor: ancestors[index - 1].id, }; return false; } - orgUnitCache[ancestor.id] = { displayName: ancestor.displayName }; + displayNameCache[ancestor.id] = { displayName: ancestor.displayName }; return true; }); } else { - orgUnitCache[id] = { displayName }; + displayNameCache[id] = { displayName }; } } }; @@ -52,7 +52,7 @@ const createBatches = (orgUnitIds: Array): Array> => { const reducedOrgUnitIds = Array.from(orgUnitIds .filter(id => id) .reduce((acc, id) => { - if (!orgUnitCache[id]) { + if (!displayNameCache[id]) { acc.add(id); } return acc; @@ -67,15 +67,12 @@ const createBatches = (orgUnitIds: Array): Array> => { }; const getAncestors = (orgUnitId) => { - const orgUnit = orgUnitCache[orgUnitId]; + const orgUnit = displayNameCache[orgUnitId]; if (!orgUnit) return []; const ancestors = getAncestors(orgUnit.ancestor); - ancestors.push({ - displayName: orgUnit.displayName, - id: orgUnitId, - }); + ancestors.push(orgUnit.displayName); return ancestors; }; @@ -98,7 +95,7 @@ export const useOrgUnitNames = (orgUnitIds: Array): { const batches = useMemo(() => createBatches(orgUnitIds), [orgUnitIds]); const filter = useMemo(() => (fetching ? currentBatches[completedBatches].join(',') : ''), [fetching, currentBatches, completedBatches]); const result = useMemo(() => (ready ? orgUnitIds.reduce((acc, id) => { - acc[id] = orgUnitCache[id] ? orgUnitCache[id].displayName : null; + acc[id] = displayNameCache[id] ? displayNameCache[id].displayName : null; return acc; }, {}) : null), [ready, orgUnitIds]); @@ -173,7 +170,7 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso return orgUnitIds.reduce((acc, orgUnitId) => { acc[orgUnitId] = { id: orgUnitId, - name: orgUnitCache[orgUnitId]?.displayName, + name: displayNameCache[orgUnitId]?.displayName, }; return acc; }, {}); @@ -181,10 +178,10 @@ export async function getOrgUnitNames(orgUnitIds: Array, querySingleReso export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { displayName?: string, - ancestors?: Array<{| id: string, displayName: string |}>, - error ?: any, + ancestors?: Array, + error: any, } => { - const cachedOrgUnit = orgUnitId && orgUnitCache[orgUnitId]; + const cachedOrgUnit = orgUnitId && displayNameCache[orgUnitId]; const fetchId = cachedOrgUnit ? undefined : orgUnitId; const { orgUnit: fetchedOrgUnit, error } = useOrganisationUnit(fetchId, 'displayName,ancestors[id,displayName]'); @@ -198,10 +195,11 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { }; } else if (fetchedOrgUnit && fetchId) { updateCacheWithOrgUnits([fetchedOrgUnit]); + const ancestors = fetchedOrgUnit.ancestors.map(ancestor => ancestor.displayName); return { displayName: fetchedOrgUnit.displayName, - ancestors: fetchedOrgUnit.ancestors, + ancestors, error, }; } @@ -209,4 +207,4 @@ export const useOrgUnitNameWithAncestors = (orgUnitId: ?string): { return { error }; }; -export const getCachedOrgUnitName = (orgUnitId: string): ?string => orgUnitCache[orgUnitId]?.displayName; +export const getCachedOrgUnitName = (orgUnitId: string): ?string => displayNameCache[orgUnitId]?.displayName; From 649107fb7b32594df7cef695ef2a4bdb4ffe7ae6 Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 26 Aug 2024 11:47:52 +0200 Subject: [PATCH 32/36] feat: change tooltip component --- .../TooltipOrgUnit.component.js | 19 ++++++++----------- .../WidgetEnrollment.component.js | 4 ++-- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js index 15a687f163..9b7db860e6 100644 --- a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js +++ b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js @@ -9,25 +9,22 @@ type Props = { }; export const TooltipOrgUnit = ({ orgUnitName, ancestors = [], tooltip }: Props) => { - ancestors.push(orgUnitName); - const orgUnitNameFullPath = ancestors.join(' / '); - const tooltipParts = tooltip ? tooltip.split(orgUnitName) : [orgUnitName]; + const orgUnitNameFullPath = [...ancestors, orgUnitName].join(' / '); + + const renderTooltipContent = () => (tooltip ? tooltip.split(orgUnitName) : [orgUnitName]); + const [before, after] = renderTooltipContent(); return ( {tooltip ? ( <> - {tooltipParts[0]} - - {orgUnitName} - - {tooltipParts[1]} + {before} + {orgUnitName} + {after} ) : ( - - {orgUnitName} - + {orgUnitName} )} diff --git a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js index 410e155ae9..d99497123c 100644 --- a/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js +++ b/src/core_modules/capture-core/components/WidgetEnrollment/WidgetEnrollment.component.js @@ -80,7 +80,7 @@ export const WidgetEnrollmentPlain = ({ const orgUnitClientValue = { name: orgUnitName, - ancestors: ancestors || [], + ancestors, tooltip: i18n.t('Started at {{orgUnitName}}', { orgUnitName, interpolation: { escapeValue: false }, @@ -89,7 +89,7 @@ export const WidgetEnrollmentPlain = ({ const ownerOrgUnitClientValue = { name: ownerOrgUnitName, - ancestors: ownerAncestors || [], + ancestors: ownerAncestors, tooltip: i18n.t('Owned by {{ownerOrgUnit}}', { ownerOrgUnit: ownerOrgUnitName, interpolation: { escapeValue: false }, From 9c3d38e12f405238daa682b76c7d4ef8d3c34eab Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 26 Aug 2024 12:15:46 +0200 Subject: [PATCH 33/36] feat: clean up for tooltip --- .../TooltipOrgUnit.component.js | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js index 9b7db860e6..2e7b3a8a2b 100644 --- a/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js +++ b/src/core_modules/capture-core/components/Tooltips/TooltipOrgUnit/TooltipOrgUnit.component.js @@ -9,24 +9,14 @@ type Props = { }; export const TooltipOrgUnit = ({ orgUnitName, ancestors = [], tooltip }: Props) => { - const orgUnitNameFullPath = [...ancestors, orgUnitName].join(' / '); + const fullPath = [...ancestors, orgUnitName].join(' / '); + const [before, after] = tooltip ? tooltip.split(orgUnitName) : [orgUnitName]; - const renderTooltipContent = () => (tooltip ? tooltip.split(orgUnitName) : [orgUnitName]); - const [before, after] = renderTooltipContent(); - - return ( - - - {tooltip ? ( - <> - {before} - {orgUnitName} - {after} - - ) : ( - {orgUnitName} - )} - + const renderTooltip = ( + + {orgUnitName} ); + + return tooltip ? {before}{renderTooltip}{after} : renderTooltip; }; From 4a598eea4d4f519f3f016842359ac4880d04e7de Mon Sep 17 00:00:00 2001 From: henrikmv Date: Mon, 26 Aug 2024 12:36:53 +0200 Subject: [PATCH 34/36] fix: merge with master --- CHANGELOG.md | 66 +++ .../AllAccessibleRecordsPage.js | 2 + .../ProgramStageSelector.feature | 5 + .../ProgramStageSelector.js | 4 + .../EnrollmentQuickActions.feature | 5 + .../EnrollmentQuickActions.js | 10 + .../StagesAndEventsWidget.feature | 9 +- .../WidgetEnrollment/index.js | 8 +- .../WidgetsForEnrollmentDashboard.feature | 3 +- .../EventWorkingListsUser.js | 3 +- .../TeiWorkingListsUser.feature | 8 - .../TeiWorkingListsUser.js | 9 +- d2.config.js | 2 +- i18n/ar.po | 89 +-- i18n/ar_IQ.po | 66 ++- i18n/cs.po | 88 +-- i18n/en.pot | 46 +- i18n/es.po | 88 +-- i18n/fr.po | 90 +-- i18n/id.po | 84 +-- i18n/km.po | 62 ++- i18n/lo.po | 230 ++++---- i18n/my.po | 66 ++- i18n/nb.po | 63 ++- i18n/nl.po | 84 +-- i18n/prs.po | 64 ++- i18n/ps.po | 64 ++- i18n/pt.po | 63 ++- i18n/pt_BR.po | 68 ++- i18n/ro.po | 84 +-- i18n/ru.po | 67 ++- i18n/si.po | 523 +++++++++++++----- i18n/tg.po | 62 ++- i18n/uk.po | 68 ++- i18n/ur.po | 64 ++- i18n/uz_UZ_Cyrl.po | 67 ++- i18n/uz_UZ_Latn.po | 66 ++- i18n/vi.po | 66 ++- i18n/zh.po | 104 ++-- i18n/zh_CN.po | 63 ++- package.json | 4 +- packages/rules-engine/package.json | 2 +- .../featuresSupport/support.js | 2 - .../Buttons/OverflowButton.component.js | 2 + .../CardList/CardListItem.component.js | 93 ++-- .../FormBuilder/FormBuilder.component.js | 37 +- .../FiltersForTypes/Date/End.component.js | 2 +- .../FiltersForTypes/Date/Start.component.js | 2 +- .../FormFields/AgeField/AgeField.component.js | 234 -------- .../EmailField/EmailField.component.js | 50 -- .../Generic/D2TextField.component.js | 16 +- .../PhoneNumber/PhoneNumber.component.js | 50 -- .../IncompleteSelectionsMessage/index.js | 24 +- .../components/InfoIconText/InfoIconText.js | 21 +- .../DragDropList/DragDropList.component.js | 54 +- .../DragDropListItem.component.js | 167 +++--- .../EnrollmentQuickActions.component.js | 43 +- .../ProgramStageSelector.component.js | 2 +- .../ProgramStageSelector.container.js | 1 + .../PageLayout/DefaultPageLayout.constants.js | 6 + .../RegistrationDataEntry.component.js | 137 ++--- .../DefaultEnrollmentLayout.types.js | 1 + .../EnrollmentPageLayout.js | 3 +- .../LayoutComponentConfig.js | 12 + .../WidgetEventEditWrapper.js | 17 +- .../Program/ProgramSelector.component.js | 4 +- .../FormFoundation/RenderFoundation.js | 5 + .../WidgetProfile/hooks/useApiProgram.js | 2 +- .../RelatedStagesActions.component.js | 1 - .../hooks/useCanAddNewEventToStage.js | 25 +- .../Stages/Stage/Stage.component.js | 29 +- .../StageCreateNewButton.js | 75 +++ .../Stage/StageCreateNewButton/index.js | 3 + .../StageDetail/StageDetail.component.js | 44 +- .../FlatListOrgUnitField.js | 19 + .../FlatListOrgUnitField/index.js | 3 + .../WidgetTwoEventWorkspace.component.js | 59 ++ .../WidgetTwoEventWorkspace.container.js | 157 ++++++ .../WidgetTwoEventWorkspace.types.js | 24 + .../hooks/useClientDataValues.js | 97 ++++ .../hooks/useLinkedEventByOriginId.js | 110 ++++ .../WidgetTwoEventWorkspace/index.js | 3 + .../utils/getDataEntryDetails.js | 74 +++ .../utils/getSubValueForDataValue.js | 60 ++ .../Setup/hooks/useProgramStageFilters.js | 165 +++--- .../factory/enrollment/EnrollmentFactory.js | 4 + .../quickStoreOperations/storePrograms.js | 2 +- .../types/apiPrograms.types.js | 3 +- .../descriptions/form.reducerDescription.js | 6 +- .../storageControllers/cache.types.js | 3 +- yarn.lock | 37 +- 91 files changed, 2949 insertions(+), 1730 deletions(-) delete mode 100644 src/core_modules/capture-core/components/FormFields/AgeField/AgeField.component.js delete mode 100644 src/core_modules/capture-core/components/FormFields/EmailField/EmailField.component.js delete mode 100644 src/core_modules/capture-core/components/FormFields/PhoneNumber/PhoneNumber.component.js create mode 100644 src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageCreateNewButton/StageCreateNewButton.js create mode 100644 src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/StageCreateNewButton/index.js create mode 100644 src/core_modules/capture-core/components/WidgetTwoEventWorkspace/FlatListOrgUnitField/FlatListOrgUnitField.js create mode 100644 src/core_modules/capture-core/components/WidgetTwoEventWorkspace/FlatListOrgUnitField/index.js create mode 100644 src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.component.js create mode 100644 src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.container.js create mode 100644 src/core_modules/capture-core/components/WidgetTwoEventWorkspace/WidgetTwoEventWorkspace.types.js create mode 100644 src/core_modules/capture-core/components/WidgetTwoEventWorkspace/hooks/useClientDataValues.js create mode 100644 src/core_modules/capture-core/components/WidgetTwoEventWorkspace/hooks/useLinkedEventByOriginId.js create mode 100644 src/core_modules/capture-core/components/WidgetTwoEventWorkspace/index.js create mode 100644 src/core_modules/capture-core/components/WidgetTwoEventWorkspace/utils/getDataEntryDetails.js create mode 100644 src/core_modules/capture-core/components/WidgetTwoEventWorkspace/utils/getSubValueForDataValue.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c44b04a8c..baaaeb4db4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,69 @@ +## [101.2.1](https://github.com/dhis2/capture-app/compare/v101.2.0...v101.2.1) (2024-08-25) + + +### Bug Fixes + +* **translations:** sync translations from transifex (master) ([7971aa4](https://github.com/dhis2/capture-app/commit/7971aa4d5975aa6976912c0fdeb45957955477dc)) + +# [101.2.0](https://github.com/dhis2/capture-app/compare/v101.1.3...v101.2.0) (2024-08-22) + + +### Features + +* [DHIS2-17575] disable create new buttons if no data write access ([#3751](https://github.com/dhis2/capture-app/issues/3751)) ([5b3cd1c](https://github.com/dhis2/capture-app/commit/5b3cd1c6150d9b6cc47be274d50bffad05b6da73)) + +## [101.1.3](https://github.com/dhis2/capture-app/compare/v101.1.2...v101.1.3) (2024-08-18) + + +### Bug Fixes + +* **translations:** sync translations from transifex (master) ([4164273](https://github.com/dhis2/capture-app/commit/4164273a380c24f57369f4f7c56dea4f0f6211a1)) + +## [101.1.2](https://github.com/dhis2/capture-app/compare/v101.1.1...v101.1.2) (2024-08-15) + + +### Bug Fixes + +* [DHIS2-17101] Consider prevent adding events to stage program rule ([#3706](https://github.com/dhis2/capture-app/issues/3706)) ([47ed42c](https://github.com/dhis2/capture-app/commit/47ed42c4c0d1a23ce93ce4ccbd02461ae22d2a18)) + +## [101.1.1](https://github.com/dhis2/capture-app/compare/v101.1.0...v101.1.1) (2024-08-14) + + +### Bug Fixes + +* [DHIS2-17883] revert validate values assigned from the rules engine ([#3758](https://github.com/dhis2/capture-app/issues/3758)) ([ea0e675](https://github.com/dhis2/capture-app/commit/ea0e67572d3edf5bee4adc19a3a845260cfa2abd)) + +# [101.1.0](https://github.com/dhis2/capture-app/compare/v101.0.0...v101.1.0) (2024-08-14) + + +### Features + +* [DHIS2-17655] Two event workspace ([#3726](https://github.com/dhis2/capture-app/issues/3726)) ([bad5312](https://github.com/dhis2/capture-app/commit/bad53124de25367fd633c0cfdd50efacb6eb022a)) + +# [101.0.0](https://github.com/dhis2/capture-app/compare/v100.77.0...v101.0.0) (2024-08-14) + + +### chore + +* **release:** stop support for 2.38 ([#3755](https://github.com/dhis2/capture-app/issues/3755)) ([2bbc649](https://github.com/dhis2/capture-app/commit/2bbc649b2cb638ac7c311bde16b79e1c39b2a65f)) + + +### BREAKING CHANGES + +* **release:** Bump version to 101.0.0 to facilitate potential fixes for 2.38 + +# [100.77.0](https://github.com/dhis2/capture-app/compare/v100.76.1...v100.77.0) (2024-08-13) + + +### Bug Fixes + +* [DHIS2-17352] Changing program in event workspace does nothing ([#3754](https://github.com/dhis2/capture-app/issues/3754)) ([c3ce444](https://github.com/dhis2/capture-app/commit/c3ce444db56cbb089c3023aa4c1866cc7f158c1f)) + + +### Features + +* [DHIS2-12288] add enrollment section description ([#3750](https://github.com/dhis2/capture-app/issues/3750)) ([1b4be20](https://github.com/dhis2/capture-app/commit/1b4be20b474f2f5b6c4eb66c37b0c509291b5bf6)) + ## [100.76.1](https://github.com/dhis2/capture-app/compare/v100.76.0...v100.76.1) (2024-08-09) diff --git a/cypress/e2e/AllAccessibleRecordsPage/AllAccessibleRecordsPage.js b/cypress/e2e/AllAccessibleRecordsPage/AllAccessibleRecordsPage.js index 9ea6ac3f02..dbf29a6a8c 100644 --- a/cypress/e2e/AllAccessibleRecordsPage/AllAccessibleRecordsPage.js +++ b/cypress/e2e/AllAccessibleRecordsPage/AllAccessibleRecordsPage.js @@ -61,6 +61,8 @@ Then('the working list should be updated', () => { .click(); cy.contains('WHOMCH Hemoglobin value') + .parents('tr') + .find('input[type="checkbox"]') .click(); cy.contains('Save') diff --git a/cypress/e2e/EnrollmentAddEventPage/ProgramStageSelector/ProgramStageSelector.feature b/cypress/e2e/EnrollmentAddEventPage/ProgramStageSelector/ProgramStageSelector.feature index fa7b797041..6bbb53cf33 100644 --- a/cypress/e2e/EnrollmentAddEventPage/ProgramStageSelector/ProgramStageSelector.feature +++ b/cypress/e2e/EnrollmentAddEventPage/ProgramStageSelector/ProgramStageSelector.feature @@ -8,3 +8,8 @@ Feature: User is able to select program stage when navigating to EnrollmentEvent Scenario: The stage-button should be disabled when non-repeatable & event > 0 Given you land on the EnrollmentEventNew-page without a stageId Then the stage-button should be disabled + + @user:trackerAutoTestRestricted + Scenario: The stage-button should be disabled when no data write access + Given you open the enrollment page by typing #enrollmentEventNew?enrollmentId=WKPoiZxZxNG&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&teiId=PgmUFEQYZdt + Then the stage-button should be disabled diff --git a/cypress/e2e/EnrollmentAddEventPage/ProgramStageSelector/ProgramStageSelector.js b/cypress/e2e/EnrollmentAddEventPage/ProgramStageSelector/ProgramStageSelector.js index 6c8eac1dac..4fb525e343 100644 --- a/cypress/e2e/EnrollmentAddEventPage/ProgramStageSelector/ProgramStageSelector.js +++ b/cypress/e2e/EnrollmentAddEventPage/ProgramStageSelector/ProgramStageSelector.js @@ -1,5 +1,9 @@ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'; +Given(/^you open the enrollment page by typing (.*)$/, url => + cy.visit(url), +); + Given('you land on the EnrollmentEventNew-page without a stageId', () => { cy.visit('/#/enrollmentEventNew?programId=IpHINAT79UW&orgUnitId=DiszpKrYNg8&teiId=x2kJgpb0XQC&enrollmentId=RiNIt1yJoge'); }); diff --git a/cypress/e2e/EnrollmentPage/EnrollmentQuickActions/EnrollmentQuickActions.feature b/cypress/e2e/EnrollmentPage/EnrollmentQuickActions/EnrollmentQuickActions.feature index c010914d88..ea20b12fea 100644 --- a/cypress/e2e/EnrollmentPage/EnrollmentQuickActions/EnrollmentQuickActions.feature +++ b/cypress/e2e/EnrollmentPage/EnrollmentQuickActions/EnrollmentQuickActions.feature @@ -13,3 +13,8 @@ Feature: User interacts with the quick actions-menu When you click the schedule event-button Then you should be navigated to the schedule tab + @user:trackerAutoTestRestricted + Scenario: The create new quick actions button should be disabled if no available stages + Given you open the enrollment page by typing #enrollment?enrollmentId=WKPoiZxZxNG&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&teiId=PgmUFEQYZdt + Then the quick action buttons should be disabled + diff --git a/cypress/e2e/EnrollmentPage/EnrollmentQuickActions/EnrollmentQuickActions.js b/cypress/e2e/EnrollmentPage/EnrollmentQuickActions/EnrollmentQuickActions.js index 23ff019cf3..a450af97d9 100644 --- a/cypress/e2e/EnrollmentPage/EnrollmentQuickActions/EnrollmentQuickActions.js +++ b/cypress/e2e/EnrollmentPage/EnrollmentQuickActions/EnrollmentQuickActions.js @@ -1,5 +1,9 @@ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'; +Given(/^you open the enrollment page by typing (.*)$/, url => + cy.visit(url), +); + Given('you are on an enrollment page with stage available', () => { cy.visit('/#/enrollment?programId=ur1Edk5Oe2n&orgUnitId=UgYg0YW7ZIh&teiId=zmgVvEZ91Kg&enrollmentId=xRnBV5aJDeF'); cy.get('[data-test="enrollment-page-content"]') @@ -31,3 +35,9 @@ Then('the buttons should be disabled', () => { .should('be.disabled'); }); }); + +Then('the quick action buttons should be disabled', () => { + cy.get('[data-test="quick-action-button-container"]') + .find('button') + .should('be.disabled'); +}); diff --git a/cypress/e2e/EnrollmentPage/StagesAndEventsWidget/StagesAndEventsWidget.feature b/cypress/e2e/EnrollmentPage/StagesAndEventsWidget/StagesAndEventsWidget.feature index e21de7e069..e76f9dac8a 100644 --- a/cypress/e2e/EnrollmentPage/StagesAndEventsWidget/StagesAndEventsWidget.feature +++ b/cypress/e2e/EnrollmentPage/StagesAndEventsWidget/StagesAndEventsWidget.feature @@ -1,5 +1,10 @@ Feature: User interacts with Stages and Events Widget + @user:trackerAutoTestRestricted + Scenario: Create new event button is disabled if no data write access + Given you open the enrollment page by typing #enrollment?enrollmentId=WKPoiZxZxNG&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&teiId=PgmUFEQYZdt + Then you should see the disabled button New Previous deliveries event + Scenario: User can view program stages Given you open the enrollment page Then the program stages should be displayed @@ -60,8 +65,8 @@ Feature: User interacts with Stages and Events Widget Given you open the enrollment page by typing #enrollment?programId=IpHINAT79UW&orgUnitId=UgYg0YW7ZIh&teiId=fhFQhO0xILJ&enrollmentId=gPDueU02tn8 Then you should see the disabled button New Birth event - # Waiting for pipline to update DB/DB update for 39 and 41 - @user:trackerAutoTestRestricted @v=38 @v=40 @v=42 + @user:trackerAutoTestRestricted Scenario: Program stage is hidden if no data read access And you open the enrollment page by typing #enrollment?enrollmentId=iNEq9d22Nyp&orgUnitId=DiszpKrYNg8&programId=WSGAb5XwJ3Y&teiId=k4ODejBytgv Then the Care at birth program stage should be hidden + diff --git a/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js b/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js index e88dae07c5..7ad8539f77 100644 --- a/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js +++ b/cypress/e2e/WidgetsForEnrollmentPages/WidgetEnrollment/index.js @@ -232,11 +232,17 @@ Then(/^the user successfully transfers the enrollment/, () => { cy.get('[data-test="widget-enrollment"]').within(() => { cy.get('[data-test="widget-enrollment-owner-orgunit"]') - .contains('Owned by Sierra Leone') + .contains('Owned by Njandama MCHP') .should('exist'); }); }); +Then(/^the user types in (.*)/, (orgunit) => { + cy.get('[data-test="widget-enrollment-transfer-modal"]').within(() => { + cy.get('[data-test="capture-ui-input"]').type(orgunit); + }); +}); + Given(/^the enrollment owner organisation unit is (.*)/, (orgunit) => { cy.get('[data-test="widget-enrollment"]').within(() => { cy.get('[data-test="widget-enrollment-owner-orgunit"]') diff --git a/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEnrollmentDashboard/WidgetsForEnrollmentDashboard.feature b/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEnrollmentDashboard/WidgetsForEnrollmentDashboard.feature index 724567d75d..ffd0a56c1c 100644 --- a/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEnrollmentDashboard/WidgetsForEnrollmentDashboard.feature +++ b/cypress/e2e/WidgetsForEnrollmentPages/WidgetsForEnrollmentDashboard/WidgetsForEnrollmentDashboard.feature @@ -26,7 +26,8 @@ Feature: The user interacts with the widgets on the enrollment dashboard And the user clicks on the transfer action And the user sees the transfer modal And the user sees the organisation unit tree - When the user clicks on the organisation unit with text: Sierra Leone + And the user types in Njandama MCHP + When the user clicks on the organisation unit with text: Njandama MCHP Then the user successfully transfers the enrollment # Scenarios linked to the enrollment dashboard diff --git a/cypress/e2e/WorkingLists/EventWorkingLists/EventWorkingListsUser/EventWorkingListsUser.js b/cypress/e2e/WorkingLists/EventWorkingLists/EventWorkingListsUser/EventWorkingListsUser.js index 51cb81153b..c5cb9fc63b 100644 --- a/cypress/e2e/WorkingLists/EventWorkingLists/EventWorkingListsUser/EventWorkingListsUser.js +++ b/cypress/e2e/WorkingLists/EventWorkingLists/EventWorkingListsUser/EventWorkingListsUser.js @@ -149,7 +149,8 @@ When('you open the column selector', () => { When('you select Household location and save from the column selector', () => { cy.get('aside[role="dialog"]') .contains('Household location') - .find('input') + .parents('tr') + .find('input[type="checkbox"]') .click(); cy.get('aside[role="dialog"]') diff --git a/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/TeiWorkingListsUser.feature b/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/TeiWorkingListsUser.feature index af604635ee..a80e857fcd 100644 --- a/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/TeiWorkingListsUser.feature +++ b/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/TeiWorkingListsUser.feature @@ -131,7 +131,6 @@ Then the new My custom list is created When you delete the name My custom list Then the My custom list is deleted -@v>=39 Scenario: The user can open and select a program stage filter Given you open the main page with Ngelehun and Malaria focus investigation context When you open the program stage filters from the more filters dropdown menu @@ -141,7 +140,6 @@ And you open the column selector And you select a data element columns and save from the column selector Then you see data elements specific filters and columns -@v>=39 Scenario: While in a program stage working list, the user can filter by both TEA and data elements Given you open the main page with Ngelehun, WHO RMNCH Tracker and First antenatal care visit context When you set the enrollment status filter to active @@ -154,7 +152,6 @@ And you set the WHOMCH Smoking filter to No And you apply the current filter Then the list should display 1 row of data -@v>=39 Scenario: While in a program stage working list, the user can sort by both TEA and data elements Given you open the main page with Ngelehun, WHO RMNCH Tracker and First antenatal care visit context And you set the first name filter to u @@ -166,7 +163,6 @@ When you click the WHOMCH Hemoglobin value column header Then the sort arrow should indicate descending order And the list should display data ordered descending by WHOMCH Hemoglobin -@v>=39 Scenario: The user can remove the program stage filter Given you open the main page with Ngelehun and WHO RMNCH Tracker context When you open the program stage filters from the more filters dropdown menu @@ -176,7 +172,6 @@ Then you see program stage working list events When you remove the program stage filter Then you don't see program stage working list events -@v>=39 Scenario: The user can filter the events by scheduledAt date Given you open the main page with Ngelehun and WHO RMNCH Tracker context When you open the program stage filters from the more filters dropdown menu @@ -189,20 +184,17 @@ And you select the events scheduled today And you apply the current filter Then you see the selected option in the scheduledAt filter -@v>=39 Scenario: The program stage working list configureation is kept when navigating Given you open the main page with Ngelehun and WHO RMNCH Tracker context and configure a program stage working list When you open an enrollment event from the working list And you go back using the browser button Then the program stage working list is loaded -@v>=39 Scenario: The program stage working list without a orgUnit selected redirects to a tracker event Given you open the main page with all accesible records in the WHO RMNCH Tracker context and configure a program stage working list When you open an enrollment event from the working list Then the tracker event URL contains the orgUnitId -@v>=39 Scenario: The user can open a program stage list without events Given you open the main page with Ngelehun and WHO RMNCH Tracker context and configure a program stage working list And you set the event visit date to Today diff --git a/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/TeiWorkingListsUser.js b/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/TeiWorkingListsUser.js index 5361178c6d..9026a15f3d 100644 --- a/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/TeiWorkingListsUser.js +++ b/cypress/e2e/WorkingLists/TeiWorkingLists/TeiWorkingListsUser/TeiWorkingListsUser.js @@ -254,7 +254,8 @@ When('you open the column selector', () => { When('you select the organisation unit and save from the column selector', () => { cy.get('aside[role="dialog"]') .contains('Organisation unit') - .find('input') + .parents('tr') + .find('input[type="checkbox"]') .click(); cy.get('aside[role="dialog"]') @@ -616,7 +617,8 @@ When('you select the Foci response program stage', () => { When('you select a data element columns and save from the column selector', () => { cy.get('aside[role="dialog"]') .contains('People included') - .find('input') + .parents('tr') + .find('input[type="checkbox"]') .click(); cy.get('aside[role="dialog"]') @@ -677,7 +679,8 @@ Then('you see scheduledAt filter', () => { When('you select a scheduledAt column and save from the column selector', () => { cy.get('aside[role="dialog"]') .contains('Appointment date') - .find('input') + .parents('tr') + .find('input[type="checkbox"]') .click(); cy.get('aside[role="dialog"]') diff --git a/d2.config.js b/d2.config.js index 300d6a336b..e909aff221 100644 --- a/d2.config.js +++ b/d2.config.js @@ -4,7 +4,7 @@ const config = { type: 'app', id: '92b75fd0-34cc-451c-942f-3dd0f283bcbd', - minDHIS2Version: '2.38', + minDHIS2Version: '2.39', coreApp: true, entryPoints: { diff --git a/i18n/ar.po b/i18n/ar.po index 7f2ddfb0a8..4bb4146a90 100644 --- a/i18n/ar.po +++ b/i18n/ar.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Viktor Varland , 2024\n" "Language-Team: Arabic (https://app.transifex.com/hisp-uio/teams/100509/ar/)\n" @@ -45,6 +45,9 @@ msgstr "" "الصفحة إذا كنت ترغب في استخدام هذه النسخة، ولكن اعلم أن هذا سيؤدي إلى إغلاق " "النسخ الأخرى." +msgid "More" +msgstr "مزيد" + msgid "View {{programName}} dashboard" msgstr "" @@ -199,7 +202,7 @@ msgid "Search for user" msgstr "البحث عن مستخدم" msgid "Notes" -msgstr "" +msgstr "الملاحظات" msgid "Basic info" msgstr "المعلومات الأساسية" @@ -375,17 +378,11 @@ msgstr "الشخص المسجل" msgid "validation failed" msgstr "فشل التحقق من الصحة" -msgid "Errors" -msgstr "اخطاء" - -msgid "Feedback" -msgstr "التغذية الراجعة" - -msgid "Indicators" -msgstr "المؤشرات" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "تحذيرات" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "توليد حدث جديد" @@ -497,18 +494,6 @@ msgstr "يحتوي على نص" msgid "Yes" msgstr "نعم" -msgid "mm/dd/yyyy" -msgstr "mm/dd/yyyy" - -msgid "Years" -msgstr "السنوات" - -msgid "Months" -msgstr "الأشهر" - -msgid "Days" -msgstr "‏‏الأيام" - msgid "Uploading file" msgstr "تحميل ملف" @@ -575,6 +560,9 @@ msgstr "الأعمدة التي سيتم عرضها في الجدول" msgid "Column" msgstr "العمود" +msgid "Visible" +msgstr "مرئي" + msgid "Update" msgstr "تحديث" @@ -782,12 +770,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -818,6 +800,11 @@ msgstr "المرحلة" msgid "Registered events" msgstr "الأحداث المسجلة" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -931,6 +918,18 @@ msgid "" "relationship" msgstr "ستؤدي مغادرة هذه الصفحة إلى تجاهل التحديدات التي أجريتها لعلاقة جديدة" +msgid "Errors" +msgstr "اخطاء" + +msgid "Feedback" +msgstr "التغذية الراجعة" + +msgid "Indicators" +msgstr "المؤشرات" + +msgid "Warnings" +msgstr "تحذيرات" + msgid "Show all events" msgstr "عرض جميع الأحداث" @@ -976,6 +975,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "جار التحميل" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "إحتمال وجود تكرار" @@ -1257,9 +1262,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "الملغية" @@ -1473,6 +1475,12 @@ msgstr "تاريخ التقرير" msgid "Please select a valid event" msgstr "" +msgid "You do not have access to create events in this stage" +msgstr "" + +msgid "This stage can only have one event" +msgstr "" + msgid "New {{ eventName }} event" msgstr "" @@ -1488,9 +1496,6 @@ msgstr "" msgid "Go to full {{ eventName }}" msgstr "" -msgid "This stage can only have one event" -msgstr "" - msgid "Events could not be retrieved. Please try again later." msgstr "" @@ -1512,6 +1517,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "تمت جدولته" + msgid "Changelog" msgstr "" @@ -1677,9 +1691,6 @@ msgstr "حدث خطأ. انظر السجل للحصول على التفاصيل" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "تمت جدولته" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/ar_IQ.po b/i18n/ar_IQ.po index 9b23f4d7f9..01af8b5790 100644 --- a/i18n/ar_IQ.po +++ b/i18n/ar_IQ.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: KRG HIS , 2024\n" "Language-Team: Arabic (Iraq) (https://app.transifex.com/hisp-uio/teams/100509/ar_IQ/)\n" @@ -42,6 +42,9 @@ msgstr "" "الصفحة إذا كنت ترغب في استخدام هذه النسخة، ولكن اعلم أن هذا سيؤدي إلى إغلاق " "النسخ الأخرى." +msgid "More" +msgstr "" + msgid "View {{programName}} dashboard" msgstr "" @@ -372,17 +375,11 @@ msgstr "الشخص المسجل" msgid "validation failed" msgstr "فشل التحقق من الصحة" -msgid "Errors" -msgstr "اخطاء" - -msgid "Feedback" -msgstr "التغذية الراجعة" - -msgid "Indicators" -msgstr "المؤشرات" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "تحذيرات" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "" @@ -572,6 +569,9 @@ msgstr "الأعمدة التي سيتم عرضها في الجدول" msgid "Column" msgstr "العمود" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "تحديث" @@ -779,12 +779,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -815,6 +809,11 @@ msgstr "" msgid "Registered events" msgstr "الأحداث المسجلة" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -928,6 +927,18 @@ msgid "" "relationship" msgstr "ستؤدي مغادرة هذه الصفحة إلى تجاهل التحديدات التي أجريتها لعلاقة جديدة" +msgid "Errors" +msgstr "اخطاء" + +msgid "Feedback" +msgstr "التغذية الراجعة" + +msgid "Indicators" +msgstr "المؤشرات" + +msgid "Warnings" +msgstr "تحذيرات" + msgid "Show all events" msgstr "عرض جميع الأحداث" @@ -973,6 +984,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "جار التحميل" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "إحتمال وجود تكرار" @@ -1252,9 +1269,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "تم الإلغاء" @@ -1507,6 +1521,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "تمت جدولته" + msgid "Changelog" msgstr "" @@ -1672,9 +1695,6 @@ msgstr "حدث خطأ. انظر السجل للحصول على التفاصيل" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "تمت جدولته" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/cs.po b/i18n/cs.po index bf8f3d02e7..9248d56299 100644 --- a/i18n/cs.po +++ b/i18n/cs.po @@ -1,14 +1,14 @@ # # Translators: # Philip Larsen Donnelly, 2024 -# Jiří Podhorecký, 2024 +# Jiří Podhorecký , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Jiří Podhorecký, 2024\n" +"Last-Translator: Jiří Podhorecký , 2024\n" "Language-Team: Czech (https://app.transifex.com/hisp-uio/teams/100509/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -43,6 +43,9 @@ msgstr "" "doméně). Chcete-li tuto verzi znovu použít, obnovte prosím tuto stránku, " "mějte však na paměti, že se tím zavřou další verze." +msgid "More" +msgstr "Více" + msgid "View {{programName}} dashboard" msgstr "Zobrazit {{programName}} ovládací panel" @@ -375,17 +378,11 @@ msgstr "Registrovaná osoba" msgid "validation failed" msgstr "ověření selhalo" -msgid "Errors" -msgstr "Chyby" - -msgid "Feedback" -msgstr "Zpětná vazba" - -msgid "Indicators" -msgstr "Indikátory" +msgid "No feedback for this event yet" +msgstr "Žádné ohlasy na tuto událost" -msgid "Warnings" -msgstr "Varování" +msgid "No indicator output for this event yet" +msgstr "Pro tuto událost zatím není k dispozici žádný výstupní indikátor" msgid "Generate new event" msgstr "Generovat novou událost" @@ -499,18 +496,6 @@ msgstr "Obsahuje text" msgid "Yes" msgstr "Ano" -msgid "mm/dd/yyyy" -msgstr "mm/dd/yyyy" - -msgid "Years" -msgstr "Let" - -msgid "Months" -msgstr "Měsíce" - -msgid "Days" -msgstr "Dnů" - msgid "Uploading file" msgstr "Nahrávání souboru" @@ -577,6 +562,9 @@ msgstr "Sloupce k zobrazení v tabulce" msgid "Column" msgstr "Sloupec" +msgid "Visible" +msgstr "Viditelné" + msgid "Update" msgstr "Aktualizovat" @@ -802,12 +790,6 @@ msgstr "Při načítání stránky došlo k chybě" msgid "Choose an organisation unit to start reporting" msgstr "Zvolte organizační jednotku pro zahájení vykazování" -msgid "No feedback for this event yet" -msgstr "Žádné ohlasy na tuto událost" - -msgid "No indicator output for this event yet" -msgstr "Pro tuto událost zatím není k dispozici žádný výstupní indikátor" - msgid "Program stage is invalid" msgstr "Fáze programu je neplatná" @@ -838,6 +820,11 @@ msgstr "Fáze" msgid "Registered events" msgstr "Registrované události" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "Vyberte prosím {{category}}." @@ -955,6 +942,18 @@ msgstr "" "Opuštěním této stránky zrušíte všechny výběry, které jste provedli pro nový " "vztah" +msgid "Errors" +msgstr "Chyby" + +msgid "Feedback" +msgstr "Zpětná vazba" + +msgid "Indicators" +msgstr "Indikátory" + +msgid "Warnings" +msgstr "Varování" + msgid "Show all events" msgstr "Zobrazit všechny události" @@ -998,6 +997,12 @@ msgstr "Nepodařilo se načíst metadata. Prosím zkuste to znovu později." msgid "The enrollment event data could not be found" msgstr "Data zápisu události nebyla nalezena" +msgid "Loading" +msgstr "načítání" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Byly nalezeny možné duplikáty" @@ -1518,6 +1523,12 @@ msgstr "Datum zprávy" msgid "Please select a valid event" msgstr "Vyberte prosím platnou událost" +msgid "You do not have access to create events in this stage" +msgstr "" + +msgid "This stage can only have one event" +msgstr "Tato fáze může mít pouze jednu událost" + msgid "New {{ eventName }} event" msgstr "Nová událost {{ eventName }}" @@ -1533,9 +1544,6 @@ msgstr "Resetovat seznam" msgid "Go to full {{ eventName }}" msgstr "Přejít na celou {{ eventName }}" -msgid "This stage can only have one event" -msgstr "Tato fáze může mít pouze jednu událost" - msgid "Events could not be retrieved. Please try again later." msgstr "Události se nepodařilo načíst. Prosím zkuste to znovu později." @@ -1555,6 +1563,15 @@ msgstr "{{ scheduledEvents }} naplánováno" msgid "Stages and Events" msgstr "Fáze a události" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Naplánováno" + msgid "Changelog" msgstr "Seznam změn" @@ -1720,9 +1737,6 @@ msgstr "Vyskytla se chyba. Podrobnosti najdete v protokolu" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "Naplánováno na {{ escape }} kvůli {{ time }}" -msgid "Scheduled" -msgstr "Naplánováno" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "Po termínu {{ escape }} kvůli {{ time }}" diff --git a/i18n/en.pot b/i18n/en.pot index 88b02cf519..15add62aed 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -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-08-08T11:49:13.423Z\n" -"PO-Revision-Date: 2024-08-08T11:49:13.423Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" +"PO-Revision-Date: 2024-08-10T10:42:21.141Z\n" msgid "Choose one or more dates..." msgstr "Choose one or more dates..." @@ -35,6 +35,9 @@ msgstr "" "(in the same domain). Please refresh this page if you would like to use " "this version again, but be aware that this will close other versions." +msgid "More" +msgstr "More" + msgid "View {{programName}} dashboard" msgstr "View {{programName}} dashboard" @@ -484,18 +487,6 @@ msgstr "Contains text" msgid "Yes" msgstr "Yes" -msgid "mm/dd/yyyy" -msgstr "mm/dd/yyyy" - -msgid "Years" -msgstr "Years" - -msgid "Months" -msgstr "Months" - -msgid "Days" -msgstr "Days" - msgid "Uploading file" msgstr "Uploading file" @@ -562,6 +553,9 @@ msgstr "Columns to show in table" msgid "Column" msgstr "Column" +msgid "Visible" +msgstr "Visible" + msgid "Update" msgstr "Update" @@ -992,6 +986,9 @@ msgstr "The enrollment event data could not be found" msgid "Loading" msgstr "Loading" +msgid "An error occurred while loading the form" +msgstr "An error occurred while loading the form" + msgid "Possible duplicates found" msgstr "Possible duplicates found" @@ -1499,6 +1496,12 @@ msgstr "Report date" msgid "Please select a valid event" msgstr "Please select a valid event" +msgid "You do not have access to create events in this stage" +msgstr "You do not have access to create events in this stage" + +msgid "This stage can only have one event" +msgstr "This stage can only have one event" + msgid "New {{ eventName }} event" msgstr "New {{ eventName }} event" @@ -1514,9 +1517,6 @@ msgstr "Reset list" msgid "Go to full {{ eventName }}" msgstr "Go to full {{ eventName }}" -msgid "This stage can only have one event" -msgstr "This stage can only have one event" - msgid "Events could not be retrieved. Please try again later." msgstr "Events could not be retrieved. Please try again later." @@ -1534,6 +1534,15 @@ msgstr "{{ scheduledEvents }} scheduled" msgid "Stages and Events" msgstr "Stages and Events" +msgid "An error occurred while loading the widget." +msgstr "An error occurred while loading the widget." + +msgid "View linked event" +msgstr "View linked event" + +msgid "Scheduled" +msgstr "Scheduled" + msgid "Changelog" msgstr "Changelog" @@ -1700,9 +1709,6 @@ msgstr "An error has occured. See log for details" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "Scheduled{{ escape }} due {{ time }}" -msgid "Scheduled" -msgstr "Scheduled" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "Overdue{{ escape }} due {{ time }}" diff --git a/i18n/es.po b/i18n/es.po index 1d4c9306c6..c876e8fa4f 100644 --- a/i18n/es.po +++ b/i18n/es.po @@ -11,15 +11,15 @@ # Philip Larsen Donnelly, 2024 # Gabriela Rodriguez , 2024 # Janeth Cruz, 2024 -# Viktor Varland , 2024 # Enzo Nicolas Rossi , 2024 +# Viktor Varland , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Enzo Nicolas Rossi , 2024\n" +"Last-Translator: Viktor Varland , 2024\n" "Language-Team: Spanish (https://app.transifex.com/hisp-uio/teams/100509/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -55,6 +55,9 @@ msgstr "" "desea utilizar esta versión nuevamente, pero tenga en cuenta que esto " "cerrará otras versiones." +msgid "More" +msgstr "Más" + msgid "View {{programName}} dashboard" msgstr "Ver panel de {{programName}}" @@ -392,17 +395,11 @@ msgstr "Persona registrada" msgid "validation failed" msgstr "Validación fallida" -msgid "Errors" -msgstr "Errores" - -msgid "Feedback" -msgstr "Retroalimentación" - -msgid "Indicators" -msgstr "Indicadores" +msgid "No feedback for this event yet" +msgstr "Aún no hay retroalimentación para este evento." -msgid "Warnings" -msgstr "Advertencias" +msgid "No indicator output for this event yet" +msgstr "Aún no hay resultados de indicador para este evento" msgid "Generate new event" msgstr "Generar nuevo evento" @@ -517,18 +514,6 @@ msgstr "Contiene texto" msgid "Yes" msgstr "Si" -msgid "mm/dd/yyyy" -msgstr "mm / dd / aaaa" - -msgid "Years" -msgstr "Años" - -msgid "Months" -msgstr "Meses" - -msgid "Days" -msgstr "Días" - msgid "Uploading file" msgstr "Subiendo archivo" @@ -595,6 +580,9 @@ msgstr "Columnas para mostrar en la tabla" msgid "Column" msgstr "Columna" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "Actualizar" @@ -826,12 +814,6 @@ msgstr "Hubo un error al cargar la página" msgid "Choose an organisation unit to start reporting" msgstr "Elija una unidad organizativa para empezar a informar" -msgid "No feedback for this event yet" -msgstr "Aún no hay retroalimentación para este evento." - -msgid "No indicator output for this event yet" -msgstr "Aún no hay resultados de indicador para este evento" - msgid "Program stage is invalid" msgstr "La etapa del programa no es válida" @@ -862,6 +844,11 @@ msgstr "Etapa" msgid "Registered events" msgstr "Eventos registrados" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "Seleccione {{category}}." @@ -981,6 +968,18 @@ msgstr "" "Al salir de esta página, se descartarán las selecciones que haya realizado " "para una nueva relación" +msgid "Errors" +msgstr "Errores" + +msgid "Feedback" +msgstr "Retroalimentación" + +msgid "Indicators" +msgstr "Indicadores" + +msgid "Warnings" +msgstr "Advertencias" + msgid "Show all events" msgstr "Mostrar todos los eventos" @@ -1024,6 +1023,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "No se pudieron encontrar los datos del evento de inscripción" +msgid "Loading" +msgstr "Cargando" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Posibles duplicados encontrados" @@ -1563,6 +1568,12 @@ msgstr "Fecha de reporte" msgid "Please select a valid event" msgstr "Seleccione un evento válido" +msgid "You do not have access to create events in this stage" +msgstr "" + +msgid "This stage can only have one event" +msgstr "Esta etapa solo puede tener un evento" + msgid "New {{ eventName }} event" msgstr "Nuevo evento {{ eventName }}" @@ -1578,9 +1589,6 @@ msgstr "Resetear lista" msgid "Go to full {{ eventName }}" msgstr "Ir a {{ eventName }} completado" -msgid "This stage can only have one event" -msgstr "Esta etapa solo puede tener un evento" - msgid "Events could not be retrieved. Please try again later." msgstr "" "No se pudieron recuperar los eventos. Por favor, inténtelo de nuevo más " @@ -1601,6 +1609,15 @@ msgstr "{{ scheduledEvents }} programado(s)" msgid "Stages and Events" msgstr "Etapas y eventos" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Planificado" + msgid "Changelog" msgstr "Registro de cambios" @@ -1774,9 +1791,6 @@ msgstr "Se ha producido un error. Ver registro para más detalles" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "Programado{{ escape }} para {{ time }}" -msgid "Scheduled" -msgstr "Planificado" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "Atrasado {{ escape }} para {{ time }}" diff --git a/i18n/fr.po b/i18n/fr.po index 1be940743a..cb371ad974 100644 --- a/i18n/fr.po +++ b/i18n/fr.po @@ -5,18 +5,18 @@ # Philip Larsen Donnelly, 2024 # Edem Kossi , 2024 # Gabriela Rodriguez , 2024 -# Yayra Gomado , 2024 # Yao Selom SAKA (HISP WCA) , 2024 # Elise Desailly, 2024 -# Viktor Varland , 2024 # Bram Piot , 2024 +# Viktor Varland , 2024 +# Yayra Gomado , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Bram Piot , 2024\n" +"Last-Translator: Yayra Gomado , 2024\n" "Language-Team: French (https://app.transifex.com/hisp-uio/teams/100509/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -53,6 +53,9 @@ msgstr "" "cette page si vous souhaitez utiliser à nouveau cette version, mais " "attention, cette opération entraînera la fermeture des autres versions." +msgid "More" +msgstr "Plus" + msgid "View {{programName}} dashboard" msgstr "" @@ -394,17 +397,11 @@ msgstr "Personne inscrite" msgid "validation failed" msgstr "validation échouée" -msgid "Errors" -msgstr "Erreurs" - -msgid "Feedback" -msgstr "Réaction" - -msgid "Indicators" -msgstr "Indicateurs" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "Avertissements" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "Générer un nouvel événement" @@ -516,18 +513,6 @@ msgstr "Contient le texte" msgid "Yes" msgstr "Oui" -msgid "mm/dd/yyyy" -msgstr "mm/jj/aaaa" - -msgid "Years" -msgstr "Années" - -msgid "Months" -msgstr "Mois" - -msgid "Days" -msgstr "Jours" - msgid "Uploading file" msgstr "Téléchargement du fichier" @@ -594,6 +579,9 @@ msgstr "Colonnes à afficher dans ce tableau" msgid "Column" msgstr "Colonne" +msgid "Visible" +msgstr "Visible" + msgid "Update" msgstr "Mettre à jour" @@ -814,12 +802,6 @@ msgstr "Une erreur s'est produite lors du chargement de la page" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "Le stade de programme n'est pas valide" @@ -850,6 +832,11 @@ msgstr "Etape" msgid "Registered events" msgstr "Événements enregistrés" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "Veuillez sélectionner {{category}}." @@ -967,6 +954,18 @@ msgid "" msgstr "" "En quittant cette page, vous ne pourrez plus choisir une nouvelle relation" +msgid "Errors" +msgstr "Erreurs" + +msgid "Feedback" +msgstr "Réaction" + +msgid "Indicators" +msgstr "Indicateurs" + +msgid "Warnings" +msgstr "Avertissements" + msgid "Show all events" msgstr "Afficher tous les événements" @@ -1009,6 +1008,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "Les données de l'événement d'inscription n'ont pas pu être trouvées" +msgid "Loading" +msgstr "Chargement" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Doublons éventuellement détectés" @@ -1531,6 +1536,12 @@ msgstr "Date du rapport" msgid "Please select a valid event" msgstr "Veuillez sélectionner un événement valide" +msgid "You do not have access to create events in this stage" +msgstr "" + +msgid "This stage can only have one event" +msgstr "Ce stade ne peut avoir qu'un seul événement" + msgid "New {{ eventName }} event" msgstr "Nouvel événement {{ eventName }}" @@ -1546,9 +1557,6 @@ msgstr "Réinitialiser la liste" msgid "Go to full {{ eventName }}" msgstr "Aller à l'intégralité de {{ eventName }}" -msgid "This stage can only have one event" -msgstr "Ce stade ne peut avoir qu'un seul événement" - msgid "Events could not be retrieved. Please try again later." msgstr "" "Les événements n'ont pas pu être récupérés. Veuillez réessayer plus tard." @@ -1568,6 +1576,15 @@ msgstr "{{ scheduledEvents }} programmé" msgid "Stages and Events" msgstr "Étapes et événements" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Programmé" + msgid "Changelog" msgstr "" @@ -1735,9 +1752,6 @@ msgstr "Une erreur s'est produite. Voir le journal pour plus de détails" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "Prorgrammés {{ escape }} dus {{ time }}" -msgid "Scheduled" -msgstr "Programmé" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "En retard {{ escape }} dû {{ time }}" diff --git a/i18n/id.po b/i18n/id.po index a9544e31f4..85a7841d2d 100644 --- a/i18n/id.po +++ b/i18n/id.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Viktor Varland , 2024\n" "Language-Team: Indonesian (https://app.transifex.com/hisp-uio/teams/100509/id/)\n" @@ -52,6 +52,9 @@ msgstr "" "menggunakan versi ini lagi, tetapi perlu diketahui bahwa ini akan menutup " "versi lain." +msgid "More" +msgstr "Lagi" + msgid "View {{programName}} dashboard" msgstr "" @@ -382,17 +385,11 @@ msgstr "Orang yang terdaftar" msgid "validation failed" msgstr "validasi gagal" -msgid "Errors" -msgstr "Kesalahan" - -msgid "Feedback" -msgstr "Umpan balik" - -msgid "Indicators" -msgstr "Indikator" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "Peringatan" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "Buat even baru" @@ -504,18 +501,6 @@ msgstr "Berisi teks" msgid "Yes" msgstr "Iya" -msgid "mm/dd/yyyy" -msgstr "mm/dd/yyyy" - -msgid "Years" -msgstr "Tahun" - -msgid "Months" -msgstr "Bulan" - -msgid "Days" -msgstr "Hari" - msgid "Uploading file" msgstr "Mengunggah file" @@ -582,6 +567,9 @@ msgstr "Kolom untuk ditampilkan di tabel" msgid "Column" msgstr "Kolom" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "Perbarui" @@ -794,12 +782,6 @@ msgstr "Telah terjadi sebuah kesalahan saat memuat halaman" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "Tahapan program tidak valid" @@ -830,6 +812,11 @@ msgstr "Stage" msgid "Registered events" msgstr "Even terdaftar" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -946,6 +933,18 @@ msgstr "" "Meninggalkan halaman ini akan membuang semua pilihan yang Anda buat untuk " "hubungan baru" +msgid "Errors" +msgstr "Kesalahan" + +msgid "Feedback" +msgstr "Umpan balik" + +msgid "Indicators" +msgstr "Indikator" + +msgid "Warnings" +msgstr "Peringatan" + msgid "Show all events" msgstr "Tampilkan semua even" @@ -986,6 +985,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "Loading" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Kemungkinan duplikat ditemukan" @@ -1476,6 +1481,12 @@ msgstr "Tanggal pelaporan" msgid "Please select a valid event" msgstr "" +msgid "You do not have access to create events in this stage" +msgstr "" + +msgid "This stage can only have one event" +msgstr "" + msgid "New {{ eventName }} event" msgstr "" @@ -1491,9 +1502,6 @@ msgstr "Mengatur ulang daftar" msgid "Go to full {{ eventName }}" msgstr "" -msgid "This stage can only have one event" -msgstr "" - msgid "Events could not be retrieved. Please try again later." msgstr "" @@ -1510,6 +1518,15 @@ msgstr "" msgid "Stages and Events" msgstr "Tahapan dan Even" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Terjadwal" + msgid "Changelog" msgstr "" @@ -1675,9 +1692,6 @@ msgstr "Terjadi kesalahan. Lihat log untuk detailnya" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "Terjadwal" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/km.po b/i18n/km.po index 62c6870fef..488cdcbe42 100644 --- a/i18n/km.po +++ b/i18n/km.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Viktor Varland , 2024\n" "Language-Team: Khmer (https://app.transifex.com/hisp-uio/teams/100509/km/)\n" @@ -38,6 +38,9 @@ msgid "" "again, but be aware that this will close other versions." msgstr "" +msgid "More" +msgstr "" + msgid "View {{programName}} dashboard" msgstr "" @@ -359,16 +362,10 @@ msgstr "" msgid "validation failed" msgstr "" -msgid "Errors" +msgid "No feedback for this event yet" msgstr "" -msgid "Feedback" -msgstr "មតិ​ឆ្លើយតប" - -msgid "Indicators" -msgstr "Indicators" - -msgid "Warnings" +msgid "No indicator output for this event yet" msgstr "" msgid "Generate new event" @@ -559,6 +556,9 @@ msgstr "" msgid "Column" msgstr "" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "ធ្វើ​បច្ចុប្បន្នភាព" @@ -766,12 +766,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -802,6 +796,11 @@ msgstr "" msgid "Registered events" msgstr "" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -915,6 +914,18 @@ msgid "" "relationship" msgstr "" +msgid "Errors" +msgstr "" + +msgid "Feedback" +msgstr "មតិ​ឆ្លើយតប" + +msgid "Indicators" +msgstr "Indicators" + +msgid "Warnings" +msgstr "" + msgid "Show all events" msgstr "" @@ -955,6 +966,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "Loading" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "" @@ -1234,9 +1251,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "បានលុបចោល" @@ -1474,6 +1488,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "" + msgid "Changelog" msgstr "" @@ -1639,9 +1662,6 @@ msgstr "" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/lo.po b/i18n/lo.po index db73eaf499..da0a57c457 100644 --- a/i18n/lo.po +++ b/i18n/lo.po @@ -3,16 +3,16 @@ # Philip Larsen Donnelly, 2022 # Saysamone Sibounma, 2023 # Somkhit Bouavong , 2024 -# Namwan Chanthavisouk, 2024 -# Viktor Varland , 2024 # Thuy Nguyen , 2024 +# Viktor Varland , 2024 +# Namwan Chanthavisouk, 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Thuy Nguyen , 2024\n" +"Last-Translator: Namwan Chanthavisouk, 2024\n" "Language-Team: Lao (https://app.transifex.com/hisp-uio/teams/100509/lo/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -33,6 +33,8 @@ msgid "" "A possible reason for this is that the browser or mode (e.g. privacy mode) " "is not supported. See log for details." msgstr "" +"ເຫດຜົນທີ່ເປັນໄປໄດ້ແມ່ນຍ້ອນບຣາວເຊີ ຫຼື ຮູບແບບ (ເຊັ່ນ: ຮູບແບບຄວາມເປັນສ່ວນຕົວ) " +"ບໍ່ໄດ້ຖືກຮອງຮັບ. ເບິ່ງລາຍລະອຽດເພີ່ມເຕີມ." msgid "" "You opened another version of the Capture App in the same domain. Currently," @@ -40,6 +42,13 @@ msgid "" " domain). Please refresh this page if you would like to use this version " "again, but be aware that this will close other versions." msgstr "" +"ທ່ານໄດ້ເປີດໃຊ້ເວີຊັນອື່ນຂອງແອັບ Capture ໃນໂດເມນດຽວກັນ. ໃນປັດຈຸບັນ, ແອັບ " +"Capture ພຽງແຕ່ຮອງຮັບການໃຊ້ງານໃນເວີຊັນດຽວກັນ (ໃນໂດເມນດຽວກັນ). " +"ກະ​ລຸ​ນາ​ໂຫຼດ​ຫນ້າ​ນີ້​ຄືນ​ໃຫມ່​ຖ້າ​ຫາກ​ວ່າ​ທ່ານ​ຕ້ອງ​ການ​ທີ່​ຈະ​ນໍາ​ໃຊ້​ເວີຊັນນີ້​ອີກ​ເທື່ອ​ຫນຶ່ງ​," +" ແຕ່​ລະວັງໄວ້ວ່າມັນຈະ​ປິດ​ເວີຊັນ​ອື່ນ​." + +msgid "More" +msgstr "ເພີ່ມເຕີມ" msgid "View {{programName}} dashboard" msgstr " ເບິ່ງ {{programName}} ກະດານຂ່າວ" @@ -81,10 +90,10 @@ msgid "This value is validating" msgstr "ຄ່ານີ້ກຳລັງກວດສອບຢູ່" msgid "Async field update failed" -msgstr "" +msgstr "ການອັບເດດຊ່ອງການເຊື່ອມຂໍ້ມູນແມ່ນລົ້ມເຫລວ" msgid "A value is required" -msgstr "" +msgstr "ຕ້ອງຕື່ມຄ່າ" msgid "Please provide a valid number" msgstr "ກະລຸນາລະບຸເບີໂທທີ່ຖືກຕ້ອງ" @@ -105,7 +114,7 @@ msgid "Please provide a valid date" msgstr "ກະລຸນາລະບຸວັນທີໃຫ້ຖືກຕ້ອງ" msgid "A date in the future is not allowed" -msgstr "" +msgstr "ບໍ່ອະນຸຍາດໃຫ້ຕື່ມວັນທີໃນອະນາຄົດ" msgid "Please provide a valid date and time" msgstr "ກະລຸນາລະບຸວັນທີ ແລະ ເວລາໃຫ້ຖືກຕ້ອງ" @@ -168,7 +177,7 @@ msgid "Please select {{categoryName}}" msgstr "ກະລຸນາເລືອກ {{categoryName}}" msgid "A future date is not allowed" -msgstr "" +msgstr "ບໍ່ອະນຸຍາດໃຫ້ມີວັນທີໃນອະນາຄົດ" msgid "Saving a new enrollment in {{programName}} in {{orgUnitName}}." msgstr "ບັນທຶກການລົງທະບຽນໃໝ່ໃນ {{programName}} ໃນ {{orgUnitName}} ." @@ -215,7 +224,7 @@ msgstr "ບັນທຶກໃສ່ {{programName}} ໃນ {{orgUnitName}}" msgid "" "This is not an event program or the metadata is corrupt. See log for " "details." -msgstr "" +msgstr "ນີ້ບໍ່ແມ່ນໂປແກຣມເຫດການ ຫຼື ຂໍ້ມູນເມຕາເສຍຫາຍ. ເບິ່ງລາຍລະອຽດເພີ່ມເຕີມ." msgid "This event" msgstr "ເຫດການນີ້" @@ -234,7 +243,7 @@ msgid "Completed" msgstr "ສໍາເລັດແລ້ວ" msgid "Please add or cancel note before saving the event" -msgstr "" +msgstr "ກະລຸນາເພີ່ມ ຫຼື ຍົກເລີກຂໍ້ຄວາມກ່ອນບັນທຶກເຫດການ" msgid "Save and add another" msgstr "ບັນທຶກ ແລະ ເພີ່ມອີກ" @@ -366,17 +375,11 @@ msgstr "ຄົນທີ່ລົງທະບຽນ" msgid "validation failed" msgstr "ການກວດສອບລົ້ມເຫຼວ" -msgid "Errors" -msgstr "ຜິດພາດ" - -msgid "Feedback" -msgstr "ຜົນຕອບຮັບ" - -msgid "Indicators" -msgstr "ຕົວຊີ້ວັດ" +msgid "No feedback for this event yet" +msgstr "ບໍ່ມີຄຳເຫັນຈາກເຫດການນີ້ເທື່ອ" -msgid "Warnings" -msgstr "ແຈ້ງເຕືອນ" +msgid "No indicator output for this event yet" +msgstr "ບໍ່ມີຕົວຊີ້ວັດຜົນໄດ້ຮັບສໍາລັບເຫດການນີ້ເທື່ອ" msgid "Generate new event" msgstr "ປ້ອນເຫດການໃໝ່" @@ -491,18 +494,6 @@ msgstr "ໃສ່ຂໍ້ຄວາມ" msgid "Yes" msgstr "ແມ່ນ" -msgid "mm/dd/yyyy" -msgstr "ເດືອນ/ວັນ/ປີ" - -msgid "Years" -msgstr "ປີ" - -msgid "Months" -msgstr "ເດືອນ" - -msgid "Days" -msgstr "ມື້" - msgid "Uploading file" msgstr "ກຳລັງອັບໂຫຼດເອກະສານ" @@ -569,6 +560,9 @@ msgstr "ຖັນທີ່ຈະສະແດງຢູ່ໃນຕາຕະລາ msgid "Column" msgstr "ຖັນ" +msgid "Visible" +msgstr "ສະແດງ" + msgid "Update" msgstr "ປັບປຸງ" @@ -609,7 +603,7 @@ msgid "Program doesn't exist" msgstr "ບໍ່ມີໂປແກຼມ" msgid "Selected program is invalid for selected organisation unit" -msgstr "" +msgstr "ໂປແກຣມທີ່ເລືອກໄວ້ບໍ່ຖືກຕ້ອງກັບຫົວໜ່ວຍອົງການຈັດຕັ້ງ" msgid "Online" msgstr "ມີການເຊື່ອມຕໍ່" @@ -624,13 +618,13 @@ msgid "Add note" msgstr "ຂຽນບັນທຶກລົງ" msgid "You don't have access to write notes" -msgstr "" +msgstr "ທ່ານບໍ່ໄດ້ຮັບອະນຸຍາດໃນການຂຽນຂໍ້ຄວາມ" msgid "Write note" -msgstr "" +msgstr "ຂຽນຂໍ້ຄວາມ" msgid "was blanked out and hidden by your last action" -msgstr "" +msgstr "ແມ່ນວ່າງເປົ່າ ແລະ ຖືກເຊື່ອງໄວ້ໂດຍການເຄື່ອນໄຫວລ່າສຸດຂອງທ່ານ" msgid "Notice" msgstr "ການແຈ້ງເຕືອນ" @@ -652,27 +646,36 @@ msgid "" "functionality in Capture is ongoing and will be added in upcoming app " "releases." msgstr "" +"ໂດຍການຄລິກເລືອກເຂົ້າທາງລຸ່ມນີ້, ທ່ານຈະເລີ່ມໃຊ້ກະດານຂ່າວລົງທະບຽນໃໝ່ໃນແອັບ " +"Capture ສຳລັບໂປແກຣມຕິດຕາມນີ້. ເຊິ່ງໃນປັດຈຸບັນໜ້າທີ່ຫຼັກຈາກການຕິດຕາມ Capture " +"ແມ່ນຍັງບໍ່ໄດ້ເພີ່ມເຂົ້າເທື່ອ, ລວມທັງເຊື່ອມໂຍງ ແລະ ການສົ່ງຕໍ່. " +"ການເຮັດວຽກກ່ຽວກັບໜ້າທີ່ຫຼັກຈາກການຕິດຕາມນີ້ໃນ Capture ແມ່ນກໍາລັງດໍາເນີນຢູ່ " +"ແລະ ຈະຖືກເພີ່ມເຂົ້າໃນແອັບໃໝ່." msgid "" "The core team appreciates any feedback on this new functionality which is " "currently being beta tested, please report any issues and feedback in the " "DHIS2 JIRA project." msgstr "" +"ທີມງານເຮົາຂໍຂອບໃຈສຳລັບຄໍາຕິຊົມກ່ຽວກັບຫນ້າທີ່ໃຫມ່ນີ້ທີ່ກໍາລັງຖືກທົດສອບຢູ່ໃນເບຕ້າ," +" ກະລຸນາລາຍງານບັນຫາ ແລະ ຄໍາຕິຊົມໃນໂຄງການ DHIS2 JIRA." msgid "" "Click the button below to opt-in to the new enrollment dashboard " "functionality in the Capture app (beta) for this Tracker program for all " "users." msgstr "" +"ຄລິກທີ່ປຸ່ມຂ້າງລຸ່ມເພື່ອເລືອກເຂົ້າໃຊ້ໜ້າທີ່ການລົງທະບຽນໃໝ່ຂອງກະດານຂ່າວໃນແອັບ " +"Capture (ເບຕ້າ) ສຳລັບໂປແກຣມການຕິດຕາມນີ້ສຳລັບຜູ້ໃຊ້ທັງໝົດ." msgid "Yes, opt in" -msgstr "" +msgstr "ຕົກລົງ, ເລືອກເຂົ້າ" msgid "Stop using new Enrollment dashboard for {{programName}}" msgstr "ຢຸດໃຊ້ກະດານຂ່າວການລົງທະບຽນໃໝ່ໃນ {{programName}}" msgid "Opt out for {{programName}}" -msgstr "" +msgstr "ເລືອກອອກສຳລັບ {{programName}}" msgid "Enrollment with id \"{{enrollmentId}}\" does not exist" msgstr "ລົງທະບຽນດ້ວຍໄອດີ \" {{enrollmentId}} \" ແມ່ນບໍ່ພົບ" @@ -707,10 +710,10 @@ msgid "Make referral" msgstr "ສ້າງເປັນໂຕອ້າງອີງ" msgid "No available program stages" -msgstr "" +msgstr "ບໍ່ພົບຂັ້ນໂປແກຣມ" msgid "Program stage not found" -msgstr "" +msgstr "ບໍ່ພົບຂັ້ນໂປແກຣມ" msgid "" "Choose a program to add new or see existing enrollments for " @@ -777,13 +780,7 @@ msgid "There was an error loading the page" msgstr "ພົບຂໍ້ຜິດພາດໃນການໂຫຼດໜ້ານີ້" msgid "Choose an organisation unit to start reporting" -msgstr "" - -msgid "No feedback for this event yet" -msgstr "ບໍ່ມີຄຳເຫັນຈາກເຫດການນີ້ເທື່ອ" - -msgid "No indicator output for this event yet" -msgstr "ບໍ່ມີຕົວຊີ້ວັດຜົນໄດ້ຮັບສໍາລັບເຫດການນີ້ເທື່ອ" +msgstr "ເລືອກຫົວໜ່ວຍການຈັດຕັ້ງເພື່ອເລີ່ມລາຍງານ" msgid "Program stage is invalid" msgstr "ຂັ້ນຕອນໂປແກຼມບໍ່ຖືກຕ້ອງ" @@ -815,6 +812,13 @@ msgstr "ຂັ້ນຕອນ" msgid "Registered events" msgstr "ເຫດການທີ່ໄດ້ລົງທະບຽນ" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" +"ຕົວເລືອກໃນໝວດໝູ່ບໍ່ຖືກຕ້ອງສຳລັບຫົວໜ່ວຍການຈັດຕັ້ງ. " +"ກະລຸນາເລືອກທີ່ອັນທີ່ຖືກຕ້ອງ." + msgid "Please select {{category}}." msgstr "ກະລຸນາເລືອກ {{category}} ." @@ -831,6 +835,8 @@ msgid "" "You don't have access to create a {{trackedEntityName}} in the current " "selections" msgstr "" +"ທ່ານບໍ່ໄດ້ຮັບອະນຸຍາດການເຂົ້າເຖິງເພື່ອສ້າງ {{trackedEntityName}} " +"ກັບຕົວເລືອກປັດຈຸບັນ" msgid "Choose the {{missingCategories}} to start reporting" msgstr "ເລືອກ {{missingCategories}} ເພື່ອເລີ່ມການລາຍງານ" @@ -918,7 +924,7 @@ msgid "Edit event" msgstr "ແກ້ໄຂເຫດການ" msgid "View changelog" -msgstr "" +msgstr "ເບິ່ງບັນທຶກການປ່ຽນແປງ" msgid "Event details" msgstr "ລາຍລະອຽດເຫດການ" @@ -928,6 +934,18 @@ msgid "" "relationship" msgstr "ການອອກຈາກໜ້ານີ້ແມ່ນຈະຖືກຍົກເລີກການເລືອກຕ່າງໆທີ່ທ່ານສ້າງຂຶ້ນ" +msgid "Errors" +msgstr "ຜິດພາດ" + +msgid "Feedback" +msgstr "ຜົນຕອບຮັບ" + +msgid "Indicators" +msgstr "ຕົວຊີ້ວັດ" + +msgid "Warnings" +msgstr "ແຈ້ງເຕືອນ" + msgid "Show all events" msgstr "ສະແດງເຫດການທັງໝົດ" @@ -968,6 +986,12 @@ msgstr "ບໍ່ສາມາດດຶງຂໍ້ມູນ metadata ໄດ້. msgid "The enrollment event data could not be found" msgstr "ບໍ່ພົບຂໍ້ມູນເຫດການການລົງທະບຽນ" +msgid "Loading" +msgstr "ກໍາລັງໂຫຼດ" + +msgid "An error occurred while loading the form" +msgstr "ພົບບັນຫາໃນລະຫວ່າງການໂຫຼດຟອມ" + msgid "Possible duplicates found" msgstr "ພົບການຊໍ້າກັນທີ່ເປັນໄປໄດ້" @@ -987,7 +1011,7 @@ msgid "No results found for " msgstr "ບໍ່ພົບຜົນໄດ້ຮັບ" msgid "Choose an organisation unit" -msgstr "" +msgstr "ເລືອກຫົວໜ່ວຍການຈັດຕັງ" msgid "Clear selection" msgstr "ລົບການເລືອກ" @@ -999,7 +1023,7 @@ msgid "Search for a program" msgstr "ຄົ້ນຫາໂປແກຼມ" msgid "Some programs are being filtered by the chosen organisation unit" -msgstr "" +msgstr "ບາງໂປແກຣມກໍາລັງຖືກກັ່ນຕອງໂດຍຫົວໜ່ວຍການຈັດຕັ້ງທີ່ເລືອກ" msgid "Show all programs" msgstr "ສະແດງໂປແກຼມທັງໝົດ" @@ -1085,11 +1109,12 @@ msgstr "ບັນ​ຊີ​ລາຍ​ຊື່​ທີ່​ບັນ​ທ msgid "Saved lists offer quick access to your most used views in a program." msgstr "" +"ບັນຊີລາຍຊື່ທີ່ບັນທຶກໄວ້ແມ່ນໃຊ້ສຳລັບການກວດເບິ່ງຄືນແບບເລັ່ງລັດສຳລັບຂໍ້ມູນທີ່ທ່ານເບິ່ງຫຼາຍທີ່ສຸດໃນໂປແກຣມ." msgid "" "There are no saved lists in this program yet, create one using the button " "below." -msgstr "" +msgstr "ບໍ່ມີລາຍຊື່ທີ່ບັນທຶກໄວ້ໃນໂປຣແກຣມນີ້ເທື່ອ, ກົດສ້າງໂດຍໃຊ້ປຸ່ມລຸ່ມນີ້." msgid "Create saved list" msgstr "ສ້າງບັນຊີລາຍຊື່ທີ່ບັນທຶກໄວ້" @@ -1104,7 +1129,7 @@ msgid "Search for a {{trackedEntityName}} in {{programName}}" msgstr "ຊອກຫາ {{trackedEntityName}} ໃນ {{programName}}" msgid "No tracked entity types available" -msgstr "" +msgstr "ບໍ່ມີປະເພດບາຍບຸກຄົນທີ່ສາມາດຕິດຕາມໄດ້" msgid "Assigned to" msgstr "ມອບໝາຍໃຫ້" @@ -1133,7 +1158,7 @@ msgstr "ເຫດຜົນໃນການກວດສອບການລົງທ msgid "" "Describe the reason you are checking for enrollments in this protected " "program" -msgstr "" +msgstr "ອະທິບາຍເຫດຜົນທີ່ທ່ານກໍາລັງກວດສອບການລົງທະບຽນໃນໂປແກຣມທີ່ຖືກປ້ອງກັນນີ້" msgid "Check for enrollments" msgstr "ກວດສອບການລົງທະບຽນ" @@ -1142,6 +1167,8 @@ msgid "" "You must provide a reason to check for enrollments in this protected " "program. All activity will be logged." msgstr "" +"ທ່ານຕ້ອງໃຫ້ເຫດຜົນໃນການກວດສອບການລົງທະບຽນໃນໂປແກຣມທີ່ຖືກປ້ອງກັນນີ້. " +"ການເຄື່ອນໄຫວທັງໝົດຈະຖືກບັນທຶກ." msgid "Enrollment actions" msgstr "ການປະຕິບັດການລົງທະບຽນ" @@ -1171,6 +1198,8 @@ msgid "" "Are you sure you want to delete this enrollment? This will permanently " "remove the current enrollment." msgstr "" +"ທ່ານແນ່ໃຈບໍ່ວ່າຕ້ອງການລົບການລົງທະບຽນນີ້? " +"ເຊິ່ງນີ້ຈະລົບບການລົງທະບຽນປັດຈຸບັນອອກຢ່າງຖາວອນ." msgid "Yes, delete enrollment." msgstr "ຕົກລົງ, ລົບການລົງທະບຽນ." @@ -1188,7 +1217,7 @@ msgid "An error occurred while transferring ownership" msgstr "ເກີດຄວາມຜິດພາດໃນຂະນະທີ່ໂອນສິດ" msgid "Existing dates for auto-generated events will not be updated." -msgstr "" +msgstr "ວັນທີທີ່ມີຢູ່ແລ້ວສໍາລັບເຫດການທີ່ສ້າງຂຶ້ນໂດຍອັດຕະໂນມັດຈະບໍ່ຖືກອັບເດດ." msgid "Latitude" msgstr "ເສັ້ນຂະໜານ" @@ -1203,7 +1232,7 @@ msgid "Coordinates" msgstr "ປະສານງານ" msgid "Delete polygon" -msgstr "" +msgstr "ລົບຮູບຫຼາຍຫຼ່ຽມ" msgid "Close without saving" msgstr "ປິດໂດຍບໍ່ບັນທຶກ" @@ -1241,7 +1270,7 @@ msgid "Incident date" msgstr "ວັນທີເດືອນປີທີ່ເຫດການເກີດຂື້ນ" msgid "Enrollment widget could not be loaded. Please try again later" -msgstr "" +msgstr "ບໍ່ສາມາດໂຫຼດລາຍການການລົງທະບຽນໄດ້. ກະລຸນາລອງໃໝ່ໃນພາຍຫຼັງ" msgid "Follow-up" msgstr "ຕິດຕາມ" @@ -1262,7 +1291,7 @@ msgid "Add area" msgstr "ເພີ່ມພື້ນທີ່" msgid "Please add or cancel the note before saving the event" -msgstr "" +msgstr "ກະລຸນາເພີ່ມ ຫຼື ຍົກເລີກຂໍ້ຄວາມກ່ອນບັນທຶກເຫດການ" msgid "organisation unit could not be retrieved. Please try again later." msgstr "ບໍ່ສາມາດດຶງຂໍ້ມູນຫົວໜ່ວຍອົງການຈັດຕັ້ງໄດ້. ກະລຸນາລອງໃໝ່ພາຍຫຼັງ." @@ -1274,13 +1303,13 @@ msgid "program or stage is invalid" msgstr "ໂປແກຼມ ຫຼື ຂັ້ນຕອນບໍ່ຖືກຕ້ອງ" msgid "Notes about this enrollment" -msgstr "" +msgstr "ຂໍ້ຄວາມກ່ຽວກັບການລົງທະບຽນນີ້" msgid "Write a note about this enrollment" -msgstr "" +msgstr "ຂຽນຂໍ້ຄວາມກ່ຽວກັບການລົງທະບຽນນີ້" msgid "This enrollment doesn't have any notes" -msgstr "" +msgstr "ບໍ່ມີຂໍ້ຄວາມໃນການລົງທະບຽນນີ້" msgid "Error" msgstr "ເກີດການຜິດພາດ" @@ -1289,7 +1318,7 @@ msgid "Warning" msgstr "ແຈ້ງເຕືອນ" msgid "stage not found in rules execution" -msgstr "" +msgstr "ບໍ່ພົບຂັ້ນຕອນໃນການປະຕິບັດກົດລະບຽບ" msgid "Delete event" msgstr "ລືບກໍລະນີອອກ" @@ -1310,13 +1339,13 @@ msgid "Back to all stages and events" msgstr "ກັບໄປທຸກຂັ້ນຕອນ ແລະ ເຫດການ" msgid "Notes about this event" -msgstr "" +msgstr "ຂໍ້ຄວາມກ່ຽວກັບເຫດການນີ້" msgid "Write a note about this event" -msgstr "" +msgstr "ຂຽນຂໍ້ຄວາມກ່ຽວກັບເຫດການນີ້" msgid "This event doesn't have any notes" -msgstr "" +msgstr "ບໍ່ມີຂໍຄວາມໃນເຫດການນີ້" msgid "Schedule date info" msgstr "ຂໍ້ມູນຕາຕະລາງວັນທີ" @@ -1356,10 +1385,10 @@ msgid "Schedule date / Due date" msgstr "ວັນທີຕາຕະລາງ / ວັນຄົບກໍານົດ" msgid "Event notes" -msgstr "" +msgstr "ຂໍ້ຄວາມຂອງເຫດການ" msgid "Write a note about this scheduled event" -msgstr "" +msgstr "ຂຽນຂໍ້ຄວາມກ່ຽວກັບເຫດການທີ່ໄດ້ກໍານົດໄວ້ນີ້" msgid "Save note" msgstr "ບັນທຶກ" @@ -1369,6 +1398,9 @@ msgid "" "information about this enrollment, use the Edit button in the in the " "Enrollment box on this dashboard" msgstr "" +"ປ່ຽນຂໍ້ມູນກ່ຽວກັບ {{trackedEntityName}} ນີ້. " +"ເພື່ອປ່ຽນຂໍ້ມູນກ່ຽວກັບການລົງທະບຽນນີ້, " +"ໃຫ້ໃຊ້ປຸ່ມແກ້ໄຂໃນປ່ອງການລົງທະບຽນຢູ່ໃນກະດານຂ່າວ" msgid " Loading..." msgstr "ກຳລັງໂຫຼດ..." @@ -1405,6 +1437,9 @@ msgid "" "permanently remove the {{trackedEntityTypeName}} and all its associated " "enrollments and events in all programs." msgstr "" +"ທ່ານແນ່ໃຈບໍ່ວ່າຕ້ອງການລົບ {{trackedEntityTypeName}} ນີ້? ນີ້ຈະເປັນການລົບ " +"{{trackedEntityTypeName}} ແລະ ການລົງທະບຽນ ແລະ " +"ເຫດການທີ່ກ່ຽວຂ້ອງທັງໝົດອອກຢ່າງຖາວອນໃນທຸກໂປແກຣມ." msgid "There was a problem deleting the {{trackedEntityTypeName}}" msgstr "ມີບັນຫາໃນການລຶບ {{trackedEntityTypeName}}" @@ -1413,13 +1448,13 @@ msgid "Yes, delete {{trackedEntityTypeName}}" msgstr "ຕົກລົງ, ລຶບ {{trackedEntityTypeName}}" msgid "Profile widget could not be loaded. Please try again later" -msgstr "" +msgstr "ບໍ່ສາມາດໂຫຼດລາຍການຂໍ້ມູນສ່ວນຕົວໄດ້. ກະລຸນາລອງໃໝ່ໃນພາຍຫຼັງ" msgid "{{trackedEntityTypeName}} profile" msgstr "{{trackedEntityTypeName}} ລາຍລະອຽດສ່ວນຕົວ" msgid "tracked entity instance" -msgstr "" +msgstr "ຕິດຕາມຕົວຢ່າງລາຍບຸກຄົນ" msgid "Link to an existing {{linkableStageLabel}}" msgstr "ເຊື່ອມຫາ {{linkableStageLabel}} ທີ່ມີຢູ່ແລ້ວ" @@ -1428,13 +1463,13 @@ msgid "Choose a {{linkableStageLabel}}" msgstr "ເລືອກ {{linkableStageLabel}}" msgid "{{ linkableStageLabel }} is not repeatable" -msgstr "" +msgstr "{{ linkableStageLabel }} ແມ່ນບໍ່ສາມາດເຮັດຊ້ຳໄດ້" msgid "{{ linkableStageLabel }} has no linkable events" -msgstr "" +msgstr "{{ linkableStageLabel }} ບໍ່ມີເຫດການທີ່ສາມາດເຊື່ອມໂຍງໄດ້" msgid "Ambiguous relationships, contact system administrator" -msgstr "" +msgstr "ການເຊື່ອມໂຍງບໍ່ຊັດເຈນ, ຕິດຕໍ່ຜູ້ດູແລລະບົບ" msgid "" "Enter {{linkableStageLabel}} details in the next step after completing this " @@ -1458,6 +1493,12 @@ msgstr "ວັນທີລາຍງານ" msgid "Please select a valid event" msgstr "ກະລຸນາເລືອກເຫດການທີ່ຖືກຕ້ອງ" +msgid "You do not have access to create events in this stage" +msgstr "" + +msgid "This stage can only have one event" +msgstr "ຂັ້ນຕອນນີ້ສາມາດມີເຫດການດຽວເທົ່ານັ້ນ" + msgid "New {{ eventName }} event" msgstr "ເຫດການໃໝ່ {{ eventName }}" @@ -1468,13 +1509,10 @@ msgid "Show {{ rest }} more" msgstr "ສະແດງ {{ rest }} ເພີ່ມເຕີມ" msgid "Reset list" -msgstr "" +msgstr "ເຮັດລາຍຊື່ຄືນໃໝ່" msgid "Go to full {{ eventName }}" -msgstr "" - -msgid "This stage can only have one event" -msgstr "ຂັ້ນຕອນນີ້ສາມາດມີເຫດການດຽວເທົ່ານັ້ນ" +msgstr "ໄປທີ່ {{ eventName }} ແບບເຕັມ" msgid "Events could not be retrieved. Please try again later." msgstr "ບໍ່ສາມາດດຶງຂໍ້ມູນເຫດການໄດ້. ກະລຸນາລອງໃໝ່ໃນພາຍຫຼັງ." @@ -1492,8 +1530,17 @@ msgstr "{{ scheduledEvents }} ກຳນົດເວລາ" msgid "Stages and Events" msgstr "ຂັ້ນຕອນ ແລະ ເຫດການ" +msgid "An error occurred while loading the widget." +msgstr "ເກີດຄວາມຜິດພາດຂຶ້ນໃນຂະນະທີ່ໂຫຼດລາຍການ." + +msgid "View linked event" +msgstr "ເບິ່ງເຫດການທີ່ເຊື່ອມໂຍງ" + +msgid "Scheduled" +msgstr "ຕາມເວລາທີ່ກໍານົດ" + msgid "Changelog" -msgstr "" +msgstr "ບັນທຶກການປ່ຽນແປງ" msgid "No changes to display" msgstr "ບໍ່ມີການປ່ຽນແປງທີ່ຈະສະແດງ" @@ -1606,43 +1653,43 @@ msgid "Working list could not be updated" msgstr "ລາຍຊື່ເຮັດວຽກບໍ່ສາມາດອັບເດດໄດ້" msgid "an error occurred loading the working lists" -msgstr "" +msgstr "ເກີດຄວາມຜິດພາດໃນການໂຫຼດລາຍການວຽກ" msgid "an error occurred loading Tracked entity instance lists" -msgstr "" +msgstr "ເກີດຄວາມຜິດພາດໃນການໂຫຼດລາຍການຕົວຢ່າງການຕິດຕາມລາຍບຸກຄົນ" msgid "Update view" -msgstr "" +msgstr "ອັບເດດມຸມມອງ" msgid "Save current view..." -msgstr "" +msgstr "ບັນທຶກມຸມມອງປັດຈຸບັນ..." msgid "Save current view as..." -msgstr "" +msgstr "ບັນທຶກມຸມມອງປັດຈຸບັນເປັນ..." msgid "Delete view" -msgstr "" +msgstr "ລົບມຸມມອງ" msgid "Share view..." -msgstr "" +msgstr "ແບ່ງປັນມຸມມອງ..." msgid "Do you really want to delete the '{{templateName}}' view?" -msgstr "" +msgstr "ທ່ານຕ້ອງການລົບມຸມມອງ '{{templateName}}' ແທ້ບໍ່?" msgid "Confirm" msgstr "Confirm" msgid "Save As view" -msgstr "" +msgstr "ບັນທຶກເປັນເບິ່ງ" msgid "View name" -msgstr "" +msgstr "ເບິ່ງຊື່" msgid "Show Less" -msgstr "" +msgstr "ສະແດງໜ້ອຍ" msgid "Show All" -msgstr "" +msgstr "ສະແດງທັງໝົດ" msgid "Download as JSON" msgstr "Download as JSON" @@ -1651,7 +1698,7 @@ msgid "Download as CSV" msgstr "ດາວໂຫຼດເປັນ CSV" msgid "Download with current filters" -msgstr "" +msgstr "ດາວໂຫຼດດ້ວຍຕົວກອງປັດຈຸບັນ" msgid "An error has occured. See log for details" msgstr "" @@ -1659,9 +1706,6 @@ msgstr "" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "ຕາມເວລາທີ່ກໍານົດ" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/my.po b/i18n/my.po index 2485fda6e3..c244ccbdf3 100644 --- a/i18n/my.po +++ b/i18n/my.po @@ -1,16 +1,16 @@ # # Translators: -# Viktor Varland , 2021 # Wanda , 2021 # Philip Larsen Donnelly, 2024 # Aung Kyi Min , 2024 +# Viktor Varland , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Aung Kyi Min , 2024\n" +"Last-Translator: Viktor Varland , 2024\n" "Language-Team: Burmese (https://app.transifex.com/hisp-uio/teams/100509/my/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -39,6 +39,9 @@ msgid "" "again, but be aware that this will close other versions." msgstr "" +msgid "More" +msgstr "" + msgid "View {{programName}} dashboard" msgstr "" @@ -360,16 +363,10 @@ msgstr "" msgid "validation failed" msgstr "" -msgid "Errors" +msgid "No feedback for this event yet" msgstr "" -msgid "Feedback" -msgstr "အကြောင်းပြန်ကြားချက်" - -msgid "Indicators" -msgstr "အညွှန်းများ" - -msgid "Warnings" +msgid "No indicator output for this event yet" msgstr "" msgid "Generate new event" @@ -560,6 +557,9 @@ msgstr "" msgid "Column" msgstr "" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "‌နောက်ဆုံးသတင်းကိုရစေခြင်း" @@ -767,12 +767,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -803,6 +797,11 @@ msgstr "" msgid "Registered events" msgstr "" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -916,6 +915,18 @@ msgid "" "relationship" msgstr "" +msgid "Errors" +msgstr "" + +msgid "Feedback" +msgstr "အကြောင်းပြန်ကြားချက်" + +msgid "Indicators" +msgstr "အညွှန်းများ" + +msgid "Warnings" +msgstr "" + msgid "Show all events" msgstr "" @@ -956,6 +967,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "Loading, please wait" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "" @@ -1235,9 +1252,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "" @@ -1475,6 +1489,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "" + msgid "Changelog" msgstr "" @@ -1640,9 +1663,6 @@ msgstr "" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/nb.po b/i18n/nb.po index 3fc0ac3121..9577fef16d 100644 --- a/i18n/nb.po +++ b/i18n/nb.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Caroline Hesthagen Holen , 2024\n" "Language-Team: Norwegian Bokmål (https://app.transifex.com/hisp-uio/teams/100509/nb/)\n" @@ -43,6 +43,9 @@ msgstr "" "denne siden hvis du vil bruke denne versjonen igjen, men vær oppmerksom på " "at dette vil lukke andre versjoner." +msgid "More" +msgstr "Mer" + msgid "View {{programName}} dashboard" msgstr "Vis {{programName}} dashbord" @@ -374,17 +377,11 @@ msgstr "Registrert person" msgid "validation failed" msgstr "validering mislyktes" -msgid "Errors" -msgstr "Feil" - -msgid "Feedback" -msgstr "Tilbakemelding" - -msgid "Indicators" -msgstr "Indikatorer" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "Advarsler" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "Generer en ny hendelse" @@ -577,6 +574,9 @@ msgstr "Kolonner som skal vises i tabellen" msgid "Column" msgstr "Kolonne" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "Oppdater" @@ -804,12 +804,6 @@ msgstr "Det oppsto en feil under lasting av siden" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "Programfase er ugyldig" @@ -840,6 +834,11 @@ msgstr "Fase" msgid "Registered events" msgstr "Registrerte hendelser" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "Velg {{category}}." @@ -956,6 +955,18 @@ msgstr "" "Hvis du forlater denne siden, vil valgene du har satt bli forkastet for " "denne relasjonen" +msgid "Errors" +msgstr "Feil" + +msgid "Feedback" +msgstr "Tilbakemelding" + +msgid "Indicators" +msgstr "Indikatorer" + +msgid "Warnings" +msgstr "Advarsler" + msgid "Show all events" msgstr "Vis alle hendelser" @@ -997,6 +1008,12 @@ msgstr "Kunne ikke hente metadata. Prøv igjen senere." msgid "The enrollment event data could not be found" msgstr "Hendelsessdataene ble ikke funnet" +msgid "Loading" +msgstr "Laster" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Mulige duplikater funnet" @@ -1540,6 +1557,15 @@ msgstr "{{ scheduledEvents }} planlagt" msgid "Stages and Events" msgstr "Faser og hendelser" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Planlagt" + msgid "Changelog" msgstr "" @@ -1705,9 +1731,6 @@ msgstr "Det har oppstått en feil. Se logg for detaljer" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "Planlagt{{ escape }} forfaller {{ time }}" -msgid "Scheduled" -msgstr "Planlagt" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "Forfalt {{ escape }} forfalt {{ time }}" diff --git a/i18n/nl.po b/i18n/nl.po index 23b1bd9508..1af9d52450 100644 --- a/i18n/nl.po +++ b/i18n/nl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Charel van den Elsen, 2024\n" "Language-Team: Dutch (https://app.transifex.com/hisp-uio/teams/100509/nl/)\n" @@ -47,6 +47,9 @@ msgstr "" "gebruiken, maar houd er rekening mee dat hierdoor andere versies worden " "gesloten." +msgid "More" +msgstr "Meer" + msgid "View {{programName}} dashboard" msgstr "Bekijk het {{programName}}-dashboard" @@ -384,17 +387,11 @@ msgstr "Geregistreerde persoon" msgid "validation failed" msgstr "validatie mislukt" -msgid "Errors" -msgstr "Fouten" - -msgid "Feedback" -msgstr "Feedback" - -msgid "Indicators" -msgstr "Indicatoren" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "Waarschuwingen" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "Nieuw evenement genereren" @@ -506,18 +503,6 @@ msgstr "Bevat tekst" msgid "Yes" msgstr "Ja" -msgid "mm/dd/yyyy" -msgstr "mm/dd/jjjj" - -msgid "Years" -msgstr "Jaren" - -msgid "Months" -msgstr "Maanden" - -msgid "Days" -msgstr "Dagen" - msgid "Uploading file" msgstr "Bestand uploaden" @@ -584,6 +569,9 @@ msgstr "Kolommen om in tabel weer te geven" msgid "Column" msgstr "Kolom" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "Bijwerken" @@ -817,12 +805,6 @@ msgstr "Er is een fout opgetreden bij het laden van de pagina" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "Programmafase is ongeldig" @@ -853,6 +835,11 @@ msgstr "Stadium" msgid "Registered events" msgstr "Geregistreerde evenementen" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "Selecteer {{category}}." @@ -971,6 +958,18 @@ msgstr "" "Als u deze pagina verlaat, worden alle selecties die u voor een nieuwe " "relatie hebt gemaakt, verwijderd" +msgid "Errors" +msgstr "Fouten" + +msgid "Feedback" +msgstr "Feedback" + +msgid "Indicators" +msgstr "Indicatoren" + +msgid "Warnings" +msgstr "Waarschuwingen" + msgid "Show all events" msgstr "Toon alle evenementen" @@ -1013,6 +1012,12 @@ msgid "The enrollment event data could not be found" msgstr "" "De gegevens van de inschrijvingsgebeurtenis konden niet worden gevonden" +msgid "Loading" +msgstr "" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Mogelijke duplicaten gevonden" @@ -1531,6 +1536,12 @@ msgstr "Rapporteer datum" msgid "Please select a valid event" msgstr "" +msgid "You do not have access to create events in this stage" +msgstr "" + +msgid "This stage can only have one event" +msgstr "Deze fase kan maar één evenement hebben" + msgid "New {{ eventName }} event" msgstr "Nieuwe {{ eventName }} evenement" @@ -1546,9 +1557,6 @@ msgstr "Lijst resetten" msgid "Go to full {{ eventName }}" msgstr "Ga naar volledige {{ eventName }}" -msgid "This stage can only have one event" -msgstr "Deze fase kan maar één evenement hebben" - msgid "Events could not be retrieved. Please try again later." msgstr "" "Gebeurtenissen kunnen niet worden opgehaald. Probeer het later opnieuw." @@ -1567,6 +1575,15 @@ msgstr "{{ scheduledEvents }} gepland" msgid "Stages and Events" msgstr "stadiums en evenementen" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Gepland" + msgid "Changelog" msgstr "" @@ -1734,9 +1751,6 @@ msgstr "Er is een fout opgetreden. Zie logboek voor details" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "Gepland{{ escape }} vanwege {{ time }}" -msgid "Scheduled" -msgstr "Gepland" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "Te laat{{ escape }} vanwege {{ time }}" diff --git a/i18n/prs.po b/i18n/prs.po index f545274b0f..14e21b32d3 100644 --- a/i18n/prs.po +++ b/i18n/prs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Philip Larsen Donnelly, 2024\n" "Language-Team: Persian (Afghanistan) (https://app.transifex.com/hisp-uio/teams/100509/fa_AF/)\n" @@ -36,6 +36,9 @@ msgid "" "again, but be aware that this will close other versions." msgstr "" +msgid "More" +msgstr "بیشتر" + msgid "View {{programName}} dashboard" msgstr "" @@ -358,16 +361,10 @@ msgstr "" msgid "validation failed" msgstr "" -msgid "Errors" -msgstr "خطاها" - -msgid "Feedback" -msgstr "نظرات/فیدبک" - -msgid "Indicators" -msgstr "شاخص ها" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" +msgid "No indicator output for this event yet" msgstr "" msgid "Generate new event" @@ -558,6 +555,9 @@ msgstr "" msgid "Column" msgstr "ستون" +msgid "Visible" +msgstr "قابل نمایش" + msgid "Update" msgstr "تجدید" @@ -765,12 +765,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -801,6 +795,11 @@ msgstr "مرحله" msgid "Registered events" msgstr "رویداد های ثبت شده" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -914,6 +913,18 @@ msgid "" "relationship" msgstr "" +msgid "Errors" +msgstr "خطاها" + +msgid "Feedback" +msgstr "نظرات/فیدبک" + +msgid "Indicators" +msgstr "شاخص ها" + +msgid "Warnings" +msgstr "" + msgid "Show all events" msgstr "" @@ -955,6 +966,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "در حال بار کردن" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "" @@ -1234,9 +1251,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "" @@ -1477,6 +1491,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "زمان بندی شده" + msgid "Changelog" msgstr "" @@ -1642,9 +1665,6 @@ msgstr "" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "زمان بندی شده" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/ps.po b/i18n/ps.po index 834ff06e58..419cc4b400 100644 --- a/i18n/ps.po +++ b/i18n/ps.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Viktor Varland , 2024\n" "Language-Team: Pashto (https://app.transifex.com/hisp-uio/teams/100509/ps/)\n" @@ -37,6 +37,9 @@ msgid "" "again, but be aware that this will close other versions." msgstr "" +msgid "More" +msgstr "نور" + msgid "View {{programName}} dashboard" msgstr "" @@ -359,16 +362,10 @@ msgstr "" msgid "validation failed" msgstr "" -msgid "Errors" -msgstr "تېروتنې" - -msgid "Feedback" -msgstr "د فیډبک یا نظر ورکول" - -msgid "Indicators" -msgstr "شاخصونه" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" +msgid "No indicator output for this event yet" msgstr "" msgid "Generate new event" @@ -559,6 +556,9 @@ msgstr "" msgid "Column" msgstr "ستون" +msgid "Visible" +msgstr "د لیدو وړ دی" + msgid "Update" msgstr "تجدید یا نوي یې کړئ" @@ -766,12 +766,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -802,6 +796,11 @@ msgstr "پړاو" msgid "Registered events" msgstr "ثبت شوې پېښې" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -915,6 +914,18 @@ msgid "" "relationship" msgstr "" +msgid "Errors" +msgstr "تېروتنې" + +msgid "Feedback" +msgstr "د فیډبک یا نظر ورکول" + +msgid "Indicators" +msgstr "شاخصونه" + +msgid "Warnings" +msgstr "" + msgid "Show all events" msgstr "" @@ -956,6 +967,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "د پورته کېدو یا لوډینګ په حال کې" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "" @@ -1235,9 +1252,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "لغوه شوی" @@ -1478,6 +1492,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "پروګرام شوی" + msgid "Changelog" msgstr "" @@ -1643,9 +1666,6 @@ msgstr "" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "پروګرام شوی" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/pt.po b/i18n/pt.po index 774ffce63f..81fb7ab3b9 100644 --- a/i18n/pt.po +++ b/i18n/pt.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Viktor Varland , 2024\n" "Language-Team: Portuguese (https://app.transifex.com/hisp-uio/teams/100509/pt/)\n" @@ -48,6 +48,9 @@ msgstr "" "(no mesmo domínio). Actualize esta página se desejar usar esta versão " "novamente, mas esteja ciente de que isso fechará outras versões." +msgid "More" +msgstr "Mais" + msgid "View {{programName}} dashboard" msgstr "Veja o painel do {{programName}}" @@ -383,17 +386,11 @@ msgstr "Pessoa registrada" msgid "validation failed" msgstr "falha na validação" -msgid "Errors" -msgstr "Erros" - -msgid "Feedback" -msgstr "Comentários" - -msgid "Indicators" -msgstr "Indicadores" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "Avisos" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "Gerar novo evento" @@ -586,6 +583,9 @@ msgstr "Colunas para mostrar na tabela" msgid "Column" msgstr "Coluna" +msgid "Visible" +msgstr "Visível" + msgid "Update" msgstr "Atualizar" @@ -813,12 +813,6 @@ msgstr "Ocorreu um erro ao carregar a página" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "O estagio do programa é inválida" @@ -849,6 +843,11 @@ msgstr "Estagio" msgid "Registered events" msgstr "Eventos registrados" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "Selecione {{category}}." @@ -966,6 +965,18 @@ msgstr "" "Sair desta página descartará todas as seleções feitas para um novo " "relacionamento" +msgid "Errors" +msgstr "Erros" + +msgid "Feedback" +msgstr "Comentários" + +msgid "Indicators" +msgstr "Indicadores" + +msgid "Warnings" +msgstr "Avisos" + msgid "Show all events" msgstr "Mostrar todos os eventos" @@ -1008,6 +1019,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "Os dados do evento de inscrição não foram encontrados" +msgid "Loading" +msgstr "Carregando.." + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Possíveis duplicatas encontradas" @@ -1565,6 +1582,15 @@ msgstr "{{ scheduledEvents }} agendado" msgid "Stages and Events" msgstr "Fases e Eventos" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Agendado" + msgid "Changelog" msgstr "" @@ -1731,9 +1757,6 @@ msgstr "Ocorreu um erro. Veja o log para detalhes" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "Programado para {{ escape }} com prazo para {{ time }}" -msgid "Scheduled" -msgstr "Agendado" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "Vencido {{ escape }} devido {{ time }}" diff --git a/i18n/pt_BR.po b/i18n/pt_BR.po index e9e5f01f49..59779dc49f 100644 --- a/i18n/pt_BR.po +++ b/i18n/pt_BR.po @@ -2,15 +2,15 @@ # Translators: # Oscar Mesones Lapouble , 2021 # Philip Larsen Donnelly, 2024 -# Viktor Varland , 2024 # Thiago Rocha, 2024 +# Viktor Varland , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Thiago Rocha, 2024\n" +"Last-Translator: Viktor Varland , 2024\n" "Language-Team: Portuguese (Brazil) (https://app.transifex.com/hisp-uio/teams/100509/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -39,6 +39,9 @@ msgid "" "again, but be aware that this will close other versions." msgstr "" +msgid "More" +msgstr "Mais" + msgid "View {{programName}} dashboard" msgstr "" @@ -362,16 +365,10 @@ msgstr "" msgid "validation failed" msgstr "" -msgid "Errors" -msgstr "Erros" - -msgid "Feedback" -msgstr "Retroinformacão" - -msgid "Indicators" -msgstr "Indicadores" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" +msgid "No indicator output for this event yet" msgstr "" msgid "Generate new event" @@ -562,6 +559,9 @@ msgstr "" msgid "Column" msgstr "Coluna" +msgid "Visible" +msgstr "Visível" + msgid "Update" msgstr "Actualizar" @@ -769,12 +769,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -805,6 +799,11 @@ msgstr "" msgid "Registered events" msgstr "" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -918,6 +917,18 @@ msgid "" "relationship" msgstr "" +msgid "Errors" +msgstr "Erros" + +msgid "Feedback" +msgstr "Retroinformacão" + +msgid "Indicators" +msgstr "Indicadores" + +msgid "Warnings" +msgstr "" + msgid "Show all events" msgstr "" @@ -960,6 +971,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "Carregando.." + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "" @@ -1239,9 +1256,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "Cancelado" @@ -1485,6 +1499,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Agendado" + msgid "Changelog" msgstr "" @@ -1650,9 +1673,6 @@ msgstr "" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "Agendado" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/ro.po b/i18n/ro.po index d39a7acaf0..3b2ff70faf 100644 --- a/i18n/ro.po +++ b/i18n/ro.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Valeriu Plesca , 2024\n" "Language-Team: Romanian (https://app.transifex.com/hisp-uio/teams/100509/ro/)\n" @@ -44,6 +44,9 @@ msgstr "" " să utilizați din nou această versiune, dar rețineți că aceasta va închide " "alte versiuni." +msgid "More" +msgstr "" + msgid "View {{programName}} dashboard" msgstr "" @@ -373,17 +376,11 @@ msgstr "Persoană înregistrată" msgid "validation failed" msgstr "validarea a eșuat" -msgid "Errors" -msgstr "Erori" - -msgid "Feedback" -msgstr "Feedback" - -msgid "Indicators" -msgstr "Indicatori" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "Avertizări" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "" @@ -495,18 +492,6 @@ msgstr "Conține text" msgid "Yes" msgstr "Da" -msgid "mm/dd/yyyy" -msgstr "mm/dd/yyyy" - -msgid "Years" -msgstr "Ani" - -msgid "Months" -msgstr "Luni" - -msgid "Days" -msgstr "Zile" - msgid "Uploading file" msgstr "Încărcare fișier" @@ -573,6 +558,9 @@ msgstr "Coloane pentru afișare în tabel" msgid "Column" msgstr "Coloană" +msgid "Visible" +msgstr "Vizibil" + msgid "Update" msgstr "Actualizare" @@ -780,12 +768,6 @@ msgstr "A apărut o eroare la încărcarea paginii" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "Etapa programului este nevalidă" @@ -816,6 +798,11 @@ msgstr "" msgid "Registered events" msgstr "Evenimente înregistrate" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "Selectați {{category}}." @@ -931,6 +918,18 @@ msgid "" "relationship" msgstr "" +msgid "Errors" +msgstr "Erori" + +msgid "Feedback" +msgstr "Feedback" + +msgid "Indicators" +msgstr "Indicatori" + +msgid "Warnings" +msgstr "Avertizări" + msgid "Show all events" msgstr "Afișarea tuturor evenimentelor" @@ -973,6 +972,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "S-au găsit posibile duplicate" @@ -1464,6 +1469,12 @@ msgstr "Data raportului" msgid "Please select a valid event" msgstr "" +msgid "You do not have access to create events in this stage" +msgstr "" + +msgid "This stage can only have one event" +msgstr "Această etapă poate avea un singur eveniment" + msgid "New {{ eventName }} event" msgstr "Eveniment nou {{ eventName }}" @@ -1479,9 +1490,6 @@ msgstr "Resetare listă" msgid "Go to full {{ eventName }}" msgstr "Accesare {{ eventName }} complet" -msgid "This stage can only have one event" -msgstr "Această etapă poate avea un singur eveniment" - msgid "Events could not be retrieved. Please try again later." msgstr "" @@ -1500,6 +1508,15 @@ msgstr "" msgid "Stages and Events" msgstr "Etape și Evenimente" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "" + msgid "Changelog" msgstr "" @@ -1665,9 +1682,6 @@ msgstr "" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/ru.po b/i18n/ru.po index f62eb3ed86..39bdd2d94b 100644 --- a/i18n/ru.po +++ b/i18n/ru.po @@ -2,16 +2,16 @@ # Translators: # Ulanbek Abakirov , 2020 # Wanda , 2021 -# Viktor Varland , 2023 # Yury Rogachev , 2024 # Philip Larsen Donnelly, 2024 +# Viktor Varland , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Philip Larsen Donnelly, 2024\n" +"Last-Translator: Viktor Varland , 2024\n" "Language-Team: Russian (https://app.transifex.com/hisp-uio/teams/100509/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -46,6 +46,9 @@ msgstr "" "версии в том же самом домене. Обновите эту страницу, если вы хотите " "использовать эту версию, но имейте в виду, что другие версии будут закрыты." +msgid "More" +msgstr "Более" + msgid "View {{programName}} dashboard" msgstr "Смотреть панель программы{{programName}} " @@ -381,17 +384,11 @@ msgstr "Зарегистрированное лицо" msgid "validation failed" msgstr "ошибка проверки" -msgid "Errors" -msgstr "Ошибки" - -msgid "Feedback" -msgstr "Обратная связь" - -msgid "Indicators" -msgstr "Индикаторы" +msgid "No feedback for this event yet" +msgstr "Комментариев для данного события нет" -msgid "Warnings" -msgstr "Предупреждения" +msgid "No indicator output for this event yet" +msgstr "Индикаторов для данного события нет" msgid "Generate new event" msgstr "Создать новое событие" @@ -584,6 +581,9 @@ msgstr "Столбцы, для отображения в таблице" msgid "Column" msgstr "Столбец" +msgid "Visible" +msgstr "Видимый" + msgid "Update" msgstr "Обновить" @@ -820,12 +820,6 @@ msgstr "Произошла ошибка при загрузке страницы msgid "Choose an organisation unit to start reporting" msgstr "Выберите организационную единицу, чтобы начать ввод данных" -msgid "No feedback for this event yet" -msgstr "Комментариев для данного события нет" - -msgid "No indicator output for this event yet" -msgstr "Индикаторов для данного события нет" - msgid "Program stage is invalid" msgstr "Этап программы недействителен" @@ -856,6 +850,11 @@ msgstr "Этап" msgid "Registered events" msgstr "Зарегистрированные события" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "Выберите {{category}}." @@ -970,6 +969,18 @@ msgid "" msgstr "" "Если покинуть данную страницу, все настройки новой связи будут утеряны" +msgid "Errors" +msgstr "Ошибки" + +msgid "Feedback" +msgstr "Обратная связь" + +msgid "Indicators" +msgstr "Индикаторы" + +msgid "Warnings" +msgstr "Предупреждения" + msgid "Show all events" msgstr "Показать все события" @@ -1013,6 +1024,12 @@ msgstr "Не удалось получить метаданные. Повтор msgid "The enrollment event data could not be found" msgstr "Данные событий для регистрационной записи - не найдены" +msgid "Loading" +msgstr "Загрузка" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Найдены возможные дубликаты " @@ -1598,6 +1615,15 @@ msgstr " Событий запланировано: {{ scheduledEvents }}" msgid "Stages and Events" msgstr "Этапы и события" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Запланировано" + msgid "Changelog" msgstr "Лог изменений" @@ -1765,9 +1791,6 @@ msgstr "Произошла ошибка. Подробности в лог-фай msgid "Scheduled{{ escape }} due {{ time }}" msgstr "Запланировано{{ escape }} на {{ time }}" -msgid "Scheduled" -msgstr "Запланировано" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "Просрочено {{ escape }} Срок {{ time }}" diff --git a/i18n/si.po b/i18n/si.po index 13abf7e784..996801aea5 100644 --- a/i18n/si.po +++ b/i18n/si.po @@ -1,13 +1,13 @@ # # Translators: -# Malinda Wijeratne, 2023 +# Malinda Wijeratne, 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2023-09-04T07:07:59.195Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Malinda Wijeratne, 2023\n" +"Last-Translator: Malinda Wijeratne, 2024\n" "Language-Team: Sinhala (https://app.transifex.com/hisp-uio/teams/100509/si/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -36,6 +36,9 @@ msgid "" "again, but be aware that this will close other versions." msgstr "" +msgid "More" +msgstr "තව" + msgid "View {{programName}} dashboard" msgstr "" @@ -72,10 +75,6 @@ msgstr "" msgid "error" msgstr "" -msgid "" -"Plugins are not yet available - Please contact your system administrator" -msgstr "" - msgid "This value is validating" msgstr "" @@ -151,6 +150,18 @@ msgstr "" msgid "Enrollment" msgstr "" +msgid "Complete event" +msgstr "" + +msgid "{{ stageName }} - Basic info" +msgstr "" + +msgid "{{ stageName }} - Assignee" +msgstr "" + +msgid "{{ stageName }} - Status" +msgstr "" + msgid "Please select {{categoryName}}" msgstr "" @@ -169,13 +180,19 @@ msgstr "" msgid "Metadata error. see log for details" msgstr "" +msgid "{{ stageName }} - Details" +msgstr "" + +msgid "{{ stageName }} - {{ sectionName }}" +msgstr "" + msgid "Assigned user" msgstr "" msgid "Search for user" msgstr "" -msgid "Complete event" +msgid "Notes" msgstr "" msgid "Basic info" @@ -184,9 +201,6 @@ msgstr "" msgid "Status" msgstr "" -msgid "Comments" -msgstr "" - msgid "Relationships" msgstr "" @@ -215,7 +229,7 @@ msgstr "" msgid "Completed" msgstr "" -msgid "Please add or cancel comment before saving the event" +msgid "Please add or cancel note before saving the event" msgstr "" msgid "Save and add another" @@ -298,6 +312,30 @@ msgstr "" msgid "An error has occurred. See log for details" msgstr "" +msgid "{{programStageName}} completed" +msgstr "" + +msgid "" +"Would you like to complete the enrollment and all active events as well?" +msgstr "" + +msgid "{{count}} event in {{programStageName}}" +msgid_plural "{{count}} event in {{programStageName}}" +msgstr[0] "" +msgstr[1] "" + +msgid "Yes, complete enrollment and events" +msgstr "" + +msgid "Complete enrollment only" +msgstr "" + +msgid "Would you like to complete the enrollment?" +msgstr "" + +msgid "Complete enrollment" +msgstr "" + msgid "A duplicate exists (but there were some errors, see log for details" msgstr "" @@ -323,16 +361,10 @@ msgstr "" msgid "validation failed" msgstr "" -msgid "Errors" -msgstr "" - -msgid "Feedback" +msgid "No feedback for this event yet" msgstr "" -msgid "Indicators" -msgstr "" - -msgid "Warnings" +msgid "No indicator output for this event yet" msgstr "" msgid "Generate new event" @@ -445,18 +477,6 @@ msgstr "" msgid "Yes" msgstr "ඔව්" -msgid "mm/dd/yyyy" -msgstr "" - -msgid "Years" -msgstr "අවුරුදු" - -msgid "Months" -msgstr "මාස" - -msgid "Days" -msgstr "දින" - msgid "Uploading file" msgstr "" @@ -508,6 +528,9 @@ msgstr "" msgid "suggestions could not be retrieved" msgstr "" +msgid "No results found" +msgstr "" + msgid "No items to display" msgstr "" @@ -520,6 +543,9 @@ msgstr "" msgid "Column" msgstr "" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "" @@ -559,7 +585,7 @@ msgstr "" msgid "Program doesn't exist" msgstr "" -msgid "Selected program is invalid for selected registering unit" +msgid "Selected program is invalid for selected organisation unit" msgstr "" msgid "Online" @@ -571,13 +597,13 @@ msgstr "" msgid "Syncing" msgstr "" -msgid "Add comment" +msgid "Add note" msgstr "" -msgid "You don't have access to write comments" +msgid "You don't have access to write notes" msgstr "" -msgid "Write comment" +msgid "Write note" msgstr "" msgid "was blanked out and hidden by your last action" @@ -625,26 +651,25 @@ msgstr "" msgid "Opt out for {{programName}}" msgstr "" +msgid "Enrollment with id \"{{enrollmentId}}\" does not exist" +msgstr "" + msgid "Tracked entity instance with id \"{{teiId}}\" does not exist" msgstr "" -msgid "" -"There is an error while opening this enrollment. Please enter a valid url." +msgid "Program with id \"{{programId}}\" does not exist" msgstr "" msgid "" "An error occurred while fetching enrollments. Please enter a valid url." msgstr "" -msgid "Enrollment Dashboard" +msgid "No feedback for this enrollment yet" msgstr "" msgid "No indicator output for this enrollment yet" msgstr "" -msgid "No feedback for this enrollment yet" -msgstr "" - msgid "Quick actions" msgstr "" @@ -722,19 +747,10 @@ msgstr "" msgid "There was an error opening the Page" msgstr "" -msgid "Enrollment{{escape}} New Event" -msgstr "" - msgid "There was an error loading the page" msgstr "" -msgid "Choose a registering unit to start reporting" -msgstr "" - -msgid "There are no feedbacks for this event" -msgstr "" - -msgid "There are no indicators for this event" +msgid "Choose an organisation unit to start reporting" msgstr "" msgid "Program stage is invalid" @@ -764,19 +780,12 @@ msgstr "" msgid "Stage" msgstr "" -msgid "Enrollment{{escape}} View Event" -msgstr "" - -msgid "Enrollment{{escape}} Edit Event" -msgstr "" - -msgid "The enrollment event data could not be found" -msgstr "" - -msgid "There are no feedback for this event" +msgid "Registered events" msgstr "" -msgid "Registered events" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." msgstr "" msgid "Please select {{category}}." @@ -791,8 +800,10 @@ msgstr "" msgid "Please select an organisation unit." msgstr "" -msgid "New" -msgstr "නව" +msgid "" +"You don't have access to create a {{trackedEntityName}} in the current " +"selections" +msgstr "" msgid "Choose the {{missingCategories}} to start reporting" msgstr "" @@ -800,8 +811,8 @@ msgstr "" msgid "Save as new" msgstr "" -msgid "View enrollment" -msgstr "" +msgid "New" +msgstr "නව" msgid "Create for" msgstr "" @@ -879,6 +890,9 @@ msgstr "" msgid "Edit event" msgstr "" +msgid "View changelog" +msgstr "" + msgid "Event details" msgstr "" @@ -887,16 +901,16 @@ msgid "" "relationship" msgstr "" -msgid "No one is assigned to this event" +msgid "Errors" msgstr "" -msgid "Assign" +msgid "Feedback" msgstr "" -msgid "Event assigned to {{name}}" +msgid "Indicators" msgstr "" -msgid "Feedbacks" +msgid "Warnings" msgstr "" msgid "Show all events" @@ -911,10 +925,42 @@ msgstr "" msgid "Organisation unit could not be loaded" msgstr "" -msgid "Possible duplicates found" +msgid "Dashboard" msgstr "" -msgid "No results found" +msgid "Edit Event" +msgstr "" + +msgid "View Event" +msgstr "" + +msgid "Selected program" +msgstr "" + +msgid "Search {{uniqueAttrName}}" +msgstr "" + +msgid "Search by attributes" +msgstr "" + +msgid "Fill in at least {{count}} attribute to search" +msgid_plural "Fill in at least {{count}} attribute to search" +msgstr[0] "" +msgstr[1] "" + +msgid "Could not retrieve metadata. Please try again later." +msgstr "" + +msgid "The enrollment event data could not be found" +msgstr "" + +msgid "Loading" +msgstr "" + +msgid "An error occurred while loading the form" +msgstr "" + +msgid "Possible duplicates found" msgstr "" msgid "An error occurred loading possible duplicates" @@ -932,10 +978,7 @@ msgstr "" msgid "No results found for " msgstr "" -msgid "Registering unit" -msgstr "" - -msgid "Choose a registering unit" +msgid "Choose an organisation unit" msgstr "" msgid "Clear selection" @@ -947,7 +990,7 @@ msgstr "" msgid "Search for a program" msgstr "" -msgid "Some programs are being filtered by the chosen registering unit" +msgid "Some programs are being filtered by the chosen organisation unit" msgstr "" msgid "Show all programs" @@ -975,9 +1018,6 @@ msgstr "" msgid "Search by {{name}}" msgstr "" -msgid "Search by attributes" -msgstr "" - msgid "all programs" msgstr "" @@ -1029,12 +1069,6 @@ msgstr "" msgid "Results found" msgstr "" -msgid "Selected program" -msgstr "" - -msgid "Search {{uniqueAttrName}}" -msgstr "" - msgid "Saved lists in this program" msgstr "" @@ -1049,16 +1083,34 @@ msgstr "" msgid "Create saved list" msgstr "" -msgid "New {{trackedEntityName}} in {{programName}}" +msgid "Create new in another program" +msgstr "" + +msgid "Create new event" msgstr "" msgid "Search for a {{trackedEntityName}} in {{programName}}" msgstr "" -msgid "To work with the selected program," +msgid "No tracked entity types available" msgstr "" -msgid "open the Tracker Capture app" +msgid "Assigned to" +msgstr "" + +msgid "You don't have access to edit this assignee" +msgstr "" + +msgid "Edit" +msgstr "වෙනස් කරන්න" + +msgid "No one is assigned to this event" +msgstr "" + +msgid "You don't have access to assign an assignee" +msgstr "" + +msgid "Assign" msgstr "" msgid "This program is protected" @@ -1080,9 +1132,6 @@ msgid "" "program. All activity will be logged." msgstr "" -msgid "Save comment" -msgstr "" - msgid "Enrollment actions" msgstr "" @@ -1121,9 +1170,57 @@ msgstr "" msgid "Mark for follow-up" msgstr "" +msgid "Transfer" +msgstr "" + +msgid "An error occurred while transferring ownership" +msgstr "" + msgid "Existing dates for auto-generated events will not be updated." msgstr "" +msgid "Latitude" +msgstr "" + +msgid "Longitude" +msgstr "" + +msgid "Set coordinates" +msgstr "" + +msgid "Coordinates" +msgstr "" + +msgid "Delete polygon" +msgstr "" + +msgid "Close without saving" +msgstr "" + +msgid "Finish drawing before saving" +msgstr "" + +msgid "Set area" +msgstr "" + +msgid "" +"Transferring enrollment ownership from {{ownerOrgUnit}} to " +"{{newOrgUnit}}{{escape}}" +msgstr "" + +msgid "" +"You will lose access to the enrollment when transferring ownership to " +"{{organisationUnit}}." +msgstr "" + +msgid "Transfer Ownership" +msgstr "" + +msgid "" +"Choose the organisation unit to which enrollment ownership should be " +"transferred." +msgstr "" + msgid "Enrollment date" msgstr "" @@ -1142,19 +1239,16 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "" -msgid "Comments about this enrollment" +msgid "Add coordinates" msgstr "" -msgid "Write a comment about this enrollment" +msgid "Add area" msgstr "" -msgid "This enrollment doesn't have any comments" +msgid "Please add or cancel the note before saving the event" msgstr "" msgid "organisation unit could not be retrieved. Please try again later." @@ -1166,21 +1260,21 @@ msgstr "" msgid "program or stage is invalid" msgstr "" -msgid "Error" -msgstr "දෝෂය" - -msgid "Warning" -msgstr "අවවාදය" - -msgid "Comments about this event" +msgid "Notes about this enrollment" msgstr "" -msgid "Write a comment about this event" +msgid "Write a note about this enrollment" msgstr "" -msgid "This event doesn't have any comments" +msgid "This enrollment doesn't have any notes" msgstr "" +msgid "Error" +msgstr "දෝෂය" + +msgid "Warning" +msgstr "අවවාදය" + msgid "stage not found in rules execution" msgstr "" @@ -1202,6 +1296,15 @@ msgstr "" msgid "Back to all stages and events" msgstr "" +msgid "Notes about this event" +msgstr "" + +msgid "Write a note about this event" +msgstr "" + +msgid "This event doesn't have any notes" +msgstr "" + msgid "Schedule date info" msgstr "" @@ -1212,12 +1315,24 @@ msgid "" "The scheduled date matches the suggested date, but can be changed if needed." msgstr "" +msgid "The scheduled date is {{count}} days {{position}} the suggested date." +msgid_plural "" +"The scheduled date is {{count}} days {{position}} the suggested date." +msgstr[0] "" +msgstr[1] "" + msgid "after" msgstr "" msgid "before" msgstr "" +msgid "There are {{count}} scheduled event in {{orgUnitName}} on this day." +msgid_plural "" +"There are {{count}} scheduled event in {{orgUnitName}} on this day." +msgstr[0] "" +msgstr[1] "" + msgid "" "Scheduling an event in {{stageName}} for {{programName}} in {{orgUnitName}}" msgstr "" @@ -1228,10 +1343,13 @@ msgstr "" msgid "Schedule date / Due date" msgstr "" -msgid "Event comments" +msgid "Event notes" msgstr "" -msgid "Write a comment about this scheduled event" +msgid "Write a note about this scheduled event" +msgstr "" + +msgid "Save note" msgstr "" msgid "" @@ -1264,18 +1382,74 @@ msgstr "" msgid "Fix errors in the form to continue." msgstr "" -msgid "Profile widget could not be loaded. Please try again later" +msgid "You do not have access to delete this {{trackedEntityTypeName}}" msgstr "" -msgid "{{TETName}} profile" +msgid "Delete {{trackedEntityTypeName}}" msgstr "" -msgid "Edit" -msgstr "වෙනස් කරන්න" +msgid "" +"Are you sure you want to delete this {{trackedEntityTypeName}}? This will " +"permanently remove the {{trackedEntityTypeName}} and all its associated " +"enrollments and events in all programs." +msgstr "" + +msgid "There was a problem deleting the {{trackedEntityTypeName}}" +msgstr "" + +msgid "Yes, delete {{trackedEntityTypeName}}" +msgstr "" + +msgid "Profile widget could not be loaded. Please try again later" +msgstr "" + +msgid "{{trackedEntityTypeName}} profile" +msgstr "" msgid "tracked entity instance" msgstr "" +msgid "Link to an existing {{linkableStageLabel}}" +msgstr "" + +msgid "Choose a {{linkableStageLabel}}" +msgstr "" + +msgid "{{ linkableStageLabel }} is not repeatable" +msgstr "" + +msgid "{{ linkableStageLabel }} has no linkable events" +msgstr "" + +msgid "Ambiguous relationships, contact system administrator" +msgstr "" + +msgid "" +"Enter {{linkableStageLabel}} details in the next step after completing this " +"{{currentStageLabel}}." +msgstr "" + +msgid "Enter details now" +msgstr "" + +msgid "Link to an existing" +msgstr "" + +msgid "Scheduled date" +msgstr "" + +msgid "Report date" +msgstr "" + +msgid "Please select a valid event" +msgstr "" + +msgid "You do not have access to create events in this stage" +msgstr "" + +msgid "This stage can only have one event" +msgstr "" + msgid "New {{ eventName }} event" msgstr "" @@ -1291,14 +1465,13 @@ msgstr "" msgid "Go to full {{ eventName }}" msgstr "" -msgid "This stage can only have one event" -msgstr "" - msgid "Events could not be retrieved. Please try again later." msgstr "" -msgid "{{ totalEvents }} events" -msgstr "" +msgid "{{ count }} event" +msgid_plural "{{ count }} event" +msgstr[0] "" +msgstr[1] "" msgid "{{ overdueEvents }} overdue" msgstr "" @@ -1309,28 +1482,97 @@ msgstr "" msgid "Stages and Events" msgstr "" -msgid "Working list could not be loaded" +msgid "An error occurred while loading the widget." msgstr "" -msgid "Download as JSON" +msgid "View linked event" msgstr "" -msgid "Download as XML" +msgid "Scheduled" msgstr "" -msgid "Download as CSV" +msgid "Changelog" msgstr "" -msgid "Download with current filters" +msgid "No changes to display" msgstr "" -msgid "Download data..." +msgid "Created" msgstr "" -msgid "an error occurred loading working lists" +msgid "Deleted" msgstr "" -msgid "Assigned to" +msgid "Date" +msgstr "දිනය" + +msgid "User" +msgstr "" + +msgid "Data item" +msgstr "" + +msgid "Change" +msgstr "" + +msgid "New {{trackedEntityTypeName}} relationship" +msgstr "" + +msgid "Missing implementation step" +msgstr "" + +msgid "Go back without saving relationship" +msgstr "" + +msgid "New Relationship" +msgstr "" + +msgid "Link to an existing {{tetName}}" +msgstr "" + +msgid "An error occurred while adding the relationship" +msgstr "" + +msgid "" +"Something went wrong while loading relationships. Please try again later." +msgstr "" + +msgid "{{trackedEntityTypeName}} relationships" +msgstr "" + +msgid "Delete relationship" +msgstr "" + +msgid "" +"Deleting the relationship is permanent and cannot be undone. Are you sure " +"you want to delete this relationship?" +msgstr "" + +msgid "Yes, delete relationship" +msgstr "" + +msgid "An error occurred while deleting the relationship." +msgstr "" + +msgid "To open this relationship, please wait until saving is complete" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Created date" +msgstr "" + +msgid "Program stage name" +msgstr "" + +msgid "Working list could not be loaded" +msgstr "" + +msgid "Download data..." +msgstr "" + +msgid "an error occurred loading working lists" msgstr "" msgid "Registration Date" @@ -1342,6 +1584,9 @@ msgstr "" msgid "Enrollment status" msgstr "" +msgid "Follow up" +msgstr "" + msgid "Choose a program stage to filter by {{label}}" msgstr "" @@ -1396,13 +1641,19 @@ msgstr "" msgid "Show All" msgstr "" -msgid "An error has occured. See log for details" +msgid "Download as JSON" msgstr "" -msgid "Scheduled{{ escape }} due {{ time }}" +msgid "Download as CSV" msgstr "" -msgid "Scheduled" +msgid "Download with current filters" +msgstr "" + +msgid "An error has occured. See log for details" +msgstr "" + +msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" msgid "Overdue{{ escape }} due {{ time }}" @@ -1462,11 +1713,11 @@ msgstr "" msgid "Error editing the event, the changes made were not saved" msgstr "" -msgid "Set coordinate" +msgid "Error updating the Assignee" msgstr "" -msgid "Date" -msgstr "දිනය" +msgid "Set coordinate" +msgstr "" msgid "Time" msgstr "" @@ -1486,12 +1737,6 @@ msgstr "" msgid "Page {{currentPage}}" msgstr "" -msgid "Delete polygon" -msgstr "" - -msgid "Set area" -msgstr "" - msgid "Area on map saved" msgstr "" diff --git a/i18n/tg.po b/i18n/tg.po index 1114b6612b..d3195081c7 100644 --- a/i18n/tg.po +++ b/i18n/tg.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Viktor Varland , 2024\n" "Language-Team: Tajik (https://app.transifex.com/hisp-uio/teams/100509/tg/)\n" @@ -37,6 +37,9 @@ msgid "" "again, but be aware that this will close other versions." msgstr "" +msgid "More" +msgstr "" + msgid "View {{programName}} dashboard" msgstr "" @@ -359,16 +362,10 @@ msgstr "" msgid "validation failed" msgstr "" -msgid "Errors" +msgid "No feedback for this event yet" msgstr "" -msgid "Feedback" -msgstr "Изҳори назар" - -msgid "Indicators" -msgstr "Индикаторҳо" - -msgid "Warnings" +msgid "No indicator output for this event yet" msgstr "" msgid "Generate new event" @@ -559,6 +556,9 @@ msgstr "" msgid "Column" msgstr "Сутун" +msgid "Visible" +msgstr "Намоён" + msgid "Update" msgstr "Навсозӣ" @@ -766,12 +766,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -802,6 +796,11 @@ msgstr "" msgid "Registered events" msgstr "" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -915,6 +914,18 @@ msgid "" "relationship" msgstr "" +msgid "Errors" +msgstr "" + +msgid "Feedback" +msgstr "Изҳори назар" + +msgid "Indicators" +msgstr "Индикаторҳо" + +msgid "Warnings" +msgstr "" + msgid "Show all events" msgstr "" @@ -956,6 +967,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "Бор мешавад" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "" @@ -1235,9 +1252,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "" @@ -1478,6 +1492,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "" + msgid "Changelog" msgstr "" @@ -1643,9 +1666,6 @@ msgstr "" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/uk.po b/i18n/uk.po index 2e6b4b8122..382b45618d 100644 --- a/i18n/uk.po +++ b/i18n/uk.po @@ -3,15 +3,15 @@ # Philip Larsen Donnelly, 2023 # Wanda , 2024 # Éva Tamási, 2024 -# Viktor Varland , 2024 # Nadiia , 2024 +# Viktor Varland , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Nadiia , 2024\n" +"Last-Translator: Viktor Varland , 2024\n" "Language-Team: Ukrainian (https://app.transifex.com/hisp-uio/teams/100509/uk/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -40,6 +40,9 @@ msgid "" "again, but be aware that this will close other versions." msgstr "" +msgid "More" +msgstr "Більше" + msgid "View {{programName}} dashboard" msgstr "" @@ -364,16 +367,10 @@ msgstr "" msgid "validation failed" msgstr "" -msgid "Errors" -msgstr "Помилки" - -msgid "Feedback" -msgstr "Відгук" - -msgid "Indicators" -msgstr "Показники" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" +msgid "No indicator output for this event yet" msgstr "" msgid "Generate new event" @@ -564,6 +561,9 @@ msgstr "" msgid "Column" msgstr "Стовпчик" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "Оновити" @@ -771,12 +771,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -807,6 +801,11 @@ msgstr "" msgid "Registered events" msgstr "" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -920,6 +919,18 @@ msgid "" "relationship" msgstr "" +msgid "Errors" +msgstr "Помилки" + +msgid "Feedback" +msgstr "Відгук" + +msgid "Indicators" +msgstr "Показники" + +msgid "Warnings" +msgstr "" + msgid "Show all events" msgstr "" @@ -963,6 +974,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "Завантаження" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "" @@ -1242,9 +1259,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "Скасовано" @@ -1491,6 +1505,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Заплановано" + msgid "Changelog" msgstr "" @@ -1656,9 +1679,6 @@ msgstr "" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "Заплановано" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/ur.po b/i18n/ur.po index 3dc7473907..8e95fe396d 100644 --- a/i18n/ur.po +++ b/i18n/ur.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Viktor Varland , 2024\n" "Language-Team: Urdu (https://app.transifex.com/hisp-uio/teams/100509/ur/)\n" @@ -37,6 +37,9 @@ msgid "" "again, but be aware that this will close other versions." msgstr "" +msgid "More" +msgstr "مزید" + msgid "View {{programName}} dashboard" msgstr "" @@ -359,16 +362,10 @@ msgstr "" msgid "validation failed" msgstr "" -msgid "Errors" -msgstr "غلطیاں" - -msgid "Feedback" -msgstr "رائے" - -msgid "Indicators" -msgstr "اشارے" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" +msgid "No indicator output for this event yet" msgstr "" msgid "Generate new event" @@ -559,6 +556,9 @@ msgstr "" msgid "Column" msgstr "کالم" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "اپڈیٹ" @@ -766,12 +766,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -802,6 +796,11 @@ msgstr "اسٹیج" msgid "Registered events" msgstr "رجسٹرڈ واقعات" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -915,6 +914,18 @@ msgid "" "relationship" msgstr "" +msgid "Errors" +msgstr "غلطیاں" + +msgid "Feedback" +msgstr "رائے" + +msgid "Indicators" +msgstr "اشارے" + +msgid "Warnings" +msgstr "" + msgid "Show all events" msgstr "" @@ -956,6 +967,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "لوڈ کر رہا ہے" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "" @@ -1235,9 +1252,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "منسوخ" @@ -1478,6 +1492,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "شیڈول کردہ" + msgid "Changelog" msgstr "" @@ -1643,9 +1666,6 @@ msgstr "" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "شیڈول کردہ" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/uz_UZ_Cyrl.po b/i18n/uz_UZ_Cyrl.po index aabb52fc5f..cd49eaf87b 100644 --- a/i18n/uz_UZ_Cyrl.po +++ b/i18n/uz_UZ_Cyrl.po @@ -1,14 +1,14 @@ # # Translators: # Philip Larsen Donnelly, 2024 -# Ibatov , 2024 +# Khurshid Ibatov , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" -"Last-Translator: Ibatov , 2024\n" +"Last-Translator: Khurshid Ibatov , 2024\n" "Language-Team: Uzbek (Cyrillic) (https://app.transifex.com/hisp-uio/teams/100509/uz@Cyrl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -43,6 +43,9 @@ msgstr "" "ишлашини қўллаб қувватлайди. Ушбу версияни қайта ишлатмоқчи бўлсангиз, " "Илтимос, саҳифани янгиланг, аммо бошқа версиялар ёпилишини унутманг." +msgid "More" +msgstr "Кўпроқ" + msgid "View {{programName}} dashboard" msgstr "" @@ -377,17 +380,11 @@ msgstr "Рўйхатдан ўтган шахс" msgid "validation failed" msgstr "Тасдиқлаш амалга ошмади" -msgid "Errors" -msgstr "Хатоликлар" - -msgid "Feedback" -msgstr "Қайта алоқа" - -msgid "Indicators" -msgstr "Индикаторлар" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "Огоҳлантиришлар" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "Янги ҳодиса/тадбир яратиш" @@ -577,6 +574,9 @@ msgstr "Жадвалда кўрсатиладиган устунлар" msgid "Column" msgstr "Устун" +msgid "Visible" +msgstr "Кўринадиган" + msgid "Update" msgstr "Янгилаш" @@ -791,12 +791,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -827,6 +821,11 @@ msgstr "Босқич" msgid "Registered events" msgstr "Рўйхатдан ўтган ҳодиса/тадбирлар" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -944,6 +943,18 @@ msgstr "" "Ушбу саҳифани тарк этсангиз, янги алоқа-муносабатлар учун қилинган барча " "танловлар бекор қилинади " +msgid "Errors" +msgstr "Хатоликлар" + +msgid "Feedback" +msgstr "Қайта алоқа" + +msgid "Indicators" +msgstr "Индикаторлар" + +msgid "Warnings" +msgstr "Огоҳлантиришлар" + msgid "Show all events" msgstr "Барча ҳодиса/тадбирларни кўрсатиш" @@ -984,6 +995,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "Юкланмоқда" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Бўлиши мумкин бўлган нусхалар топилди" @@ -1508,6 +1525,15 @@ msgstr "" msgid "Stages and Events" msgstr "Босқичлар ва Ҳодиса/тадбирлар" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Режа бўйича" + msgid "Changelog" msgstr "" @@ -1673,9 +1699,6 @@ msgstr "Хатолик юз берди. Тафсилотларни журнал msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "Режа бўйича" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/uz_UZ_Latn.po b/i18n/uz_UZ_Latn.po index 46c699f432..3c876c6abd 100644 --- a/i18n/uz_UZ_Latn.po +++ b/i18n/uz_UZ_Latn.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Yury Rogachev , 2024\n" "Language-Team: Uzbek (Latin) (https://app.transifex.com/hisp-uio/teams/100509/uz@Latn/)\n" @@ -44,6 +44,9 @@ msgstr "" "ishlatmoqchi boʼlsangiz, Iltimos, sahifani yangilang, ammo boshqa versiyalar" " yopilishini unutmang." +msgid "More" +msgstr "Koʼproq" + msgid "View {{programName}} dashboard" msgstr "" @@ -377,17 +380,11 @@ msgstr "Roʼyxatdan oʼtgan shaxs" msgid "validation failed" msgstr "Tasdiqlash amalga oshmadi" -msgid "Errors" -msgstr "Xatoliklar" - -msgid "Feedback" -msgstr "Qayta aloqa" - -msgid "Indicators" -msgstr "Indikatorlar" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "Ogohlantirishlar" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "Yangi hodisa/tadbir yaratish" @@ -577,6 +574,9 @@ msgstr "Jadvalda koʼrsatiladigan ustunlar" msgid "Column" msgstr "Ustun" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "Янгилаш" @@ -784,12 +784,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -820,6 +814,11 @@ msgstr "Босқич" msgid "Registered events" msgstr "Roʼyxatdan oʼtgan hodisa/tadbirlar" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -935,6 +934,18 @@ msgstr "" "Ushbu sahifani tark etsangiz, yangi aloqa-munosabatlar uchun qilingan barcha" " tanlovlar bekor qilinadi" +msgid "Errors" +msgstr "Xatoliklar" + +msgid "Feedback" +msgstr "Qayta aloqa" + +msgid "Indicators" +msgstr "Indikatorlar" + +msgid "Warnings" +msgstr "Ogohlantirishlar" + msgid "Show all events" msgstr "Barcha hodisa/tadbirlarni koʼrsatish" @@ -976,6 +987,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "Yuklanmoqda" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Boʼlishi mumkin boʼlgan nusxalar topildi" @@ -1259,9 +1276,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "Bekor qilindi" @@ -1499,6 +1513,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Reja boʼyicha" + msgid "Changelog" msgstr "" @@ -1665,9 +1688,6 @@ msgstr "Xatolik yuz berdi. Tafsilotlarni jurnaldan koʼring." msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "Reja boʼyicha" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/vi.po b/i18n/vi.po index 1b1f6ad6f1..f4fdf8ca07 100644 --- a/i18n/vi.po +++ b/i18n/vi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: Viktor Varland , 2024\n" "Language-Team: Vietnamese (https://app.transifex.com/hisp-uio/teams/100509/vi/)\n" @@ -45,6 +45,9 @@ msgstr "" " Vui lòng làm mới trang này nếu bạn muốn sử dụng lại phiên bản này, nhưng " "lưu ý rằng điều này sẽ đóng các phiên bản khác." +msgid "More" +msgstr "Thêm" + msgid "View {{programName}} dashboard" msgstr "" @@ -374,17 +377,11 @@ msgstr "Người đã đăng ký" msgid "validation failed" msgstr "xác thực không thành công" -msgid "Errors" -msgstr "Lỗi" - -msgid "Feedback" -msgstr "Phản hồi" - -msgid "Indicators" -msgstr "Các chỉ số" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "Cảnh báo" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "Tạo sự kiện mới" @@ -574,6 +571,9 @@ msgstr "Cột hiển thị trong bảng" msgid "Column" msgstr "Cột" +msgid "Visible" +msgstr "Hiển thị" + msgid "Update" msgstr "Cập nhật" @@ -781,12 +781,6 @@ msgstr "" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "" @@ -817,6 +811,11 @@ msgstr "Giai Đoạn Chương Trình" msgid "Registered events" msgstr "Sự kiện đã đăng ký" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "" @@ -932,6 +931,18 @@ msgstr "" "Rời khỏi trang này sẽ hủy mọi lựa chọn bạn đã thực hiện cho một mối quan hệ " "mới" +msgid "Errors" +msgstr "Lỗi" + +msgid "Feedback" +msgstr "Phản hồi" + +msgid "Indicators" +msgstr "Các chỉ số" + +msgid "Warnings" +msgstr "Cảnh báo" + msgid "Show all events" msgstr "Hiện tất cả sự kiện" @@ -972,6 +983,12 @@ msgstr "" msgid "The enrollment event data could not be found" msgstr "" +msgid "Loading" +msgstr "Đang tải" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "Có thể tìm thấy các bản sao" @@ -1257,9 +1274,6 @@ msgstr "" msgid "Owned by {{ownerOrgUnit}}" msgstr "" -msgid "Last updated {{date}}" -msgstr "" - msgid "Cancelled" msgstr "Đã hủy" @@ -1497,6 +1511,15 @@ msgstr "" msgid "Stages and Events" msgstr "" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "Đã xếp lịch" + msgid "Changelog" msgstr "" @@ -1662,9 +1685,6 @@ msgstr "Có lỗi. Xem log để biết thêm chi tiết." msgid "Scheduled{{ escape }} due {{ time }}" msgstr "" -msgid "Scheduled" -msgstr "Đã xếp lịch" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "" diff --git a/i18n/zh.po b/i18n/zh.po index 13457ac634..8058b5a3eb 100644 --- a/i18n/zh.po +++ b/i18n/zh.po @@ -1,14 +1,14 @@ # # Translators: # Philip Larsen Donnelly, 2024 -# Viktor Varland , 2024 # 晓东 林 <13981924470@126.com>, 2024 +# Viktor Varland , 2024 # easylin , 2024 # msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-10T10:42:21.141Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: easylin , 2024\n" "Language-Team: Chinese (https://app.transifex.com/hisp-uio/teams/100509/zh/)\n" @@ -41,6 +41,9 @@ msgstr "" "您在同一域中打开了另一个版本的Capture App。当前,Capture " "App仅支持同时运行一个版本(在同一域中)。如果您想再次使用此版本,请刷新此页面,但是请注意,它将关闭其他版本。" +msgid "More" +msgstr "更多" + msgid "View {{programName}} dashboard" msgstr "查看 {{programName}} 仪表板" @@ -362,17 +365,11 @@ msgstr "登记的人" msgid "validation failed" msgstr "验证失败" -msgid "Errors" -msgstr "错误" - -msgid "Feedback" -msgstr "反馈" - -msgid "Indicators" -msgstr "指标" +msgid "No feedback for this event yet" +msgstr "此事件尚未有任何反馈" -msgid "Warnings" -msgstr "错误" +msgid "No indicator output for this event yet" +msgstr "此事件尚无指标输出" msgid "Generate new event" msgstr "生成新事件" @@ -484,18 +481,6 @@ msgstr "包含文本" msgid "Yes" msgstr "是" -msgid "mm/dd/yyyy" -msgstr "mm/dd/yyyy" - -msgid "Years" -msgstr "年" - -msgid "Months" -msgstr "月" - -msgid "Days" -msgstr "天" - msgid "Uploading file" msgstr "上传文件" @@ -562,6 +547,9 @@ msgstr "表中显示的列" msgid "Column" msgstr "列" +msgid "Visible" +msgstr "可见" + msgid "Update" msgstr "更新" @@ -602,7 +590,7 @@ msgid "Program doesn't exist" msgstr "项目不存在" msgid "Selected program is invalid for selected organisation unit" -msgstr "所选项目对所选组织机构无效" +msgstr "所选项目对所选机构无效" msgid "Online" msgstr "在线" @@ -770,13 +758,7 @@ msgid "There was an error loading the page" msgstr "加载页面时出错" msgid "Choose an organisation unit to start reporting" -msgstr "选择一个组织机构开始报告" - -msgid "No feedback for this event yet" -msgstr "此事件尚未有任何反馈" - -msgid "No indicator output for this event yet" -msgstr "此事件尚无指标输出" +msgstr "选择一个机构开始报告" msgid "Program stage is invalid" msgstr "项目阶段无效" @@ -808,6 +790,11 @@ msgstr "阶段" msgid "Registered events" msgstr "注册的事件" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "类别选项对所选机构无效。请选择一个有效的组合。" + msgid "Please select {{category}}." msgstr "请选择 {{category}}." @@ -818,7 +805,7 @@ msgid "Or see all events accessible to you in {{program}}" msgstr "或者在{{program}}中查看您可以访问的所有事件" msgid "Please select an organisation unit." -msgstr "请选择一个组织单位。" +msgstr "请选择一个机构。" msgid "" "You don't have access to create a {{trackedEntityName}} in the current " @@ -869,7 +856,7 @@ msgid "Program" msgstr "项目" msgid "Organisation Unit" -msgstr "组织机构" +msgstr "机构" msgid "Registration" msgstr "注册" @@ -921,6 +908,18 @@ msgid "" "relationship" msgstr "离开该页将丢失你创建新关系的所有选择" +msgid "Errors" +msgstr "错误" + +msgid "Feedback" +msgstr "反馈" + +msgid "Indicators" +msgstr "指标" + +msgid "Warnings" +msgstr "错误" + msgid "Show all events" msgstr "显示所有事件" @@ -961,6 +960,12 @@ msgstr "无法检索元数据。请稍后再试。" msgid "The enrollment event data could not be found" msgstr "找不到报名事件数据" +msgid "Loading" +msgstr "载入" + +msgid "An error occurred while loading the form" +msgstr "加载表格时发生错误" + msgid "Possible duplicates found" msgstr "发现可能的重复" @@ -980,7 +985,7 @@ msgid "No results found for " msgstr "没有找到结果" msgid "Choose an organisation unit" -msgstr "选择组织单位" +msgstr "选择机构" msgid "Clear selection" msgstr "清空选项" @@ -992,7 +997,7 @@ msgid "Search for a program" msgstr "搜索项目" msgid "Some programs are being filtered by the chosen organisation unit" -msgstr "某些项目正在被所选组织单位过滤" +msgstr "某些项目正在被所选机构过滤" msgid "Show all programs" msgstr "显示所有项目" @@ -1222,7 +1227,7 @@ msgstr "所有权转让" msgid "" "Choose the organisation unit to which enrollment ownership should be " "transferred." -msgstr "选择注册所有权应转移到的组织单位。" +msgstr "选择注册所有权应转移到的机构。" msgid "Enrollment date" msgstr "报名日期" @@ -1255,7 +1260,7 @@ msgid "Please add or cancel the note before saving the event" msgstr "请在保存事件前添加或取消备注" msgid "organisation unit could not be retrieved. Please try again later." -msgstr "无法检索组织机构。请稍后再试。" +msgstr "无法检索机构。请稍后再试。" msgid "Saving to {{stageName}} for {{programName}} in {{orgUnitName}}" msgstr "为 {{orgUnitName}} 中的 {{programName}} 保存到 {{stageName}}" @@ -1447,6 +1452,12 @@ msgstr "报告日期" msgid "Please select a valid event" msgstr "请选择一个有效的事件" +msgid "You do not have access to create events in this stage" +msgstr "" + +msgid "This stage can only have one event" +msgstr "这个阶段只能有一个事件" + msgid "New {{ eventName }} event" msgstr "新的 {{ eventName }} 事件" @@ -1462,9 +1473,6 @@ msgstr "重置列表" msgid "Go to full {{ eventName }}" msgstr "转到完整的{{ eventName }}" -msgid "This stage can only have one event" -msgstr "这个阶段只能有一个事件" - msgid "Events could not be retrieved. Please try again later." msgstr "无法检索事件。请稍后再试。" @@ -1481,6 +1489,15 @@ msgstr "{{ scheduledEvents }} 已安排" msgid "Stages and Events" msgstr "阶段与活动" +msgid "An error occurred while loading the widget." +msgstr "加载小部件时发生错误。" + +msgid "View linked event" +msgstr "查看链接事件" + +msgid "Scheduled" +msgstr "已经调度" + msgid "Changelog" msgstr "变更日志" @@ -1646,9 +1663,6 @@ msgstr "发生错误。查看日志以获取详细信息" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "调度{{ escape }}到期{{ time }}" -msgid "Scheduled" -msgstr "已经调度" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "逾期{{ escape }}到期{{ time }}" @@ -1689,7 +1703,7 @@ msgid "Could not delete working list" msgstr "不能删除工作列表" msgid "Organisation unit search failed." -msgstr "组织机构搜索失败。" +msgstr "机构搜索失败。" msgid "Error saving tracked entity instance" msgstr "保存跟踪的实体实例时出错" diff --git a/i18n/zh_CN.po b/i18n/zh_CN.po index 4ea3450a93..29a3101e26 100644 --- a/i18n/zh_CN.po +++ b/i18n/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-06-28T11:23:02.970Z\n" +"POT-Creation-Date: 2024-08-08T11:49:13.423Z\n" "PO-Revision-Date: 2019-06-27 07:31+0000\n" "Last-Translator: 晓东 林 <13981924470@126.com>, 2024\n" "Language-Team: Chinese (China) (https://app.transifex.com/hisp-uio/teams/100509/zh_CN/)\n" @@ -40,6 +40,9 @@ msgstr "" "您在同一域中打开了另一个版本的Capture App。当前,Capture " "App仅支持同时运行一个版本(在同一域中)。如果您想再次使用此版本,请刷新此页面,但是请注意,它将关闭其他版本。" +msgid "More" +msgstr "更多" + msgid "View {{programName}} dashboard" msgstr "查看 {{programName}} 仪表板" @@ -361,17 +364,11 @@ msgstr "登记的人" msgid "validation failed" msgstr "验证失败" -msgid "Errors" -msgstr "错误" - -msgid "Feedback" -msgstr "反馈" - -msgid "Indicators" -msgstr "指标" +msgid "No feedback for this event yet" +msgstr "" -msgid "Warnings" -msgstr "错误" +msgid "No indicator output for this event yet" +msgstr "" msgid "Generate new event" msgstr "生成新事件" @@ -561,6 +558,9 @@ msgstr "表中显示的列" msgid "Column" msgstr "列" +msgid "Visible" +msgstr "" + msgid "Update" msgstr "更新" @@ -771,12 +771,6 @@ msgstr "加载页面时出错" msgid "Choose an organisation unit to start reporting" msgstr "" -msgid "No feedback for this event yet" -msgstr "" - -msgid "No indicator output for this event yet" -msgstr "" - msgid "Program stage is invalid" msgstr "项目阶段无效" @@ -807,6 +801,11 @@ msgstr "阶段" msgid "Registered events" msgstr "注册的事件" +msgid "" +"The category option is not valid for the selected organisation unit. Please " +"select a valid combination." +msgstr "" + msgid "Please select {{category}}." msgstr "请选择 {{category}}." @@ -920,6 +919,18 @@ msgid "" "relationship" msgstr "离开该页将丢失你创建新关系的所有选择" +msgid "Errors" +msgstr "错误" + +msgid "Feedback" +msgstr "反馈" + +msgid "Indicators" +msgstr "指标" + +msgid "Warnings" +msgstr "错误" + msgid "Show all events" msgstr "显示所有事件" @@ -960,6 +971,12 @@ msgstr "无法检索元数据。请稍后再试。" msgid "The enrollment event data could not be found" msgstr "找不到报名事件数据" +msgid "Loading" +msgstr "载入" + +msgid "An error occurred while loading the form" +msgstr "" + msgid "Possible duplicates found" msgstr "发现可能的重复" @@ -1478,6 +1495,15 @@ msgstr "{{ scheduledEvents }} 已调度" msgid "Stages and Events" msgstr "阶段与活动" +msgid "An error occurred while loading the widget." +msgstr "" + +msgid "View linked event" +msgstr "" + +msgid "Scheduled" +msgstr "已经调度" + msgid "Changelog" msgstr "" @@ -1643,9 +1669,6 @@ msgstr "发生错误。查看日志以获取详细信息" msgid "Scheduled{{ escape }} due {{ time }}" msgstr "调度{{ escape }}到期{{ time }}" -msgid "Scheduled" -msgstr "已经调度" - msgid "Overdue{{ escape }} due {{ time }}" msgstr "逾期{{ escape }}到期{{ time }}" diff --git a/package.json b/package.json index c3b80adee7..ab2107d6f1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "capture-app", "homepage": ".", - "version": "100.76.1", + "version": "101.2.1", "cacheVersion": "7", "serverVersion": "38", "license": "BSD-3-Clause", @@ -10,7 +10,7 @@ "packages/rules-engine" ], "dependencies": { - "@dhis2/rules-engine-javascript": "100.76.1", + "@dhis2/rules-engine-javascript": "101.2.1", "@dhis2/app-runtime": "^3.9.3", "@dhis2/d2-i18n": "^1.1.0", "@dhis2/d2-icons": "^1.0.1", diff --git a/packages/rules-engine/package.json b/packages/rules-engine/package.json index 8e9828f187..25d980d96d 100644 --- a/packages/rules-engine/package.json +++ b/packages/rules-engine/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/rules-engine-javascript", - "version": "100.76.1", + "version": "101.2.1", "license": "BSD-3-Clause", "main": "./build/cjs/index.js", "scripts": { diff --git a/src/core_modules/capture-core-utils/featuresSupport/support.js b/src/core_modules/capture-core-utils/featuresSupport/support.js index 682ec6dd01..637439c74b 100644 --- a/src/core_modules/capture-core-utils/featuresSupport/support.js +++ b/src/core_modules/capture-core-utils/featuresSupport/support.js @@ -1,6 +1,5 @@ // @flow export const FEATURES = Object.freeze({ - programStageWorkingList: 'programStageWorkingList', storeProgramStageWorkingList: 'storeProgramStageWorkingList', multiText: 'multiText', customIcons: 'customIcons', @@ -14,7 +13,6 @@ export const FEATURES = Object.freeze({ // The first minor version that supports the feature const MINOR_VERSION_SUPPORT = Object.freeze({ - [FEATURES.programStageWorkingList]: 39, [FEATURES.storeProgramStageWorkingList]: 40, [FEATURES.multiText]: 41, [FEATURES.customIcons]: 41, diff --git a/src/core_modules/capture-core/components/Buttons/OverflowButton.component.js b/src/core_modules/capture-core/components/Buttons/OverflowButton.component.js index 476e950611..5f20a47c92 100644 --- a/src/core_modules/capture-core/components/Buttons/OverflowButton.component.js +++ b/src/core_modules/capture-core/components/Buttons/OverflowButton.component.js @@ -1,5 +1,6 @@ // @flow import * as React from 'react'; +import i18n from '@dhis2/d2-i18n'; import { useRef, useState } from 'react'; import { Button, Layer, Popper } from '@dhis2/ui'; @@ -42,6 +43,7 @@ export const OverflowButton = ({ return (