Improved level data loading #300
This commit is contained in:
parent
4da87ae3cb
commit
2b866b5ab1
@ -62,6 +62,17 @@ export class Queries {
|
|||||||
}
|
}
|
||||||
createdAt
|
createdAt
|
||||||
modifiedAt
|
modifiedAt
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
static levelWithHistoryQuery = `
|
||||||
|
query LevelHistory($serverId: ID, $id: ID) {
|
||||||
|
servers(filter: {id: $serverId}) {
|
||||||
|
levelCount
|
||||||
|
levels(filter: {id: $id}) {
|
||||||
|
id
|
||||||
|
|
||||||
history {
|
history {
|
||||||
id
|
id
|
||||||
@ -233,16 +244,6 @@ export class Queries {
|
|||||||
|
|
||||||
createdAt
|
createdAt
|
||||||
modifiedAt
|
modifiedAt
|
||||||
|
|
||||||
history {
|
|
||||||
id
|
|
||||||
emojiName
|
|
||||||
roleId
|
|
||||||
autoRole
|
|
||||||
deleted
|
|
||||||
dateFrom
|
|
||||||
dateTo
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-wrapper">
|
<div class="btn-wrapper">
|
||||||
<app-history-btn *ngIf="!isEditingNew" [id] ="level.history" translationKey="view.server.levels.header"></app-history-btn>
|
<app-history-btn *ngIf="!isEditingNew" [id]="level.id" [query]="query" translationKey="view.server.levels.header"></app-history-btn>
|
||||||
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"
|
<button *ngIf="!editing" pButton pInitEditableRow class="btn icon-btn" icon="pi pi-pencil"
|
||||||
(click)="onRowEditInit(dt, level, ri)" [disabled]="!user || user.isModerator && !user.isAdmin"></button>
|
(click)="onRowEditInit(dt, level, ri)" [disabled]="!user || user.isModerator && !user.isAdmin"></button>
|
||||||
<button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash"
|
<button *ngIf="!editing" pButton class="btn icon-btn danger-icon-btn" icon="pi pi-trash"
|
||||||
|
@ -61,6 +61,8 @@ export class LevelsComponent implements OnInit, OnDestroy {
|
|||||||
private server: Server = {};
|
private server: Server = {};
|
||||||
public user: UserDTO | null = null;
|
public user: UserDTO | null = null;
|
||||||
|
|
||||||
|
query: string = Queries.levelWithHistoryQuery;
|
||||||
|
|
||||||
public constructor(
|
public constructor(
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private spinner: SpinnerService,
|
private spinner: SpinnerService,
|
||||||
|
Loading…
Reference in New Issue
Block a user