refactor: move overview into calendar

This commit is contained in:
Max Hohlfeld 2025-07-03 21:28:47 +02:00
parent d1e067407b
commit 2ec200831f
5 changed files with 8 additions and 4 deletions

View File

@ -24,7 +24,7 @@ pub struct CalendarQuery {
}
#[derive(Template)]
#[template(path = "index.html")]
#[template(path = "calendar.html")]
struct CalendarTemplate {
user: User,
user_can_create_availability: bool,
@ -41,7 +41,7 @@ struct CalendarTemplate {
availabilities: Vec<Availability>,
}
#[actix_web::get("/")]
#[actix_web::get("/calendar")]
async fn get(
user: web::ReqData<User>,
pool: web::Data<PgPool>,

View File

@ -9,8 +9,8 @@ use crate::{
use brass_db::models::{Role, User};
pub mod delete;
pub mod get_calendar;
pub mod get_new;
pub mod get_overview;
pub mod get_update;
pub mod post_new;
pub mod post_update;

View File

@ -56,7 +56,7 @@ pub fn init(cfg: &mut ServiceConfig) {
cfg.service(availability::delete::delete);
cfg.service(availability::get_new::get);
cfg.service(availability::get_overview::get);
cfg.service(availability::get_calendar::get);
cfg.service(availability::get_update::get);
cfg.service(availability::post_new::post);
cfg.service(availability::post_update::post);

View File

@ -18,6 +18,10 @@
<div class="navbar-menu" id="navMenu">
<div hx-boost="true" class="navbar-start">
<a href="/" class="navbar-item">
Übersicht
</a>
<a href="/calendar" class="navbar-item">
Kalender
</a>