Implemented admin overview.

This commit is contained in:
2024-02-05 12:00:38 +01:00
parent 6c7fd2e46f
commit e69db7f40b
9 changed files with 402 additions and 74 deletions
+1 -13
View File
@@ -3,7 +3,7 @@ use leptos::*;
use crate::backend::data::{DayHours, WeekHours};
use crate::backend::opening_hours::get_hours;
use crate::components::modal_box::DialogOpener;
use crate::locales::trl;
use crate::locales::{show_day, trl};
use crate::pages::hours_edit::EditHours;
fn show_time(tm: &str) -> impl Fn() -> String {
@@ -14,18 +14,6 @@ fn show_time(tm: &str) -> impl Fn() -> String {
}
}
fn show_day(day: &Weekday) -> impl Fn() -> String {
match day {
Weekday::Mon => { trl("Monday") }
Weekday::Tue => { trl("Tuesday") }
Weekday::Wed => { trl("Wednesday") }
Weekday::Thu => { trl("Thursday") }
Weekday::Fri => { trl("Friday") }
Weekday::Sat => { trl("Saturday") }
Weekday::Sun => { trl("Sunday") }
}
}
#[component]
pub fn OpeningHours() -> impl IntoView {
let editor = DialogOpener::new();