Integrate HistoryFormatService into AppealComponent to filter inactive history items.
This commit is contained in:
parent
d1ba89acc8
commit
eb72ce14cc
|
|
@ -10,6 +10,7 @@ import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
|
|||
import {MatFormFieldModule} from '@angular/material/form-field';
|
||||
import {MatSelectModule} from '@angular/material/select';
|
||||
import {MatInputModule} from '@angular/material/input';
|
||||
import {HistoryFormatService} from '@pages/reference/bans/history-format.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-appeal',
|
||||
|
|
@ -36,6 +37,7 @@ export class AppealComponent implements OnInit, AfterViewInit {
|
|||
protected selectedPunishment = signal<PunishmentHistory | null>(null);
|
||||
|
||||
constructor(
|
||||
private historyFormatService: HistoryFormatService,
|
||||
private appealApi: AppealsService,
|
||||
private historyApi: HistoryService,
|
||||
protected authService: AuthService,
|
||||
|
|
@ -54,7 +56,7 @@ export class AppealComponent implements OnInit, AfterViewInit {
|
|||
throw new Error('JWT subject is null, are you logged in?');
|
||||
}
|
||||
this.historyApi.getAllHistoryForUUID(uuid).subscribe(history => {
|
||||
this.history.set(history);
|
||||
this.history.set(history.filter(item => this.historyFormatService.isActive(item)));
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user