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