Refactor application structure to use WorkspaceService for state management

- Removed direct state management from components and centralized it in WorkspaceService.
- Updated ApartmentsPage, TenantsPage, LeasesPage, and DashboardPage to utilize WorkspaceService for data handling.
- Introduced SessionService to manage user session state and authentication.
- Simplified component templates to reflect new service-based architecture.
- Removed unused ConfigService and its tests.
- Added lease.html template for lease document generation.
- Created app.routes.spec.ts for route mapping tests.
This commit is contained in:
nessar authored and Nessar committed 2026-08-17 14:18:15 +02:00
1 parent be1f680a62
commit 82f339e209
33 files changed
+292 -929

No files matched your search

@@ -1,7 +1,7 @@
<section class="page-section dashboard-page">
<header class="page-heading">
<div>
<p class="eyebrow">Bonjour {{ username() }}</p>
<p class="eyebrow">Bonjour {{ session.username() }}</p>
<h1>Tableau de bord</h1>
<p>Retrouvez rapidement les actions utiles à votre gestion locative.</p>
</div>
@@ -17,10 +17,10 @@
</div>
<div>
<p class="eyebrow">Votre portefeuille</p>
<h2>{{ apartmentCount() }} appartement{{ apartmentCount() > 1 ? 's' : '' }}</h2>
<h2>{{ workspace.apartments().length }} appartement{{ workspace.apartments().length > 1 ? 's' : '' }}</h2>
<p>Centralisez les informations essentielles de vos biens.</p>
</div>
<button mat-button type="button" (click)="apartmentsRequested.emit()">
<button mat-button type="button" (click)="showApartments()">
Gérer mes appartements
</button>
</article>
@@ -28,8 +28,8 @@
<div class="large-avatar">{{ userInitial() }}</div>
<div class="user-details">
<p class="eyebrow">Compte actif</p>
<h3>{{ username() }}</h3>
<p class="user-email">{{ email() }}</p>
<h3>{{ session.username() }}</h3>
<p class="user-email">{{ session.email() }}</p>
<span class="role-chip">Bailleur connecté</span>
</div>
</article>
@@ -40,7 +40,7 @@
<p>Vérifiez que votre espace communique correctement avec le service sécurisé.</p>
</div>
<div class="api-actions">
<button mat-stroked-button type="button" (click)="connectionCheckRequested.emit()">
<button mat-stroked-button type="button" (click)="checkConnection()">
Tester la connexion
</button>
</div>