Standard-Lokalisierer für generic-ui hinzugefügt.
This commit is contained in:
parent
63613f2073
commit
12bfcb1f25
@ -5,7 +5,6 @@
|
|||||||
[paging]="paging"
|
[paging]="paging"
|
||||||
[sorting]="sorting"
|
[sorting]="sorting"
|
||||||
[searching]="searching"
|
[searching]="searching"
|
||||||
[summaries]="summaries"
|
|
||||||
[infoPanel]="infoPanel"
|
[infoPanel]="infoPanel"
|
||||||
[localization]="localization"
|
[localization]="localization"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { EnvelopeReceiverService } from '../../services/envelope-receiver.service';
|
import { EnvelopeReceiverService } from '../../services/envelope-receiver.service';
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { GuiColumn, GuiColumnMenu, GuiGridModule, GuiInfoPanel, GuiLocalization, GuiPaging, GuiPagingDisplay, GuiSearching, GuiSorting, GuiSummaries } from '@generic-ui/ngx-grid';
|
import { GuiColumn, GuiColumnMenu, GuiGridModule, GuiInfoPanel, GuiLocalization, GuiPaging, GuiPagingDisplay, GuiSearching, GuiSorting, GuiSummaries } from '@generic-ui/ngx-grid';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -23,42 +22,38 @@ export class EnvelopeTableComponent {
|
|||||||
multiSorting: true
|
multiSorting: true
|
||||||
};
|
};
|
||||||
|
|
||||||
paging: GuiPaging = {
|
paging: GuiPaging = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizes: [10, 25, 50],
|
pageSizes: [10, 25, 50],
|
||||||
pagerTop: true,
|
pagerTop: true,
|
||||||
pagerBottom: true,
|
pagerBottom: true,
|
||||||
display: GuiPagingDisplay.ADVANCED
|
display: GuiPagingDisplay.ADVANCED
|
||||||
};
|
};
|
||||||
|
|
||||||
searching: GuiSearching = {
|
searching: GuiSearching = {
|
||||||
enabled: true
|
enabled: true
|
||||||
};
|
};
|
||||||
|
|
||||||
summaries: GuiSummaries = {
|
summaries: GuiSummaries = {
|
||||||
enabled: true
|
enabled: true
|
||||||
};
|
};
|
||||||
|
|
||||||
infoPanel: GuiInfoPanel = {
|
infoPanel: GuiInfoPanel = {
|
||||||
enabled:true,
|
enabled: true,
|
||||||
infoDialog:false,
|
infoDialog: false,
|
||||||
columnsManager:false,
|
columnsManager: true,
|
||||||
schemaManager: true
|
schemaManager: true
|
||||||
};
|
};
|
||||||
|
|
||||||
localization: GuiLocalization = {
|
localization: GuiLocalization = {
|
||||||
translationResolver: (key: string, value: string) => {
|
translationResolver: (key: string, value: string) => EnvelopeTableComponent.Translation[key] ?? value
|
||||||
return '[de-DE]';
|
};
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
source: Array<any> = []
|
source: Array<any> = []
|
||||||
|
|
||||||
constructor(private erService: EnvelopeReceiverService) {
|
constructor(private erService: EnvelopeReceiverService) { }
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.erService.getEnvelopeReceiver().subscribe({
|
this.erService.getEnvelopeReceiver().subscribe({
|
||||||
@ -88,4 +83,51 @@ export class EnvelopeTableComponent {
|
|||||||
header: 'AddedWhen',
|
header: 'AddedWhen',
|
||||||
field: 'addedWhen'
|
field: 'addedWhen'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
static readonly Translation: { [key: string]: string } = {
|
||||||
|
"sourceEmpty": "There are no items to show.",
|
||||||
|
"pagingItemsPerPage": "Items per page:",
|
||||||
|
"pagingOf": "of",
|
||||||
|
"pagingNextPage": "Next",
|
||||||
|
"pagingPrevPage": "Prev",
|
||||||
|
"pagingNoItems": "There is no items.",
|
||||||
|
"infoPanelShowing": "Showing",
|
||||||
|
"infoPanelItems": "items",
|
||||||
|
"infoPanelOutOf": "out of",
|
||||||
|
"infoPanelThemeMangerTooltipText": "Theme manager",
|
||||||
|
"infoPanelColumnManagerTooltipText": "Column manager",
|
||||||
|
"infoPanelInfoTooltipText": "info",
|
||||||
|
"themeManagerModalTitle": "Theme manager",
|
||||||
|
"themeManagerModalTheme": "Theme:",
|
||||||
|
"themeManagerModalRowColoring": "Row coloring:",
|
||||||
|
"themeManagerModalVerticalGrid": "Vertical grid",
|
||||||
|
"themeManagerModalHorizontalGrid": "HorizontalGrid",
|
||||||
|
"columnManagerModalTitle": "Manage columns",
|
||||||
|
"headerMenuMainTab": "Menu",
|
||||||
|
"headerMenuMainTabColumnSort": "Column sort",
|
||||||
|
"headerMenuMainTabHideColumn": "Hide column",
|
||||||
|
"headerMenuMainTabHighlightColumn": "Highlight",
|
||||||
|
"headerMenuMainTabMoveLeft": "Move left",
|
||||||
|
"headerMenuMainTabMoveRight": "Move right",
|
||||||
|
"headerMenuMainTabColumnSortAscending": "Ascending",
|
||||||
|
"headerMenuMainTabColumnSortDescending": "Descending",
|
||||||
|
"headerMenuMainTabColumnSortNone": "None",
|
||||||
|
"headerMenuFilterTab": "Filter",
|
||||||
|
"headerMenuColumnsTab": "Columns",
|
||||||
|
"summariesCount": "Count",
|
||||||
|
"summariesDist": "Dist",
|
||||||
|
"summariesSum": "Sum",
|
||||||
|
"summariesAvg": "Avg",
|
||||||
|
"summariesMin": "Min",
|
||||||
|
"summariesMax": "Max",
|
||||||
|
"summariesMed": "Med",
|
||||||
|
"summariesTruthy": "Truthy",
|
||||||
|
"summariesFalsy": "Falsy",
|
||||||
|
"summariesDistinctValuesTooltip": "Distinct values",
|
||||||
|
"summariesAverageTooltip": "Average",
|
||||||
|
"summariesMinTooltip": "Min",
|
||||||
|
"summariesMaxTooltip": "Max",
|
||||||
|
"summariesMedTooltip": "Median",
|
||||||
|
"summariesCountTooltip": "Number of items in the grid"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -7,9 +7,7 @@ import { map } from 'rxjs/operators';
|
|||||||
export const authGuard: CanActivateFn = (route, state) => {
|
export const authGuard: CanActivateFn = (route, state) => {
|
||||||
const authService = inject(AuthService);
|
const authService = inject(AuthService);
|
||||||
const router = inject(Router);
|
const router = inject(Router);
|
||||||
|
|
||||||
authService.isAuthenticated().subscribe({next: res => console.log(res)})
|
|
||||||
|
|
||||||
return authService.isAuthenticated().pipe(
|
return authService.isAuthenticated().pipe(
|
||||||
map(isAuthenticated => {
|
map(isAuthenticated => {
|
||||||
if (!isAuthenticated) {
|
if (!isAuthenticated) {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<mat-tab-group>
|
<mat-tab-group>
|
||||||
<mat-tab label="First">
|
<mat-tab label="Offene Umschläge">
|
||||||
<app-envelope-table></app-envelope-table>
|
<app-envelope-table></app-envelope-table>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="Second">
|
<mat-tab label="Abgeschlossene Umschläge">
|
||||||
<app-envelope-table></app-envelope-table>
|
<app-envelope-table></app-envelope-table>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
Loading…
x
Reference in New Issue
Block a user