add test data + improve minor ui things
This commit is contained in:
parent
b6d161be1e
commit
de9e4aab9a
@ -17,13 +17,15 @@ person: "Person"
|
||||
people: "Personen"
|
||||
end_run: "Stationslauf beenden"
|
||||
restart_run: "Stationslauf wieder aufnehmen"
|
||||
confirm_end_run: "Willst du den Stationslauf wirklich beenden?"
|
||||
confirm_end_run: "Willst du den Stationslauf wirklich beenden? Jedes Team wird der nächsten Station die sie anläuft zugewiesen, damit sie diese zum Start zurück begleitet."
|
||||
confirm_restart_run: "Willst du den Stationslauf wirklich wieder aufnehmen?"
|
||||
run_ended: "Stationslauf erfolgreich beendet"
|
||||
run_restarted: "Stationslauf erfolgreich wieder aufgenommen"
|
||||
come_home_with_these_groups: "Gruppen mitnehmen"
|
||||
station_info: "Schön, dass du uns als Stationsbetreuer hilfst."
|
||||
info_crewless_station: "Wenn das eine unbemannte Station ist, wähle hier 0 Personen aus. Dann werden dieser Station keine Startteams zugeteilt und es wird kein PDF generiert."
|
||||
info_crewless_station: "Wenn das eine unbemannte Station ist, wähle hier 0 Personen aus. Dann werden dieser Station keine Startteams zugeteilt und es wird kein PDF generiert. Ansonsten gib die geplante Anzahl an Stationsbetreuern ein."
|
||||
info_currently_crewless_station: "Das ist aktuell eine unbemannte Station. Dieser Station werden keine Startteams zugeteilt und es wird kein Stations-PDF erzeugt. Wenn diese Station doch Stationsbetreuer hat, gib hier dessen Anzahl ein."
|
||||
info_currently_crewful_station: "Das ist aktuell eine bemannte Station. Dieser Station werden Startteams zugeteilt und es wird ein Stations-PDF erzeugt. Wenn diese Station unbemannt ist, gib hier 0 ein."
|
||||
time: "Uhrzeit"
|
||||
google_maps_navigation: "Google Maps Navigation..."
|
||||
highscore: "Highscore"
|
||||
|
33
seeds.sql
33
seeds.sql
@ -1 +1,34 @@
|
||||
insert into user(name, pw) values('a', '$argon2i$v=19$m=16,t=2,p=1$b2lmaG9pMzJvNDk$vXbHg45vkuMrQaP0XY184Q'); -- pw = 123
|
||||
|
||||
insert into route(name) values('RS (WiWö)');
|
||||
insert into route(name) values('RAT (GuSp)');
|
||||
|
||||
INSERT INTO station(name, amount_people, lat, lng, pw, notes) VALUES('Geheimschrift',0,48.512695450984161028,14.493284225463868963, 'B4T81DN2', 'Das ist eine unbemannte Station');
|
||||
INSERT INTO station(name, amount_people, lat, lng, pw) VALUES('Tierspuren',NULL,48.509795564624980102,14.4911384582519549, 'QW3RZBR4');
|
||||
INSERT INTO station(name, amount_people, lat, lng, pw) VALUES('Blattkunde',NULL,48.514401188965464938,14.518775939941408025, 'SFG1JB19');
|
||||
INSERT INTO station(name, amount_people, lat, lng, pw) VALUES('Knoten',NULL,48.506895512305042927,14.5021247863769549, 'TMFKUDPQ');
|
||||
INSERT INTO station(name, amount_people, lat, lng, pw) VALUES('Twister',NULL,48.511728840637701408,14.504613876342775213, 'SS1GOO6G');
|
||||
INSERT INTO station(name, amount_people, lat, lng, pw) VALUES('Wasserrutsche',NULL,48.508885762155230735,14.49834823608398615, 'Z9AVEYFT');
|
||||
INSERT INTO station(name, amount_people, lat, lng, pw) VALUES('Nur RAT Station',NULL,48.488885762155230735,14.49834823608398615, 'MPVYGNBJ');
|
||||
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(1, 1, 2);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(1, 2, 4);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(1, 3, 6);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(1, 4, 8);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(1, 5, 10);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(1, 6, 12);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(2, 1, 2);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(2, 2, 4);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(2, 3, 6);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(2, 4, 8);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(2, 5, 10);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(2, 6, 12);
|
||||
INSERT INTO route_station(route_id, station_id, pos) VALUES(2, 7, 14);
|
||||
|
||||
INSERT INTO team VALUES(1,'Wichtigen Wichtel',NULL,NULL,2,NULL,1);
|
||||
INSERT INTO team VALUES(2,'Wunderlichen Wichtel',NULL,NULL,3,NULL,1);
|
||||
INSERT INTO team VALUES(3,'Wandernden Wölflinge',NULL,NULL,4,NULL,1);
|
||||
INSERT INTO team VALUES(4,'Guten Guides',NULL,NULL,5,NULL,2);
|
||||
INSERT INTO team VALUES(5,'Genialen Guides',NULL,NULL,6,NULL,2);
|
||||
INSERT INTO team VALUES(6,'Spärlich besetzten Späher',NULL,NULL,7,NULL,2);
|
||||
INSERT INTO team VALUES(7,'Super Späher',NULL,NULL,2,NULL,2);
|
||||
|
@ -180,7 +180,9 @@ async fn index(State(db): State<Arc<SqlitePool>>, session: Session) -> Markup {
|
||||
@match status {
|
||||
RunStatus::NoStationsYet => {
|
||||
(t!("no_stations_yet"))
|
||||
" "
|
||||
(t!("change_that_below"))
|
||||
br;
|
||||
a role="button" href="/admin/station" {
|
||||
(t!("go_to_stations"))
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ async fn index(State(db): State<Arc<SqlitePool>>, session: Session) -> Markup {
|
||||
}
|
||||
article {
|
||||
em { (t!("routes")) }
|
||||
" "
|
||||
(PreEscaped(t!("routes_expl_without_first_word")))
|
||||
}
|
||||
ol {
|
||||
@ -172,10 +173,12 @@ async fn view(
|
||||
}
|
||||
@if !stations_not_in_route.is_empty(){
|
||||
form action=(format!("/admin/route/{}/add-station", route.id)) method="post" {
|
||||
select name="station" aria-label=(t!("select_station_to_add_to_route")) required {
|
||||
@for station in &stations_not_in_route {
|
||||
option value=(station.id) {
|
||||
(station.name)
|
||||
fieldset role="group" {
|
||||
select name="station" aria-label=(t!("select_station_to_add_to_route")) required {
|
||||
@for station in &stations_not_in_route {
|
||||
option value=(station.id) {
|
||||
(station.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
input type="submit" value=(t!("add"));
|
||||
|
@ -140,8 +140,18 @@ async fn view(
|
||||
}
|
||||
tr {
|
||||
th scope="row" { (t!("amount_crew"))
|
||||
article class="warning" {
|
||||
(t!("info_crewless_station"))
|
||||
@if let Some(amount_people) = station.amount_people {
|
||||
article {
|
||||
@if amount_people == 0 {
|
||||
(t!("info_currently_crewless_station"))
|
||||
}@else {
|
||||
(t!("info_currently_crewful_station"))
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
article class="warning" {
|
||||
(t!("info_crewless_station"))
|
||||
}
|
||||
}
|
||||
};
|
||||
td {
|
||||
@ -240,7 +250,7 @@ async fn view(
|
||||
}
|
||||
}
|
||||
a href=(format!("/admin/station/{}/quick", station.id)){
|
||||
button {
|
||||
button class="outline" {
|
||||
(t!("enter_ratings_for_station", station=station.name))
|
||||
}
|
||||
}
|
||||
@ -602,65 +612,66 @@ async fn index(State(db): State<Arc<SqlitePool>>, session: Session) -> Markup {
|
||||
}
|
||||
(t!("stations_expl_without_first_word"))
|
||||
}
|
||||
table {
|
||||
thead {
|
||||
tr {
|
||||
th { (t!("station")) }
|
||||
th { (t!("progress")) }
|
||||
th { "" }
|
||||
}
|
||||
}
|
||||
tbody {
|
||||
@for station in &stations {
|
||||
@let status = TeamsAtStationLocation::for_station(&db, station).await;
|
||||
tr {
|
||||
td {
|
||||
@if station.ready {
|
||||
em data-tooltip=(t!("station_ready")) {
|
||||
small { "🟢 " }
|
||||
}
|
||||
}
|
||||
@if station.routes(&db).await.is_empty() {
|
||||
a href="/admin/route" {
|
||||
em data-tooltip=(t!("station_warning_not_assigned_route")) {
|
||||
"⚠️ "
|
||||
}
|
||||
}
|
||||
}
|
||||
a href=(format!("/admin/station/{}", station.id)){
|
||||
(station.name)
|
||||
}
|
||||
@if station.crewless() {
|
||||
em data-tooltip=(t!("crewless_station")) {
|
||||
small { "🤖" }
|
||||
}
|
||||
}
|
||||
}
|
||||
td {
|
||||
em data-tooltip=(t!("station_team_progress", arrived=status.total_teams-status.not_yet_here.len() as i64, total=status.total_teams, waiting= status.waiting.len(), active=status.doing.len() )) {
|
||||
progress value=(status.total_teams-status.not_yet_here.len() as i64) max=(status.total_teams) {}
|
||||
}
|
||||
|
||||
}
|
||||
td {
|
||||
a href=(format!("/admin/station/{}/delete", station.id))
|
||||
onclick=(format!("return confirm('{}');", t!("station_confirm_deletion"))) {
|
||||
"🗑️"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@if stations.is_empty() {
|
||||
article class="warning" {
|
||||
(t!("station_hint_create_first"))
|
||||
}
|
||||
}
|
||||
a href="/admin/station/print"{
|
||||
button {
|
||||
(t!("generate_station_pdf"))
|
||||
} @else {
|
||||
a href="/admin/station/print"{
|
||||
button class="outline" {
|
||||
(t!("generate_station_pdf"))
|
||||
}
|
||||
}
|
||||
table {
|
||||
thead {
|
||||
tr {
|
||||
th { (t!("station")) }
|
||||
th { (t!("progress")) }
|
||||
th { "" }
|
||||
}
|
||||
}
|
||||
tbody {
|
||||
@for station in &stations {
|
||||
@let status = TeamsAtStationLocation::for_station(&db, station).await;
|
||||
tr {
|
||||
td {
|
||||
@if station.ready {
|
||||
em data-tooltip=(t!("station_ready")) {
|
||||
small { "🟢 " }
|
||||
}
|
||||
}
|
||||
@if station.routes(&db).await.is_empty() {
|
||||
a href="/admin/route" {
|
||||
em data-tooltip=(t!("station_warning_not_assigned_route")) {
|
||||
"⚠️ "
|
||||
}
|
||||
}
|
||||
}
|
||||
a href=(format!("/admin/station/{}", station.id)){
|
||||
(station.name)
|
||||
}
|
||||
@if station.crewless() {
|
||||
em data-tooltip=(t!("crewless_station")) {
|
||||
small { "🤖" }
|
||||
}
|
||||
}
|
||||
}
|
||||
td {
|
||||
em data-tooltip=(t!("station_team_progress", arrived=status.total_teams-status.not_yet_here.len() as i64, total=status.total_teams, waiting= status.waiting.len(), active=status.doing.len() )) {
|
||||
progress value=(status.total_teams-status.not_yet_here.len() as i64) max=(status.total_teams) {}
|
||||
}
|
||||
|
||||
}
|
||||
td {
|
||||
a href=(format!("/admin/station/{}/delete", station.id))
|
||||
onclick=(format!("return confirm('{}');", t!("station_confirm_deletion"))) {
|
||||
"🗑️"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
h2 { (t!("station_new")) }
|
||||
|
@ -732,6 +732,7 @@ async fn index(State(db): State<Arc<SqlitePool>>, session: Session) -> Markup {
|
||||
}
|
||||
article {
|
||||
em { (t!("teams")) }
|
||||
" "
|
||||
(PreEscaped(t!("teams_expl_without_first_word")))
|
||||
}
|
||||
@if teams.is_empty() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user