fix: combine typeOfOccupation
Some checks failed
Build and Deploy Angular App / build (push) Failing after 1m0s

This commit is contained in:
Polianin Nikita 2024-10-25 01:53:25 +03:00
parent a8159b4f27
commit 5d265e4b48
2 changed files with 6 additions and 4 deletions

View File

@ -51,10 +51,12 @@
<div class="mat-body-1">{{ elementData["discipline"] }}</div> <div class="mat-body-1">{{ elementData["discipline"] }}</div>
<!-- Type of Occupation --> <!-- Type of Occupation -->
@for (typeOfOccupation of elementData["typeOfOccupations"]; track $index) { @for (typeOfOccupation of elementData["typeOfOccupations"]; track $index) {
@if ($index !== 0) { @if ($index === 0 && elementData["typeOfOccupations"][$index - 1] !== typeOfOccupation) {
<br/> @if ($index !== 0) {
<br/>
}
<div class="mat-body">({{ typeOfOccupation }})</div>
} }
<div class="mat-body">({{ typeOfOccupation }})</div>
} }
<!-- Professors --> <!-- Professors -->

View File

@ -89,7 +89,7 @@ export class TableComponent implements OnChanges {
); );
const groupedData = filteredData.reduce((acc, item) => { 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]) if (!acc[key])
acc[key] = {...item, groups: [item.group]}; acc[key] = {...item, groups: [item.group]};
else else