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"; ...@@ -23,7 +23,7 @@ import {DeleteValues} from "./event-types";
import {useNavigate} from "react-router-dom"; import {useNavigate} from "react-router-dom";
import {useDialog} from "../../context/dialog/dialog-context"; import {useDialog} from "../../context/dialog/dialog-context";
import {ConfirmDialog} from "../../components/dialogs/confirm-dialog/confirm-dialog"; 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 = () => { export const Events = () => {
const navigate = useNavigate(); const navigate = useNavigate();
...@@ -282,13 +282,23 @@ export const Events = () => { ...@@ -282,13 +282,23 @@ export const Events = () => {
return ( return (
<Container sx={{ height: "100%", marginTop: "1rem" }}> <Container sx={{ height: "100%", marginTop: "1rem" }}>
<ScrollArea> <ScrollArea>
<TextInput <Container sx={{ display: "flex", flexDirection: "row", justifyContent: 'space-between'}}>
placeholder="Search by any field" <TextInput
mb="md" sx={{ width: "100%", paddingRight: "1rem"}}
icon={<Search size={14} />} placeholder="Search by any field"
value={search} mb="md"
onChange={handleSearchChange} 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 <Table
horizontalSpacing="md" horizontalSpacing="md"
verticalSpacing="xs" 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