fix large table overview; Fixes #30
All checks were successful
CI/CD Pipeline / test (push) Successful in 4m6s
CI/CD Pipeline / deploy (push) Successful in 2m46s

This commit is contained in:
Philipp Hofer 2025-04-13 21:43:44 +02:00
parent c34f2c1ac4
commit 4cbd5269d6
4 changed files with 115 additions and 103 deletions

View File

@ -23,6 +23,7 @@ async fn highscore(State(db): State<Arc<SqlitePool>>, session: Session) -> Marku
details open[idx==0] {
summary { (route.name) }
div class="overflow-auto" {
table {
thead {
tr {
@ -35,6 +36,7 @@ async fn highscore(State(db): State<Arc<SqlitePool>>, session: Session) -> Marku
}
}
td { "Gesamtpunkte" }
td { "Team" }
}
}
tbody {
@ -64,6 +66,12 @@ async fn highscore(State(db): State<Arc<SqlitePool>>, session: Session) -> Marku
}
}
td { (total_points) }
td {
a href=(format!("/admin/team/{}", team.id)) {
(team.name)
}
}
}
}
}
}

View File

@ -147,9 +147,10 @@ DROP TABLE temp_pos;",
}
async fn stations_not_in_route(&self, db: &SqlitePool) -> Vec<Station> {
// TODO: switch to macro
sqlx::query_as::<_, Station>(
"
SELECT id, name, notes, amount_people, last_login, pw, lat, lng
SELECT id, name, notes, amount_people, last_login, pw, lat, lng, ready
FROM station
WHERE id NOT IN (
SELECT station_id

View File

@ -175,6 +175,7 @@ async fn view(
@if !ratings.is_empty() {
h2 { "Bewertungen" }
div class="overflow-auto" {
table {
thead {
tr {
@ -231,6 +232,7 @@ async fn view(
}
}
}
}

View File

@ -1,18 +1,17 @@
use super::{CreateError, LastContactTeam, Team};
use crate::{
AppState,
admin::{route::Route, station::Station},
err,
partials::page,
pl, succ,
pl, succ, AppState,
};
use axum::{
Form, Router,
extract::State,
response::{IntoResponse, Redirect},
routing::{get, post},
Form, Router,
};
use maud::{Markup, PreEscaped, html};
use maud::{html, Markup, PreEscaped};
use serde::Deserialize;
use sqlx::SqlitePool;
use std::sync::Arc;
@ -462,6 +461,7 @@ async fn lost(State(db): State<Arc<SqlitePool>>, session: Session) -> Markup {
a href="/admin/team" { "↩️" }
"Teams: Letzter Kontakt"
}
div class="overflow-auto" {
table {
thead {
tr {
@ -494,6 +494,7 @@ async fn lost(State(db): State<Arc<SqlitePool>>, session: Session) -> Markup {
}
}
}
}
};
page(content, session, false).await