@@ -65,7 +65,7 @@ export class DsDynamicRelationGroupModalComponent extends DynamicFormControlComp
6565 @Output ( ) edit : EventEmitter < any > = new EventEmitter < any > ( ) ;
6666 @Output ( ) add : EventEmitter < any > = new EventEmitter < any > ( ) ;
6767
68- @ViewChild ( 'formRef' , { static : false } ) private formRef : FormComponent ;
68+ @ViewChild ( 'formRef' , { static : false } ) private formRef : FormComponent ;
6969
7070 public formModel : DynamicFormControlModel [ ] ;
7171 public vocabulary$ : Observable < Vocabulary > ;
@@ -75,20 +75,20 @@ export class DsDynamicRelationGroupModalComponent extends DynamicFormControlComp
7575
7676
7777 constructor ( private vocabularyService : VocabularyService ,
78- private formBuilderService : FormBuilderService ,
79- private formService : FormService ,
80- private cdr : ChangeDetectorRef ,
81- protected layoutService : DynamicFormLayoutService ,
82- protected validationService : DynamicFormValidationService ,
83- protected modalService : NgbModal ,
84- protected submissionService : SubmissionService ,
85- private activeModal : NgbActiveModal
78+ private formBuilderService : FormBuilderService ,
79+ private formService : FormService ,
80+ private cdr : ChangeDetectorRef ,
81+ protected layoutService : DynamicFormLayoutService ,
82+ protected validationService : DynamicFormValidationService ,
83+ protected modalService : NgbModal ,
84+ protected submissionService : SubmissionService ,
85+ private activeModal : NgbActiveModal
8686 ) {
8787 super ( layoutService , validationService ) ;
8888 }
8989
9090 ngOnInit ( ) {
91- const config = { rows : this . model . formConfiguration } as SubmissionFormsModel ;
91+ const config = { rows : this . model . formConfiguration } as SubmissionFormsModel ;
9292 this . formId = this . formService . getUniqueId ( this . model . id ) ;
9393 this . formModel = this . formBuilderService . modelFromConfiguration (
9494 this . model . submissionId ,
@@ -293,15 +293,15 @@ export class DsDynamicRelationGroupModalComponent extends DynamicFormControlComp
293293 const item = Object . create ( { } ) ;
294294 this . formModel . forEach ( ( row ) => {
295295 const modelRow = row as DynamicFormGroupModel ;
296- const mainRow = modelRow . group . find ( model => model . name === this . model . name ) ;
296+ const mainRow : any = modelRow . group . find ( model => model . name === this . model . name ) ;
297297 modelRow . group . forEach ( ( control : DynamicInputModel ) => {
298298 const controlValue : any = ( control ?. value as any ) ?. value || control ?. value || PLACEHOLDER_PARENT_METADATA ;
299299 const controlAuthority : any = ( control ?. value as any ) ?. authority || null ;
300300
301301 item [ control . name ] =
302302 new FormFieldMetadataValueObject (
303303 controlValue , ( control as any ) ?. language ,
304- ( mainRow as any ) . securityLevel ,
304+ controlValue === PLACEHOLDER_PARENT_METADATA ? null : mainRow . securityLevel ,
305305 controlAuthority ,
306306 null , 0 , null ,
307307 ( control ?. value as any ) ?. otherInformation || null
0 commit comments