fix: sort weeks

This commit is contained in:
Polianin Nikita 2024-09-15 21:13:55 +03:00
parent 6450acf6a3
commit 80a7e71b84

View File

@ -106,7 +106,7 @@ export class TableComponent implements OnChanges {
else
this.backupDisciplines[item.disciplineId] = item.discipline;
item.discipline = `${item.isExcludedWeeks ? 'кр.' : 'н.'} ${item.weeks.join(', ')} ${item.discipline}`;
item.discipline = `${item.isExcludedWeeks ? 'кр.' : ''} ${item.weeks.sort((x, y) => x - y).join(', ')} н. ${item.discipline}`;
} else if (this.backupDisciplines[item.disciplineId])
item.discipline = this.backupDisciplines[item.disciplineId];