Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bdnr
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Fripp Rodriguez
bdnr
Commits
689827e6
Commit
689827e6
authored
1 year ago
by
nico20
Browse files
Options
Downloads
Patches
Plain Diff
una tabla mas
parent
2edc0359
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ui/src/components/ElMasPopu.tsx
+36
-18
36 additions, 18 deletions
ui/src/components/ElMasPopu.tsx
with
36 additions
and
18 deletions
ui/src/components/ElMasPopu.tsx
+
36
−
18
View file @
689827e6
import
{
Autocomplete
,
Button
,
Stack
,
TextField
}
from
"
@mui/material
"
;
import
{
Autocomplete
,
Button
,
Table
,
TableCell
,
TableRow
,
TextField
,
styled
,
}
from
"
@mui/material
"
;
import
{
useState
}
from
"
react
"
;
import
{
useLazyReadCypher
,
useReadCypher
}
from
"
use-neo4j
"
;
const
TableCellBlack
=
styled
(
TableCell
)({
fontWeight
:
"
bold
"
,
});
const
ElMasPopu
=
()
=>
{
const
query
=
`MATCH (p:Player {gender: "Male"}) RETURN p limit 100`
;
const
queryCompanerosPorJugador
=
`CALL {
...
...
@@ -76,23 +88,29 @@ const ElMasPopu = () => {
>
Buscar
</
Button
>
{
companerosQueryState
.
result
&&
companerosQueryState
.
result
.
records
.
map
((
record
,
index
)
=>
{
const
team_name
=
record
.
get
(
"
team_name
"
);
const
total_companeros_en_club
=
record
.
get
(
"
total_companeros_en_club
"
)
.
toNumber
();
return
(
<
Stack
flexDirection
=
"row"
key
=
{
team_name
+
index
}
>
<
Stack
>
<
p
>
Total de compañeros en
{
team_name
}
:
{
total_companeros_en_club
}{
"
"
}
- Edicion:
{
record
.
get
(
"
edition
"
)
}
</
p
>
</
Stack
>
</
Stack
>
);
})
}
{
companerosQueryState
.
result
&&
(
<
Table
>
<
TableRow
>
<
TableCellBlack
>
Club
</
TableCellBlack
>
<
TableCellBlack
>
Total de compañeros
</
TableCellBlack
>
<
TableCellBlack
>
Edicion
</
TableCellBlack
>
</
TableRow
>
{
companerosQueryState
.
result
.
records
.
map
((
record
,
index
)
=>
{
const
team_name
=
record
.
get
(
"
team_name
"
);
const
total_companeros_en_club
=
record
.
get
(
"
total_companeros_en_club
"
)
.
toNumber
();
const
edition
=
record
.
get
(
"
edition
"
);
return
(
<
TableRow
>
<
TableCell
>
{
team_name
}
</
TableCell
>
<
TableCell
>
{
total_companeros_en_club
}
</
TableCell
>
<
TableCell
>
{
edition
}
</
TableCell
>
</
TableRow
>
);
})
}
</
Table
>
)
}
</>
);
};
...
...
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