Add total time in TimePerActivity component
This commit is contained in:
		
							parent
							
								
									d1b6866c39
								
							
						
					
					
						commit
						a25413affa
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -14,6 +14,7 @@ export default function TimePerRole(): JSX.Element {
 | 
			
		|||
  const [own_work, setOwnWork] = useState<number>(0);
 | 
			
		||||
  const [study, setStudy] = useState<number>(0);
 | 
			
		||||
  const [testing, setTesting] = useState<number>(0);
 | 
			
		||||
  const total = development + meeting + admin + own_work + study + testing;
 | 
			
		||||
 | 
			
		||||
  const token = localStorage.getItem("accessToken") ?? "";
 | 
			
		||||
  const { projectName } = useParams();
 | 
			
		||||
| 
						 | 
				
			
			@ -49,7 +50,7 @@ export default function TimePerRole(): JSX.Element {
 | 
			
		|||
  return (
 | 
			
		||||
    <>
 | 
			
		||||
      <h1 className="font-bold text-[30px] mb-[20px]">
 | 
			
		||||
        Total Time Per Activity In: {projectName}{" "}
 | 
			
		||||
        Total Time Per Activity For All Members In: {projectName}{" "}
 | 
			
		||||
      </h1>
 | 
			
		||||
      <div className="border-4 border-black bg-white flex flex-col justify-start min-h-[65vh] h-fit w-[50vw] rounded-3xl overflow-scroll space-y-[2vh] p-[30px] items-center">
 | 
			
		||||
        <div className="flex flex-col items-center">
 | 
			
		||||
| 
						 | 
				
			
			@ -129,6 +130,12 @@ export default function TimePerRole(): JSX.Element {
 | 
			
		|||
                  />
 | 
			
		||||
                </td>
 | 
			
		||||
              </tr>
 | 
			
		||||
              <tr className="h-[10vh] font-bold font-">
 | 
			
		||||
                <td>In Total:</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                  <h1>{total}</h1>
 | 
			
		||||
                </td>
 | 
			
		||||
              </tr>
 | 
			
		||||
            </tbody>
 | 
			
		||||
          </table>
 | 
			
		||||
        </div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue