support #316

Merged
edraft merged 16 commits from support into master 2023-04-18 22:23:59 +02:00
3 changed files with 14 additions and 11 deletions
Showing only changes of commit 2b866b5ab1 - Show all commits

View File

@ -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
}
}
}
}

View File

@ -184,7 +184,7 @@
</td>
<td>
<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"
(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"

View File

@ -61,6 +61,8 @@ export class LevelsComponent implements OnInit, OnDestroy {
private server: Server = {};
public user: UserDTO | null = null;
query: string = Queries.levelWithHistoryQuery;
public constructor(
private authService: AuthService,
private spinner: SpinnerService,