Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SSSLRuhatar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bsanyi1998
SSSLRuhatar
Commits
755ee6b5
Commit
755ee6b5
authored
Oct 18, 2021
by
Bendegúz Cseresnyés
Browse files
Options
Downloads
Patches
Plain Diff
Format guest page
parent
2713da0f
No related branches found
No related tags found
1 merge request
!2
Dev ui
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/PlacementCard.tsx
+31
-0
31 additions, 0 deletions
src/components/PlacementCard.tsx
src/pages/Guest.tsx
+34
-3
34 additions, 3 deletions
src/pages/Guest.tsx
with
65 additions
and
3 deletions
src/components/PlacementCard.tsx
0 → 100644
+
31
−
0
View file @
755ee6b5
import
{
Badge
,
HStack
,
Text
,
VStack
}
from
"
@chakra-ui/layout
"
;
import
React
,
{
ReactElement
}
from
"
react
"
;
import
{
Placement
}
from
"
../data/Placement
"
;
interface
Props
{
placement
:
Placement
;
}
export
default
function
PlacementCard
({
placement
}:
Props
):
ReactElement
{
return
(
<
VStack
cursor
=
"pointer"
bg
=
{
placement
.
active
?
"
blue.200
"
:
"
gray.200
"
}
p
=
{
3
}
borderRadius
=
{
4
}
align
=
"stretch"
onClick
=
{
()
=>
{
console
.
log
(
"
placement clicked
"
,
placement
);
}
}
>
<
Text
fontWeight
=
"bold"
fontSize
=
"2xl"
>
Fogas:
{
placement
.
placementNumber
}
</
Text
>
<
HStack
p
=
{
1
}
wrap
=
"wrap"
>
{
placement
.
belongings
.
map
((
v
)
=>
(
<
Badge
>
{
v
}
</
Badge
>
))
}
</
HStack
>
</
VStack
>
);
}
This diff is collapsed.
Click to expand it.
src/pages/Guest.tsx
+
34
−
3
View file @
755ee6b5
import
{
Button
}
from
"
@chakra-ui/button
"
;
import
{
Button
}
from
"
@chakra-ui/button
"
;
import
{
HStack
,
Text
,
VStack
}
from
"
@chakra-ui/layout
"
;
import
{
Grid
,
HStack
,
Text
,
VStack
}
from
"
@chakra-ui/layout
"
;
import
{
faPlus
}
from
"
@fortawesome/free-solid-svg-icons
"
;
import
{
faPlus
}
from
"
@fortawesome/free-solid-svg-icons
"
;
import
{
FontAwesomeIcon
}
from
"
@fortawesome/react-fontawesome
"
;
import
{
FontAwesomeIcon
}
from
"
@fortawesome/react-fontawesome
"
;
import
{
ReactElement
,
useState
}
from
"
react
"
;
import
{
ReactElement
,
useState
}
from
"
react
"
;
import
{
useHistory
}
from
"
react-router
"
;
import
{
useHistory
}
from
"
react-router
"
;
import
PlacementCard
from
"
../components/PlacementCard
"
;
import
{
Person
}
from
"
../data/Person
"
;
import
{
Person
}
from
"
../data/Person
"
;
import
CreatePersonDialog
from
"
../dialogs/CreatePersonDialog
"
;
import
CreatePersonDialog
from
"
../dialogs/CreatePersonDialog
"
;
import
CreatePlacementDialog
from
"
../dialogs/CreatePlacementDialog
"
;
import
CreatePlacementDialog
from
"
../dialogs/CreatePlacementDialog
"
;
...
@@ -15,8 +16,8 @@ export default function Guest(): ReactElement {
...
@@ -15,8 +16,8 @@ export default function Guest(): ReactElement {
const
history
=
useHistory
();
const
history
=
useHistory
();
return
(
return
(
<
VStack
align
=
"stretch"
>
<
VStack
align
=
"stretch"
spacing
=
{
4
}
>
<
Text
fontSize
=
"3xl"
>
Vendég
</
Text
>
<
Text
fontSize
=
"3xl"
>
Vendég
(
{
person
?.
name
}
)
</
Text
>
<
CreatePersonDialog
<
CreatePersonDialog
barcode
=
""
barcode
=
""
onCreated
=
{
(
person
)
=>
setPerson
(
person
)
}
onCreated
=
{
(
person
)
=>
setPerson
(
person
)
}
...
@@ -41,6 +42,36 @@ export default function Guest(): ReactElement {
...
@@ -41,6 +42,36 @@ export default function Guest(): ReactElement {
Add placement
Add placement
</
Button
>
</
Button
>
</
HStack
>
</
HStack
>
<
Grid
templateColumns
=
"repeat(3, 1fr)"
gap
=
{
4
}
>
<
PlacementCard
placement
=
{
{
active
:
true
,
barcode
:
""
,
person
:
""
,
belongings
:
[
"
Kabát
"
,
"
Piros táska
"
],
placementNumber
:
"
123
"
,
}
}
/>
<
PlacementCard
placement
=
{
{
active
:
true
,
barcode
:
""
,
person
:
""
,
belongings
:
[
"
Kabát
"
,
"
Kék táska
"
,
"
Síléc
"
],
placementNumber
:
"
124
"
,
}
}
/>
<
PlacementCard
placement
=
{
{
active
:
false
,
barcode
:
""
,
person
:
""
,
belongings
:
[
"
Kokain
"
,
"
Aggregátor
"
],
placementNumber
:
"
125
"
,
}
}
/>
</
Grid
>
</
VStack
>
</
VStack
>
);
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment