From 587edc47352fa020efc27de9599221e4c2781eb8 Mon Sep 17 00:00:00 2001 From: Joseph John Aas Cooper Date: Wed, 21 Aug 2024 10:11:05 +0200 Subject: [PATCH 1/3] fix: [DHIS2-17651] enrollment dashboard UI changes --- i18n/en.pot | 7 +- .../Stages/Stage/Stage.component.js | 8 +- .../StageDetail/StageDetail.component.js | 115 +++++++++++------- .../StageOverview/StageOverview.component.js | 111 ++++++++++------- 4 files changed, 141 insertions(+), 100 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index a24932402c..e2529780bb 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-19T11:57:54.710Z\n" +"PO-Revision-Date: 2024-08-19T11:57:54.710Z\n" msgid "Choose one or more dates..." msgstr "Choose one or more dates..." @@ -1517,9 +1517,6 @@ msgstr "To open this event, please wait until saving is complete" msgid "Show {{ rest }} more" msgstr "Show {{ rest }} more" -msgid "Reset list" -msgstr "Reset list" - msgid "Go to full {{ eventName }}" msgstr "Go to full {{ eventName }}" diff --git a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/Stage.component.js b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/Stage.component.js index d76690c7eb..62b37d9a06 100644 --- a/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/Stage.component.js +++ b/src/core_modules/capture-core/components/WidgetStagesAndEvents/Stages/Stage/Stage.component.js @@ -3,7 +3,7 @@ import React, { type ComponentType, useState, useCallback } from 'react'; import cx from 'classnames'; import i18n from '@dhis2/d2-i18n'; import { withStyles } from '@material-ui/core'; -import { spacersNum, colors, IconAdd16, Button } from '@dhis2/ui'; +import { spacersNum, IconAdd16, Button } from '@dhis2/ui'; import { StageOverview } from './StageOverview'; import type { Props } from './stage.types'; import { Widget } from '../../../Widget'; @@ -13,10 +13,10 @@ const styles = { overview: { marginLeft: spacersNum.dp16, marginRight: spacersNum.dp16, - borderTop: `1px solid ${colors.grey300}`, + marginBottom: spacersNum.dp24, }, button: { - margin: `0 ${spacersNum.dp16}px ${spacersNum.dp16}px ${spacersNum.dp16}px`, + margin: `0 ${spacersNum.dp12}px ${spacersNum.dp8}px ${spacersNum.dp12}px`, }, buttonRow: { display: 'flex', @@ -50,7 +50,6 @@ export const StagePlain = ({ stage, events, classes, className, onCreateNew, rul description={description} events={events} />} - borderless onOpen={handleOpen} onClose={handleClose} open={open} @@ -69,7 +68,6 @@ export const StagePlain = ({ stage, events, classes, className, onCreateNew, rul /> : ( + : null); - const renderResetButton = () => (displayedRowNumber > DEFAULT_NUMBER_OF_ROW ? : null); - const renderViewAllButton = () => (events.length > 1 ?