Skip to content
Snippets Groups Projects
basket-list.component.html 17.2 KiB
Newer Older
  • Learn to ignore specific revisions
  •     <mat-sidenav-container class="maarch-container">
    
            <mat-sidenav-content>
    
                <mat-card id="viewThumbnail" style="display:none;position: fixed;z-index: 2;margin-left: 1px;"><img style="max-height: 100vh;" src="{{thumbnailUrl}}" /></mat-card>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                <div class="bg-head">
    
                    <div class="bg-head-title" [class.customContainerRight]="appService.getViewMode()">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                        <div class="bg-head-title-label">
    
                            <header-left></header-left>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                        </div>
                        <div class="bg-head-title-tool">
    
                           <header-right></header-right>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                        </div>
    
                    <div class="bg-head-content" [class.fullContainer]="appService.getViewMode()">
    
                        <app-filters-tool style="flex:1;overflow-x: auto;overflow-y: hidden;" #filtersTool
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                            [listProperties]="this.listProperties" [snavR]="snav2" [totalRes]="allResInBasket.length"
    
                            [selectedRes]="selectedRes" [routeDatas]="'/rest/resourcesList/users/' + this.currentBasketInfo.ownerId + '/groups/' + currentBasketInfo.groupId + '/baskets/' + currentBasketInfo.basketId + '/filters'" (toggleAllRes)="toggleAllRes($event)"
                            (refreshEventAfterAction)="refreshDaoAfterAction()" (refreshEvent)="refreshDao()" [title]="lang.searchMailInBasket">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                        </app-filters-tool>
                    </div>
                </div>
    
                <div class="container" [class.fullContainer]="appService.getViewMode()">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                    <div class="container-content">
                        <div class="example-loading-shade" *ngIf="isLoadingResults">
                            <mat-spinner *ngIf="isLoadingResults"></mat-spinner>
                        </div>
                        <div class="table-head">
                            <div class="table-head-result">
                                <mat-checkbox color="primary"
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                    [checked]="selectedRes.length == allResInBasket.length && selectedRes.length > 0"
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                    [indeterminate]="selectedRes.length > 0 && selectedRes.length < allResInBasket.length"
                                    style="margin: 10px;padding-right: 10px;" title="{{lang.selectAllResInBasket}}"
                                    (change)="toggleAllRes($event)"></mat-checkbox>&nbsp;{{allResInBasket.length}}
                                {{lang.records | ucfirst}}&nbsp;<small
    
                                    *ngIf="selectedRes.length > 0">- {{selectedRes.length}}
                                    {{lang.selected}}</small>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                            <div class="table-head-tool">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                <span>
    
                                    <mat-paginator #paginatorResultList [length]="resultsLength" [pageSizeOptions]="[10, 25, 50, 100, 150]"
                                        class="paginatorResultList"></mat-paginator>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                </span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                <span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                    <app-tools-list #actionsList [selectedRes]="selectedRes"
                                        [currentBasketInfo]="currentBasketInfo"></app-tools-list>
                                </span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                <span>
    
                                    <app-actions-list #actionsList (refreshEvent)="refreshDao()"
                                        [contextMode]="false" [totalRes]="allResInBasket.length" [selectedRes]="selectedRes"
    
                                        [currentBasketInfo]="currentBasketInfo" [currentResource]="currentResource" (refreshPanelFolders)="foldersService.getFolders()"></app-actions-list>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                </span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                        <div style="height:90%;overflow:auto;position:absolute;width:100%;">
    
                            <table cdkDropList id="document-list" [cdkDropListConnectedTo]="listTodrag()" [cdkDropListData]="data" #tableBasketListSort="matSort" mat-table [dataSource]="data" matSort
    
                                matSortActive="resId" matSortDisableClear matSortDirection="asc" style="width:100%;" [cdkDropListDisabled]="dragInit || appService.getViewMode()">
    
                                <ng-container matColumnDef="resId">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                    <td mat-cell *matCellDef="let row"
    
                                        style="padding:0;border-top: solid 1px rgba(0, 0, 0, 0.12);"
                                        [class.selected-data]="row.checked">
    
                                        <div *ngIf="!snav2.opened && !appService.getViewMode() && row.display.length > 0" class="sub-info">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                            <span class="sub-info-data" [class]="data.cssClasses.join(' ')"
                                                *ngFor="let data of row.display" style="flex:1;white-space: pre;
                                        overflow: hidden;
                                        text-overflow: ellipsis;
                                        padding-left: 5px;
    
                                        padding-right: 5px;" [class.hasEvent]="data.event" (click)="launchEventSubData(data, row)">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                <ng-container *ngIf="data.value == 'getCreationAndProcessLimitDates'">
                                                    <ng-container *ngIf="row.closing_date != lang.undefined">
                                                        <i class="fa fa-lock" title="{{lang.closingDate}}"></i>&nbsp;<span
                                                            [innerHTML]="row.closing_date | timeAgo"
    
                                                            title='{{row.closing_date | fullDate}}'></span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    </ng-container>
                                                    <ng-container *ngIf="row.closing_date == lang.undefined">
                                                        <i class="fa fa-calendar"
                                                            title="{{lang.creationDate}}"></i>&nbsp;<span
                                                            [innerHTML]="data.displayValue.creationDate | timeAgo"
    
                                                            title='{{data.displayValue.creationDate | fullDate}}'></span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                        - <i class="fa fa-stopwatch"
                                                            title="{{lang.processLimitDate}}"></i>&nbsp;<span
                                                            [innerHTML]="data.displayValue.processLimitDate | timeLimit"
    
                                                            title='{{data.displayValue.processLimitDate | fullDate}}'></span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    </ng-container>
                                                </ng-container>
                                                <ng-container *ngIf="data.icon != ''">
                                                    <i class="fa {{data.icon}}" title="{{data.label}}"></i>
                                                    &nbsp;
                                                </ng-container>
                                                <ng-container *ngIf="data.value == 'getCategory'">
                                                    <span *ngIf="!lang[data.displayValue]" style="opacity: 0.5"
    
    Vinciane's avatar
    Vinciane committed
                                                        title="id: {{data.displayValue}}">{{lang.undefined}}</span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    <span *ngIf="lang[data.displayValue]"
                                                        title="{{lang[data.displayValue]}}">{{lang[data.displayValue]}}</span>
                                                </ng-container>
                                                <ng-container
                                                    *ngIf="data.value != 'getCategory' && data.value != 'getCreationAndProcessLimitDates'">
                                                    <span *ngIf="!data.value.includes('Date')" title="{{data.displayTitle}}"
    
                                                        [innerHTML]="data.displayValue"></span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    <span *ngIf="data.value.includes('Date')"
                                                        [innerHTML]="data.displayValue | timeAgo"></span>
                                                </ng-container>
                                            </span>
                                        </div>
                                        <div class="main-info">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                            <span style="width:50px;height: 16px;">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                <mat-checkbox color="primary" [checked]="row.checked"
                                                    (change)="toggleRes($event,row)" (click)="$event.stopPropagation();">
                                                </mat-checkbox>
                                            </span>
    
                                            <button mat-icon-button (click)="$event.stopPropagation();toggleMailTracking(row)" style="margin-left: -25px;"
                                                class="followIcon"
    
                                                [title]="row.mailTracking === true ? lang.untrackThisMail : lang.trackThisMail">
                                                <mat-icon [ngClass]="[row.mailTracking === true ? 'fas fa-star' : 'far fa-star']"></mat-icon>
                                            </button>
    
                                            <span *ngIf="!appService.getViewMode()" style="cursor:pointer;" class="main-info-status" (click)="launch(defaultAction,row);">
    
                                                <mat-icon *ngIf="row.isLocked !== true" title="{{row.statusLabel}}" [ngStyle]="{'color': row.priorityColor}" color="primary"
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    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 === 'Y'" class="watermark">{{lang.confidential}}</span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                <mat-icon *ngIf="row.isLocked === true" title="{{lang.warnLockResInProgress}} : {{row.locker}}" style="color: red;" class="fa fa-lock fa-2x">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                            </span>
    
                                            <span *ngIf="!appService.getViewMode()" class="main-info-data" style="width:200px;text-align:center;cursor:pointer;" (click)="launch(defaultAction,row);">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                <ng-container
    
                                                    *ngIf="row.chrono == lang.undefined && row.barcode != lang.undefined">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    <span style="color: rgba(0,0,0,0.4);font-size: 90%;"><i
                                                            title="{{lang.barcode}}" class="fas fa-barcode"></i>
                                                        {{row.barcode}}</span>
                                                </ng-container>
    
                                                <ng-container *ngIf="row.chrono != lang.undefined">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                </ng-container>
                                            </span>
    
                                            <span class="main-info-data" style="font-weight:bold;flex:1;cursor:pointer;"
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                [class.undefined]="row.subject == lang.undefined"
    
                                                title="{{row.subject}}" (click)="launch(defaultAction,row);">{{row.subject | shorten: 150: '...'}}</span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                            <span class="main-info-action">
                                                <button mat-icon-button title="{{lang.notes}}"
    
                                                    (click)="$event.stopPropagation();togglePanel('note',row)"
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    [class.noData]="row.countNotes == 0">
                                                    <mat-icon matBadgeHidden="{{row.countNotes == 0}}" fontSet="fas"
    
                                                        matBadge="{{row.countNotes}}" fontIcon="fa-comments fa-2x" [color]="snav2.opened && row.checked && currentMode == 'note' ? 'primary' : ''">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    </mat-icon>
                                                </button>
                                                <button mat-icon-button title="{{lang.attachments}}"
    
                                                    (click)="$event.stopPropagation();togglePanel('attachment',row)"
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    [class.noData]="row.countAttachments == 0">
                                                    <mat-icon matBadgeHidden="{{row.countAttachments == 0}}" fontSet="fas"
    
                                                        matBadge="{{row.countAttachments}}" fontIcon="fa-paperclip fa-2x" [color]="snav2.opened && row.checked && currentMode == 'attachment' ? 'primary' : ''">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    </mat-icon>
                                                </button>
                                                <button mat-icon-button title="{{lang.diffusionList}}"
    
                                                    (click)="$event.stopPropagation();togglePanel('diffusion',row)">
    
                                                    <mat-icon fontSet="fas" fontIcon="fa-sitemap fa-2x" [color]="snav2.opened && row.checked && currentMode == 'diffusion' ? 'primary' : ''"></mat-icon>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                </button>
    
                                                <button mat-icon-button title="{{lang.viewResource}}" (click)="$event.stopPropagation();viewDocument(row)"
    
                                                    (mouseenter)="viewThumbnail(row);" (mouseleave)="closeThumbnail();"
                                                    [disabled]="!row.hasDocument">
    
                                                    <mat-icon class="fa" [ngClass]="[row.hasDocument ? 'fa-eye' : 'fa-eye-slash']"></mat-icon>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                <button mat-icon-button title="{{lang.linkDetails}}"
    
                                                    (click)="$event.stopPropagation();goToDetail(row);">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                                    <mat-icon fontSet="fas" fontIcon="fa-info-circle fa-2x"></mat-icon>
                                                </button>
                                            </span>
                                        </div>
    
                                        <div *ngIf="displayFolderTags && row.folders !== undefined && row.folders.length > 0" class="folder-info">
    
                                            <span class="badge badge-folder" *ngFor="let folder of row.folders | sortBy : 'label'" routerLink="/folders/{{folder.id}}" title="{{lang.goToFolder}} : {{folder.label}}"><i class="fa fa-folder"></i> {{folder.label}}</span>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                                    </td>
                                </ng-container>
                                <tr mat-row *matRowDef="let row; columns: displayedColumnsBasket;"
    
                                    (contextmenu)="open($event,row);" class="rowData" [class.locked]="row.isLocked == true" cdkDrag (cdkDragStarted)="selectSpecificRes(row);" [cdkDragData]="row" >
    
                                    <div class="example-custom-placeholder" *cdkDragPlaceholder></div>
    
                                    <div class="dragPreview" *cdkDragPreview><i class="fas fa-envelope-open-text fa-2x"></i><br/>{{lang.classifyInFolder}} : <b>{{row.chrono}}</b></div>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                            </table>
                        </div>
                        <div class="table-head">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                </div>
    
            </mat-sidenav-content>
    
            <mat-sidenav #snav2 [fixedInViewport]="appService.getViewMode()" position='end'
                [opened]="appService.getViewMode() ? false : false" [mode]="appService.getViewMode() ? 'over' : 'side'" class="panel-right" style="overflow-x:hidden;"
                [class.docView]="!filtersListService.filterMode" [ngStyle]="{'width': appService.getViewMode() ? '80%' : '30%'}"
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                autoFocus="false">
                <div *ngIf="innerHtml && !filtersListService.filterMode" [matTooltip]="currentChrono"
                    [innerHTML]="innerHtml" style="height: 100%;overflow: hidden;"></div>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                    <div style="display:flex;position: sticky;top: 0px;z-index: 2;">
                        <button mat-icon-button (click)="snav2.close()" style="font-size: 20px;color:#666;">
    
                        <mat-icon class="fa fa-arrow-right"></mat-icon>
                    </button>
                </div>
    
                <app-panel-list #appPanelList (refreshBadgeNotes)="refreshBadgeNotes($event)" (refreshBadgeAttachments)="refreshBadgeAttachments($event)"></app-panel-list>
    
                <mat-divider></mat-divider>
            </mat-sidenav>
        </mat-sidenav-container>
    
        <app-actions-list (refreshEvent)="refreshDao()" (refreshEventAfterAction)="refreshDaoAfterAction()" #actionsListContext [contextMode]="true"
    
            [totalRes]="allResInBasket.length" [selectedRes]="selectedRes" [currentBasketInfo]="currentBasketInfo" (refreshPanelFolders)="foldersService.getFolders()">