mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
30 lines
783 B
TypeScript
30 lines
783 B
TypeScript
import { Component, Input, OnInit } from '@angular/core'
|
|
|
|
import { ChartData } from '../../../../../../src-shared/interfaces/search.interface'
|
|
import { SelectionService } from '../../../../core/services/selection.service'
|
|
|
|
@Component({
|
|
selector: 'tr[app-result-table-row]',
|
|
templateUrl: './result-table-row.component.html',
|
|
})
|
|
export class ResultTableRowComponent implements OnInit {
|
|
@Input() song: ChartData[]
|
|
|
|
constructor(private selectionService: SelectionService) { }
|
|
|
|
ngOnInit() {
|
|
this.selectionService.selections[this.groupId] = false
|
|
}
|
|
|
|
get groupId() {
|
|
return this.song[0].groupId
|
|
}
|
|
|
|
get selected() {
|
|
return this.selectionService.selections[this.groupId] ?? false
|
|
}
|
|
set selected(value: boolean) {
|
|
this.selectionService.selections[this.groupId] = value
|
|
}
|
|
}
|