diff --git a/src/components/schedule/table/table.component.html b/src/components/schedule/table/table.component.html
index ad828ed..853717e 100644
--- a/src/components/schedule/table/table.component.html
+++ b/src/components/schedule/table/table.component.html
@@ -51,10 +51,12 @@
{{ elementData["discipline"] }}
@for (typeOfOccupation of elementData["typeOfOccupations"]; track $index) {
- @if ($index !== 0) {
-
+ @if ($index === 0 && elementData["typeOfOccupations"][$index - 1] !== typeOfOccupation) {
+ @if ($index !== 0) {
+
+ }
+ ({{ typeOfOccupation }})
}
- ({{ typeOfOccupation }})
}
diff --git a/src/components/schedule/table/table.component.ts b/src/components/schedule/table/table.component.ts
index 5b5ad93..7a75bc0 100644
--- a/src/components/schedule/table/table.component.ts
+++ b/src/components/schedule/table/table.component.ts
@@ -89,7 +89,7 @@ export class TableComponent implements OnChanges {
);
const groupedData = filteredData.reduce((acc, item) => {
- const key = `${item.lectureHalls}-${item.campus}-${item.discipline}-${item.professors.join(', ')}-${item.isExcludedWeeks}-${item.weeks?.join(', ') || ''}`;
+ const key = `${item.typeOfOccupations.join(', ')}-${item.lectureHalls}-${item.campus}-${item.discipline}-${item.professors.join(', ')}-${item.isExcludedWeeks}-${item.weeks?.join(', ') || ''}`;
if (!acc[key])
acc[key] = {...item, groups: [item.group]};
else