Skip to content
Snippets Groups Projects
Commit 04b9451a authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #12861 TIME 0:45 add menu list linked document

parent e9c51708
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
(tap)="snavRightComponent.close();"> (tap)="snavRightComponent.close();">
<mat-icon fontSet="fas" fontIcon="fa-arrow-right fa-2x"></mat-icon> <mat-icon fontSet="fas" fontIcon="fa-arrow-right fa-2x"></mat-icon>
</button> </button>
<mat-icon fontSet="fas" fontIcon="fa-file fa-2x"></mat-icon> <b>{{docList.length}}</b>&nbsp;{{'lang.documents' | translate}} <mat-icon fontSet="fas" fontIcon="fa-file fa-2x"></mat-icon> <b>{{docList.length}}</b>&nbsp;{{'lang.attachedElements' | translate}}
</div> </div>
<div class="pjListContent"> <div class="pjListContent">
<div *ngFor="let doc of docList;let i=index" style="position: relative;"> <div *ngFor="let doc of docList;let i=index" style="position: relative;">
......
...@@ -25,17 +25,29 @@ ...@@ -25,17 +25,29 @@
</button> </button>
</section> </section>
<section class="header-action"> <section class="header-action">
<button mat-button (click)="openDocumentList();"> <button mat-button class="header-action-button" *ngIf="mainDocument.linkedDocuments !== undefined && mainDocument.linkedDocuments.length > 0" [matMenuTriggerFor]="assocDoc">
<i class="fas fa-file fa-2x" [matBadge]="mainDocument.attachments.length + 1"></i><span <i class="fas fa-folder-open fa-2x" [matBadge]="mainDocument.linkedDocuments.length"></i><span
style="display: block;line-height: 10px;">{{'lang.documents' | translate | titlecase}}</span> style="display: block;line-height: 15px;">{{'lang.associatedDocuments' | translate | ucfirst}}</span>
</button> </button>
<button mat-button (click)="openVisaWorkflow();"> <mat-menu #assocDoc="matMenu">
<button mat-menu-item *ngFor="let doc of mainDocument.linkedDocuments" (click)="gotTo(doc.id)" style="height: auto;line-height: inherit;font-family: 'lato', sans-serif;">
<div style="font-size: 12px;color: #4F4F4F;padding-top: 10px;padding-bottom: 10px;">
<div>{{doc.reference}}</div>
<div style="font-weight: 600;color: #135F7F;font-size: 14px;">{{doc.title}}</div>
</div>
</button>
</mat-menu>
<button mat-button class="header-action-button" (click)="openDocumentList();">
<i class="fas fa-paperclip fa-2x" [matBadge]="mainDocument.attachments.length + 1"></i><span
style="display: block;line-height: 15px;">{{'lang.attachedElements' | translate | ucfirst}}</span>
</button>
<button mat-button class="header-action-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: 15px;">{{'lang.circuit' | translate}}</span>
</button> </button>
<button mat-button [matMenuTriggerFor]="menu"> <button mat-button class="header-action-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: 15px;">{{'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
......
...@@ -71,6 +71,7 @@ canvas { ...@@ -71,6 +71,7 @@ canvas {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 0; padding: 0;
/*&-left /*&-left
position absolute position absolute
top 15px top 15px
...@@ -79,6 +80,12 @@ canvas { ...@@ -79,6 +80,12 @@ canvas {
justify-content: center; justify-content: center;
display: flex; display: flex;
color: $primary; color: $primary;
&-button {
white-space: initial;
word-break: break-word;
width: 135px !important;
}
} }
&-infos { &-infos {
...@@ -133,20 +140,20 @@ canvas { ...@@ -133,20 +140,20 @@ canvas {
} }
::ng-deep .mat-form-field-underline { ::ng-deep .mat-form-field-underline {
display: none; display: none;
} }
&-content { &-content {
width: 33%; width: 33%;
display: inline-block; display: inline-block;
input { input {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.mat-form-field { .mat-form-field {
width: 100%; width: 100%;
} }
} }
input:disabled { input:disabled {
...@@ -271,7 +278,7 @@ button.disabled { ...@@ -271,7 +278,7 @@ button.disabled {
} }
.leftPosDesk { .leftPosDesk {
left:25% !important; left: 25% !important;
} }
.mat-badge-content { .mat-badge-content {
...@@ -283,7 +290,7 @@ button.disabled { ...@@ -283,7 +290,7 @@ button.disabled {
background: $primary; background: $primary;
div { div {
padding:10px; padding: 10px;
} }
.msgModal { .msgModal {
...@@ -299,9 +306,9 @@ button.disabled { ...@@ -299,9 +306,9 @@ button.disabled {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
background: background:
#135F7F; #135F7F;
color: color:
white; white;
font-size: 13px; font-size: 13px;
text-align: center; text-align: center;
} }
\ No newline at end of file
...@@ -539,4 +539,15 @@ export class DocumentComponent implements OnInit { ...@@ -539,4 +539,15 @@ export class DocumentComponent implements OnInit {
}); });
} }
} }
gotTo(documentId: number, i: any) {
this.router.navigate(['/documents/' + documentId]);
this.signaturesService.mainDocumentId = documentId;
// this.signaturesService.indexDocumentsList = i;
this.signaturesService.sideNavRigtDatas = {
mode: 'mainDocumentDetail',
width: '450px',
locked: false,
};
}
} }
...@@ -275,4 +275,12 @@ mat-accordion mat-expansion-panel { ...@@ -275,4 +275,12 @@ mat-accordion mat-expansion-panel {
.mat-bottom-sheet-container { .mat-bottom-sheet-container {
max-height: 90vh !important; max-height: 90vh !important;
}
.mat-menu-panel {
max-width: inherit !important;
}
.mat-menu-content:not(:empty) {
padding-top: 0 !important;
padding-bottom: 0 !important;
} }
\ 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