From 0820ce27df66bb24b6e87fd0beee7a3e0a957c0b Mon Sep 17 00:00:00 2001
From: James D'Alton <jda1g15@soton.ac.uk>
Date: Tue, 12 May 2020 16:05:49 +0100
Subject: [PATCH] Edits to form templates table

---
 compforge/src/Components/UserDashboard.react.jsx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/compforge/src/Components/UserDashboard.react.jsx b/compforge/src/Components/UserDashboard.react.jsx
index a341258a..b2b0e224 100644
--- a/compforge/src/Components/UserDashboard.react.jsx
+++ b/compforge/src/Components/UserDashboard.react.jsx
@@ -34,7 +34,6 @@ const UserDashboard = (props) => {
   let { loading } = props;
   let { formtempate } = props;
   let { user } = props;
-  //let { isAdmin } = props;
   let { userId } = props;
   const { dispatch } = props;
   const classes = useStyles();
@@ -112,9 +111,9 @@ const UserDashboard = (props) => {
         </TableCell>
         <TableCell style={{ maxWidth: 360 }} size='small' align="left">{el.description}</TableCell>
         <TableCell align="left">{el.questions.length}</TableCell>
-        <TableCell style={{ minWidth: 100 }} align="left">{moment.unix(el.createdtime?.seconds).format("DD MMM YY")} </TableCell>
+        <TableCell style={{ minWidth: 100 }} align="left">{moment.unix(el.createdtime?.seconds).format("DD/MM/YYYY")} </TableCell>
         <TableCell align="left">{el.createdby}</TableCell>
-        {<TableCell align="left">{el.sharedby && user.email !== el.sharedby ? el.sharedby : '-'}</TableCell>}
+        {<TableCell align="left">{el.sharewith.length !== 0 ? el.sharewith.toString() : '-'}</TableCell>}
         <TableCell style={{ minWidth: 90 }} align="right">
           <div style={{padding: 16, paddingRight: 0}}>
           <VisibilityIcon onClick={() => toggleModalState(el)} 
@@ -139,10 +138,10 @@ const UserDashboard = (props) => {
             <TableRow>
               <TableCell>Title</TableCell>
               <TableCell size='small' align="left">Description</TableCell>
-              <TableCell align="left">Number of Questions</TableCell>
-              <TableCell align="left">Created</TableCell>
-              <TableCell align="left">Created by</TableCell>
-              <TableCell align="left">Shared by</TableCell>
+              <TableCell align="left">Questions</TableCell>
+              <TableCell align="left">Date Created</TableCell>
+              <TableCell align="left">Author</TableCell>
+              <TableCell align="left">Shared with</TableCell>
               <TableCell align="right">Actions</TableCell>
             </TableRow>
           </TableHead>
-- 
GitLab