allow admins to show logbook for any year
This commit is contained in:
@ -260,6 +260,10 @@ ORDER BY departure DESC
|
||||
|
||||
pub async fn completed(db: &SqlitePool) -> Vec<LogbookWithBoatAndRowers> {
|
||||
let year = chrono::Local::now().year();
|
||||
Self::completed_in_year(db, year).await
|
||||
}
|
||||
|
||||
pub async fn completed_in_year(db: &SqlitePool, year: i32) -> Vec<LogbookWithBoatAndRowers> {
|
||||
let logs = sqlx::query_as(
|
||||
&format!("
|
||||
SELECT id, boat_id, shipmaster, steering_person, shipmaster_only_steering, departure, arrival, destination, distance_in_km, comments, logtype
|
||||
|
Reference in New Issue
Block a user