refactoring

This commit is contained in:
Bastian Wagner
2025-01-03 11:00:02 +01:00
parent a47bbe29fe
commit c8c2ee18cb
35 changed files with 285 additions and 167 deletions

View File

@@ -1,9 +1,9 @@
<div class="dashboard-container">
<!-- Welcome Section -->
<div class="welcome-section">
<!-- <div class="welcome-section">
<h1>Willkommen bei Keyvault Pro</h1>
<p>Verwalte deine Schlüssel und Systeme</p>
</div>
</div> -->
<!-- Quick Stats Cards -->
<div class="stats-grid">
@@ -38,22 +38,36 @@
<mat-card class="stat-card">
<mat-card-header>
<mat-icon>admin_panel_settings</mat-icon>
<mat-card-title>Systeme</mat-card-title>
<mat-card-title>Schließanlagen</mat-card-title>
</mat-card-header>
<mat-card-content>
<span class="stat-number">{{ systemCount }}</span>
<p>Aktive Systeme</p>
<p>Aktive Schließanlagen</p>
</mat-card-content>
<mat-card-actions>
<button mat-button routerLink="/systems">Verwalten</button>
</mat-card-actions>
</mat-card>
<mat-card class="stat-card">
<mat-card-header>
<mat-icon>passkey</mat-icon>
<mat-card-title>Ausgegebene Schlüssel</mat-card-title>
</mat-card-header>
<mat-card-content>
<span class="stat-number">{{ handedOut }}</span>
<p>Derzeit ausgegebene Schlüssel</p>
</mat-card-content>
<mat-card-actions>
<button mat-button routerLink="/keys">Verwalten</button>
</mat-card-actions>
</mat-card>
</div>
<!-- Recent Activity Section -->
<div class="recent-activity">
<h2>Letzte Aktivitäten</h2>
<mat-card>
<mat-card style="background: white">
<mat-card-content>
<ag-grid-angular
style="width: 100%; height: 100%;"

View File

@@ -1,6 +1,6 @@
.dashboard-container {
padding: 24px;
height: calc(100% - 48px);
height: 100%;
display: flex;
flex-direction: column;
gap: 24px;

View File

@@ -8,11 +8,12 @@ import {MatCardModule} from '@angular/material/card';
import { RouterModule } from '@angular/router';
import { AgLoadingComponent } from '../../shared/ag-grid/components/ag-loading/ag-loading.component';
import { AG_GRID_LOCALE_DE } from '@ag-grid-community/locale';
import { MatButtonModule } from '@angular/material/button';
@Component({
selector: 'app-dashboard',
standalone: true,
imports: [AgGridAngular, MatIconModule, AgGridAngular, MatCardModule, RouterModule],
imports: [AgGridAngular, MatIconModule, AgGridAngular, MatCardModule, RouterModule, MatButtonModule],
providers: [DatePipe],
templateUrl: './dashboard.component.html',
styleUrl: './dashboard.component.scss'
@@ -40,6 +41,7 @@ export class DashboardComponent {
keyCount = 0;
cylinderCount = 0;
systemCount = 0;
handedOut = 0;
ngOnInit() {
this.loadStats();
@@ -50,6 +52,7 @@ export class DashboardComponent {
this.keyCount = stats.keys;
this.cylinderCount = stats.cylinders;
this.systemCount = stats.systems;
this.handedOut = stats.handedOut;
});
}