Compare commits
	
		
			8 Commits
		
	
	
		
			411eea179c
			...
			c9c7ad967d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| c9c7ad967d | |||
| a17ac5f1b5 | |||
| 9fb4167b50 | |||
| 54c013ec10 | |||
| a9fbb05944 | |||
| 44bc217452 | |||
| d586f37cbe | |||
| 58943bd4e2 | 
@@ -23,7 +23,7 @@ pub mod triptype;
 | 
				
			|||||||
pub mod user;
 | 
					pub mod user;
 | 
				
			||||||
pub mod usertrip;
 | 
					pub mod usertrip;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Serialize)]
 | 
					#[derive(Serialize, Debug)]
 | 
				
			||||||
pub struct Day {
 | 
					pub struct Day {
 | 
				
			||||||
    day: NaiveDate,
 | 
					    day: NaiveDate,
 | 
				
			||||||
    planned_events: Vec<PlannedEventWithUserAndTriptype>,
 | 
					    planned_events: Vec<PlannedEventWithUserAndTriptype>,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -144,7 +144,7 @@ WHERE day=?",
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        let mut ret = Vec::new();
 | 
					        let mut ret = Vec::new();
 | 
				
			||||||
        for event in events {
 | 
					        for event in events {
 | 
				
			||||||
            let cox = Registration::all_cox(db, event.trip_details_id).await;
 | 
					            let cox = Registration::all_cox(db, event.id).await;
 | 
				
			||||||
            let mut trip_type = None;
 | 
					            let mut trip_type = None;
 | 
				
			||||||
            if let Some(trip_type_id) = event.trip_type_id {
 | 
					            if let Some(trip_type_id) = event.trip_type_id {
 | 
				
			||||||
                trip_type = TripType::find_by_id(db, trip_type_id).await;
 | 
					                trip_type = TripType::find_by_id(db, trip_type_id).await;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,7 +25,7 @@ pub struct Trip {
 | 
				
			|||||||
    is_locked: bool,
 | 
					    is_locked: bool,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Serialize)]
 | 
					#[derive(Serialize, Debug)]
 | 
				
			||||||
pub struct TripWithUserAndType {
 | 
					pub struct TripWithUserAndType {
 | 
				
			||||||
    #[serde(flatten)]
 | 
					    #[serde(flatten)]
 | 
				
			||||||
    pub trip: Trip,
 | 
					    pub trip: Trip,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,7 +57,6 @@ async fn index(db: &State<SqlitePool>, user: User, flash: Option<FlashMessage<'_
 | 
				
			|||||||
    if let Some(msg) = flash {
 | 
					    if let Some(msg) = flash {
 | 
				
			||||||
        context.insert("flash", &msg.into_inner());
 | 
					        context.insert("flash", &msg.into_inner());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    println!("{user:#?}");
 | 
					 | 
				
			||||||
    context.insert("loggedin_user", &UserWithRoles::from_user(user, db).await);
 | 
					    context.insert("loggedin_user", &UserWithRoles::from_user(user, db).await);
 | 
				
			||||||
    context.insert("days", &days);
 | 
					    context.insert("days", &days);
 | 
				
			||||||
    Template::render("index", context.into_json())
 | 
					    Template::render("index", context.into_json())
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user