27 lines
526 B
Rust

use askama::Template;
use serde::{Deserialize, Serialize};
use crate::filters;
use brass_db::models::{Area, Location, Role, User};
pub mod delete;
pub mod get_edit;
pub mod get_new;
pub mod get_overview;
pub mod post_edit;
pub mod post_new;
#[derive(Template)]
#[template(path = "location/new_or_edit.html")]
pub struct LocationTemplate {
user: User,
areas: Option<Vec<Area>>,
location: Option<Location>,
}
#[derive(Deserialize, Serialize)]
pub struct LocationForm {
name: String,
area: Option<i32>,
}