Merge pull request '#79_hide_table_columns' (#333) from #79_hide_table_columns into 1.1.0
Reviewed-on: sh-edraft.de/kd_discord_bot#333 Reviewed-by: edraft-dev <dev.sven.heidemann@sh-edraft.de> Closes #79
This commit is contained in:
commit
02e0c72a80
@ -1,3 +1,4 @@
|
|||||||
|
from enum import Enum
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from cpl_core.database.context import DatabaseContextABC
|
from cpl_core.database.context import DatabaseContextABC
|
||||||
@ -100,9 +101,17 @@ class AuthUserRepositoryService(AuthUserRepositoryABC):
|
|||||||
):
|
):
|
||||||
crit_sort_direction = criteria.sort_direction.lower()
|
crit_sort_direction = criteria.sort_direction.lower()
|
||||||
if crit_sort_direction == "desc" or crit_sort_direction == "descending":
|
if crit_sort_direction == "desc" or crit_sort_direction == "descending":
|
||||||
query = query.order_by_descending(lambda x: getattr(x, criteria.sort_column))
|
query = query.order_by_descending(
|
||||||
|
lambda x: getattr(x, criteria.sort_column)
|
||||||
|
if not isinstance(getattr(x, criteria.sort_column), Enum)
|
||||||
|
else getattr(x, criteria.sort_column).value
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
query = query.order_by(lambda x: getattr(x, criteria.sort_column))
|
query = query.order_by(
|
||||||
|
lambda x: getattr(x, criteria.sort_column)
|
||||||
|
if not isinstance(getattr(x, criteria.sort_column), Enum)
|
||||||
|
else getattr(x, criteria.sort_column).value
|
||||||
|
)
|
||||||
|
|
||||||
result = FilteredResult()
|
result = FilteredResult()
|
||||||
result.total_count = query.count()
|
result.total_count = query.count()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kdb-web",
|
"name": "kdb-web",
|
||||||
"version": "1.1.0",
|
"version": "1.1.dev79_hide_table_columns",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"update-version": "ts-node-esm update-version.ts",
|
"update-version": "ts-node-esm update-version.ts",
|
||||||
|
7
kdb-web/src/app/base/component-with-table.spec.ts
Normal file
7
kdb-web/src/app/base/component-with-table.spec.ts
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { ComponentWithTable } from './component-with-table';
|
||||||
|
|
||||||
|
describe('ComponentWithTable', () => {
|
||||||
|
it('should create an instance', () => {
|
||||||
|
expect(new ComponentWithTable()).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
39
kdb-web/src/app/base/component-with-table.ts
Normal file
39
kdb-web/src/app/base/component-with-table.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
export interface Column {
|
||||||
|
key: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ComponentWithTable {
|
||||||
|
|
||||||
|
private _hiddenColumns: Column[] = [];
|
||||||
|
set hiddenColumns(value: Column[]) {
|
||||||
|
this._hiddenColumns = value;
|
||||||
|
localStorage.setItem("hiddenColumns", JSON.stringify(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
get hiddenColumns(): Column[] {
|
||||||
|
return this._hiddenColumns;
|
||||||
|
}
|
||||||
|
|
||||||
|
private name: string = "";
|
||||||
|
public columns: Column[] = [];
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
name: string,
|
||||||
|
columns: string[]
|
||||||
|
) {
|
||||||
|
this.name = name;
|
||||||
|
this.columns = columns.map(column => {
|
||||||
|
return { key: this.getKey(column), name: column };
|
||||||
|
});
|
||||||
|
this._hiddenColumns = JSON.parse(localStorage.getItem("hiddenColumns") ?? "");
|
||||||
|
}
|
||||||
|
|
||||||
|
private getKey(column: string): string {
|
||||||
|
return `${this.name}_${column}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
public isColumnVisible(column: string): boolean {
|
||||||
|
return !this._hiddenColumns.map(column => column.key).includes(this.getKey(column));
|
||||||
|
}
|
||||||
|
}
|
@ -9,12 +9,15 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="caption">
|
<ng-template pTemplate="caption">
|
||||||
<div class="table-caption">
|
<div class="table-caption">
|
||||||
|
<div class="table-caption-table-info">
|
||||||
<div class="table-caption-text">
|
<div class="table-caption-text">
|
||||||
<ng-container *ngIf="!loading">{{users.length}} {{'common.of' | translate}}
|
<ng-container *ngIf="!loading">{{users.length}} {{'common.of' | translate}}
|
||||||
{{dt.totalRecords}}
|
{{dt.totalRecords}}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
{{'admin.auth_users.users' | translate}}
|
{{'admin.auth_users.users' | translate}}
|
||||||
</div>
|
</div>
|
||||||
|
<app-multi-select-columns [columns]="columns" [(hiddenColumns)]="hiddenColumns"></app-multi-select-columns>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="table-caption-btn-wrapper btn-wrapper">
|
<div class="table-caption-btn-wrapper btn-wrapper">
|
||||||
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
||||||
@ -29,44 +32,44 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
<th pSortableColumn="firstName">
|
<th hideable-th="first_name" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'admin.auth_users.headers.first_name' | translate}}</div>
|
<div class="table-header-text">{{'common.first_name' | translate}}</div>
|
||||||
<p-sortIcon field="firstName" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="firstName" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="lastName">
|
<th hideable-th="last_name" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'admin.auth_users.headers.last_name' | translate}}</div>
|
<div class="table-header-text">{{'common.last_name' | translate}}</div>
|
||||||
<p-sortIcon field="lastName" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="lastName" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="email">
|
<th hideable-th="email" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'common.email' | translate}}</div>
|
<div class="table-header-text">{{'common.email' | translate}}</div>
|
||||||
<p-sortIcon field="email" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="email" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th class="table-header-actions" pSortableColumn="confirmationId">
|
<th class="table-header-actions" hideable-th="active" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'admin.auth_users.headers.active' | translate}}</div>
|
<div class="table-header-text">{{'common.active' | translate}}</div>
|
||||||
<p-sortIcon field="confirmationId" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="confirmationId" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th class="table-header-small-dropdown" pSortableColumn="authRole">
|
<th class="table-header-small-dropdown" hideable-th="auth_role" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'admin.auth_users.headers.role' | translate}}</div>
|
<div class="table-header-text">{{'common.role' | translate}}</div>
|
||||||
<p-sortIcon field="authRole" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="authRole" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th>
|
<th hideable-th="password" [parent]="this">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'admin.auth_users.headers.password' | translate}}</div>
|
<div class="table-header-text">{{'common.password' | translate}}</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
@ -89,28 +92,28 @@
|
|||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th hideable-th="first_name" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="firstName" placeholder="{{'admin.auth_users.headers.first_name' | translate}}">
|
<input type="text" pInputText formControlName="firstName" placeholder="{{'common.first_name' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th hideable-th="last_name" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="lastName" placeholder="{{'admin.auth_users.headers.last_name' | translate}}">
|
<input type="text" pInputText formControlName="lastName" placeholder="{{'common.last_name' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th hideable-th="email" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="email" pInputText formControlName="email" placeholder="{{'common.email' | translate}}">
|
<input type="email" pInputText formControlName="email" placeholder="{{'common.email' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th hideable-th="active" [parent]="this"></th>
|
||||||
<th>
|
<th hideable-th="auth_role" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<p-dropdown formControlName="authRole" [options]="authRoles" placeholder="{{'admin.auth_users.headers.auth_role' | translate}}"></p-dropdown>
|
<p-dropdown formControlName="authRole" [options]="authRoles" placeholder="{{'common.auth_role' | translate}}"></p-dropdown>
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th hideable-th="password" [parent]="this"></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
@ -119,7 +122,7 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="body" let-user let-editing="editing" let-ri="rowIndex">
|
<ng-template pTemplate="body" let-user let-editing="editing" let-ri="rowIndex">
|
||||||
<tr [pEditableRow]="user">
|
<tr [pEditableRow]="user">
|
||||||
<td>
|
<td hideable-td="first_name" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText type="text" [(ngModel)]="user.firstName"
|
<input class="table-edit-input" pInputText type="text" [(ngModel)]="user.firstName"
|
||||||
@ -130,7 +133,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-td="last_name" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText type="text" [(ngModel)]="user.lastName"
|
<input class="table-edit-input" pInputText type="text" [(ngModel)]="user.lastName"
|
||||||
@ -141,7 +144,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-td="email" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText type="email" [(ngModel)]="user.email"
|
<input class="table-edit-input" pInputText type="email" [(ngModel)]="user.email"
|
||||||
@ -152,7 +155,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-td="active" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<p-checkbox [binary]="true" [(ngModel)]="user.isConfirmed"
|
<p-checkbox [binary]="true" [(ngModel)]="user.isConfirmed"
|
||||||
@ -165,7 +168,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-td="auth_role" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<p-dropdown [options]="authRoles" [(ngModel)]="user.authRole"
|
<p-dropdown [options]="authRoles" [(ngModel)]="user.authRole"
|
||||||
@ -176,7 +179,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-td="password" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText type="password" [(ngModel)]="user.password"
|
<input class="table-edit-input" pInputText type="password" [(ngModel)]="user.password"
|
||||||
|
@ -15,6 +15,7 @@ import { AuthUserSelectCriterion } from "src/app/models/selection/auth-user/auth
|
|||||||
import { LazyLoadEvent } from "primeng/api";
|
import { LazyLoadEvent } from "primeng/api";
|
||||||
import { Subject, throwError } from "rxjs";
|
import { Subject, throwError } from "rxjs";
|
||||||
import { TranslateService } from "@ngx-translate/core";
|
import { TranslateService } from "@ngx-translate/core";
|
||||||
|
import { ComponentWithTable } from "../../../../../base/component-with-table";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -22,7 +23,7 @@ import { TranslateService } from "@ngx-translate/core";
|
|||||||
templateUrl: "./auth-user.component.html",
|
templateUrl: "./auth-user.component.html",
|
||||||
styleUrls: ["./auth-user.component.scss"]
|
styleUrls: ["./auth-user.component.scss"]
|
||||||
})
|
})
|
||||||
export class AuthUserComponent implements OnInit, OnDestroy {
|
export class AuthUserComponent extends ComponentWithTable implements OnInit, OnDestroy {
|
||||||
|
|
||||||
users!: AuthUserDTO[];
|
users!: AuthUserDTO[];
|
||||||
statuses!: any[];
|
statuses!: any[];
|
||||||
@ -72,6 +73,7 @@ export class AuthUserComponent implements OnInit, OnDestroy {
|
|||||||
private fb: FormBuilder,
|
private fb: FormBuilder,
|
||||||
private translate: TranslateService
|
private translate: TranslateService
|
||||||
) {
|
) {
|
||||||
|
super("auth-users", ["first_name", "last_name", "email", "active", 'auth_role', 'password']);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
import { HideableComponent } from './hideable-component';
|
||||||
|
|
||||||
|
describe('HideableComponent', () => {
|
||||||
|
it('should create an instance', () => {
|
||||||
|
expect(new HideableComponent()).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
13
kdb-web/src/app/modules/shared/base/hideable-component.ts
Normal file
13
kdb-web/src/app/modules/shared/base/hideable-component.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { Directive, HostBinding, Input } from "@angular/core";
|
||||||
|
import { ComponentWithTable } from "../../../base/component-with-table";
|
||||||
|
|
||||||
|
@Directive()
|
||||||
|
export class HideableComponent {
|
||||||
|
@HostBinding("class.hidden-column")
|
||||||
|
get hidden() {
|
||||||
|
return !(this.parent?.isColumnVisible(this.column) ?? true);
|
||||||
|
};
|
||||||
|
|
||||||
|
@Input() column!: string;
|
||||||
|
@Input() parent!: ComponentWithTable;
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
<div class="table-caption-column-select">
|
||||||
|
<p-multiSelect display="chip" [options]="columns" [(ngModel)]="hiddenColumns" optionLabel="name" placeholder="{{'common.hidden_columns' | translate}}" [filter]=false>
|
||||||
|
<ng-template let-value pTemplate="selectedItems">
|
||||||
|
<div *ngFor="let item of hiddenColumns; let i = index;">
|
||||||
|
<div>
|
||||||
|
{{'common.' + item.name | translate}}<span *ngIf="i < columns.length-1">,</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="!hiddenColumns || hiddenColumns.length === 0">{{'common.hidden_columns' | translate}}</div>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
<ng-template let-item pTemplate="item">
|
||||||
|
<div>{{'common.' + item.name | translate}}</div>
|
||||||
|
</ng-template>
|
||||||
|
</p-multiSelect>
|
||||||
|
</div>
|
@ -0,0 +1,23 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { MultiSelectColumnsComponent } from './multi-select-columns.component';
|
||||||
|
|
||||||
|
describe('MultiSelectColumnsComponent', () => {
|
||||||
|
let component: MultiSelectColumnsComponent;
|
||||||
|
let fixture: ComponentFixture<MultiSelectColumnsComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ MultiSelectColumnsComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(MultiSelectColumnsComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,24 @@
|
|||||||
|
import { Component, EventEmitter, Input, Output } from "@angular/core";
|
||||||
|
import { Column } from "../../../../base/component-with-table";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: "app-multi-select-columns",
|
||||||
|
templateUrl: "./multi-select-columns.component.html",
|
||||||
|
styleUrls: ["./multi-select-columns.component.scss"]
|
||||||
|
})
|
||||||
|
export class MultiSelectColumnsComponent {
|
||||||
|
@Input() columns: Column[] = [];
|
||||||
|
|
||||||
|
private _hiddenColumns: Column[] = [];
|
||||||
|
@Input()
|
||||||
|
set hiddenColumns(columns: Column[]) {
|
||||||
|
this._hiddenColumns = columns;
|
||||||
|
this.hiddenColumnsChange.emit(columns);
|
||||||
|
}
|
||||||
|
|
||||||
|
get hiddenColumns(): Column[] {
|
||||||
|
return this._hiddenColumns;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Output() hiddenColumnsChange: EventEmitter<Column[]> = new EventEmitter<Column[]>();
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
<ng-content></ng-content>
|
@ -0,0 +1 @@
|
|||||||
|
|
@ -0,0 +1,23 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { HideableColumnComponent } from './hideable-column.component';
|
||||||
|
|
||||||
|
describe('HideableColumnComponent', () => {
|
||||||
|
let component: HideableColumnComponent;
|
||||||
|
let fixture: ComponentFixture<HideableColumnComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ HideableColumnComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(HideableColumnComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,16 @@
|
|||||||
|
import { Component, Input } from "@angular/core";
|
||||||
|
import { HideableComponent } from "../../base/hideable-component";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: "[hideable-td]",
|
||||||
|
templateUrl: "./hideable-column.component.html",
|
||||||
|
styleUrls: ["./hideable-column.component.scss"]
|
||||||
|
})
|
||||||
|
export class HideableColumnComponent extends HideableComponent {
|
||||||
|
@Input("hideable-td") override column!: string;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
<ng-template #content>
|
||||||
|
<ng-content></ng-content>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
<div *ngIf="sortable; else without" [pSortableColumn]="column">
|
||||||
|
<ng-container *ngTemplateOutlet="content"></ng-container>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ng-template #without>
|
||||||
|
<ng-container *ngTemplateOutlet="content"></ng-container>
|
||||||
|
</ng-template>
|
@ -0,0 +1,23 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { HideableHeaderComponent } from './hideable-header.component';
|
||||||
|
|
||||||
|
describe('HideableHeaderComponent', () => {
|
||||||
|
let component: HideableHeaderComponent;
|
||||||
|
let fixture: ComponentFixture<HideableHeaderComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ HideableHeaderComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(HideableHeaderComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,16 @@
|
|||||||
|
import { Component, Input } from "@angular/core";
|
||||||
|
import { HideableComponent } from "../../base/hideable-component";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: "[hideable-th]",
|
||||||
|
templateUrl: "./hideable-header.component.html",
|
||||||
|
styleUrls: ["./hideable-header.component.scss"]
|
||||||
|
})
|
||||||
|
export class HideableHeaderComponent extends HideableComponent {
|
||||||
|
@Input("hideable-th") override column!: string;
|
||||||
|
@Input() sortable: boolean = false;
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -13,7 +13,7 @@ import { InputTextModule } from "primeng/inputtext";
|
|||||||
import { MenuModule } from "primeng/menu";
|
import { MenuModule } from "primeng/menu";
|
||||||
import { PasswordModule } from "primeng/password";
|
import { PasswordModule } from "primeng/password";
|
||||||
import { ProgressSpinnerModule } from "primeng/progressspinner";
|
import { ProgressSpinnerModule } from "primeng/progressspinner";
|
||||||
import { TableModule } from "primeng/table";
|
import { SortableColumn, TableModule } from "primeng/table";
|
||||||
import { ToastModule } from "primeng/toast";
|
import { ToastModule } from "primeng/toast";
|
||||||
import { AuthRolePipe } from "./pipes/auth-role.pipe";
|
import { AuthRolePipe } from "./pipes/auth-role.pipe";
|
||||||
import { IpAddressPipe } from "./pipes/ip-address.pipe";
|
import { IpAddressPipe } from "./pipes/ip-address.pipe";
|
||||||
@ -23,9 +23,13 @@ import { PanelModule } from "primeng/panel";
|
|||||||
import { InputNumberModule } from "primeng/inputnumber";
|
import { InputNumberModule } from "primeng/inputnumber";
|
||||||
import { ImageModule } from "primeng/image";
|
import { ImageModule } from "primeng/image";
|
||||||
import { SidebarModule } from "primeng/sidebar";
|
import { SidebarModule } from "primeng/sidebar";
|
||||||
import { HistoryBtnComponent } from './components/history-btn/history-btn.component';
|
import { HistoryBtnComponent } from "./components/history-btn/history-btn.component";
|
||||||
import { DataViewModule, DataViewLayoutOptions } from 'primeng/dataview';
|
import { DataViewModule, DataViewLayoutOptions } from "primeng/dataview";
|
||||||
import { ConfigListComponent } from './components/config-list/config-list.component';
|
import { ConfigListComponent } from "./components/config-list/config-list.component";
|
||||||
|
import { MultiSelectModule } from "primeng/multiselect";
|
||||||
|
import { HideableColumnComponent } from './components/hideable-column/hideable-column.component';
|
||||||
|
import { HideableHeaderComponent } from './components/hideable-header/hideable-header.component';
|
||||||
|
import { MultiSelectColumnsComponent } from './base/multi-select-columns/multi-select-columns.component';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@ -35,6 +39,9 @@ import { ConfigListComponent } from './components/config-list/config-list.compon
|
|||||||
BoolPipe,
|
BoolPipe,
|
||||||
HistoryBtnComponent,
|
HistoryBtnComponent,
|
||||||
ConfigListComponent,
|
ConfigListComponent,
|
||||||
|
HideableColumnComponent,
|
||||||
|
HideableHeaderComponent,
|
||||||
|
MultiSelectColumnsComponent,
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
@ -60,6 +67,7 @@ import { ConfigListComponent } from './components/config-list/config-list.compon
|
|||||||
ImageModule,
|
ImageModule,
|
||||||
SidebarModule,
|
SidebarModule,
|
||||||
DataViewModule,
|
DataViewModule,
|
||||||
|
MultiSelectModule,
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
ButtonModule,
|
ButtonModule,
|
||||||
@ -89,7 +97,12 @@ import { ConfigListComponent } from './components/config-list/config-list.compon
|
|||||||
HistoryBtnComponent,
|
HistoryBtnComponent,
|
||||||
DataViewModule,
|
DataViewModule,
|
||||||
DataViewLayoutOptions,
|
DataViewLayoutOptions,
|
||||||
ConfigListComponent
|
ConfigListComponent,
|
||||||
|
MultiSelectModule,
|
||||||
|
HideableColumnComponent,
|
||||||
|
HideableHeaderComponent,
|
||||||
|
MultiSelectColumnsComponent,
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class SharedModule { }
|
export class SharedModule {
|
||||||
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="caption">
|
<ng-template pTemplate="caption">
|
||||||
<div class="table-caption">
|
<div class="table-caption">
|
||||||
|
<div class="table-caption-table-info">
|
||||||
<div class="table-caption-text">
|
<div class="table-caption-text">
|
||||||
<ng-container *ngIf="!loading">{{achievements.length}} {{'common.of' | translate}}
|
<ng-container *ngIf="!loading">{{achievements.length}} {{'common.of' | translate}}
|
||||||
{{dt.totalRecords}}
|
{{dt.totalRecords}}
|
||||||
@ -16,6 +17,9 @@
|
|||||||
{{'view.server.achievements.achievements' | translate}}
|
{{'view.server.achievements.achievements' | translate}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<app-multi-select-columns [columns]="columns" [(hiddenColumns)]="hiddenColumns"></app-multi-select-columns>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="table-caption-btn-wrapper btn-wrapper">
|
<div class="table-caption-btn-wrapper btn-wrapper">
|
||||||
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
||||||
icon="pi pi-user-plus" (click)="addAchievement(dt)" [disabled]="isEditingNew || !user?.isModerator && !user?.isAdmin">
|
icon="pi pi-user-plus" (click)="addAchievement(dt)" [disabled]="isEditingNew || !user?.isModerator && !user?.isAdmin">
|
||||||
@ -29,44 +33,44 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
<th pSortableColumn="id">
|
<th hideable-th="id" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'common.id' | translate}}</div>
|
<div class="table-header-text">{{'common.id' | translate}}</div>
|
||||||
<p-sortIcon field="id" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="id" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="name">
|
<th hideable-th="name" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.achievements.headers.name' | translate}}</div>
|
<div class="table-header-text">{{'common.name' | translate}}</div>
|
||||||
<p-sortIcon field="name" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="name" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="description">
|
<th hideable-th="description" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.achievements.headers.description' | translate}}</div>
|
<div class="table-header-text">{{'common.description' | translate}}</div>
|
||||||
<p-sortIcon field="name" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="name" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="attribute">
|
<th hideable-th="attribute" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.achievements.headers.attribute' | translate}}</div>
|
<div class="table-header-text">{{'common.attribute' | translate}}</div>
|
||||||
<p-sortIcon field="attribute" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="attribute" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="operator">
|
<th hideable-th="operator" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.achievements.headers.operator' | translate}}</div>
|
<div class="table-header-text">{{'common.operator' | translate}}</div>
|
||||||
<p-sortIcon field="operator" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="operator" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="value">
|
<th hideable-th="value" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.achievements.headers.value' | translate}}</div>
|
<div class="table-header-text">{{'common.value' | translate}}</div>
|
||||||
<p-sortIcon field="value" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="value" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
@ -91,27 +95,27 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="table-header-small">
|
<th hideable-th="id" [parent]="this" class="table-header-small">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="id"
|
<input type="text" pInputText formControlName="id"
|
||||||
placeholder="{{'common.id' | translate}}">
|
placeholder="{{'common.id' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th hideable-th="name" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="name"
|
<input type="text" pInputText formControlName="name"
|
||||||
placeholder="{{'view.server.achievements.headers.name' | translate}}">
|
placeholder="{{'common.name' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th hideable-th="description" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="name"
|
<input type="text" pInputText formControlName="description"
|
||||||
placeholder="{{'view.server.achievements.headers.description' | translate}}">
|
placeholder="{{'common.description' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th hideable-th="attribute" [parent]="this"></th>
|
||||||
<th></th>
|
<th hideable-th="operator" [parent]="this"></th>
|
||||||
<th></th>
|
<th hideable-th="value" [parent]="this"></th>
|
||||||
<th class="table-header-small-dropdown"></th>
|
<th class="table-header-small-dropdown"></th>
|
||||||
<th class="table-header-small-dropdown"></th>
|
<th class="table-header-small-dropdown"></th>
|
||||||
<th class="table-header-actions"></th>
|
<th class="table-header-actions"></th>
|
||||||
@ -120,7 +124,7 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="body" let-achievement let-editing="editing" let-ri="rowIndex">
|
<ng-template pTemplate="body" let-achievement let-editing="editing" let-ri="rowIndex">
|
||||||
<tr [pEditableRow]="achievement">
|
<tr [pEditableRow]="achievement">
|
||||||
<td>
|
<td hideable-td="id" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{achievement.id}}
|
{{achievement.id}}
|
||||||
@ -131,7 +135,7 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="name" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText type="text" [(ngModel)]="achievement.name">
|
<input class="table-edit-input" pInputText type="text" [(ngModel)]="achievement.name">
|
||||||
@ -142,7 +146,7 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="description" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText type="text" [(ngModel)]="achievement.description">
|
<input class="table-edit-input" pInputText type="text" [(ngModel)]="achievement.description">
|
||||||
@ -153,11 +157,11 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="attribute" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<p-dropdown [options]="attributes" [(ngModel)]="achievement.attribute"
|
<p-dropdown [options]="attributes" [(ngModel)]="achievement.attribute"
|
||||||
placeholder="{{'view.server.achievements.headers.attribute' | translate}}"></p-dropdown>
|
placeholder="{{'common.attribute' | translate}}"></p-dropdown>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template pTemplate="output">
|
<ng-template pTemplate="output">
|
||||||
{{achievement.attribute}}
|
{{achievement.attribute}}
|
||||||
@ -165,10 +169,10 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="description" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<p-dropdown [options]="operators" [(ngModel)]="achievement.operator" placeholder="{{'view.server.achievements.headers.operator' | translate}}"></p-dropdown>
|
<p-dropdown [options]="operators" [(ngModel)]="achievement.operator" placeholder="{{'common.operator' | translate}}"></p-dropdown>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template pTemplate="output">
|
<ng-template pTemplate="output">
|
||||||
{{achievement.operator}}
|
{{achievement.operator}}
|
||||||
@ -176,7 +180,7 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="value" [parent]="this">
|
||||||
<p-cellEditor *ngIf="getAchievementAttributeByName(achievement.attribute)?.type === 'number'">
|
<p-cellEditor *ngIf="getAchievementAttributeByName(achievement.attribute)?.type === 'number'">
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText min="0" type="number" [(ngModel)]="achievement.value">
|
<input class="table-edit-input" pInputText min="0" type="number" [(ngModel)]="achievement.value">
|
||||||
|
@ -22,13 +22,14 @@ import { Table } from "primeng/table";
|
|||||||
import { User } from "../../../../../../models/data/user.model";
|
import { User } from "../../../../../../models/data/user.model";
|
||||||
import { AchievementMutationResult } from "../../../../../../models/graphql/result.model";
|
import { AchievementMutationResult } from "../../../../../../models/graphql/result.model";
|
||||||
import { Mutations } from "../../../../../../models/graphql/mutations.model";
|
import { Mutations } from "../../../../../../models/graphql/mutations.model";
|
||||||
|
import { ComponentWithTable } from "../../../../../../base/component-with-table";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-achievement",
|
selector: "app-achievement",
|
||||||
templateUrl: "./achievement.component.html",
|
templateUrl: "./achievement.component.html",
|
||||||
styleUrls: ["./achievement.component.scss"]
|
styleUrls: ["./achievement.component.scss"]
|
||||||
})
|
})
|
||||||
export class AchievementComponent implements OnInit, OnDestroy {
|
export class AchievementComponent extends ComponentWithTable implements OnInit, OnDestroy {
|
||||||
public achievements: Achievement[] = [];
|
public achievements: Achievement[] = [];
|
||||||
public loading = true;
|
public loading = true;
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ export class AchievementComponent implements OnInit, OnDestroy {
|
|||||||
public filterForm!: FormGroup<{
|
public filterForm!: FormGroup<{
|
||||||
id: FormControl<number | null>,
|
id: FormControl<number | null>,
|
||||||
name: FormControl<string | null>,
|
name: FormControl<string | null>,
|
||||||
|
description: FormControl<string | null>,
|
||||||
color: FormControl<string | null>,
|
color: FormControl<string | null>,
|
||||||
min_xp: FormControl<number | null>,
|
min_xp: FormControl<number | null>,
|
||||||
permissions: FormControl<string | null>,
|
permissions: FormControl<string | null>,
|
||||||
@ -79,6 +81,7 @@ export class AchievementComponent implements OnInit, OnDestroy {
|
|||||||
private data: DataService,
|
private data: DataService,
|
||||||
private sidebar: SidebarService,
|
private sidebar: SidebarService,
|
||||||
private route: ActivatedRoute) {
|
private route: ActivatedRoute) {
|
||||||
|
super("achievement", ["id", "name", "description", "attribute", "operator", "value"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnInit(): void {
|
public ngOnInit(): void {
|
||||||
@ -157,6 +160,7 @@ export class AchievementComponent implements OnInit, OnDestroy {
|
|||||||
this.filterForm = this.fb.group({
|
this.filterForm = this.fb.group({
|
||||||
id: new FormControl<number | null>(null),
|
id: new FormControl<number | null>(null),
|
||||||
name: new FormControl<string | null>(null),
|
name: new FormControl<string | null>(null),
|
||||||
|
description: new FormControl<string | null>(null),
|
||||||
color: new FormControl<string | null>(null),
|
color: new FormControl<string | null>(null),
|
||||||
min_xp: new FormControl<number | null>(null),
|
min_xp: new FormControl<number | null>(null),
|
||||||
permissions: new FormControl<string | null>(null)
|
permissions: new FormControl<string | null>(null)
|
||||||
|
@ -9,12 +9,15 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="caption">
|
<ng-template pTemplate="caption">
|
||||||
<div class="table-caption">
|
<div class="table-caption">
|
||||||
|
<div class="table-caption-table-info">
|
||||||
<div class="table-caption-text">
|
<div class="table-caption-text">
|
||||||
<ng-container *ngIf="!loading">{{rules.length}} {{'common.of' | translate}}
|
<ng-container *ngIf="!loading">{{rules.length}} {{'common.of' | translate}}
|
||||||
{{dt.totalRecords}}
|
{{dt.totalRecords}}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
{{'view.server.auto_roles.rules.auto_roles' | translate}}
|
{{'view.server.auto_roles.rules.auto_roles' | translate}}
|
||||||
</div>
|
</div>
|
||||||
|
<app-multi-select-columns [columns]="columns" [(hiddenColumns)]="hiddenColumns"></app-multi-select-columns>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="table-caption-btn-wrapper btn-wrapper">
|
<div class="table-caption-btn-wrapper btn-wrapper">
|
||||||
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
||||||
@ -29,23 +32,23 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
<th pSortableColumn="id">
|
<th hideable-th="id" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'common.id' | translate}}</div>
|
<div class="table-header-text">{{'common.id' | translate}}</div>
|
||||||
<p-sortIcon field="id" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="id" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="roleName">
|
<th hideable-th="role" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.auto_roles.rules.headers.role' | translate}}</div>
|
<div class="table-header-text">{{'common.role' | translate}}</div>
|
||||||
<p-sortIcon field="roleName" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="roleName" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th>
|
<th hideable-th="emoji" [parent]="this">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.auto_roles.rules.headers.emoji' | translate}}</div>
|
<div class="table-header-text">{{'common.emoji' | translate}}</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
@ -69,17 +72,17 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="table-header-small">
|
<th hideable-th="id" [parent]="this" class="table-header-small">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="id" placeholder="{{'common.id' | translate}}">
|
<input type="text" pInputText formControlName="id" placeholder="{{'common.id' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th hideable-th="role" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="roleId" placeholder="{{'view.server.auto_roles.rules.headers.role' | translate}}">
|
<input type="text" pInputText formControlName="roleId" placeholder="{{'common.role' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th hideable-th="emoji" [parent]="this"></th>
|
||||||
<th class="table-header-small-dropdown"></th>
|
<th class="table-header-small-dropdown"></th>
|
||||||
<th class="table-header-small-dropdown"></th>
|
<th class="table-header-small-dropdown"></th>
|
||||||
<th class="table-header-actions"></th>
|
<th class="table-header-actions"></th>
|
||||||
@ -88,7 +91,7 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="body" let-autoRoleRule let-editing="editing" let-ri="rowIndex">
|
<ng-template pTemplate="body" let-autoRoleRule let-editing="editing" let-ri="rowIndex">
|
||||||
<tr [pEditableRow]="autoRoleRule">
|
<tr [pEditableRow]="autoRoleRule">
|
||||||
<td>
|
<td hideable-td="id" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{autoRoleRule.id}}
|
{{autoRoleRule.id}}
|
||||||
@ -99,11 +102,11 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="role" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<p-dropdown [options]="roles" optionValue="value.id" [(ngModel)]="autoRoleRule.roleId"
|
<p-dropdown [options]="roles" optionValue="value.id" [(ngModel)]="autoRoleRule.roleId"
|
||||||
placeholder="{{'view.server.auto_roles.rules.headers.role' | translate}}"></p-dropdown>
|
placeholder="{{'common.role' | translate}}"></p-dropdown>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template pTemplate="output">
|
<ng-template pTemplate="output">
|
||||||
{{autoRoleRule.roleName}}
|
{{autoRoleRule.roleName}}
|
||||||
@ -111,11 +114,11 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="emoji" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<p-dropdown [options]="emojis" optionValue="value.name" [(ngModel)]="autoRoleRule.emojiName"
|
<p-dropdown [options]="emojis" optionValue="value.name" [(ngModel)]="autoRoleRule.emojiName"
|
||||||
placeholder="{{'view.server.auto_roles.rules.headers.emoji' | translate}}">
|
placeholder="{{'common.emoji' | translate}}">
|
||||||
<ng-template pTemplate="selectedItem">
|
<ng-template pTemplate="selectedItem">
|
||||||
<div class="dropdown-icon-label-wrapper" *ngIf="autoRoleRule.emojiName">
|
<div class="dropdown-icon-label-wrapper" *ngIf="autoRoleRule.emojiName">
|
||||||
<p-image [src]="getEmojiUrl(autoRoleRule.emojiName)" [alt]="autoRoleRule.emojiName" width="25"></p-image>
|
<p-image [src]="getEmojiUrl(autoRoleRule.emojiName)" [alt]="autoRoleRule.emojiName" width="25"></p-image>
|
||||||
|
@ -22,13 +22,14 @@ import { Table } from "primeng/table";
|
|||||||
import { AutoRoleMutationResult, AutoRoleRuleMutationResult } from "../../../../../../models/graphql/result.model";
|
import { AutoRoleMutationResult, AutoRoleRuleMutationResult } from "../../../../../../models/graphql/result.model";
|
||||||
import { Mutations } from "../../../../../../models/graphql/mutations.model";
|
import { Mutations } from "../../../../../../models/graphql/mutations.model";
|
||||||
import { Subject, throwError } from "rxjs";
|
import { Subject, throwError } from "rxjs";
|
||||||
|
import { ComponentWithTable } from "../../../../../../base/component-with-table";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-auto-roles-rules",
|
selector: "app-auto-roles-rules",
|
||||||
templateUrl: "./auto-roles-rules.component.html",
|
templateUrl: "./auto-roles-rules.component.html",
|
||||||
styleUrls: ["./auto-roles-rules.component.scss"]
|
styleUrls: ["./auto-roles-rules.component.scss"]
|
||||||
})
|
})
|
||||||
export class AutoRolesRulesComponent implements OnInit, OnDestroy {
|
export class AutoRolesRulesComponent extends ComponentWithTable implements OnInit, OnDestroy {
|
||||||
|
|
||||||
rules: AutoRoleRule[] = [];
|
rules: AutoRoleRule[] = [];
|
||||||
guild: Guild = { channels: [], emojis: [], roles: [] };
|
guild: Guild = { channels: [], emojis: [], roles: [] };
|
||||||
@ -80,6 +81,7 @@ export class AutoRolesRulesComponent implements OnInit, OnDestroy {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router
|
private router: Router
|
||||||
) {
|
) {
|
||||||
|
super('auto-role-rules', ['id', 'role', 'emoji']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getEmojiUrl(name: string): string {
|
public getEmojiUrl(name: string): string {
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="caption">
|
<ng-template pTemplate="caption">
|
||||||
<div class="table-caption">
|
<div class="table-caption">
|
||||||
|
<div class="table-caption-table-info">
|
||||||
<div class="table-caption-text">
|
<div class="table-caption-text">
|
||||||
<ng-container *ngIf="!loading">{{auto_roles.length}} {{'common.of' | translate}}
|
<ng-container *ngIf="!loading">{{auto_roles.length}} {{'common.of' | translate}}
|
||||||
{{dt.totalRecords}}
|
{{dt.totalRecords}}
|
||||||
@ -16,6 +17,9 @@
|
|||||||
{{'view.server.auto_roles.auto_roles' | translate}}
|
{{'view.server.auto_roles.auto_roles' | translate}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<app-multi-select-columns [columns]="columns" [(hiddenColumns)]="hiddenColumns"></app-multi-select-columns>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="table-caption-btn-wrapper btn-wrapper">
|
<div class="table-caption-btn-wrapper btn-wrapper">
|
||||||
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
||||||
icon="pi pi-user-plus" (click)="addAutoRole(dt)" [disabled]="isEditingNew">
|
icon="pi pi-user-plus" (click)="addAutoRole(dt)" [disabled]="isEditingNew">
|
||||||
@ -29,37 +33,37 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
<th pSortableColumn="id">
|
<th hideable-th="id" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'common.id' | translate}}</div>
|
<div class="table-header-text">{{'common.id' | translate}}</div>
|
||||||
<p-sortIcon field="id" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="id" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="discordChannelId">
|
<th hideable-th="channel_id" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.auto_roles.headers.channel_id' | translate}}</div>
|
<div class="table-header-text">{{'common.channel_id' | translate}}</div>
|
||||||
<p-sortIcon field="discordChannelId" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="channel_id" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="discordChannelName">
|
<th hideable-th="channel_name" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.auto_roles.headers.channel_name' | translate}}</div>
|
<div class="table-header-text">{{'common.channel_name' | translate}}</div>
|
||||||
<p-sortIcon field="discordChannelName" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="channel_name" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="discordMessageId">
|
<th hideable-th="message_id" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.auto_roles.headers.message_id' | translate}}</div>
|
<div class="table-header-text">{{'common.message_id' | translate}}</div>
|
||||||
<p-sortIcon field="discordMessageId" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="message_id" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th>
|
<th hideable-th="rule_count" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.auto_roles.headers.role_count' | translate}}</div>
|
<div class="table-header-text">{{'common.rule_count' | translate}}</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
@ -83,27 +87,27 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="table-header-small">
|
<th hideable-th="id" [parent]="this" class="table-header-small">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="id" placeholder="{{'common.id' | translate}}">
|
<input type="text" pInputText formControlName="id" placeholder="{{'common.id' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th hideable-th="channel_id" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="channelId" placeholder="{{'view.server.auto_roles.headers.channel_id' | translate}}">
|
<input type="text" pInputText formControlName="channelId" placeholder="{{'common.channel_id' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th hideable-th="channel_name" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="channelName" placeholder="{{'view.server.auto_roles.headers.channel_name' | translate}}">
|
<input type="text" pInputText formControlName="channelName" placeholder="{{'common.channel_name' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th hideable-th="message_id" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="messageId" placeholder="{{'view.server.auto_roles.headers.message_id' | translate}}">
|
<input type="text" pInputText formControlName="messageId" placeholder="{{'common.message_id' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th hideable-th="rule_count" [parent]="this"></th>
|
||||||
<th class="table-header-small-dropdown"></th>
|
<th class="table-header-small-dropdown"></th>
|
||||||
<th class="table-header-small-dropdown"></th>
|
<th class="table-header-small-dropdown"></th>
|
||||||
<th class="table-header-actions"></th>
|
<th class="table-header-actions"></th>
|
||||||
@ -112,7 +116,7 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="body" let-autoRole let-editing="editing" let-ri="rowIndex">
|
<ng-template pTemplate="body" let-autoRole let-editing="editing" let-ri="rowIndex">
|
||||||
<tr [pEditableRow]="autoRole">
|
<tr [pEditableRow]="autoRole">
|
||||||
<td>
|
<td hideable-td="id" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{autoRole.id}}
|
{{autoRole.id}}
|
||||||
@ -123,11 +127,11 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="channel_id" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<p-dropdown [options]="channels" optionValue="value.id" [(ngModel)]="autoRole.channelId"
|
<p-dropdown [options]="channels" optionValue="value.id" [(ngModel)]="autoRole.channelId"
|
||||||
placeholder="{{'view.server.auto_roles.headers.channel_id' | translate}}"></p-dropdown>
|
placeholder="{{'common.channel_id' | translate}}"></p-dropdown>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template pTemplate="output">
|
<ng-template pTemplate="output">
|
||||||
{{autoRole.channelId}}
|
{{autoRole.channelId}}
|
||||||
@ -135,7 +139,7 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="channel_name" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{autoRole.channelName}}
|
{{autoRole.channelName}}
|
||||||
@ -146,7 +150,7 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="message_id" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input pInputText class="table-edit-input" [(ngModel)]="autoRole.messageId">
|
<input pInputText class="table-edit-input" [(ngModel)]="autoRole.messageId">
|
||||||
@ -157,7 +161,7 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-td="rule_count" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{autoRole.autoRoleRuleCount}}
|
{{autoRole.autoRoleRuleCount}}
|
||||||
|
@ -22,13 +22,14 @@ import { Subject, throwError } from "rxjs";
|
|||||||
import { AutoRole, AutoRoleFilter } from "../../../../../../models/data/auto_role.model";
|
import { AutoRole, AutoRoleFilter } from "../../../../../../models/data/auto_role.model";
|
||||||
import { ChannelType, Guild } from "../../../../../../models/data/discord.model";
|
import { ChannelType, Guild } from "../../../../../../models/data/discord.model";
|
||||||
import { Server } from "../../../../../../models/data/server.model";
|
import { Server } from "../../../../../../models/data/server.model";
|
||||||
|
import { ComponentWithTable } from "../../../../../../base/component-with-table";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-auto-roles",
|
selector: "app-auto-roles",
|
||||||
templateUrl: "./auto-roles.component.html",
|
templateUrl: "./auto-roles.component.html",
|
||||||
styleUrls: ["./auto-roles.component.scss"]
|
styleUrls: ["./auto-roles.component.scss"]
|
||||||
})
|
})
|
||||||
export class AutoRolesComponent implements OnInit, OnDestroy {
|
export class AutoRolesComponent extends ComponentWithTable implements OnInit, OnDestroy {
|
||||||
auto_roles: AutoRole[] = [];
|
auto_roles: AutoRole[] = [];
|
||||||
guild: Guild = { channels: [], emojis: [], roles: [] };
|
guild: Guild = { channels: [], emojis: [], roles: [] };
|
||||||
channels: MenuItem[] = [];
|
channels: MenuItem[] = [];
|
||||||
@ -76,6 +77,7 @@ export class AutoRolesComponent implements OnInit, OnDestroy {
|
|||||||
private sidebar: SidebarService,
|
private sidebar: SidebarService,
|
||||||
private route: ActivatedRoute
|
private route: ActivatedRoute
|
||||||
) {
|
) {
|
||||||
|
super('auto-role', ['id', 'channel_id', 'channel_name', 'message_id', 'rule_count'])
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnInit(): void {
|
public ngOnInit(): void {
|
||||||
|
@ -110,7 +110,7 @@ export class ConfigComponent implements OnInit {
|
|||||||
return throwError(err);
|
return throwError(err);
|
||||||
})).subscribe(result => {
|
})).subscribe(result => {
|
||||||
this.spinner.hideSpinner();
|
this.spinner.hideSpinner();
|
||||||
this.toastService.success(this.translate.instant("view.server.config.message.server_config_create"), this.translate.instant("view.server.config.message.server_config_create_d"));
|
this.toastService.success(this.translate.instant("view.server.config.message.server#_config_create"), this.translate.instant("view.server.config.message.server_config_create_d"));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="caption">
|
<ng-template pTemplate="caption">
|
||||||
<div class="table-caption">
|
<div class="table-caption">
|
||||||
|
<div class="table-caption-table-info">
|
||||||
<div class="table-caption-text">
|
<div class="table-caption-text">
|
||||||
<ng-container *ngIf="!loading">{{levels.length}} {{'common.of' | translate}}
|
<ng-container *ngIf="!loading">{{levels.length}} {{'common.of' | translate}}
|
||||||
{{dt.totalRecords}}
|
{{dt.totalRecords}}
|
||||||
@ -16,6 +17,9 @@
|
|||||||
{{'view.server.levels.levels' | translate}}
|
{{'view.server.levels.levels' | translate}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<app-multi-select-columns [columns]="columns" [(hiddenColumns)]="hiddenColumns"></app-multi-select-columns>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="table-caption-btn-wrapper btn-wrapper">
|
<div class="table-caption-btn-wrapper btn-wrapper">
|
||||||
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
<button pButton label="{{'common.add' | translate}}" class="icon-btn btn"
|
||||||
icon="pi pi-user-plus" (click)="addLevel(dt)" [disabled]="isEditingNew || user?.isModerator && !user?.isAdmin">
|
icon="pi pi-user-plus" (click)="addLevel(dt)" [disabled]="isEditingNew || user?.isModerator && !user?.isAdmin">
|
||||||
@ -29,37 +33,37 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
<th pSortableColumn="id">
|
<th hideable-th="id" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'common.id' | translate}}</div>
|
<div class="table-header-text">{{'common.id' | translate}}</div>
|
||||||
<p-sortIcon field="id" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="id" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="name">
|
<th hideable-th="name" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.levels.headers.name' | translate}}</div>
|
<div class="table-header-text">{{'common.name' | translate}}</div>
|
||||||
<p-sortIcon field="name" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="name" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="color">
|
<th hideable-th="color" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.levels.headers.color' | translate}}</div>
|
<div class="table-header-text">{{'common.color' | translate}}</div>
|
||||||
<p-sortIcon field="color" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="color" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="minXp">
|
<th hideable-th="min_xp" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.levels.headers.min_xp' | translate}}</div>
|
<div class="table-header-text">{{'common.min_xp' | translate}}</div>
|
||||||
<p-sortIcon field="minXp" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="minXp" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="permissions">
|
<th hideable-th="permissions" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.levels.headers.permissions' | translate}}</div>
|
<div class="table-header-text">{{'common.permissions' | translate}}</div>
|
||||||
<p-sortIcon field="permissions" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="permissions" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
@ -84,21 +88,21 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="table-header-small">
|
<th hideable-th="id" [parent]="this" class="table-header-small">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="id"
|
<input type="text" pInputText formControlName="id"
|
||||||
placeholder="{{'common.id' | translate}}">
|
placeholder="{{'common.id' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th hideable-th="name" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="name"
|
<input type="text" pInputText formControlName="name"
|
||||||
placeholder="{{'view.server.levels.headers.name' | translate}}">
|
placeholder="{{'common.name' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th hideable-th="color" [parent]="this"></th>
|
||||||
<th></th>
|
<th hideable-th="min_xp" [parent]="this"></th>
|
||||||
<th></th>
|
<th hideable-th="permissions" [parent]="this"></th>
|
||||||
<th class="table-header-small-dropdown"></th>
|
<th class="table-header-small-dropdown"></th>
|
||||||
<th class="table-header-small-dropdown"></th>
|
<th class="table-header-small-dropdown"></th>
|
||||||
<th class="table-header-actions"></th>
|
<th class="table-header-actions"></th>
|
||||||
@ -107,7 +111,7 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="body" let-level let-editing="editing" let-ri="rowIndex">
|
<ng-template pTemplate="body" let-level let-editing="editing" let-ri="rowIndex">
|
||||||
<tr [pEditableRow]="level">
|
<tr [pEditableRow]="level">
|
||||||
<td>
|
<td hideable-th="id" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{level.id}}
|
{{level.id}}
|
||||||
@ -118,7 +122,7 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-th="name" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText type="text" [(ngModel)]="level.name">
|
<input class="table-edit-input" pInputText type="text" [(ngModel)]="level.name">
|
||||||
@ -129,7 +133,7 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-th="color" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText type="text" [(ngModel)]="level.color">
|
<input class="table-edit-input" pInputText type="text" [(ngModel)]="level.color">
|
||||||
@ -140,7 +144,7 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-th="min_xp" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText min="0" type="number" [(ngModel)]="level.minXp">
|
<input class="table-edit-input" pInputText min="0" type="number" [(ngModel)]="level.minXp">
|
||||||
@ -151,7 +155,7 @@
|
|||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td hideable-th="permissions" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<input class="table-edit-input" pInputText min="0" type="text" [(ngModel)]="level.permissions">
|
<input class="table-edit-input" pInputText min="0" type="text" [(ngModel)]="level.permissions">
|
||||||
|
@ -22,14 +22,14 @@ import { Mutations } from "../../../../../../models/graphql/mutations.model";
|
|||||||
import { Subject, throwError } from "rxjs";
|
import { Subject, throwError } from "rxjs";
|
||||||
import { Server } from "../../../../../../models/data/server.model";
|
import { Server } from "../../../../../../models/data/server.model";
|
||||||
import { UserDTO } from "../../../../../../models/auth/auth-user.dto";
|
import { UserDTO } from "../../../../../../models/auth/auth-user.dto";
|
||||||
|
import { ComponentWithTable } from "../../../../../../base/component-with-table";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-levels",
|
selector: "app-levels",
|
||||||
templateUrl: "./levels.component.html",
|
templateUrl: "./levels.component.html",
|
||||||
styleUrls: ["./levels.component.scss"]
|
styleUrls: ["./levels.component.scss"]
|
||||||
})
|
})
|
||||||
export class LevelsComponent implements OnInit, OnDestroy {
|
export class LevelsComponent extends ComponentWithTable implements OnInit, OnDestroy {
|
||||||
|
|
||||||
public levels: Level[] = [];
|
public levels: Level[] = [];
|
||||||
public loading = true;
|
public loading = true;
|
||||||
|
|
||||||
@ -72,7 +72,9 @@ export class LevelsComponent implements OnInit, OnDestroy {
|
|||||||
private translate: TranslateService,
|
private translate: TranslateService,
|
||||||
private data: DataService,
|
private data: DataService,
|
||||||
private sidebar: SidebarService,
|
private sidebar: SidebarService,
|
||||||
private route: ActivatedRoute) {
|
private route: ActivatedRoute
|
||||||
|
) {
|
||||||
|
super("level", ["id", "name", "color", "min_xp", "permissions"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnInit(): void {
|
public ngOnInit(): void {
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="caption">
|
<ng-template pTemplate="caption">
|
||||||
<div class="table-caption">
|
<div class="table-caption">
|
||||||
|
<div class="table-caption-table-info">
|
||||||
<div class="table-caption-text">
|
<div class="table-caption-text">
|
||||||
<ng-container *ngIf="!loading">{{members.length}} {{'common.of' | translate}}
|
<ng-container *ngIf="!loading">{{members.length}} {{'common.of' | translate}}
|
||||||
{{dt.totalRecords}}
|
{{dt.totalRecords}}
|
||||||
@ -16,6 +17,9 @@
|
|||||||
{{'view.server.members.members' | translate}}
|
{{'view.server.members.members' | translate}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<app-multi-select-columns [columns]="columns" [(hiddenColumns)]="hiddenColumns"></app-multi-select-columns>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="table-caption-btn-wrapper btn-wrapper">
|
<div class="table-caption-btn-wrapper btn-wrapper">
|
||||||
<button pButton label="{{'common.reset_filters' | translate}}" icon="pi pi-undo"
|
<button pButton label="{{'common.reset_filters' | translate}}" icon="pi pi-undo"
|
||||||
class="icon-btn btn" (click)="resetFilters()">
|
class="icon-btn btn" (click)="resetFilters()">
|
||||||
@ -26,51 +30,51 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="header">
|
<ng-template pTemplate="header">
|
||||||
<tr>
|
<tr>
|
||||||
<th pSortableColumn="id">
|
<th hideable-th="id" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'common.id' | translate}}</div>
|
<div class="table-header-text">{{'common.id' | translate}}</div>
|
||||||
<p-sortIcon field="id" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="id" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="discordId">
|
<th hideable-th="discord_id" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'common.discord_id' | translate}}</div>
|
<div class="table-header-text">{{'common.discord_id' | translate}}</div>
|
||||||
<p-sortIcon field="discordId" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="discordId" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="name">
|
<th hideable-th="name" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.members.headers.name' | translate}}</div>
|
<div class="table-header-text">{{'common.name' | translate}}</div>
|
||||||
<p-sortIcon field="name" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="name" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="xp">
|
<th hideable-th="xp" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.members.headers.xp' | translate}}</div>
|
<div class="table-header-text">{{'common.xp' | translate}}</div>
|
||||||
<p-sortIcon field="xp" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="xp" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="ontime">
|
<th hideable-th="ontime" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.members.headers.ontime' | translate}}</div>
|
<div class="table-header-text">{{'common.ontime' | translate}}</div>
|
||||||
<p-sortIcon field="ontime" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="ontime" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="leftServer">
|
<th hideable-th="left_server" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.members.headers.left_server' | translate}}</div>
|
<div class="table-header-text">{{'common.left_server' | translate}}</div>
|
||||||
<p-sortIcon field="leftServer" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="leftServer" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
<th pSortableColumn="level.name">
|
<th hideable-th="level" [parent]="this" [sortable]="true">
|
||||||
<div class="table-header-label">
|
<div class="table-header-label">
|
||||||
<div class="table-header-text">{{'view.server.members.headers.level' | translate}}</div>
|
<div class="table-header-text">{{'common.level' | translate}}</div>
|
||||||
<p-sortIcon field="level.name" class="table-header-icon"></p-sortIcon>
|
<p-sortIcon field="level.name" class="table-header-icon"></p-sortIcon>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
@ -95,31 +99,31 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="table-header-small">
|
<th hideable-th="id" [parent]="this" class="table-header-small">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="id" placeholder="{{'common.id' | translate}}">
|
<input type="text" pInputText formControlName="id" placeholder="{{'common.id' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th class="table-header-medium">
|
<th hideable-th="discord_id" [parent]="this" class="table-header-medium">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="discordId" placeholder="{{'common.discord_id' | translate}}">
|
<input type="text" pInputText formControlName="discordId" placeholder="{{'common.discord_id' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th hideable-th="name" [parent]="this">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<input type="text" pInputText formControlName="name" placeholder="{{'view.server.members.headers.name' | translate}}">
|
<input type="text" pInputText formControlName="name" placeholder="{{'common.name' | translate}}">
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th hideable-th="xp" [parent]="this"></th>
|
||||||
<th></th>
|
<th hideable-th="ontime" [parent]="this"></th>
|
||||||
<th class="table-header-small-dropdown">
|
<th hideable-th="left_server" [parent]="this" class="table-header-small-dropdown">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<p-dropdown formControlName="leftServer" [options]="leftServerOptions" placeholder="{{'view.server.members.headers.left_server' | translate}}"></p-dropdown>
|
<p-dropdown formControlName="leftServer" [options]="leftServerOptions" placeholder="{{'common.left_server' | translate}}"></p-dropdown>
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th class="table-header-small-dropdown">
|
<th hideable-th="level" [parent]="this" class="table-header-small-dropdown">
|
||||||
<form [formGroup]="filterForm">
|
<form [formGroup]="filterForm">
|
||||||
<p-dropdown formControlName="level" [options]="levels" placeholder="{{'view.server.members.headers.level' | translate}}"></p-dropdown>
|
<p-dropdown formControlName="level" [options]="levels" placeholder="{{'common.level' | translate}}"></p-dropdown>
|
||||||
</form>
|
</form>
|
||||||
</th>
|
</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
@ -130,7 +134,7 @@
|
|||||||
|
|
||||||
<ng-template pTemplate="body" let-member let-editing="editing" let-ri="rowIndex">
|
<ng-template pTemplate="body" let-member let-editing="editing" let-ri="rowIndex">
|
||||||
<tr [pEditableRow]="member">
|
<tr [pEditableRow]="member">
|
||||||
<td>
|
<td hideable-th="id" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{member.id}}
|
{{member.id}}
|
||||||
@ -140,7 +144,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-th="discord_id" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{member.discordId}}
|
{{member.discordId}}
|
||||||
@ -150,7 +154,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-th="name" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{member.name}}
|
{{member.name}}
|
||||||
@ -160,7 +164,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-th="xp" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<p-inputNumber class="table-edit-input" styleClass="input-number" [(ngModel)]="member.xp" mode="decimal" [min]="0" [useGrouping]="false" [showButtons]="true"
|
<p-inputNumber class="table-edit-input" styleClass="input-number" [(ngModel)]="member.xp" mode="decimal" [min]="0" [useGrouping]="false" [showButtons]="true"
|
||||||
@ -172,7 +176,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-th="ontime" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{member.ontime}}
|
{{member.ontime}}
|
||||||
@ -182,7 +186,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-th="left_server" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
{{!member.leftServer | bool}}
|
{{!member.leftServer | bool}}
|
||||||
@ -192,10 +196,10 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</p-cellEditor>
|
</p-cellEditor>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td hideable-th="level" [parent]="this">
|
||||||
<p-cellEditor>
|
<p-cellEditor>
|
||||||
<ng-template pTemplate="input">
|
<ng-template pTemplate="input">
|
||||||
<p-dropdown [options]="levels" [(ngModel)]="member.level" placeholder="{{'view.server.members.headers.level' | translate}}"></p-dropdown>
|
<p-dropdown [options]="levels" [(ngModel)]="member.level" placeholder="{{'common.level' | translate}}"></p-dropdown>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template pTemplate="output">
|
<ng-template pTemplate="output">
|
||||||
{{member.level.name}}
|
{{member.level.name}}
|
||||||
|
@ -20,19 +20,17 @@ import { UpdateUserMutationResult } from "../../../../models/graphql/result.mode
|
|||||||
import { ActivatedRoute } from "@angular/router";
|
import { ActivatedRoute } from "@angular/router";
|
||||||
import { Level } from "../../../../models/data/level.model";
|
import { Level } from "../../../../models/data/level.model";
|
||||||
import { Server } from "../../../../models/data/server.model";
|
import { Server } from "../../../../models/data/server.model";
|
||||||
|
import { ComponentWithTable } from "../../../../base/component-with-table";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-members",
|
selector: "app-members",
|
||||||
templateUrl: "./members.component.html",
|
templateUrl: "./members.component.html",
|
||||||
styleUrls: ["./members.component.scss"]
|
styleUrls: ["./members.component.scss"]
|
||||||
})
|
})
|
||||||
export class MembersComponent implements OnInit, OnDestroy {
|
export class MembersComponent extends ComponentWithTable implements OnInit, OnDestroy {
|
||||||
members!: User[];
|
members!: User[];
|
||||||
levels!: MenuItem[];
|
levels!: MenuItem[];
|
||||||
leftServerOptions = [
|
leftServerOptions: { label: string; value: boolean; }[] = [];
|
||||||
{ label: this.translate.instant("common.bool_as_string.true"), value: false },
|
|
||||||
{ label: this.translate.instant("common.bool_as_string.false"), value: true }
|
|
||||||
];
|
|
||||||
loading = true;
|
loading = true;
|
||||||
|
|
||||||
clonedUsers: { [s: string]: User; } = {};
|
clonedUsers: { [s: string]: User; } = {};
|
||||||
@ -93,6 +91,7 @@ export class MembersComponent implements OnInit, OnDestroy {
|
|||||||
private data: DataService,
|
private data: DataService,
|
||||||
private route: ActivatedRoute
|
private route: ActivatedRoute
|
||||||
) {
|
) {
|
||||||
|
super("member", ["id", "discord_id", "name", "xp", "ontime", "left_server", "level"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
@ -112,9 +111,14 @@ export class MembersComponent implements OnInit, OnDestroy {
|
|||||||
return { label: level.name, value: level };
|
return { label: level.name, value: level };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
this.leftServerOptions = [
|
||||||
|
{ label: this.translate.instant("common.bool_as_string.true"), value: false },
|
||||||
|
{ label: this.translate.instant("common.bool_as_string.false"), value: true }
|
||||||
|
];
|
||||||
this.loadNextPage();
|
this.loadNextPage();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnDestroy(): void {
|
public ngOnDestroy(): void {
|
||||||
this.unsubscriber.next();
|
this.unsubscriber.next();
|
||||||
this.unsubscriber.complete();
|
this.unsubscriber.complete();
|
||||||
|
@ -2,15 +2,6 @@
|
|||||||
"admin": {
|
"admin": {
|
||||||
"auth_users": {
|
"auth_users": {
|
||||||
"header": "Benutzer",
|
"header": "Benutzer",
|
||||||
"headers": {
|
|
||||||
"active": "Aktiv",
|
|
||||||
"auth_role": "Rolle",
|
|
||||||
"first_name": "Vorname",
|
|
||||||
"last_name": "Nachname",
|
|
||||||
"password": "Passwort",
|
|
||||||
"role": "Rolle",
|
|
||||||
"users": "Benutzer"
|
|
||||||
},
|
|
||||||
"message": {
|
"message": {
|
||||||
"cannot_delete_user": "Benutzer kann nicht gelöscht werden",
|
"cannot_delete_user": "Benutzer kann nicht gelöscht werden",
|
||||||
"invalid_email": "Ungültige E-Mail",
|
"invalid_email": "Ungültige E-Mail",
|
||||||
@ -133,15 +124,25 @@
|
|||||||
"common": {
|
"common": {
|
||||||
"404": "404 - Der Eintrag konnte nicht gefunden werden",
|
"404": "404 - Der Eintrag konnte nicht gefunden werden",
|
||||||
"actions": "Aktionen",
|
"actions": "Aktionen",
|
||||||
|
"active": "Aktiv",
|
||||||
"add": "Hinzufügen",
|
"add": "Hinzufügen",
|
||||||
|
"attribute": "Attribut",
|
||||||
|
"auth_role": "Rolle",
|
||||||
"bool_as_string": {
|
"bool_as_string": {
|
||||||
"false": "Nein",
|
"false": "Nein",
|
||||||
"true": "Ja"
|
"true": "Ja"
|
||||||
},
|
},
|
||||||
|
"channel_id": "Kanal Id",
|
||||||
|
"channel_name": "Kanal",
|
||||||
|
"color": "Farbe",
|
||||||
"created_at": "Erstellt am",
|
"created_at": "Erstellt am",
|
||||||
|
"description": "Beschreibung",
|
||||||
"discord_id": "Discord Id",
|
"discord_id": "Discord Id",
|
||||||
"email": "E-Mail",
|
"email": "E-Mail",
|
||||||
|
"emoji": "Emoji",
|
||||||
"error": "Fehler",
|
"error": "Fehler",
|
||||||
|
"first_name": "Vorname",
|
||||||
|
"hidden_columns": "Ausgeblendete Spalten",
|
||||||
"history": {
|
"history": {
|
||||||
"attribute": "Attribut",
|
"attribute": "Attribut",
|
||||||
"autoRole": "Auto Rolle",
|
"autoRole": "Auto Rolle",
|
||||||
@ -167,13 +168,27 @@
|
|||||||
},
|
},
|
||||||
"id": "Id",
|
"id": "Id",
|
||||||
"joined_at": "Beigetreten am",
|
"joined_at": "Beigetreten am",
|
||||||
|
"last_name": "Nachname",
|
||||||
"leaved_at": "Verlassen am",
|
"leaved_at": "Verlassen am",
|
||||||
|
"left_server": "Aktiv",
|
||||||
|
"level": "Level",
|
||||||
|
"message_id": "Nachricht Id",
|
||||||
|
"min_xp": "Min. XP",
|
||||||
"modified_at": "Bearbeitet am",
|
"modified_at": "Bearbeitet am",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"no_entries_found": "Keine Einträge gefunden",
|
"no_entries_found": "Keine Einträge gefunden",
|
||||||
"of": "von",
|
"of": "von",
|
||||||
|
"ontime": "Ontime",
|
||||||
|
"operator": "Operator",
|
||||||
|
"password": "Passwort",
|
||||||
|
"permissions": "Rechte",
|
||||||
"reset_filters": "Filter zurücksetzen",
|
"reset_filters": "Filter zurücksetzen",
|
||||||
"save": "Speichern"
|
"role": "Rolle",
|
||||||
|
"rule_count": "Regeln",
|
||||||
|
"save": "Speichern",
|
||||||
|
"users": "Benutzer",
|
||||||
|
"value": "Wert",
|
||||||
|
"xp": "XP"
|
||||||
},
|
},
|
||||||
"dialog": {
|
"dialog": {
|
||||||
"abort": "Abbrechen",
|
"abort": "Abbrechen",
|
||||||
@ -338,13 +353,6 @@
|
|||||||
"achievements": {
|
"achievements": {
|
||||||
"achievements": "Errungenschaften",
|
"achievements": "Errungenschaften",
|
||||||
"header": "Errungenschaften",
|
"header": "Errungenschaften",
|
||||||
"headers": {
|
|
||||||
"attribute": "Attribut",
|
|
||||||
"description": "Beschreibung",
|
|
||||||
"name": "Name",
|
|
||||||
"operator": "Operator",
|
|
||||||
"value": "Wert"
|
|
||||||
},
|
|
||||||
"message": {
|
"message": {
|
||||||
"achievement_create": "Errungenschaft erstellt",
|
"achievement_create": "Errungenschaft erstellt",
|
||||||
"achievement_create_d": "Errungenschaft {{name}} erfolgreich erstellt",
|
"achievement_create_d": "Errungenschaft {{name}} erfolgreich erstellt",
|
||||||
@ -365,12 +373,6 @@
|
|||||||
"auto_roles": {
|
"auto_roles": {
|
||||||
"auto_roles": "Auto Rollen",
|
"auto_roles": "Auto Rollen",
|
||||||
"header": "Auto Rollen",
|
"header": "Auto Rollen",
|
||||||
"headers": {
|
|
||||||
"channel_id": "Kanal Id",
|
|
||||||
"channel_name": "Kanal",
|
|
||||||
"message_id": "Nachricht Id",
|
|
||||||
"role_count": "Regeln"
|
|
||||||
},
|
|
||||||
"message": {
|
"message": {
|
||||||
"auto_role_create": "Auto Rolle erstellt",
|
"auto_role_create": "Auto Rolle erstellt",
|
||||||
"auto_role_create_d": "Auto Rolle {{id}} erfolgreich erstellt",
|
"auto_role_create_d": "Auto Rolle {{id}} erfolgreich erstellt",
|
||||||
@ -386,10 +388,6 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"auto_roles": "Auto Rollen Regeln",
|
"auto_roles": "Auto Rollen Regeln",
|
||||||
"header": "Auto Rollen Regeln",
|
"header": "Auto Rollen Regeln",
|
||||||
"headers": {
|
|
||||||
"emoji": "Emoji",
|
|
||||||
"role": "Rolle"
|
|
||||||
},
|
|
||||||
"message": {
|
"message": {
|
||||||
"auto_role_rule_create": "Auto Rollen Regel erstellt",
|
"auto_role_rule_create": "Auto Rollen Regel erstellt",
|
||||||
"auto_role_rule_create_d": "Auto Rollen Regel {{id}} erfolgreich erstellt",
|
"auto_role_rule_create_d": "Auto Rollen Regel {{id}} erfolgreich erstellt",
|
||||||
@ -446,12 +444,6 @@
|
|||||||
"header": "Server",
|
"header": "Server",
|
||||||
"levels": {
|
"levels": {
|
||||||
"header": "Level",
|
"header": "Level",
|
||||||
"headers": {
|
|
||||||
"color": "Farbe",
|
|
||||||
"min_xp": "Min. XP",
|
|
||||||
"name": "Name",
|
|
||||||
"permissions": "Rechte"
|
|
||||||
},
|
|
||||||
"levels": "Level",
|
"levels": "Level",
|
||||||
"message": {
|
"message": {
|
||||||
"level_create": "Level erstellt",
|
"level_create": "Level erstellt",
|
||||||
@ -472,13 +464,6 @@
|
|||||||
},
|
},
|
||||||
"members": {
|
"members": {
|
||||||
"header": "Mitglieder",
|
"header": "Mitglieder",
|
||||||
"headers": {
|
|
||||||
"left_server": "Aktiv",
|
|
||||||
"level": "Level",
|
|
||||||
"name": "Name",
|
|
||||||
"ontime": "Ontime",
|
|
||||||
"xp": "XP"
|
|
||||||
},
|
|
||||||
"members": "Mitgliedern",
|
"members": "Mitgliedern",
|
||||||
"message": {
|
"message": {
|
||||||
"user_change_failed": "Benutzeränderung fehlgeschlagen",
|
"user_change_failed": "Benutzeränderung fehlgeschlagen",
|
||||||
|
@ -2,15 +2,6 @@
|
|||||||
"admin": {
|
"admin": {
|
||||||
"auth_users": {
|
"auth_users": {
|
||||||
"header": "User",
|
"header": "User",
|
||||||
"headers": {
|
|
||||||
"active": "Active",
|
|
||||||
"auth_role": "Role",
|
|
||||||
"first_name": "First name",
|
|
||||||
"last_name": "Last name",
|
|
||||||
"password": "Password",
|
|
||||||
"role": "Role",
|
|
||||||
"users": "User"
|
|
||||||
},
|
|
||||||
"message": {
|
"message": {
|
||||||
"cannot_delete_user": "User cannot be deleted",
|
"cannot_delete_user": "User cannot be deleted",
|
||||||
"invalid_email": "Invalid E-Mail",
|
"invalid_email": "Invalid E-Mail",
|
||||||
@ -133,15 +124,25 @@
|
|||||||
"common": {
|
"common": {
|
||||||
"404": "404 - Entry not found!",
|
"404": "404 - Entry not found!",
|
||||||
"actions": "Actions",
|
"actions": "Actions",
|
||||||
|
"active": "Active",
|
||||||
"add": "Add",
|
"add": "Add",
|
||||||
|
"attribute": "Attribute",
|
||||||
|
"auth_role": "Role",
|
||||||
"bool_as_string": {
|
"bool_as_string": {
|
||||||
"false": "No",
|
"false": "No",
|
||||||
"true": "Yes"
|
"true": "Yes"
|
||||||
},
|
},
|
||||||
|
"channel_id": "Channel Id",
|
||||||
|
"channel_name": "Channel",
|
||||||
|
"color": "Color",
|
||||||
"created_at": "Created at",
|
"created_at": "Created at",
|
||||||
|
"description": "Description",
|
||||||
"discord_id": "Discord Id",
|
"discord_id": "Discord Id",
|
||||||
"email": "E-Mail",
|
"email": "E-Mail",
|
||||||
|
"emoji": "Emoji",
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
|
"first_name": "First name",
|
||||||
|
"hidden_columns": "Hidden columns",
|
||||||
"history": {
|
"history": {
|
||||||
"attribute": "Attribute",
|
"attribute": "Attribute",
|
||||||
"autoRole": "Auto role",
|
"autoRole": "Auto role",
|
||||||
@ -167,13 +168,27 @@
|
|||||||
},
|
},
|
||||||
"id": "Id",
|
"id": "Id",
|
||||||
"joined_at": "Joined at",
|
"joined_at": "Joined at",
|
||||||
|
"last_name": "Last name",
|
||||||
"leaved_at": "Leaved at",
|
"leaved_at": "Leaved at",
|
||||||
|
"left_server": "Active",
|
||||||
|
"level": "Level",
|
||||||
|
"message_id": "Message Id",
|
||||||
|
"min_xp": "Min. XP",
|
||||||
"modified_at": "Modified at",
|
"modified_at": "Modified at",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"no_entries_found": "No entries found",
|
"no_entries_found": "No entries found",
|
||||||
"of": "of",
|
"of": "of",
|
||||||
|
"ontime": "Ontime",
|
||||||
|
"operator": "Operator",
|
||||||
|
"password": "Password",
|
||||||
|
"permissions": "Permissions",
|
||||||
"reset_filters": "Reset filters",
|
"reset_filters": "Reset filters",
|
||||||
"save": "Save"
|
"role": "Role",
|
||||||
|
"rule_count": "Rules",
|
||||||
|
"save": "Save",
|
||||||
|
"users": "User",
|
||||||
|
"value": "Value",
|
||||||
|
"xp": "XP"
|
||||||
},
|
},
|
||||||
"dialog": {
|
"dialog": {
|
||||||
"abort": "Abort",
|
"abort": "Abort",
|
||||||
@ -338,13 +353,6 @@
|
|||||||
"achievements": {
|
"achievements": {
|
||||||
"achievements": "Achievements",
|
"achievements": "Achievements",
|
||||||
"header": "Achievements",
|
"header": "Achievements",
|
||||||
"headers": {
|
|
||||||
"attribute": "Attribute",
|
|
||||||
"description": "Description",
|
|
||||||
"name": "Namer",
|
|
||||||
"operator": "Operator",
|
|
||||||
"value": "Value"
|
|
||||||
},
|
|
||||||
"message": {
|
"message": {
|
||||||
"achievement_create": "Achievement created",
|
"achievement_create": "Achievement created",
|
||||||
"achievement_create_d": "Achievement {{name}} successfully created",
|
"achievement_create_d": "Achievement {{name}} successfully created",
|
||||||
@ -365,12 +373,6 @@
|
|||||||
"auto_roles": {
|
"auto_roles": {
|
||||||
"auto_roles": "Auto roles",
|
"auto_roles": "Auto roles",
|
||||||
"header": "Auto roles",
|
"header": "Auto roles",
|
||||||
"headers": {
|
|
||||||
"channel_id": "Channel Id",
|
|
||||||
"channel_name": "Channel",
|
|
||||||
"message_id": "Message Id",
|
|
||||||
"role_count": "Rules"
|
|
||||||
},
|
|
||||||
"message": {
|
"message": {
|
||||||
"auto_role_create": "Auto role created",
|
"auto_role_create": "Auto role created",
|
||||||
"auto_role_create_d": "Auto role {{id}} created successfully",
|
"auto_role_create_d": "Auto role {{id}} created successfully",
|
||||||
@ -386,10 +388,6 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"auto_roles": "Auto role rules",
|
"auto_roles": "Auto role rules",
|
||||||
"header": "Auto role rules",
|
"header": "Auto role rules",
|
||||||
"headers": {
|
|
||||||
"emoji": "Emoji",
|
|
||||||
"role": "Role"
|
|
||||||
},
|
|
||||||
"message": {
|
"message": {
|
||||||
"auto_role_rule_create": "Auto role rules created",
|
"auto_role_rule_create": "Auto role rules created",
|
||||||
"auto_role_rule_create_d": "Auto role rule {{id}} successfully created",
|
"auto_role_rule_create_d": "Auto role rule {{id}} successfully created",
|
||||||
@ -446,12 +444,6 @@
|
|||||||
"header": "Server",
|
"header": "Server",
|
||||||
"levels": {
|
"levels": {
|
||||||
"header": "Level",
|
"header": "Level",
|
||||||
"headers": {
|
|
||||||
"color": "Color",
|
|
||||||
"min_xp": "Min. XP",
|
|
||||||
"name": "Name",
|
|
||||||
"permissions": "Permissions"
|
|
||||||
},
|
|
||||||
"levels": "Level",
|
"levels": "Level",
|
||||||
"message": {
|
"message": {
|
||||||
"level_create": "Level created",
|
"level_create": "Level created",
|
||||||
@ -472,13 +464,6 @@
|
|||||||
},
|
},
|
||||||
"members": {
|
"members": {
|
||||||
"header": "Members",
|
"header": "Members",
|
||||||
"headers": {
|
|
||||||
"left_server": "Active",
|
|
||||||
"level": "Level",
|
|
||||||
"name": "Name",
|
|
||||||
"ontime": "Ontime",
|
|
||||||
"xp": "XP"
|
|
||||||
},
|
|
||||||
"members": "Members",
|
"members": "Members",
|
||||||
"message": {
|
"message": {
|
||||||
"user_change_failed": "User change failed",
|
"user_change_failed": "User change failed",
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
"WebVersion": {
|
"WebVersion": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "0"
|
"Micro": "dev79_hide_table_columns"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -241,11 +241,24 @@ header {
|
|||||||
.table-caption {
|
.table-caption {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.table-caption-text {
|
.table-caption-table-info {
|
||||||
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 25px;
|
||||||
|
|
||||||
|
.table-caption-text {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-caption-column-select {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.table-caption-search {
|
.table-caption-search {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -603,3 +616,7 @@ footer {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden-column {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
@ -386,9 +386,14 @@
|
|||||||
color: $primaryTextColor !important;
|
color: $primaryTextColor !important;
|
||||||
|
|
||||||
.table-caption {
|
.table-caption {
|
||||||
|
.table-caption-table-info {
|
||||||
.table-caption-text {
|
.table-caption-text {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-caption-column-select {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.table-caption-search-wrapper {
|
.table-caption-search-wrapper {
|
||||||
.table-caption-search {
|
.table-caption-search {
|
||||||
height: 30px !important;
|
height: 30px !important;
|
||||||
@ -611,4 +616,50 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-multiselect {
|
||||||
|
background-color: $primaryBackgroundColor !important;
|
||||||
|
color: $primaryTextColor !important;
|
||||||
|
|
||||||
|
&:focus,
|
||||||
|
&.p-focus,
|
||||||
|
&:not(.p-disabled):hover {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-panel {
|
||||||
|
.p-multiselect-header {
|
||||||
|
background-color: $primaryBackgroundColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-items,
|
||||||
|
.p-multiselect-item {
|
||||||
|
background-color: $secondaryBackgroundColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-item {
|
||||||
|
color: $primaryTextColor !important;
|
||||||
|
border: 1px solid transparent !important;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border: 1px solid $primaryHeaderColor !important;
|
||||||
|
color: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-checkbox .p-checkbox-box.p-highlight {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
background: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box:hover {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,9 +386,14 @@
|
|||||||
color: $primaryTextColor !important;
|
color: $primaryTextColor !important;
|
||||||
|
|
||||||
.table-caption {
|
.table-caption {
|
||||||
|
.table-caption-table-info {
|
||||||
.table-caption-text {
|
.table-caption-text {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-caption-column-select {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.table-caption-search-wrapper {
|
.table-caption-search-wrapper {
|
||||||
.table-caption-search {
|
.table-caption-search {
|
||||||
height: 30px !important;
|
height: 30px !important;
|
||||||
@ -611,4 +616,50 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-multiselect {
|
||||||
|
background-color: $primaryBackgroundColor !important;
|
||||||
|
color: $primaryTextColor !important;
|
||||||
|
|
||||||
|
&:focus,
|
||||||
|
&.p-focus,
|
||||||
|
&:not(.p-disabled):hover {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-panel {
|
||||||
|
.p-multiselect-header {
|
||||||
|
background-color: $secondaryBackgroundColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-items,
|
||||||
|
.p-multiselect-item {
|
||||||
|
background-color: $primaryBackgroundColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-item {
|
||||||
|
color: $primaryTextColor !important;
|
||||||
|
border: 1px solid transparent !important;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border: 1px solid $primaryHeaderColor !important;
|
||||||
|
color: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-checkbox .p-checkbox-box.p-highlight {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
background: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box:hover {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -390,9 +390,14 @@
|
|||||||
color: $primaryTextColor !important;
|
color: $primaryTextColor !important;
|
||||||
|
|
||||||
.table-caption {
|
.table-caption {
|
||||||
|
.table-caption-table-info {
|
||||||
.table-caption-text {
|
.table-caption-text {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-caption-column-select {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.table-caption-search-wrapper {
|
.table-caption-search-wrapper {
|
||||||
.table-caption-search {
|
.table-caption-search {
|
||||||
height: 30px !important;
|
height: 30px !important;
|
||||||
@ -581,8 +586,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.p-datatable .p-sortable-column.p-highlight,
|
.p-datatable .p-sortable-column.p-highlight,
|
||||||
.p-datatable .p-sortable-column.p-highlight .p-sortable-column-icon {
|
.p-datatable .p-sortable-column.p-highlight .p-sortable-column-icon,
|
||||||
|
.p-datatable .p-sortable-column:not(.p-highlight):hover{
|
||||||
color: $primaryHeaderColor !important;
|
color: $primaryHeaderColor !important;
|
||||||
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-dropdown:not(.p-disabled):hover,
|
.p-dropdown:not(.p-disabled):hover,
|
||||||
@ -619,4 +626,50 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-multiselect {
|
||||||
|
background-color: $primaryBackgroundColor !important;
|
||||||
|
color: $primaryTextColor !important;
|
||||||
|
|
||||||
|
&:focus,
|
||||||
|
&.p-focus,
|
||||||
|
&:not(.p-disabled):hover {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-panel {
|
||||||
|
.p-multiselect-header {
|
||||||
|
background-color: $primaryBackgroundColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-items,
|
||||||
|
.p-multiselect-item {
|
||||||
|
background-color: $secondaryBackgroundColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-item {
|
||||||
|
color: $primaryTextColor !important;
|
||||||
|
border: 1px solid transparent !important;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border: 1px solid $primaryHeaderColor !important;
|
||||||
|
color: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-checkbox .p-checkbox-box.p-highlight {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
background: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box:hover {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,9 +386,14 @@
|
|||||||
color: $primaryTextColor !important;
|
color: $primaryTextColor !important;
|
||||||
|
|
||||||
.table-caption {
|
.table-caption {
|
||||||
|
.table-caption-table-info {
|
||||||
.table-caption-text {
|
.table-caption-text {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-caption-column-select {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.table-caption-search-wrapper {
|
.table-caption-search-wrapper {
|
||||||
.table-caption-search {
|
.table-caption-search {
|
||||||
height: 30px !important;
|
height: 30px !important;
|
||||||
@ -611,4 +616,50 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-multiselect {
|
||||||
|
background-color: $primaryBackgroundColor !important;
|
||||||
|
color: $primaryTextColor !important;
|
||||||
|
|
||||||
|
&:focus,
|
||||||
|
&.p-focus,
|
||||||
|
&:not(.p-disabled):hover {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-panel {
|
||||||
|
.p-multiselect-header {
|
||||||
|
background-color: $secondaryBackgroundColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-items,
|
||||||
|
.p-multiselect-item {
|
||||||
|
background-color: $primaryBackgroundColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-multiselect-item {
|
||||||
|
color: $primaryTextColor !important;
|
||||||
|
border: 1px solid transparent !important;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border: 1px solid $primaryHeaderColor !important;
|
||||||
|
color: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-checkbox .p-checkbox-box.p-highlight {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
background: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-checkbox:not(.p-checkbox-disabled) .p-checkbox-box:hover {
|
||||||
|
border-color: $primaryHeaderColor !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user