Merge pull request 'order logbook by arrival' (#611) from order-logbook-by-arrival into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m26s
CI/CD Pipeline / deploy-staging (push) Successful in 18m9s
CI/CD Pipeline / deploy-main (push) Has been skipped

Reviewed-on: #611
This commit is contained in:
philipp 2024-06-27 08:52:17 +02:00
commit d0bcf1f384

View File

@ -242,7 +242,7 @@ ORDER BY departure DESC
FROM logbook FROM logbook
JOIN rower ON logbook.id = rower.logbook_id JOIN rower ON logbook.id = rower.logbook_id
WHERE arrival is not null AND rower_id = {} WHERE arrival is not null AND rower_id = {}
ORDER BY departure DESC ORDER BY arrival DESC
", user.id) ", user.id)
) )
.fetch_all(db) .fetch_all(db)
@ -275,7 +275,7 @@ ORDER BY departure DESC
SELECT id, boat_id, shipmaster, steering_person, shipmaster_only_steering, departure, arrival, destination, distance_in_km, comments, logtype SELECT id, boat_id, shipmaster, steering_person, shipmaster_only_steering, departure, arrival, destination, distance_in_km, comments, logtype
FROM logbook FROM logbook
WHERE arrival is not null AND arrival LIKE '{}-%' WHERE arrival is not null AND arrival LIKE '{}-%'
ORDER BY departure DESC ORDER BY arrival DESC
", year) ", year)
) )
.fetch_all(db) .fetch_all(db)