Interface conversion, search bar layout

This commit is contained in:
Geomitron
2023-12-09 18:21:01 -06:00
parent d689843f27
commit ece0f75b99
37 changed files with 1531 additions and 760 deletions

View File

@@ -4,9 +4,8 @@
</div>
</td>
<td>
<span id="chartCount" *ngIf="result.chartCount > 1">{{ result.chartCount }}</span
>{{ result.name }}
<span id="chartCount" *ngIf="song.length > 1">{{ song.length }}</span> {{ song[0].name }}
</td>
<td>{{ result.artist }}</td>
<td>{{ result.album || 'Various' }}</td>
<td>{{ result.genre || 'Various' }}</td>
<td>{{ song[0].artist }}</td>
<td>{{ song[0].album || 'Various' }}</td>
<td>{{ song[0].genre || 'Various' }}</td>

View File

@@ -1,6 +1,6 @@
import { AfterViewInit, Component, ElementRef, Input, ViewChild } from '@angular/core'
import { SongResult } from '../../../../../../src-shared/interfaces/search.interface'
import { ChartData } from '../../../../../../src-shared/interfaces/search.interface'
import { SelectionService } from '../../../../core/services/selection.service'
@Component({
@@ -9,14 +9,14 @@ import { SelectionService } from '../../../../core/services/selection.service'
styleUrls: ['./result-table-row.component.scss'],
})
export class ResultTableRowComponent implements AfterViewInit {
@Input() result: SongResult
@Input() song: ChartData[]
@ViewChild('checkbox', { static: true }) checkbox: ElementRef
constructor(private selectionService: SelectionService) { }
get songID() {
return this.result.id
return this.song[0].songId ?? this.song[0].chartId
}
ngAfterViewInit() {