Compare commits

..

No commits in common. "123b4bd39fb3fb3d2f96163222bee87438ab21b0" and "8b42bdce0c6b00fdeea52cb5192c649f62315fa9" have entirely different histories.

6 changed files with 10 additions and 13 deletions

View File

@ -27,7 +27,7 @@ pub struct Boat {
#[serde(default = "bool::default")]
skull: bool,
#[serde(default = "bool::default")]
pub external: bool,
external: bool,
pub deleted: bool,
}

View File

@ -582,13 +582,13 @@ ORDER BY departure DESC
).await;
}
if boat.external {
if boat.name == "Externes Boot" {
let vorstand = Role::find_by_name_tx(db, "Vorstand").await.unwrap();
Notification::create_for_role_tx(
db,
&vorstand,
&format!("'{}' hat eine Ausfahrt mit externem Boot '{}' am {} eingetragen ({} km; Ziel: {}; Anmerkungen: {}). Falls das nicht stimmen sollte, bitte nachhaken.",user.name,boat.name,log.departure,log.distance_in_km, log.destination, log.comments.unwrap_or("".into())),
&format!("'{}' hat eine Ausfahrt mit *Externem Boot* am {} eingetragen ({} km; Ziel: {}; Anmerkungen: {}). Falls das nicht stimmen sollte, bitte nachhaken.",user.name,log.departure,log.distance_in_km, log.destination, log.comments.unwrap_or("".into())),
"Ausfahrt mit externem Boot eingetragen",
None,
).await;

View File

@ -40,7 +40,7 @@ LEFT JOIN
LEFT JOIN
location ON boat.location_id = location.id
WHERE
not boat.external
boat.name != 'Externes Boot' AND not boat.external
GROUP BY
boat.id, year
ORDER BY
@ -115,7 +115,7 @@ LEFT JOIN (
FROM rower
GROUP BY logbook_id
) m ON l.id = m.logbook_id
WHERE l.distance_in_km IS NOT NULL AND l.arrival LIKE '{year}-%' AND not b.external;
WHERE l.distance_in_km IS NOT NULL AND l.arrival LIKE '{year}-%' AND b.name != 'Externes Boot';
"
))
.fetch_one(db)

View File

@ -27,7 +27,7 @@ async fn index(
let boats = Boat::all_for_boatshouse(db).await;
let mut final_boats = Vec::new();
for boat in boats {
if boat.boat.boathouse(db).await.is_none() && !boat.boat.external {
if boat.boat.boathouse(db).await.is_none() && boat.boat.name != "Externes Boot" {
final_boats.push(boat);
}
}

View File

@ -7,11 +7,8 @@
{% set aisle = aisle_name ~ "-aisle" %}
{% set place = boathouse[aisle][side_name] %}
{% if place[level] %}
{{ place[level].1.name }}
{% if "admin" in loggedin_user.roles %}
<a class="btn btn-primary absolute end-0"
href="/board/boathouse/{{ place[level].0 }}/delete">X</a>
{% endif %}
{{ place[level].1.name }} <a class="btn btn-primary absolute end-0"
href="/board/boathouse/{{ place[level].0 }}/delete">X</a>
{% elif boats | length > 0 %}
{% if "admin" in loggedin_user.roles %}
<details>

View File

@ -228,9 +228,9 @@
{{ rower.name }}
{%- if rower.id == log.steering_user.id and rower.id != log.shipmaster_user.id %}
(Steuerperson){%- endif -%}
{%- if not loop.last or amount_guests > 0 and not log.boat.external %},{% endif %}
{%- if not loop.last or amount_guests > 0 and log.boat.name != 'Externes Boot' %},{% endif %}
{% endfor -%}
{% if amount_guests > 0 and not log.boat.external %}
{% if amount_guests > 0 and log.boat.name != 'Externes Boot' %}
Gäste
<small class="text-gray-600 dark:text-gray-100">(ohne Account)</small>:
{{ amount_guests }}