Compare commits
2 Commits
519dc82023
...
c04932383e
Author | SHA1 | Date | |
---|---|---|---|
c04932383e | |||
8ea0c2964a |
@ -37,6 +37,12 @@ func getCredentials() (string, string, error) {
|
||||
return strings.TrimSpace(user), strings.TrimSpace(pass), nil
|
||||
}
|
||||
|
||||
func reverseOrder(bs *[]types.Briefing) {
|
||||
for i, j := 0, len(*bs)-1; i < j; i, j = i+1, j-1 {
|
||||
(*bs)[i], (*bs)[j] = (*bs)[j], (*bs)[i]
|
||||
}
|
||||
}
|
||||
|
||||
func Open(dbName string) (*DB, error) {
|
||||
var err error
|
||||
db := new(DB)
|
||||
@ -108,6 +114,7 @@ func (db *DB) ReadAll() (*[]types.Briefing, error) {
|
||||
bs = append(bs, *b)
|
||||
}
|
||||
|
||||
reverseOrder(&bs)
|
||||
return &bs, nil
|
||||
}
|
||||
|
||||
@ -145,5 +152,6 @@ func (db *DB) ReadByName(name string) (*[]types.Briefing, error) {
|
||||
bs = append(bs, *b)
|
||||
}
|
||||
|
||||
reverseOrder(&bs)
|
||||
return &bs, nil
|
||||
}
|
||||
|
@ -32,12 +32,12 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Name Unterweiser</th>
|
||||
<th colspan="2">Unterweiser</th>
|
||||
<th>Datum</th>
|
||||
<th>Uhrzeit</th>
|
||||
<th>Stand</th>
|
||||
<th>Ort</th>
|
||||
<th colspan="2">Name Teilnehmer</th>
|
||||
<th colspan="2">Teilnehmer</th>
|
||||
<th>Firma</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
Loading…
x
Reference in New Issue
Block a user