multiplicity admin/front-end
This commit is contained in:
parent
b9fa3d1dac
commit
d4cf2294b2
|
@ -22,6 +22,9 @@ export class CompositeFieldFormComponent {
|
|||
|
||||
ngOnInit() {
|
||||
//this.addNewField();
|
||||
if(this.form.get("multiplicity"))
|
||||
if (this.form.get("multiplicity").value.min >1 || this.form.get("multiplicity").value.max >1 )
|
||||
this.isMultiplicityEnabled= true;
|
||||
this.isComposite = this.dataModel.fields.length > 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,9 @@ export class FieldFormComponent {
|
|||
constructon() { }
|
||||
|
||||
ngOnInit() {
|
||||
if(this.form.get("multiplicity"))
|
||||
if (this.form.get("multiplicity").value.min >1 || this.form.get("multiplicity").value.max >1)
|
||||
this.isFieldMultiplicityEnabled = true;
|
||||
// this.addNewRule();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,15 +12,17 @@
|
|||
<i>{{compositeField.extendedDescription}}</i>
|
||||
</h4>
|
||||
<div *ngFor="let field of compositeField.fields; let i = index;">
|
||||
<div *ngIf="visibilityRulesService.isElementVisible(null,field.id)">
|
||||
<div *ngIf="(field?.multiplicity?.max - 1) > (field?.multiplicityItems?.length)">
|
||||
<a (click)="addMultipleField(i)" style="cursor: pointer">
|
||||
Add one more field +
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<df-field [field]="field" [form]="form.get('fields').get(''+i)" [pathName]="pathName+'.fields.'+i"></df-field>
|
||||
<div *ngFor="let multipleField of field.multiplicityItems; let j = index;">
|
||||
<df-field [field]="multipleField" [form]="form.get('fields').get(''+i).get('multiplicityItems').get(''+j)"
|
||||
[pathName]="pathName+'.fields.'+i+'.multiplicityItems.'+j"></df-field>
|
||||
<df-field [field]="multipleField" [form]="form.get('fields').get(''+i).get('multiplicityItems').get(''+j)" [pathName]="pathName+'.fields.'+i+'.multiplicityItems.'+j"></df-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div *ngIf="visibilityRulesService.isElementVisible(null,compositeField.id)">
|
||||
<div *ngIf="(compositeField?.multiplicity?.max - 1) > (compositeField?.multiplicityItems?.length)">
|
||||
<a (click)="addMultipleField(i)" style="cursor: pointer">
|
||||
Add one more field +
|
||||
Add one more fieldset +
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@ export class RestBase {
|
|||
|
||||
|
||||
protocol: string = "http";
|
||||
hostname: string ="localhost"
|
||||
hostname: string ="192.168.32.103"
|
||||
port: number = 8080;
|
||||
webappname: string = "dmp-backend";
|
||||
|
||||
|
|
Loading…
Reference in New Issue