Ajoute projet et migration milestone

Signed-off-by: Gato <cedric@goutailler-olivier.fr>
This commit is contained in:
2026-05-31 10:00:36 +02:00
parent 401da09f8f
commit 54d1534d4d
39 changed files with 1565 additions and 288 deletions
+13 -6
View File
@@ -3,6 +3,7 @@ import { Router } from '@angular/router';
import { IssueEntity, IssuesStore } from '../issues/issues.store';
import { MilestoneEntity, MilestonesStore } from '../milestones/milestones.store';
import { StatusesStore } from '../statuses/statuses.store';
import { ProjectContextService } from '../projects/project-context.service';
@Component({
selector: 'app-dashboard',
@@ -15,10 +16,12 @@ export class Dashboard {
private readonly issuesStore = inject(IssuesStore);
private readonly milestonesStore = inject(MilestonesStore);
private readonly statusesStore = inject(StatusesStore);
private readonly projectContext = inject(ProjectContextService);
constructor() {
this.issuesStore.load();
this.milestonesStore.load();
const projectId = this.projectContext.projectId()!;
this.issuesStore.load(projectId);
this.milestonesStore.load(projectId);
}
protected readonly totalIssues = computed(() => this.issuesStore.issues().length);
@@ -152,18 +155,22 @@ export class Dashboard {
}
protected openIssue(id: number): void {
this.router.navigate(['/issues', id]);
const pid = this.projectContext.projectId();
this.router.navigate(['/projects', pid, 'issues', id]);
}
protected openMilestone(id: number): void {
this.router.navigate(['/milestones', id]);
const pid = this.projectContext.projectId();
this.router.navigate(['/projects', pid, 'milestones', id]);
}
protected navigateToIssues(): void {
this.router.navigate(['/issues']);
const pid = this.projectContext.projectId();
this.router.navigate(['/projects', pid, 'issues']);
}
protected navigateToMilestones(): void {
this.router.navigate(['/milestones']);
const pid = this.projectContext.projectId();
this.router.navigate(['/projects', pid, 'milestones']);
}
}