Alcune modifiche

This commit is contained in:
2022-06-07 19:04:50 +02:00
parent 751298f4c6
commit 0d7d24f1b9
4 changed files with 21 additions and 7 deletions
+1
View File
@@ -7,6 +7,7 @@ const FUSE_OPTIONS = {
keys: [
'nome',
'cognome',
'tags',
{ name: 'nomeCompleto', getFn: user => `${user.nome} ${user.cognome}` },
],
}
+1 -1
View File
@@ -38,7 +38,7 @@
{
"type": "simple",
"title": "Apertura del PHC",
"date": "1992"
"date": "1994"
}
]
}
+17 -4
View File
@@ -6,13 +6,26 @@ import (
)
type UserInfo struct {
Uid string `json:"uid"`
Nome string `json:"nome"`
Cognome string `json:"cognome"`
IsMacchinista bool `json:"macchinista,omitempty"`
Uid string `json:"uid"`
Nome string `json:"nome"`
Cognome string `json:"cognome"`
Tags []string `json:"tags"`
IsMacchinista bool `json:"macchinista,omitempty"`
}
func GetUtenti() ([]UserInfo, error) {
history, err := GetRawHistory()
if err != nil {
return nil, err
}
// Creo un set per velocizzare l'utilizzo dopo
macchinisti := map[string]bool{}
for _, m := range history.Macchinisti {
macchinisti[m.Uid] = true
}
var users []UserInfo
usersJsonData, err := ioutil.ReadFile("./utenti-poisson-2022.local.json")
+2 -2
View File
@@ -62,9 +62,9 @@
<div class="nav-item">
<a class="nav-element" href="/storia">Storia</a>
</div>
<div class="nav-item">
<!-- <div class="nav-item">
<a class="nav-element" href="/about">About</a>
</div>
</div> -->
<div class="nav-item filler"></div>