Add the bugfix property for version-revision.

This commit is contained in:
2018-09-03 22:11:08 +02:00
parent 512f5a7168
commit 862175e643
5 changed files with 43 additions and 16 deletions
+2 -1
View File
@@ -69,6 +69,7 @@ export class VersionRevision {
constructor(
public id: number,
public text: string,
public version: Version
public version: Version,
public bugfix: boolean
) { }
}
@@ -1,4 +1,3 @@
<div class="row">
<div class="col-md-3 col-lg-2">
<h1>Versions</h1>
@@ -12,11 +11,24 @@
</ul>
</div>
<div id="versionRevisionsArea" class="col-md-9 col-lg-10">
<ul *ngIf="versionRevisionsList.length">
<li *ngFor="let versionRevision of versionRevisionsList">
{{versionRevision.text}}
</li>
</ul>
<h4 *ngIf="!versionRevisionsList.length">Aucune note de révisions pour cette version.</h4>
<div *ngIf="versionRevisionsList.length">
<h3>Ajouts de fonctionnalités</h3>
<ul>
<li *ngFor="let versionRevision of versionRevisionsList">
{{versionRevision.text}}
</li>
</ul>
</div>
<h4 *ngIf="!versionRevisionsList.length">Aucune nouvelle fonctionnalité pour cette version.</h4>
<div *ngIf="versionRevisionsBugfixList.length">
<h3>Correction d'anomalies</h3>
<ul>
<li *ngFor="let versionRevision of versionRevisionsBugfixList">
{{versionRevision.text}}
</li>
</ul>
</div>
<h4 *ngIf="!versionRevisionsBugfixList.length">Aucune correction d'anomalie pour cette version.</h4>
</div>
</div>
@@ -22,12 +22,14 @@ import { VersionRevision, Version } from '../core/entities';
export class VersionRevisionComponent implements OnInit {
versionsList: Array<Version>;
versionRevisionsList: Array<VersionRevision>;
versionRevisionsBugfixList: Array<VersionRevision>;
constructor(
private versionRevisionService: VersionRevisionService
) {
this.versionsList = [];
this.versionRevisionsList = [];
this.versionRevisionsBugfixList = [];
}
ngOnInit(): void {
@@ -42,7 +44,8 @@ export class VersionRevisionComponent implements OnInit {
version.active = true;
this.versionRevisionService.findByVersionNumber(version.number).subscribe(versionRevisionsList => {
this.versionRevisionsList = versionRevisionsList;
this.versionRevisionsList = versionRevisionsList.filter(vr => !vr.bugfix);
this.versionRevisionsBugfixList = versionRevisionsList.filter(vr => vr.bugfix);
});
}
}