Reworked calendar form
Build and Publish / Build and Publish Docker Image (push) Successful in 2m17s
Build and Publish / Build and Publish Docker Image (push) Successful in 2m17s
This commit is contained in:
@@ -274,6 +274,7 @@ struct ScheduleNewTemplate<'a> {
|
||||
clients: Vec<Client>,
|
||||
users: Vec<User>,
|
||||
current_user_id: i64,
|
||||
timezone: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Template)]
|
||||
@@ -1110,6 +1111,7 @@ async fn schedule_new_page(
|
||||
let current_user_id = get_admin_id(&session).await.unwrap_or(0);
|
||||
let clients = query!(Client, $status == "active").all(&db).await?;
|
||||
let users = query!(User, $status == "active").all(&db).await?;
|
||||
let tz = crate::tz::load_tz(&db).await;
|
||||
let body = ScheduleNewTemplate {
|
||||
t: lang.t(),
|
||||
lang,
|
||||
@@ -1117,6 +1119,7 @@ async fn schedule_new_page(
|
||||
clients,
|
||||
users,
|
||||
current_user_id,
|
||||
timezone: tz.to_string(),
|
||||
}
|
||||
.render()?;
|
||||
html_response(body, lang)
|
||||
|
||||
+2
-2
@@ -400,7 +400,7 @@ static RU: Translations = Translations {
|
||||
schedule_new_title: "Запланировать визиты",
|
||||
schedule_client: "Клиент",
|
||||
schedule_admin: "Исполнитель",
|
||||
schedule_default_time: "Время по умолчанию",
|
||||
schedule_default_time: "Время",
|
||||
schedule_time_start: "С",
|
||||
schedule_time_end: "До",
|
||||
schedule_pick_dates: "Добавить дату",
|
||||
@@ -603,7 +603,7 @@ static EN: Translations = Translations {
|
||||
schedule_new_title: "Plan Visits",
|
||||
schedule_client: "Client",
|
||||
schedule_admin: "Assigned to",
|
||||
schedule_default_time: "Default Time",
|
||||
schedule_default_time: "Time",
|
||||
schedule_time_start: "From",
|
||||
schedule_time_end: "To",
|
||||
schedule_pick_dates: "Add date",
|
||||
|
||||
@@ -6,6 +6,8 @@ mod public;
|
||||
mod telegram;
|
||||
mod tz;
|
||||
|
||||
use tracing_subscriber;
|
||||
|
||||
use cot::cli::CliMetadata;
|
||||
use cot::config::{
|
||||
DatabaseConfig, MiddlewareConfig, ProjectConfig, SessionMiddlewareConfig, SessionStoreConfig,
|
||||
@@ -97,5 +99,10 @@ impl Project for PettingProject {
|
||||
|
||||
#[cot::main]
|
||||
fn main() -> impl Project {
|
||||
let filter = tracing_subscriber::EnvFilter::try_from_default_env()
|
||||
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info"));
|
||||
let _ = tracing_subscriber::fmt()
|
||||
.with_env_filter(filter)
|
||||
.try_init();
|
||||
PettingProject
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user