diff --git a/src/components/EconomicUnitChangeButton.js b/src/components/EconomicUnitChangeButton.js
index e7e9a3f..e94721f 100644
--- a/src/components/EconomicUnitChangeButton.js
+++ b/src/components/EconomicUnitChangeButton.js
@@ -1,8 +1,8 @@
import React from 'react';
-import { useSelector } from "react-redux";
+import { useSelector } from 'react-redux';
import { makeStyles } from '@material-ui/core/styles';
-import { IconButton, Tooltip } from '@material-ui/core';
+import { Button } from '@material-ui/core';
import { PinDrop } from '@material-ui/icons';
import { useTranslations, useModulesManager } from '@openimis/fe-core';
@@ -11,14 +11,14 @@ import { MODULE_NAME, RIGHT_VIEW_EU_MODAL } from '../constants';
const useStyles = makeStyles((theme) => ({
button: {
margin: theme.spacing(2),
- color: theme.palette.secondary.main,
+ color: theme.palette.primary.main,
},
}));
const EconomicUnitChangeButton = ({ onEconomicDialogOpen }) => {
const classes = useStyles();
const modulesManager = useModulesManager();
- const rights = useSelector((store) => store.core.user?.i_user?.rights ?? [])
+ const rights = useSelector((store) => store.core.user?.i_user?.rights ?? []);
const { formatMessage } = useTranslations(MODULE_NAME, modulesManager);
const economicUnitConfig = modulesManager.getConf(
@@ -30,14 +30,15 @@ const EconomicUnitChangeButton = ({ onEconomicDialogOpen }) => {
if (!economicUnitConfig || !rights.includes(RIGHT_VIEW_EU_MODAL)) return null;
return (
-
- onEconomicDialogOpen()}
- >
-
-
-
+ }
+ className={classes.button}
+ onClick={() => onEconomicDialogOpen()}
+ >
+ {formatMessage('EconomicUnitChangeButton.label')}
+
);
};
diff --git a/src/dialogs/EconomicUnitDialog.js b/src/dialogs/EconomicUnitDialog.js
index e16e67b..1043885 100644
--- a/src/dialogs/EconomicUnitDialog.js
+++ b/src/dialogs/EconomicUnitDialog.js
@@ -6,7 +6,6 @@ import {
Dialog,
DialogActions,
DialogContent,
- DialogContentText,
DialogTitle,
} from '@material-ui/core';
import { makeStyles } from '@material-ui/styles';
@@ -19,6 +18,9 @@ import EconomicUnitPicker from '../pickers/EconomicUnitPicker';
const useStyles = makeStyles((theme) => ({
primaryButton: theme.dialog.primaryButton,
secondaryButton: theme.dialog.secondaryButton,
+ dialogWidth: {
+ minWidth: '360px',
+ }
}));
const EconomicUnitDialog = ({ open, setEconomicUnitDialogOpen }) => {
@@ -68,10 +70,7 @@ const EconomicUnitDialog = ({ open, setEconomicUnitDialogOpen }) => {
return (