Commit 328e4432 by Nattana Chaiyamat

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

parent 32b3b50a
......@@ -102,12 +102,12 @@ export class CompetencyTopic implements OnInit {
private cdr: ChangeDetectorRef,
private fileService: FileService,
private competencytopicService: CompetencytopicService,
private competencytypeService: CompetencytypeService,
// private competencytypeService: CompetencytypeService,
private tokenService: TokenService
) { }
ngOnInit(): void {
this.getCompetencytopicList()
this.getCompetencytypeList()
// this.getCompetencytypeList()
}
onExamSelected(event: any) {
......@@ -176,7 +176,7 @@ export class CompetencyTopic implements OnInit {
next: response => {
if (response.success) {
this.showAlert(response.message, 'success')
this.getCompetencytypeList()
// this.getCompetencytypeList()
this.getCompetencytopicList()
} else {
this.showAlert(response.message, 'error')
......@@ -211,23 +211,23 @@ export class CompetencyTopic implements OnInit {
}
getCompetencytypeList() {
this.competencytypeListLoading = true
this.selectedItems.data.clear()
this.competencytypeService.getList().subscribe({
next: response => {
this.typeList = response.map(x => {
this.selectedItems.data.set(x.competencyTypeId, false)
return new MyCompetencytypeModel(x)
})
this.selectedItems.key = 'competencyTypeId'
this.selectedItems.count = 0
this.competencytypeListLoading = false
this.cdr.detectChanges()
}, error: error => {
this.competencytypeListLoading = false
this.cdr.detectChanges()
}
})
// this.competencytypeListLoading = true
// this.selectedItems.data.clear()
// this.competencytypeService.getList().subscribe({
// next: response => {
// this.typeList = response.map(x => {
// this.selectedItems.data.set(x.competencyTypeId, false)
// return new MyCompetencytypeModel(x)
// })
// this.selectedItems.key = 'competencyTypeId'
// this.selectedItems.count = 0
// this.competencytypeListLoading = false
// this.cdr.detectChanges()
// }, error: error => {
// this.competencytypeListLoading = false
// this.cdr.detectChanges()
// }
// })
}
......@@ -292,7 +292,7 @@ export class CompetencyTopic implements OnInit {
next: response => {
if (response.success) {
this.showAlert(response.message, 'success');
this.getCompetencytypeList();
// this.getCompetencytypeList();
this.getCompetencytopicList();
this.closeDialog()
} else {
......@@ -355,7 +355,7 @@ export class CompetencyTopic implements OnInit {
this.competencyTopic.loading = false;
if (response.success) {
this.showAlert(response.message, 'success');
this.getCompetencytypeList();
// this.getCompetencytypeList();
this.getCompetencytopicList();
} else {
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