Modification visuel status et type issue
This commit is contained in:
@@ -63,6 +63,18 @@ export class Issues {
|
||||
return map[priority] ?? { symbol: '?', color: '#6c757d', label: priority };
|
||||
}
|
||||
|
||||
protected typeIcon(type: IssueEntity['type']): { letter: string; bg: string } {
|
||||
const map: Record<IssueEntity['type'], { letter: string; bg: string }> = {
|
||||
Epic: { letter: 'E', bg: '#7c3aed' },
|
||||
Bug: { letter: 'B', bg: '#dc2626' },
|
||||
Story: { letter: 'S', bg: '#16a34a' },
|
||||
Task: { letter: 'T', bg: '#2563eb' },
|
||||
Study: { letter: 'St', bg: '#6b7280' },
|
||||
'Technical Story':{ letter: 'TS', bg: '#d97706' },
|
||||
};
|
||||
return map[type] ?? { letter: '?', bg: '#6b7280' };
|
||||
}
|
||||
|
||||
protected typeBadgeClass(type: IssueEntity['type']): string {
|
||||
const map: Record<IssueEntity['type'], string> = {
|
||||
Bug: 'text-bg-danger',
|
||||
@@ -74,4 +86,14 @@ export class Issues {
|
||||
};
|
||||
return map[type] ?? 'text-bg-secondary';
|
||||
}
|
||||
|
||||
protected statusBadge(status: IssueEntity['status']): { label: string; bg: string; color: string } {
|
||||
const map: Record<IssueEntity['status'], { label: string; bg: string; color: string }> = {
|
||||
draft: { label: 'BROUILLON', bg: '#e2e8f0', color: '#475569' },
|
||||
todo: { label: 'À FAIRE', bg: '#dbeafe', color: '#1d4ed8' },
|
||||
'in-progress': { label: 'EN COURS', bg: '#ffedd5', color: '#9a3412' },
|
||||
done: { label: 'TERMINÉ', bg: '#dcfce7', color: '#166534' },
|
||||
};
|
||||
return map[status] ?? { label: status, bg: '#e2e8f0', color: '#475569' };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user