Skip to content
Snippets Groups Projects
linked-resource-list.component.html 3.78 KiB
Newer Older
  • Learn to ignore specific revisions
  • <mat-card id="viewThumbnail" style="display:none;position: fixed;z-index: 2;margin-left: 1px;left: 50%;transform: translate(-50%,-50%);top: 50%;"><img style="max-height: 100vh;" src="{{thumbnailUrl}}" /></mat-card>
    
    <div class="row">
        <div class="col-md-12">
            <mat-paginator #paginator [length]="100" [hidePageSize]="true" [pageSize]="10">
            </mat-paginator>
        </div>
    </div>
    <mat-table #table [dataSource]="dataSource" matSort matSortActive="resId" matSortDirection="asc">
        <ng-container matColumnDef="resId">
    
            <mat-cell *matCellDef="let row" style="flex: 1;flex-direction: column;padding: 0px;">
                <div class="sub-info">
                    <span class="sub-info-data col-md-4">
                        <i class="fas fa-exchange-alt" title="{{lang.category}}"></i>
                        &nbsp;
                        <span title="{{lang[row.categoryId]}}">{{lang[row.categoryId]}}</span>
                    </span>
                    <span class="sub-info-data col-md-4  text-center">
                        <i class="fas fa-user" title="{{lang.contact}}"></i>
                        &nbsp;
                        <span [title]="'Pierre BRUNEL'">Pierre BRUNEL</span>
                    </span>
                    <span class="sub-info-data col-md-4 text-right">
                        <i class="fas fa-calendar" title="{{lang.creationDate}}"></i>
                        &nbsp;
                        <span [title]="row.documentDate | fullDate">{{row.documentDate | timeAgo : 'full' | ucfirst}}</span>
                    </span>
                    <span class="sub-info-data col-md-6">
                        <i class="fas fa-sitemap" title="{{lang.getAssignee}}"></i>
                        &nbsp;
                        <span
                            [title]="row.destUserLabel + ' (' + row.destinationLabel +  ')'">{{row.destUserLabel + ' (' + row.destinationLabel +  ')'}}</span>
                    </span>
                    <span class="sub-info-data col-md-6 text-right" *ngIf="row.visaCircuit.length > 0">
                        <i class="fas fa-list-ol" title="{{lang.visaWorkflow}}"></i>
                        &nbsp;
                        <span [title]="getUsersVisaCircuit(row)">{{getUsersVisaCircuit(row)}}</span>
                    </span>
                </div>
                <div class="main-info">
                    <span class="main-info-status">
                        <mat-icon title="{{row.statusLabel}}" [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">
                        </mat-icon>
                        <span *ngIf="row.confidentiality" class="watermark">{{lang.confidential}}</span>
                    </span>
                    <span class="main-info-data" style="width:200px;text-align:center;">
                        {{row.chrono}}
                    </span>
                    <span class="main-info-data" style="font-weight:bold;flex:1;"
                        [class.undefined]="row.subject == lang.undefined"
                        title="{{row.subject}}">{{row.subject | shorten: 150: '...'}}</span>
                    <span class="main-info-data">
                        <button mat-icon-button color="warn" [title]="lang.unlink" (click)="$event.stopPropagation();unlinkResource(row)">
                            <mat-icon class="fa fa-unlink fa-2x" aria-hidden="true"></mat-icon>
                        </button>
                    </span>
                </div>
    
            </mat-cell>
        </ng-container>
    
        <mat-row *matRowDef="let row; columns: displayedColumns;" (mouseenter)="viewThumbnail(row);" (mouseleave)="closeThumbnail();"></mat-row>
    
    <button mat-fab class="linkRes" color="primary" [title]="lang.linkResource" (click)="openSearchResourceModal()">
        <mat-icon class="fa fa-link" style="height:auto;"></mat-icon>
    </button>