improvements are done

This commit is contained in:
sdarbinyan
2026-01-22 00:41:13 +04:00
parent a1a2a69fd0
commit 0f3d0ae3ef
27 changed files with 2115 additions and 107 deletions

View File

@@ -17,6 +17,7 @@ export class ProjectsDashboardComponent implements OnInit {
projects = signal<Project[]>([]);
loading = signal(true);
error = signal<string | null>(null);
currentProjectId = signal<string | null>(null);
constructor(
private apiService: ApiService,
@@ -25,6 +26,22 @@ export class ProjectsDashboardComponent implements OnInit {
ngOnInit() {
this.loadProjects();
// Check if we're currently viewing a project
const urlSegments = this.router.url.split('/');
if (urlSegments[1] === 'project' && urlSegments[2]) {
this.currentProjectId.set(urlSegments[2]);
}
// Listen to route changes
this.router.events.subscribe(() => {
const segments = this.router.url.split('/');
if (segments[1] === 'project' && segments[2]) {
this.currentProjectId.set(segments[2]);
} else {
this.currentProjectId.set(null);
}
});
}
loadProjects() {