Skip to content
Snippets Groups Projects
document.component.html 6.3 KiB
Newer Older
  • Learn to ignore specific revisions
  • Alex ORLUC's avatar
    Alex ORLUC committed
    <div *ngIf="enterApp" class="enterApp" [@enterApp]>
      <mat-icon svgIcon="maarchLogo" class="maarchLogo"></mat-icon>
    </div>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    <mat-sidenav-container autosize>
    
      <mat-sidenav #snav mode="over" fixedInViewport="true" [disableClose]="freezeSidenavClose" [style.width.px]="350">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        <app-sidebar [snavLeftComponent]="this.snav" [snavRightComponent]="this.snavRight"></app-sidebar>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
      </mat-sidenav>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
      <mat-sidenav-content class="mainView">
    
        <div *ngIf="loadingDoc" style="position: fixed;z-index: 2;display: flex;background: #fffc;width: 100%;height: 100%;justify-content: center;align-items: center;">
          <mat-spinner></mat-spinner>
        </div>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        <header class="header" *ngIf="!this.signaturesService.annotationMode && !freezeSidenavClose"
          [@slideDown]>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
          <article class="header-infos">
    
            <section class="header-action">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
              <button mat-icon-button (click)="this.snav.toggle();">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
                <mat-icon fontSet="fas" fontIcon="fa-bars"></mat-icon>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
              </button>
            </section>
            <div class="header-info">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
              <p class="c-active-color bold" *ngIf="mainDocument.reference">Référence : </p>
              <p class="ellipsis" *ngIf="mainDocument.reference">{{mainDocument.reference}}</p>
              <p class="c-active-color bold" *ngIf="mainDocument.subject">Sujet : </p>
              <p class="ellipsis" *ngIf="mainDocument.subject">{{mainDocument.subject}}</p>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            </div>
            <div class="header-info">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
              <p class="c-active-color bold" *ngIf="mainDocument.sender">Émis par : </p>
              <p class="ellipsis" *ngIf="mainDocument.sender">{{mainDocument.sender}} ({{mainDocument.sender_entity}})</p>
              <p class="c-active-color bold" *ngIf="mainDocument.recipient">Pour : </p>
              <p class="ellipsis" *ngIf="mainDocument.recipient">{{mainDocument.recipient}}</p>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            </div>
            <div class="header-info">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
              <p class="c-active-color bold" *ngIf="mainDocument.limit_date">Date limite de traitement : </p>
              <p class="ellipsis" *ngIf="mainDocument.limit_date">{{mainDocument.limit_date}} (<b>{{mainDocument.priority}}</b>)</p>
              <p class="c-active-color bold" *ngIf="mainDocument.processingUserDisplay">À signer par : </p>
              <p class="ellipsis" *ngIf="mainDocument.processingUserDisplay">{{mainDocument.processingUserDisplay}}</p>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            </div>
    
            <section class="header-action">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
              <button mat-icon-button [matMenuTriggerFor]="menu">
                <mat-icon fontSet="fas" fontIcon="fa-cog"></mat-icon>
              </button>
              <mat-menu #menu="matMenu">
                <button [disabled]="checkEmptiness()" mat-menu-item (click)="removeTags();">Tout effacer</button>
                <button [disabled]="checkEmptyNote()" mat-menu-item (click)="undoTag();">Annuler la précedente note</button>
              </mat-menu>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            </section>
          </article>
        </header>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        <article class="article" style="position: fixed;" #article *ngIf="!freezeSidenavClose" [style.left.px]="this.signaturesService.x"
          [style.top.px]="this.signaturesService.y" (panstart)="onPanStart($event)" (panmove)="onPan($event)">
    
          <button class="btn-previous" [disabled]="disableState" (tap)="prevPage()" *ngIf="pageNum > 1 && !this.signaturesService.annotationMode"><i
    
    Alex ORLUC's avatar
    Alex ORLUC committed
              class="fas fa-chevron-left fa-3x"></i></button>
    
          <button class="btn-previous" (tap)="prevDoc()" *ngIf="currentDoc > 0 &&  pageNum === 1 && !this.signaturesService.annotationMode"><i
    
    Alex ORLUC's avatar
    Alex ORLUC committed
              class="fas fa-chevron-left fa-3x"></i><i class="fas fa-chevron-left fa-3x"></i></button>
    
          <button class="btn-next" [disabled]="disableState" (tap)="nextPage()" *ngIf="pageNum < totalPages && !this.signaturesService.annotationMode"><i
    
    Alex ORLUC's avatar
    Alex ORLUC committed
              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
    
    Alex ORLUC's avatar
    Alex ORLUC committed
              class="fas fa-chevron-right fa-3x"></i><i class="fas fa-chevron-right fa-3x"></i></button>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
          <div class="canvas-wrapper" #canvasWrapper>
            <simple-pdf-viewer [ngClass]="{
              'pdf-page-canvas':!signaturesService.renderingDoc,
              'pdf-page-canvas-loading-doc':signaturesService.renderingDoc
            }" #pdfViewer [src]="pdfDataArr" removePageBorders="true" (onLoadComplete)="pdfRendered()"
              (onError)="pdfError($event)"></simple-pdf-viewer>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            <app-document-note-list [ngClass]="{
              'pdf-page-canvas':!signaturesService.renderingDoc,
              'pdf-page-canvas-loading-doc':signaturesService.renderingDoc
            }" *ngIf="currentDoc == 0"></app-document-note-list>
            <div [style.width.px]="signaturesService.workingAreaWidth*signaturesService.scale" (tap)="addAnnotation($event)"
              [style.height.px]="signaturesService.workingAreaHeight*signaturesService.scale" style="position:absolute;left:0;top:0;"></div>
            <app-document-sign-list [ngClass]="{
              'pdf-page-canvas':!signaturesService.renderingDoc,
              'pdf-page-canvas-loading-doc':signaturesService.renderingDoc
            }" [canvas]="canvasWrapper" *ngIf="currentDoc == 0"></app-document-sign-list>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            <app-document-note-pad (triggerEvent)="zoomMinus()" #appDocumentNotePad *ngIf="currentDoc == 0"></app-document-note-pad>
    
          </div>
          <div class="page-under">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            <div class="page-under-fold"></div>
          </div>
          <section class="page-info" *ngIf="!this.signaturesService.annotationMode && docList[currentDoc]">
    
            <div class="page-info-doc">Doc {{currentDoc+1}}/{{docList.length}} : {{docList[currentDoc].subject}}</div>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            <div class="page-info-page">page {{ pageNum }} / {{ totalPages }}</div>
          </section>
        </article>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        <footer class="footer" *ngIf="!this.signaturesService.annotationMode && !freezeSidenavClose"
          [@slideUp]>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
          <ng-container *ngFor="let action of actionsList;">
    
    Alex ORLUC's avatar
    Alex ORLUC committed
            <button [style.color]="action.color" [style.borderColor]="action.color" class="btn" (click)="launchEvent(action)"><i
                class="{{action.logo}} fa-2x"></i>{{action.label}}</button>
          </ng-container>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
        </footer>
        <app-drawer></app-drawer>
      </mat-sidenav-content>
    
      <mat-sidenav #snavRight mode="over" fixedInViewport="true" [style.width.%]="80" position='end' disableClose='true'>
        <app-my-profile [snavLeftComponent]="this.snav" [snavRightComponent]="this.snavRight"></app-my-profile>
    
      </mat-sidenav>
    
    Alex ORLUC's avatar
    Alex ORLUC committed
    </mat-sidenav-container>