From ecf55392fdc5f30d81783308176142778f758ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20OLIVIER?= Date: Fri, 22 May 2026 18:40:19 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20du=20type=20d'issue=20dans=20les=20d?= =?UTF-8?q?=C3=A9tails=20et=20la=20liste=20des=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/issues/issue-detail/issue-detail.html | 31 +++++++++---------- src/app/issues/issue-detail/issue-detail.ts | 18 +++++++++++ src/app/issues/issues.html | 2 ++ src/app/issues/issues.store.ts | 7 +++++ 4 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/app/issues/issue-detail/issue-detail.html b/src/app/issues/issue-detail/issue-detail.html index 9c0713a..5dbeeaa 100644 --- a/src/app/issues/issue-detail/issue-detail.html +++ b/src/app/issues/issue-detail/issue-detail.html @@ -22,7 +22,6 @@
@if (!isEditing) { - }
@@ -34,6 +33,7 @@
}
+ } @@ -55,6 +55,20 @@ } + + Type + + @if (isEditing) { + + } @else { + {{ issueTypeValue }} + } + + Epic @@ -135,21 +149,6 @@ } - - Status - - @if (isEditing) { - - } @else { - {{ issue.status }} - } - - Progression diff --git a/src/app/issues/issue-detail/issue-detail.ts b/src/app/issues/issue-detail/issue-detail.ts index 8b6f37c..794cf60 100644 --- a/src/app/issues/issue-detail/issue-detail.ts +++ b/src/app/issues/issue-detail/issue-detail.ts @@ -27,6 +27,13 @@ export class IssueDetail { 'done', ]; + protected readonly typeOptions: IssueEntity['type'][] = [ + 'Bug', + 'Study', + 'Story', + 'Technical Story', + ]; + protected get dependencyIds(): number[] { return this.issue.dependsOnIds; } @@ -45,6 +52,14 @@ export class IssueDetail { this.issue.estimatedTime = value === null || value === undefined ? null : Number(value); } + protected get issueTypeValue(): IssueEntity['type'] { + return this.issue.type; + } + + protected set issueTypeValue(value: IssueEntity['type']) { + this.issue.type = value; + } + constructor() { if (this.isEditing) { this.issueBeforeEdit = this.cloneIssue(this.issue); @@ -54,6 +69,7 @@ export class IssueDetail { protected startEdit(): void { this.issueBeforeEdit = this.cloneIssue(this.issue); this.isEditing = true; + this.closeMoreMenu(); } protected cancelEdit(): void { @@ -119,6 +135,7 @@ export class IssueDetail { if (isNewIssueRoute) { return { id: safeId, + type: 'Story', assignee: '', epic: '', name: '', @@ -137,6 +154,7 @@ export class IssueDetail { return ( existingIssue ?? { id: safeId, + type: 'Story', assignee: '', epic: '', name: '', diff --git a/src/app/issues/issues.html b/src/app/issues/issues.html index 56bf6ff..0cdb1b2 100644 --- a/src/app/issues/issues.html +++ b/src/app/issues/issues.html @@ -13,6 +13,7 @@ Titre + Type Priorite Statut Assignee @@ -27,6 +28,7 @@ (keydown.enter)="openIssue(issue.id)" > {{ issue.name }} + {{ issue.type }} {{ issue.priority }} {{ issue.status }} {{ issue.assignee }} diff --git a/src/app/issues/issues.store.ts b/src/app/issues/issues.store.ts index adcdbf1..c7faf7d 100644 --- a/src/app/issues/issues.store.ts +++ b/src/app/issues/issues.store.ts @@ -4,9 +4,11 @@ const ISSUES_STORAGE_KEY = 'bonsai.issues'; export type IssueStatus = 'draft' | 'todo' | 'done' | 'in-progress'; export type IssuePriority = 'Basse' | 'Moyenne' | 'Haute'; +export type IssueType = 'Bug' | 'Study' | 'Story' | 'Technical Story'; export type IssueEntity = { id: number; + type: IssueType; assignee: string; epic: string; name: string; @@ -22,6 +24,7 @@ export type IssueEntity = { const DEFAULT_ISSUES: IssueEntity[] = [ { id: 1, + type: 'Bug', assignee: 'Marie', epic: 'EPIC-UI', name: 'Bug affichage menu mobile', @@ -35,6 +38,7 @@ const DEFAULT_ISSUES: IssueEntity[] = [ }, { id: 2, + type: 'Study', assignee: 'Nabil', epic: 'EPIC-FORM', name: 'Erreur validation formulaire projet', @@ -48,6 +52,7 @@ const DEFAULT_ISSUES: IssueEntity[] = [ }, { id: 3, + type: 'Story', assignee: 'Sonia', epic: 'EPIC-CONTENT', name: 'Mise a jour message de bienvenue', @@ -86,6 +91,7 @@ export class IssuesStore { createDraftIssue(): IssueEntity { const draftIssue: IssueEntity = this.normalizeIssue({ id: this.getNextId(), + type: 'Story', assignee: '', epic: '', name: '', @@ -145,6 +151,7 @@ export class IssuesStore { return { ...issue, + type: issue.type ?? 'Story', estimatedTime: issue.estimatedTime ?? null, dependsOnIds: normalizedDependencies, } as IssueEntity;