Revert "disable tracing macros"
This reverts commit 14e0d286f1efcc989ce679e451159fede6330bdf.
This commit is contained in:
@@ -12,7 +12,7 @@ pub enum Config {
|
|||||||
Disabled { assume_user: String },
|
Disabled { assume_user: String },
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[tracing::instrument(name = "check_auth", skip(state, request, next))]
|
#[tracing::instrument(name = "check_auth", skip(state, request, next))]
|
||||||
pub async fn authorize<B>(
|
pub async fn authorize<B>(
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
mut request: Request<B>,
|
mut request: Request<B>,
|
||||||
@@ -65,7 +65,7 @@ pub async fn authorize<B>(
|
|||||||
};
|
};
|
||||||
Ok(user)
|
Ok(user)
|
||||||
}
|
}
|
||||||
// .instrument(tracing::debug_span!("authorize"))
|
.instrument(tracing::debug_span!("authorize"))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
request.extensions_mut().insert(current_user);
|
request.extensions_mut().insert(current_user);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ impl From<RequestHeaders> for HeaderName {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn is_htmx(headers: &HeaderMap) -> bool {
|
pub fn is_htmx(headers: &HeaderMap) -> bool {
|
||||||
headers
|
headers
|
||||||
.get::<HeaderName>(RequestHeaders::HtmxRequest.into())
|
.get::<HeaderName>(RequestHeaders::HtmxRequest.into())
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ pub struct Inventory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Inventory {
|
impl Inventory {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn load(ctx: &Context, pool: &sqlx::Pool<sqlx::Sqlite>) -> Result<Self, Error> {
|
pub async fn load(ctx: &Context, pool: &sqlx::Pool<sqlx::Sqlite>) -> Result<Self, Error> {
|
||||||
let user_id = ctx.user.id.to_string();
|
let user_id = ctx.user.id.to_string();
|
||||||
let categories = async {
|
let categories = async {
|
||||||
@@ -38,7 +38,7 @@ impl Inventory {
|
|||||||
|
|
||||||
Ok::<_, Error>(categories)
|
Ok::<_, Error>(categories)
|
||||||
}
|
}
|
||||||
// .instrument(tracing::info_span!("packager::query", "query"))
|
.instrument(tracing::info_span!("packager::query", "query"))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
Ok(Self { categories })
|
Ok(Self { categories })
|
||||||
@@ -73,7 +73,7 @@ impl TryFrom<DbCategoryRow> for Category {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Category {
|
impl Category {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn _find(
|
pub async fn _find(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -100,7 +100,7 @@ impl Category {
|
|||||||
.transpose()
|
.transpose()
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn save(
|
pub async fn save(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -124,19 +124,19 @@ impl Category {
|
|||||||
Ok(id)
|
Ok(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn items(&self) -> &Vec<Item> {
|
pub fn items(&self) -> &Vec<Item> {
|
||||||
self.items
|
self.items
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.expect("you need to call populate_items()")
|
.expect("you need to call populate_items()")
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn total_weight(&self) -> i64 {
|
pub fn total_weight(&self) -> i64 {
|
||||||
self.items().iter().map(|item| item.weight).sum()
|
self.items().iter().map(|item| item.weight).sum()
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn populate_items(
|
pub async fn populate_items(
|
||||||
&mut self,
|
&mut self,
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
@@ -234,7 +234,7 @@ impl TryFrom<DbInventoryItemRow> for InventoryItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl InventoryItem {
|
impl InventoryItem {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn find(
|
pub async fn find(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -274,7 +274,7 @@ impl InventoryItem {
|
|||||||
.transpose()
|
.transpose()
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn name_exists(
|
pub async fn name_exists(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -296,7 +296,7 @@ impl InventoryItem {
|
|||||||
.is_some())
|
.is_some())
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn delete(
|
pub async fn delete(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -318,7 +318,7 @@ impl InventoryItem {
|
|||||||
Ok(results.rows_affected() != 0)
|
Ok(results.rows_affected() != 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn update(
|
pub async fn update(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -350,7 +350,7 @@ impl InventoryItem {
|
|||||||
.await??)
|
.await??)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn save(
|
pub async fn save(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -381,7 +381,7 @@ impl InventoryItem {
|
|||||||
Ok(id)
|
Ok(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn get_category_max_weight(
|
pub async fn get_category_max_weight(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -446,7 +446,7 @@ impl TryFrom<DbInventoryItemsRow> for Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Item {
|
impl Item {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn _get_category_total_picked_weight(
|
pub async fn _get_category_total_picked_weight(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ pub struct TripCategory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl TripCategory {
|
impl TripCategory {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn total_picked_weight(&self) -> i64 {
|
pub fn total_picked_weight(&self) -> i64 {
|
||||||
self.items
|
self.items
|
||||||
.as_ref()
|
.as_ref()
|
||||||
@@ -129,7 +129,7 @@ impl TripCategory {
|
|||||||
.sum()
|
.sum()
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn find(
|
pub async fn find(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -290,7 +290,7 @@ impl TryFrom<DbTripsItemsRow> for TripItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl TripItem {
|
impl TripItem {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn find(
|
pub async fn find(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -330,7 +330,7 @@ impl TripItem {
|
|||||||
.transpose()
|
.transpose()
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn set_state(
|
pub async fn set_state(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -431,7 +431,7 @@ pub(crate) struct DbTripWeightRow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Trip {
|
impl Trip {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn all(ctx: &Context, pool: &sqlx::Pool<sqlx::Sqlite>) -> Result<Vec<Trip>, Error> {
|
pub async fn all(ctx: &Context, pool: &sqlx::Pool<sqlx::Sqlite>) -> Result<Vec<Trip>, Error> {
|
||||||
let user_id = ctx.user.id.to_string();
|
let user_id = ctx.user.id.to_string();
|
||||||
sqlx::query_as!(
|
sqlx::query_as!(
|
||||||
@@ -458,7 +458,7 @@ impl Trip {
|
|||||||
.collect::<Result<Vec<Trip>, Error>>()
|
.collect::<Result<Vec<Trip>, Error>>()
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn find(
|
pub async fn find(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -489,7 +489,7 @@ impl Trip {
|
|||||||
.transpose()
|
.transpose()
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_type_remove(
|
pub async fn trip_type_remove(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -520,7 +520,7 @@ impl Trip {
|
|||||||
Ok(results.rows_affected() != 0)
|
Ok(results.rows_affected() != 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_type_add(
|
pub async fn trip_type_add(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -554,7 +554,7 @@ impl Trip {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn set_state(
|
pub async fn set_state(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -577,7 +577,7 @@ impl Trip {
|
|||||||
Ok(result.rows_affected() != 0)
|
Ok(result.rows_affected() != 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn set_comment(
|
pub async fn set_comment(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -600,7 +600,7 @@ impl Trip {
|
|||||||
Ok(result.rows_affected() != 0)
|
Ok(result.rows_affected() != 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn set_attribute(
|
pub async fn set_attribute(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -628,7 +628,7 @@ impl Trip {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn save(
|
pub async fn save(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -662,7 +662,7 @@ impl Trip {
|
|||||||
Ok(id)
|
Ok(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn find_total_picked_weight(
|
pub async fn find_total_picked_weight(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -694,21 +694,21 @@ impl Trip {
|
|||||||
Ok(weight)
|
Ok(weight)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn types(&self) -> &Vec<TripType> {
|
pub fn types(&self) -> &Vec<TripType> {
|
||||||
self.types
|
self.types
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.expect("you need to call load_trips_types()")
|
.expect("you need to call load_trips_types()")
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn categories(&self) -> &Vec<TripCategory> {
|
pub fn categories(&self) -> &Vec<TripCategory> {
|
||||||
self.categories
|
self.categories
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.expect("you need to call load_trips_types()")
|
.expect("you need to call load_trips_types()")
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn total_picked_weight(&self) -> i64 {
|
pub fn total_picked_weight(&self) -> i64 {
|
||||||
self.categories()
|
self.categories()
|
||||||
.iter()
|
.iter()
|
||||||
@@ -724,7 +724,7 @@ impl Trip {
|
|||||||
.sum::<i64>()
|
.sum::<i64>()
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn load_trips_types(
|
pub async fn load_trips_types(
|
||||||
&mut self,
|
&mut self,
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
@@ -776,7 +776,7 @@ impl Trip {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn sync_trip_items_with_inventory(
|
pub async fn sync_trip_items_with_inventory(
|
||||||
&mut self,
|
&mut self,
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
@@ -857,7 +857,7 @@ impl Trip {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn load_categories(
|
pub async fn load_categories(
|
||||||
&mut self,
|
&mut self,
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
@@ -983,7 +983,7 @@ pub struct TripType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl TripsType {
|
impl TripsType {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn all(ctx: &Context, pool: &sqlx::Pool<sqlx::Sqlite>) -> Result<Vec<Self>, Error> {
|
pub async fn all(ctx: &Context, pool: &sqlx::Pool<sqlx::Sqlite>) -> Result<Vec<Self>, Error> {
|
||||||
let user_id = ctx.user.id.to_string();
|
let user_id = ctx.user.id.to_string();
|
||||||
sqlx::query_as!(
|
sqlx::query_as!(
|
||||||
@@ -1003,7 +1003,7 @@ impl TripsType {
|
|||||||
.collect::<Result<Vec<Self>, Error>>()
|
.collect::<Result<Vec<Self>, Error>>()
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn save(
|
pub async fn save(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
@@ -1027,7 +1027,7 @@ impl TripsType {
|
|||||||
Ok(id)
|
Ok(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn set_name(
|
pub async fn set_name(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ impl TryFrom<DbUserRow> for User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl User {
|
impl User {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn find_by_name(
|
pub async fn find_by_name(
|
||||||
pool: &sqlx::Pool<sqlx::Sqlite>,
|
pool: &sqlx::Pool<sqlx::Sqlite>,
|
||||||
name: &str,
|
name: &str,
|
||||||
@@ -51,7 +51,7 @@ impl User {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn create(pool: &sqlx::Pool<sqlx::Sqlite>, user: NewUser<'_>) -> Result<Uuid, Error> {
|
pub async fn create(pool: &sqlx::Pool<sqlx::Sqlite>, user: NewUser<'_>) -> Result<Uuid, Error> {
|
||||||
let id = Uuid::new_v4();
|
let id = Uuid::new_v4();
|
||||||
let id_param = id.to_string();
|
let id_param = id.to_string();
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ mod html;
|
|||||||
mod routes;
|
mod routes;
|
||||||
use routes::*;
|
use routes::*;
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
fn get_referer(headers: &HeaderMap) -> Result<&str, Error> {
|
fn get_referer(headers: &HeaderMap) -> Result<&str, Error> {
|
||||||
headers
|
headers
|
||||||
.get("referer")
|
.get("referer")
|
||||||
@@ -71,7 +71,7 @@ async fn simple_handler(State(state): State<AppState>) -> &'static str {
|
|||||||
"ok"
|
"ok"
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn router(state: AppState) -> Router {
|
pub fn router(state: AppState) -> Router {
|
||||||
Router::new()
|
Router::new()
|
||||||
.route("/favicon.svg", get(icon))
|
.route("/favicon.svg", get(icon))
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ pub struct TripTypeUpdate {
|
|||||||
new_value: String,
|
new_value: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn root(Extension(current_user): Extension<models::user::User>) -> impl IntoResponse {
|
pub async fn root(Extension(current_user): Extension<models::user::User>) -> impl IntoResponse {
|
||||||
view::Root::build(
|
view::Root::build(
|
||||||
&Context::build(current_user),
|
&Context::build(current_user),
|
||||||
@@ -106,7 +106,7 @@ pub async fn root(Extension(current_user): Extension<models::user::User>) -> imp
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn icon() -> impl IntoResponse {
|
pub async fn icon() -> impl IntoResponse {
|
||||||
(
|
(
|
||||||
[(header::CONTENT_TYPE, "image/svg+xml")],
|
[(header::CONTENT_TYPE, "image/svg+xml")],
|
||||||
@@ -114,7 +114,7 @@ pub async fn icon() -> impl IntoResponse {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn debug(headers: HeaderMap) -> impl IntoResponse {
|
pub async fn debug(headers: HeaderMap) -> impl IntoResponse {
|
||||||
let mut out = String::new();
|
let mut out = String::new();
|
||||||
for (key, value) in headers.iter() {
|
for (key, value) in headers.iter() {
|
||||||
@@ -123,7 +123,7 @@ pub async fn debug(headers: HeaderMap) -> impl IntoResponse {
|
|||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn inventory_active(
|
pub async fn inventory_active(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(mut state): State<AppState>,
|
State(mut state): State<AppState>,
|
||||||
@@ -161,7 +161,7 @@ pub async fn inventory_active(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn inventory_inactive(
|
pub async fn inventory_inactive(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(mut state): State<AppState>,
|
State(mut state): State<AppState>,
|
||||||
@@ -184,7 +184,7 @@ pub async fn inventory_inactive(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn inventory_item_validate_name(
|
pub async fn inventory_item_validate_name(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -201,7 +201,7 @@ pub async fn inventory_item_validate_name(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn inventory_item_create(
|
pub async fn inventory_item_create(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -252,7 +252,7 @@ pub async fn inventory_item_create(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn inventory_item_delete(
|
pub async fn inventory_item_delete(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -271,7 +271,7 @@ pub async fn inventory_item_delete(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn inventory_item_edit(
|
pub async fn inventory_item_edit(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -297,7 +297,7 @@ pub async fn inventory_item_edit(
|
|||||||
Ok(Redirect::to(&format!("/inventory/category/{id}/")))
|
Ok(Redirect::to(&format!("/inventory/category/{id}/")))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn inventory_item_cancel(
|
pub async fn inventory_item_cancel(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -316,7 +316,7 @@ pub async fn inventory_item_cancel(
|
|||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_create(
|
pub async fn trip_create(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -341,7 +341,7 @@ pub async fn trip_create(
|
|||||||
Ok(Redirect::to(&format!("/trips/{new_id}/")))
|
Ok(Redirect::to(&format!("/trips/{new_id}/")))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trips(
|
pub async fn trips(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -356,7 +356,7 @@ pub async fn trips(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip(
|
pub async fn trip(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(mut state): State<AppState>,
|
State(mut state): State<AppState>,
|
||||||
@@ -404,7 +404,7 @@ pub async fn trip(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_type_remove(
|
pub async fn trip_type_remove(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -423,7 +423,7 @@ pub async fn trip_type_remove(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_type_add(
|
pub async fn trip_type_add(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -435,7 +435,7 @@ pub async fn trip_type_add(
|
|||||||
Ok(Redirect::to(&format!("/trips/{trip_id}/")))
|
Ok(Redirect::to(&format!("/trips/{trip_id}/")))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_comment_set(
|
pub async fn trip_comment_set(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -460,7 +460,7 @@ pub async fn trip_comment_set(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_edit_attribute(
|
pub async fn trip_edit_attribute(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -485,7 +485,7 @@ pub async fn trip_edit_attribute(
|
|||||||
Ok(Redirect::to(&format!("/trips/{trip_id}/")))
|
Ok(Redirect::to(&format!("/trips/{trip_id}/")))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_state(
|
pub async fn trip_item_set_state(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
state: &AppState,
|
state: &AppState,
|
||||||
@@ -499,7 +499,7 @@ pub async fn trip_item_set_state(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_row(
|
pub async fn trip_row(
|
||||||
ctx: &Context,
|
ctx: &Context,
|
||||||
state: &AppState,
|
state: &AppState,
|
||||||
@@ -544,7 +544,7 @@ pub async fn trip_row(
|
|||||||
Ok(html::concat(&item_row, &category_row))
|
Ok(html::concat(&item_row, &category_row))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_pick(
|
pub async fn trip_item_set_pick(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -566,7 +566,7 @@ pub async fn trip_item_set_pick(
|
|||||||
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_pick_htmx(
|
pub async fn trip_item_set_pick_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -590,7 +590,7 @@ pub async fn trip_item_set_pick_htmx(
|
|||||||
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_unpick(
|
pub async fn trip_item_set_unpick(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -612,7 +612,7 @@ pub async fn trip_item_set_unpick(
|
|||||||
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_unpick_htmx(
|
pub async fn trip_item_set_unpick_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -636,7 +636,7 @@ pub async fn trip_item_set_unpick_htmx(
|
|||||||
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_pack(
|
pub async fn trip_item_set_pack(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -658,7 +658,7 @@ pub async fn trip_item_set_pack(
|
|||||||
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_pack_htmx(
|
pub async fn trip_item_set_pack_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -682,7 +682,7 @@ pub async fn trip_item_set_pack_htmx(
|
|||||||
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_unpack(
|
pub async fn trip_item_set_unpack(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -704,7 +704,7 @@ pub async fn trip_item_set_unpack(
|
|||||||
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_unpack_htmx(
|
pub async fn trip_item_set_unpack_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -728,7 +728,7 @@ pub async fn trip_item_set_unpack_htmx(
|
|||||||
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_ready(
|
pub async fn trip_item_set_ready(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -750,7 +750,7 @@ pub async fn trip_item_set_ready(
|
|||||||
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_ready_htmx(
|
pub async fn trip_item_set_ready_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -774,7 +774,7 @@ pub async fn trip_item_set_ready_htmx(
|
|||||||
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_unready(
|
pub async fn trip_item_set_unready(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -796,7 +796,7 @@ pub async fn trip_item_set_unready(
|
|||||||
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
.map(|_| -> Result<Redirect, Error> { Ok(Redirect::to(get_referer(&headers)?)) })?
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_set_unready_htmx(
|
pub async fn trip_item_set_unready_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -820,7 +820,7 @@ pub async fn trip_item_set_unready_htmx(
|
|||||||
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
Ok((headers, trip_row(&ctx, &state, trip_id, item_id).await?))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_total_weight_htmx(
|
pub async fn trip_total_weight_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -835,7 +835,7 @@ pub async fn trip_total_weight_htmx(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn inventory_category_create(
|
pub async fn inventory_category_create(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -854,7 +854,7 @@ pub async fn inventory_category_create(
|
|||||||
Ok(Redirect::to("/inventory/"))
|
Ok(Redirect::to("/inventory/"))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_state_set(
|
pub async fn trip_state_set(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -878,7 +878,7 @@ pub async fn trip_state_set(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trips_types(
|
pub async fn trips_types(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(mut state): State<AppState>,
|
State(mut state): State<AppState>,
|
||||||
@@ -897,7 +897,7 @@ pub async fn trips_types(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_type_create(
|
pub async fn trip_type_create(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -916,7 +916,7 @@ pub async fn trip_type_create(
|
|||||||
Ok(Redirect::to("/trips/types/"))
|
Ok(Redirect::to("/trips/types/"))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trips_types_edit_name(
|
pub async fn trips_types_edit_name(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -947,7 +947,7 @@ pub async fn trips_types_edit_name(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn inventory_item(
|
pub async fn inventory_item(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -967,7 +967,7 @@ pub async fn inventory_item(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_category_select(
|
pub async fn trip_category_select(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -1002,7 +1002,7 @@ pub async fn trip_category_select(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn inventory_category_select(
|
pub async fn inventory_category_select(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -1039,7 +1039,7 @@ pub async fn inventory_category_select(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_packagelist(
|
pub async fn trip_packagelist(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -1061,7 +1061,7 @@ pub async fn trip_packagelist(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_packagelist_set_pack_htmx(
|
pub async fn trip_item_packagelist_set_pack_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -1089,7 +1089,7 @@ pub async fn trip_item_packagelist_set_pack_htmx(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_packagelist_set_unpack_htmx(
|
pub async fn trip_item_packagelist_set_unpack_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -1119,7 +1119,7 @@ pub async fn trip_item_packagelist_set_unpack_htmx(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_packagelist_set_ready_htmx(
|
pub async fn trip_item_packagelist_set_ready_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
@@ -1147,7 +1147,7 @@ pub async fn trip_item_packagelist_set_ready_htmx(
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn trip_item_packagelist_set_unready_htmx(
|
pub async fn trip_item_packagelist_set_unready_htmx(
|
||||||
Extension(current_user): Extension<models::user::User>,
|
Extension(current_user): Extension<models::user::User>,
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use std::str::FromStr as _;
|
|||||||
|
|
||||||
use crate::StartError;
|
use crate::StartError;
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn init_database_pool(url: &str) -> Result<Pool<Sqlite>, StartError> {
|
pub async fn init_database_pool(url: &str) -> Result<Pool<Sqlite>, StartError> {
|
||||||
Ok(SqlitePoolOptions::new()
|
Ok(SqlitePoolOptions::new()
|
||||||
.max_connections(5)
|
.max_connections(5)
|
||||||
@@ -23,7 +23,7 @@ pub async fn init_database_pool(url: &str) -> Result<Pool<Sqlite>, StartError> {
|
|||||||
.await?)
|
.await?)
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub async fn migrate(url: &str) -> Result<(), StartError> {
|
pub async fn migrate(url: &str) -> Result<(), StartError> {
|
||||||
let pool = SqlitePoolOptions::new()
|
let pool = SqlitePoolOptions::new()
|
||||||
.max_connections(5)
|
.max_connections(5)
|
||||||
@@ -35,7 +35,7 @@ pub async fn migrate(url: &str) -> Result<(), StartError> {
|
|||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
async { sqlx::migrate!().run(&pool).await }
|
async { sqlx::migrate!().run(&pool).await }
|
||||||
// .instrument(tracing::info_span!("packager::query", "migration"))
|
.instrument(tracing::info_span!("packager::query", "migration"))
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use maud::{html, Markup};
|
|||||||
pub struct Home;
|
pub struct Home;
|
||||||
|
|
||||||
impl Home {
|
impl Home {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build() -> Markup {
|
pub fn build() -> Markup {
|
||||||
html!(
|
html!(
|
||||||
div
|
div
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ use uuid::Uuid;
|
|||||||
pub struct Inventory;
|
pub struct Inventory;
|
||||||
|
|
||||||
impl Inventory {
|
impl Inventory {
|
||||||
// #[tracing::instrument(
|
#[tracing::instrument(
|
||||||
// target = "packager::html::build",
|
target = "packager::html::build",
|
||||||
// name = "build_inventory",
|
name = "build_inventory",
|
||||||
// fields(component = "Inventory")
|
fields(component = "Inventory")
|
||||||
// )]
|
)]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
active_category: Option<&models::inventory::Category>,
|
active_category: Option<&models::inventory::Category>,
|
||||||
categories: &Vec<models::inventory::Category>,
|
categories: &Vec<models::inventory::Category>,
|
||||||
@@ -42,11 +42,11 @@ impl Inventory {
|
|||||||
pub struct InventoryCategoryList;
|
pub struct InventoryCategoryList;
|
||||||
|
|
||||||
impl InventoryCategoryList {
|
impl InventoryCategoryList {
|
||||||
// #[tracing::instrument(
|
#[tracing::instrument(
|
||||||
// target = "packager::html::build",
|
target = "packager::html::build",
|
||||||
// name = "build_inventory_category_list",
|
name = "build_inventory_category_list",
|
||||||
// fields(component = "InventoryCategoryList")
|
fields(component = "InventoryCategoryList")
|
||||||
// )]
|
)]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
active_category: Option<&models::inventory::Category>,
|
active_category: Option<&models::inventory::Category>,
|
||||||
categories: &Vec<models::inventory::Category>,
|
categories: &Vec<models::inventory::Category>,
|
||||||
@@ -153,11 +153,11 @@ impl InventoryCategoryList {
|
|||||||
pub struct InventoryItemList;
|
pub struct InventoryItemList;
|
||||||
|
|
||||||
impl InventoryItemList {
|
impl InventoryItemList {
|
||||||
// #[tracing::instrument(
|
#[tracing::instrument(
|
||||||
// target = "packager::html::build",
|
target = "packager::html::build",
|
||||||
// name = "build_inventory_item_list",
|
name = "build_inventory_item_list",
|
||||||
// fields(component = "InventoryItemList")
|
fields(component = "InventoryItemList")
|
||||||
// )]
|
)]
|
||||||
pub fn build(edit_item_id: Option<Uuid>, items: &Vec<models::inventory::Item>) -> Markup {
|
pub fn build(edit_item_id: Option<Uuid>, items: &Vec<models::inventory::Item>) -> Markup {
|
||||||
let biggest_item_weight: i64 = items.iter().map(|item| item.weight).max().unwrap_or(1);
|
let biggest_item_weight: i64 = items.iter().map(|item| item.weight).max().unwrap_or(1);
|
||||||
html!(
|
html!(
|
||||||
@@ -333,11 +333,11 @@ impl InventoryItemList {
|
|||||||
pub struct InventoryNewItemFormName;
|
pub struct InventoryNewItemFormName;
|
||||||
|
|
||||||
impl InventoryNewItemFormName {
|
impl InventoryNewItemFormName {
|
||||||
// #[tracing::instrument(
|
#[tracing::instrument(
|
||||||
// target = "packager::html::build",
|
target = "packager::html::build",
|
||||||
// name = "build_inventory_new_item_form_name",
|
name = "build_inventory_new_item_form_name",
|
||||||
// fields(component = "InventoryNewItemFormName")
|
fields(component = "InventoryNewItemFormName")
|
||||||
// )]
|
)]
|
||||||
pub fn build(value: Option<&str>, error: bool) -> Markup {
|
pub fn build(value: Option<&str>, error: bool) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
div
|
div
|
||||||
@@ -385,11 +385,11 @@ impl InventoryNewItemFormName {
|
|||||||
pub struct InventoryNewItemFormWeight;
|
pub struct InventoryNewItemFormWeight;
|
||||||
|
|
||||||
impl InventoryNewItemFormWeight {
|
impl InventoryNewItemFormWeight {
|
||||||
// #[tracing::instrument(
|
#[tracing::instrument(
|
||||||
// target = "packager::html::build",
|
target = "packager::html::build",
|
||||||
// name = "build_inventory_new_item_form_weight",
|
name = "build_inventory_new_item_form_weight",
|
||||||
// fields(component = "InventoryNewItemFormWeight")
|
fields(component = "InventoryNewItemFormWeight")
|
||||||
// )]
|
)]
|
||||||
pub fn build() -> Markup {
|
pub fn build() -> Markup {
|
||||||
html!(
|
html!(
|
||||||
div
|
div
|
||||||
@@ -432,11 +432,11 @@ impl InventoryNewItemFormWeight {
|
|||||||
pub struct InventoryNewItemFormCategory;
|
pub struct InventoryNewItemFormCategory;
|
||||||
|
|
||||||
impl InventoryNewItemFormCategory {
|
impl InventoryNewItemFormCategory {
|
||||||
// #[tracing::instrument(
|
#[tracing::instrument(
|
||||||
// target = "packager::html::build",
|
target = "packager::html::build",
|
||||||
// name = "build_inventory_new_item_form_category",
|
name = "build_inventory_new_item_form_category",
|
||||||
// fields(component = "InventoryNewItemFormCategory")
|
fields(component = "InventoryNewItemFormCategory")
|
||||||
// )]
|
)]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
active_category: Option<&models::inventory::Category>,
|
active_category: Option<&models::inventory::Category>,
|
||||||
categories: &Vec<models::inventory::Category>,
|
categories: &Vec<models::inventory::Category>,
|
||||||
@@ -477,11 +477,11 @@ impl InventoryNewItemFormCategory {
|
|||||||
pub struct InventoryNewItemForm;
|
pub struct InventoryNewItemForm;
|
||||||
|
|
||||||
impl InventoryNewItemForm {
|
impl InventoryNewItemForm {
|
||||||
// #[tracing::instrument(
|
#[tracing::instrument(
|
||||||
// target = "packager::html::build",
|
target = "packager::html::build",
|
||||||
// name = "build_inventory_new_item_form",
|
name = "build_inventory_new_item_form",
|
||||||
// fields(component = "InventoryNewItemForm")
|
fields(component = "InventoryNewItemForm")
|
||||||
// )]
|
)]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
active_category: Option<&models::inventory::Category>,
|
active_category: Option<&models::inventory::Category>,
|
||||||
categories: &Vec<models::inventory::Category>,
|
categories: &Vec<models::inventory::Category>,
|
||||||
@@ -528,11 +528,11 @@ impl InventoryNewItemForm {
|
|||||||
pub struct InventoryNewCategoryForm;
|
pub struct InventoryNewCategoryForm;
|
||||||
|
|
||||||
impl InventoryNewCategoryForm {
|
impl InventoryNewCategoryForm {
|
||||||
// #[tracing::instrument(
|
#[tracing::instrument(
|
||||||
// target = "packager::html::build",
|
target = "packager::html::build",
|
||||||
// name = "build_inventory_new_category_form",
|
name = "build_inventory_new_category_form",
|
||||||
// fields(component = "InventoryNewCategoryForm")
|
fields(component = "InventoryNewCategoryForm")
|
||||||
// )]
|
)]
|
||||||
pub fn build() -> Markup {
|
pub fn build() -> Markup {
|
||||||
html!(
|
html!(
|
||||||
form
|
form
|
||||||
@@ -587,11 +587,11 @@ impl InventoryNewCategoryForm {
|
|||||||
pub struct InventoryItem;
|
pub struct InventoryItem;
|
||||||
|
|
||||||
impl InventoryItem {
|
impl InventoryItem {
|
||||||
// #[tracing::instrument(
|
#[tracing::instrument(
|
||||||
// target = "packager::html::build",
|
target = "packager::html::build",
|
||||||
// name = "build_inventory_item",
|
name = "build_inventory_item",
|
||||||
// fields(component = "InventoryItem")
|
fields(component = "InventoryItem")
|
||||||
// )]
|
)]
|
||||||
pub fn build(_state: &ClientState, item: &models::inventory::InventoryItem) -> Markup {
|
pub fn build(_state: &ClientState, item: &models::inventory::InventoryItem) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
div ."p-8" {
|
div ."p-8" {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ pub struct Root;
|
|||||||
use crate::TopLevelPage;
|
use crate::TopLevelPage;
|
||||||
|
|
||||||
impl Root {
|
impl Root {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(context: &Context, body: &Markup, active_page: Option<&TopLevelPage>) -> Markup {
|
pub fn build(context: &Context, body: &Markup, active_page: Option<&TopLevelPage>) -> Markup {
|
||||||
let menu_item = |item: TopLevelPage, active_page: Option<&TopLevelPage>| {
|
let menu_item = |item: TopLevelPage, active_page: Option<&TopLevelPage>| {
|
||||||
let active = active_page.map_or(false, |page| *page == item);
|
let active = active_page.map_or(false, |page| *page == item);
|
||||||
@@ -117,7 +117,7 @@ impl Root {
|
|||||||
pub struct ErrorPage;
|
pub struct ErrorPage;
|
||||||
|
|
||||||
impl ErrorPage {
|
impl ErrorPage {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(message: &str) -> Markup {
|
pub fn build(message: &str) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
(DOCTYPE)
|
(DOCTYPE)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ pub mod packagelist;
|
|||||||
pub mod types;
|
pub mod types;
|
||||||
|
|
||||||
impl TripManager {
|
impl TripManager {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trips: Vec<models::trips::Trip>) -> Markup {
|
pub fn build(trips: Vec<models::trips::Trip>) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
div
|
div
|
||||||
@@ -37,7 +37,7 @@ pub enum InputType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl From<InputType> for &'static str {
|
impl From<InputType> for &'static str {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
fn from(value: InputType) -> &'static str {
|
fn from(value: InputType) -> &'static str {
|
||||||
match value {
|
match value {
|
||||||
InputType::Text => "text",
|
InputType::Text => "text",
|
||||||
@@ -61,7 +61,7 @@ fn trip_state_icon(state: &models::trips::TripState) -> &'static str {
|
|||||||
pub struct TripTable;
|
pub struct TripTable;
|
||||||
|
|
||||||
impl TripTable {
|
impl TripTable {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trips: Vec<models::trips::Trip>) -> Markup {
|
pub fn build(trips: Vec<models::trips::Trip>) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
table
|
table
|
||||||
@@ -105,7 +105,7 @@ impl TripTable {
|
|||||||
pub struct TripTableRow;
|
pub struct TripTableRow;
|
||||||
|
|
||||||
impl TripTableRow {
|
impl TripTableRow {
|
||||||
// #[tracing::instrument(skip(value))]
|
#[tracing::instrument(skip(value))]
|
||||||
pub fn build(trip_id: Uuid, value: impl maud::Render) -> Markup {
|
pub fn build(trip_id: Uuid, value: impl maud::Render) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
td ."border" ."p-0" ."m-0" {
|
td ."border" ."p-0" ."m-0" {
|
||||||
@@ -125,7 +125,7 @@ impl TripTableRow {
|
|||||||
pub struct NewTrip;
|
pub struct NewTrip;
|
||||||
|
|
||||||
impl NewTrip {
|
impl NewTrip {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build() -> Markup {
|
pub fn build() -> Markup {
|
||||||
html!(
|
html!(
|
||||||
form
|
form
|
||||||
@@ -221,7 +221,7 @@ impl NewTrip {
|
|||||||
pub struct Trip;
|
pub struct Trip;
|
||||||
|
|
||||||
impl Trip {
|
impl Trip {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
trip: &models::trips::Trip,
|
trip: &models::trips::Trip,
|
||||||
trip_edit_attribute: Option<&models::trips::TripAttribute>,
|
trip_edit_attribute: Option<&models::trips::TripAttribute>,
|
||||||
@@ -349,7 +349,7 @@ impl Trip {
|
|||||||
pub struct TripInfoRow;
|
pub struct TripInfoRow;
|
||||||
|
|
||||||
impl TripInfoRow {
|
impl TripInfoRow {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
name: &str,
|
name: &str,
|
||||||
value: Option<impl std::fmt::Display + std::fmt::Debug>,
|
value: Option<impl std::fmt::Display + std::fmt::Debug>,
|
||||||
@@ -473,7 +473,7 @@ impl TripInfoRow {
|
|||||||
pub struct TripInfoTotalWeightRow;
|
pub struct TripInfoTotalWeightRow;
|
||||||
|
|
||||||
impl TripInfoTotalWeightRow {
|
impl TripInfoTotalWeightRow {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trip_id: Uuid, value: i64) -> Markup {
|
pub fn build(trip_id: Uuid, value: i64) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
span
|
span
|
||||||
@@ -491,7 +491,7 @@ impl TripInfoTotalWeightRow {
|
|||||||
pub struct TripInfoStateRow;
|
pub struct TripInfoStateRow;
|
||||||
|
|
||||||
impl TripInfoStateRow {
|
impl TripInfoStateRow {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trip_state: &models::trips::TripState) -> Markup {
|
pub fn build(trip_state: &models::trips::TripState) -> Markup {
|
||||||
let prev_state = trip_state.prev();
|
let prev_state = trip_state.prev();
|
||||||
let next_state = trip_state.next();
|
let next_state = trip_state.next();
|
||||||
@@ -596,7 +596,7 @@ impl TripInfoStateRow {
|
|||||||
pub struct TripInfo;
|
pub struct TripInfo;
|
||||||
|
|
||||||
impl TripInfo {
|
impl TripInfo {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
trip_edit_attribute: Option<&models::trips::TripAttribute>,
|
trip_edit_attribute: Option<&models::trips::TripAttribute>,
|
||||||
trip: &models::trips::Trip,
|
trip: &models::trips::Trip,
|
||||||
@@ -766,7 +766,7 @@ impl TripInfo {
|
|||||||
pub struct TripComment;
|
pub struct TripComment;
|
||||||
|
|
||||||
impl TripComment {
|
impl TripComment {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trip: &models::trips::Trip) -> Markup {
|
pub fn build(trip: &models::trips::Trip) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
div
|
div
|
||||||
@@ -821,7 +821,7 @@ impl TripComment {
|
|||||||
pub struct TripItems;
|
pub struct TripItems;
|
||||||
|
|
||||||
impl TripItems {
|
impl TripItems {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
active_category: Option<&models::trips::TripCategory>,
|
active_category: Option<&models::trips::TripCategory>,
|
||||||
trip: &models::trips::Trip,
|
trip: &models::trips::Trip,
|
||||||
@@ -849,7 +849,7 @@ impl TripItems {
|
|||||||
pub struct TripCategoryListRow;
|
pub struct TripCategoryListRow;
|
||||||
|
|
||||||
impl TripCategoryListRow {
|
impl TripCategoryListRow {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
trip_id: Uuid,
|
trip_id: Uuid,
|
||||||
category: &models::trips::TripCategory,
|
category: &models::trips::TripCategory,
|
||||||
@@ -958,7 +958,7 @@ impl TripCategoryListRow {
|
|||||||
pub struct TripCategoryList;
|
pub struct TripCategoryList;
|
||||||
|
|
||||||
impl TripCategoryList {
|
impl TripCategoryList {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
active_category: Option<&models::trips::TripCategory>,
|
active_category: Option<&models::trips::TripCategory>,
|
||||||
trip: &models::trips::Trip,
|
trip: &models::trips::Trip,
|
||||||
@@ -1015,7 +1015,7 @@ impl TripCategoryList {
|
|||||||
pub struct TripItemList;
|
pub struct TripItemList;
|
||||||
|
|
||||||
impl TripItemList {
|
impl TripItemList {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trip_id: Uuid, items: &Vec<models::trips::TripItem>) -> Markup {
|
pub fn build(trip_id: Uuid, items: &Vec<models::trips::TripItem>) -> Markup {
|
||||||
let biggest_item_weight: i64 = items.iter().map(|item| item.item.weight).max().unwrap_or(1);
|
let biggest_item_weight: i64 = items.iter().map(|item| item.item.weight).max().unwrap_or(1);
|
||||||
|
|
||||||
@@ -1055,7 +1055,7 @@ impl TripItemList {
|
|||||||
pub struct TripItemListRow;
|
pub struct TripItemListRow;
|
||||||
|
|
||||||
impl TripItemListRow {
|
impl TripItemListRow {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(
|
pub fn build(
|
||||||
trip_id: Uuid,
|
trip_id: Uuid,
|
||||||
item: &models::trips::TripItem,
|
item: &models::trips::TripItem,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use crate::models;
|
|||||||
pub struct TripPackageListRowReady;
|
pub struct TripPackageListRowReady;
|
||||||
|
|
||||||
impl TripPackageListRowReady {
|
impl TripPackageListRowReady {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trip_id: Uuid, item: &models::trips::TripItem) -> Markup {
|
pub fn build(trip_id: Uuid, item: &models::trips::TripItem) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
li
|
li
|
||||||
@@ -83,7 +83,7 @@ impl TripPackageListRowReady {
|
|||||||
pub struct TripPackageListRowUnready;
|
pub struct TripPackageListRowUnready;
|
||||||
|
|
||||||
impl TripPackageListRowUnready {
|
impl TripPackageListRowUnready {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trip_id: Uuid, item: &models::trips::TripItem) -> Markup {
|
pub fn build(trip_id: Uuid, item: &models::trips::TripItem) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
li
|
li
|
||||||
@@ -160,7 +160,7 @@ impl TripPackageListRowUnready {
|
|||||||
pub struct TripPackageListCategoryBlockReady;
|
pub struct TripPackageListCategoryBlockReady;
|
||||||
|
|
||||||
impl TripPackageListCategoryBlockReady {
|
impl TripPackageListCategoryBlockReady {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trip: &models::trips::Trip, category: &models::trips::TripCategory) -> Markup {
|
pub fn build(trip: &models::trips::Trip, category: &models::trips::TripCategory) -> Markup {
|
||||||
let empty = !category
|
let empty = !category
|
||||||
.items
|
.items
|
||||||
@@ -217,7 +217,7 @@ impl TripPackageListCategoryBlockReady {
|
|||||||
pub struct TripPackageListCategoryBlockUnready;
|
pub struct TripPackageListCategoryBlockUnready;
|
||||||
|
|
||||||
impl TripPackageListCategoryBlockUnready {
|
impl TripPackageListCategoryBlockUnready {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trip: &models::trips::Trip, category: &models::trips::TripCategory) -> Markup {
|
pub fn build(trip: &models::trips::Trip, category: &models::trips::TripCategory) -> Markup {
|
||||||
let empty = !category
|
let empty = !category
|
||||||
.items
|
.items
|
||||||
@@ -273,7 +273,7 @@ impl TripPackageListCategoryBlockUnready {
|
|||||||
pub struct TripPackageList;
|
pub struct TripPackageList;
|
||||||
|
|
||||||
impl TripPackageList {
|
impl TripPackageList {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(trip: &models::trips::Trip) -> Markup {
|
pub fn build(trip: &models::trips::Trip) -> Markup {
|
||||||
// let all_packed = trip.categories().iter().all(|category| {
|
// let all_packed = trip.categories().iter().all(|category| {
|
||||||
// category
|
// category
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ use maud::{html, Markup};
|
|||||||
pub struct TypeList;
|
pub struct TypeList;
|
||||||
|
|
||||||
impl TypeList {
|
impl TypeList {
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
pub fn build(state: &ClientState, trip_types: Vec<models::trips::TripsType>) -> Markup {
|
pub fn build(state: &ClientState, trip_types: Vec<models::trips::TripsType>) -> Markup {
|
||||||
html!(
|
html!(
|
||||||
div ."p-8" ."flex" ."flex-col" ."gap-8" {
|
div ."p-8" ."flex" ."flex-col" ."gap-8" {
|
||||||
|
|||||||
Reference in New Issue
Block a user