diff --git a/src/frontend/app/app-common.module.ts b/src/frontend/app/app-common.module.ts index 284aef9945b0f4a4878ed81660d13032a0e85780..9e6a0c75109e95555caabca00e9276aff2ba7c08 100755 --- a/src/frontend/app/app-common.module.ts +++ b/src/frontend/app/app-common.module.ts @@ -60,6 +60,8 @@ import { ContactsFormComponent } from './administration/contact/page/form/contac import { HistoryComponent } from './history/history.component'; import { DiffusionsListComponent } from './diffusions/diffusions-list.component'; +import { HistoryDiffusionsListComponent } from './diffusions/history/history-diffusions-list.component'; +import { HistoryDiffusionsListModalComponent } from './diffusions/history/modal/history-diffusions-list-modal.component'; import { VisaWorkflowComponent } from './visa/visa-workflow.component'; import { AvisWorkflowComponent } from './avis/avis-workflow.component'; @@ -115,6 +117,8 @@ import { CriteriaToolComponent } from '@appRoot/search/criteria-tool/criteria-to PluginSelectSearchComponent, PluginSelectAutocompleteSearchComponent, DiffusionsListComponent, + HistoryDiffusionsListComponent, + HistoryDiffusionsListModalComponent, DragDropDirective, ContactAutocompleteComponent, ContactsFormComponent, @@ -159,6 +163,8 @@ import { CriteriaToolComponent } from '@appRoot/search/criteria-tool/criteria-to PluginSelectSearchComponent, PluginSelectAutocompleteSearchComponent, DiffusionsListComponent, + HistoryDiffusionsListComponent, + HistoryDiffusionsListModalComponent, DragDropDirective, ContactAutocompleteComponent, ContactsFormComponent, @@ -188,6 +194,7 @@ import { CriteriaToolComponent } from '@appRoot/search/criteria-tool/criteria-to entryComponents: [ IndexingGroupModalComponent, RegisteredMailImportComponent, + HistoryDiffusionsListModalComponent, AlertComponent, ConfirmComponent ], diff --git a/src/frontend/app/diffusions/diffusions-list.component.html b/src/frontend/app/diffusions/diffusions-list.component.html index 5d2d611534c4081e17dce9c55a22a8a0120e65f9..9a4c9410ca062529af5819bf86a98bc554a47e70 100644 --- a/src/frontend/app/diffusions/diffusions-list.component.html +++ b/src/frontend/app/diffusions/diffusions-list.component.html @@ -61,3 +61,8 @@ <div *ngIf="loading" style="display:flex;"> <mat-spinner style="margin:auto;"></mat-spinner> </div> +<div style="text-align: right;"> + <button mat-button color="primary" (click)="openHistory()"> + {{'lang.showDiffusionHistory' | translate}} + </button> +</div> diff --git a/src/frontend/app/diffusions/diffusions-list.component.ts b/src/frontend/app/diffusions/diffusions-list.component.ts index e1d271490852c866ab37ed00541e15e1981a7dc9..d2b9298439247bac81ec505ea258c4deb4fe5871 100644 --- a/src/frontend/app/diffusions/diffusions-list.component.ts +++ b/src/frontend/app/diffusions/diffusions-list.component.ts @@ -10,6 +10,7 @@ import { AlertComponent } from '../../plugins/modal/alert.component'; import { MatDialog } from '@angular/material/dialog'; import { FunctionsService } from '@service/functions.service'; import { HeaderService } from '@service/header.service'; +import { HistoryDiffusionsListModalComponent } from './history/modal/history-diffusions-list-modal.component'; @Component({ selector: 'app-diffusions-list', @@ -326,6 +327,8 @@ export class DiffusionsListComponent implements OnInit { } this.loading = false; this.listinstanceClone = JSON.parse(JSON.stringify(this.getCurrentListinstance())); + console.log(this.diffList); + } saveListinstance() { @@ -649,7 +652,7 @@ export class DiffusionsListComponent implements OnInit { id: item.itemSerialId, mode: role, type: item.item_type === 'user' ? 'user' : 'entity' - } + }; }) ); }); @@ -664,4 +667,8 @@ export class DiffusionsListComponent implements OnInit { isModified() { return JSON.stringify(this.listinstanceClone) !== JSON.stringify(this.getCurrentListinstance()); } + + openHistory() { + this.dialog.open(HistoryDiffusionsListModalComponent, { panelClass: 'maarch-modal', autoFocus: false, data: { resId: this.resId} }); + } } diff --git a/src/frontend/app/diffusions/history/history-diffusions-list.component.html b/src/frontend/app/diffusions/history/history-diffusions-list.component.html new file mode 100644 index 0000000000000000000000000000000000000000..f38934526afb816693f234f111da782ea375f53c --- /dev/null +++ b/src/frontend/app/diffusions/history/history-diffusions-list.component.html @@ -0,0 +1,37 @@ +<ng-container *ngIf="!loading"> + <ng-container *ngFor="let diffList of diffListHistory"> + <div class="dateTitle"> + <div mat-subheader color="primary" [title]="diffList.creationDate | fullDate">Actif <b>{{diffList.creationDate | timeAgo : 'full'}}</b> par <b>{{diffList.user}}</b></div> + <mat-divider></mat-divider> + </div> + <ng-container *ngFor="let role of availableRoles"> + <mat-expansion-panel *ngIf="diffList.listinstance[role.id].items.length > 0" class="diffusionList" + [expanded]="role.id === 'dest' || expanded"> + <mat-expansion-panel-header> + <mat-panel-title> + {{role.label}} <ng-container *ngIf="role.id !== 'dest'"> + ({{diffList.listinstance[role.id].items.length}}) + </ng-container> + </mat-panel-title> + </mat-expansion-panel-header> + <mat-list> + <mat-list-item disableRipple class="item-diffusion-list" + *ngFor="let diffusion of diffList.listinstance[role.id].items;let i=index"> + <mat-icon mat-list-icon color="primary" class="fa" + [class.fa-user]="diffusion.item_type === 'user_id' || diffusion.item_type === 'user'" + [class.fa-sitemap]="diffusion.item_type === 'entity_id' || diffusion.item_type === 'entity'"> + </mat-icon> + <div class="item-diffusion"> + <p mat-line [title]="diffusion.itemLabel">{{diffusion.itemLabel}}</p> + <p mat-line class="subInfo" [title]="diffusion.itemSubLabel"> + {{diffusion.itemSubLabel}}</p> + </div> + </mat-list-item> + </mat-list> + </mat-expansion-panel> + </ng-container> + </ng-container> +</ng-container> +<div *ngIf="loading" style="display:flex;"> + <mat-spinner style="margin:auto;"></mat-spinner> +</div> \ No newline at end of file diff --git a/src/frontend/app/diffusions/history/history-diffusions-list.component.scss b/src/frontend/app/diffusions/history/history-diffusions-list.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..d9b622cfb85709e95e271c09390735fbb13ed66a --- /dev/null +++ b/src/frontend/app/diffusions/history/history-diffusions-list.component.scss @@ -0,0 +1,83 @@ + +.columns { + cursor: move; +} + +.notDraggable { + cursor: not-allowed; +} + +.notEditable { + cursor: initial; +} + +.roleList { + padding-bottom: 40px; +} + +.diffusionList { + min-width: 400px; + box-shadow: none; + + .mat-expansion-panel-header-title { + color: #4A4A4A; + font-weight: bold; + font-size: 13px; + } + + .item-diffusion-list { + height: 55px; + margin-bottom: 10px; + background-color: rgba(216, 216, 216, 0.1); + border-radius: 10px; + font-size: 13px; + + .mat-icon { + font-size: 13px; + height: 13px; + width: 13px; + padding-right: 10px; + } + + .item-diffusion { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; + + .mat-line { + margin: 0px; + } + } + + .subInfo { + font-size: 13px; + opacity: 0.5; + } + + .mat-button { + background: white; + font-size: 13px; + border: 0.5px solid rgba(74, 74, 74, 0.32); + border-radius: 29.5px; + color: #4A4A4A; + } + } +} + +::ng-deep.roleListMenu { + .mat-menu-content { + padding-top: 0; + padding-bottom: 0; + font-size: 13px; + color: #4A4A4A; + } +} + +.dateTitle { + position: sticky; + top: 0px; + z-index: 2; + background: white; +} \ No newline at end of file diff --git a/src/frontend/app/diffusions/history/history-diffusions-list.component.ts b/src/frontend/app/diffusions/history/history-diffusions-list.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..939cea5ec78ed4485febd8ed7a9220e485bf2719 --- /dev/null +++ b/src/frontend/app/diffusions/history/history-diffusions-list.component.ts @@ -0,0 +1,624 @@ +import { Component, Input, OnInit, Renderer2 } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { TranslateService } from '@ngx-translate/core'; +import { NotificationService } from '@service/notification/notification.service'; +import { catchError, map, tap } from 'rxjs/operators'; +import { of } from 'rxjs'; +import { MatDialog } from '@angular/material/dialog'; +import { FunctionsService } from '@service/functions.service'; +import { HeaderService } from '@service/header.service'; + +@Component({ + selector: 'app-history-diffusions-list', + templateUrl: 'history-diffusions-list.component.html', + styleUrls: ['history-diffusions-list.component.scss'], +}) +export class HistoryDiffusionsListComponent implements OnInit { + + + roles: any = []; + loading: boolean = true; + availableRoles: any[] = []; + currentEntityId: number = 0; + userDestList: any[] = []; + + diffListHistory: any[] = []; + + + /** + * Ressource identifier to load listinstance (Incompatible with templateId) + */ + @Input() resId: number = null; + + /** + * Expand all roles + */ + @Input() expanded: boolean = true; + + + constructor( + public translate: TranslateService, + public http: HttpClient, + private notify: NotificationService, + private renderer: Renderer2, + public dialog: MatDialog, + public functions: FunctionsService, + private headerService: HeaderService + ) { } + + async ngOnInit(): Promise<void> { + await this.initRoles(); + if (this.resId !== null) { + this.getListinstanceHistory(); + } + this.loading = false; + } + + getListinstanceHistory() { + this.diffListHistory = [ + { + user: 'Bernard BLIER', + creationDate: '2020-10-06 17:02:19.558904', + listinstance: { + 'dest': { + 'label': 'Attributaire', + 'items': [ + { + 'listinstance_id': 62, + 'item_mode': 'dest', + 'item_type': 'user', + 'itemSerialId': 19, + 'itemId': 'bbain', + 'itemLabel': 'Barbara BAIN', + 'itemSubLabel': 'Pôle Jeunesse et Sport', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'cc': { + 'label': 'En copie', + 'items': [ + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'avis': { + 'label': 'Pour avis', + 'items': [] + } + } + }, + { + user: 'Bernard BLIER', + creationDate: '2020-10-06 17:02:19.558904', + listinstance: { + 'dest': { + 'label': 'Attributaire', + 'items': [ + { + 'listinstance_id': 62, + 'item_mode': 'dest', + 'item_type': 'user', + 'itemSerialId': 19, + 'itemId': 'bbain', + 'itemLabel': 'Barbara BAIN', + 'itemSubLabel': 'Pôle Jeunesse et Sport', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'cc': { + 'label': 'En copie', + 'items': [ + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'avis': { + 'label': 'Pour avis', + 'items': [] + } + } + }, + { + user: 'Bernard BLIER', + creationDate: '2020-10-06 17:02:19.558904', + listinstance: { + 'dest': { + 'label': 'Attributaire', + 'items': [ + { + 'listinstance_id': 62, + 'item_mode': 'dest', + 'item_type': 'user', + 'itemSerialId': 19, + 'itemId': 'bbain', + 'itemLabel': 'Barbara BAIN', + 'itemSubLabel': 'Pôle Jeunesse et Sport', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'cc': { + 'label': 'En copie', + 'items': [ + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'avis': { + 'label': 'Pour avis', + 'items': [] + } + } + }, + { + user: 'Bernard BLIER', + creationDate: '2020-10-06 17:02:19.558904', + listinstance: { + 'dest': { + 'label': 'Attributaire', + 'items': [ + { + 'listinstance_id': 62, + 'item_mode': 'dest', + 'item_type': 'user', + 'itemSerialId': 19, + 'itemId': 'bbain', + 'itemLabel': 'Barbara BAIN', + 'itemSubLabel': 'Pôle Jeunesse et Sport', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'cc': { + 'label': 'En copie', + 'items': [ + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'avis': { + 'label': 'Pour avis', + 'items': [] + } + } + }, + { + user: 'Bernard BLIER', + creationDate: '2020-10-06 17:02:19.558904', + listinstance: { + 'dest': { + 'label': 'Attributaire', + 'items': [ + { + 'listinstance_id': 62, + 'item_mode': 'dest', + 'item_type': 'user', + 'itemSerialId': 19, + 'itemId': 'bbain', + 'itemLabel': 'Barbara BAIN', + 'itemSubLabel': 'Pôle Jeunesse et Sport', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'cc': { + 'label': 'En copie', + 'items': [ + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'avis': { + 'label': 'Pour avis', + 'items': [] + } + } + }, + { + user: 'Bernard BLIER', + creationDate: '2020-10-06 17:02:19.558904', + listinstance: { + 'dest': { + 'label': 'Attributaire', + 'items': [ + { + 'listinstance_id': 62, + 'item_mode': 'dest', + 'item_type': 'user', + 'itemSerialId': 19, + 'itemId': 'bbain', + 'itemLabel': 'Barbara BAIN', + 'itemSubLabel': 'Pôle Jeunesse et Sport', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'cc': { + 'label': 'En copie', + 'items': [ + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + }, + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'avis': { + 'label': 'Pour avis', + 'items': [] + } + } + }, + { + creationDate: '2020-11-06 17:02:19.558904', + listinstance: { + 'dest': { + 'label': 'Attributaire', + 'items': [ + { + 'listinstance_id': 62, + 'item_mode': 'dest', + 'item_type': 'user', + 'itemSerialId': 19, + 'itemId': 'bbain', + 'itemLabel': 'Barbara BAIN', + 'itemSubLabel': 'Pôle Jeunesse et Sport', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'cc': { + 'label': 'En copie', + 'items': [ + { + 'listinstance_id': 63, + 'item_mode': 'cc', + 'item_type': 'entity', + 'itemSerialId': 1, + 'itemId': 'VILLE', + 'itemLabel': 'Ville de Maarch-les-bains', + 'itemSubLabel': '', + 'difflist_type': 'entity_id', + 'process_date': null, + 'process_comment': null + } + ] + }, + 'avis': { + 'label': 'Pour avis', + 'items': [] + } + } + } + ]; + /*return new Promise((resolve, reject) => { + this.http.get(`../rest/resources/${this.resId}/fields/destination?alt=true`).pipe( + tap((data: any) => { + this.currentEntityId = data.field; + diffusions.forEach((element: any) => { + if (!this.functions.empty(this.diffList[element.item_mode])) { + this.diffList.listinstance[element.item_mode].items.push(element); + } + }); + }), + catchError((err: any) => { + this.notify.handleSoftErrors(err); + return of(false); + }) + ).subscribe(); + });*/ + } + + initRoles() { + return new Promise((resolve, reject) => { + this.http.get(`../rest/roles`).pipe( + map((data: any) => { + data.roles = data.roles.map((role: any) => { + return { + ...role, + id: role.id, + }; + }); + return data.roles; + }), + tap((roles: any) => { + this.availableRoles = roles; + resolve(true); + }), + catchError((err: any) => { + this.notify.handleSoftErrors(err); + return of(false); + }) + ).subscribe(); + }); + } +} diff --git a/src/frontend/app/diffusions/history/modal/history-diffusions-list-modal.component.html b/src/frontend/app/diffusions/history/modal/history-diffusions-list-modal.component.html new file mode 100644 index 0000000000000000000000000000000000000000..6c9d50f24dc79e5baa4988cf79b969efeffc7494 --- /dev/null +++ b/src/frontend/app/diffusions/history/modal/history-diffusions-list-modal.component.html @@ -0,0 +1,10 @@ +<div class="mat-dialog-content-container"> + <h1 mat-dialog-title>{{'lang.diffusionHistory' | translate}}</h1> + <div mat-dialog-content style="padding-top: 0px;"> + <app-history-diffusions-list [resId]="data.resId" style="display: contents;"></app-history-diffusions-list> + </div> + <span class="divider-modal"></span> + <div mat-dialog-actions class="actions"> + <button mat-raised-button mat-button [mat-dialog-close]="">{{'lang.close' | translate}}</button> + </div> +</div> diff --git a/src/frontend/app/diffusions/history/modal/history-diffusions-list-modal.component.scss b/src/frontend/app/diffusions/history/modal/history-diffusions-list-modal.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/frontend/app/diffusions/history/modal/history-diffusions-list-modal.component.ts b/src/frontend/app/diffusions/history/modal/history-diffusions-list-modal.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..658b23a901fe46ad07f988fe91ebfa347f125c18 --- /dev/null +++ b/src/frontend/app/diffusions/history/modal/history-diffusions-list-modal.component.ts @@ -0,0 +1,16 @@ +import { Component, Inject, OnInit, Renderer2 } from '@angular/core'; +import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; + +@Component({ + templateUrl: 'history-diffusions-list-modal.component.html', + styleUrls: ['history-diffusions-list-modal.component.scss'], +}) +export class HistoryDiffusionsListModalComponent implements OnInit { + constructor( + public dialog: MatDialog, + @Inject(MAT_DIALOG_DATA) public data: any, + public dialogRef: MatDialogRef<HistoryDiffusionsListModalComponent>, + ) { } + + ngOnInit() { } +} diff --git a/src/lang/lang-fr.json b/src/lang/lang-fr.json index 8dd4b1e9b3e3ac9cb8cd9aac7d61bfbadcd5ecde..b80e74fb8cef2c8e42c93e231dc6c161dfdf6a00 100644 --- a/src/lang/lang-fr.json +++ b/src/lang/lang-fr.json @@ -2189,5 +2189,7 @@ "confirmRescanTitle": "Recommandé déjà reçu", "confirmRescanToDistributed": "Ce recommandé a déjà été scanné «Non distribué». Voulez-vous le rescanner en «Distribué» ?", "confirmRescanToNotDistributed": "Ce recommandé a déjà été scanné «Distribué». Voulez-vous le rescanner en «Non distribué» ?", - "selectReturnReason": "Veuillez sélectionner un motif de retour" + "selectReturnReason": "Veuillez sélectionner un motif de retour", + "diffusionHistory": "Historique de diffusion", + "showDiffusionHistory": "Afficher l'historique de diffusion" }