* removed funservice
* prio color pipe fixed with svg sizes * prefix pipe added
This commit is contained in:
parent
41c057c5e5
commit
5f2639061b
@ -14,10 +14,5 @@
|
|||||||
<div app-kanban-entry-item class="four wide column"
|
<div app-kanban-entry-item class="four wide column"
|
||||||
rowHeading="DÖNER"
|
rowHeading="DÖNER"
|
||||||
[kanbanEntries]="kanbanBoard.done"></div>
|
[kanbanEntries]="kanbanBoard.done"></div>
|
||||||
<app-animgif *ngIf="showSomeFun"
|
|
||||||
class="kanban-view"
|
|
||||||
title="ANIMATED IMPORTANCE"
|
|
||||||
[data]="fun.animGifs"
|
|
||||||
[cameraUrls]="fun.cameraUrls"></app-animgif>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import {Component, HostBinding, HostListener, OnDestroy, OnInit} from '@angular/core';
|
import {Component, HostBinding, HostListener, OnInit} from '@angular/core';
|
||||||
import {Title} from '@angular/platform-browser';
|
import {Title} from '@angular/platform-browser';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
|
|
||||||
@ -7,12 +7,6 @@ import {
|
|||||||
KanbanService,
|
KanbanService,
|
||||||
KanbanEntry,
|
KanbanEntry,
|
||||||
} from "../shared";
|
} from "../shared";
|
||||||
import {
|
|
||||||
Fun,
|
|
||||||
FunService,
|
|
||||||
} from "../../shared";
|
|
||||||
import {Subscription} from "rxjs/Subscription";
|
|
||||||
import {TimerObservable} from "rxjs/observable/TimerObservable";
|
|
||||||
|
|
||||||
const WIP_LIMIT_INPROGRESS = 12;
|
const WIP_LIMIT_INPROGRESS = 12;
|
||||||
const WIP_LIMIT_VERIFICATION = 8;
|
const WIP_LIMIT_VERIFICATION = 8;
|
||||||
@ -20,24 +14,18 @@ const WIP_LIMIT_VERIFICATION = 8;
|
|||||||
const STYLE_HIDDEN = 'hidden';
|
const STYLE_HIDDEN = 'hidden';
|
||||||
const STYLE_VISIBLE = 'scroll';
|
const STYLE_VISIBLE = 'scroll';
|
||||||
|
|
||||||
const FUN_TIMER = 2000;
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-kanban-board',
|
selector: 'app-kanban-board',
|
||||||
templateUrl: './kanban-board.component.html',
|
templateUrl: './kanban-board.component.html',
|
||||||
styleUrls: ['./kanban-board.component.css']
|
styleUrls: ['./kanban-board.component.css']
|
||||||
})
|
})
|
||||||
export class KanbanBoardComponent implements OnInit, OnDestroy {
|
export class KanbanBoardComponent implements OnInit {
|
||||||
|
|
||||||
private funTimer: Subscription;
|
|
||||||
|
|
||||||
@HostBinding('style.overflow') hostOverflow = STYLE_HIDDEN;
|
@HostBinding('style.overflow') hostOverflow = STYLE_HIDDEN;
|
||||||
public showSomeFun: boolean = false;
|
|
||||||
|
|
||||||
constructor(private titleService: Title,
|
constructor(private titleService: Title,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private kanbanService: KanbanService,
|
private kanbanService: KanbanService) {
|
||||||
private funService: FunService) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -47,23 +35,9 @@ export class KanbanBoardComponent implements OnInit, OnDestroy {
|
|||||||
this.titleService.setTitle('TaurusXFT : Kanban board');
|
this.titleService.setTitle('TaurusXFT : Kanban board');
|
||||||
this.route.data.subscribe((data: {
|
this.route.data.subscribe((data: {
|
||||||
kanbanBoard: KanbanBoard,
|
kanbanBoard: KanbanBoard,
|
||||||
fun: Fun,
|
|
||||||
}) => {
|
}) => {
|
||||||
this.kanbanBoard = data.kanbanBoard;
|
this.kanbanBoard = data.kanbanBoard;
|
||||||
this.fun = data.fun;
|
|
||||||
});
|
});
|
||||||
this.lunchTime();
|
|
||||||
let timer0 = TimerObservable.create(FUN_TIMER, FUN_TIMER);
|
|
||||||
this.funTimer = timer0.subscribe(() => this.lunchTime.bind(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
private lunchTime() {
|
|
||||||
let now = new Date();
|
|
||||||
this.showSomeFun = (now.getHours() == 11 && now.getMinutes() > 29) || (now.getHours() == 12 && now.getMinutes() < 31);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.funTimer.unsubscribe();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get kanbanBoard(): KanbanBoard {
|
get kanbanBoard(): KanbanBoard {
|
||||||
@ -74,13 +48,6 @@ export class KanbanBoardComponent implements OnInit, OnDestroy {
|
|||||||
this.kanbanService.kanbanBoard = kanbanBoard;
|
this.kanbanService.kanbanBoard = kanbanBoard;
|
||||||
}
|
}
|
||||||
|
|
||||||
get fun(): Fun {
|
|
||||||
return this.funService.fun;
|
|
||||||
}
|
|
||||||
|
|
||||||
set fun(fun: Fun) {
|
|
||||||
this.funService.fun = fun;
|
|
||||||
}
|
|
||||||
get inprogressWipLimit(): number {
|
get inprogressWipLimit(): number {
|
||||||
return WIP_LIMIT_INPROGRESS;
|
return WIP_LIMIT_INPROGRESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
[title]="assignee?.name">
|
[title]="assignee?.name">
|
||||||
</div>
|
</div>
|
||||||
<a [href]="jiraHref(kanbanEntry)" target="_blank"
|
<a [href]="jiraHref(kanbanEntry)" target="_blank"
|
||||||
[innerHTML]="kanbanEntry.summary|shortenText|priorityColor:kanbanEntry.issuePriorityIcon:kanbanEntry.worklog"
|
[innerHTML]="kanbanEntry.summary|shortenText|priorityColor:kanbanEntry.issuePriorityIcon:kanbanEntry.worklog|prefixJiraId:kanbanEntry.key"
|
||||||
[title]="kanbanEntry.summary"></a>
|
[title]="kanbanEntry.summary"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {Routes, RouterModule} from '@angular/router';
|
import {Routes, RouterModule} from '@angular/router';
|
||||||
import {KanbanBoardComponent} from "./kanban-board/kanban-board.component";
|
import {KanbanBoardComponent} from "./kanban-board/kanban-board.component";
|
||||||
import {KanbanService} from "./shared/kanban.service";
|
import {KanbanService} from "./shared";
|
||||||
import {FunService} from "../shared/fun.service";
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
@ -11,7 +10,6 @@ const routes: Routes = [
|
|||||||
component: KanbanBoardComponent,
|
component: KanbanBoardComponent,
|
||||||
resolve: {
|
resolve: {
|
||||||
kanbanBoard: KanbanService,
|
kanbanBoard: KanbanService,
|
||||||
fun: FunService,
|
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
disableAutoSwitch: false
|
disableAutoSwitch: false
|
||||||
@ -22,7 +20,6 @@ const routes: Routes = [
|
|||||||
component: KanbanBoardComponent,
|
component: KanbanBoardComponent,
|
||||||
resolve: {
|
resolve: {
|
||||||
kanbanBoard: KanbanService,
|
kanbanBoard: KanbanService,
|
||||||
fun: FunService,
|
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
disableAutoSwitch: true
|
disableAutoSwitch: true
|
||||||
|
|||||||
@ -10,8 +10,9 @@ import { PriorityColorPipe } from './shared/priority-color.pipe';
|
|||||||
import { ShortenTextPipe } from './shared/shorten-text.pipe';
|
import { ShortenTextPipe } from './shared/shorten-text.pipe';
|
||||||
import { SelfUpdaterService } from './shared/self-updater.service';
|
import { SelfUpdaterService } from './shared/self-updater.service';
|
||||||
import { BlockedDaysPipe } from './shared/blocked-days.pipe';
|
import { BlockedDaysPipe } from './shared/blocked-days.pipe';
|
||||||
import {KanbanRoutingModule} from "./kanban-routing.module";
|
import { KanbanRoutingModule } from "./kanban-routing.module";
|
||||||
import {TspInfoModule} from "../tsp-info/tsp-info.module";
|
import { TspInfoModule } from "../tsp-info/tsp-info.module";
|
||||||
|
import { PrefixJiraIdPipe } from './shared/prefix-jira-id.pipe';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@ -26,6 +27,7 @@ import {TspInfoModule} from "../tsp-info/tsp-info.module";
|
|||||||
PriorityColorPipe,
|
PriorityColorPipe,
|
||||||
ShortenTextPipe,
|
ShortenTextPipe,
|
||||||
BlockedDaysPipe,
|
BlockedDaysPipe,
|
||||||
|
PrefixJiraIdPipe,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
KanbanService,
|
KanbanService,
|
||||||
|
|||||||
8
src/app/kanban/shared/prefix-jira-id.pipe.spec.ts
Normal file
8
src/app/kanban/shared/prefix-jira-id.pipe.spec.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { PrefixJiraIdPipe } from './prefix-jira-id.pipe';
|
||||||
|
|
||||||
|
describe('PrefixJiraIdPipe', () => {
|
||||||
|
it('create an instance', () => {
|
||||||
|
const pipe = new PrefixJiraIdPipe();
|
||||||
|
expect(pipe).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
12
src/app/kanban/shared/prefix-jira-id.pipe.ts
Normal file
12
src/app/kanban/shared/prefix-jira-id.pipe.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { Pipe, PipeTransform } from '@angular/core';
|
||||||
|
|
||||||
|
@Pipe({
|
||||||
|
name: 'prefixJiraId'
|
||||||
|
})
|
||||||
|
export class PrefixJiraIdPipe implements PipeTransform {
|
||||||
|
|
||||||
|
transform(value: string, jiraId: string): string {
|
||||||
|
return `[${jiraId}] ${value}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -34,7 +34,7 @@ export class PriorityColorPipe implements PipeTransform {
|
|||||||
value = value.replace(xlMatch, (fullMatch: string, mhrMatched: string) => {
|
value = value.replace(xlMatch, (fullMatch: string, mhrMatched: string) => {
|
||||||
return `<span class="match-xl">${mhrMatched}</span> `;
|
return `<span class="match-xl">${mhrMatched}</span> `;
|
||||||
});
|
});
|
||||||
return (prioIcon ? `<img class="prio-icon" src="${prioIcon}"> ` : "") + value;
|
return (prioIcon ? `<img class="prio-icon" width="16" height="16" src="${prioIcon}"> ` : "") + value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user