From d1fb48f7fefdd9af519918c6dd8ad498503e676f Mon Sep 17 00:00:00 2001 From: wrzesinski-hubert Date: Sat, 23 Jan 2021 22:02:41 +0100 Subject: [PATCH] ... --- src/components/Dropdown.tsx | 7 ++++--- src/components/Scheduler.tsx | 3 +-- src/components/SchedulerRow.tsx | 1 + src/components/SelectMenu.tsx | 1 + src/components/Topbar.tsx | 18 +++++++++++------- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx index 059e667..8bdefb8 100644 --- a/src/components/Dropdown.tsx +++ b/src/components/Dropdown.tsx @@ -105,7 +105,8 @@ export const Dropdown = ({ open, input, handleCloseDropdown, selectedOption }: D input .toLowerCase() .normalize('NFD') - .replace(/[\u0300-\u036f]/g, ''), + .replace(/[\u0300-\u036f]/g, '') + .replace(/\s/g, ''), ), ); setFilteredStudents(filteredUsers); @@ -119,9 +120,9 @@ export const Dropdown = ({ open, input, handleCloseDropdown, selectedOption }: D <> {selectedOption === 'studenci' ? (
- {filteredStudents.map(({ email, id }, index) => ( + {filteredStudents.map(({ surname, name, id }, index) => ( -

{email}

+

{name} {surname}

))}
diff --git a/src/components/Scheduler.tsx b/src/components/Scheduler.tsx index 4fc1b56..7addfd9 100644 --- a/src/components/Scheduler.tsx +++ b/src/components/Scheduler.tsx @@ -5,8 +5,7 @@ import { days, hours } from '../constants/index'; import styled from 'styled-components/macro'; import { SchedulerEvent } from '../types'; import { coursesContext } from '../contexts/CoursesProvider'; -import Button from '@material-ui/core/Button'; -import Tooltip, { TooltipProps } from '@material-ui/core/Tooltip'; +import Tooltip from '@material-ui/core/Tooltip'; const SchedulerWrapper = styled.div` border-collapse: collapse; diff --git a/src/components/SchedulerRow.tsx b/src/components/SchedulerRow.tsx index 2adf71c..2e53371 100644 --- a/src/components/SchedulerRow.tsx +++ b/src/components/SchedulerRow.tsx @@ -204,6 +204,7 @@ export const SchedulerRow = ({ groups, indexRow, rowTop, cellWidth, cellHeight } ) : ( + {groups[index].isAccepted===true && }
{groups[index].takenPlaces}/{groups[index].capacity}
diff --git a/src/components/SelectMenu.tsx b/src/components/SelectMenu.tsx index 547f070..639832a 100644 --- a/src/components/SelectMenu.tsx +++ b/src/components/SelectMenu.tsx @@ -24,6 +24,7 @@ const Wrapper = styled.div` border-top-left-radius: 6px; border-bottom-left-radius: 6px; user-select: none; + z-index:100; `; const Header = styled.div` display: flex; diff --git a/src/components/Topbar.tsx b/src/components/Topbar.tsx index 6ae57f9..27d24f6 100644 --- a/src/components/Topbar.tsx +++ b/src/components/Topbar.tsx @@ -9,8 +9,7 @@ import ClickAwayListener from 'react-click-away-listener'; import { SelectMenu } from './SelectMenu'; import { studentsContext } from '../contexts/StudentsProvider'; import { CASContext } from '../contexts/CASProvider'; -import { render } from 'react-dom'; -import { coursesContext } from '../contexts/CoursesProvider'; +import Tooltip from '@material-ui/core/Tooltip'; const Topbar = styled.div` background-color: #e3e5ed; @@ -113,8 +112,6 @@ const IconWrapper = styled.div` margin-right: 10px; `; - - const Icon = styled.img` width: 40px; margin-left: 40px; @@ -217,11 +214,18 @@ export default function ({ handleTransfer }: TopbarProps) { - {selectedStudent?.email.replace(/@st.amu.edu.pl/, '')} + {selectedStudent?.surname} {/* Maciej GÅ‚owacki */} - {userPrivilige === 'STUDENT' && } + {userPrivilige === 'STUDENT' && ( + + + + )} {/* */} - + + + + {/* */}