Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class FrameworkSelectionPage implements OnInit, OnDestroy {

getClosure(type: string, enableOtherOption?: boolean): FieldConfigOptionsBuilder<any> {
if (enableOtherOption) {
return this.frameworkCommonFormConfigBuilder.getFrameworkConfigOptionsBuilder(null, null, enableOtherOption)
return this.frameworkCommonFormConfigBuilder.getFrameworkConfigOptionsBuilder(type, null, enableOtherOption)
} else {
switch (type) {
case 'framework':
Expand Down
12 changes: 6 additions & 6 deletions src/app/resources/resources.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,12 @@ export class ResourcesComponent implements OnInit, AfterViewInit, OnDestroy, Fra
}
}
this.categoryMediumNamesArray = categoryMediumsParam;
if (this.searchGroupingContents && this.searchGroupingContents.combination.medium) {
const indexOfSelectedmediums = this.categoryMediumNamesArray.indexOf(this.searchGroupingContents.combination.medium);
if (this.searchGroupingContents && this.searchGroupingContents.combination?.medium!) {
const indexOfSelectedmediums = this.categoryMediumNamesArray.indexOf(this.searchGroupingContents.combination?.medium!);
await this.mediumClickHandler(indexOfSelectedmediums, this.categoryMediumNamesArray[indexOfSelectedmediums]);
} else {
for (let i = 0, len = this.categoryMediumNamesArray.length; i < len; i++) {
if ((selectedCategory[0].toLowerCase().trim()) === this.categoryMediumNamesArray[i].toLowerCase().trim()) {
if ((selectedCategory[0].toLowerCase().replace(/\s/g, '')) === this.categoryMediumNamesArray[i].toLowerCase().replace(/\s/g, '')) {
await this.mediumClickHandler(i, this.categoryMediumNamesArray[i]);
}
}
Expand All @@ -759,13 +759,13 @@ export class ResourcesComponent implements OnInit, AfterViewInit, OnDestroy, Fra
selectedCategory = this.profile.serverProfile.framework[categories[2].code]
}
this.categoryGradeLevelsArray = res.map(a => (a.name));
if (this.searchGroupingContents && this.searchGroupingContents.combination.gradeLevel) {
if (this.searchGroupingContents && this.searchGroupingContents.combination?.gradeLevel!) {
const indexOfselectedClass =
this.categoryGradeLevelsArray.indexOf(this.searchGroupingContents.combination.gradeLevel);
this.categoryGradeLevelsArray.indexOf(this.searchGroupingContents.combination?.gradeLevel!);
await this.classClickHandler(indexOfselectedClass);
} else {
for (let i = 0, len = this.categoryGradeLevelsArray.length; i < len; i++) {
if (selectedCategory[0] === this.categoryGradeLevelsArray[i]) {
if (selectedCategory[0].toLowerCase().replace(/\s/g, '') === this.categoryGradeLevelsArray[i].toLowerCase().replace(/\s/g, '')) {
await this.classClickHandler(i);
}
}
Expand Down