Verified Commit 9a8eac8a authored by Alex ORLUC's avatar Alex ORLUC

FEAT #11643 TIME 1 add info folder in folder list

parent 6b5d4d45
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
[selectedId]="folderInfo.id"></panel-folder> [selectedId]="folderInfo.id"></panel-folder>
</mat-sidenav> </mat-sidenav>
<mat-sidenav-content> <mat-sidenav-content>
<mat-card id="viewThumbnail" style="display:none;position: fixed;z-index: 2;margin-left: 1px;"><img <mat-card id="viewThumbnail" style="display:none;position: fixed;z-index: 2;margin-left: 1px;">
style="max-height: 100vh;" src="{{thumbnailUrl}}" /></mat-card> <img style="max-height: 100vh;" src="{{thumbnailUrl}}" />
</mat-card>
<div class="bg-head"> <div class="bg-head">
<div class="bg-head-title" [class.customContainerRight]="appService.getViewMode()"> <div class="bg-head-title" [class.customContainerRight]="appService.getViewMode()">
<div class="bg-head-title-label"> <div class="bg-head-title-label">
...@@ -22,13 +23,38 @@ ...@@ -22,13 +23,38 @@
<header-right></header-right> <header-right></header-right>
</div> </div>
</div> </div>
<div class="bg-head-content" [class.fullContainer]="appService.getViewMode()"> <div class="bg-head-content" [class.fullContainer]="appService.getViewMode()" style="padding-bottom: 20px;">
<app-filters-tool style="flex:1;overflow-x: auto;overflow-y: hidden;" #filtersTool <app-filters-tool style="flex:1;overflow-x: auto;overflow-y: hidden;" #filtersTool
[listProperties]="this.listProperties" [snavR]="snav2" [totalRes]="allResInBasket.length" [listProperties]="this.listProperties" [snavR]="snav2" [totalRes]="allResInBasket.length"
[selectedRes]="selectedRes" [routeDatas]="'/rest/folders/' + folderInfo.id + '/filters'" (toggleAllRes)="toggleAllRes($event)" [selectedRes]="selectedRes" [routeDatas]="'/rest/folders/' + folderInfo.id + '/filters'"
(refreshEventAfterAction)="refreshDaoAfterAction()" (refreshEvent)="refreshDao()" [title]="lang.searchMailInFolder"> (toggleAllRes)="toggleAllRes($event)" (refreshEventAfterAction)="refreshDaoAfterAction()"
(refreshEvent)="refreshDao()" [title]="lang.searchMailInFolder">
</app-filters-tool> </app-filters-tool>
</div> </div>
<div class="bg-head-content" [class.fullContainer]="appService.getViewMode()">
<div class="banner">
<div class="banner-title">
{{lang.informations}} du dossier
<div class="banner-title-divider"></div>
</div>
<div class="banner-content">
<div class="banner-content-item">
Propriétaire :<br /><b>{{folderInfo.ownerDisplayName}}</b>
</div>
<div *ngIf="folderInfo.entitiesSharing.length === 0" class="banner-content-item private">
Dossier privé
</div>
<div *ngIf="folderInfo.entitiesSharing.length > 0" class="banner-content-item">
Visible par :<br />
<div style="max-height: 100px;overflow: auto;">
<div *ngFor="let entity of folderInfo.entitiesSharing | sortBy">
<b color="secondary">{{entity}}</b>
</div>
</div>
</div>
</div>
</div>
</div>
</div> </div>
<div class="container" [class.fullContainer]="appService.getViewMode()"> <div class="container" [class.fullContainer]="appService.getViewMode()">
<div class="container-content"> <div class="container-content">
...@@ -48,7 +74,8 @@ ...@@ -48,7 +74,8 @@
<div class="table-head-tool"> <div class="table-head-tool">
<span> <span>
<app-folder-action-list #actionsList [contextMode]="false" [currentFolderInfo]="folderInfo" <app-folder-action-list #actionsList [contextMode]="false" [currentFolderInfo]="folderInfo"
[totalRes]="allResInBasket.length" [selectedRes]="selectedRes" (refreshEvent)="refreshDaoAfterAction()" [totalRes]="allResInBasket.length" [selectedRes]="selectedRes"
(refreshEvent)="refreshDaoAfterAction()"
(refreshPanelFolders)="panelFolder.refreshFoldersTree()"> (refreshPanelFolders)="panelFolder.refreshFoldersTree()">
</app-folder-action-list> </app-folder-action-list>
</span> </span>
...@@ -61,8 +88,8 @@ ...@@ -61,8 +88,8 @@
<div style="height:90%;overflow:auto;position:absolute;width:100%;"> <div style="height:90%;overflow:auto;position:absolute;width:100%;">
<table #tableBasketListSort="matSort" cdkDropList id="folder-list" <table #tableBasketListSort="matSort" cdkDropList id="folder-list"
[cdkDropListConnectedTo]="listTodrag()" [cdkDropListData]="data" [cdkDropListConnectedTo]="listTodrag()" [cdkDropListData]="data"
[cdkDropListDisabled]="dragInit || appService.getViewMode()" mat-table [dataSource]="data" matSort matSortActive="res_id" [cdkDropListDisabled]="dragInit || appService.getViewMode()" mat-table [dataSource]="data"
matSortDisableClear matSortDirection="asc" style="width:100%;"> matSort matSortActive="res_id" matSortDisableClear matSortDirection="asc" style="width:100%;">
<ng-container matColumnDef="res_id"> <ng-container matColumnDef="res_id">
<td mat-cell *matCellDef="let row" <td mat-cell *matCellDef="let row"
...@@ -78,11 +105,7 @@ ...@@ -78,11 +105,7 @@
class="main-info-status"> class="main-info-status">
<mat-icon *ngIf="row.isLocked !== true" title="{{row.statusLabel}}" <mat-icon *ngIf="row.isLocked !== true" title="{{row.statusLabel}}"
[ngStyle]="{'color': row.priorityColor}" color="primary" [ngStyle]="{'color': row.priorityColor}" color="primary"
class="{{row.statusImage.charAt(0)}}{{row.statusImage.charAt(1)}} {{row.statusImage}} {{row.statusImage.charAt(0)}}{{row.statusImage.charAt(1)}}-2x statusIcon"> class="{{row.statusImage.charAt(0)}}{{row.statusImage.charAt(1)}} {{row.statusImage}} {{row.statusImage.charAt(0)}}{{row.statusImage.charAt(1)}}-2x">
</mat-icon>
<mat-icon *ngIf="row.isLocked !== true" title="{{row.statusLabel}}"
[ngStyle]="{'color': row.priorityColor}" color="primary"
class="fa fa-folder-open fa-2x">
</mat-icon> </mat-icon>
<span *ngIf="row.confidentiality === 'Y'" <span *ngIf="row.confidentiality === 'Y'"
class="watermark">{{lang.confidential}}</span> class="watermark">{{lang.confidential}}</span>
...@@ -95,8 +118,8 @@ ...@@ -95,8 +118,8 @@
style="width:200px;text-align:center;cursor:pointer;"> style="width:200px;text-align:center;cursor:pointer;">
<ng-container <ng-container
*ngIf="row.alt_identifier == lang.undefined && row.barcode != lang.undefined"> *ngIf="row.alt_identifier == lang.undefined && row.barcode != lang.undefined">
<span style="color: rgba(0,0,0,0.4);font-size: 90%;"><i <span style="color: rgba(0,0,0,0.4);font-size: 90%;">
title="{{lang.barcode}}" class="fas fa-barcode"></i> <i title="{{lang.barcode}}" class="fas fa-barcode"></i>
{{row.barcode}}</span> {{row.barcode}}</span>
</ng-container> </ng-container>
<ng-container *ngIf="row.barcode == lang.undefined"> <ng-container *ngIf="row.barcode == lang.undefined">
...@@ -104,7 +127,8 @@ ...@@ -104,7 +127,8 @@
</ng-container> </ng-container>
</span> </span>
<span class="main-info-data" style="font-weight:bold;flex:1;cursor:pointer;" <span class="main-info-data" style="font-weight:bold;flex:1;cursor:pointer;"
[class.undefined]="row.subject == lang.undefined" title="{{row.subject}}">{{row.subject | shorten: 150: '...'}}</span> [class.undefined]="row.subject == lang.undefined"
title="{{row.subject}}">{{row.subject | shorten: 150: '...'}}</span>
<span class="main-info-action"> <span class="main-info-action">
<button mat-icon-button title="{{lang.notes}}" <button mat-icon-button title="{{lang.notes}}"
(click)="$event.stopPropagation();togglePanel('note',row)" (click)="$event.stopPropagation();togglePanel('note',row)"
...@@ -138,12 +162,15 @@ ...@@ -138,12 +162,15 @@
</td> </td>
</ng-container> </ng-container>
<tr mat-row *matRowDef="let row; columns: displayedColumnsBasket;" <tr mat-row *matRowDef="let row; columns: displayedColumnsBasket;"
(contextmenu)="open($event,row);" (click)="open($event,row);" class="rowData" style="cursor: pointer;" [class.locked]="row.isLocked == true" (contextmenu)="open($event,row);" (click)="open($event,row);" class="rowData"
cdkDrag (cdkDragStarted)="selectSpecificRes(row);" [cdkDragData]="row"> style="cursor: pointer;" [class.locked]="row.isLocked == true" cdkDrag
(cdkDragStarted)="selectSpecificRes(row);" [cdkDragData]="row">
<div class="example-custom-placeholder" *cdkDragPlaceholder></div> <div class="example-custom-placeholder" *cdkDragPlaceholder></div>
<div class="dragPreview" *cdkDragPreview><i <div class="dragPreview" *cdkDragPreview><i class="fas fa-envelope-open-text fa-2x"></i>
class="fas fa-envelope-open-text fa-2x"></i><br />{{lang.classifyInFolder}} : <br />
<b>{{row.alt_identifier}}</b></div> {{lang.classifyInFolder}} :
<b>{{row.alt_identifier}}</b>
</div>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -168,6 +195,7 @@ ...@@ -168,6 +195,7 @@
<mat-divider></mat-divider> <mat-divider></mat-divider>
</mat-sidenav> </mat-sidenav>
</mat-sidenav-container> </mat-sidenav-container>
<app-folder-action-list #actionsListContext [contextMode]="true" [currentFolderInfo]="folderInfo" [totalRes]="allResInBasket.length" <app-folder-action-list #actionsListContext [contextMode]="true" [currentFolderInfo]="folderInfo"
[selectedRes]="selectedRes" (refreshEvent)="refreshDaoAfterAction()" (refreshPanelFolders)="panelFolder.refreshFoldersTree()"> [totalRes]="allResInBasket.length" [selectedRes]="selectedRes" (refreshEvent)="refreshDaoAfterAction()"
(refreshPanelFolders)="panelFolder.refreshFoldersTree()">
</app-folder-action-list> </app-folder-action-list>
\ No newline at end of file
...@@ -9,12 +9,58 @@ ...@@ -9,12 +9,58 @@
color: $primary; color: $primary;
} }
.statusIcon { .banner {
font-size: 10px; display: flex;
position: absolute; flex-direction: column;
right: 0px; margin: 10px;
background: white; border-radius: 20px;
padding: 3px; border: solid 1px #ccc;
border-radius: 10px; position: relative;
border: solid 1px; padding: 20px;
background: lighten($primary, 10%);
width: 100%;
&-title {
white-space: pre;
overflow: hidden;
max-width: 85%;
text-overflow: ellipsis;
z-index: 1;
font-size: 20px;
font-weight: bold;
letter-spacing: 2px;
position: absolute;
top: -18px;
left: 20px;
padding: 0px;
margin: 0px;
color: white;
&-divider {
position: absolute;
width: 99%;
z-index: -1;
top: 17px;
background: lighten($primary, 10%);
height: 1px;
}
}
&-content {
display: flex;
font-size: 16px;
&-item {
flex: 1;
padding-left: 20px;
padding-right: 20px;
}
.private {
font-style: italic;
display: flex;
justify-content: flex-end;
align-items: center;
}
}
} }
\ No newline at end of file
...@@ -133,7 +133,9 @@ export class FolderDocumentListComponent implements OnInit { ...@@ -133,7 +133,9 @@ export class FolderDocumentListComponent implements OnInit {
this.folderInfo = this.folderInfo =
{ {
'id': params['folderId'], 'id': params['folderId'],
'label': data.folder.label 'label': data.folder.label,
'ownerDisplayName': data.folder.ownerDisplayName,
'entitiesSharing': data.folder.sharing.entities.map((entity: any) => entity.label),
}; };
this.headerService.setHeader(this.folderInfo.label, '', 'fa fa-folder-open'); this.headerService.setHeader(this.folderInfo.label, '', 'fa fa-folder-open');
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -56,6 +56,10 @@ $theme: mat-light-theme($primary, $accent, $warn); ...@@ -56,6 +56,10 @@ $theme: mat-light-theme($primary, $accent, $warn);
color: mat-color($primary, 500); color: mat-color($primary, 500);
} }
[color=secondary] {
color: $secondary;
}
[color=warn] { [color=warn] {
color: mat-color($warn, 500); color: mat-color($warn, 500);
} }
......
import { Pipe } from '@angular/core'; import { Pipe } from '@angular/core';
import { LatinisePipe } from "ngx-pipes"; import { LatinisePipe } from "ngx-pipes";
@Pipe({name: "sortBy"}) @Pipe({ name: "sortBy" })
export class SortPipe { export class SortPipe {
constructor(private latinisePipe: LatinisePipe) {} constructor(private latinisePipe: LatinisePipe) { }
transform(array: Array<string>, args: string): Array<string> { transform(array: Array<string>, args: string): Array<string> {
let normA = '';
array.sort((a: any, b: any) => { let normB = '';
const normA=this.latinisePipe.transform(a[args]).toLocaleLowerCase(); if (array !== undefined) {
const normB=this.latinisePipe.transform(b[args]).toLocaleLowerCase(); array.sort((a: any, b: any) => {
if (args === undefined) {
if ( normA < normB ){ normA = this.latinisePipe.transform(a).toLocaleLowerCase();
return -1; normB = this.latinisePipe.transform(b).toLocaleLowerCase();
}else if( normA > normB ){ } else {
return 1; normA = this.latinisePipe.transform(a[args]).toLocaleLowerCase();
}else{ normB = this.latinisePipe.transform(b[args]).toLocaleLowerCase();
return 0; }
} if (normA < normB) {
}); return -1;
return array; } else if (normA > normB) {
return 1;
} else {
return 0;
}
});
return array;
} else {
return [];
}
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment