diff --git a/src/frontend/app/process/process.component.html b/src/frontend/app/process/process.component.html index 3802bb14d2c92d415fdd1c4cea235f99cf939761..41d23528af14bed003dcaa0b9da9e09df0c74981 100644 --- a/src/frontend/app/process/process.component.html +++ b/src/frontend/app/process/process.component.html @@ -85,7 +85,7 @@ [adminMode]="false" [resId]="currentResourceInformations.resId" [expanded]="true"> </app-diffusions-list> <app-sended-resource-list *ngIf="currentTool === 'emails' && !loading" #appSendedResource - [resId]="currentResourceInformations.resId"> + [resId]="currentResourceInformations.resId" (reloadBadgeSendedResource)="refreshBadge($event,'emails')"> </app-sended-resource-list> <app-visa-workflow *ngIf="currentTool === 'visaCircuit' && !loading" #appVisaWorkflow [resId]="currentResourceInformations.resId" @@ -275,7 +275,7 @@ [resId]="currentResourceInformations.resId" [expanded]="true"> </app-diffusions-list> <app-sended-resource-list *ngIf="modal.id === 'emails' && !loading" #appSendedResource - [resId]="currentResourceInformations.resId"> + [resId]="currentResourceInformations.resId" (reloadBadgeSendedResource)="refreshBadge($event,'emails')"> </app-sended-resource-list> <app-visa-workflow *ngIf="modal.id === 'visaCircuit' && !loading" [adminMode]="privilegeService.hasCurrentUserPrivilege('config_visa_workflow')" #appVisaWorkflow diff --git a/src/frontend/app/process/process.component.ts b/src/frontend/app/process/process.component.ts index fc5fe68308ad627e7025ce5cbf706735e9cd8a26..47cb74f9e2787657436d54edbc1d61c2c54d5bd7 100755 --- a/src/frontend/app/process/process.component.ts +++ b/src/frontend/app/process/process.component.ts @@ -561,7 +561,7 @@ export class ProcessComponent implements OnInit { }, 400); } - refreshBadge(nbRres: any, id: string) { + refreshBadge(nbRres: any, id: string) { this.processTool.filter(tool => tool.id === id)[0].count = nbRres; } diff --git a/src/frontend/app/sendedResource/sended-resource-list.component.ts b/src/frontend/app/sendedResource/sended-resource-list.component.ts index 010c882380aa5648294ef85c21bfe1bf32f18cf8..cd7d20d0cef7cc90e23db8bbadfc7231c504631f 100644 --- a/src/frontend/app/sendedResource/sended-resource-list.component.ts +++ b/src/frontend/app/sendedResource/sended-resource-list.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild, EventEmitter, ElementRef, Input } from '@angular/core'; +import { Component, OnInit, ViewChild, EventEmitter, ElementRef, Input, Output } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { LANG } from '../translate.component'; import { NotificationService } from '../notification.service'; @@ -36,6 +36,8 @@ export class SendedResourceListComponent implements OnInit { @Input('resId') resId: number = null; + @Output() reloadBadgeSendedResource = new EventEmitter<string>(); + @ViewChild(MatSort, { static: false }) sort: MatSort; constructor( @@ -55,7 +57,9 @@ export class SendedResourceListComponent implements OnInit { await this.initAcknowledgementReceipList(); await this.initEmailList(); await this.initMessageExchange(); - await this.initShippings() + await this.initShippings(); + this.reloadBadgeSendedResource.emit(`${this.sendedResources.length}`); + this.initFilter(); setTimeout(() => {