fix large table overview; Fixes #30
This commit is contained in:
parent
c34f2c1ac4
commit
4cbd5269d6
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user