Standard-Lokalisierer für generic-ui hinzugefügt.
This commit is contained in:
parent
63613f2073
commit
12bfcb1f25
@ -5,7 +5,6 @@
|
||||
[paging]="paging"
|
||||
[sorting]="sorting"
|
||||
[searching]="searching"
|
||||
[summaries]="summaries"
|
||||
[infoPanel]="infoPanel"
|
||||
[localization]="localization"
|
||||
>
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { Component } from '@angular/core';
|
||||
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';
|
||||
|
||||
@Component({
|
||||
@ -23,42 +22,38 @@ export class EnvelopeTableComponent {
|
||||
multiSorting: true
|
||||
};
|
||||
|
||||
paging: GuiPaging = {
|
||||
enabled: true,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
pageSizes: [10, 25, 50],
|
||||
pagerTop: true,
|
||||
pagerBottom: true,
|
||||
display: GuiPagingDisplay.ADVANCED
|
||||
};
|
||||
paging: GuiPaging = {
|
||||
enabled: true,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
pageSizes: [10, 25, 50],
|
||||
pagerTop: true,
|
||||
pagerBottom: true,
|
||||
display: GuiPagingDisplay.ADVANCED
|
||||
};
|
||||
|
||||
searching: GuiSearching = {
|
||||
enabled: true
|
||||
};
|
||||
searching: GuiSearching = {
|
||||
enabled: true
|
||||
};
|
||||
|
||||
summaries: GuiSummaries = {
|
||||
enabled: true
|
||||
};
|
||||
|
||||
infoPanel: GuiInfoPanel = {
|
||||
enabled:true,
|
||||
infoDialog:false,
|
||||
columnsManager:false,
|
||||
schemaManager: true
|
||||
};
|
||||
infoPanel: GuiInfoPanel = {
|
||||
enabled: true,
|
||||
infoDialog: false,
|
||||
columnsManager: true,
|
||||
schemaManager: true
|
||||
};
|
||||
|
||||
localization: GuiLocalization = {
|
||||
translationResolver: (key: string, value: string) => {
|
||||
return '[de-DE]';
|
||||
}
|
||||
};
|
||||
localization: GuiLocalization = {
|
||||
translationResolver: (key: string, value: string) => EnvelopeTableComponent.Translation[key] ?? value
|
||||
};
|
||||
|
||||
source: Array<any> = []
|
||||
|
||||
constructor(private erService: EnvelopeReceiverService) {
|
||||
|
||||
}
|
||||
constructor(private erService: EnvelopeReceiverService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.erService.getEnvelopeReceiver().subscribe({
|
||||
@ -88,4 +83,51 @@ export class EnvelopeTableComponent {
|
||||
header: '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) => {
|
||||
const authService = inject(AuthService);
|
||||
const router = inject(Router);
|
||||
|
||||
authService.isAuthenticated().subscribe({next: res => console.log(res)})
|
||||
|
||||
|
||||
return authService.isAuthenticated().pipe(
|
||||
map(isAuthenticated => {
|
||||
if (!isAuthenticated) {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<mat-tab-group>
|
||||
<mat-tab label="First">
|
||||
<mat-tab label="Offene Umschläge">
|
||||
<app-envelope-table></app-envelope-table>
|
||||
</mat-tab>
|
||||
<mat-tab label="Second">
|
||||
<mat-tab label="Abgeschlossene Umschläge">
|
||||
<app-envelope-table></app-envelope-table>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
Loading…
x
Reference in New Issue
Block a user