commit 1a58c2449a58c4669bb8a6b60ddf3f38243b7db2
Author: plundrichov <monika.plundrichova@yoso.fi>
Date:   Fri Jul 10 10:24:02 2020 +0200

    re #58 names edited

diff --git a/client/src/App.js b/client/src/App.js
index 4487149..cc1cfeb 100644
--- a/client/src/App.js
+++ b/client/src/App.js
@@ -57,13 +57,13 @@ function App() {
 }
 
 const Home = (props) => {
-  const [userRequest, setUser] = useState([]);
+  const [user, setUser] = useState([]);
 
-  const [acceptedRequest, setRequest] = useState([]);
+  const [acceptedRequest, setAcceptedRequest] = useState([]);
 
   useEffect(() => {
-    const dataUserRequest = getDataUserRequest();
-    setUser(dataUserRequest);
+    const datauser = getDatauser();
+    setUser(datauser);
   }, []);
 
   // OverviewAdmin state 
@@ -77,7 +77,7 @@ const Home = (props) => {
     }
  ]);
 
-  function getDataUserRequest() {
+  function getDatauser() {
     return ([]);
   }
   
@@ -86,11 +86,11 @@ const Home = (props) => {
       <div className="main-content">
         {props.userName.role === 'EMPLOYER'
         ? 
-          <UpcomingRequests userRequest={userRequest} setUser={setUser} acceptedRequest={acceptedRequest} setRequest={setRequest} setEmployees={setEmployees}/>
+          <UpcomingRequests user={user} setUser={setUser} acceptedRequest={acceptedRequest} setAcceptedRequest={setAcceptedRequest} setEmployees={setEmployees}/>
         : 
-          <YourRequests userRequest={userRequest} setUser={setUser} acceptedRequest={acceptedRequest} setRequest={setRequest} userName={props.userName}/>
+          <YourRequests user={user} setUser={setUser} acceptedRequest={acceptedRequest} setAcceptedRequest={setAcceptedRequest} userName={props.userName}/>
         }
-        <Calendar setUser={setUser} userRequest={userRequest} acceptedRequest={acceptedRequest} setRequest={setRequest} userName={props.userName} setEmployees={setEmployees} setUserName={props.setUserName}/> 
+        <Calendar setUser={setUser} user={user} acceptedRequest={acceptedRequest} setAcceptedRequest={setAcceptedRequest} userName={props.userName} setEmployees={setEmployees} setUserName={props.setUserName}/> 
       </div>
       {props.userName.role === 'EMPLOYER'
       ?
diff --git a/client/src/Calendar.js b/client/src/Calendar.js
index 8644807..2d1d444 100644
--- a/client/src/Calendar.js
+++ b/client/src/Calendar.js
@@ -17,13 +17,13 @@ function Calendar(props) {
       props.userName.role === 'EMPLOYER'
         ?
           api_fetch.getAdminCalendar().then(adminCalendar => { 
-            props.setRequest(adminCalendar);
+            props.setAcceptedRequest(adminCalendar);
           }).catch(reason => {
             alert(reason)
           })
         :
           api_fetch.getUserCalendar(props.userName, todayTwo).then(userCalendar => {
-            props.setRequest(userCalendar);
+            props.setAcceptedRequest(userCalendar);
           }).catch(reason => {
             alert(reason)
           });
@@ -104,7 +104,7 @@ const addEventAdmin = async (e) => {
       start: whatDate      
   }
   //concat new request to current ones
-      props.setRequest((acceptedRequest) => acceptedRequest.concat(userProps))
+      props.setAcceptedRequest((acceptedRequest) => acceptedRequest.concat(userProps))
   }).catch(reason => {
       alert(reason)
   });
diff --git a/client/src/UpcomingRequests.js b/client/src/UpcomingRequests.js
index 4fd646b..95d464c 100644
--- a/client/src/UpcomingRequests.js
+++ b/client/src/UpcomingRequests.js
@@ -64,7 +64,7 @@ function convertVacationType(vacationType) {
               start: user.start
         }
         //concat new request to current ones
-          props.setRequest((acceptedRequest) => acceptedRequest.concat(userProps))
+          props.setAcceptedRequest((acceptedRequest) => acceptedRequest.concat(userProps))
         //request accept button
           props.setUser((pendingRequest) => pendingRequest.filter((item) => item !== user));
       })
@@ -102,7 +102,7 @@ function convertVacationType(vacationType) {
       <div className="offs-items column">
         <div className="offs-item row">
           <table>
-            {/* {props.userRequest.length > 0 
+            {/* {props.user.length > 0 
             ? */}
             <tbody>
               <tr>
@@ -110,7 +110,7 @@ function convertVacationType(vacationType) {
                 <th>Type</th>
                 <th>Date</th>    
               </tr>
-              {props.userRequest.map(user => (
+              {props.user.map(user => (
               <tr>
                 <td>{user.title}</td>
                 <td>{user.type}</td>    
diff --git a/client/src/YourRequests.js b/client/src/YourRequests.js
index 4b07b51..abfc65f 100644
--- a/client/src/YourRequests.js
+++ b/client/src/YourRequests.js
@@ -50,7 +50,7 @@ function convertVacationType(vacationType) {
       <div className="offs-items column">
         <div className="offs-item row">
           <table>
-            {props.userRequest.length > 0 ?
+            {props.user.length > 0 ?
             
             <tbody>
               <tr>
@@ -59,7 +59,7 @@ function convertVacationType(vacationType) {
                 <th>Date</th>    
                 <th>Status</th>    
               </tr>
-              {props.userRequest.map(user => (
+              {props.user.map(user => (
                 <tr key={user.id}>
                 <td>{user.title}</td>
                 <td>{user.type}</td>    
