From 4add293186e4abc34d79020568ee75f7dd560110 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 14 Aug 2023 23:33:02 +0200 Subject: [PATCH 1/3] Added base logic to hide columns & added hide columns to levels #79 --- kdb-web/package.json | 2 +- .../src/app/base/component-with-table.spec.ts | 7 ++ kdb-web/src/app/base/component-with-table.ts | 39 ++++++++++ .../src/app/modules/shared/shared.module.ts | 74 ++++++++++--------- .../components/config/config.component.ts | 2 +- .../components/levels/levels.component.html | 44 ++++++----- .../components/levels/levels.component.ts | 12 +-- kdb-web/src/assets/i18n/de.json | 1 + kdb-web/src/assets/i18n/en.json | 1 + kdb-web/src/assets/version.json | 2 +- kdb-web/src/styles.scss | 17 ++++- .../src/styles/themes/default-dark-theme.scss | 53 ++++++++++++- .../styles/themes/default-light-theme.scss | 53 ++++++++++++- .../styles/themes/sh-edraft-dark-theme.scss | 53 ++++++++++++- .../styles/themes/sh-edraft-light-theme.scss | 53 ++++++++++++- 15 files changed, 347 insertions(+), 66 deletions(-) create mode 100644 kdb-web/src/app/base/component-with-table.spec.ts create mode 100644 kdb-web/src/app/base/component-with-table.ts diff --git a/kdb-web/package.json b/kdb-web/package.json index fc35367e..bfe9eed3 100644 --- a/kdb-web/package.json +++ b/kdb-web/package.json @@ -1,6 +1,6 @@ { "name": "kdb-web", - "version": "1.1.0", + "version": "1.1.dev79_hide_table_attributes", "scripts": { "ng": "ng", "update-version": "ts-node-esm update-version.ts", diff --git a/kdb-web/src/app/base/component-with-table.spec.ts b/kdb-web/src/app/base/component-with-table.spec.ts new file mode 100644 index 00000000..5b08b905 --- /dev/null +++ b/kdb-web/src/app/base/component-with-table.spec.ts @@ -0,0 +1,7 @@ +import { ComponentWithTable } from './component-with-table'; + +describe('ComponentWithTable', () => { + it('should create an instance', () => { + expect(new ComponentWithTable()).toBeTruthy(); + }); +}); diff --git a/kdb-web/src/app/base/component-with-table.ts b/kdb-web/src/app/base/component-with-table.ts new file mode 100644 index 00000000..97828341 --- /dev/null +++ b/kdb-web/src/app/base/component-with-table.ts @@ -0,0 +1,39 @@ +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)); + } +} diff --git a/kdb-web/src/app/modules/shared/shared.module.ts b/kdb-web/src/app/modules/shared/shared.module.ts index b92aa75b..68eb5b71 100644 --- a/kdb-web/src/app/modules/shared/shared.module.ts +++ b/kdb-web/src/app/modules/shared/shared.module.ts @@ -23,9 +23,10 @@ import { PanelModule } from "primeng/panel"; import { InputNumberModule } from "primeng/inputnumber"; import { ImageModule } from "primeng/image"; import { SidebarModule } from "primeng/sidebar"; -import { HistoryBtnComponent } from './components/history-btn/history-btn.component'; -import { DataViewModule, DataViewLayoutOptions } from 'primeng/dataview'; -import { ConfigListComponent } from './components/config-list/config-list.component'; +import { HistoryBtnComponent } from "./components/history-btn/history-btn.component"; +import { DataViewModule, DataViewLayoutOptions } from "primeng/dataview"; +import { ConfigListComponent } from "./components/config-list/config-list.component"; +import { MultiSelectModule } from "primeng/multiselect"; @NgModule({ @@ -34,7 +35,7 @@ import { ConfigListComponent } from './components/config-list/config-list.compon IpAddressPipe, BoolPipe, HistoryBtnComponent, - ConfigListComponent, + ConfigListComponent ], imports: [ CommonModule, @@ -60,36 +61,39 @@ import { ConfigListComponent } from './components/config-list/config-list.compon ImageModule, SidebarModule, DataViewModule, + MultiSelectModule ], - exports: [ - ButtonModule, - PasswordModule, - MenuModule, - DialogModule, - ProgressSpinnerModule, - HttpClientModule, - FormsModule, - ReactiveFormsModule, - ToastModule, - ConfirmDialogModule, - TableModule, - InputTextModule, - CheckboxModule, - DropdownModule, - TranslateModule, - DynamicDialogModule, - PanelMenuModule, - PanelModule, - AuthRolePipe, - IpAddressPipe, - BoolPipe, - InputNumberModule, - ImageModule, - SidebarModule, - HistoryBtnComponent, - DataViewModule, - DataViewLayoutOptions, - ConfigListComponent - ] + exports: [ + ButtonModule, + PasswordModule, + MenuModule, + DialogModule, + ProgressSpinnerModule, + HttpClientModule, + FormsModule, + ReactiveFormsModule, + ToastModule, + ConfirmDialogModule, + TableModule, + InputTextModule, + CheckboxModule, + DropdownModule, + TranslateModule, + DynamicDialogModule, + PanelMenuModule, + PanelModule, + AuthRolePipe, + IpAddressPipe, + BoolPipe, + InputNumberModule, + ImageModule, + SidebarModule, + HistoryBtnComponent, + DataViewModule, + DataViewLayoutOptions, + ConfigListComponent, + MultiSelectModule + ] }) -export class SharedModule { } +export class SharedModule { +} diff --git a/kdb-web/src/app/modules/view/server/config/components/config/config.component.ts b/kdb-web/src/app/modules/view/server/config/components/config/config.component.ts index 0769ea57..7e2a0f1d 100644 --- a/kdb-web/src/app/modules/view/server/config/components/config/config.component.ts +++ b/kdb-web/src/app/modules/view/server/config/components/config/config.component.ts @@ -110,7 +110,7 @@ export class ConfigComponent implements OnInit { return throwError(err); })).subscribe(result => { 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")); }); } } diff --git a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html index 0c8b1945..114143e0 100644 --- a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html +++ b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html @@ -9,11 +9,21 @@
-
- {{levels.length}} {{'common.of' | translate}} - {{dt.totalRecords}} - - {{'view.server.levels.levels' | translate}} +
+
+ {{levels.length}} {{'common.of' | translate}} + {{dt.totalRecords}} + + {{'view.server.levels.levels' | translate}} +
+ +
+ + +
{{'view.server.levels.headers.' + item.name | translate}}
+
+
+
@@ -36,28 +46,28 @@
- +
{{'view.server.levels.headers.name' | translate}}
- +
{{'view.server.levels.headers.color' | translate}}
- +
{{'view.server.levels.headers.min_xp' | translate}}
- +
{{'view.server.levels.headers.permissions' | translate}}
@@ -90,15 +100,15 @@ placeholder="{{'common.id' | translate}}"> - +
- - - + + + @@ -118,7 +128,7 @@ - + @@ -129,7 +139,7 @@ - + @@ -140,7 +150,7 @@ - + @@ -151,7 +161,7 @@ - + diff --git a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts index 63e1e446..1a5461a6 100644 --- a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts +++ b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts @@ -22,14 +22,14 @@ import { Mutations } from "../../../../../../models/graphql/mutations.model"; import { Subject, throwError } from "rxjs"; import { Server } from "../../../../../../models/data/server.model"; import { UserDTO } from "../../../../../../models/auth/auth-user.dto"; +import { ComponentWithTable } from "../../../../../../base/component-with-table"; @Component({ selector: "app-levels", templateUrl: "./levels.component.html", styleUrls: ["./levels.component.scss"] }) -export class LevelsComponent implements OnInit, OnDestroy { - +export class LevelsComponent extends ComponentWithTable implements OnInit, OnDestroy { public levels: Level[] = []; public loading = true; @@ -72,7 +72,9 @@ export class LevelsComponent implements OnInit, OnDestroy { private translate: TranslateService, private data: DataService, private sidebar: SidebarService, - private route: ActivatedRoute) { + private route: ActivatedRoute + ) { + super("level", ["name", "color", "min_xp", "permissions"]); } public ngOnInit(): void { @@ -96,8 +98,8 @@ export class LevelsComponent implements OnInit, OnDestroy { serverId: this.server.id, filter: this.filter, page: this.page, sort: this.sort }, (data: Query) => { - return data.servers[0]; - } + return data.servers[0]; + } ).subscribe(data => { this.totalRecords = data.levelCount; this.levels = data.levels; diff --git a/kdb-web/src/assets/i18n/de.json b/kdb-web/src/assets/i18n/de.json index b67922a8..ec3aa22a 100644 --- a/kdb-web/src/assets/i18n/de.json +++ b/kdb-web/src/assets/i18n/de.json @@ -142,6 +142,7 @@ "discord_id": "Discord Id", "email": "E-Mail", "error": "Fehler", + "hidden_columns": "Ausgeblendete Spalten", "history": { "attribute": "Attribut", "autoRole": "Auto Rolle", diff --git a/kdb-web/src/assets/i18n/en.json b/kdb-web/src/assets/i18n/en.json index 821996db..cfc8e077 100644 --- a/kdb-web/src/assets/i18n/en.json +++ b/kdb-web/src/assets/i18n/en.json @@ -142,6 +142,7 @@ "discord_id": "Discord Id", "email": "E-Mail", "error": "Error", + "hidden_columns": "Hidden columns", "history": { "attribute": "Attribute", "autoRole": "Auto role", diff --git a/kdb-web/src/assets/version.json b/kdb-web/src/assets/version.json index 71ae202d..4a930e41 100644 --- a/kdb-web/src/assets/version.json +++ b/kdb-web/src/assets/version.json @@ -2,6 +2,6 @@ "WebVersion": { "Major": "1", "Minor": "1", - "Micro": "0" + "Micro": "dev79_hide_table_attributes" } } \ No newline at end of file diff --git a/kdb-web/src/styles.scss b/kdb-web/src/styles.scss index 71be66ee..af15846a 100644 --- a/kdb-web/src/styles.scss +++ b/kdb-web/src/styles.scss @@ -241,9 +241,22 @@ header { .table-caption { display: flex; - .table-caption-text { + .table-caption-table-info { + display: flex; flex: 1; - font-weight: 400; + flex-direction: row; + gap: 25px; + + .table-caption-text { + display: flex; + align-items: center; + + font-weight: 400; + } + + .table-caption-column-select { + flex: 1; + } } .table-caption-search { diff --git a/kdb-web/src/styles/themes/default-dark-theme.scss b/kdb-web/src/styles/themes/default-dark-theme.scss index 5222645f..45fa4f2f 100644 --- a/kdb-web/src/styles/themes/default-dark-theme.scss +++ b/kdb-web/src/styles/themes/default-dark-theme.scss @@ -386,7 +386,12 @@ color: $primaryTextColor !important; .table-caption { - .table-caption-text { + .table-caption-table-info { + .table-caption-text { + } + + .table-caption-column-select { + } } .table-caption-search-wrapper { @@ -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; + } + } + } } diff --git a/kdb-web/src/styles/themes/default-light-theme.scss b/kdb-web/src/styles/themes/default-light-theme.scss index 1e7078e2..82341a81 100644 --- a/kdb-web/src/styles/themes/default-light-theme.scss +++ b/kdb-web/src/styles/themes/default-light-theme.scss @@ -386,7 +386,12 @@ color: $primaryTextColor !important; .table-caption { - .table-caption-text { + .table-caption-table-info { + .table-caption-text { + } + + .table-caption-column-select { + } } .table-caption-search-wrapper { @@ -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; + } + } + } } diff --git a/kdb-web/src/styles/themes/sh-edraft-dark-theme.scss b/kdb-web/src/styles/themes/sh-edraft-dark-theme.scss index 42e926ff..60974511 100644 --- a/kdb-web/src/styles/themes/sh-edraft-dark-theme.scss +++ b/kdb-web/src/styles/themes/sh-edraft-dark-theme.scss @@ -390,7 +390,12 @@ color: $primaryTextColor !important; .table-caption { - .table-caption-text { + .table-caption-table-info { + .table-caption-text { + } + + .table-caption-column-select { + } } .table-caption-search-wrapper { @@ -619,4 +624,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; + } + } + } } diff --git a/kdb-web/src/styles/themes/sh-edraft-light-theme.scss b/kdb-web/src/styles/themes/sh-edraft-light-theme.scss index 8fa8f2fb..ebf9360d 100644 --- a/kdb-web/src/styles/themes/sh-edraft-light-theme.scss +++ b/kdb-web/src/styles/themes/sh-edraft-light-theme.scss @@ -386,7 +386,12 @@ color: $primaryTextColor !important; .table-caption { - .table-caption-text { + .table-caption-table-info { + .table-caption-text { + } + + .table-caption-column-select { + } } .table-caption-search-wrapper { @@ -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; + } + } + } } -- 2.45.2 From 8d76f797320677cb4b1ea0881c391348b172207b Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Tue, 15 Aug 2023 08:14:45 +0200 Subject: [PATCH 2/3] Hide members columns #79 --- kdb-web/package.json | 2 +- .../components/levels/levels.component.html | 18 ++--- .../components/levels/levels.component.ts | 2 +- .../server/members/members.component.html | 80 +++++++++++-------- .../view/server/members/members.component.ts | 14 ++-- kdb-web/src/assets/i18n/de.json | 36 ++++----- kdb-web/src/assets/version.json | 2 +- 7 files changed, 80 insertions(+), 74 deletions(-) diff --git a/kdb-web/package.json b/kdb-web/package.json index bfe9eed3..998a4411 100644 --- a/kdb-web/package.json +++ b/kdb-web/package.json @@ -1,6 +1,6 @@ { "name": "kdb-web", - "version": "1.1.dev79_hide_table_attributes", + "version": "1.1.dev79_hide_table_columns", "scripts": { "ng": "ng", "update-version": "ts-node-esm update-version.ts", diff --git a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html index 114143e0..9e059391 100644 --- a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html +++ b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.html @@ -20,7 +20,7 @@
-
{{'view.server.levels.headers.' + item.name | translate}}
+
{{'common.' + item.name | translate}}
@@ -39,7 +39,7 @@ - +
{{'common.id' | translate}}
@@ -48,28 +48,28 @@
-
{{'view.server.levels.headers.name' | translate}}
+
{{'common.name' | translate}}
-
{{'view.server.levels.headers.color' | translate}}
+
{{'common.color' | translate}}
-
{{'view.server.levels.headers.min_xp' | translate}}
+
{{'common.min_xp' | translate}}
-
{{'view.server.levels.headers.permissions' | translate}}
+
{{'common.permissions' | translate}}
@@ -94,7 +94,7 @@ - +
@@ -103,7 +103,7 @@ + placeholder="{{'common.name' | translate}}">
@@ -117,7 +117,7 @@ - + {{level.id}} diff --git a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts index 1a5461a6..4ae5bb94 100644 --- a/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts +++ b/kdb-web/src/app/modules/view/server/levels/components/levels/levels.component.ts @@ -74,7 +74,7 @@ export class LevelsComponent extends ComponentWithTable implements OnInit, OnDes private sidebar: SidebarService, private route: ActivatedRoute ) { - super("level", ["name", "color", "min_xp", "permissions"]); + super("level", ["id", "name", "color", "min_xp", "permissions"]); } public ngOnInit(): void { diff --git a/kdb-web/src/app/modules/view/server/members/members.component.html b/kdb-web/src/app/modules/view/server/members/members.component.html index cc51f4a2..ea3d2e52 100644 --- a/kdb-web/src/app/modules/view/server/members/members.component.html +++ b/kdb-web/src/app/modules/view/server/members/members.component.html @@ -9,11 +9,21 @@
-
- {{members.length}} {{'common.of' | translate}} - {{dt.totalRecords}} - - {{'view.server.members.members' | translate}} +
+
+ {{members.length}} {{'common.of' | translate}} + {{dt.totalRecords}} + + {{'view.server.members.members' | translate}} +
+ +
+ + +
{{'common.' + item.name | translate}}
+
+
+
@@ -26,51 +36,51 @@ - +
{{'common.id' | translate}}
- +
{{'common.discord_id' | translate}}
- +
-
{{'view.server.members.headers.name' | translate}}
+
{{'common.name' | translate}}
- +
-
{{'view.server.members.headers.xp' | translate}}
+
{{'common.xp' | translate}}
- +
-
{{'view.server.members.headers.ontime' | translate}}
+
{{'common.ontime' | translate}}
- +
-
{{'view.server.members.headers.left_server' | translate}}
+
{{'common.left_server' | translate}}
- +
-
{{'view.server.members.headers.level' | translate}}
+
{{'common.level' | translate}}
@@ -95,31 +105,31 @@ - +
- +
- +
- +
- - - + + +
- +
- +
- +
@@ -130,7 +140,7 @@ - + {{member.id}} @@ -140,7 +150,7 @@ - + {{member.discordId}} @@ -150,7 +160,7 @@ - + {{member.name}} @@ -160,7 +170,7 @@ - + - + {{member.ontime}} @@ -182,7 +192,7 @@ - + {{!member.leftServer | bool}} @@ -192,10 +202,10 @@ - + - + {{member.level.name}} diff --git a/kdb-web/src/app/modules/view/server/members/members.component.ts b/kdb-web/src/app/modules/view/server/members/members.component.ts index e46afb61..6786adad 100644 --- a/kdb-web/src/app/modules/view/server/members/members.component.ts +++ b/kdb-web/src/app/modules/view/server/members/members.component.ts @@ -20,19 +20,17 @@ import { UpdateUserMutationResult } from "../../../../models/graphql/result.mode import { ActivatedRoute } from "@angular/router"; import { Level } from "../../../../models/data/level.model"; import { Server } from "../../../../models/data/server.model"; +import { ComponentWithTable } from "../../../../base/component-with-table"; @Component({ selector: "app-members", templateUrl: "./members.component.html", styleUrls: ["./members.component.scss"] }) -export class MembersComponent implements OnInit, OnDestroy { +export class MembersComponent extends ComponentWithTable implements OnInit, OnDestroy { members!: User[]; levels!: MenuItem[]; - leftServerOptions = [ - { label: this.translate.instant("common.bool_as_string.true"), value: false }, - { label: this.translate.instant("common.bool_as_string.false"), value: true } - ]; + leftServerOptions: { label: string; value: boolean; }[] = []; loading = true; clonedUsers: { [s: string]: User; } = {}; @@ -93,6 +91,7 @@ export class MembersComponent implements OnInit, OnDestroy { private data: DataService, private route: ActivatedRoute ) { + super("member", ["id", "discord_id", "name", "xp", "ontime", "left_server", "level"]); } ngOnInit(): void { @@ -112,9 +111,14 @@ export class MembersComponent implements OnInit, OnDestroy { 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(); }); } + public ngOnDestroy(): void { this.unsubscriber.next(); this.unsubscriber.complete(); diff --git a/kdb-web/src/assets/i18n/de.json b/kdb-web/src/assets/i18n/de.json index ec3aa22a..9659ea62 100644 --- a/kdb-web/src/assets/i18n/de.json +++ b/kdb-web/src/assets/i18n/de.json @@ -2,15 +2,6 @@ "admin": { "auth_users": { "header": "Benutzer", - "headers": { - "active": "Aktiv", - "auth_role": "Rolle", - "first_name": "Vorname", - "last_name": "Nachname", - "password": "Passwort", - "role": "Rolle", - "users": "Benutzer" - }, "message": { "cannot_delete_user": "Benutzer kann nicht gelöscht werden", "invalid_email": "Ungültige E-Mail", @@ -131,6 +122,20 @@ } }, "common": { + "active": "Aktiv", + "auth_role": "Rolle", + "first_name": "Vorname", + "last_name": "Nachname", + "password": "Passwort", + "role": "Rolle", + "users": "Benutzer", + "color": "Farbe", + "min_xp": "Min. XP", + "permissions": "Rechte", + "left_server": "Aktiv", + "level": "Level", + "ontime": "Ontime", + "xp": "XP", "404": "404 - Der Eintrag konnte nicht gefunden werden", "actions": "Aktionen", "add": "Hinzufügen", @@ -447,12 +452,6 @@ "header": "Server", "levels": { "header": "Level", - "headers": { - "color": "Farbe", - "min_xp": "Min. XP", - "name": "Name", - "permissions": "Rechte" - }, "levels": "Level", "message": { "level_create": "Level erstellt", @@ -473,13 +472,6 @@ }, "members": { "header": "Mitglieder", - "headers": { - "left_server": "Aktiv", - "level": "Level", - "name": "Name", - "ontime": "Ontime", - "xp": "XP" - }, "members": "Mitgliedern", "message": { "user_change_failed": "Benutzeränderung fehlgeschlagen", diff --git a/kdb-web/src/assets/version.json b/kdb-web/src/assets/version.json index 4a930e41..d2369dd9 100644 --- a/kdb-web/src/assets/version.json +++ b/kdb-web/src/assets/version.json @@ -2,6 +2,6 @@ "WebVersion": { "Major": "1", "Minor": "1", - "Micro": "dev79_hide_table_attributes" + "Micro": "dev79_hide_table_columns" } } \ No newline at end of file -- 2.45.2 From bfc9979961dad34fc6c6e06fdc665ed9ef84c94b Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Tue, 15 Aug 2023 12:16:24 +0200 Subject: [PATCH 3/3] Added option to hide columns to all tables #79 --- .../service/auth_user_repository_service.py | 13 +++- kdb-web/src/app/base/component-with-table.ts | 2 +- .../auth-user/auth-user.component.html | 65 +++++++++-------- .../auth-user/auth-user.component.ts | 4 +- .../shared/base/hideable-component.spec.ts | 7 ++ .../modules/shared/base/hideable-component.ts | 13 ++++ .../multi-select-columns.component.html | 16 +++++ .../multi-select-columns.component.scss | 0 .../multi-select-columns.component.spec.ts | 23 ++++++ .../multi-select-columns.component.ts | 24 +++++++ .../hideable-column.component.html | 1 + .../hideable-column.component.scss | 1 + .../hideable-column.component.spec.ts | 23 ++++++ .../hideable-column.component.ts | 16 +++++ .../hideable-header.component.html | 11 +++ .../hideable-header.component.scss | 0 .../hideable-header.component.spec.ts | 23 ++++++ .../hideable-header.component.ts | 16 +++++ .../src/app/modules/shared/shared.module.ts | 17 +++-- .../achievement/achievement.component.html | 70 ++++++++++--------- .../achievement/achievement.component.ts | 6 +- .../auto-roles-rules.component.html | 43 ++++++------ .../auto-roles-rules.component.ts | 4 +- .../auto-roles/auto-roles.component.html | 66 +++++++++-------- .../auto-roles/auto-roles.component.ts | 4 +- .../components/levels/levels.component.html | 38 +++++----- .../server/members/members.component.html | 50 ++++++------- kdb-web/src/assets/i18n/de.json | 56 +++++++-------- kdb-web/src/assets/i18n/en.json | 64 +++++++---------- kdb-web/src/styles.scss | 4 ++ .../styles/themes/sh-edraft-dark-theme.scss | 4 +- 31 files changed, 435 insertions(+), 249 deletions(-) create mode 100644 kdb-web/src/app/modules/shared/base/hideable-component.spec.ts create mode 100644 kdb-web/src/app/modules/shared/base/hideable-component.ts create mode 100644 kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.html create mode 100644 kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.scss create mode 100644 kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.spec.ts create mode 100644 kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.ts create mode 100644 kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.html create mode 100644 kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.scss create mode 100644 kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.spec.ts create mode 100644 kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.ts create mode 100644 kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.html create mode 100644 kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.scss create mode 100644 kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.spec.ts create mode 100644 kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.ts diff --git a/kdb-bot/src/bot_data/service/auth_user_repository_service.py b/kdb-bot/src/bot_data/service/auth_user_repository_service.py index 295e3c2f..87b39169 100644 --- a/kdb-bot/src/bot_data/service/auth_user_repository_service.py +++ b/kdb-bot/src/bot_data/service/auth_user_repository_service.py @@ -1,3 +1,4 @@ +from enum import Enum from typing import Optional from cpl_core.database.context import DatabaseContextABC @@ -100,9 +101,17 @@ class AuthUserRepositoryService(AuthUserRepositoryABC): ): crit_sort_direction = criteria.sort_direction.lower() 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: - 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.total_count = query.count() diff --git a/kdb-web/src/app/base/component-with-table.ts b/kdb-web/src/app/base/component-with-table.ts index 97828341..ae39c2b3 100644 --- a/kdb-web/src/app/base/component-with-table.ts +++ b/kdb-web/src/app/base/component-with-table.ts @@ -1,4 +1,4 @@ -interface Column { +export interface Column { key: string; name: string; } diff --git a/kdb-web/src/app/modules/admin/auth-users/components/auth-user/auth-user.component.html b/kdb-web/src/app/modules/admin/auth-users/components/auth-user/auth-user.component.html index 58f5eb9d..6699495b 100644 --- a/kdb-web/src/app/modules/admin/auth-users/components/auth-user/auth-user.component.html +++ b/kdb-web/src/app/modules/admin/auth-users/components/auth-user/auth-user.component.html @@ -9,11 +9,14 @@
-
- {{users.length}} {{'common.of' | translate}} - {{dt.totalRecords}} - - {{'admin.auth_users.users' | translate}} +
+
+ {{users.length}} {{'common.of' | translate}} + {{dt.totalRecords}} + + {{'admin.auth_users.users' | translate}} +
+
@@ -29,44 +32,44 @@ - +
-
{{'admin.auth_users.headers.first_name' | translate}}
+
{{'common.first_name' | translate}}
- +
-
{{'admin.auth_users.headers.last_name' | translate}}
+
{{'common.last_name' | translate}}
- +
{{'common.email' | translate}}
- +
-
{{'admin.auth_users.headers.active' | translate}}
+
{{'common.active' | translate}}
- +
-
{{'admin.auth_users.headers.role' | translate}}
+
{{'common.role' | translate}}
- +
-
{{'admin.auth_users.headers.password' | translate}}
+
{{'common.password' | translate}}
@@ -89,28 +92,28 @@ - +
- +
- +
- +
- +
- - + +
- +
- + @@ -119,7 +122,7 @@ - + - + - + - + - + - + { + it('should create an instance', () => { + expect(new HideableComponent()).toBeTruthy(); + }); +}); diff --git a/kdb-web/src/app/modules/shared/base/hideable-component.ts b/kdb-web/src/app/modules/shared/base/hideable-component.ts new file mode 100644 index 00000000..4421ff91 --- /dev/null +++ b/kdb-web/src/app/modules/shared/base/hideable-component.ts @@ -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; +} diff --git a/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.html b/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.html new file mode 100644 index 00000000..d26b948b --- /dev/null +++ b/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.html @@ -0,0 +1,16 @@ +
+ + +
+
+ {{'common.' + item.name | translate}}, +
+
+
{{'common.hidden_columns' | translate}}
+
+ + +
{{'common.' + item.name | translate}}
+
+
+
diff --git a/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.scss b/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.spec.ts b/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.spec.ts new file mode 100644 index 00000000..fd671a32 --- /dev/null +++ b/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.spec.ts @@ -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; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ MultiSelectColumnsComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(MultiSelectColumnsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.ts b/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.ts new file mode 100644 index 00000000..db458e39 --- /dev/null +++ b/kdb-web/src/app/modules/shared/base/multi-select-columns/multi-select-columns.component.ts @@ -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 = new EventEmitter(); +} diff --git a/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.html b/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.html new file mode 100644 index 00000000..6dbc7430 --- /dev/null +++ b/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.html @@ -0,0 +1 @@ + diff --git a/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.scss b/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.scss new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.scss @@ -0,0 +1 @@ + diff --git a/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.spec.ts b/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.spec.ts new file mode 100644 index 00000000..dfa08452 --- /dev/null +++ b/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.spec.ts @@ -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; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ HideableColumnComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(HideableColumnComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.ts b/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.ts new file mode 100644 index 00000000..4cba495c --- /dev/null +++ b/kdb-web/src/app/modules/shared/components/hideable-column/hideable-column.component.ts @@ -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(); + } + +} diff --git a/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.html b/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.html new file mode 100644 index 00000000..f35a2a42 --- /dev/null +++ b/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.html @@ -0,0 +1,11 @@ + + + + +
+ +
+ + + + diff --git a/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.scss b/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.spec.ts b/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.spec.ts new file mode 100644 index 00000000..27570e8b --- /dev/null +++ b/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.spec.ts @@ -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; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ HideableHeaderComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(HideableHeaderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.ts b/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.ts new file mode 100644 index 00000000..bd7f5597 --- /dev/null +++ b/kdb-web/src/app/modules/shared/components/hideable-header/hideable-header.component.ts @@ -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(); + } + +} diff --git a/kdb-web/src/app/modules/shared/shared.module.ts b/kdb-web/src/app/modules/shared/shared.module.ts index 68eb5b71..ae7d2ebd 100644 --- a/kdb-web/src/app/modules/shared/shared.module.ts +++ b/kdb-web/src/app/modules/shared/shared.module.ts @@ -13,7 +13,7 @@ import { InputTextModule } from "primeng/inputtext"; import { MenuModule } from "primeng/menu"; import { PasswordModule } from "primeng/password"; import { ProgressSpinnerModule } from "primeng/progressspinner"; -import { TableModule } from "primeng/table"; +import { SortableColumn, TableModule } from "primeng/table"; import { ToastModule } from "primeng/toast"; import { AuthRolePipe } from "./pipes/auth-role.pipe"; import { IpAddressPipe } from "./pipes/ip-address.pipe"; @@ -27,6 +27,9 @@ import { HistoryBtnComponent } from "./components/history-btn/history-btn.compon import { DataViewModule, DataViewLayoutOptions } from "primeng/dataview"; 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({ @@ -35,7 +38,10 @@ import { MultiSelectModule } from "primeng/multiselect"; IpAddressPipe, BoolPipe, HistoryBtnComponent, - ConfigListComponent + ConfigListComponent, + HideableColumnComponent, + HideableHeaderComponent, + MultiSelectColumnsComponent, ], imports: [ CommonModule, @@ -61,7 +67,7 @@ import { MultiSelectModule } from "primeng/multiselect"; ImageModule, SidebarModule, DataViewModule, - MultiSelectModule + MultiSelectModule, ], exports: [ ButtonModule, @@ -92,7 +98,10 @@ import { MultiSelectModule } from "primeng/multiselect"; DataViewModule, DataViewLayoutOptions, ConfigListComponent, - MultiSelectModule + MultiSelectModule, + HideableColumnComponent, + HideableHeaderComponent, + MultiSelectColumnsComponent, ] }) export class SharedModule { diff --git a/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html b/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html index 44f88ad5..23ea6dd2 100644 --- a/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html +++ b/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.html @@ -9,11 +9,15 @@
-
- {{achievements.length}} {{'common.of' | translate}} - {{dt.totalRecords}} - - {{'view.server.achievements.achievements' | translate}} +
+
+ {{achievements.length}} {{'common.of' | translate}} + {{dt.totalRecords}} + + {{'view.server.achievements.achievements' | translate}} +
+ +
@@ -29,44 +33,44 @@ - +
{{'common.id' | translate}}
- +
-
{{'view.server.achievements.headers.name' | translate}}
+
{{'common.name' | translate}}
- +
-
{{'view.server.achievements.headers.description' | translate}}
+
{{'common.description' | translate}}
- +
-
{{'view.server.achievements.headers.attribute' | translate}}
+
{{'common.attribute' | translate}}
- +
-
{{'view.server.achievements.headers.operator' | translate}}
+
{{'common.operator' | translate}}
- +
-
{{'view.server.achievements.headers.value' | translate}}
+
{{'common.value' | translate}}
@@ -91,27 +95,27 @@ - +
- +
+ placeholder="{{'common.name' | translate}}">
- +
- +
- - - + + + @@ -120,7 +124,7 @@ - + {{achievement.id}} @@ -131,7 +135,7 @@ - + @@ -142,7 +146,7 @@ - + @@ -153,11 +157,11 @@ - + + placeholder="{{'common.attribute' | translate}}"> {{achievement.attribute}} @@ -165,10 +169,10 @@ - + - + {{achievement.operator}} @@ -176,7 +180,7 @@ - + diff --git a/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts b/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts index 6a65d21c..a96d24ac 100644 --- a/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts +++ b/kdb-web/src/app/modules/view/server/achievements/components/achievement/achievement.component.ts @@ -22,13 +22,14 @@ import { Table } from "primeng/table"; import { User } from "../../../../../../models/data/user.model"; import { AchievementMutationResult } from "../../../../../../models/graphql/result.model"; import { Mutations } from "../../../../../../models/graphql/mutations.model"; +import { ComponentWithTable } from "../../../../../../base/component-with-table"; @Component({ selector: "app-achievement", templateUrl: "./achievement.component.html", styleUrls: ["./achievement.component.scss"] }) -export class AchievementComponent implements OnInit, OnDestroy { +export class AchievementComponent extends ComponentWithTable implements OnInit, OnDestroy { public achievements: Achievement[] = []; public loading = true; @@ -37,6 +38,7 @@ export class AchievementComponent implements OnInit, OnDestroy { public filterForm!: FormGroup<{ id: FormControl, name: FormControl, + description: FormControl, color: FormControl, min_xp: FormControl, permissions: FormControl, @@ -79,6 +81,7 @@ export class AchievementComponent implements OnInit, OnDestroy { private data: DataService, private sidebar: SidebarService, private route: ActivatedRoute) { + super("achievement", ["id", "name", "description", "attribute", "operator", "value"]); } public ngOnInit(): void { @@ -157,6 +160,7 @@ export class AchievementComponent implements OnInit, OnDestroy { this.filterForm = this.fb.group({ id: new FormControl(null), name: new FormControl(null), + description: new FormControl(null), color: new FormControl(null), min_xp: new FormControl(null), permissions: new FormControl(null) diff --git a/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles-rules/auto-roles-rules.component.html b/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles-rules/auto-roles-rules.component.html index c44d7208..3b2c6864 100644 --- a/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles-rules/auto-roles-rules.component.html +++ b/kdb-web/src/app/modules/view/server/auto-role/components/auto-roles-rules/auto-roles-rules.component.html @@ -9,11 +9,14 @@
-
- {{rules.length}} {{'common.of' | translate}} - {{dt.totalRecords}} - - {{'view.server.auto_roles.rules.auto_roles' | translate}} +
+
+ {{rules.length}} {{'common.of' | translate}} + {{dt.totalRecords}} + + {{'view.server.auto_roles.rules.auto_roles' | translate}} +
+
@@ -29,23 +32,23 @@ - +
{{'common.id' | translate}}
- +
-
{{'view.server.auto_roles.rules.headers.role' | translate}}
+
{{'common.role' | translate}}
- +
-
{{'view.server.auto_roles.rules.headers.emoji' | translate}}
+
{{'common.emoji' | translate}}
@@ -69,17 +72,17 @@ - +
- +
- +
- + @@ -88,7 +91,7 @@ - + {{autoRoleRule.id}} @@ -99,11 +102,11 @@ - + + placeholder="{{'common.role' | translate}}"> {{autoRoleRule.roleName}} @@ -111,11 +114,11 @@ - + + placeholder="{{'common.emoji' | translate}}">