Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Michal Čížek
flea-market-manager
Commits
7dce54bc
Commit
7dce54bc
authored
May 25, 2022
by
Filip Hujer
Committed by
Michal Čížek
May 25, 2022
Browse files
Add button for create event
parent
fc4c1936
Changes
1
Hide whitespace changes
Inline
Side-by-side
frontend/src/modules/events/events.tsx
View file @
7dce54bc
...
@@ -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"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment