diff --git a/typescript/Frontend/src/App.css b/typescript/Frontend/src/App.css index 74b5e0534..cde4cdc47 100644 --- a/typescript/Frontend/src/App.css +++ b/typescript/Frontend/src/App.css @@ -28,6 +28,7 @@ color: #61dafb; } + @keyframes App-logo-spin { from { transform: rotate(0deg); diff --git a/typescript/Frontend/src/App.tsx b/typescript/Frontend/src/App.tsx index f4ba7f761..c1aa3f5a7 100644 --- a/typescript/Frontend/src/App.tsx +++ b/typescript/Frontend/src/App.tsx @@ -35,18 +35,12 @@ const App = () => { locale={language} defaultLocale="EN" > - + - + diff --git a/typescript/Frontend/src/components/Context/UserContextProvider.tsx b/typescript/Frontend/src/components/Context/UserContextProvider.tsx new file mode 100644 index 000000000..9b18056d2 --- /dev/null +++ b/typescript/Frontend/src/components/Context/UserContextProvider.tsx @@ -0,0 +1,24 @@ +import { createContext, ReactNode, useState } from "react"; +import { I_User } from "../../util/user.util"; + +interface InstallationContextProviderProps { + currentUser?: I_User; + setCurrentUser: (value: I_User) => void; +} + +export const UserContext = createContext({ + currentUser: {} as I_User, + setCurrentUser: () => {}, +}); + +const UserContextProvider = ({ children }: { children: ReactNode }) => { + const [currentUser, setCurrentUser] = useState(); + + return ( + + {children} + + ); +}; + +export default UserContextProvider; diff --git a/typescript/Frontend/src/components/Groups/AccessManagement/AccessManagement.tsx b/typescript/Frontend/src/components/Groups/AccessManagement/AccessManagement.tsx index d828e0922..8e0fcd5a0 100644 --- a/typescript/Frontend/src/components/Groups/AccessManagement/AccessManagement.tsx +++ b/typescript/Frontend/src/components/Groups/AccessManagement/AccessManagement.tsx @@ -11,7 +11,7 @@ const AccessManagement = () => { - + diff --git a/typescript/Frontend/src/components/Groups/AccessManagement/AvailableUserDialog.tsx b/typescript/Frontend/src/components/Groups/AccessManagement/AvailableUserDialog.tsx index 871f1932c..7859a03e2 100644 --- a/typescript/Frontend/src/components/Groups/AccessManagement/AvailableUserDialog.tsx +++ b/typescript/Frontend/src/components/Groups/AccessManagement/AvailableUserDialog.tsx @@ -48,6 +48,7 @@ const AvailableUserDialog = () => { return ( <> setOpen(false)} aria-labelledby="customized-dialog-title" open={open} @@ -57,12 +58,14 @@ const AvailableUserDialog = () => { }} scroll="paper" > - Create new folder - + + Create new folder + + option.name} renderInput={(params) => ( @@ -76,8 +79,9 @@ const AvailableUserDialog = () => { onChange={(event, values) => setSelectedUsers(values)} /> - + { - setOpen(true)}> + setOpen(true)} + > diff --git a/typescript/Frontend/src/components/Groups/AccessManagement/InnovenergyList.tsx b/typescript/Frontend/src/components/Groups/AccessManagement/InnovenergyList.tsx index 7b1290e98..ddf0607a7 100644 --- a/typescript/Frontend/src/components/Groups/AccessManagement/InnovenergyList.tsx +++ b/typescript/Frontend/src/components/Groups/AccessManagement/InnovenergyList.tsx @@ -1,7 +1,12 @@ import { List } from "@mui/material"; import { ReactNode } from "react"; -const InnovenergyList = ({ children }: { children: ReactNode }) => { +interface InnovenergyListProps { + id: string; + children: ReactNode; +} + +const InnovenergyList = (props: InnovenergyListProps) => { return ( { component="nav" aria-labelledby="nested-list-subheader" > - {children} + {props.children} ); }; diff --git a/typescript/Frontend/src/components/Groups/AccessManagement/UsersWithDirectAccess.tsx b/typescript/Frontend/src/components/Groups/AccessManagement/UsersWithDirectAccess.tsx index ee52dc624..217fe4283 100644 --- a/typescript/Frontend/src/components/Groups/AccessManagement/UsersWithDirectAccess.tsx +++ b/typescript/Frontend/src/components/Groups/AccessManagement/UsersWithDirectAccess.tsx @@ -43,21 +43,30 @@ const UsersWithDirectAccess = () => { return ( handleIconClick(user.id)} edge="end" > - + } > - - - + + + - + diff --git a/typescript/Frontend/src/components/Groups/AccessManagement/UsersWithInheritedAccess.tsx b/typescript/Frontend/src/components/Groups/AccessManagement/UsersWithInheritedAccess.tsx index 60f20865f..bfa8caaea 100644 --- a/typescript/Frontend/src/components/Groups/AccessManagement/UsersWithInheritedAccess.tsx +++ b/typescript/Frontend/src/components/Groups/AccessManagement/UsersWithInheritedAccess.tsx @@ -30,18 +30,24 @@ const UsersWithInheritedAccess = () => { ({ user, folderName }: UserWithInheritedAccess) => { return ( - - - - + + + + Inherited access from{" "} ; sx?: SxProps | undefined; + id?: string; } const InnovenergyButton = (props: I_InnovenergyButtonProps) => { return (