set "Add one more fieldset + " on en.json

fix visibiliti on Radio-Box Word-List And Multiplisiti Button on  Finalized Datasets-Profiles And Dataset-Editors
This commit is contained in:
Diamantis Tziotzios 2019-02-14 13:27:41 +02:00
parent 7756eb2a31
commit bbfd5e9812
4 changed files with 44 additions and 28 deletions

View File

@ -4,21 +4,25 @@
| translate}}</h5> | translate}}</h5>
<mat-form-field class="col-12"> <mat-form-field class="col-12">
<input matInput type="string" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-PLACEHOLDER' | translate}}" <input matInput type="string"
[formControl]="form.get('data').get('label')"> placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-PLACEHOLDER' | translate}}"
[formControl]="form.get('data').get('label')">
</mat-form-field> </mat-form-field>
<div class="col-12"> <div class="col-12">
<div *ngFor="let option of form.get('data').get('options')['controls'] index as i" class="row"> <div *ngFor="let option of form.get('data').get('options')['controls'] index as i" class="row">
<mat-form-field class="col"> <mat-form-field class="col">
<input matInput type="string" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-LABEL' | translate}}" <input matInput type="string"
[formControl]="this.form.get('data').get('options').get(''+i).get('label')"> placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-LABEL' | translate}}"
[formControl]="this.form.get('data').get('options').get(''+i).get('label')">
</mat-form-field> </mat-form-field>
<mat-form-field class="col"> <mat-form-field class="col">
<input matInput type="string" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-VALUE' | translate}}" <input matInput type="string"
[formControl]="this.form.get('data').get('options').get(''+i).get('value')"> placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-VALUE' | translate}}"
[formControl]="this.form.get('data').get('options').get(''+i).get('value')">
</mat-form-field> </mat-form-field>
<button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button"> <button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button"
[disabled]="this.form.disabled">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div> </div>

View File

@ -4,21 +4,25 @@
| translate}}</h5> | translate}}</h5>
<mat-form-field class="col-12"> <mat-form-field class="col-12">
<input matInput type="string" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-PLACEHOLDER' | translate}}" <input matInput type="string"
[formControl]="form.get('data').get('label')"> placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-PLACEHOLDER' | translate}}"
[formControl]="form.get('data').get('label')">
</mat-form-field> </mat-form-field>
<div class="col-12"> <div class="col-12">
<div *ngFor="let option of form.get('data').get('options')['controls'] index as i" class="row"> <div *ngFor="let option of form.get('data').get('options')['controls'] index as i" class="row">
<mat-form-field class="col"> <mat-form-field class="col">
<input matInput placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-LABEL' | translate}}" <input matInput
type="text" [formControl]="form.get('data').get('options').get(''+i).get('label')"> placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-LABEL' | translate}}"
type="text" [formControl]="form.get('data').get('options').get(''+i).get('label')">
</mat-form-field> </mat-form-field>
<mat-form-field class="col"> <mat-form-field class="col">
<input matInput placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-VALUE' | translate}}" <input matInput
[formControl]="form.get('data').get('options').get(''+i).get('value')"> placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-VALUE' | translate}}"
[formControl]="form.get('data').get('options').get(''+i).get('value')">
</mat-form-field> </mat-form-field>
<button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button"> <button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button"
[disabled]="this.form.disabled">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div> </div>

View File

@ -9,33 +9,40 @@
<h3 *ngIf="form.get('description').value">{{form.get('description').value}}</h3> <h3 *ngIf="form.get('description').value">{{form.get('description').value}}</h3>
</mat-panel-description> </mat-panel-description>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div *ngFor="let compositeFieldFormGroup of form.get('compositeFields')['controls']; let i = index;" class="col-12"> <div *ngFor="let compositeFieldFormGroup of form.get('compositeFields')['controls']; let i = index;"
class="col-12">
<!-- <div *ngIf="isElementVisible(compositeField)" class="row"> --> <!-- <div *ngIf="isElementVisible(compositeField)" class="row"> -->
<!-- *ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value)" --> <!-- *ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value)" -->
<div class="row" *ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value) && this.visibilityRulesService.scanIfChildsOfCompositeFieldHasVisibleItems(compositeFieldFormGroup)"> <div class="row"
*ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value) && this.visibilityRulesService.scanIfChildsOfCompositeFieldHasVisibleItems(compositeFieldFormGroup)">
<div *ngIf="(compositeFieldFormGroup.get('multiplicity').value.max - 1) > (compositeFieldFormGroup.get('multiplicityItems').length)" <div *ngIf="(compositeFieldFormGroup.get('multiplicity').value.max - 1) > (compositeFieldFormGroup.get('multiplicityItems').length)"
class="col-12"> class="col-12">
<button mat-button color="primary" (click)="addMultipleField(i)"> <button mat-button color="primary" (click)="addMultipleField(i)"
Add one more fieldset + [disabled]="compositeFieldFormGroup.disabled">
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.MULTIPLICITY-ADD-ONE-FIELD' | translate}}
</button> </button>
</div> </div>
<app-form-composite-field class="align-self-center col-12" [form]="compositeFieldFormGroup" [datasetProfileId]="datasetProfileId" <app-form-composite-field class="align-self-center col-12" [form]="compositeFieldFormGroup"
[isChild]="false"></app-form-composite-field> [datasetProfileId]="datasetProfileId" [isChild]="false"></app-form-composite-field>
<div *ngIf="compositeFieldFormGroup" class="col-12"> <div *ngIf="compositeFieldFormGroup" class="col-12">
<div class="row"> <div class="row">
<div class="col-12" *ngFor="let multipleCompositeFieldFormGroup of compositeFieldFormGroup.get('multiplicityItems')['controls']; let j = index"> <div class="col-12"
*ngFor="let multipleCompositeFieldFormGroup of compositeFieldFormGroup.get('multiplicityItems')['controls']; let j = index">
<div class="styleBorder row"> <div class="styleBorder row">
<app-form-composite-field class=" align-self-center col" [form]="multipleCompositeFieldFormGroup" [datasetProfileId]="datasetProfileId" <app-form-composite-field class=" align-self-center col"
[isChild]="true"></app-form-composite-field> [form]="multipleCompositeFieldFormGroup" [datasetProfileId]="datasetProfileId"
[isChild]="true"></app-form-composite-field>
<div class="col-auto align-self-center"> <div class="col-auto align-self-center">
<button mat-icon-button type="button" class="deleteBtn" (click)="deleteMultipeFieldFromCompositeFormGroup(i,j);"> <button mat-icon-button type="button" class="deleteBtn"
(click)="deleteMultipeFieldFromCompositeFormGroup(i,j);">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div> </div>
</div> </div>
</div> </div>
<mat-form-field *ngIf="compositeFieldFormGroup.get('hasCommentField').value" class="col-12" [formGroup]="compositeFieldFormGroup"> <mat-form-field *ngIf="compositeFieldFormGroup.get('hasCommentField').value" class="col-12"
[formGroup]="compositeFieldFormGroup">
<input matInput formControlName="commentFieldValue" placeholder="comment"> <input matInput formControlName="commentFieldValue" placeholder="comment">
</mat-form-field> </mat-form-field>
<div class="col"></div> <div class="col"></div>
@ -49,8 +56,8 @@
</div> </div>
<div *ngIf="form.get('sections')" class="col-12"> <div *ngIf="form.get('sections')" class="col-12">
<div *ngFor="let subSectionFormGroup of form.get('sections')['controls']; let j = index;" class="row"> <div *ngFor="let subSectionFormGroup of form.get('sections')['controls']; let j = index;" class="row">
<app-form-section class="col-12" [form]="subSectionFormGroup" [path]="path+'.'+(j+1)" [pathName]="pathName+'.sections.'+j" <app-form-section class="col-12" [form]="subSectionFormGroup" [path]="path+'.'+(j+1)"
[datasetProfileId]="datasetProfileId"></app-form-section> [pathName]="pathName+'.sections.'+j" [datasetProfileId]="datasetProfileId"></app-form-section>
</div> </div>
</div> </div>
</mat-expansion-panel> </mat-expansion-panel>

View File

@ -95,6 +95,7 @@
"EXTENDED-DESCRIPTION": "Extended Description", "EXTENDED-DESCRIPTION": "Extended Description",
"MULTIPLICITY-MIN": "Multiplicity Min", "MULTIPLICITY-MIN": "Multiplicity Min",
"MULTIPLICITY-MAX": "Multiplicity Max", "MULTIPLICITY-MAX": "Multiplicity Max",
"MULTIPLICITY-ADD-ONE-FIELD": "Add one more fieldset +",
"ORDER": "Order" "ORDER": "Order"
}, },
"ACTIONS": { "ACTIONS": {