Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Task/modernize layout of overview tab in admin control panel (#6793)
Thomas Kaule399702992a3
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c4c16ad76c..1664e56d4a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Integrated a theme switcher into _Storybook_ to support toggling between the light and dark mode+### Changed++- Modernized the layout of the overview tab in the admin control panel+### Fixed- Optimized the spacing of the logo in the headerdiff --git a/apps/client/src/app/components/admin-overview/admin-overview.component.ts b/apps/client/src/app/components/admin-overview/admin-overview.component.tsindex ff55bb2bc6..9b92c5b119 100644--- a/apps/client/src/app/components/admin-overview/admin-overview.component.ts+++ b/apps/client/src/app/components/admin-overview/admin-overview.component.ts@@ -144,6 +144,21 @@ export class GfAdminOverviewComponent implements OnInit {});}+ public get activitiesCountPerUser() {+ if (!this.activitiesCount || !this.userCount) {+ return undefined;+ }++ const formattedActivitiesCountPerUser = (+ this.activitiesCount / this.userCount+ ).toLocaleString(this.user?.settings?.locale, {+ maximumFractionDigits: 2,+ minimumFractionDigits: 2+ });++ return `(${formattedActivitiesCountPerUser} ${$localize`per User`})`;+ }+public ngOnInit() {this.fetchAdminData();}diff --git a/apps/client/src/app/components/admin-overview/admin-overview.html b/apps/client/src/app/components/admin-overview/admin-overview.htmlindex 3a8a81024f..5514c57d0e 100644--- a/apps/client/src/app/components/admin-overview/admin-overview.html+++ b/apps/client/src/app/components/admin-overview/admin-overview.html@@ -1,38 +1,51 @@<div class="container">+ <div class="mb-3 row">+ <div class="col-lg-4 mb-3 mb-lg-0">+ <mat-card appearance="outlined">+ <mat-card-content>+ <gf-value+ i18n+ size="large"+ [enableCopyToClipboardButton]="true"+ [value]="version"+ >Version</gf-value+ >+ </mat-card-content>+ </mat-card>+ </div>+ <div class="col-lg-4 mb-3 mb-lg-0">+ <mat-card appearance="outlined">+ <mat-card-content>+ <gf-value+ i18n+ size="large"+ [locale]="user?.settings?.locale"+ [value]="userCount"+ >Users</gf-value+ >+ </mat-card-content>+ </mat-card>+ </div>+ <div class="col-lg-4">+ <mat-card appearance="outlined">+ <mat-card-content>+ <gf-value+ i18n+ size="large"+ [locale]="user?.settings?.locale"+ [subLabel]="activitiesCountPerUser"+ [value]="activitiesCount"+ >Activities</gf-value+ >+ </mat-card-content>+ </mat-card>+ </div>+ </div>+<div class="row"><div class="col"><mat-card appearance="outlined" class="mb-3"><mat-card-content>- <div class="d-flex my-3">- <div class="w-50" i18n>Version</div>- <div class="w-50">- <gf-value- [enableCopyToClipboardButton]="true"- [value]="version"- />- </div>- </div>- <div class="d-flex my-3">- <div class="w-50" i18n>User Count</div>- <div class="w-50">- <gf-value [locale]="user?.settings?.locale" [value]="userCount" />- </div>- </div>- <div class="d-flex my-3">- <div class="w-50" i18n>Activity Count</div>- <div class="w-50">- <gf-value- [locale]="user?.settings?.locale"- [value]="activitiesCount"- />- @if (activitiesCount && userCount) {- <div>- {{ activitiesCount / userCount | number: '1.2-2' }}- <span i18n>per User</span>- </div>- }- </div>- </div><div class="d-flex my-3"><div class="w-50" i18n>User Signup</div><div class="w-50">