Skip to content
Snippets Groups Projects
Commit 6631f3ea authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #10994 TIME 0:15 fix user filter + nb filters display

parent e75cb729
No related branches found
No related tags found
No related merge requests found
...@@ -419,6 +419,8 @@ ...@@ -419,6 +419,8 @@
"manage_historyAdmin": "Consulter l'historique", "manage_historyAdmin": "Consulter l'historique",
"manage_historyDesc": "Consulter les différents événements de l'application", "manage_historyDesc": "Consulter les différents événements de l'application",
"loadingValidation": "Validation du document en cours ...", "loadingValidation": "Validation du document en cours ...",
"workflowTemplateAdded": "Modèle de circuit ajouté" "workflowTemplateAdded": "Modèle de circuit ajouté",
"by": "par",
"the": "le"
} }
} }
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
<ion-content #mainContent> <ion-content #mainContent>
<ion-list *ngIf="resources.length > 0"> <ion-list *ngIf="resources.length > 0">
<ion-virtual-scroll [items]="resources" approxItemHeight="90px"> <ion-virtual-scroll [items]="resources" approxItemHeight="90px">
<ion-item *virtualItem="let element" lines="full"> <ion-item *virtualItem="let element" lines="full" class="canSelect">
<ion-icon color="primary" slot="start" [name]="aventTypesIcon[element.type]"></ion-icon> <ion-icon color="primary" slot="start" [name]="aventTypesIcon[element.type]"></ion-icon>
<ion-label> <ion-label>
<p>Le <span class="primary">{{element.date | date:'dd/MM/yyyy HH:mm'}}</span> par <span <p>{{'lang.the' | translate | titlecase}} <span class="primary">{{element.date | date:'dd/MM/yyyy HH:mm'}}</span> {{'lang.by' | translate}} <span
class="primary">{{element.user}}</span></p> class="primary">{{element.user}}</span></p>
<h2>{{element.message}}</h2> <h2>{{element.message}}</h2>
</ion-label> </ion-label>
......
...@@ -13,4 +13,14 @@ ...@@ -13,4 +13,14 @@
.alert-wrapper { .alert-wrapper {
min-width: 350px; min-width: 350px;
} }
}
.canSelect {
* {
user-select: text !important;
-webkit-user-select: text !important;
-khtml-user-select: text !important;
-moz-user-select: text !important;
-ms-user-select: text !important;
}
} }
\ No newline at end of file
...@@ -5,10 +5,10 @@ import { HttpClient } from '@angular/common/http'; ...@@ -5,10 +5,10 @@ import { HttpClient } from '@angular/common/http';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { MatSort, Sort } from '@angular/material/sort'; import { MatSort, Sort } from '@angular/material/sort';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { map, finalize, tap, catchError } from 'rxjs/operators'; import { tap, catchError } from 'rxjs/operators';
import { LatinisePipe } from 'ngx-pipes'; import { LatinisePipe } from 'ngx-pipes';
import { AuthService } from '../../service/auth.service'; import { AuthService } from '../../service/auth.service';
import { AlertController, IonInfiniteScroll, MenuController } from '@ionic/angular'; import { AlertController, MenuController } from '@ionic/angular';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { SortPipe } from '../../plugins/sorting.pipe'; import { SortPipe } from '../../plugins/sorting.pipe';
...@@ -41,7 +41,7 @@ export class HistoryListComponent { ...@@ -41,7 +41,7 @@ export class HistoryListComponent {
count: number = 0; count: number = 0;
filters: any = { filters: any = {
search: '', user: '',
messageTypes: [], messageTypes: [],
date: { date: {
start: null, start: null,
...@@ -79,7 +79,7 @@ export class HistoryListComponent { ...@@ -79,7 +79,7 @@ export class HistoryListComponent {
applyFilter(filterValue: string) { applyFilter(filterValue: string) {
filterValue = this.latinisePipe.transform(filterValue.toLowerCase()); filterValue = this.latinisePipe.transform(filterValue.toLowerCase());
this.filters.field = filterValue; this.filters.user = filterValue;
this.getDatas(); this.getDatas();
} }
...@@ -159,7 +159,7 @@ export class HistoryListComponent { ...@@ -159,7 +159,7 @@ export class HistoryListComponent {
getNbFilters() { getNbFilters() {
let nb = 0; let nb = 0;
if (this.filters.search !== '') { if (this.filters.user !== '') {
nb++; nb++;
} }
if (this.filters.date.start !== null) { if (this.filters.date.start !== null) {
...@@ -169,7 +169,7 @@ export class HistoryListComponent { ...@@ -169,7 +169,7 @@ export class HistoryListComponent {
nb++; nb++;
} }
if (this.filters.messageTypes.length > 0) { if (this.filters.messageTypes.length > 0) {
nb++; nb += this.filters.messageTypes.length;
} }
return nb; return nb;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment