don't show external boats in boatstat; hide logout in menu; move owner into own column in boatstat
This commit is contained in:
@ -17,6 +17,7 @@ pub struct BoatStat {
|
||||
pub struct SingleBoatStat {
|
||||
name: String,
|
||||
location: String,
|
||||
owner: String,
|
||||
years: HashMap<String, i32>,
|
||||
}
|
||||
|
||||
@ -39,7 +40,7 @@ LEFT JOIN
|
||||
LEFT JOIN
|
||||
location ON boat.location_id = location.id
|
||||
WHERE
|
||||
boat.name != 'Externes Boot'
|
||||
boat.name != 'Externes Boot' AND not boat.external
|
||||
GROUP BY
|
||||
boat.id, year
|
||||
ORDER BY
|
||||
@ -58,7 +59,7 @@ ORDER BY
|
||||
} else {
|
||||
String::from("Verein")
|
||||
};
|
||||
let name = format!("{} ({})", boat.name, owner);
|
||||
let name = boat.name.clone();
|
||||
let location: String = row.get("location");
|
||||
let year: i32 = row.get("year");
|
||||
if year == 0 {
|
||||
@ -78,6 +79,7 @@ ORDER BY
|
||||
.or_insert(SingleBoatStat {
|
||||
name,
|
||||
location,
|
||||
owner,
|
||||
years: HashMap::new(),
|
||||
});
|
||||
boat_stat.years.insert(year, rowed_km);
|
||||
|
Reference in New Issue
Block a user