From 6221ed4a9fa7e2df45612e3cef48775d02ffd481 Mon Sep 17 00:00:00 2001
From: Luis Felipe Risch <lfr20@inf.ufpr.br>
Date: Mon, 9 Nov 2020 12:02:14 -0300
Subject: [PATCH] Removed the text decoration of the links

---
 .../Components/DataCards/ActivityCard.js      |   2 +-
 .../Components/DataCards/InstitutionsCard.js  |   4 +-
 .../Components/DataCards/NoteVarCard.js       |   4 +-
 .../Components/Inputs/CreateInstitution.js    |   4 +-
 .../Components/Inputs/EditLanguage.js         |   2 +-
 .../Components/Inputs/EmailInputs.js          |   4 +-
 .../Components/Inputs/IntitutionsInputs.js    |   2 +-
 .../Components/Inputs/NoteVarInputs.js        |   2 +-
 src/Admin/Pages/Pages/SubPages/Activity.js    | 310 +++++++++---------
 .../Pages/Pages/SubPages/Institutions.js      |   2 +-
 src/Admin/Pages/Pages/SubPages/Languages.js   |   4 +-
 src/Admin/Pages/Pages/SubPages/SendEmail.js   |   4 +-
 12 files changed, 164 insertions(+), 180 deletions(-)

diff --git a/src/Admin/Components/Components/DataCards/ActivityCard.js b/src/Admin/Components/Components/DataCards/ActivityCard.js
index dc6e775c..4cc04b47 100644
--- a/src/Admin/Components/Components/DataCards/ActivityCard.js
+++ b/src/Admin/Components/Components/DataCards/ActivityCard.js
@@ -111,7 +111,7 @@ const ActivityCard = ({ match }) => {
                             color="primary"
                             aria-label="outlined primary button group"
                         >
-                            <Link to={`/admin/activities`}>
+                            <Link style={{textDecoration: 'none'}} to={`/admin/activities`}>
                                 <Button
                                     startIcon={<ListRoundedIcon />}
                                     color="primary"
diff --git a/src/Admin/Components/Components/DataCards/InstitutionsCard.js b/src/Admin/Components/Components/DataCards/InstitutionsCard.js
index ec7ae094..b4278ea2 100644
--- a/src/Admin/Components/Components/DataCards/InstitutionsCard.js
+++ b/src/Admin/Components/Components/DataCards/InstitutionsCard.js
@@ -97,7 +97,7 @@ const InstitutionCard = ({ match }) => {
                             color="primary"
                             aria-label="outlined primary button group"
                         >
-                            <Link to={`/admin/intitutions`}>
+                            <Link style={{textDecoration: 'none'}} to={`/admin/intitutions`}>
                                 <Button
                                     startIcon={<ListRoundedIcon />}
                                     color="primary"
@@ -107,7 +107,7 @@ const InstitutionCard = ({ match }) => {
                                 </Button>
                             </Link>
 
-                            <Link to={`/admin/institutionEdit/${item.id}`}>
+                            <Link style={{textDecoration: 'none'}} to={`/admin/institutionEdit/${item.id}`}>
                                 <Button
                                     startIcon={<EditRoundedIcon/>}
                                     color="primary"
diff --git a/src/Admin/Components/Components/DataCards/NoteVarCard.js b/src/Admin/Components/Components/DataCards/NoteVarCard.js
index cb223af6..d13dcab8 100644
--- a/src/Admin/Components/Components/DataCards/NoteVarCard.js
+++ b/src/Admin/Components/Components/DataCards/NoteVarCard.js
@@ -97,7 +97,7 @@ const NoteCard = ({ match }) => {
                             color="primary"
                             aria-label="outlined primary button group"
                         >
-                            <Link to={`/admin/noteVars`}>
+                            <Link style={{textDecoration: 'none'}} to={`/admin/noteVars`}>
                                 <Button
                                     startIcon={<ListRoundedIcon />}
                                     color="primary"
@@ -107,7 +107,7 @@ const NoteCard = ({ match }) => {
                                 </Button>
                             </Link>
 
-                            <Link to={`/admin/noteVarEdit/${item.id}`}>
+                            <Link style={{textDecoration: 'none'}} to={`/admin/noteVarEdit/${item.id}`}>
                                 <Button
                                     startIcon={<EditRoundedIcon/>}
                                     color="primary"
diff --git a/src/Admin/Components/Components/Inputs/CreateInstitution.js b/src/Admin/Components/Components/Inputs/CreateInstitution.js
index 4c51d975..bda2b549 100644
--- a/src/Admin/Components/Components/Inputs/CreateInstitution.js
+++ b/src/Admin/Components/Components/Inputs/CreateInstitution.js
@@ -205,7 +205,7 @@ const CreateInstitution = (props) => {
                     <Typography variant='h4'>
                         {name}
                     </Typography>
-                    <Link to={'/admin/intitutions'}>
+                    <Link style={{textDecoration: 'none'}} to={'/admin/intitutions'}>
                         <Button
                             onClick={props.BackToList}
                             startIcon={<ListRoundedIcon />}
@@ -213,7 +213,7 @@ const CreateInstitution = (props) => {
                             color='primary'
                         >
                             Listar
-                    </Button>
+                        </Button>
                     </Link>
                 </Grid>
 
diff --git a/src/Admin/Components/Components/Inputs/EditLanguage.js b/src/Admin/Components/Components/Inputs/EditLanguage.js
index 70c692f7..408064ac 100644
--- a/src/Admin/Components/Components/Inputs/EditLanguage.js
+++ b/src/Admin/Components/Components/Inputs/EditLanguage.js
@@ -200,7 +200,7 @@ const EditLanguage = ({ match }) => {
                         <Typography variant='h4'>
                             {name}
                         </Typography>
-                        <Link to={'/admin/languages'}>
+                        <Link style={{textDecoration: 'none'}} to={'/admin/languages'}>
                             <Button
                                 startIcon={<ListRoundedIcon />}
                                 variant='outlined'
diff --git a/src/Admin/Components/Components/Inputs/EmailInputs.js b/src/Admin/Components/Components/Inputs/EmailInputs.js
index 0d7f29e2..d9269f13 100644
--- a/src/Admin/Components/Components/Inputs/EmailInputs.js
+++ b/src/Admin/Components/Components/Inputs/EmailInputs.js
@@ -39,12 +39,12 @@ import JoditEditor from "jodit-react";
 let sendToAll = false;
 let rolesArr = [];
 
-const EmailInputs = () => {
+const EmailInputs = (props) => {
     const [option, setOption] = useState("Todos os usuários"); //labels of the text field 'to'
     const [index, setIndex] = useState(0); //Used to display something above the text field 'to' depending on what the user clicks
 
     // Capture th text insert by the user in the fields
-    const [emails, setEmails] = useState("");
+    const [emails, setEmails] = useState(props.email);
     const [emailsAdress, setEmailsAdress] = useState([]);
     const [subject, setSubject] = useState("");
     const [message, setMessage] = useState("");
diff --git a/src/Admin/Components/Components/Inputs/IntitutionsInputs.js b/src/Admin/Components/Components/Inputs/IntitutionsInputs.js
index a6d30a8b..318c9626 100644
--- a/src/Admin/Components/Components/Inputs/IntitutionsInputs.js
+++ b/src/Admin/Components/Components/Inputs/IntitutionsInputs.js
@@ -239,7 +239,7 @@ const EditInstitution = ({ match }) => {
                             {name}
                         </Typography>
 
-                        <Link to={`/admin/intitutions`}>
+                        <Link style={{textDecoration: 'none'}} to={`/admin/intitutions`}>
                             <Button
                                 startIcon={<ListRoundedIcon />}
                                 color="primary"
diff --git a/src/Admin/Components/Components/Inputs/NoteVarInputs.js b/src/Admin/Components/Components/Inputs/NoteVarInputs.js
index eb2476db..905893fd 100644
--- a/src/Admin/Components/Components/Inputs/NoteVarInputs.js
+++ b/src/Admin/Components/Components/Inputs/NoteVarInputs.js
@@ -238,7 +238,7 @@ const NoteVarInputs = ({ match }) => {
                             {name}
                         </Typography>
 
-                        <Link to={`/admin/noteVars`}>
+                        <Link style={{textDecoration: 'none'}} to={`/admin/noteVars`}>
                             <Button
                                 startIcon={<ListRoundedIcon />}
                                 color="primary"
diff --git a/src/Admin/Pages/Pages/SubPages/Activity.js b/src/Admin/Pages/Pages/SubPages/Activity.js
index 181ac4b4..ac964959 100644
--- a/src/Admin/Pages/Pages/SubPages/Activity.js
+++ b/src/Admin/Pages/Pages/SubPages/Activity.js
@@ -38,7 +38,7 @@ import UpdateRoundedIcon from "@material-ui/icons/UpdateRounded";
 import FilterListRoundedIcon from "@material-ui/icons/FilterListRounded";
 import VisibilityIcon from "@material-ui/icons/Visibility";
 //routers
-import {Link} from 'react-router-dom';
+import { Link } from 'react-router-dom';
 
 let currPage = 0;
 let viewItem = {};
@@ -78,7 +78,6 @@ const Activity = () => {
     const [isLoadingMoreItems, setIsLoadingMoreItems] = useState(false); //controlls the state of loadind more data
     const [isUpdating, setIsUpdating] = useState(false); //controlls the state of updating data
 
-    const [showDataActivity, setShowDataActivity] = useState(false);
     const [showFilter, setShowFilter] = useState(false);
 
     const [option, setOption] = useState("Todos os usuários"); //labels of the text field 'to'
@@ -176,11 +175,6 @@ const Activity = () => {
         });
     };
 
-    const HandleButtonViewClicked = (i) => {
-        viewItem = { ...items[i] };
-        setShowDataActivity(true);
-    };
-
     const handleChange = (e) => {
         const value = e.target.value;
         console.log(value);
@@ -243,166 +237,158 @@ const Activity = () => {
         return <div>Loading...</div>;
     } else {
 
-        return showDataActivity ? (
-            <EditLanguage
-                editInfo={viewItem}
-                UpdateList={UpdateHandler}
-                BackToList={() => setShowDataActivity(false)}
+        return <>
+            <SnackBar
+                severity={snackInfo.icon}
+                text={snackInfo.message}
+                snackbarOpen={snackInfo.open}
+                color={snackInfo.color}
+                handleClose={() =>
+                    setSnackInfo({
+                        message: "",
+                        icon: "",
+                        open: false,
+                        color: "",
+                    })
+                }
             />
-        ) : (
-                <>
-                    <SnackBar
-                        severity={snackInfo.icon}
-                        text={snackInfo.message}
-                        snackbarOpen={snackInfo.open}
-                        color={snackInfo.color}
-                        handleClose={() =>
-                            setSnackInfo({
-                                message: "",
-                                icon: "",
-                                open: false,
-                                color: "",
-                            })
-                        }
-                    />
-
-                    <Paper style={{ padding: "1em" }}>
-                        <Grid container spacing={3} direction="row" alignItems="center">
-                            <Grid item xs={6}>
-                                <Typography variant="h4">Atividades</Typography>
+
+            <Paper style={{ padding: "1em" }}>
+                <Grid container spacing={3} direction="row" alignItems="center">
+                    <Grid item xs={6}>
+                        <Typography variant="h4">Atividades</Typography>
+                    </Grid>
+                    <Grid
+                        item
+                        xs={6}
+                        alignItems="center"
+                        justify="center"
+                        direction="row"
+                    >
+                        <Grid container justify="flex-end" spacing={3}>
+                            <Grid item>
+                                <Button
+                                    variant="contained"
+                                    color="secondary"
+                                    disabled={isUpdating}
+                                    onClick={() => {
+                                        currPage = 0;
+                                        UpdateHandler(
+                                            Url("activities", "", `${currPage}`, "DESC")
+                                        );
+                                    }}
+                                    startIcon={<UpdateRoundedIcon />}
+                                >
+                                    {isUpdating ? <CircularProgress size={24} /> : "Atualizar"}
+                                </Button>
                             </Grid>
-                            <Grid
-                                item
-                                xs={6}
-                                alignItems="center"
-                                justify="center"
-                                direction="row"
-                            >
-                                <Grid container justify="flex-end" spacing={3}>
-                                    <Grid item>
-                                        <Button
-                                            variant="contained"
-                                            color="secondary"
-                                            disabled={isUpdating}
-                                            onClick={() => {
-                                                currPage = 0;
-                                                UpdateHandler(
-                                                    Url("activities", "", `${currPage}`, "DESC")
-                                                );
-                                            }}
-                                            startIcon={<UpdateRoundedIcon />}
-                                        >
-                                            {isUpdating ? <CircularProgress size={24} /> : "Atualizar"}
-                                        </Button>
-                                    </Grid>
-                                    <Grid item>
-                                        <Button
-                                            variant="contained"
-                                            color="secondary"
-                                            onClick={() => {
-                                                currPage = 0;
-                                                UpdateHandler(
-                                                    Url("activities", "", `${currPage}`, "DESC")
-                                                );
-                                                setShowFilter(!showFilter);
-                                            }}
-                                            startIcon={<FilterListRoundedIcon />}
-                                        >
-                                            Filtrar
-                                        </Button>
-                                    </Grid>
-                                </Grid>
+                            <Grid item>
+                                <Button
+                                    variant="contained"
+                                    color="secondary"
+                                    onClick={() => {
+                                        currPage = 0;
+                                        UpdateHandler(
+                                            Url("activities", "", `${currPage}`, "DESC")
+                                        );
+                                        setShowFilter(!showFilter);
+                                    }}
+                                    startIcon={<FilterListRoundedIcon />}
+                                >
+                                    Filtrar
+                            </Button>
                             </Grid>
                         </Grid>
-
-                        {showFilter ? (
-                            <>
-                                <div style={{ height: "1em" }}></div>
-
-                                <div style={{ alignSelf: "flex-end" }}>
-                                    <TextField
-                                        select
-                                        label="Filtro"
-                                        value={option ? option : ""}
-                                        onChange={handleChange}
-                                        helperText="Por favor, selecione uma das opções"
+                    </Grid>
+                </Grid>
+
+                {showFilter ? (
+                    <>
+                        <div style={{ height: "1em" }}></div>
+
+                        <div style={{ alignSelf: "flex-end" }}>
+                            <TextField
+                                select
+                                label="Filtro"
+                                value={option ? option : ""}
+                                onChange={handleChange}
+                                helperText="Por favor, selecione uma das opções"
+                            >
+                                {options.map((option, index) => (
+                                    <MenuItem
+                                        key={option.value}
+                                        value={option.value}
                                     >
-                                        {options.map((option, index) => (
-                                            <MenuItem
-                                                key={option.value}
-                                                value={option.value}
-                                            >
-                                                {option.label}
-                                            </MenuItem>
-                                        ))}
-                                    </TextField>
-                                </div>
-                            </>
-                        ) : null}
-                    </Paper>
-
-                    <div style={{ height: "2em" }}></div>
-
-                    <TableData top={TOP_LABELS}>
-                        <TableBody>
-                            {items.map((row, index) =>
-                                index === items.length - 1 ? (
-                                    <StyledTableRow style={{ padding: "1em" }}>
-                                        {/* Button to load more data */}
-                                        <Button
-                                            color="primary"
-                                            variant="text"
-                                            // disabled={isLoadingMoreItems}
-                                            startIcon={<AddRoundedIcon />}
-                                            disabled={isLoadingMoreItems}
-                                            onClick={() => {
-                                                currPage++;
-                                                if (showFilter) {
-                                                    LoadMoreItens(
-                                                        Url("activities", `"privacy" : "${option}"`, `${currPage}`, "DESC")
-                                                    );
-                                                } else {
-                                                    LoadMoreItens(
-                                                        Url("activities", "", `${currPage}`, "DESC")
-                                                    );
-                                                }
-                                            }}
-                                        >
-                                            {isLoadingMoreItems ? (
-                                                <CircularProgress size={24} />
-                                            ) : (
-                                                    "Carregar mais itens"
-                                                )}
-                                        </Button>
-                                    </StyledTableRow>
-                                ) : (
-                                        <StyledTableRow key={index}>
-                                            <StyledTableCell component="th" scope="row">
-                                                {row.created_at}
-                                            </StyledTableCell>
-                                            <StyledTableCell align="right">
-                                                {
-                                                    row.owner === null ? '' : row.owner.name
-                                                }
-                                            </StyledTableCell>
-                                            <StyledTableCell align="right">
-                                                {row.activity}
-                                            </StyledTableCell>
-                                            <StyledTableCell align="right">{row.privacy}</StyledTableCell>
-                                            <StyledTableCell align="right">
-                                                <Link to={`/admin/activity/${row.id}`}>
-                                                    <IconButton>
-                                                        <VisibilityIcon style={{ fill: "#00bcd4" }} />
-                                                    </IconButton>
-                                                </Link>
-                                            </StyledTableCell>
-                                        </StyledTableRow>
-                                    )
-                            )}
-                        </TableBody>
-                    </TableData>
-                </>
-            );
+                                        {option.label}
+                                    </MenuItem>
+                                ))}
+                            </TextField>
+                        </div>
+                    </>
+                ) : null}
+            </Paper>
+
+            <div style={{ height: "2em" }}></div>
+
+            <TableData top={TOP_LABELS}>
+                <TableBody>
+                    {items.map((row, index) =>
+                        index === items.length - 1 ? (
+                            <StyledTableRow style={{ padding: "1em" }}>
+                                {/* Button to load more data */}
+                                <Button
+                                    color="primary"
+                                    variant="text"
+                                    // disabled={isLoadingMoreItems}
+                                    startIcon={<AddRoundedIcon />}
+                                    disabled={isLoadingMoreItems}
+                                    onClick={() => {
+                                        currPage++;
+                                        if (showFilter) {
+                                            LoadMoreItens(
+                                                Url("activities", `"privacy" : "${option}"`, `${currPage}`, "DESC")
+                                            );
+                                        } else {
+                                            LoadMoreItens(
+                                                Url("activities", "", `${currPage}`, "DESC")
+                                            );
+                                        }
+                                    }}
+                                >
+                                    {isLoadingMoreItems ? (
+                                        <CircularProgress size={24} />
+                                    ) : (
+                                            "Carregar mais itens"
+                                        )}
+                                </Button>
+                            </StyledTableRow>
+                        ) : (
+                                <StyledTableRow key={index}>
+                                    <StyledTableCell component="th" scope="row">
+                                        {row.created_at}
+                                    </StyledTableCell>
+                                    <StyledTableCell align="right">
+                                        {
+                                            row.owner === null ? '' : row.owner.name
+                                        }
+                                    </StyledTableCell>
+                                    <StyledTableCell align="right">
+                                        {row.activity}
+                                    </StyledTableCell>
+                                    <StyledTableCell align="right">{row.privacy}</StyledTableCell>
+                                    <StyledTableCell align="right">
+                                        <Link to={`/admin/activity/${row.id}`}>
+                                            <IconButton>
+                                                <VisibilityIcon style={{ fill: "#00bcd4" }} />
+                                            </IconButton>
+                                        </Link>
+                                    </StyledTableCell>
+                                </StyledTableRow>
+                            )
+                    )}
+                </TableBody>
+            </TableData>
+        </>
     }
 };
 export default Activity;
diff --git a/src/Admin/Pages/Pages/SubPages/Institutions.js b/src/Admin/Pages/Pages/SubPages/Institutions.js
index 0e693386..2be90345 100644
--- a/src/Admin/Pages/Pages/SubPages/Institutions.js
+++ b/src/Admin/Pages/Pages/SubPages/Institutions.js
@@ -468,7 +468,7 @@ const Institutions = () => {
                                 </Grid>
 
                                 <Grid item>
-                                    <Link to={'/admin/InstitutionCreate'}>
+                                    <Link style={{textDecoration: 'none'}} to={'/admin/InstitutionCreate'}>
                                         <Button
                                             variant="contained"
                                             color="secondary"
diff --git a/src/Admin/Pages/Pages/SubPages/Languages.js b/src/Admin/Pages/Pages/SubPages/Languages.js
index 6e11b7aa..72eb06b9 100644
--- a/src/Admin/Pages/Pages/SubPages/Languages.js
+++ b/src/Admin/Pages/Pages/SubPages/Languages.js
@@ -21,8 +21,6 @@ import React, { useEffect, useState } from 'react'
 import TableData from '../../../Components/Components/Table';
 import SnackBar from '../../../../Components/SnackbarComponent';
 import AlertDialog from "../../../Components/Components/AlertDialog";
-import CreateLanguage from '../../../Components/Components/Inputs/CreateLanguage';
-import EditLanguage from '../../../Components/Components/Inputs/EditLanguage';
 import { Url } from '../../../Filters';
 import { GetFullList, Delete } from '../../../Services';
 import { DeleteFilter } from '../../../Filters';
@@ -259,7 +257,7 @@ const Languages = () => {
                                 </Grid>
                                 <Grid item>
 
-                                    <Link to={'/admin/languageCreate'}>
+                                    <Link style={{textDecoration: 'none'}} to={'/admin/languageCreate'}>
                                         <Button
                                             variant="contained"
                                             color="secondary"
diff --git a/src/Admin/Pages/Pages/SubPages/SendEmail.js b/src/Admin/Pages/Pages/SubPages/SendEmail.js
index bbd052d5..e0e3e5f7 100644
--- a/src/Admin/Pages/Pages/SubPages/SendEmail.js
+++ b/src/Admin/Pages/Pages/SubPages/SendEmail.js
@@ -55,7 +55,7 @@ const useStyles = makeStyles({
 });
 
 export { useStyles };
-const SendEmail = () => {
+const SendEmail = ({match}) => {
     const classes = useStyles();
     return (
         <Card className={classes.root} variant="outlined">
@@ -67,7 +67,7 @@ const SendEmail = () => {
                 >
                     Enviar email
                 </Typography> 
-                <EmailInputs/>
+                <EmailInputs email={`${match.params.email}`}/>
             </CardContent>
         </Card>
     );
-- 
GitLab