diff --git a/src/frontend/app/actions/send-external-signatory-book-action/send-external-signatory-book-action.component.ts b/src/frontend/app/actions/send-external-signatory-book-action/send-external-signatory-book-action.component.ts index 86ae0c6e02de877df986f960ec034f5ef1338d7e..d6382d6facbfc16c2027773501a0bf3d5249eb3c 100644 --- a/src/frontend/app/actions/send-external-signatory-book-action/send-external-signatory-book-action.component.ts +++ b/src/frontend/app/actions/send-external-signatory-book-action/send-external-signatory-book-action.component.ts @@ -43,7 +43,9 @@ export class SendExternalSignatoryBookActionComponent implements OnInit { this.http.post('../../rest/resourcesList/users/' + this.data.currentBasketInfo.ownerId + '/groups/' + this.data.currentBasketInfo.groupId + '/baskets/' + this.data.currentBasketInfo.basketId + '/checkExternalSignatoryBook', { resources: this.data.selectedRes }) .subscribe((data: any) => { this.additionalsInfos = data.additionalsInfos; - this.signatoryBookEnabled = data.signatureBookEnabled; + if (this.additionalsInfos.attachments.length > 0) { + this.signatoryBookEnabled = data.signatureBookEnabled; + } this.errors = data.errors; this.loading = false; console.log(data); diff --git a/src/frontend/app/visa/visa-workflow.component.html b/src/frontend/app/visa/visa-workflow.component.html index b444e609de702b27ac4b9043aa429d0bfede28e6..8c57c1505ca81061cf171ebac2380da89f055206 100644 --- a/src/frontend/app/visa/visa-workflow.component.html +++ b/src/frontend/app/visa/visa-workflow.component.html @@ -1,7 +1,7 @@ <mat-list *ngIf="!loading"> <mat-form-field *ngIf="injectDatas.editable" appearance="outline" floatLabel="never" [style.fontSize.px]="10"> - <input id="availableUsers" type="text" matInput placeholder="{{lang.addPerson}}" - [matAutocomplete]="auto" [formControl]="userCtrl"> + <input id="availableUsers" type="text" matInput placeholder="{{lang.addPerson}}" [matAutocomplete]="auto" + [formControl]="userCtrl"> <mat-autocomplete #auto="matAutocomplete" (optionSelected)="addItem($event)" isOpen="true"> <mat-option *ngFor="let user of filteredUsers | async" [value]="user"> {{user.idToDisplay}} @@ -22,28 +22,22 @@ [ngClass]="{'fa-hourglass': diffusion.process_date == null,'fa-check': diffusion.process_date != null}" style="opacity:0.5;"></mat-icon> </ng-container> - <div mat-line style="display: flex;align-items: center;"> - <div style="flex:1;overflow: hidden;text-overflow: ellipsis;"> - <div style="text-overflow: ellipsis;overflow: hidden;"> + <div mat-line class="workflowLine"> + <div class="workflowLineContainer"> + <div class="workflowLineLabel"> {{diffusion.labelToDisplay}} </div> - <div style="opacity:0.5;flex: 1;text-overflow: ellipsis;overflow: hidden;">{{diffusion.item_entity}}</div> - <div *ngIf="diffusion.process_date != null" + <div class="workflowLineSubLabel"> + {{diffusion.item_entity}} + </div> + <div *ngIf="diffusion.process_date != null" class="workflowLineProcessDate" title='{{diffusion.process_date | date : lang.onRange + " dd/MM/y " + lang.atRange +" HH:mm"}}' - style="flex: 1;text-align: right;font-size: 90%;" color="accent">{{diffusion.process_date + color="accent">{{diffusion.process_date | timeAgo}}</div> </div> <div> - <button class="currentRoleButton" [disabled]="!injectDatas.editable" mat-button [matMenuTriggerFor]="menu" - title="{{lang[diffusion.currentRole+'User']}}">{{diffusion.requested_signature ? lang.signUser : lang.visaUser}}</button> - <mat-menu [class]="'listMenu'" #menu="matMenu"> - <div - style="text-align: center;font-size: 10px;color: white;background: #135F7F;padding: 5px;font-weight: bold;"> - {{lang.roles}} - </div> - <button *ngFor="let role of visaWorkflow.roles" mat-menu-item - (click)="changeRole(i)">{{lang[role+'User']}}</button> - </mat-menu> + <button class="currentRoleButton" [color]="diffusion.requested_signature ? 'primary': '' " [disabled]="!injectDatas.editable" mat-raised-button + title="{{lang[diffusion.currentRole+'User']}}" (click)="changeRole(i)">{{diffusion.requested_signature ? lang.signUser : lang.visaUser}}</button> </div> </div> diff --git a/src/frontend/app/visa/visa-workflow.component.scss b/src/frontend/app/visa/visa-workflow.component.scss index 036c226d2daff9d5c5370478151e356337d3845e..9b99b98ea4a5d05bea9fb765aa0ed4b09cc56291 100644 --- a/src/frontend/app/visa/visa-workflow.component.scss +++ b/src/frontend/app/visa/visa-workflow.component.scss @@ -55,13 +55,6 @@ text-align: center; } -::ng-deep.listMenu { - .mat-menu-content { - padding-top: 0; - padding-bottom: 0; - } -} - .emptyContent { opacity: 0.5; text-align: center; @@ -71,4 +64,33 @@ .processed { background: rgba(0, 128, 0, 0.11); +} + +.workflowLine { + display: flex !important; + align-items: center; + + &Container { + flex:1; + overflow: hidden; + text-overflow: ellipsis; + } + + &Label { + text-overflow: ellipsis; + overflow: hidden; + } + + &SubLabel { + opacity:0.5; + flex: 1; + text-overflow: ellipsis; + overflow: hidden; + } + + &ProcessDate { + flex: 1; + text-align: right; + font-size: 90%; + } } \ No newline at end of file