Commit c0bed3aa by Natthaphat Pankiang

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

parent 46ac9f16
......@@ -88,10 +88,16 @@ export class EditGroupCompetenciesComponent {
return match;
})
.sort((a, b) => {
return a.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId
.localeCompare(b.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId);
const topicA = a.data.competencyIndicatorsCourses1Mini.competencyIndicatorsCourses0.competencyTopic.competencyTopicId.toLowerCase();
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() {
......
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