view data fixes
This commit is contained in:
@@ -11,32 +11,32 @@ export class RaceStewardingViewModel extends ViewModel {
|
||||
|
||||
get race() { return this.data.race; }
|
||||
get league() { return this.data.league; }
|
||||
get protests() { return this.data.protests; }
|
||||
get penalties() { return this.data.penalties; }
|
||||
get driverMap() { return this.data.driverMap; }
|
||||
|
||||
/** UI-specific: Pending protests */
|
||||
get pendingProtests() {
|
||||
return this.protests.filter(p => p.status === 'pending' || p.status === 'under_review');
|
||||
return this.data.pendingProtests;
|
||||
}
|
||||
|
||||
/** UI-specific: Resolved protests */
|
||||
get resolvedProtests() {
|
||||
return this.protests.filter(p =>
|
||||
p.status === 'upheld' ||
|
||||
p.status === 'dismissed' ||
|
||||
p.status === 'withdrawn'
|
||||
);
|
||||
return this.data.resolvedProtests;
|
||||
}
|
||||
|
||||
/** UI-specific: All protests */
|
||||
get protests() {
|
||||
return [...this.pendingProtests, ...this.resolvedProtests];
|
||||
}
|
||||
|
||||
/** UI-specific: Total pending protests count */
|
||||
get pendingCount(): number {
|
||||
return this.pendingProtests.length;
|
||||
return this.data.pendingCount;
|
||||
}
|
||||
|
||||
/** UI-specific: Total resolved protests count */
|
||||
get resolvedCount(): number {
|
||||
return this.resolvedProtests.length;
|
||||
return this.data.resolvedCount;
|
||||
}
|
||||
|
||||
/** UI-specific: Total penalties count */
|
||||
|
||||
Reference in New Issue
Block a user