Skip to content

Commit c869575

Browse files
Issue #SB-4923 fix: Fixed framework issue.
1 parent 83835a3 commit c869575

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

src/services/framework/bean.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export class CategoryRequest {
77
export class FrameworkDetailsRequest {
88
frameworkId?: string;
99
refreshFrameworkDetails?: boolean = false;
10-
defaultFrameworkDetails: boolean = true;
10+
defaultFrameworkDetails: boolean = false;
1111
}

src/services/framework/framework.service.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,29 @@ export class FrameworkService {
7474
successCallback: (response: string) => void,
7575
errorCallback: (error: string) => void) {
7676

77+
if (this.updatedFrameworkResponseBody.result == undefined
78+
|| request.frameworkId !== this.updatedFrameworkResponseBody.result.framework.identifier) {
79+
let fr = new FrameworkDetailsRequest();
80+
if (request.frameworkId !== undefined
81+
&& request.frameworkId !== "") {
82+
fr.frameworkId = request.frameworkId;
83+
} else {
84+
fr.defaultFrameworkDetails = true;
85+
}
86+
this.getFrameworkDetails(fr, r => {
87+
this.getCategory(request, successCallback, errorCallback);
88+
}, e => {
89+
//ignore as of now
90+
errorCallback(e);
91+
})
92+
} else {
93+
this.getCategory(request, successCallback, errorCallback);
94+
}
95+
}
96+
97+
private getCategory(request: CategoryRequest,
98+
successCallback: (response: string) => void,
99+
errorCallback: (error: string) => void) {
77100
if (request.prevCategory && request.selectedCode) {
78101
let filteredCategory = this.currentCategories.filter(c => {
79102
return c.code === request.prevCategory;
@@ -84,7 +107,7 @@ export class FrameworkService {
84107
}
85108
return request.selectedCode!.some(check);
86109
});
87-
110+
88111
let check2 = function (element) {
89112
return element.associations !== undefined;
90113
}
@@ -100,7 +123,7 @@ export class FrameworkService {
100123
successCallback(JSON.stringify(Array.from(map.values())));
101124
return;
102125
}
103-
126+
104127
}
105128

106129
let nextCategories = this.currentCategories.filter(c => {

0 commit comments

Comments
 (0)