mirror of
				https://github.com/nitnelave/lldap.git
				synced 2023-04-12 14:25:13 +00:00 
			
		
		
		
	app: Fix the user detail view
This commit is contained in:
		
							parent
							
								
									092cdb860c
								
							
						
					
					
						commit
						12f510d82a
					
				@ -1,5 +1,5 @@
 | 
				
			|||||||
query GetUserDetails($id: String!) {
 | 
					query GetUserDetails($id: String!) {
 | 
				
			||||||
  user(id: $id) {
 | 
					  user(userId: $id) {
 | 
				
			||||||
    id
 | 
					    id
 | 
				
			||||||
    email
 | 
					    email
 | 
				
			||||||
    displayName
 | 
					    displayName
 | 
				
			||||||
 | 
				
			|||||||
@ -141,7 +141,7 @@ impl App {
 | 
				
			|||||||
    fn get_redirect_route() -> Option<String> {
 | 
					    fn get_redirect_route() -> Option<String> {
 | 
				
			||||||
        let route_service = RouteService::<()>::new();
 | 
					        let route_service = RouteService::<()>::new();
 | 
				
			||||||
        let current_route = route_service.get_path();
 | 
					        let current_route = route_service.get_path();
 | 
				
			||||||
        if current_route.is_empty() || current_route.contains("login") {
 | 
					        if current_route.is_empty() || current_route == "/" || current_route.contains("login") {
 | 
				
			||||||
            None
 | 
					            None
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            Some(current_route)
 | 
					            Some(current_route)
 | 
				
			||||||
 | 
				
			|||||||
@ -94,7 +94,7 @@ impl Component for UserDetails {
 | 
				
			|||||||
                        <div>{"Display name: "}{&u.display_name.as_ref().unwrap_or(&String::new())}</div>
 | 
					                        <div>{"Display name: "}{&u.display_name.as_ref().unwrap_or(&String::new())}</div>
 | 
				
			||||||
                        <div>{"First name: "}{&u.first_name.as_ref().unwrap_or(&String::new())}</div>
 | 
					                        <div>{"First name: "}{&u.first_name.as_ref().unwrap_or(&String::new())}</div>
 | 
				
			||||||
                        <div>{"Last name: "}{&u.last_name.as_ref().unwrap_or(&String::new())}</div>
 | 
					                        <div>{"Last name: "}{&u.last_name.as_ref().unwrap_or(&String::new())}</div>
 | 
				
			||||||
                        <div>{"Creation date: "}{&u.creation_date}</div>
 | 
					                        <div>{"Creation date: "}{&u.creation_date.with_timezone(&chrono::Local)}</div>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user