mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-06 01:25:28 +00:00
optimize
This commit is contained in:
parent
46eb857629
commit
69cb870444
@ -19,37 +19,23 @@ export class GdtSumPerEmail {
|
|||||||
export class GdtEntryList {
|
export class GdtEntryList {
|
||||||
constructor(json: any) {
|
constructor(json: any) {
|
||||||
this.state = json.state
|
this.state = json.state
|
||||||
this.moreEntrysAsShown = json.moreEntrysAsShown
|
this.count = json.count
|
||||||
this.ownEntries = []
|
this.gdtEntries = json.gdtEntries ? json.gdtEntries.map((json: any) => new GdtEntry(json)) : []
|
||||||
if (typeof json.ownEntries !== undefined) {
|
this.gdtSum = json.gdtSum
|
||||||
for (const entry in json.ownEntries) {
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log(entry)
|
|
||||||
this.ownEntries.push(new GdtEntry(json.ownEntries[entry]))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.gdtSumPerEmail = []
|
|
||||||
for (const email in json.gdtSumPerEmail) {
|
|
||||||
this.gdtSumPerEmail.push(new GdtSumPerEmail(email, json.gdtSumPerEmail[email]))
|
|
||||||
}
|
|
||||||
this.email = json.email
|
|
||||||
this.timeUsed = json.timeUsed
|
this.timeUsed = json.timeUsed
|
||||||
}
|
}
|
||||||
|
|
||||||
@Field(() => String)
|
@Field(() => String)
|
||||||
state: string
|
state: string
|
||||||
|
|
||||||
@Field(() => Boolean)
|
@Field(() => Number)
|
||||||
moreEntrysAsShown: boolean
|
count: number
|
||||||
|
|
||||||
@Field(() => [GdtEntry])
|
@Field(() => [GdtEntry])
|
||||||
ownEntries: GdtEntry[]
|
gdtEntries: GdtEntry[]
|
||||||
|
|
||||||
@Field(() => [GdtSumPerEmail])
|
@Field(() => Number)
|
||||||
gdtSumPerEmail: GdtSumPerEmail[]
|
gdtSum: number
|
||||||
|
|
||||||
@Field(() => String)
|
|
||||||
email: string
|
|
||||||
|
|
||||||
@Field(() => Number)
|
@Field(() => Number)
|
||||||
timeUsed: number
|
timeUsed: number
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user