Compare commits
No commits in common. "d0d7da7996d5b7061b75736f0809ba572ba5fcfc" and "abe256af5df5e8ecdea6e5323635a7fa37df23f8" have entirely different histories.
d0d7da7996
...
abe256af5d
@ -171,16 +171,6 @@ AND date('now') BETWEEN start_date AND end_date;",
|
||||
.is_some()
|
||||
}
|
||||
|
||||
pub(crate) fn cat(&self) -> String {
|
||||
if self.external {
|
||||
"Vereinsfremde Boote".to_string()
|
||||
} else if self.default_shipmaster_only_steering {
|
||||
format!("{}+", self.amount_seats - 1)
|
||||
} else {
|
||||
format!("{}x", self.amount_seats)
|
||||
}
|
||||
}
|
||||
|
||||
async fn boats_to_details(db: &SqlitePool, boats: Vec<Boat>) -> Vec<BoatWithDetails> {
|
||||
let mut res = Vec::new();
|
||||
for boat in boats {
|
||||
@ -191,7 +181,13 @@ AND date('now') BETWEEN start_date AND end_date;",
|
||||
if boat.is_locked(db).await {
|
||||
damage = BoatDamage::Locked;
|
||||
}
|
||||
let cat = boat.cat();
|
||||
let cat = if boat.external {
|
||||
"Vereinsfremde Boote".to_string()
|
||||
} else if boat.default_shipmaster_only_steering {
|
||||
format!("{}+", boat.amount_seats - 1)
|
||||
} else {
|
||||
format!("{}x", boat.amount_seats)
|
||||
};
|
||||
|
||||
res.push(BoatWithDetails {
|
||||
damage,
|
||||
|
@ -16,7 +16,6 @@ pub struct BoatStat {
|
||||
#[derive(Serialize, Clone)]
|
||||
pub struct SingleBoatStat {
|
||||
name: String,
|
||||
cat: String,
|
||||
location: String,
|
||||
owner: String,
|
||||
years: HashMap<String, i32>,
|
||||
@ -72,7 +71,6 @@ ORDER BY
|
||||
}
|
||||
|
||||
let year: String = format!("{year}");
|
||||
let cat = boat.cat();
|
||||
|
||||
let rowed_km: i32 = row.get("rowed_km");
|
||||
|
||||
@ -82,7 +80,6 @@ ORDER BY
|
||||
name,
|
||||
location,
|
||||
owner,
|
||||
cat,
|
||||
years: HashMap::new(),
|
||||
});
|
||||
boat_stat.years.insert(year, rowed_km);
|
||||
|
@ -103,7 +103,7 @@
|
||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
|
||||
role="alert">
|
||||
<h2 class="h2">
|
||||
Deine Ruderkarriere
|
||||
Deine Ruderkarriere
|
||||
<span class="text-xl"
|
||||
onclick="document.getElementById('call-for-action').showModal()">💡</span>
|
||||
</h2>
|
||||
|
@ -9,7 +9,6 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Art</th>
|
||||
<th>Eigentümer</th>
|
||||
<th>Ort</th>
|
||||
{% for year in stat.pot_years | sort | reverse %}<th>{{ year }}</th>{% endfor %}
|
||||
@ -19,7 +18,6 @@
|
||||
{% for boat in stat.boats %}
|
||||
<tr>
|
||||
<td>{{ boat.name }}</td>
|
||||
<td>{{ boat.cat }}</td>
|
||||
<td>{{ boat.owner }}</td>
|
||||
<td>{{ boat.location }}</td>
|
||||
{% for year in stat.pot_years | sort | reverse %}
|
||||
|
Loading…
Reference in New Issue
Block a user