diff --git a/src/frontend/app/document/document-list/document-list.component.html b/src/frontend/app/document/document-list/document-list.component.html index 8713965642a06c46368ddce1230e99e1c6a71672..b817507e62f679103cf7a27ca80061421a2e56f9 100644 --- a/src/frontend/app/document/document-list/document-list.component.html +++ b/src/frontend/app/document/document-list/document-list.component.html @@ -1,40 +1,25 @@ -<ng-container *ngIf="!loading"> - <div style="font-size: 30px;opacity: 0.1;padding-bottom: 30px;text-align: center;"> - <mat-icon fontSet="fas" fontIcon="fa-list-ol fa-2x"></mat-icon> Documents +<div class="panel-content" *ngIf="!loading"> + <div class="panel-header"> + <button class="closePanel" mat-icon-button type="button" (tap)="snavRightComponent.close();"> + <mat-icon fontSet="fas" fontIcon="fa-arrow-right fa-2x"></mat-icon> + </button> + <mat-icon fontSet="fas" fontIcon="fa-file fa-2x"></mat-icon> <b>{{mainDocument.attachments.length + 1}}</b> document(s) </div> - <div *ngIf="attachments.length == 0" style="text-align:center;font-size:24px;font-weight:bold;opacity:0.3;"> - {{'lang.noAttachment' | translate}} - </div> - <!--<mat-list> - <h3 mat-subheader>Document à signer / annoter</h3> - <mat-list-item *ngFor="let attachment of attachments"> - <ng-container *ngIf="attachment.main == true"> - <p mat-line style="width: 100%;"> <button mat-raised-button - [style.background-image]="'url('+attachment.thumbnailUrl+')'" - style="margin:10px;height: 400px;width: 100%;background-size: contain;background-repeat: no-repeat;background-position: center;"></button> - </p> - </ng-container> - </mat-list-item> - <mat-divider></mat-divider> - <h3 mat-subheader>Annexes</h3> - <mat-list-item *ngFor="let attachment of attachments"> - <ng-container *ngIf="attachment.main == false"> - <p mat-line style="width: 100%;"> <button mat-raised-button - [style.background-image]="'url('+attachment.thumbnailUrl+')'" - style="margin:10px;height: 400px;width: 100%;background-size: contain;background-repeat: no-repeat;background-position: center;"></button> - </p> - </ng-container> - - </mat-list-item> - </mat-list>--> - <div style="padding-left:30px;padding-right: 30px;"> - <mat-card *ngFor="let attachment of attachments;let i=index" [style.background-image]="'url('+attachment.thumbnailUrl+')'" - style="padding:0;margin-top: 30px;height: 400px;width: 100%;background-size: contain;background-repeat: no-repeat;background-position: center;"> + <div class="pjListContent"> + <mat-card [style.background-image]="'url('+mainDocument.thumbnailUrl+')'" [class.current]="mainDocument.id == currentDocId" + style="padding:0;margin-top: 30px;height: 400px;width: 100%;background-size: contain;background-repeat: no-repeat;background-position: center;" + (click)="loadDoc(mainDocument.id)"> + <div class="pjToolsContent"> + Main doc + </div> + </mat-card> + <mat-card *ngFor="let attachment of mainDocument.attachments;let i=index" + [style.background-image]="'url('+attachment.thumbnailUrl+')'" [class.current]="attachment == currentDocId" + style="padding:0;margin-top: 30px;height: 400px;width: 100%;background-size: contain;background-repeat: no-repeat;background-position: center;" + (click)="loadDoc(attachment)"> <div class="pjToolsContent"> - Annexes {{i}} + Annexes {{i}} </div> </mat-card> </div> - - -</ng-container> \ No newline at end of file +</div> \ No newline at end of file diff --git a/src/frontend/app/document/document-list/document-list.component.scss b/src/frontend/app/document/document-list/document-list.component.scss index 798a601750f9afd5d88ef831ff9e8a52acb50b79..cfb335de10d383e55ed1253e7bb6d28086dc10b0 100644 --- a/src/frontend/app/document/document-list/document-list.component.scss +++ b/src/frontend/app/document/document-list/document-list.component.scss @@ -51,4 +51,39 @@ border-bottom-left-radius: 5px; background: white; padding: 10px; +} + +.current { + box-shadow: 0px 0px 20px 0px #656565; +} + +.panel-header { + box-shadow: 0px 0px 10px 0px #656565; + color: white; + background: $primary; + height: 65px; + display: flex; + justify-content: center; + position: relative; + font-size: 20px; + align-items: center; +} +.pjListContent { + padding-left: 30px; + padding-right: 30px; + flex: 1; + overflow: auto; +} +.panel-content { + display: flex; + flex-direction: column; + position: relative; + height: 100%; + overflow: hidden; +} + +.closePanel { + position: absolute; + left: 0px; + font-size: 24px; } \ No newline at end of file diff --git a/src/frontend/app/document/document-list/document-list.component.ts b/src/frontend/app/document/document-list/document-list.component.ts index 5bc8444d15670995cc658dfeabd8e5a6c7b09594..a48c71d97c62472326dd709e12d955080175c5c8 100644 --- a/src/frontend/app/document/document-list/document-list.component.ts +++ b/src/frontend/app/document/document-list/document-list.component.ts @@ -1,6 +1,7 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, Output, EventEmitter } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { NotificationService } from '../../service/notification.service'; +import { MatSidenav } from '@angular/material'; @Component({ selector: 'app-document-list', @@ -11,30 +12,22 @@ export class DocumentListComponent implements OnInit { loading: boolean = false; - attachments: any = []; + // tslint:disable-next-line:no-input-rename + @Input('mainDocument') mainDocument: any; + // tslint:disable-next-line:no-input-rename + @Input('currentDocId') currentDocId: any; + // tslint:disable-next-line:no-input-rename + @Input('snavRightComponent') snavRightComponent: MatSidenav; + + @Output() triggerEvent = new EventEmitter<string>(); constructor(public http: HttpClient, public notificationService: NotificationService) { } ngOnInit(): void { } - loadDocumentList(mainDocid: number) { - if (this.attachments.length === 0 || mainDocid !== this.attachments[0].id) { - this.attachments = [{ - 'id': 1408, - 'main' : true, - 'filename': '0024_878476521.txt', - 'thumbnailUrl': 'http://10.2.95.136/maarch_courrier_develop/rest/res/1529/attachments/1408/thumbnail' - }, { - 'id': 1407, - 'main' : false, - 'filename': '0024_878476521.txt', - 'thumbnailUrl': 'http://10.2.95.136/maarch_courrier_develop/rest/res/1529/attachments/1408/thumbnail' - }, { - 'id': 1406, - 'main' : false, - 'filename': '0023_1165105382.txt', - 'thumbnailUrl': 'http://10.2.95.136/maarch_courrier_develop/rest/res/1529/attachments/1408/thumbnail' - }]; - } + + loadDoc(id: string) { + this.triggerEvent.emit(id); + this.snavRightComponent.close(); } } diff --git a/src/frontend/app/document/document.component.html b/src/frontend/app/document/document.component.html index ded3be095745b27b3540b30659b1c0e773535ca8..1befe9f440a81875948e6369b96c5f3c05321eff 100755 --- a/src/frontend/app/document/document.component.html +++ b/src/frontend/app/document/document.component.html @@ -88,15 +88,9 @@ <ng-container *ngIf="!freezeSidenavClose"> <button class="btn-previous" [disabled]="snapshot == null" (tap)="prevPage()" *ngIf="pageNum > 1 && !this.signaturesService.annotationMode"><i class="fas fa-chevron-left fa-3x"></i></button> - <button class="btn-previous" (tap)="prevDoc()" - *ngIf="currentDoc > 0 && pageNum === 1 && !this.signaturesService.annotationMode"><i - class="fas fa-chevron-left fa-3x"></i><i class="fas fa-chevron-left fa-3x"></i></button> <button class="btn-next" [disabled]="snapshot == null" (tap)="nextPage()" *ngIf="pageNum < totalPages && !this.signaturesService.annotationMode"><i class="fas fa-chevron-right fa-3x"></i></button> - <button class="btn-next" (tap)="nextDoc()" - *ngIf="pageNum == totalPages && docList.length > currentDoc+1 && !this.signaturesService.annotationMode"><i - class="fas fa-chevron-right fa-3x"></i><i class="fas fa-chevron-right fa-3x"></i></button> </ng-container> <div [style.width]="widthDoc" style="height:100%;overflow:hidden;background:grey;"> @@ -125,7 +119,7 @@ </mat-sidenav-content> <mat-sidenav #snavRight mode="over" fixedInViewport="true" [style.width]="signaturesService.sideNavRigtDatas.width" position='end' [disableClose]='signaturesService.sideNavRigtDatas.locked'> <app-my-profile *ngIf="signaturesService.sideNavRigtDatas.mode == 'profile'" [snavLeftComponent]="this.snav" [snavRightComponent]="this.snavRight"></app-my-profile> - <app-visa-workflow [visaWorkflow]="mainDocument.workflow" *ngIf="signaturesService.sideNavRigtDatas.mode == 'visaWorkflow'"></app-visa-workflow> - <app-document-list #appDocumentList *ngIf="signaturesService.sideNavRigtDatas.mode == 'documentList'"></app-document-list> + <app-visa-workflow [visaWorkflow]="mainDocument.workflow" [snavRightComponent]="this.snavRight" *ngIf="signaturesService.sideNavRigtDatas.mode == 'visaWorkflow'"></app-visa-workflow> + <app-document-list #appDocumentList [currentDocId]="docList[currentDoc].id" [snavRightComponent]="this.snavRight" [mainDocument]="mainDocument" *ngIf="signaturesService.sideNavRigtDatas.mode == 'documentList'" (triggerEvent)="loadDoc($event)"></app-document-list> </mat-sidenav> </mat-sidenav-container> \ No newline at end of file diff --git a/src/frontend/app/document/document.component.ts b/src/frontend/app/document/document.component.ts index 564863f01283fcec04631ef69db720885e174fde..a077bf20b8ab0c8c044346d6e65daac9c5e83601 100755 --- a/src/frontend/app/document/document.component.ts +++ b/src/frontend/app/document/document.component.ts @@ -444,6 +444,35 @@ export class DocumentComponent implements OnInit { } } + loadDoc(id: any) { + const index = this.docList.map((doc: any) => (doc.id)).indexOf(id); + if (this.docList[index] && this.docList[index].id && this.docList[index].encodedDocument === '') { + this.loadingDoc = true; + this.http.get('../rest/attachments/' + this.docList[index].id) + .subscribe((dataPj: any) => { + this.docList[index] = dataPj.attachment; + this.signaturesService.renderingDoc = true; + if (index > 0) { + this.signaturesService.isTaggable = false; + } + this.pageNum = 1; + this.currentDoc = index; + this.pdfRender(this.docList[this.currentDoc]); + this.loadingDoc = false; + }, (err: any) => { + this.notificationService.handleErrors(err); + }); + } else { + this.signaturesService.renderingDoc = true; + if (index > 0) { + this.signaturesService.isTaggable = false; + } + this.pageNum = 1; + this.currentDoc = index; + this.pdfRender(this.docList[this.currentDoc]); + } + } + launchEvent(action: any) { this.signaturesService.currentAction = action.id; this[action.event](); @@ -488,26 +517,20 @@ export class DocumentComponent implements OnInit { } openVisaWorkflow() { - + this.snavRight.open(); this.signaturesService.sideNavRigtDatas = { mode : 'visaWorkflow', width : '450px', locked : false, }; - - this.snavRight.open(); } openDocumentList() { + this.snavRight.open(); this.signaturesService.sideNavRigtDatas = { mode : 'documentList', width : '450px', locked : false, }; - this.snavRight.open(); - - setTimeout(() => { - this.appDocumentList.loadDocumentList(this.mainDocument.id); - }, 0); } } diff --git a/src/frontend/app/document/visa-workflow/visa-workflow.component.html b/src/frontend/app/document/visa-workflow/visa-workflow.component.html index c249860a7c9ada805e4a557004a253713b70a3e3..55d7909539e263eaae13105b7f18388adb998131 100644 --- a/src/frontend/app/document/visa-workflow/visa-workflow.component.html +++ b/src/frontend/app/document/visa-workflow/visa-workflow.component.html @@ -1,35 +1,41 @@ -<mat-list *ngIf="!loading"> - <div class="panelTitle"> +<div class="panel-container" *ngIf="!loading"> + <div class="panel-header"> + <button class="closePanel" mat-icon-button type="button" (tap)="snavRightComponent.close();"> + <mat-icon fontSet="fas" fontIcon="fa-arrow-right fa-2x"></mat-icon> + </button> <mat-icon fontSet="fas" fontIcon="fa-list-ol fa-2x"></mat-icon> {{'lang.visaWorkflow' | translate}} </div> - <div> - <div *ngIf="visaWorkflow.length === 0" class="noWorkflow"> - {{'lang.noPerson' | translate}} - </div> - <mat-list-item *ngFor="let diffusion of visaWorkflow;let i=index" [class.current]="diffusion.current"> - <mat-icon class="avatar" mat-list-icon color="primary" - [style.background-image]="'url('+diffusion.userPicture+')'"></mat-icon> - <h4 mat-line class="userDisplay primary"> - {{diffusion.userDisplay}} - </h4> - <p mat-line style="display: flex;"> - <span class="workflowData" style="text-align:left"> - <span class="workflowSubData" *ngIf="diffusion.processDate == null && diffusion.current"> - <i mat-list-icon class="fa fa-hourglass statusIcon"></i> - {{'lang.inProgress' | translate}} + <div class="panel-content"> + <mat-list> + <div *ngIf="visaWorkflow.length === 0" class="noWorkflow"> + {{'lang.noPerson' | translate}} + </div> + <mat-list-item *ngFor="let diffusion of visaWorkflow;let i=index" [class.current]="diffusion.current"> + <mat-icon class="avatar" mat-list-icon color="primary" + [style.background-image]="'url('+diffusion.userPicture+')'"></mat-icon> + <h4 mat-line class="userDisplay primary"> + {{diffusion.userDisplay}} + </h4> + <p mat-line style="display: flex;"> + <span class="workflowData" style="text-align:left"> + <span class="workflowSubData" *ngIf="diffusion.processDate == null && diffusion.current"> + <i mat-list-icon class="fa fa-hourglass statusIcon"></i> + {{'lang.inProgress' | translate}} + </span> + <span class="workflowSubData" *ngIf="diffusion.processDate == null && !diffusion.current"> + <i mat-list-icon class="fa fa-question statusIcon"></i> + {{'lang.waiting' | translate}} + </span> + <span *ngIf="diffusion.processDate != null"> + <i mat-list-icon class="fa fa-check green statusIcon"></i> + <span class="green">{{'lang.'+diffusion.mode+'ProcessInfo' | translate}} + {{diffusion.processDate}}</span> + </span> </span> - <span class="workflowSubData" *ngIf="diffusion.processDate == null && !diffusion.current"> - <i mat-list-icon class="fa fa-question statusIcon"></i> - {{'lang.waiting' | translate}} - </span> - <span *ngIf="diffusion.processDate != null"> - <i mat-list-icon class="fa fa-check green statusIcon"></i> - <span class="green">{{'lang.'+diffusion.mode+'ProcessInfo' | translate}} - {{diffusion.processDate}}</span> - </span> - </span> - <span class="workflowData workflowSubData">{{'lang.'+diffusion.mode+'User' | translate}}</span> - </p> - <mat-divider></mat-divider> - </mat-list-item> - </div> \ No newline at end of file + <span class="workflowData workflowSubData">{{'lang.'+diffusion.mode+'User' | translate}}</span> + </p> + <mat-divider></mat-divider> + </mat-list-item> + </mat-list> + </div> +</div> \ No newline at end of file diff --git a/src/frontend/app/document/visa-workflow/visa-workflow.component.scss b/src/frontend/app/document/visa-workflow/visa-workflow.component.scss index e21a84d7db1718e1dac74118d74175cd28ad57f3..0125d59d6dfb7567a89a2ee2da2812880d9cebe4 100644 --- a/src/frontend/app/document/visa-workflow/visa-workflow.component.scss +++ b/src/frontend/app/document/visa-workflow/visa-workflow.component.scss @@ -56,4 +56,39 @@ text-align: center; font-size: 10px; padding: 10px; +} + +.panel-container { + display: flex; + flex-direction: column; + position: relative; + height: 100%; + overflow: hidden; +} + +.panel-header { + box-shadow: 0px 0px 10px 0px #656565; + color: white; + background: $primary; + height: 65px; + display: flex; + justify-content: center; + position: relative; + font-size: 20px; + align-items: center; +} + +.panel-content { + flex: 1; + overflow: auto; +} + +.mat-icon { + height:auto; +} + +.closePanel { + position: absolute; + left: 0px; + font-size: 24px; } \ No newline at end of file diff --git a/src/frontend/app/document/visa-workflow/visa-workflow.component.ts b/src/frontend/app/document/visa-workflow/visa-workflow.component.ts index 469c1aeea8fec10367697ccb4f68a65a6165ae2f..84b4418d043acd39283d752ec1c2630fd9882097 100644 --- a/src/frontend/app/document/visa-workflow/visa-workflow.component.ts +++ b/src/frontend/app/document/visa-workflow/visa-workflow.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { NotificationService } from '../../service/notification.service'; +import { MatSidenav } from '@angular/material'; @Component({ selector: 'app-visa-workflow', @@ -11,8 +12,12 @@ export class VisaWorkflowComponent implements OnInit { loading: boolean = false; + // tslint:disable-next-line:no-input-rename @Input('visaWorkflow') visaWorkflow: any; + // tslint:disable-next-line:no-input-rename + @Input('snavRightComponent') snavRightComponent: MatSidenav; + constructor(public http: HttpClient, public notificationService: NotificationService) { } ngOnInit(): void { } diff --git a/src/frontend/app/profile/profile.component.html b/src/frontend/app/profile/profile.component.html index bc32e68031ef565c35e7a75521288e06bc8864d7..07f31bdaefb65cd76cdeb8331386989066e8a877 100644 --- a/src/frontend/app/profile/profile.component.html +++ b/src/frontend/app/profile/profile.component.html @@ -1,17 +1,14 @@ -<nav class="sidebar" *ngIf="this.signaturesService.sideNavRigtDatas.mode == 'profile'"> - <div class="main-header"> - <header class="profile-header"> - <div class="user" style="color: #F99830"> - {{'lang.myProfil' | translate}} - </div> - <div class="avatarProfile" - [ngStyle]="{'background': 'url(' + this.profileInfo.picture + ') no-repeat scroll center center / cover'}" - (tap)="uploadFile.click();"> - </div> - <input #uploadFile type="file" style="display:none;" (change)="handleFileInput($event.target.files)"> - </header> +<div class="panel-container" *ngIf="!loading"> + <div class="panel-header"> + <div class="user"> + {{'lang.myProfil' | translate}} + </div> + <div class="avatarProfile" + [ngStyle]="{'background': 'url(' + this.profileInfo.picture + ') no-repeat scroll center center / cover'}" + (tap)="uploadFile.click();"> + </div> </div> - <div class="nav"> + <div class="panel-content"> <form (ngSubmit)="submitProfile()" #profileForm="ngForm"> <mat-tab-group #tabProfile (selectedTabChange)="initProfileTab($event);" (swipeleft)="siwtchToleft(tabProfile)" (swiperight)="siwtchToRight(tabProfile)"> @@ -24,14 +21,16 @@ </mat-form-field> <mat-form-field class="input-row"> <input name="email" matInput placeholder="{{'lang.email' | translate}}" type="mail" - [(ngModel)]="profileInfo.email" pattern="(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)" required> + [(ngModel)]="profileInfo.email" + pattern="(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)" required> </mat-form-field> <mat-form-field class="input-row"> - <input name="firstname" matInput placeholder="{{'lang.firstname' | translate}}" [(ngModel)]="profileInfo.firstname" - required> + <input name="firstname" matInput placeholder="{{'lang.firstname' | translate}}" + [(ngModel)]="profileInfo.firstname" required> </mat-form-field> <mat-form-field class="input-row"> - <input name="nom" matInput placeholder="{{'lang.lastname' | translate}}" [(ngModel)]="profileInfo.lastname" required> + <input name="nom" matInput placeholder="{{'lang.lastname' | translate}}" + [(ngModel)]="profileInfo.lastname" required> </mat-form-field> <mat-accordion> <mat-expansion-panel (closed)="showPassword=false" (opened)="changePasswd()" @@ -71,7 +70,8 @@ class="fa fa-2x" [ngClass]="[hideNewPasswordConfirm ? 'fa-eye-slash' : 'fa-eye']"></mat-icon> <mat-hint style="color:red;" - *ngIf="password.passwordConfirmation !== password.newPassword">{{'lang.passwordNotMatch' | translate}}</mat-hint> + *ngIf="password.passwordConfirmation !== password.newPassword"> + {{'lang.passwordNotMatch' | translate}}</mat-hint> <mat-hint style="color:green;" *ngIf="password.passwordConfirmation === password.newPassword && password.newPassword.length > 0 && password.passwordConfirmation.length> 0"> {{'lang.samePassword' | translate}}</mat-hint> @@ -104,8 +104,10 @@ <div class="form-container"> <div class="form-2-col"> <mat-form-field> - <mat-select #langSelect name="langUser" [(ngModel)]="this.profileInfo.preferences.lang"> - <mat-option *ngFor="let lang of this.profileInfo['availableLanguages']" [value]="lang">{{'lang.'+lang | translate }}</mat-option> + <mat-select #langSelect name="langUser" + [(ngModel)]="this.profileInfo.preferences.lang"> + <mat-option *ngFor="let lang of this.profileInfo['availableLanguages']" + [value]="lang">{{'lang.'+lang | translate }}</mat-option> </mat-select> </mat-form-field> </div> @@ -124,16 +126,19 @@ <mat-select name="writingMode" [(ngModel)]="this.profileInfo.preferences.writingMode"> <mat-option value="direct">{{'lang.free' | translate}}</mat-option> - <mat-option value="stylus">{{'lang.appleStylus' | translate}} <i class="fab fa-apple"></i> + <mat-option value="stylus">{{'lang.appleStylus' | translate}} <i + class="fab fa-apple"></i> </mat-option> </mat-select> </mat-form-field> </div> <div *ngIf="this.profileInfo.preferences.writingMode == 'stylus'" class="form-2-col" - style="text-align: justify;font-size: 12px;" [innerHTML]="'lang.freeModeInfo' | translate"> + style="text-align: justify;font-size: 12px;" + [innerHTML]="'lang.freeModeInfo' | translate"> </div> <div *ngIf="this.profileInfo.preferences.writingMode == 'direct'" class="form-2-col" - style="text-align: justify;font-size: 12px;" [innerHTML]="'lang.standardModeInfo' | translate"> + style="text-align: justify;font-size: 12px;" + [innerHTML]="'lang.standardModeInfo' | translate"> </div> </div> @@ -167,9 +172,12 @@ <mat-form-field> <mat-select name="writingColor" [(ngModel)]="this.profileInfo.preferences.writingColor"> - <mat-option style="color:#000000" value="#000000">{{'lang.black' | translate}}</mat-option> - <mat-option style="color:#1a75ff" value="#1a75ff">{{'lang.blue' | translate}}</mat-option> - <mat-option style="color:#FF0000" value="#FF0000">{{'lang.red' | translate}}</mat-option> + <mat-option style="color:#000000" value="#000000"> + {{'lang.black' | translate}}</mat-option> + <mat-option style="color:#1a75ff" value="#1a75ff"> + {{'lang.blue' | translate}}</mat-option> + <mat-option style="color:#FF0000" value="#FF0000"> + {{'lang.red' | translate}}</mat-option> </mat-select> </mat-form-field> </div> @@ -183,7 +191,8 @@ </div> </div> </mat-tab> - <mat-tab label="{{'lang.administrations' | translate}}" *ngIf="signaturesService.userLogged.canManageRestUsers"> + <mat-tab label="{{'lang.administrations' | translate}}" + *ngIf="signaturesService.userLogged.canManageRestUsers"> <div class="profile-content"> <div class="input-row"> <fieldset> @@ -224,12 +233,11 @@ <span class="actions"> <button class="validate" mat-button color="primary" type="submit" [disabled]="allowValidate() || !profileForm.form.valid">{{ - msgButton | translate}}</button> + msgButton | translate}}</button> <button class="cancel" mat-icon-button type="button" (tap)="closeProfile();"> <mat-icon fontSet="fas" fontIcon="fa-arrow-left fa-2x"></mat-icon> </button> </span> </form> - </div> -</nav> \ No newline at end of file +</div> \ No newline at end of file diff --git a/src/frontend/app/profile/profile.component.scss b/src/frontend/app/profile/profile.component.scss index 65cceac4c6daf3fa1805e9630c8e7d66b0921402..594ae4c3365b0d53a8790be7202b1218520c6f1a 100644 --- a/src/frontend/app/profile/profile.component.scss +++ b/src/frontend/app/profile/profile.component.scss @@ -75,7 +75,9 @@ .user { color: white; - padding-top: 10px; + color: #F99830; + position: absolute; + top: 15px; font-weight: bold; font-size: 20px; } @@ -156,4 +158,33 @@ legend { .notification { text-align: left; padding : 10px; +} + +.panel-container { + display: flex; + flex-direction: column; + position: relative; + height: 100%; + overflow: hidden; +} + +.panel-header { + box-shadow: 0px 0px 10px 0px #656565; + color: white; + background: $primary; + height: 95px; + display: flex; + justify-content: center; + position: relative; + font-size: 20px; + align-items: center; +} + +.panel-content { + flex: 1; + overflow: auto; +} + +.mat-icon { + height:auto; } \ No newline at end of file diff --git a/src/frontend/app/sidebar/sidebar.component.html b/src/frontend/app/sidebar/sidebar.component.html index f56401fc840c86164e7b8c5dad474105ec977ca1..0fbd14529c5b5aaf0666eff8b26f5d49f6b70003 100755 --- a/src/frontend/app/sidebar/sidebar.component.html +++ b/src/frontend/app/sidebar/sidebar.component.html @@ -2,7 +2,10 @@ <div class="main-header"> <header class="profile-header"> <button class="logout-button" mat-icon-button (click)="logout()"> - <mat-icon fontSet="fas" fontIcon="fa-sign-out-alt"></mat-icon> + <mat-icon fontSet="fas" fontIcon="fa-power-off"></mat-icon> + </button> + <button *ngIf="signaturesService.mainDocumentId > 0" class="closePanel" mat-icon-button type="button" (tap)="snavLeftComponent.close();"> + <mat-icon fontSet="fas" fontIcon="fa-arrow-left fa-2x"></mat-icon> </button> <div class="user" style="color: #F99830"> {{signaturesService.userLogged.firstname}} {{signaturesService.userLogged.lastname}} diff --git a/src/frontend/app/sidebar/sidebar.component.scss b/src/frontend/app/sidebar/sidebar.component.scss index 9f282f1c63e315cbfa944ca63856c812be3b7f53..01fa7c0c64bc71e973fab9ec8216d5d1d0b86bcf 100644 --- a/src/frontend/app/sidebar/sidebar.component.scss +++ b/src/frontend/app/sidebar/sidebar.component.scss @@ -147,10 +147,17 @@ } .logout-button { - font-size: 30px; + font-size: 24px; + color: white; + position: absolute; + left: 0px; +} + +.closePanel { color: white; position: absolute; right: 10px; + font-size: 24px; } .filter { diff --git a/src/frontend/app/sidebar/sidebar.component.ts b/src/frontend/app/sidebar/sidebar.component.ts index 12584b0ac65e476435abf4590879f9a91c9d99f0..a36c4ba70b0ca8cfe547e53e2f51737ed65d4901 100755 --- a/src/frontend/app/sidebar/sidebar.component.ts +++ b/src/frontend/app/sidebar/sidebar.component.ts @@ -15,18 +15,21 @@ import { TranslateService } from '@ngx-translate/core'; }) export class SidebarComponent implements OnInit { - loadingList : boolean = false; - offset : number = 0; - limit : number = 25; + loadingList: boolean = false; + offset: number = 0; + limit: number = 25; @ViewChild('listContent') listContent: ElementRef; + // tslint:disable-next-line:no-input-rename @Input('snavRightComponent') snavRightComponent: MatSidenav; + // tslint:disable-next-line:no-input-rename @Input('snavLeftComponent') snavLeftComponent: MatSidenav; constructor(private translate: TranslateService, public http: HttpClient, public signaturesService: SignaturesContentService, private sidenav: MatSidenav, private router: Router, public notificationService: NotificationService) { } ngOnInit() { + console.log(this.signaturesService); $('.avatar').css({'background': 'url(data:image/png;base64,' + this.signaturesService.userLogged.picture + ') no-repeat #135F7F'}).css({'background-size': 'cover'}).css({'background-position': 'center'}); this.http.get('../rest/documents?limit=' + this.limit + '&offset=' + this.offset + '&mode=' + this.signaturesService.mode) .subscribe((data: any) => {