Commit c0bed3aa by Natthaphat Pankiang

แก้ไขให้ข้อมูลเรียงลำดับ (แก้ไขกลุ่มสมรรถนะ)

parent 46ac9f16
...@@ -88,12 +88,18 @@ export class EditGroupCompetenciesComponent { ...@@ -88,12 +88,18 @@ export class EditGroupCompetenciesComponent {
return match; return match;
}) })
.sort((a, b) => { .sort((a, b) => {
return a.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId const topicA = a.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId.toLowerCase();
.localeCompare(b.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId); const topicB = b.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId.toLowerCase();
const expectationA = a.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.expectation.toLowerCase();
const expectationB = b.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.expectation.toLowerCase();
return topicA.localeCompare(topicB) || expectationA.localeCompare(expectationB);
}); });
} }
getIndicatorsCoursesList() { getIndicatorsCoursesList() {
this.dataModalLoading = true this.dataModalLoading = true
this.indicatorsCoursesService.getList().subscribe({ this.indicatorsCoursesService.getList().subscribe({
......
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