diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 3a5a112..1f8f584 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -59,6 +59,7 @@ import {DomSanitizer} from '@angular/platform-browser';
import {MatIconRegistry} from '@angular/material/icon';
import {MatDialogModule} from '@angular/material/dialog';
import {MatTooltipModule} from '@angular/material/tooltip';
+import {MatExpansionModule} from '@angular/material/expansion';
// import logo from 'src/assets/gv-new-logo.svg';
import logo from '!!raw-loader!./gv-new-logo-white.svg';
@@ -135,7 +136,8 @@ const appRoutes: Routes = [
MatBadgeModule,
MatProgressSpinnerModule,
MatDialogModule,
- MatTooltipModule
+ MatTooltipModule,
+ MatExpansionModule
],
entryComponents: [ DialogCreateGroupComponent ],
providers: [],
diff --git a/src/app/components/profile/profile.component.html b/src/app/components/profile/profile.component.html
index 4ad025d..b791d85 100644
--- a/src/app/components/profile/profile.component.html
+++ b/src/app/components/profile/profile.component.html
@@ -13,11 +13,16 @@
- {{rankname}} ({{userProfile.points}} points)
+
+ {{rankname}} ({{userProfile.points}} points)
+ {{userProfile.friendCount}} friends
+ {{userProfile.groupCount}} groups
+ joined on {{userProfile.joinedAt}}
+
-
+
diff --git a/src/app/components/profile/profile.component.sass b/src/app/components/profile/profile.component.sass
index 1878392..335d7d1 100644
--- a/src/app/components/profile/profile.component.sass
+++ b/src/app/components/profile/profile.component.sass
@@ -27,14 +27,16 @@
margin-top: 32px
.mat-toolbar-row
max-height: 40px
-
-#username
- margin: 0 0.5em
-#handle
- font-size: 14px
-#info
- font-size: 14px
- margin-left: calc(100px + 0.5em)
+ #info-box
+ font-size: 14px
+ margin-left: calc(100px + 0.5em)
+ .info
+ margin-right: 3em
+ #username
+ margin: 0 0.5em
+ #handle
+ font-size: 14px
+
.mat-table
width: 100%
diff --git a/src/app/models/user.ts b/src/app/models/user.ts
index b3e5fca..4449dbc 100644
--- a/src/app/models/user.ts
+++ b/src/app/models/user.ts
@@ -12,6 +12,9 @@ export class User {
points: number;
level: number;
profilePicture: string;
+ joinedAt: string;
+ friendCount: number;
+ groupCount: number;
darkmode = false;
diff --git a/src/app/services/profile/profile.service.ts b/src/app/services/profile/profile.service.ts
index 0bc216b..428d0cb 100644
--- a/src/app/services/profile/profile.service.ts
+++ b/src/app/services/profile/profile.service.ts
@@ -48,6 +48,8 @@ export class ProfileService {
points
level
friendCount
+ groupCount
+ joinedAt
friends{
id
}
@@ -80,6 +82,8 @@ export class ProfileService {
points
level
friendCount
+ groupCount
+ joinedAt
friends{
id
}
@@ -116,6 +120,11 @@ export class ProfileService {
profile.handle = response.data.getUser.handle;
profile.points = response.data.getUser.points;
profile.level = response.data.getUser.level;
+ profile.friendCount = response.data.getUser.friendCount;
+ profile.groupCount = response.data.getUser.groupCount;
+ const temp = new Date(Number(response.data.getUser.joinedAt));
+ const date = temp.toLocaleString('en-GB');
+ profile.joinedAt = date;
for (const post of response.data.getUser.posts) {
const id: number = post.id;
const content: string = post.content;