Skip to content
Snippets Groups Projects
Commit 6c342cd4 authored by Nathan Hertz's avatar Nathan Hertz Committed by Nathan Hertz
Browse files

UI capability version fixes

parent 0547a024
No related branches found
No related tags found
No related merge requests found
......@@ -98,7 +98,7 @@
id="versions"
class="pt-2"
[capabilityRequest]="this.capabilityRequest"
[selected_version]="this.latestVersion"
[selected_version]="this.currentVersion"
(versionEvent)="setVersion($event)"
></app-versions>
<br />
......
......@@ -85,10 +85,10 @@ export class CapabilityRequestComponent implements OnInit, OnDestroy {
next: (capabilityVersion) => {
if (capabilityVersion !== undefined) {
this.latestVersion = capabilityVersion;
// Set selected version to be the request's current version
console.log("Setting current version to latest");
console.log("List of versions: " + this.latestVersion);
this.setVersion(this.latestVersion);
// Set selected version to be the request's current version if no version is selected
if (this.currentVersion === undefined) {
this.setVersion(this.latestVersion);
}
} else {
console.error("Current version returned undefined.");
}
......@@ -177,7 +177,7 @@ export class CapabilityRequestComponent implements OnInit, OnDestroy {
.subscribe(addRestCallObservable);
}
setVersion(version: CapabilityVersion) {
setVersion(version: CapabilityVersion): void {
this.currentVersion = version;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment