Skip to content
Snippets Groups Projects
Commit e47cf1ec authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FEAT #16648 TIME 0:10 display the docs of the mode concerned after indexing

parent bca8967d
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ export class SidebarComponent implements OnInit, AfterViewInit { ...@@ -28,6 +28,7 @@ export class SidebarComponent implements OnInit, AfterViewInit {
loadingList: boolean = false; loadingList: boolean = false;
searchMode: boolean = false; searchMode: boolean = false;
indexed: boolean = false;
searchTerm: FormControl = new FormControl(); searchTerm: FormControl = new FormControl();
...@@ -58,8 +59,8 @@ export class SidebarComponent implements OnInit, AfterViewInit { ...@@ -58,8 +59,8 @@ export class SidebarComponent implements OnInit, AfterViewInit {
this.subscription = this.actionsService.catchEvent().subscribe((result: any[]) => { this.subscription = this.actionsService.catchEvent().subscribe((result: any[]) => {
let mode: any = result.filter((item: any) => item.userId === this.authService.user.id).map((el: any) => el.mode); let mode: any = result.filter((item: any) => item.userId === this.authService.user.id).map((el: any) => el.mode);
mode = [... new Set(mode)].toString(); mode = [... new Set(mode)].toString();
this.indexed = true;
  • Owner

    a quoi sert tout ca ?

    ce qu'on veut c'est juste de rafraîchir la liste après indexation ?

    Pour ne pas juste appeler this.filter('') ?

    Comme ça on refresh sans filtre visa ou signature ou annotation (c'est plus simple)

    Edited by Alex ORLUC
  • Hamza HRAMCHI @hamza.hramchi ·
    Author Maintainer

    Je traite le cas d'indexation. Dans search() je vais passer le mode et faire le test aussi

  • Owner

    Le doc apparaîtra de la même manière sans filtre, ca complexifie le code pour peu de chose.

    Appelle juste la fonction sans mode et envoie juste l'event si c'est l'utilisateur qui a créer le doc qui est en première position.

  • Please register or sign in to reply
this.filter(mode); this.filter(mode);
this.signaturesService.mode = mode;
}); });
} }
...@@ -121,7 +122,11 @@ export class SidebarComponent implements OnInit, AfterViewInit { ...@@ -121,7 +122,11 @@ export class SidebarComponent implements OnInit, AfterViewInit {
} }
this.loadingList = true; this.loadingList = true;
this.signaturesService.mode === mode ? this.signaturesService.mode = '' : this.signaturesService.mode = mode; if (this.indexed) {
this.signaturesService.mode = mode;
} else {
this.signaturesService.mode === mode ? this.signaturesService.mode = '' : this.signaturesService.mode = mode;
}
this.filterService.offset = 0; this.filterService.offset = 0;
this.http.get('../rest/documents?limit=' + this.filterService.limit + '&offset=' + this.filterService.offset + '&mode=' + this.signaturesService.mode) this.http.get('../rest/documents?limit=' + this.filterService.limit + '&offset=' + this.filterService.offset + '&mode=' + this.signaturesService.mode)
.pipe( .pipe(
......
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