Skip to content
Snippets Groups Projects
Verified Commit 30073b4a authored by Damien's avatar Damien
Browse files

FEAT #11788 TIME 0:50 Front fixes

parent 0edf36e5
No related branches found
No related tags found
No related merge requests found
...@@ -159,6 +159,7 @@ ...@@ -159,6 +159,7 @@
"search": "Rechercher", "search": "Rechercher",
"substitution": "Délégation", "substitution": "Délégation",
"substitute": "Utilisateur délégataire", "substitute": "Utilisateur délégataire",
"signSubstituted": "Signatures à déléguer",
"chooseSubstitute": "Choisissez un utilisateur", "chooseSubstitute": "Choisissez un utilisateur",
"noResult": "Aucun résultat", "noResult": "Aucun résultat",
"circuit": "Circuit", "circuit": "Circuit",
......
<div *ngIf="enterApp" class="enterApp" [@enterApp]> <div *ngIf="enterApp" class="enterApp" [@enterApp]>
<mat-icon svgIcon="maarchLogo" class="maarchLogo"></mat-icon> <mat-icon svgIcon="maarchLogo" class="maarchLogo"></mat-icon>
</div> </div>
<mat-sidenav-container autosize> <mat-sidenav-container autosize>
<mat-sidenav #snav disableClose [mode]="signaturesService.mobileMode ? 'over': 'side'" <mat-sidenav #snav disableClose [mode]="signaturesService.mobileMode ? 'over': 'side'"
[opened]="!signaturesService.mobileMode || freezeSidenavClose" fixedInViewport="true" [opened]="!signaturesService.mobileMode || freezeSidenavClose" fixedInViewport="true"
[disableClose]="freezeSidenavClose" [style.width.px]="350"> [disableClose]="freezeSidenavClose" [style.width.px]="350">
<app-sidebar [snavLeftComponent]="this.snav" [snavRightComponent]="this.snavRight"></app-sidebar> <app-sidebar [snavLeftComponent]="this.snav" [snavRightComponent]="this.snavRight"></app-sidebar>
</mat-sidenav> </mat-sidenav>
<mat-sidenav-content class="mainView"> <mat-sidenav-content class="mainView">
<div *ngIf="signaturesService.mainLoading" <div *ngIf="signaturesService.mainLoading"
style="position: absolute;z-index: 2;display: flex;background: #fffc;width: 100%;height: 100%;justify-content: center;align-items: center;"> style="position: absolute;z-index: 2;display: flex;background: #fffc;width: 100%;height: 100%;justify-content: center;align-items: center;">
<mat-spinner></mat-spinner> <mat-spinner></mat-spinner>
</div> </div>
<header class="header" *ngIf="!this.signaturesService.annotationMode && !freezeSidenavClose" [@slideDown]> <header class="header" *ngIf="!this.signaturesService.annotationMode && !freezeSidenavClose" [@slideDown]>
<article class="header-infos"> <article class="header-infos">
<section class="header-action"> <section class="header-action">
<button *ngIf="signaturesService.mobileMode" mat-icon-button (click)="this.snav.toggle();" <button *ngIf="signaturesService.mobileMode" mat-icon-button (click)="this.snav.toggle();"
style="width:70px;"> style="width:70px;">
<mat-icon fontSet="fas" fontIcon="fa-bars"></mat-icon> <mat-icon fontSet="fas" fontIcon="fa-bars"></mat-icon>
</button> </button>
<button mat-button (click)="openMainDocumentDetail();"> <button mat-button (click)="openMainDocumentDetail();">
<i class="fas fa-info-circle fa-2x"></i><span <i class="fas fa-info-circle fa-2x"></i><span
style="display: block;line-height: 10px;">{{'lang.informations' | translate}}</span> style="display: block;line-height: 10px;">{{'lang.informations' | translate}}</span>
</button> </button>
</section> </section>
<section class="header-action">
<section class="header-action"> <button mat-button (click)="openDocumentList();">
<button mat-button (click)="openDocumentList();"> <i class="fas fa-file fa-2x" [matBadge]="mainDocument.attachments.length + 1"></i><span
<i class="fas fa-file fa-2x" [matBadge]="mainDocument.attachments.length + 1"></i><span style="display: block;line-height: 10px;">{{'lang.documents' | translate | titlecase}}</span>
style="display: block;line-height: 10px;">{{'lang.documents' | translate | titlecase}}</span> </button>
</button> <button mat-button (click)="openVisaWorkflow();">
<button mat-button (click)="openVisaWorkflow();"> <i class="fas fa-list-ol fa-2x" [matBadge]="mainDocument.workflow.length"></i><span
<i class="fas fa-list-ol fa-2x" [matBadge]="mainDocument.workflow.length"></i><span style="display: block;line-height: 10px;">{{'lang.circuit' | translate}}</span>
style="display: block;line-height: 10px;">{{'lang.circuit' | translate}}</span> </button>
</button> <button mat-button [matMenuTriggerFor]="menu">
<button mat-button [matMenuTriggerFor]="menu"> <i class="fas fa-cog fa-2x"></i><span
<i class="fas fa-cog fa-2x"></i><span style="display: block;line-height: 10px;">{{'lang.actions' | translate}}</span>
style="display: block;line-height: 10px;">{{'lang.actions' | translate}}</span> </button>
</button> <mat-menu #menu="matMenu">
<mat-menu #menu="matMenu"> <button [disabled]="checkEmptiness()" mat-menu-item
<button [disabled]="checkEmptiness()" mat-menu-item (click)="removeTags();">{{'lang.deleteAll' | translate}}</button>
(click)="removeTags();">{{'lang.deleteAll' | translate}}</button> <button [disabled]="checkEmptyNote()" mat-menu-item
<button [disabled]="checkEmptyNote()" mat-menu-item (click)="undoTag();">{{'lang.cancelPreviousNote' | translate}}</button>
(click)="undoTag();">{{'lang.cancelPreviousNote' | translate}}</button> </mat-menu>
</mat-menu> </section>
</section> </article>
</article> </header>
</header> <div class="substitutedInformations" *ngIf="authService.user.substitute !== null && !this.signaturesService.annotationMode && docList[currentDoc]">
<app-overlay *ngIf="this.signaturesService.annotationMode" [appDocumentNotePad]="appDocumentNotePad"></app-overlay> <div>{{'lang.substitutionInfo' | translate}}</div>
<ng-container *ngIf="!freezeSidenavClose && !loadingUI"> </div>
<button class="btn-previous" (tap)="prevPage()" *ngIf="pageNum > 1 && !this.signaturesService.annotationMode"><i <app-overlay *ngIf="this.signaturesService.annotationMode"
class="fas fa-chevron-left fa-3x"></i></button> [appDocumentNotePad]="appDocumentNotePad"></app-overlay>
<button class="btn-next" (tap)="nextPage()" <ng-container *ngIf="!freezeSidenavClose && !loadingUI">
*ngIf="pageNum < totalPages && !this.signaturesService.annotationMode"><i <button class="btn-previous" (tap)="prevPage()"
class="fas fa-chevron-right fa-3x"></i></button> *ngIf="pageNum > 1 && !this.signaturesService.annotationMode"><i
</ng-container> class="fas fa-chevron-left fa-3x"></i></button>
<button class="btn-next" (tap)="nextPage()"
*ngIf="pageNum < totalPages && !this.signaturesService.annotationMode"><i
class="fas fa-chevron-right fa-3x"></i></button>
</ng-container>
<div [style.width]="widthDoc" style="height:100%;overflow:hidden;background:grey;"> <div [style.width]="widthDoc" style="height:100%;overflow:hidden;background:grey;">
<div *ngIf="!resetDragPos" #dragElem class="example-box" cdkDragLockAxis="y" cdkDrag <div *ngIf="!resetDragPos" #dragElem class="example-box" cdkDragLockAxis="y" cdkDrag
[cdkDragDisabled]="this.signaturesService.annotationMode" [cdkDragDisabled]="this.signaturesService.annotationMode"
style="width: 100%;transform: translate3d(0px, 80px, 0px)" (cdkDragEnded)="testDrag($event)"> style="width: 100%;transform: translate3d(0px, 80px, 0px)" (cdkDragEnded)="testDrag($event)">
<app-document-note-list (tap)="addAnnotation($event)" *ngIf="currentDoc == 0"> <app-document-note-list (tap)="addAnnotation($event)" *ngIf="currentDoc == 0">
</app-document-note-list> </app-document-note-list>
<app-document-sign-list *ngIf="currentDoc == 0"></app-document-sign-list> <app-document-sign-list *ngIf="currentDoc == 0"></app-document-sign-list>
<img *ngIf="!signaturesService.mainLoading && !freezeSidenavClose" (tap)="addAnnotation($event)" id="snapshotPdf" <img *ngIf="!signaturesService.mainLoading && !freezeSidenavClose" (tap)="addAnnotation($event)"
[src]="sanitizer.bypassSecurityTrustUrl('data:image/png;base64, '+docList[currentDoc].imgContent[pageNum])" id="snapshotPdf"
style="width:100%;" class="zoom"/> [src]="sanitizer.bypassSecurityTrustUrl('data:image/png;base64, '+docList[currentDoc].imgContent[pageNum])"
<app-document-note-pad (triggerEvent)="zoomForView()" #appDocumentNotePad *ngIf="currentDoc == 0"> style="width:100%;" class="zoom"/>
</app-document-note-pad> <app-document-note-pad (triggerEvent)="zoomForView()" #appDocumentNotePad *ngIf="currentDoc == 0">
</div> </app-document-note-pad>
</div> </div>
</div>
<section class="page-info" *ngIf="!this.signaturesService.annotationMode && docList[currentDoc]"> <section class="page-info" *ngIf="!this.signaturesService.annotationMode && docList[currentDoc]">
<div class="page-info-doc">{{docList[currentDoc].title}}</div> <div class="page-info-doc">{{docList[currentDoc].title}}</div>
<div class="page-info-page">{{'lang.page' | translate}} {{ pageNum }} / {{ totalPages }}</div> <div class="page-info-page">{{'lang.page' | translate}} {{ pageNum }} / {{ totalPages }}</div>
</section> </section>
<footer class="footer" <footer class="footer"
*ngIf="!this.signaturesService.annotationMode && !freezeSidenavClose && currentDoc === 0" *ngIf="!this.signaturesService.annotationMode && !freezeSidenavClose && currentDoc === 0"
[@slideUp]> [@slideUp]>
<ng-container *ngFor="let action of actionsList;"> <ng-container *ngFor="let action of actionsList;">
<button [style.color]="action.color" [style.borderColor]="action.color" class="btn" <button [style.color]="action.color" [style.borderColor]="action.color" class="btn"
(click)="launchEvent(action)"><i class="{{action.logo}} fa-2x"></i>{{action.label | translate}}</button> (click)="launchEvent(action)"><i class="{{action.logo}} fa-2x"></i>{{action.label | translate}}
</ng-container> </button>
</footer> </ng-container>
<app-drawer></app-drawer> </footer>
</mat-sidenav-content> <app-drawer></app-drawer>
<mat-sidenav #snavRight disableClose [mode]="this.signaturesService.mobileMode ? 'over': 'side'" </mat-sidenav-content>
[opened]="!signaturesService.mobileMode" fixedInViewport="true" <mat-sidenav #snavRight disableClose [mode]="this.signaturesService.mobileMode ? 'over': 'side'"
[style.width]="signaturesService.sideNavRigtDatas.width" position='end' [opened]="!signaturesService.mobileMode" fixedInViewport="true"
[disableClose]='signaturesService.sideNavRigtDatas.locked' (closedStart)="backToDetails()"> [style.width]="signaturesService.sideNavRigtDatas.width" position='end'
<app-my-profile *ngIf="signaturesService.sideNavRigtDatas.mode == 'profile'" [snavLeftComponent]="this.snav" [disableClose]='signaturesService.sideNavRigtDatas.locked' (closedStart)="backToDetails()">
[snavRightComponent]="this.snavRight"></app-my-profile> <app-my-profile *ngIf="signaturesService.sideNavRigtDatas.mode == 'profile'" [snavLeftComponent]="this.snav"
<app-visa-workflow [visaWorkflow]="mainDocument.workflow" [snavRightComponent]="this.snavRight" [snavRightComponent]="this.snavRight"></app-my-profile>
*ngIf="signaturesService.sideNavRigtDatas.mode == 'visaWorkflow'"></app-visa-workflow> <app-visa-workflow [visaWorkflow]="mainDocument.workflow" [snavRightComponent]="this.snavRight"
<app-document-list #appDocumentList [currentDocId]="currentDoc" [snavRightComponent]="this.snavRight" *ngIf="signaturesService.sideNavRigtDatas.mode == 'visaWorkflow'"></app-visa-workflow>
[docList]="docList" *ngIf="signaturesService.sideNavRigtDatas.mode == 'documentList'" <app-document-list #appDocumentList [currentDocId]="currentDoc" [snavRightComponent]="this.snavRight"
(triggerEvent)="loadDoc($event)"></app-document-list> [docList]="docList" *ngIf="signaturesService.sideNavRigtDatas.mode == 'documentList'"
<app-main-document-detail #appMainDocumentDetail [snavRightComponent]="this.snavRight" [mainDocument]="mainDocument" (triggerEvent)="loadDoc($event)"></app-document-list>
*ngIf="signaturesService.sideNavRigtDatas.mode == 'mainDocumentDetail'"></app-main-document-detail> <app-main-document-detail #appMainDocumentDetail [snavRightComponent]="this.snavRight"
</mat-sidenav> [mainDocument]="mainDocument"
*ngIf="signaturesService.sideNavRigtDatas.mode == 'mainDocumentDetail'"></app-main-document-detail>
</mat-sidenav>
</mat-sidenav-container> </mat-sidenav-container>
...@@ -290,4 +290,18 @@ button.disabled { ...@@ -290,4 +290,18 @@ button.disabled {
text-align: center; text-align: center;
flex: 1; flex: 1;
} }
} }
\ No newline at end of file
.substitutedInformations {
position: fixed;
top: 95px;
background-color: #F1F4F4;
border-radius: 14px;
padding: 0 20px;
z-index: 1;
white-space: pre;
overflow: hidden;
text-overflow: ellipsis;
margin-left: 15px;
color: #135F7F;
}
...@@ -218,10 +218,13 @@ ...@@ -218,10 +218,13 @@
</plugin-autocomplete> </plugin-autocomplete>
</div> </div>
</div> </div>
<br/>
<fieldset *ngIf="authService.user.substitute != null && signaturesService.signaturesList.length > 0"> <fieldset *ngIf="authService.user.substitute != null && signaturesService.signaturesList.length > 0">
<legend align="left">{{'lang.signSubstituted' | translate}} :</legend> <legend align="left">{{'lang.signSubstituted' | translate}} :</legend>
<ng-container> <ng-container>
<button type="button" class="signListButton" mat-stroked-button *ngFor="let signature of signaturesService.signaturesList; let i=index" (click)="toggleSignature(i)" [class.selected]="signature.substituted"><img [src]="sanitizer.bypassSecurityTrustUrl('data:image/png;base64,' + signature.encodedSignature)"/></button> <button type="button" class="signListButton" mat-stroked-button *ngFor="let signature of signaturesService.signaturesList; let i=index" (click)="toggleSignature(i)" [class.selected]="signature.substituted">
<img style="width: 190px;" [src]="sanitizer.bypassSecurityTrustUrl('data:image/png;base64,' + signature.encodedSignature)"/>
</button>
</ng-container> </ng-container>
</fieldset> </fieldset>
</fieldset> </fieldset>
......
...@@ -279,10 +279,6 @@ export class ProfileComponent implements OnInit { ...@@ -279,10 +279,6 @@ export class ProfileComponent implements OnInit {
selectSubstitute(newUserSubtituted: any) { selectSubstitute(newUserSubtituted: any) {
if (this.profileInfo.substitute !== null) {
alert(this.translate.instant('lang.substitutionWarn'));
}
this.http.put('../rest/users/' + this.authService.user.id + '/substitute', { substitute: newUserSubtituted.id }) this.http.put('../rest/users/' + this.authService.user.id + '/substitute', { substitute: newUserSubtituted.id })
.subscribe(() => { .subscribe(() => {
this.authService.updateUserInfoWithTokenRefresh(); this.authService.updateUserInfoWithTokenRefresh();
......
...@@ -36,7 +36,13 @@ ...@@ -36,7 +36,13 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.substituteInfo {
color: #F99830;
font-size: 10px;
position: absolute;
top: 0px;
left: 10px;
}
&.create { &.create {
background-color: #F1F4F4; background-color: #F1F4F4;
flex-direction: column; flex-direction: column;
...@@ -69,4 +75,4 @@ ...@@ -69,4 +75,4 @@
.remove_icon { .remove_icon {
left: 5px; left: 5px;
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment