diff --git a/app/queries/get_group_details.graphql b/app/queries/get_group_details.graphql index b338527..00400d7 100644 --- a/app/queries/get_group_details.graphql +++ b/app/queries/get_group_details.graphql @@ -2,6 +2,8 @@ query GetGroupDetails($id: Int!) { group(groupId: $id) { id displayName + creationDate + uuid users { id displayName diff --git a/app/queries/get_group_list.graphql b/app/queries/get_group_list.graphql index 28f56e4..54714c2 100644 --- a/app/queries/get_group_list.graphql +++ b/app/queries/get_group_list.graphql @@ -2,5 +2,6 @@ query GetGroupList { groups { id displayName + creationDate } } diff --git a/app/queries/get_user_details.graphql b/app/queries/get_user_details.graphql index 8497ac0..f476f2d 100644 --- a/app/queries/get_user_details.graphql +++ b/app/queries/get_user_details.graphql @@ -6,6 +6,7 @@ query GetUserDetails($id: String!) { firstName lastName creationDate + uuid groups { id displayName diff --git a/app/src/components/group_details.rs b/app/src/components/group_details.rs index 442fec5..33bbd6f 100644 --- a/app/src/components/group_details.rs +++ b/app/src/components/group_details.rs @@ -68,6 +68,45 @@ impl GroupDetails { } } + fn view_details(&self, g: &Group) -> Html { + html! { + <> +

{g.display_name.to_string()}

+
+
+
+ +
+ {g.display_name.to_string()} +
+
+
+ +
+ {g.creation_date.date().naive_local()} +
+
+
+ +
+ {g.uuid.to_string()} +
+
+
+
+ + } + } + fn view_user_list(&self, g: &Group) -> Html { let make_user_row = |user: &User| { let user_id = user.id.clone(); @@ -92,7 +131,6 @@ impl GroupDetails { }; html! { <> -

{g.display_name.to_string()}

{"Members"}
@@ -201,6 +239,7 @@ impl Component for GroupDetails { (Some(u), error) => { html! {
+ {self.view_details(u)} {self.view_user_list(u)} {self.view_add_user_button(u)} {self.view_messages(error)} diff --git a/app/src/components/group_table.rs b/app/src/components/group_table.rs index e6c7a0e..206c084 100644 --- a/app/src/components/group_table.rs +++ b/app/src/components/group_table.rs @@ -97,7 +97,8 @@ impl GroupTable {
- + + @@ -122,6 +123,9 @@ impl GroupTable { {&group.display_name} +
{"Groups"}{"Group name"}{"Creation date"} {"Delete"}
+ {&group.creation_date.date().naive_local()} + {&self.common.user.creation_date.date().naive_local()} +
+ +
+ {&self.common.user.uuid} +
+