Changement des couleurs des badges story, bug, study, etc.
This commit is contained in:
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user