Changement des couleurs des badges story, bug, study, etc.

This commit is contained in:
2026-05-23 08:58:06 +02:00
parent b3f25369be
commit 4960292ecf
2 changed files with 14 additions and 2 deletions
+13 -1
View File
@@ -1,6 +1,6 @@
import { Component, inject } from '@angular/core';
import { Router } from '@angular/router';
import { IssuesStore } from './issues.store';
import { IssueEntity, IssuesStore } from './issues.store';
@Component({
selector: 'app-issues',
@@ -24,4 +24,16 @@ export class Issues {
protected openIssue(issueId: number): void {
this.router.navigate(['/issues', issueId]);
}
protected typeBadgeClass(type: IssueEntity['type']): string {
const map: Record<IssueEntity['type'], string> = {
Bug: 'text-bg-danger',
Study: 'text-bg-secondary',
Story: 'text-bg-success',
Task: 'text-bg-primary',
'Technical Story': 'text-bg-warning',
Epic: 'text-bg-info',
};
return map[type] ?? 'text-bg-secondary';
}
}