Skip to content
Snippets Groups Projects
Verified Commit 8135cc37 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

#271 add update en cancel button in difflist and visa circuit

parent 22d639dc
No related branches found
No related tags found
No related merge requests found
......@@ -64,8 +64,9 @@
<div class="col-sm-12">
<mat-form-field>
<mat-select id="parent_entity_id" name="parent_entity_id" title="{{lang.isLinkedTo}}" placeholder="{{lang.isLinkedTo}}" [(ngModel)]="currentEntity.parent_entity_id"
(change)="selectParentEntity(currentEntity.parent_entity_id)" required>
<mat-option *ngIf="entities.length == 0" value="">
(change)="selectParentEntity(currentEntity.parent_entity_id)">
<mat-option value="">
<i style="opacity:0.5;text-align:center;">- {{lang.noEntity}} -</i>
</mat-option>
<ng-container *ngFor="let entity of entities | sortBy : 'entity_label'">
<mat-option [value]="entity.entity_id" *ngIf="(!entity.state.disabled && entity.entity_id != currentEntity.entity_id) || currentEntity.parent_entity_id == entity.entity_id">
......@@ -238,7 +239,7 @@
<p mat-line>{{template.labelToDisplay}}
<small style="opacity:0.5;">{{template.descriptionToDisplay}}</small>
</p>
<button *ngIf="role.id != 'dest'" matTooltip="{{lang.delete}}" mat-icon-button color="warn" (click)="removeDiffList(i,role.id)">
<button matTooltip="{{lang.delete}}" mat-icon-button color="warn" (click)="removeDiffList(i,role.id)">
<mat-icon class="fa fa-remove"></mat-icon>
</button>
</mat-list-item>
......@@ -247,15 +248,21 @@
</span>
</mat-list>
</div>
<div class="form-group" *ngIf="currentEntity.entity_id">
<div class="col-md-12 text-center" style="padding:10px;">
<button mat-raised-button color="primary" (click)="saveDiffList()" [disabled]="!this.listDiffModified || (currentEntity.listTemplate.dest.length == 0 && currentEntity.listTemplate.cc.length > 0)">{{lang.save}}</button>
<button mat-raised-button color="default" (click)="loadEntity(this.currentEntity.entity_id)" [disabled]="!this.listDiffModified">{{lang.cancel}}</button>
</div>
</div>
</div>
</mat-tab>
<mat-tab label="{{lang.visa}}" *ngIf="!creationMode">
<div class="row" style="margin:0px;">
<div class="row" style="margin:0px;" id="visaCircuitContent">
<div class="col-md-12">
<mat-form-field>
<input #autocompleteFilter type="text" placeholder="{{lang.addVisaSignUser}}" matInput [matAutocomplete]="auto" [formControl]="userCtrl">
<input #autocompleteFilter type="text" placeholder="{{lang.addVisaSignUser}}" matInput [matAutocomplete]="auto" [formControl]="userCtrl">
<mat-autocomplete #auto="matAutocomplete">
<mat-option *ngFor="let elem of filteredUsers | async" [value]="elem.id" (click)="addElemListModelVisa(elem)">
<mat-option *ngFor="let elem of filteredUsers | async" [value]="elem.id" (click)="addElemListModelVisa(elem);autocompleteFilter.isOpen=true">
<p mat-line *ngIf="elem.type == 'user'">
<span class="col-xm-1">
<mat-icon color="primary" class="fa fa-user fa-2x" style="margin-right:0px;"></mat-icon>
......@@ -283,6 +290,12 @@
</span>
</mat-list>
</div>
<div class="form-group" *ngIf="currentEntity.entity_id">
<div class="col-md-12 text-center" style="padding:10px;">
<button mat-raised-button color="primary" (click)="saveDiffListVisa()" [disabled]="!this.listDiffModified || (currentEntity.listTemplate.dest.length == 0 && currentEntity.listTemplate.cc.length > 0)">{{lang.save}}</button>
<button mat-raised-button color="default" (click)="loadEntity(this.currentEntity.entity_id)" [disabled]="!this.listDiffModified">{{lang.cancel}}</button>
</div>
</div>
</div>
</mat-tab>
<mat-tab label="{{lang.relatedUsers}}" *ngIf="!creationMode">
......
......@@ -199,6 +199,7 @@ export const LANG_EN = {
"newSignature" : "New signature",
"no" : "No",
"noAttachment" : "No attachment",
"noEntity" : "No entity",
"noReplacement" : "No replacement",
"notes" : "Notes",
"notificationAdded" : "Notification added",
......
......@@ -214,6 +214,7 @@ export const LANG_FR = {
"next" : "Suivant",
"no" : "Non",
"noAttachment" : "Sans pièce jointe",
"noEntity" : "Aucune entité",
"noRecord" : "Aucun élément",
"noReplacement" : "Aucun remplacement",
"noResult" : "Aucun résultat",
......
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