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] {
|
details open[idx==0] {
|
||||||
summary { (route.name) }
|
summary { (route.name) }
|
||||||
|
|
||||||
|
div class="overflow-auto" {
|
||||||
table {
|
table {
|
||||||
thead {
|
thead {
|
||||||
tr {
|
tr {
|
||||||
@ -35,6 +36,7 @@ async fn highscore(State(db): State<Arc<SqlitePool>>, session: Session) -> Marku
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
td { "Gesamtpunkte" }
|
td { "Gesamtpunkte" }
|
||||||
|
td { "Team" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tbody {
|
tbody {
|
||||||
@ -64,6 +66,12 @@ async fn highscore(State(db): State<Arc<SqlitePool>>, session: Session) -> Marku
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
td { (total_points) }
|
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> {
|
async fn stations_not_in_route(&self, db: &SqlitePool) -> Vec<Station> {
|
||||||
|
// TODO: switch to macro
|
||||||
sqlx::query_as::<_, Station>(
|
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
|
FROM station
|
||||||
WHERE id NOT IN (
|
WHERE id NOT IN (
|
||||||
SELECT station_id
|
SELECT station_id
|
||||||
|
@ -175,6 +175,7 @@ async fn view(
|
|||||||
|
|
||||||
@if !ratings.is_empty() {
|
@if !ratings.is_empty() {
|
||||||
h2 { "Bewertungen" }
|
h2 { "Bewertungen" }
|
||||||
|
div class="overflow-auto" {
|
||||||
table {
|
table {
|
||||||
thead {
|
thead {
|
||||||
tr {
|
tr {
|
||||||
@ -231,6 +232,7 @@ async fn view(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
use super::{CreateError, LastContactTeam, Team};
|
use super::{CreateError, LastContactTeam, Team};
|
||||||
use crate::{
|
use crate::{
|
||||||
AppState,
|
|
||||||
admin::{route::Route, station::Station},
|
admin::{route::Route, station::Station},
|
||||||
err,
|
err,
|
||||||
partials::page,
|
partials::page,
|
||||||
pl, succ,
|
pl, succ, AppState,
|
||||||
};
|
};
|
||||||
use axum::{
|
use axum::{
|
||||||
Form, Router,
|
|
||||||
extract::State,
|
extract::State,
|
||||||
response::{IntoResponse, Redirect},
|
response::{IntoResponse, Redirect},
|
||||||
routing::{get, post},
|
routing::{get, post},
|
||||||
|
Form, Router,
|
||||||
};
|
};
|
||||||
use maud::{Markup, PreEscaped, html};
|
use maud::{html, Markup, PreEscaped};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use sqlx::SqlitePool;
|
use sqlx::SqlitePool;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
@ -462,6 +461,7 @@ async fn lost(State(db): State<Arc<SqlitePool>>, session: Session) -> Markup {
|
|||||||
a href="/admin/team" { "↩️" }
|
a href="/admin/team" { "↩️" }
|
||||||
"Teams: Letzter Kontakt"
|
"Teams: Letzter Kontakt"
|
||||||
}
|
}
|
||||||
|
div class="overflow-auto" {
|
||||||
table {
|
table {
|
||||||
thead {
|
thead {
|
||||||
tr {
|
tr {
|
||||||
@ -494,6 +494,7 @@ async fn lost(State(db): State<Arc<SqlitePool>>, session: Session) -> Markup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
page(content, session, false).await
|
page(content, session, false).await
|
||||||
|
Loading…
x
Reference in New Issue
Block a user