Alcune modifiche

main
Antonio De Lucreziis 2 years ago
parent 751298f4c6
commit 0d7d24f1b9

@ -7,6 +7,7 @@ const FUSE_OPTIONS = {
keys: [ keys: [
'nome', 'nome',
'cognome', 'cognome',
'tags',
{ name: 'nomeCompleto', getFn: user => `${user.nome} ${user.cognome}` }, { name: 'nomeCompleto', getFn: user => `${user.nome} ${user.cognome}` },
], ],
} }

@ -38,7 +38,7 @@
{ {
"type": "simple", "type": "simple",
"title": "Apertura del PHC", "title": "Apertura del PHC",
"date": "1992" "date": "1994"
} }
] ]
} }

@ -9,10 +9,23 @@ type UserInfo struct {
Uid string `json:"uid"` Uid string `json:"uid"`
Nome string `json:"nome"` Nome string `json:"nome"`
Cognome string `json:"cognome"` Cognome string `json:"cognome"`
Tags []string `json:"tags"`
IsMacchinista bool `json:"macchinista,omitempty"` IsMacchinista bool `json:"macchinista,omitempty"`
} }
func GetUtenti() ([]UserInfo, error) { 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 var users []UserInfo
usersJsonData, err := ioutil.ReadFile("./utenti-poisson-2022.local.json") usersJsonData, err := ioutil.ReadFile("./utenti-poisson-2022.local.json")

@ -62,9 +62,9 @@
<div class="nav-item"> <div class="nav-item">
<a class="nav-element" href="/storia">Storia</a> <a class="nav-element" href="/storia">Storia</a>
</div> </div>
<div class="nav-item"> <!-- <div class="nav-item">
<a class="nav-element" href="/about">About</a> <a class="nav-element" href="/about">About</a>
</div> </div> -->
<div class="nav-item filler"></div> <div class="nav-item filler"></div>

Loading…
Cancel
Save