Commit 7dce54bc authored by Filip Hujer's avatar Filip Hujer Committed by Michal Čížek
Browse files

Add button for create event

parent fc4c1936
......@@ -23,7 +23,7 @@ import {DeleteValues} from "./event-types";
import {useNavigate} from "react-router-dom";
import {useDialog} from "../../context/dialog/dialog-context";
import {ConfirmDialog} from "../../components/dialogs/confirm-dialog/confirm-dialog";
import {BuildingStore, ChevronDown, ChevronUp, Edit, Search, Selector, Trash,} from "tabler-icons-react";
import {BuildingStore, ChevronDown, ChevronUp, Edit, Search, Selector, Trash, Plus} from "tabler-icons-react";
export const Events = () => {
const navigate = useNavigate();
......@@ -282,13 +282,23 @@ export const Events = () => {
return (
<Container sx={{ height: "100%", marginTop: "1rem" }}>
<ScrollArea>
<TextInput
placeholder="Search by any field"
mb="md"
icon={<Search size={14} />}
value={search}
onChange={handleSearchChange}
/>
<Container sx={{ display: "flex", flexDirection: "row", justifyContent: 'space-between'}}>
<TextInput
sx={{ width: "100%", paddingRight: "1rem"}}
placeholder="Search by any field"
mb="md"
icon={<Search size={14} />}
value={search}
onChange={handleSearchChange}
/>
{user !== undefined && user.userRole === 'MANAGER' ? <Button
variant="outline"
leftIcon={<Plus />}
onClick={() => navigate(`/events/create`)}
>
Add Event
</Button> : <th/>}
</Container>
<Table
horizontalSpacing="md"
verticalSpacing="xs"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment