refactor: move overview into calendar
This commit is contained in:
parent
d1e067407b
commit
2ec200831f
@ -24,7 +24,7 @@ pub struct CalendarQuery {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
#[template(path = "index.html")]
|
#[template(path = "calendar.html")]
|
||||||
struct CalendarTemplate {
|
struct CalendarTemplate {
|
||||||
user: User,
|
user: User,
|
||||||
user_can_create_availability: bool,
|
user_can_create_availability: bool,
|
||||||
@ -41,7 +41,7 @@ struct CalendarTemplate {
|
|||||||
availabilities: Vec<Availability>,
|
availabilities: Vec<Availability>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[actix_web::get("/")]
|
#[actix_web::get("/calendar")]
|
||||||
async fn get(
|
async fn get(
|
||||||
user: web::ReqData<User>,
|
user: web::ReqData<User>,
|
||||||
pool: web::Data<PgPool>,
|
pool: web::Data<PgPool>,
|
@ -9,8 +9,8 @@ use crate::{
|
|||||||
use brass_db::models::{Role, User};
|
use brass_db::models::{Role, User};
|
||||||
|
|
||||||
pub mod delete;
|
pub mod delete;
|
||||||
|
pub mod get_calendar;
|
||||||
pub mod get_new;
|
pub mod get_new;
|
||||||
pub mod get_overview;
|
|
||||||
pub mod get_update;
|
pub mod get_update;
|
||||||
pub mod post_new;
|
pub mod post_new;
|
||||||
pub mod post_update;
|
pub mod post_update;
|
||||||
|
@ -56,7 +56,7 @@ pub fn init(cfg: &mut ServiceConfig) {
|
|||||||
|
|
||||||
cfg.service(availability::delete::delete);
|
cfg.service(availability::delete::delete);
|
||||||
cfg.service(availability::get_new::get);
|
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::get_update::get);
|
||||||
cfg.service(availability::post_new::post);
|
cfg.service(availability::post_new::post);
|
||||||
cfg.service(availability::post_update::post);
|
cfg.service(availability::post_update::post);
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
<div class="navbar-menu" id="navMenu">
|
<div class="navbar-menu" id="navMenu">
|
||||||
<div hx-boost="true" class="navbar-start">
|
<div hx-boost="true" class="navbar-start">
|
||||||
<a href="/" class="navbar-item">
|
<a href="/" class="navbar-item">
|
||||||
|
Übersicht
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="/calendar" class="navbar-item">
|
||||||
Kalender
|
Kalender
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user