Add total elements count with filters

This commit is contained in:
Matteo Gheza 2024-01-18 00:45:27 +01:00
parent c587656395
commit 44b21594fb
4 changed files with 12 additions and 0 deletions

View File

@ -8,6 +8,14 @@
<ng-container *ngIf="sourceType && enableDateRangePickerTypes.includes(sourceType)">
<daterange-picker [(ngModel)]="range" (ngModelChange)="filterDateRangeChanged($event)"></daterange-picker>
</ng-container>
<ng-container *ngIf="sourceType && enableCountTotalsTypes.includes(sourceType)">
<div class="row mt-3">
<div class="col-xs-12 col-12">
<p class="h5">{{ 'total_elements_with_filters'|translate }}: {{ totalElements }}</p>
</div>
</div>
</ng-container>
<div id="list" class="table-responsive mt-4">
<table *ngIf="sourceType === 'list'" id="table" class="table table-striped table-bordered dt-responsive nowrap">

View File

@ -44,6 +44,8 @@ export class TableComponent implements OnInit, OnDestroy {
filterStart: Date | undefined;
filterEnd: Date | undefined;
enableCountTotalsTypes: string[] = ['services', 'trainings', 'logs'];
@Input() initialStartFilter: Date | undefined;
_maxPaginationSize: number = 10;

View File

@ -308,6 +308,7 @@
"previous": "previous",
"last": "last",
"first": "first",
"total_elements_with_filters": "Total elements (curr. selection)",
"press_to_select_a_date": "Press to select a date",
"footer_text": "Allerta-VVF, free software developed for volunteer firefighters brigades.",
"revision": "revision",

View File

@ -308,6 +308,7 @@
"previous": "precedente",
"last": "ultima",
"first": "prima",
"total_elements_with_filters": "# Elementi (selezione corrente)",
"press_to_select_a_date": "Premi per selezionare una data",
"footer_text": "Allerta-VVF, software libero realizzato per i Vigili del Fuoco volontari.",
"revision": "revisione",