diff --git a/src/app/core/shared/metadata.models.ts b/src/app/core/shared/metadata.models.ts
index 085cdb4504..c29ac3bd2b 100644
--- a/src/app/core/shared/metadata.models.ts
+++ b/src/app/core/shared/metadata.models.ts
@@ -3,7 +3,7 @@ import { autoserialize, Serialize, Deserialize } from 'cerialize';
import { hasValue } from '../../shared/empty.util';
/* tslint:disable:max-classes-per-file */
-const VIRTUAL_METADATA_PREFIX = 'virtual::';
+export const VIRTUAL_METADATA_PREFIX = 'virtual::';
/** A single metadata value and its properties. */
export interface MetadataValueInterface {
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.html
index ce76ef20db..37c9bb9158 100644
--- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.html
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.html
@@ -58,6 +58,8 @@
[relationshipOptions]="model.relationship">
+
+
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
index 1aa6bbdca5..969f34a35f 100644
--- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
@@ -16,7 +16,7 @@ import {
ViewChild,
ViewContainerRef
} from '@angular/core';
-import { FormGroup } from '@angular/forms';
+import { FormArray, FormGroup } from '@angular/forms';
import {
DYNAMIC_FORM_CONTROL_TYPE_ARRAY,
@@ -29,7 +29,7 @@ import {
DYNAMIC_FORM_CONTROL_TYPE_SELECT,
DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA,
DYNAMIC_FORM_CONTROL_TYPE_TIMEPICKER,
- DynamicDatePickerModel,
+ DynamicDatePickerModel, DynamicFormArrayModel,
DynamicFormControl,
DynamicFormControlContainerComponent,
DynamicFormControlEvent,
@@ -331,4 +331,12 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
.filter((sub) => hasValue(sub))
.forEach((sub) => sub.unsubscribe());
}
+ //
+ //
+ // removeItem($event, arrayContext: DynamicFormArrayModel, index: number): void {
+ // const formArrayControl = this.group.get(this.formBuilderService.getPath(arrayContext)) as FormArray;
+ // this.removeArrayItem.emit(this.getEvent($event, arrayContext, index, 'remove'));
+ // this.formBuilderService.removeFormArrayGroup(index, formArrayControl, arrayContext);
+ // this.formService.changeForm(this.formId, this.formModel);
+ // }
}
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.html
index e142a84215..ead7bc1ff6 100644
--- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.html
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.html
@@ -1,8 +1,9 @@
-
-
-
+
+
-
+
+
diff --git a/src/app/shared/form/builder/models/form-field-metadata-value.model.ts b/src/app/shared/form/builder/models/form-field-metadata-value.model.ts
index 2222ef3a3f..c0bdb338e3 100644
--- a/src/app/shared/form/builder/models/form-field-metadata-value.model.ts
+++ b/src/app/shared/form/builder/models/form-field-metadata-value.model.ts
@@ -1,7 +1,7 @@
-import { isEmpty, isNotEmpty, isNotNull } from '../../../empty.util';
+import { hasValue, isEmpty, isNotEmpty, isNotNull } from '../../../empty.util';
import { ConfidenceType } from '../../../../core/integration/models/confidence-type';
import { PLACEHOLDER_PARENT_METADATA } from '../ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model';
-import { MetadataValueInterface } from '../../../../core/shared/metadata.models';
+import { MetadataValueInterface, VIRTUAL_METADATA_PREFIX } from '../../../../core/shared/metadata.models';
export interface OtherInformation {
[name: string]: string
@@ -65,6 +65,10 @@ export class FormFieldMetadataValueObject implements MetadataValueInterface {
return this.hasValue() && this.value === PLACEHOLDER_PARENT_METADATA;
}
+ get isVirtual(): boolean {
+ return hasValue(this.authority) && this.authority.startsWith(VIRTUAL_METADATA_PREFIX);
+ }
+
toString() {
return this.display || this.value;
}
diff --git a/src/app/shared/form/form.component.html b/src/app/shared/form/form.component.html
index 3cb33fb57d..b71c0a13fe 100644
--- a/src/app/shared/form/form.component.html
+++ b/src/app/shared/form/form.component.html
@@ -10,45 +10,35 @@
(dfBlur)="onBlur($event)"
(dfChange)="onChange($event)"
(dfFocus)="onFocus($event)">
-
- metadata: {{context.metadata}}
-
-
-
-
-
-
+
+
-
-
1 || (context.hasRelationship && index > 0)"
- class="col-xs-2 d-flex flex-column justify-content-sm-start align-items-end">
-
-
-
+
+
1 || (context.hasRelationship && index > 0 && !group.group[0]?.value?.isVirtual)"
+ class="col-xs-2 d-flex flex-column justify-content-sm-start align-items-end">
+
+
-
-
-
-
-
-
-
-
+
diff --git a/src/app/shared/form/form.component.ts b/src/app/shared/form/form.component.ts
index 077def0060..9ec23596e1 100644
--- a/src/app/shared/form/form.component.ts
+++ b/src/app/shared/form/form.component.ts
@@ -322,4 +322,9 @@ export class FormComponent implements OnDestroy, OnInit {
const control = group.controls[index] as FormControl;
return { $event, context, control, group, model, type };
}
+
+
+ print(data) {
+ console.log(data);
+ }
}