Compare commits

...

4 Commits

Author SHA1 Message Date
96036b180b Merge pull request 'allow-scheckbuch-to-be-entered' (#476) from allow-scheckbuch-to-be-entered into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m21s
CI/CD Pipeline / deploy-staging (push) Successful in 5m57s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #476
2024-05-01 19:37:09 +02:00
8c563a9c36 allow scheckbuch people to be entered in logbook
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m15s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2024-05-01 19:27:52 +02:00
b70929c5ce Merge pull request 'clippy :-)' (#475) from clippy into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m2s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 6m16s
Reviewed-on: #475
2024-04-30 22:26:09 +02:00
a75ba765df Merge pull request 'don't use default distance of 11; don't overwrite distance if already entered' (#473) from logbook-entry-improvement into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 8m42s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 6m15s
Reviewed-on: #473
2024-04-30 21:31:33 +02:00

View File

@ -58,7 +58,9 @@ async fn index(
.map(|user| UserWithWaterStatus::from_user(user, db)),
)
.await;
coxes.retain(|u| u.roles.contains(&"Donau Linz".into()));
coxes.retain(|u| {
u.roles.contains(&"Donau Linz".into()) || u.roles.contains(&"scheckbuch".into())
});
let mut users: Vec<UserWithWaterStatus> = futures::future::join_all(
User::all(db)
@ -67,7 +69,9 @@ async fn index(
.map(|user| UserWithWaterStatus::from_user(user, db)),
)
.await;
users.retain(|u| u.roles.contains(&"Donau Linz".into()));
users.retain(|u| {
u.roles.contains(&"Donau Linz".into()) || u.roles.contains(&"scheckbuch".into())
});
let logtypes = LogType::all(db).await;
let distances = Logbook::distances(db).await;
@ -149,20 +153,30 @@ async fn kiosk(
_kiosk: KioskCookie,
) -> Template {
let boats = Boat::all(db).await;
let coxes: Vec<UserWithWaterStatus> = futures::future::join_all(
let mut coxes: Vec<UserWithWaterStatus> = futures::future::join_all(
User::cox(db)
.await
.into_iter()
.map(|user| UserWithWaterStatus::from_user(user, db)),
)
.await;
let users: Vec<UserWithWaterStatus> = futures::future::join_all(
coxes.retain(|u| {
u.roles.contains(&"Donau Linz".into()) || u.roles.contains(&"scheckbuch".into())
});
let mut users: Vec<UserWithWaterStatus> = futures::future::join_all(
User::all(db)
.await
.into_iter()
.map(|user| UserWithWaterStatus::from_user(user, db)),
)
.await;
users.retain(|u| {
u.roles.contains(&"Donau Linz".into()) || u.roles.contains(&"scheckbuch".into())
});
let logtypes = LogType::all(db).await;
let distances = Logbook::distances(db).await;