77 lines
3.3 KiB
HTML
77 lines
3.3 KiB
HTML
<h2 mat-dialog-title>FacetComposer: New {{titleType}} ({{titlePath}})</h2>
|
|
|
|
<!-- myForm inizio form globale -->
|
|
<mat-dialog-content>
|
|
|
|
<mat-expansion-panel>
|
|
<mat-expansion-panel-header>
|
|
<mat-panel-title>
|
|
{{typeSpec.name}}
|
|
</mat-panel-title>
|
|
<mat-panel-description>
|
|
<!--la descrizione è lunga e non posso metterla qua-->
|
|
</mat-panel-description>
|
|
</mat-expansion-panel-header>
|
|
<p> {{typeSpec.description}} </p>
|
|
</mat-expansion-panel>
|
|
|
|
<div [formGroup]="myForm">
|
|
|
|
<div formArrayName="facets">
|
|
<div [formGroupName] ="ind" *ngFor="let fct of facetArray.controls; let ind=index;" >
|
|
<mat-expansion-panel>
|
|
<mat-expansion-panel-header>
|
|
<mat-panel-title>
|
|
{{typeSpec.facetSpecs[ind].name}}
|
|
<!--TODO: vedi quando si possono rendere editabili le relazioni-->
|
|
</mat-panel-title>
|
|
</mat-expansion-panel-header>
|
|
<div style="border: 1px solid rgb(202, 202, 202); padding: 10px; margin: 5px;">
|
|
<p>{{typeSpec.facetSpecs[ind].description}}</p>
|
|
</div>
|
|
<mat-form-field>
|
|
<!--TODO: trasforma in una select-->
|
|
<mat-label for="relation">relation</mat-label>
|
|
<input matInput formControlName="relation" id="relation" type="text" value="{{typeSpec.facetSpecs[ind].relation}}"/>
|
|
<!--
|
|
<mat-select placeholder="relation" formControlName="relation">
|
|
<mat-option *ngFor="let item of relationOptions(typeSpec.facetSpecs[ind].relation)" [value]="item">
|
|
</mat-option>
|
|
</mat-select>
|
|
-->
|
|
</mat-form-field>
|
|
<!--
|
|
<mat-form-field id="pathfield" [style.width.px]="200" class="form-field">
|
|
<mat-select [(value)]="selected" placeholder="Contexts" formControlName="pathfield" (valueChange)="setNewContext($event)">
|
|
<mat-select-filter [placeholder]="'filter by name'" [displayMember]="'path'" [array]="allCtxs" (filteredReturn)="filteredContexts =$event"></mat-select-filter>
|
|
<mat-option *ngFor="let item of filteredContexts" [value]="item">
|
|
{{item.path}}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
-->
|
|
|
|
<!-- OK SO FAR -->
|
|
<div formArrayName="properties" style="border: 1px solid rgb(84, 193, 255); padding: 10px; margin: 5px;">
|
|
<div [formGroupName] ="i" *ngFor="let y of getPropertiesArray(ind).controls; let i=index;">
|
|
<mat-form-field>
|
|
<mat-label>{{typeSpec.facetSpecs[ind].guiProps[i].label}}</mat-label>
|
|
<input matInput formControlName="{{typeSpec.facetSpecs[ind].guiProps[i].name}}" id="{{typeSpec.facetSpecs[ind].guiProps[i].name}}"
|
|
type="{{typeSpec.facetSpecs[ind].guiProps[i].type}}"/>
|
|
</mat-form-field>
|
|
</div>
|
|
</div>
|
|
</mat-expansion-panel>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- <button mat-button (click)="doAction()">Save Form</button> -->
|
|
<!--</form>-->
|
|
<!--fine form esterna-->
|
|
</mat-dialog-content>
|
|
<mat-dialog-actions align="end">
|
|
<button mat-button type="submit">Submit</button>
|
|
<button mat-button (click)="close()">Cancel</button>
|
|
</mat-dialog-actions>
|
|
<!--fine form esterna--> |