Ajoute icone pour priorite + changement donnée envoyé
This commit is contained in:
@@ -14,7 +14,7 @@ const makeIssue = (overrides: Partial<IssueEntity> = {}): IssueEntity => ({
|
||||
estimatedTime: null,
|
||||
dependsOnIds: [],
|
||||
comments: [],
|
||||
priority: 'Moyenne',
|
||||
priority: 'MOYENNE',
|
||||
status: 'draft',
|
||||
progress: 0,
|
||||
...overrides,
|
||||
|
||||
@@ -67,9 +67,11 @@
|
||||
<div>
|
||||
<label class="field-label">Priorité</label>
|
||||
<select aria-label="Priorité" class="form-select form-select-sm" [(ngModel)]="issue.priority" (change)="saveIssue()">
|
||||
<option value="Basse">Basse</option>
|
||||
<option value="Moyenne">Moyenne</option>
|
||||
<option value="Haute">Haute</option>
|
||||
<option value="TRES_HAUTE">↑↑ Très haute</option>
|
||||
<option value="HAUTE">↑ Haute</option>
|
||||
<option value="MOYENNE">– Moyenne</option>
|
||||
<option value="BASSE">↓ Basse</option>
|
||||
<option value="TRES_FAIBLE">↓↓ Très faible</option>
|
||||
</select>
|
||||
</div>
|
||||
@if (!isEpicIssue) {
|
||||
@@ -204,7 +206,11 @@
|
||||
<span class="fw-semibold">#{{ composedIssue.id }} – {{ composedIssue.name || 'Sans nom' }}</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center gap-3 flex-shrink-0">
|
||||
<span class="text-secondary small">{{ composedIssue.priority }}</span>
|
||||
<span
|
||||
[style.color]="priorityDisplay(composedIssue.priority).color"
|
||||
[title]="priorityDisplay(composedIssue.priority).label"
|
||||
style="font-weight:700; font-size:1rem; letter-spacing:-1px;"
|
||||
>{{ priorityDisplay(composedIssue.priority).symbol }}</span>
|
||||
<span class="text-secondary small text-nowrap">{{ composedIssue.assignee || 'Non assigné' }}</span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -18,7 +18,7 @@ const makeIssue = (overrides: Partial<IssueEntity> = {}): IssueEntity => ({
|
||||
estimatedTime: null,
|
||||
dependsOnIds: [],
|
||||
comments: [],
|
||||
priority: 'Moyenne',
|
||||
priority: 'MOYENNE',
|
||||
status: 'draft',
|
||||
progress: 0,
|
||||
...overrides,
|
||||
|
||||
@@ -171,7 +171,7 @@ export class IssueDetail {
|
||||
estimatedTime: null,
|
||||
dependsOnIds: [],
|
||||
comments: [],
|
||||
priority: 'Moyenne',
|
||||
priority: 'MOYENNE',
|
||||
status: 'draft',
|
||||
progress: 0,
|
||||
});
|
||||
@@ -213,6 +213,17 @@ export class IssueDetail {
|
||||
return this.getBadgeClass(this.issueTypeValue);
|
||||
}
|
||||
|
||||
protected priorityDisplay(priority: IssueEntity['priority']): { symbol: string; color: string; label: string } {
|
||||
const map: Record<IssueEntity['priority'], { symbol: string; color: string; label: string }> = {
|
||||
'TRES_HAUTE': { symbol: '↑↑', color: '#dc3545', label: 'Très haute' },
|
||||
'HAUTE': { symbol: '↑', color: '#fd7e14', label: 'Haute' },
|
||||
'MOYENNE': { symbol: '–', color: '#ffc107', label: 'Moyenne' },
|
||||
'BASSE': { symbol: '↓', color: '#0d6efd', label: 'Basse' },
|
||||
'TRES_FAIBLE':{ symbol: '↓↓', color: '#6c757d', label: 'Très faible'},
|
||||
};
|
||||
return map[priority] ?? { symbol: '?', color: '#6c757d', label: priority };
|
||||
}
|
||||
|
||||
protected getBadgeClass(type: IssueEntity['type']): string {
|
||||
const map: Record<IssueEntity['type'], string> = {
|
||||
Bug: 'text-bg-danger',
|
||||
@@ -290,7 +301,7 @@ export class IssueDetail {
|
||||
estimatedTime: null,
|
||||
dependsOnIds: [],
|
||||
comments: [],
|
||||
priority: 'Moyenne',
|
||||
priority: 'MOYENNE',
|
||||
status: 'draft',
|
||||
progress: 0,
|
||||
};
|
||||
@@ -311,7 +322,7 @@ export class IssueDetail {
|
||||
estimatedTime: null,
|
||||
dependsOnIds: [],
|
||||
comments: [],
|
||||
priority: 'Moyenne',
|
||||
priority: 'MOYENNE',
|
||||
status: 'draft',
|
||||
progress: 0,
|
||||
}
|
||||
|
||||
@@ -51,7 +51,13 @@
|
||||
<td class="text-secondary small">#{{ issue.id }}</td>
|
||||
<td>{{ issue.name }}</td>
|
||||
<td><span [class]="'badge ' + typeBadgeClass(issue.type)">{{ issue.type }}</span></td>
|
||||
<td>{{ issue.priority }}</td>
|
||||
<td>
|
||||
<span
|
||||
[style.color]="priorityDisplay(issue.priority).color"
|
||||
[title]="priorityDisplay(issue.priority).label"
|
||||
style="font-weight:700; font-size:1rem; letter-spacing:-1px;"
|
||||
>{{ priorityDisplay(issue.priority).symbol }}</span>
|
||||
</td>
|
||||
<td>{{ issue.status }}</td>
|
||||
<td>{{ issue.assignee }}</td>
|
||||
<td class="progress-cell">
|
||||
|
||||
@@ -17,7 +17,7 @@ const makeIssue = (overrides: Partial<IssueEntity> = {}): IssueEntity => ({
|
||||
estimatedTime: null,
|
||||
dependsOnIds: [],
|
||||
comments: [],
|
||||
priority: 'Moyenne',
|
||||
priority: 'MOYENNE',
|
||||
status: 'draft',
|
||||
progress: 50,
|
||||
...overrides,
|
||||
@@ -58,7 +58,7 @@ class FakeIssuesStore {
|
||||
description: '',
|
||||
estimatedTime: et ?? null,
|
||||
comments: Array.isArray(c) ? c : [],
|
||||
priority: 'Moyenne',
|
||||
priority: 'MOYENNE',
|
||||
status: 'draft',
|
||||
progress: 0,
|
||||
...rest,
|
||||
|
||||
@@ -15,7 +15,7 @@ const makeIssue = (overrides: Partial<IssueEntity> = {}): IssueEntity => ({
|
||||
estimatedTime: null,
|
||||
dependsOnIds: [],
|
||||
comments: [],
|
||||
priority: 'Moyenne',
|
||||
priority: 'MOYENNE',
|
||||
status: 'draft',
|
||||
progress: 0,
|
||||
...overrides,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { firstValueFrom } from 'rxjs';
|
||||
import { IssuesApiService } from './issues-api.service';
|
||||
|
||||
export type IssueStatus = 'draft' | 'todo' | 'done' | 'in-progress';
|
||||
export type IssuePriority = 'Basse' | 'Moyenne' | 'Haute';
|
||||
export type IssuePriority = 'TRES_FAIBLE' | 'BASSE' | 'MOYENNE' | 'HAUTE' | 'TRES_HAUTE';
|
||||
export type IssueType = 'Epic' | 'Bug' | 'Study' | 'Story' | 'Task' | 'Technical Story';
|
||||
|
||||
export type IssueComment = {
|
||||
|
||||
@@ -52,6 +52,17 @@ export class Issues {
|
||||
return Math.round((done / children.length) * 100);
|
||||
}
|
||||
|
||||
protected priorityDisplay(priority: IssueEntity['priority']): { symbol: string; color: string; label: string } {
|
||||
const map: Record<IssueEntity['priority'], { symbol: string; color: string; label: string }> = {
|
||||
'TRES_HAUTE': { symbol: '↑↑', color: '#dc3545', label: 'Très haute' },
|
||||
'HAUTE': { symbol: '↑', color: '#fd7e14', label: 'Haute' },
|
||||
'MOYENNE': { symbol: '–', color: '#ffc107', label: 'Moyenne' },
|
||||
'BASSE': { symbol: '↓', color: '#0d6efd', label: 'Basse' },
|
||||
'TRES_FAIBLE':{ symbol: '↓↓', color: '#6c757d', label: 'Très faible'},
|
||||
};
|
||||
return map[priority] ?? { symbol: '?', color: '#6c757d', label: priority };
|
||||
}
|
||||
|
||||
protected typeBadgeClass(type: IssueEntity['type']): string {
|
||||
const map: Record<IssueEntity['type'], string> = {
|
||||
Bug: 'text-bg-danger',
|
||||
|
||||
Reference in New Issue
Block a user