}})
diff --git a/src/app/display/kanban-entry-item/kanban-entry-item.component.ts b/src/app/display/kanban-entry-item/kanban-entry-item.component.ts
index 0702f3c..91e48f5 100755
--- a/src/app/display/kanban-entry-item/kanban-entry-item.component.ts
+++ b/src/app/display/kanban-entry-item/kanban-entry-item.component.ts
@@ -2,23 +2,11 @@ import { Component, Input } from '@angular/core';
import { environment } from '../../../environments/environment';
import { JiraAssignee, KanbanEntry } from '../shared';
+import { SettingsService } from '../../shared/service/settings.service';
const DEFAULT_AVATAR = '/assets/riddler.png';
const JIRA_BOARD_BASE_HREF = 'https://cc-jira.rnd.ki.sw.ericsson.se/browse/';
-const labelColors = {
- TSP: 'teal',
- MTAS: 'orange',
- INTERNAL: 'yellow',
- TEAM: 'yellow',
- BLOCKED: 'red',
- SPIKE: 'purple',
- EXPEDITE: 'pink',
-
- 'MTAS-GUARDIAN': 'pink',
- 'MTAS-GUARDIANACTIVE': 'yellow',
-};
-
@Component({
selector: 'app-kanban-entry-item,[app-kanban-entry-item]',
templateUrl: './kanban-entry-item.component.html',
@@ -30,8 +18,7 @@ export class KanbanEntryItemComponent {
@Input() wipLimit = 0;
@Input() wipCount = 0;
- constructor() {
- }
+ constructor(private settingService: SettingsService) {}
/**
* Returns the full url of the assignee avatar,
@@ -41,17 +28,9 @@ export class KanbanEntryItemComponent {
* @returns {string}
*/
public avatarUrl(avatarPath: string): string {
- return environment.apiUrl + (avatarPath ? avatarPath : DEFAULT_AVATAR);
- }
-
- /**
- * Returns true if issue has any labels attached
- *
- * @param {KanbanEntry} entry
- * @returns {boolean}
- */
- public hasLabels(entry: KanbanEntry): boolean {
- return entry.labels.length > 0;
+ return environment.apiUrl + (avatarPath
+ ? avatarPath
+ : DEFAULT_AVATAR);
}
/**
@@ -61,11 +40,16 @@ export class KanbanEntryItemComponent {
* @returns {string}
*/
public labelClass(label: string): string {
- try {
- return labelColors[label.toUpperCase()];
- } catch (e) {
- return 'white';
+ if (this.settingService.team.labels) {
+ const color = this.settingService.team.labels.find(
+ teamLabel => teamLabel.name.toLocaleLowerCase() === label.toLocaleLowerCase()
+ ).color;
+
+ if (color !== null) {
+ return color;
+ }
}
+ return 'white';
}
/**
@@ -80,6 +64,15 @@ export class KanbanEntryItemComponent {
};
}
+ public filteredLabels(kanbanEntry: KanbanEntry): Array
{
+ if (this.settingService.team.labels) {
+ return kanbanEntry.labels.filter(entryLabel => this.settingService.team.labels.some(
+ teamLabel => teamLabel.name.toLocaleLowerCase() === entryLabel.toLocaleLowerCase()
+ ));
+ }
+ return [];
+ }
+
/**
* Generate jira issue href
*
@@ -122,4 +115,5 @@ export class KanbanEntryItemComponent {
public getAssignees(kanbanEntry: KanbanEntry): Array {
return [].concat([kanbanEntry.assignee], kanbanEntry.additionalAssignees);
}
+
}
diff --git a/src/app/display/slide-iframe/slide-iframe.component.css b/src/app/display/slide-iframe/slide-iframe.component.css
index a982899..7c65fc8 100755
--- a/src/app/display/slide-iframe/slide-iframe.component.css
+++ b/src/app/display/slide-iframe/slide-iframe.component.css
@@ -12,6 +12,7 @@
:host.preview {
position: absolute;
z-index: 1;
+ padding: 30px;
}
iframe {
width: 100%;
diff --git a/src/app/display/slide-show.service.ts b/src/app/display/slide-show.service.ts
index 7789a8c..4ab57e4 100755
--- a/src/app/display/slide-show.service.ts
+++ b/src/app/display/slide-show.service.ts
@@ -1,8 +1,8 @@
-import { Injectable } from '@angular/core';
-import { Slide } from '../shared/slide';
-import { SlideService } from '../shared/service/slide.service';
-import { Router } from '@angular/router';
-import { SettingsService } from '../shared/service/settings.service';
+import {Injectable} from '@angular/core';
+import {Slide, SlideVisibility} from '../shared/slide';
+import {SlideService} from '../shared/service/slide.service';
+import {Router} from '@angular/router';
+import {SettingsService} from '../shared/service/settings.service';
@Injectable()
export class SlideShowService {
@@ -39,7 +39,7 @@ export class SlideShowService {
const team = this.settingsService.team;
this.slideService.list().subscribe(
slides => this.slides = slides.filter(
- slide => slide.teams === null || slide.teams.some(s => s.id === team.id) && slide.isVisible
+ slide => slide.isVisible && (slide.visibility === SlideVisibility.Public || slide.teams.some(s => s.id === team.id))
)
);
}
diff --git a/src/app/shared/label.ts b/src/app/shared/label.ts
new file mode 100755
index 0000000..607bd67
--- /dev/null
+++ b/src/app/shared/label.ts
@@ -0,0 +1,4 @@
+export class Label {
+ name: string;
+ color: string;
+}
diff --git a/src/app/shared/team.ts b/src/app/shared/team.ts
old mode 100644
new mode 100755
index 72dc8a6..8ac9392
--- a/src/app/shared/team.ts
+++ b/src/app/shared/team.ts
@@ -1,16 +1,18 @@
import { Member } from './member';
import { KanbanColumn } from './kanban-column';
+import { Label } from './label';
export class Team {
id: number = null;
name: String = '';
members: Array = [];
- filterId: number;
+ filterId = 0;
backlogColumn: KanbanColumn = new KanbanColumn();
inprogressColumn: KanbanColumn = new KanbanColumn();
verificationColumn: KanbanColumn = new KanbanColumn();
doneColumn: KanbanColumn = new KanbanColumn();
- isActive = false;
+ labels: Array