Compare commits
No commits in common. "746dbb3f1b9b3a55343d73aa09f6e91515ae57b0" and "51ed36d6c3fefd0b7f8500f53968c2acb4009671" have entirely different histories.
746dbb3f1b
...
51ed36d6c3
2 changed files with 7 additions and 0 deletions
|
|
@ -14,6 +14,8 @@ use crate::{
|
|||
translation::Sentence,
|
||||
};
|
||||
|
||||
use super::rights::*;
|
||||
|
||||
#[debug_handler]
|
||||
pub async fn get_scheduled_recipes(
|
||||
State(connection): State<db::Connection>,
|
||||
|
|
@ -51,6 +53,7 @@ pub async fn add_scheduled_recipe(
|
|||
Extension(context): Extension<Context>,
|
||||
ExtractRon(ron): ExtractRon<common::web_api::ScheduleRecipe>,
|
||||
) -> Result<Response> {
|
||||
check_user_rights_recipe(&connection, &context.user, ron.recipe_id).await?;
|
||||
if let Some(user) = context.user {
|
||||
connection
|
||||
.add_scheduled_recipe(
|
||||
|
|
@ -76,6 +79,7 @@ pub async fn rm_scheduled_recipe(
|
|||
Extension(context): Extension<Context>,
|
||||
ExtractRon(ron): ExtractRon<common::web_api::RemoveScheduledRecipe>,
|
||||
) -> Result<impl IntoResponse> {
|
||||
check_user_rights_recipe(&connection, &context.user, ron.recipe_id).await?;
|
||||
if let Some(user) = context.user {
|
||||
connection
|
||||
.rm_scheduled_recipe(
|
||||
|
|
|
|||
|
|
@ -285,6 +285,8 @@ fn display_month(
|
|||
}
|
||||
};
|
||||
|
||||
gloo::console::log!(nb_of_weeks);
|
||||
|
||||
for i in 0..6 {
|
||||
for j in 0..7 {
|
||||
let day_element: Element = by_id(&format!("day-grid-{}{}", i, j));
|
||||
|
|
@ -308,6 +310,7 @@ fn display_month(
|
|||
|
||||
day_element.set_class_name(&classes.join(" "));
|
||||
} else {
|
||||
gloo::console::log!("ok");
|
||||
day_element.set_class_name("");
|
||||
day_content.set_inner_html("");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue