2023-07-25 14:51:29 +02:00
< div class = "main-content" >
< div class = "container-fluid" >
2023-12-28 16:18:49 +01:00
< div * ngIf = "formGroup" class = "form-container" >
< div class = "fixed-editor-header" >
2023-07-25 14:51:29 +02:00
< div class = "card editor-header" >
< div class = "col" >
< div class = "row" >
< div class = "col-auto info" >
2023-12-28 16:18:49 +01:00
< div class = "title" > {{'DMP-EDITOR.TITLE-EDIT' | translate}}< / div >
< div class = "subtitle" > {{ formGroup.get('label').value }} < span * ngIf = "isDirty()" class = "changes" > ({{'DMP-EDITOR.UNSAVED-CHANGES' | translate}})< / span > < / div >
2023-07-25 14:51:29 +02:00
< / div >
< div class = "ml-auto d-flex flex-row" >
< div class = "col-auto d-flex align-items-center" >
2024-04-17 16:13:36 +02:00
< button [ disabled ] = " saving " * ngIf = "isDirty()" type = "button" mat-raised-button class = "discard-btn mr-3" ( click ) = " discardChanges ( ) " >
{{'DMP-EDITOR.ACTIONS.DISCARD.DISCARD' | translate}}
2023-09-12 14:38:23 +02:00
< / button >
2024-01-29 14:25:59 +01:00
< button [ disabled ] = " saving " * ngIf = "isNew" mat-raised-button type = "button" ( click ) = " formSubmit ( ) " class = "save-btn" >
2023-07-25 14:51:29 +02:00
{{'DMP-EDITOR.ACTIONS.SAVE' | translate}}
< / button >
2023-09-12 14:38:23 +02:00
< div * ngIf = "!isNew && formGroup.enabled && !lockStatus" >
2023-07-25 14:51:29 +02:00
< button [ disabled ] = " saving " * ngIf = "!isFinalized" mat-raised-button ( click ) = " formSubmit ( ) " class = "save-btn" >
{{'DMP-EDITOR.ACTIONS.SAVE' | translate}}
< / button >
2023-09-12 14:38:23 +02:00
< / div >
2024-03-19 17:27:30 +01:00
< button * ngIf = "lockStatus" mat-raised-button disabled class = "description-save-btn cursor-default" type = "button" > {{ 'DMP-EDITOR.LOCKED' | translate}}< / button >
2023-07-25 14:51:29 +02:00
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
2023-10-25 19:53:47 +02:00
<!-- First Step -->
< div class = "row" id = "editor-form" * ngIf = "this.step === 0 && this.isNew" >
< div class = "col-12 blueprint-section" >
< div class = "row" >
2023-12-28 16:18:49 +01:00
< div class = "heading2 col-12" > {{'DMP-EDITOR.FIELDS.TITLE' | translate}} *< / div >
2023-10-25 19:53:47 +02:00
< div class = "col-12" >
< mat-form-field class = "w-100" >
2023-12-28 16:18:49 +01:00
< mat-label > {{'DMP-EDITOR.FIELDS.TITLE' | translate}}< / mat-label >
2023-10-25 19:53:47 +02:00
< input matInput type = "text" name = "label" [ formControl ] = " formGroup . get ( ' label ' ) " required >
2023-12-28 16:18:49 +01:00
< mat-error * ngIf = "formGroup.get('label').hasError('backendError')" > {{formGroup.get('label').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "formGroup.get('label').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
2023-10-25 19:53:47 +02:00
< / mat-form-field >
< / div >
< / div >
< div class = "row" >
2023-12-28 16:18:49 +01:00
< div class = "heading2 col-12" > {{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}} *< / div >
2023-10-25 19:53:47 +02:00
< div class = "col-12" >
2024-04-05 10:11:31 +02:00
< rich-text-editor-component [ form ] = " formGroup . get ( ' description ' ) " placeholder = "{{'DMP-EDITOR.PLACEHOLDER.DESCRIPTION' | translate}}" [ required ] = " true " >
2023-10-25 19:53:47 +02:00
< / rich-text-editor-component >
< / div >
< / div >
< div class = "dmp-blueprint-form" style = "margin-top: 3%;" >
< div class = "heading2" > {{'DMP-EDITOR.FIELDS.BLUEPRINT' | translate}} *< / div >
< mat-form-field class = "w-100" >
< mat-label > {{'DMP-EDITOR.FIELDS.BLUEPRINT' | translate}}< / mat-label >
2024-01-31 16:07:16 +01:00
< app-single-auto-complete [ required ] = " false " [ formControl ] = " formGroup . get ( ' blueprint ' ) " placeholder = "{{'DMP-EDITOR.PLACEHOLDER.BLUEPRINT' | translate}}" [ configuration ] = " singleAutocompleteBlueprintConfiguration " >
2023-10-25 19:53:47 +02:00
< / app-single-auto-complete >
< / mat-form-field >
< / div >
< div class = "row" >
< div class = "col-5" >
2023-12-28 16:18:49 +01:00
< button mat-button class = "action-btn" [ disabled ] = " ! ( formGroup . get ( ' blueprint ' ) . value & & formGroup . get ( ' label ' ) . value & & formGroup . get ( ' description ' ) . value ) " ( click ) = " selectBlueprint ( ) " > {{'DMP-EDITOR.STEPPER.NEXT' | translate}}< / button >
2023-10-25 19:53:47 +02:00
< / div >
2023-12-28 16:18:49 +01:00
< div class = "col-7" * ngIf = "formGroup.get('blueprint').value == null || (formGroup.get('blueprint').value && formGroup.get('blueprint').value.id !== defaultBlueprintId)" >
2023-10-25 19:53:47 +02:00
< div class = "row" >
< div class = "col-6" >
< p > {{'DMP-EDITOR.ACTIONS.OR-CONTINUE-WITH' | translate}}< / p >
< / div >
< div class = "col-6" >
< button mat-button class = "action-btn" style = "float: right;" ( click ) = " selectDefaultBlueprint ( ) " > {{'DMP-EDITOR.ACTIONS.DEFAULT-BLUEPRINT' | translate}}< / button >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
2023-07-25 14:51:29 +02:00
< div class = "row" >
2023-09-11 07:57:09 +02:00
< div class = "col-auto dmp-stepper" * ngIf = "this.step != 0" >
2023-12-28 16:18:49 +01:00
< div class = "stepper-title" > {{'DMP-EDITOR.TITLE' | translate}}< / div >
2023-07-25 14:51:29 +02:00
< div class = "stepper-options" >
2023-09-11 07:57:09 +02:00
< ol class = "stepper-list" start = "1" >
2023-12-28 16:18:49 +01:00
< div * ngIf = "selectedBlueprint?.definition && this.step !== 0" >
<!-- <div *ngIf="selectedBlueprint?.definition"> -->
< div * ngFor = "let section of selectedBlueprint?.definition?.sections; let i=index" >
2024-04-22 15:55:20 +02:00
< li ( click ) = " changeStep ( i + 1 ) " [ ngClass ] = " { ' active ' : this . step = == ( i + 1 ) , ' text-danger ' : hasErrors ( section . id ) } " > {{section.label}}< / li >
2024-03-19 17:27:30 +01:00
< ol class = "descriptionsInSection" >
< li * ngFor = "let description of descriptionsInSection(section.id); let descriptionIndex = index" ( click ) = " editDescription ( description . id , false ) " class = "active-description" >
2023-09-12 14:38:23 +02:00
< div class = "d-flex flex-direction-row" >
2023-12-28 16:18:49 +01:00
< div class = "label" matTooltip = "{{description.label}}" > {{'DMP-EDITOR.DESCRIPTION' | translate}}: {{ description.label }}< / div >
2024-03-22 12:06:10 +01:00
< mat-icon * ngIf = "description.status !== descriptionStatusEnum.Finalized && canDeleteSection(section.id) && !formGroup.disabled" [ ngClass ] = " { ' drag-handle-disabled ' : formGroup . disabled } " class = "ml-2 mr-2 remove-description size-16" matTooltip = "{{'DMP-EDITOR.ACTIONS.DELETE' | translate}}" ( click ) = " $ event . stopPropagation ( ) ; removeDescription ( description . id ) " > close< / mat-icon >
2024-04-19 16:32:48 +02:00
< mat-icon * ngIf = "description.status === descriptionStatusEnum.Finalized" class = "ml-2 mr-2 status-icon check-icon size-16" matTooltip = "{{'TYPES.DESCRIPTION-STATUS.FINALIZED' | translate}}" > check< / mat-icon >
2023-09-12 14:38:23 +02:00
< / div >
< / li >
< / ol >
2024-03-21 12:06:59 +01:00
< ul * ngIf = "item.id && section.hasTemplates && canEditSection(section.id) && !formGroup.disabled" class = "add-description-option" >
2024-04-05 08:44:26 +02:00
< li >
< a class = "add-description-action" [ ngClass ] = " { ' drag-handle-disabled ' : ! canAddDescription ( section ) } " [ routerLink ] = " canAddDescription ( section ) ? [ ' / descriptions / edit / ' + item . id + ' / ' + section . id ] : null " >
< mat-icon [ matTooltipDisabled ] = " canAddDescription ( section ) " [ matTooltip ] = " ' DMP-EDITOR . DESCRIPTION-TEMPLATES-MAX-MULTIPLICITY ' | translate " > add< / mat-icon > {{'DMP-EDITOR.ACTIONS.ADD-DESCRIPTION-IN-SECTION' | translate}}
2023-09-11 07:57:09 +02:00
< / a >
< / li >
< / ul >
< / div >
2023-10-24 11:13:05 +02:00
< / div >
2023-07-25 14:51:29 +02:00
< / ol >
< / div >
< div class = "stepper-actions" * ngIf = "this.step !== 0" >
2023-09-11 07:57:09 +02:00
< div mat-raised-button type = "button" class = "col-auto previous stepper-btn mr-2 ml-auto" [ ngClass ] = " { ' previous-disabled ' : this . step = == 1 } " ( click ) = " previousStep ( ) " >
2023-07-25 14:51:29 +02:00
< span class = "material-icons" > chevron_left< / span >
2023-12-28 16:18:49 +01:00
< div > {{'DMP-EDITOR.ACTIONS.PREVIOUS-STEP' | translate}}< / div >
2023-07-25 14:51:29 +02:00
< / div >
2024-04-15 17:19:56 +02:00
< div * ngIf = "this.step < this.maxSteps" mat-raised-button type = "button" class = "col-auto stepper-btn ml-auto" [ ngClass ] = " { ' next-disabled ' : this . step = == this . maxSteps , ' next ' : this . step < selectedBlueprint ? . definition ? . sections ? . length , ' description-next ' : this . step > = selectedBlueprint?.definition?.sections?.length }" (click)="nextStep()">
2023-12-28 16:18:49 +01:00
< div > {{'DMP-EDITOR.ACTIONS.NEXT-STEP' | translate}}< / div >
2023-07-25 14:51:29 +02:00
< span class = "material-icons" > chevron_right< / span >
< / div >
< / div >
< div class = "col-auto pr-0" * ngIf = "this.step !== 0" >
2024-04-15 17:19:56 +02:00
< app-dmp-form-progress-indication class = "col-12" * ngIf = "formGroup && !formGroup.disabled && !lockStatus" [ formGroup ] = " formGroup " > < / app-dmp-form-progress-indication >
2023-07-25 14:51:29 +02:00
< / div >
< / div >
2023-10-25 19:53:47 +02:00
2023-09-12 14:38:23 +02:00
< div class = "col-auto form" id = "editor-form" * ngIf = "this.step !== 0" >
2023-12-28 16:18:49 +01:00
< div * ngIf = "selectedBlueprint?.definition" >
< div * ngFor = "let section of selectedBlueprint?.definition?.sections; let i=index" >
2023-07-25 14:51:29 +02:00
< div class = "section-info" [ hidden ] = " this . step ! = = ( i + 1 ) " >
< div class = "col-12 intro" >
{{section.description}}
< / div >
2024-01-29 10:47:12 +01:00
< div class = "col-12 card" * ngIf = "section.fields?.length > 0" >
2023-07-25 14:51:29 +02:00
< div class = "row" >
< div class = "col-12" >
2023-09-11 07:57:09 +02:00
< div * ngFor = "let field of section.fields; let j=index" >
2024-02-09 21:46:05 +01:00
< div class = "heading" * ngIf = "!field.label && field.category === dmpBlueprintSectionFieldCategoryEnum.System" > {{i + 1}}.{{j + 1}} {{enumUtils.toDmpBlueprintSystemFieldTypeString(field.systemFieldType)}}< span * ngIf = "field.required" > *< / span > < / div >
2024-02-16 16:42:01 +01:00
< div class = "heading" * ngIf = "!field.label && field.category === dmpBlueprintSectionFieldCategoryEnum.ReferenceType" > {{i + 1}}.{{j + 1}} {{field.referenceType.name}}< span * ngIf = "field.required" > *< / span > < / div >
2024-01-31 16:07:16 +01:00
< div class = "heading" * ngIf = "field.label" > {{i + 1}}.{{j + 1}} {{field.label}}< span * ngIf = "field.required" > *< / span > < / div >
2023-07-25 14:51:29 +02:00
< div * ngIf = "field.description != null && field.description.length > 0" class = "hint" > {{field.description}}< / div >
< div class = "input-form" >
2024-02-09 21:46:05 +01:00
< div * ngIf = "field.category === dmpBlueprintSectionFieldCategoryEnum.System" >
< div * ngIf = "field.systemFieldType == dmpBlueprintSystemFieldTypeEnum.Title" >
2023-10-27 17:56:19 +02:00
< mat-form-field class = "w-100" >
2024-02-01 10:36:55 +01:00
< input matInput placeholder = "{{field.placeholder ?? 'DMP-EDITOR.FIELDS.TITLE' | translate}}" type = "text" name = "label" [ formControl ] = " formGroup . get ( ' label ' ) " required >
2023-09-27 11:54:18 +02:00
< mat-error * ngIf = "formGroup.get('label').hasError('backendError')" >
2023-09-11 07:57:09 +02:00
{{formGroup.get('label').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "formGroup.get('label').hasError('required')" >
2023-09-27 11:54:18 +02:00
{{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
2023-09-11 07:57:09 +02:00
< / mat-form-field >
2023-07-25 14:51:29 +02:00
< / div >
2024-02-09 21:46:05 +01:00
< div * ngIf = "field.systemFieldType == dmpBlueprintSystemFieldTypeEnum.Description" >
2024-02-01 13:42:23 +01:00
< rich-text-editor-component [ form ] = " formGroup . get ( ' description ' ) " [ placeholder ] = " field . placeholder ? ? ' DMP-EDITOR . PLACEHOLDER . DESCRIPTION ' " [ required ] = " field . required " >
2023-09-11 07:57:09 +02:00
< / rich-text-editor-component >
2023-07-25 14:51:29 +02:00
< / div >
2024-02-09 21:46:05 +01:00
< div * ngIf = "field.systemFieldType == dmpBlueprintSystemFieldTypeEnum.Language" >
2023-10-27 17:56:19 +02:00
< mat-form-field class = "w-100" >
2024-02-01 13:42:23 +01:00
< mat-select [ formControl ] = " formGroup . get ( ' language ' ) " placeholder = "{{field.placeholder ?? 'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}" required >
2023-09-11 07:57:09 +02:00
< mat-option * ngFor = "let lang of getLanguageInfos()" [ value ] = " lang . code " >
{{ lang.name }}
< / mat-option >
< / mat-select >
2024-01-15 17:47:34 +01:00
< mat-error * ngIf = "formGroup.get('language').hasError('backendError')" > {{formGroup.get('language').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "formGroup.get('language').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
2023-09-11 07:57:09 +02:00
< / mat-form-field >
< / div >
2024-02-09 21:46:05 +01:00
< div * ngIf = "field.systemFieldType == dmpBlueprintSystemFieldTypeEnum.Contact" >
2024-01-31 10:27:36 +01:00
< div cdkDropList class = "col-12" ( cdkDropListDropped ) = " dropContacts ( $ event ) " >
2024-03-26 09:34:51 +01:00
< div * ngFor = "let contact of formGroup.get('properties').get('contacts').controls; let contactIndex=index;" cdkDrag class = "row align-items-center" [ cdkDragDisabled ] = " formGroup . disabled " ( mouseenter ) = " onContactHover ( contactIndex ) " ( mouseleave ) = " clearHoveredContact ( ) " >
2024-04-01 15:04:33 +02:00
< div class = "col-12 col-xl-auto pr-0" >
< span * ngIf = "!isContactSelected(contactIndex)" style = "font-size: 18px; box-sizing: border-box; display: inline-block; padding: 0.15rem 0.435rem 0.3rem 0.435rem;" > {{contactIndex + 1}}< / span >
2024-03-26 09:34:51 +01:00
< mat-icon * ngIf = "isContactSelected(contactIndex)" [ ngClass ] = " { ' drag-handle-disabled ' : formGroup . disabled } " cdkDragHandle class = "drag-handle" > drag_indicator< / mat-icon >
2024-01-31 10:27:36 +01:00
< / div >
2024-03-26 09:34:51 +01:00
< div class = "col-12 col-xl-auto" >
2024-01-31 11:30:21 +01:00
< mat-button-toggle-group name = "fontStyle" aria-label = "Font Style" [ formControl ] = " contact . get ( ' contactType ' ) " >
2024-01-31 10:27:36 +01:00
< div * ngFor = "let contactType of dmpContactTypeEnumValues" >
< mat-button-toggle class = "lang-button" [ value ] = " contactType " > {{enumUtils.toDmpContactTypeString(contactType)}}< / mat-button-toggle >
< / div >
< / mat-button-toggle-group >
< / div >
2024-04-01 15:04:33 +02:00
< div class = "col pt-3" >
2024-01-31 11:30:21 +01:00
< div class = "row" >
< div class = "col d-flex" * ngIf = "contact.get('contactType').value == dmpContactTypeEnum.Internal" >
< mat-form-field class = "w-100" >
2024-03-22 17:37:10 +01:00
< mat-label > {{'DMP-EDITOR.FIELDS.USER' | translate}}< / mat-label >
2024-02-01 13:42:23 +01:00
< app-single-auto-complete [ formControl ] = " contact . get ( ' userId ' ) " [ hidePlaceholder ] = " true " [ configuration ] = " userService . singleAutoCompleteDmpAssociatedUserConfiguration " > < / app-single-auto-complete >
2024-01-31 11:30:21 +01:00
< mat-error * ngIf = "contact.get('userId').hasError('backendError')" > {{contact.get('userId').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "contact.get('userId').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / mat-form-field >
< / div >
< ng-container * ngIf = "contact.get('contactType').value == dmpContactTypeEnum.External" >
< div class = "col" >
< mat-form-field class = "w-100" >
2024-03-22 17:37:10 +01:00
< mat-label > {{'DMP-EDITOR.FIELDS.FIRST-NAME' | translate}}< / mat-label >
2024-01-31 11:30:21 +01:00
< input matInput type = "text" name = "firstName" [ formControl ] = " contact . get ( ' firstName ' ) " >
< mat-error * ngIf = "contact.get('firstName').hasError('backendError')" > {{contact.get('firstName').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "contact.get('firstName').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / mat-form-field >
< / div >
< div class = "col" >
< mat-form-field class = "w-100" >
2024-03-22 17:37:10 +01:00
< mat-label > {{'DMP-EDITOR.FIELDS.LAST-NAME' | translate}}< / mat-label >
2024-01-31 11:30:21 +01:00
< input matInput type = "text" name = "lastName" [ formControl ] = " contact . get ( ' lastName ' ) " >
< mat-error * ngIf = "contact.get('lastName').hasError('backendError')" > {{contact.get('lastName').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "contact.get('lastName').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / mat-form-field >
< / div >
< div class = "col" >
< mat-form-field class = "w-100" >
2024-03-22 17:37:10 +01:00
< mat-label > {{'DMP-EDITOR.FIELDS.EMAIL' | translate}}< / mat-label >
2024-01-31 11:30:21 +01:00
< input matInput type = "text" name = "email" [ formControl ] = " contact . get ( ' email ' ) " >
< mat-error * ngIf = "contact.get('email').hasError('backendError')" > {{contact.get('email').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "contact.get('email').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / mat-form-field >
< / div >
< / ng-container >
2024-01-31 10:27:36 +01:00
< / div >
< / div >
2024-03-26 09:34:51 +01:00
< div class = "col-12 col-xl-auto" >
2024-04-19 16:32:48 +02:00
< button [ disabled ] = " formGroup . disabled " mat-icon-button class = "action-list-icon" matTooltip = "{{'DMP-EDITOR.ACTIONS.REMOVE-CONTACT' | translate}}" ( click ) = " removeContact ( contactIndex ) " [ disabled ] = " formGroup . disabled " >
2024-01-31 11:30:21 +01:00
< mat-icon > delete< / mat-icon >
< / button >
< / div >
2024-01-31 10:27:36 +01:00
< / div >
< mat-error * ngIf = "formGroup.get('properties').get('contacts').hasError('backendError')" > {{formGroup.get('properties').get('contacts').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "formGroup.get('properties').get('contacts').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / div >
2024-01-31 11:30:21 +01:00
< div class = "row" >
< div class = "col" >
< button mat-icon-button ( click ) = " addContact ( ) " [ disabled ] = " formGroup . disabled " >
< mat-icon > add< / mat-icon >
< / button >
< / div >
< / div >
2024-01-18 13:23:20 +01:00
< / div >
2024-02-09 21:46:05 +01:00
< div * ngIf = "field.systemFieldType == dmpBlueprintSystemFieldTypeEnum.AccessRights" >
2023-10-27 17:56:19 +02:00
< mat-form-field class = "w-100" >
2024-02-01 13:42:23 +01:00
< mat-select [ formControl ] = " formGroup . get ( ' accessType ' ) " placeholder = "{{field.placeholder ?? 'DMP-EDITOR.FIELDS.ACCESS-TYPE' | translate}}" >
2024-01-15 17:47:34 +01:00
< mat-option * ngFor = "let dmpAccessType of dmpAccessTypeEnumValues" [ value ] = " dmpAccessType " >
{{enumUtils.toDmpAccessTypeString(dmpAccessType)}}
2023-07-25 14:51:29 +02:00
< / mat-option >
< / mat-select >
2024-01-15 17:47:34 +01:00
< mat-error * ngIf = "formGroup.get('accessType').hasError('backendError')" > {{formGroup.get('accessType').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "formGroup.get('accessType').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
2023-07-25 14:51:29 +02:00
< / mat-form-field >
2024-01-15 17:47:34 +01:00
< / div >
2024-02-20 16:00:20 +01:00
< div * ngIf = "field.systemFieldType == dmpBlueprintSystemFieldTypeEnum.User" >
2024-02-22 12:57:42 +01:00
< div >
2024-03-21 17:01:17 +01:00
< app-dmp-user-field-component [ form ] = " formGroup " [ validationErrorModel ] = " editorModel . validationErrorModel " [ sections ] = " selectedBlueprint . definition . sections " > < / app-dmp-user-field-component >
2024-02-20 16:00:20 +01:00
< / div >
< / div >
2024-01-31 11:53:30 +01:00
< / div >
2024-02-09 21:46:05 +01:00
< div * ngIf = "field.category === dmpBlueprintSectionFieldCategoryEnum.ReferenceType" >
2024-04-19 10:10:51 +02:00
< ng-container * ngIf = "field.multipleSelect" >
< app-reference-field-component [ form ] = " formGroup . get ( ' properties ' ) . get ( ' dmpBlueprintValues ' ) . get ( field . id ) . get ( ' references ' ) " [ dependencies ] = " formGroup . get ( ' properties ' ) . get ( ' dmpBlueprintValues ' ) " [ label ] = " field . label " [ placeholder ] = " field . placeholder ? ? field . label " [ referenceType ] = " field . referenceType " [ multiple ] = " true " > < / app-reference-field-component >
< / ng-container >
< ng-container * ngIf = "!(field.multipleSelect)" >
< app-reference-field-component [ form ] = " formGroup . get ( ' properties ' ) . get ( ' dmpBlueprintValues ' ) . get ( field . id ) . get ( ' reference ' ) " [ dependencies ] = " formGroup . get ( ' properties ' ) . get ( ' dmpBlueprintValues ' ) " [ label ] = " field . label " [ placeholder ] = " field . placeholder ? ? field . label " [ referenceType ] = " field . referenceType " [ multiple ] = " false " > < / app-reference-field-component >
< / ng-container >
2024-02-09 21:46:05 +01:00
< / div >
< div * ngIf = "field.category === dmpBlueprintSectionFieldCategoryEnum.Extra" >
2024-01-31 11:53:30 +01:00
< div * ngIf = "field.dataType === dmpBlueprintExtraFieldDataTypeEnum.Text" >
< mat-form-field class = "w-100" >
< mat-label > {{field.label}}< / mat-label >
< input matInput placeholder = "{{field.placeholder ?? field.label}}" type = "text" name = "value" [ formControl ] = " formGroup . get ( ' properties ' ) . get ( ' dmpBlueprintValues ' ) . get ( field . id ) . get ( ' fieldValue ' ) " [ required ] = " field . required " >
< mat-error * ngIf = "formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('backendError')" > {{formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / mat-form-field >
< / div >
< div * ngIf = "field.dataType === dmpBlueprintExtraFieldDataTypeEnum.RichText" >
< rich-text-editor-component [ form ] = " formGroup . get ( ' properties ' ) . get ( ' dmpBlueprintValues ' ) . get ( field . id ) . get ( ' fieldValue ' ) " placeholder = "{{field.placeholder ?? field.label}}" [ required ] = " field . required " > < / rich-text-editor-component >
< / div >
< div * ngIf = "field.dataType === dmpBlueprintExtraFieldDataTypeEnum.Date" >
< mat-form-field class = "w-100" >
< mat-label > {{field.label}}< / mat-label >
2024-01-31 16:07:16 +01:00
< input matInput placeholder = "{{field.placeholder ?? field.label}}" name = "value" [ formControl ] = " formGroup . get ( ' properties ' ) . get ( ' dmpBlueprintValues ' ) . get ( field . id ) . get ( ' fieldValue ' ) " [ matDatepicker ] = " date " [ required ] = " field . required " >
< mat-datepicker-toggle matSuffix [ for ] = " date " > < / mat-datepicker-toggle >
< mat-datepicker # date > < / mat-datepicker >
2024-01-31 11:53:30 +01:00
< mat-error * ngIf = "formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('backendError')" > {{formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / mat-form-field >
< / div >
< div * ngIf = "field.dataType === dmpBlueprintExtraFieldDataTypeEnum.Number" >
< mat-form-field class = "w-100" >
< mat-label > {{field.label}}< / mat-label >
< input matInput placeholder = "{{field.placeholder ?? field.label}}" type = "number" name = "value" [ formControl ] = " formGroup . get ( ' properties ' ) . get ( ' dmpBlueprintValues ' ) . get ( field . id ) . get ( ' fieldValue ' ) " [ required ] = " field . required " >
< mat-error * ngIf = "formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('backendError')" > {{formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "formGroup.get('properties').get('dmpBlueprintValues').get(field.id).get('fieldValue').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / mat-form-field >
2023-07-25 14:51:29 +02:00
< / div >
< / div >
< / div >
< / div >
< / div >
2023-09-11 07:57:09 +02:00
< / div >
2024-02-01 10:36:55 +01:00
< / div >
< div class = "col-12 card" * ngIf = "section.hasTemplates" >
< div class = "row" >
< div class = "col-12" >
< div class = "input-form" >
< div class = "heading" > {{'DMP-EDITOR.FIELDS.DESCRIPTION-TEMPLATES' | translate}}< / div >
< mat-form-field class = "w-100" >
< mat-label > {{'DMP-EDITOR.FIELDS.DESCRIPTION-TEMPLATES-HINT' | translate}}< / mat-label >
2024-04-23 09:09:35 +02:00
<!-- <app - multiple - auto - complete placeholder="{{'DMP - EDITOR.FIELDS.DESCRIPTION - TEMPLATES - HINT' | translate}}" [hidePlaceholder]="true" required='true' [formControl]="formGroup.get('descriptionTemplates').get(section.id)" [configuration]="getDescriptionTemplateMultipleAutoCompleteConfiguration(section.id)" (optionActionClicked)="onPreviewDescriptionTemplate($event, section.id)"> -->
2024-04-19 11:29:21 +02:00
< app-multiple-auto-complete placeholder = "{{'DMP-EDITOR.FIELDS.DESCRIPTION-TEMPLATES-HINT' | translate}}" [ hidePlaceholder ] = " true " required = 'true' [ formControl ] = " formGroup . get ( ' descriptionTemplates ' ) . get ( section . id ) " [ configuration ] = " descriptionTemplateService . descriptionTempalteGroupMultipleAutocompleteConfiguration " ( optionActionClicked ) = " onPreviewDescriptionTemplate ( $ event , section . id ) " ( optionRemoved ) = " onRemoveDescriptionTemplate ( $ event , section . id ) " >
2024-02-01 10:36:55 +01:00
< / app-multiple-auto-complete >
< mat-error * ngIf = "formGroup.get('descriptionTemplates').get(section.id).hasError('backendError')" > {{formGroup.get('descriptionTemplates').get(section.id).getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "formGroup.get('descriptionTemplates').get(section.id).hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / mat-form-field >
< div class = "col pl-0 pt-0 pb-0 d-flex" >
< span class = "not-found-template" > {{'DMP-EDITOR.NO-TEMPLATE-MESSAGE' | translate}}< / span >
2023-07-25 14:51:29 +02:00
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
2023-10-25 19:53:47 +02:00
< / div >
2024-02-01 13:42:23 +01:00
< / div >
2024-04-22 15:55:20 +02:00
< / div >