Skip to content

Commit

Permalink
chore: self-review
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikhaugstulen committed Oct 17, 2024
1 parent 3d0864e commit b90f061
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
7 changes: 5 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-10-16T14:15:58.172Z\n"
"PO-Revision-Date: 2024-10-16T14:15:58.172Z\n"
"POT-Creation-Date: 2024-10-17T17:11:55.065Z\n"
"PO-Revision-Date: 2024-10-17T17:11:55.065Z\n"

msgid "Choose one or more dates..."
msgstr "Choose one or more dates..."
Expand Down Expand Up @@ -774,6 +774,9 @@ msgstr "Program Stages could not be loaded"
msgid "Stage"
msgstr "Stage"

msgid "Registered events"
msgstr "Registered events"

msgid ""
"The category option is not valid for the selected organisation unit. Please "
"select a valid combination."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ const EnrollmentEditEventPageWithContextPlain = ({
const programStage = [...program.stages?.values()].find(item => item.id === stageId);
const hideWidgets = useHideWidgetByRuleLocations(program.programRules.concat(programStage?.programRules));

const onDeleteTrackedEntitySuccess = useCallback(() => {
history.push(`/?${buildUrlQueryString({ orgUnitId, programId })}`);
}, [history, orgUnitId, programId]);

const onBackToMainPage = useCallback(() => {
history.push(`/?${buildUrlQueryString({ orgUnitId, programId })}`);
}, [history, orgUnitId, programId]);
Expand Down Expand Up @@ -264,7 +268,7 @@ const EnrollmentEditEventPageWithContextPlain = ({
trackedEntityName={trackedEntityName}
program={program}
onDelete={onDelete}
onDeleteTrackedEntitySuccess={onBackToMainPage}
onDeleteTrackedEntitySuccess={onDeleteTrackedEntitySuccess}
onAddNew={onAddNew}
orgUnitId={orgUnitId}
eventDate={eventDate}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import { colors, spacers } from '@dhis2/ui';
import i18n from '@dhis2/d2-i18n';
import React, { type ComponentType } from 'react';
import { withStyles } from '@material-ui/core/styles';
import type { Props } from './eventWorkingListsInitHeader.types';
Expand All @@ -12,11 +13,28 @@ const getStyles = () => ({
borderRadius: 3,
padding: spacers.dp16,
},
headerContainer: {
marginBottom: spacers.dp16,
},
title: {
fontSize: 16,
color: colors.grey800,
fontWeight: 500,
},
});

const EventWorkingListsInitHeaderPlain =
({ children, classes: { container, listContainer } }: Props) => (
({ children, classes: { container, headerContainer, listContainer, title } }: Props) => (
<div className={container}>
<div
className={headerContainer}
>
<span
className={title}
>
{i18n.t('Registered events')}
</span>
</div>
<div
className={listContainer}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ import {
const getStyles = () => ({
listContainer: {
padding: 24,
paddingTop: 10,
display: 'flex',
flexDirection: 'column',
gap: spacers.dp12,
},
container: {
display: 'flex',
Expand Down

0 comments on commit b90f061

Please sign in to comment.