Browse Source

receive confirmed count value in frontend statistics models

pull/1495/head
youichiro 3 years ago
parent
commit
58c04f7217
1 changed files with 8 additions and 4 deletions
  1. 12
      frontend/domain/models/statistics/statistics.ts

12
frontend/domain/models/statistics/statistics.ts

@ -2,26 +2,30 @@ export type Label = {[key: string]: number}
export type User = {[key: string]: number}
export type ConfirmedCount = {[key: string]: number}
export class Statistics {
constructor(
public label: Label,
public userLabel: User,
public total: number,
public remaining: number,
public user: User
public user: User,
public confirmedCount: ConfirmedCount,
) {}
static valueOf(
{ label, user_label, total, remaining, user }:
{ label, user_label, total, remaining, user, confirmed_count }:
{
label: Label,
user_label: User,
total: number,
remaining: number,
user: User
user: User,
confirmed_count: ConfirmedCount,
}
): Statistics {
return new Statistics(label, user_label, total, remaining, user)
return new Statistics(label, user_label, total, remaining, user, confirmed_count)
}
private makeData(object: Label | User, label: string) {

Loading…
Cancel
Save