diff --git a/src/frontend/app/basket/basket-home.component.ts b/src/frontend/app/basket/basket-home.component.ts index c8f0486536e4483463494b4aedb722aecec7a672..80f82e91dd571a379d0afcf6d1d4ac9cb31e088c 100755 --- a/src/frontend/app/basket/basket-home.component.ts +++ b/src/frontend/app/basket/basket-home.component.ts @@ -47,4 +47,11 @@ export class BasketHomeComponent implements OnInit { this.snavL.close(); } } + + refreshBasketHome(){ + this.http.get(this.coreUrl + "rest/home") + .subscribe((data: any) => { + this.homeData = data; + }); + } } diff --git a/src/frontend/app/list/basket-list.component.html b/src/frontend/app/list/basket-list.component.html index c05cbc5575f7e05279cd56a917297391ff7cc0e7..c83f99af5eac29012bdf1e516a225c3e29848d7d 100644 --- a/src/frontend/app/list/basket-list.component.html +++ b/src/frontend/app/list/basket-list.component.html @@ -4,7 +4,7 @@ [opened]="mobileMode ? false : true" autoFocus="false" style="overflow-x:hidden;" [ngStyle]="{'width': mobileMode ? '80%' : '400px'}"> <menu-shortcut></menu-shortcut> <menu-nav></menu-nav> - <basket-home *ngIf="homeData" [homeData]="homeData" [snavL]="snav" [currentBasketInfo]="currentBasketInfo"></basket-home> + <basket-home *ngIf="homeData" #basketHome [homeData]="homeData" [snavL]="snav" [currentBasketInfo]="currentBasketInfo"></basket-home> <mat-divider></mat-divider> </mat-sidenav> <mat-sidenav-content> diff --git a/src/frontend/app/list/basket-list.component.ts b/src/frontend/app/list/basket-list.component.ts index cfe9b5af4ca2b86d1deef25a9ef1056683a1413a..394d3a16624800fa8cc6ecb9694b8ef8248ffede 100755 --- a/src/frontend/app/list/basket-list.component.ts +++ b/src/frontend/app/list/basket-list.component.ts @@ -20,6 +20,7 @@ import { ActionsListComponent } from '../actions/actions-list.component'; import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { VisaWorkflowComponent } from '../visa/visa-workflow.component'; import { AvisWorkflowComponent } from '../avis/avis-workflow.component'; +import { BasketHomeComponent } from '../basket/basket-home.component'; declare function $j(selector: any): any; @@ -94,6 +95,7 @@ export class BasketListComponent implements OnInit { @ViewChild('appDiffusionsList') appDiffusionsList: DiffusionsListComponent; @ViewChild('appVisaWorkflow') appVisaWorkflow: VisaWorkflowComponent; @ViewChild('appAvisWorkflow') appAvisWorkflow: AvisWorkflowComponent; + @ViewChild('basketHome') basketHome: BasketHomeComponent; currentSelectedChrono: string = ''; @@ -240,16 +242,9 @@ export class BasketListComponent implements OnInit { this.filtersChange.emit(); } - refreshHomeBasket(){ - this.http.get('../../rest/home') - .subscribe((data: any) => { - this.homeData = data; - }); - } - refreshDaoAfterAction() { this.refreshDao(); - this.refreshHomeBasket(); + this.basketHome.refreshBasketHome(); const e:any = {checkd : false}; this.toggleAllRes(e); }