From 2b866b5ab1fc6266840d74c2af578d7c6cd5270d Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Fri, 14 Apr 2023 22:01:06 +0200 Subject: [PATCH] Improved level data loading #300 --- .../src/app/models/graphql/queries.model.ts | 21 ++++++++++--------- .../components/levels/levels.component.html | 2 +- .../components/levels/levels.component.ts | 2 ++ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/kdb-web/src/app/models/graphql/queries.model.ts b/kdb-web/src/app/models/graphql/queries.model.ts index a8c0fd97..f3d68257 100644 --- a/kdb-web/src/app/models/graphql/queries.model.ts +++ b/kdb-web/src/app/models/graphql/queries.model.ts @@ -62,6 +62,17 @@ export class Queries { } createdAt modifiedAt + } + } + } + `; + + static levelWithHistoryQuery = ` + query LevelHistory($serverId: ID, $id: ID) { + servers(filter: {id: $serverId}) { + levelCount + levels(filter: {id: $id}) { + id history { id @@ -233,16 +244,6 @@ export class Queries { createdAt modifiedAt - - history { - id - emojiName - roleId - autoRole - deleted - dateFrom - dateTo - } } } } diff --git a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html index 4cb1859a..0c8b1945 100644 --- a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html +++ b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html @@ -184,7 +184,7 @@
- +