Add the bugfix property for version-revision.
This commit is contained in:
@@ -22,6 +22,8 @@ public class VersionRevision implements Serializable {
|
||||
|
||||
private String text;
|
||||
|
||||
private Boolean bugfix;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "version_id")
|
||||
private Version version;
|
||||
@@ -42,6 +44,14 @@ public class VersionRevision implements Serializable {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public Boolean getBugfix() {
|
||||
return bugfix;
|
||||
}
|
||||
|
||||
public void setBugfix(Boolean bugfix) {
|
||||
this.bugfix = bugfix;
|
||||
}
|
||||
|
||||
public Version getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ CREATE TABLE IF NOT EXISTS version (
|
||||
CREATE TABLE IF NOT EXISTS version_revision (
|
||||
id SERIAL,
|
||||
text VARCHAR,
|
||||
bugfix BOOLEAN DEFAULT TRUE,
|
||||
version_id INTEGER,
|
||||
CONSTRAINT pk_version_revision PRIMARY KEY (id),
|
||||
CONSTRAINT fk_version_revision_version_id FOREIGN KEY (version_id) REFERENCES version (id)
|
||||
@@ -16,10 +17,10 @@ CREATE INDEX IF NOT EXISTS version_id_idx ON version_revision (version_id);
|
||||
|
||||
INSERT INTO version (number) VALUES ('1.0.0'), ('1.0.1');
|
||||
|
||||
INSERT INTO version_revision (version_id, text) VALUES
|
||||
(2, 'Sécurisation des routes de modification du profil.'),
|
||||
(2, 'Correction de l''injection de code pour les images dans l''écran d''édition de wikis.'),
|
||||
(2, 'Correction du système de sessions pour pouvoir ouvrir plusieurs onglets sans être déconnecté.'),
|
||||
(2, 'Correction de l''accès à la documentation d''utilisation.'),
|
||||
(2, 'Correction du placement d''icônes dans l''écran des paramètres de compte.'),
|
||||
(2, 'Ajout de l''écran de révisions de versions');
|
||||
INSERT INTO version_revision (version_id, text, bugfix) VALUES
|
||||
(2, 'Sécurisation des routes de modification du profil.', TRUE),
|
||||
(2, 'Correction de l''injection de code pour les images dans l''écran d''édition de wikis.', TRUE),
|
||||
(2, 'Correction du système de sessions pour pouvoir ouvrir plusieurs onglets sans être déconnecté.', TRUE),
|
||||
(2, 'Correction de l''accès à la documentation d''utilisation.', TRUE),
|
||||
(2, 'Correction du placement d''icônes dans l''écran des paramètres de compte.', TRUE),
|
||||
(2, 'Ajout de l''écran de révisions de versions', FALSE);
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user