page Id fix Id_to Guid
fix icon to add radio button comment the Visibility rule frome admin editor fix delete plice for selection
This commit is contained in:
parent
fd809ab361
commit
245f533a98
|
@ -1,6 +1,7 @@
|
||||||
import { FormGroup } from '@angular/forms';
|
import { FormGroup } from '@angular/forms';
|
||||||
import { Page } from '../../../../core/model/admin/dataset-profile/dataset-profile';
|
import { Page } from '../../../../core/model/admin/dataset-profile/dataset-profile';
|
||||||
import { BaseFormModel } from '../../../../core/model/base-form-model';
|
import { BaseFormModel } from '../../../../core/model/base-form-model';
|
||||||
|
import { Guid } from '../../../../common/types/guid';
|
||||||
|
|
||||||
export class PageEditorModel extends BaseFormModel {
|
export class PageEditorModel extends BaseFormModel {
|
||||||
public title: string;
|
public title: string;
|
||||||
|
@ -10,7 +11,7 @@ export class PageEditorModel extends BaseFormModel {
|
||||||
constructor(ordinal?: number) {
|
constructor(ordinal?: number) {
|
||||||
super();
|
super();
|
||||||
if (isNaN(ordinal)) { this.ordinal = 0; } else { this.ordinal = ordinal; }
|
if (isNaN(ordinal)) { this.ordinal = 0; } else { this.ordinal = ordinal; }
|
||||||
this.id = 'page_' + this.ordinal;
|
this.id = Guid.create().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
fromModel(item: Page): PageEditorModel {
|
fromModel(item: Page): PageEditorModel {
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto"><button mat-icon-button (click)="addNewRow()" type="button"></button>
|
<div class="col-auto">
|
||||||
<mat-icon>add</mat-icon>
|
<button mat-icon-button (click)="addNewRow()" type="button"><mat-icon>add</mat-icon></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<div class="row" *ngFor="let ruleFormGroup of form['controls'] let i=index;" [formGroup]="ruleFormGroup">
|
<div class="row" *ngFor="let ruleFormGroup of form['controls'] let i=index;" [formGroup]="ruleFormGroup">
|
||||||
<span class="col-auto">{{i + 1}}</span>
|
<span class="col-auto">{{i + 1}}</span>
|
||||||
<mat-form-field class="col">
|
<!-- <mat-form-field class="col">
|
||||||
<mat-select placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.RULE.FIELDS.RULE-TYPE' | translate}}" formControlName="ruleType">
|
<mat-select placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.RULE.FIELDS.RULE-TYPE' | translate}}" formControlName="ruleType">
|
||||||
<mat-option>field value</mat-option>
|
<mat-option>field value</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field> -->
|
||||||
<mat-form-field class="col">
|
<mat-form-field class="col">
|
||||||
<input matInput type="text" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.RULE.FIELDS.TARGET' | translate}}" formControlName="target" (change)="targetValidation()">
|
<input matInput type="text" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.RULE.FIELDS.TARGET' | translate}}" formControlName="target" (change)="targetValidation()">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
|
@ -44,7 +44,7 @@ export class DatasetProfileEditorSectionComponent extends BaseComponent implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteSectionInSection(index) {
|
DeleteSectionInSection(index) {
|
||||||
this.dataModel.sections.splice(index);
|
this.dataModel.sections.splice(index,1);
|
||||||
(<FormArray>this.form.get('sections')).removeAt(index);
|
(<FormArray>this.form.get('sections')).removeAt(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue