Skip to content
Snippets Groups Projects

FE tweaks to get population behaving

Merged Jim Sheckard requested to merge uniform_weblog_fixes into main
1 file
+ 0
2
Compare changes
  • Side-by-side
  • Inline
@@ -45,17 +45,16 @@ export class CapabilityDataAccessComponent implements OnInit {
ngOnInit(): void {
}
// Observer for capability objects
private qaObserver = {
next: (capability) => {
this.capability = capability;
if (!this.qaNotes && this.shouldHaveWeblog() && this.currentVersion.current_execution) {
this.getQaNotesURL();
}
next: (notes) => {
this.qaNotes = notes["resp"];
},
error: (error) => console.error("Error when retrieving capability:" + error),
};
private saveQaNotesObserver = {
next: () => {
},
@@ -63,12 +62,11 @@ export class CapabilityDataAccessComponent implements OnInit {
};
// Get qa_notes.html contents for editing
private async getQaNotesURL() {
getQaNotesURL() {
var curCapabilityName = this.capability.name;
var curCapabilityRequestId = this.currentVersion.current_execution.current_workflow_request_id;
this.qaNotes = await new Promise<string>(resolve =>
this.workflowService.retrieveQaNotes(curCapabilityName, curCapabilityRequestId)
.subscribe(notes => resolve(notes['resp'])));
this.workflowService.retrieveQaNotes(curCapabilityName, curCapabilityRequestId)
.subscribe(this.qaObserver);
}
emitEditEventToParent(edits: string): void {
@@ -76,7 +74,6 @@ export class CapabilityDataAccessComponent implements OnInit {
var curCapabilityRequestId = this.currentVersion.current_execution.current_workflow_request_id;
this.workflowService.saveQaNotes(curCapabilityName, curCapabilityRequestId, edits)
.subscribe(this.saveQaNotesObserver);
this.getQaNotesURL();
}
/**
Loading