Commit 328e4432 by Nattana Chaiyamat

หัวข้อสมรรถนะ

parent 32b3b50a
...@@ -102,12 +102,12 @@ export class CompetencyTopic implements OnInit { ...@@ -102,12 +102,12 @@ export class CompetencyTopic implements OnInit {
private cdr: ChangeDetectorRef, private cdr: ChangeDetectorRef,
private fileService: FileService, private fileService: FileService,
private competencytopicService: CompetencytopicService, private competencytopicService: CompetencytopicService,
private competencytypeService: CompetencytypeService, // private competencytypeService: CompetencytypeService,
private tokenService: TokenService private tokenService: TokenService
) { } ) { }
ngOnInit(): void { ngOnInit(): void {
this.getCompetencytopicList() this.getCompetencytopicList()
this.getCompetencytypeList() // this.getCompetencytypeList()
} }
onExamSelected(event: any) { onExamSelected(event: any) {
...@@ -176,7 +176,7 @@ export class CompetencyTopic implements OnInit { ...@@ -176,7 +176,7 @@ export class CompetencyTopic implements OnInit {
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
this.getCompetencytypeList() // this.getCompetencytypeList()
this.getCompetencytopicList() this.getCompetencytopicList()
} else { } else {
this.showAlert(response.message, 'error') this.showAlert(response.message, 'error')
...@@ -211,23 +211,23 @@ export class CompetencyTopic implements OnInit { ...@@ -211,23 +211,23 @@ export class CompetencyTopic implements OnInit {
} }
getCompetencytypeList() { getCompetencytypeList() {
this.competencytypeListLoading = true // this.competencytypeListLoading = true
this.selectedItems.data.clear() // this.selectedItems.data.clear()
this.competencytypeService.getList().subscribe({ // this.competencytypeService.getList().subscribe({
next: response => { // next: response => {
this.typeList = response.map(x => { // this.typeList = response.map(x => {
this.selectedItems.data.set(x.competencyTypeId, false) // this.selectedItems.data.set(x.competencyTypeId, false)
return new MyCompetencytypeModel(x) // return new MyCompetencytypeModel(x)
}) // })
this.selectedItems.key = 'competencyTypeId' // this.selectedItems.key = 'competencyTypeId'
this.selectedItems.count = 0 // this.selectedItems.count = 0
this.competencytypeListLoading = false // this.competencytypeListLoading = false
this.cdr.detectChanges() // this.cdr.detectChanges()
}, error: error => { // }, error: error => {
this.competencytypeListLoading = false // this.competencytypeListLoading = false
this.cdr.detectChanges() // this.cdr.detectChanges()
} // }
}) // })
} }
...@@ -292,7 +292,7 @@ export class CompetencyTopic implements OnInit { ...@@ -292,7 +292,7 @@ export class CompetencyTopic implements OnInit {
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success'); this.showAlert(response.message, 'success');
this.getCompetencytypeList(); // this.getCompetencytypeList();
this.getCompetencytopicList(); this.getCompetencytopicList();
this.closeDialog() this.closeDialog()
} else { } else {
...@@ -355,7 +355,7 @@ export class CompetencyTopic implements OnInit { ...@@ -355,7 +355,7 @@ export class CompetencyTopic implements OnInit {
this.competencyTopic.loading = false; this.competencyTopic.loading = false;
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success'); this.showAlert(response.message, 'success');
this.getCompetencytypeList(); // this.getCompetencytypeList();
this.getCompetencytopicList(); this.getCompetencytopicList();
} else { } else {
this.showAlert(response.message, 'error'); this.showAlert(response.message, 'error');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment