add all field to admin panel

This commit is contained in:
2026-05-29 07:38:46 +07:00
parent 26f5760987
commit bed126bd85
9 changed files with 220 additions and 54 deletions
@@ -9,7 +9,10 @@ type GraphNode struct {
Code string
Name string
Text string
Image string
Applications []*GraphApplication
Hidden bool
Doors []*GraphDoor
}
type GraphEdge struct {
@@ -21,3 +24,9 @@ type GraphEdge struct {
type GraphApplication struct {
Name string
}
type GraphDoor struct {
Code string
Name string
Show bool
}
@@ -223,12 +223,26 @@ func (s *StoryService) GetGraph(ctx context.Context) *Graph {
},
)
}
doors := make([]*GraphDoor, 0, len(place.Doors))
for _, door := range place.Doors {
doors = append(
doors,
&GraphDoor{
Code: door.Code,
Name: door.Name,
Show: door.Show,
},
)
}
nodes = append(
nodes, &GraphNode{
Code: place.Code,
Name: place.Name,
Text: place.Text,
Image: place.Image,
Applications: applications,
Hidden: place.Hidden,
Doors: doors,
},
)
}