From 44499296da55b2b66eed706398cd0410ddad315a Mon Sep 17 00:00:00 2001 From: Eduardo Peredo Rivero Date: Mon, 14 Oct 2024 11:24:29 -0500 Subject: [PATCH] add back button and update i18n --- i18n/en.pot | 73 ++++++++++++++++++- i18n/es.po | 72 +++++++++++++++++- .../dataset-wizard/DataSetWizard.tsx | 30 +++++--- 3 files changed, 161 insertions(+), 14 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 23f910cb..7169bafa 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-10-01T18:51:44.288Z\n" -"PO-Revision-Date: 2024-10-01T18:51:44.288Z\n" +"POT-Creation-Date: 2024-10-14T16:24:18.021Z\n" +"PO-Revision-Date: 2024-10-14T16:24:18.021Z\n" msgid "edit dataset" msgstr "" @@ -134,6 +134,75 @@ msgstr "" msgid "DataSets removed" msgstr "" +msgid "Setup" +msgstr "" + +msgid "Indicators" +msgstr "" + +msgid "Share" +msgstr "" + +msgid "Summary and Save" +msgstr "" + +msgid "Create" +msgstr "" + +msgid "{{action}} dataSet" +msgstr "" + +msgid "Filters" +msgstr "" + +msgid "Scope" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Theme" +msgstr "" + +msgid "Group" +msgstr "" + +msgid "Disaggregation" +msgstr "" + +msgid "Active Filters" +msgstr "" + +msgid "Selected" +msgstr "" + +msgid "No Selected" +msgstr "" + +msgid "Select Project" +msgstr "" + +msgid "DataSet name" +msgstr "" + +msgid "DataSet description" +msgstr "" + +msgid "Start Date" +msgstr "" + +msgid "End Date" +msgstr "" + +msgid "Select org units" +msgstr "" + +msgid "Please select the regions you want to share this dataSet with" +msgstr "" + +msgid "The dataSet is finished. Press the button Save to save the data" +msgstr "" + msgid "Replace" msgstr "" diff --git a/i18n/es.po b/i18n/es.po index 6555b69a..1eacd645 100644 --- a/i18n/es.po +++ b/i18n/es.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: i18next-conv\n" -"POT-Creation-Date: 2024-10-01T18:51:44.288Z\n" +"POT-Creation-Date: 2024-10-14T16:24:18.021Z\n" "PO-Revision-Date: 2018-10-25T09:02:35.143Z\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -135,6 +135,76 @@ msgstr "" msgid "DataSets removed" msgstr "" +msgid "Setup" +msgstr "" + +msgid "Indicators" +msgstr "" + +msgid "Share" +msgstr "" + +msgid "Summary and Save" +msgstr "" + +msgid "Create" +msgstr "" + +msgid "{{action}} dataSet" +msgstr "" + +msgid "Filters" +msgstr "" + +msgid "Scope" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Theme" +msgstr "" + +msgid "Group" +msgstr "" + +msgid "Disaggregation" +msgstr "" + +msgid "Active Filters" +msgstr "" + +msgid "Selected" +msgstr "" + +msgid "No Selected" +msgstr "" + +msgid "Select Project" +msgstr "" + +msgid "DataSet name" +msgstr "" + +#, fuzzy +msgid "DataSet description" +msgstr "Sección" + +msgid "Start Date" +msgstr "" + +msgid "End Date" +msgstr "" + +msgid "Select org units" +msgstr "" + +msgid "Please select the regions you want to share this dataSet with" +msgstr "" + +msgid "The dataSet is finished. Press the button Save to save the data" +msgstr "" + msgid "Replace" msgstr "" diff --git a/src/webapp/components/dataset-wizard/DataSetWizard.tsx b/src/webapp/components/dataset-wizard/DataSetWizard.tsx index e3845c7c..3bd976c8 100644 --- a/src/webapp/components/dataset-wizard/DataSetWizard.tsx +++ b/src/webapp/components/dataset-wizard/DataSetWizard.tsx @@ -1,13 +1,15 @@ +import React from "react"; import { Wizard, WizardStep } from "@eyeseetea/d2-ui-components"; -import { Grid, Theme, Typography, createStyles } from "@material-ui/core"; +import { Grid, IconButton, Theme, Typography, createStyles } from "@material-ui/core"; import { makeStyles } from "@material-ui/styles"; -import React from "react"; +import ArrowBackIcon from "@material-ui/icons/ArrowBack"; import i18n from "$/utils/i18n"; import { IndicatorsDataSet } from "$/webapp/components/dataset-wizard/IndicatorsDataSet"; import { SetupDataSet } from "$/webapp/components/dataset-wizard/SetupDataSet"; import { ShareOptionsDataSet } from "$/webapp/components/dataset-wizard/ShareOptionsDataSet"; import { SummaryDataSet } from "$/webapp/components/dataset-wizard/SummaryDataSet"; +import { useHistory } from "react-router-dom"; export type DataSetWizardProps = { id?: string }; @@ -36,12 +38,8 @@ const steps = [ const useStyles = makeStyles((theme: Theme) => createStyles({ - root: { - paddingBlock: theme.spacing(2), - }, - titleContainer: { - padding: theme.spacing(1), - }, + root: { paddingBlock: theme.spacing(2) }, + titleContainer: { padding: theme.spacing(1) }, }) ); @@ -51,13 +49,23 @@ export const DataSetWizard = React.memo((props: DataSetWizardProps) => { const actionTitle = isEditing ? i18n.t("Edit") : i18n.t("Create"); const classes = useStyles(); + const history = useHistory(); + + const goBackToHome = React.useCallback(() => { + history.push("/"); + }, []); return ( - - {i18n.t("{{action}} a new dataSet", { action: actionTitle })} - + + + + + + {i18n.t("{{action}} dataSet", { action: actionTitle })} + +