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