2021-02-15 18:16:48 +01:00
|
|
|
|
<!-- View Only : {{viewOnly}} -->
|
|
|
|
|
|
2021-02-19 15:35:14 +01:00
|
|
|
|
<div class="main-content">
|
2019-06-05 16:07:36 +02:00
|
|
|
|
<div class="container-fluid dataset-profile-editor" *ngIf="form" [formGroup]='form'>
|
2019-09-16 17:46:19 +02:00
|
|
|
|
<h3 *ngIf="isNew && !isClone && !isNewVersion">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE' | translate}}</h3>
|
|
|
|
|
<h3 *ngIf="isNew && isClone">
|
|
|
|
|
<span *ngIf="isClone">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE-CLONE' | translate}}</span>
|
|
|
|
|
{{form.get('label').value}}
|
|
|
|
|
</h3>
|
|
|
|
|
<h3 *ngIf="isNew && isNewVersion">
|
|
|
|
|
<span *ngIf="isNewVersion">{{'DATASET-PROFILE-EDITOR.TITLE.NEW-PROFILE-VERSION' | translate}}</span>
|
|
|
|
|
{{form.get('label').value}}
|
|
|
|
|
</h3>
|
2019-10-16 16:45:08 +02:00
|
|
|
|
|
2019-09-16 17:46:19 +02:00
|
|
|
|
<h3 *ngIf="!isNew">{{form.get('label').value}}</h3>
|
2020-06-03 11:13:31 +02:00
|
|
|
|
|
2019-06-21 17:06:30 +02:00
|
|
|
|
<div class="d-flex justify-content-end pb-3" *ngIf="form.get('status').value==1">
|
2021-02-03 11:21:31 +01:00
|
|
|
|
<button mat-raised-button color="primary" (click)="downloadXML();" type="button">{{
|
|
|
|
|
'DATASET-WIZARD.ACTIONS.DOWNLOAD-XML' | translate }}</button>
|
2019-06-05 16:07:36 +02:00
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Total steps: {{stepper.steps.length}} -->
|
|
|
|
|
|
|
|
|
|
<!-- Steps Navigation -->
|
2021-02-15 18:16:48 +01:00
|
|
|
|
<div class="row" style="padding: 2em;" *ngIf="steps">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
<div class="col-7 bg-white" style="overflow: hidden; padding: 0px" id="progress-container">
|
2021-02-15 18:16:48 +01:00
|
|
|
|
<div id="progress" [ngStyle]="progressStyle"></div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<div class="row p-1">
|
2021-02-18 16:13:56 +01:00
|
|
|
|
<div class="col text-center align-self-center" *ngFor="let step of steps; index as idx">
|
2021-02-12 15:27:35 +01:00
|
|
|
|
<span (click)="stepper.selectedIndex=idx" style="cursor: pointer">
|
|
|
|
|
{{step.label}}
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col d-flex justify-content-end">
|
2021-02-25 13:17:47 +01:00
|
|
|
|
<button mat-button class="navigate-btn" (click)="stepper.previous()" *ngIf="stepper.selectedIndex !=0">
|
2021-02-25 16:53:58 +01:00
|
|
|
|
<mat-icon>navigate_before</mat-icon> {{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</button>
|
2021-03-01 17:42:18 +01:00
|
|
|
|
<button mat-button class="navigate-btn ml-2" (click)="stepper.next();validateStep(stepper.selected);" *ngIf="stepper.selectedIndex != (steps.length-1)">
|
2021-02-25 16:53:58 +01:00
|
|
|
|
{{'DMP-EDITOR.STEPPER.NEXT' | translate}}<mat-icon>navigate_next</mat-icon>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</button>
|
2021-02-25 13:17:47 +01:00
|
|
|
|
|
|
|
|
|
|
2021-03-01 10:28:27 +01:00
|
|
|
|
<ng-container *ngIf="false">
|
|
|
|
|
<!-- <ng-container *ngIf="stepper.selectedIndex === (steps.length-1)"> -->
|
2021-02-25 13:17:47 +01:00
|
|
|
|
<ng-container *ngIf="!viewOnly">
|
|
|
|
|
|
|
|
|
|
<button mat-button class="navigate-btn ml-2"
|
|
|
|
|
(click)='onSubmit()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
<button mat-button class="navigate-btn ml-2"
|
|
|
|
|
(click)='finalize()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
|
|
|
|
|
</ng-container>
|
|
|
|
|
<!-- SAVE BUTTON WHEN FINALIZED-->
|
|
|
|
|
<ng-container *ngIf="showUpdateButton()">
|
|
|
|
|
|
|
|
|
|
<!-- <button mat-button class="navigate-btn ml-2"
|
|
|
|
|
(click)='checkFormValidation()'
|
|
|
|
|
[disabled]="form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.VALIDATE' | translate}}</button> -->
|
|
|
|
|
<button mat-button class="navigate-btn ml-2"
|
|
|
|
|
(click)='updateFinalized()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
</ng-container>
|
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
2021-02-15 18:16:48 +01:00
|
|
|
|
<mat-horizontal-stepper [linear]="true" #stepper class="stepper" (selectionChange)="onMatStepperSelectionChange($event)">
|
2021-02-12 15:27:35 +01:00
|
|
|
|
|
2021-02-25 13:17:47 +01:00
|
|
|
|
<mat-step [label]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.TITLE' | translate" [stepControl]="basicInfo">
|
2021-02-12 15:27:35 +01:00
|
|
|
|
<!-- <ng-template matStepLabel>{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.TITLE' | translate}}
|
|
|
|
|
</ng-template> -->
|
2021-02-03 11:21:31 +01:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-12">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<div class="heading">1.1 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NAME'| translate}} *</div>
|
|
|
|
|
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NAME-HINT'| translate}}</div>
|
|
|
|
|
<mat-form-field class="full-width">
|
|
|
|
|
<input matInput formControlName="label"
|
|
|
|
|
placeholder="{{'DATASET-PROFILE-EDITOR.FIELDS.DATASET-TITLE' | translate}}" required>
|
|
|
|
|
<mat-error *ngIf="form.get('label').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
|
|
|
|
|
translate}}
|
|
|
|
|
</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<div class="heading">1.2 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION'| translate}} *</div>
|
|
|
|
|
<!-- <div class="hint">{{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}</div> -->
|
|
|
|
|
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION-HINT'| translate}}</div>
|
|
|
|
|
<mat-form-field class="full-width">
|
|
|
|
|
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="3" cdkAutosizeMaxRows="5"
|
|
|
|
|
placeholder="{{'DATASET-PROFILE-EDITOR.FIELDS.DATASET-DESCRIPTION' | translate}}" required>
|
|
|
|
|
</textarea>
|
|
|
|
|
<mat-error *ngIf="form.get('description').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED'
|
|
|
|
|
| translate}}
|
|
|
|
|
</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-12">
|
|
|
|
|
<!-- <div class="heading">1.3 {{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}</div> -->
|
2021-02-25 13:17:47 +01:00
|
|
|
|
<div class="heading">1.3 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-LANGUAGE'| translate}} *</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<mat-form-field class="full-width">
|
|
|
|
|
<!-- <input matInput formControlName="description" placeholder="{{'DATASET-PROFILE-EDITOR.FIELDS.DATASET-DESCRIPTION' | translate}}" required> -->
|
|
|
|
|
<mat-select formControlName="language">
|
|
|
|
|
<mat-option *ngFor="let lang of getLanguageInfos()" [value]="lang.code">
|
|
|
|
|
{{ lang.name }}
|
|
|
|
|
</mat-option>
|
|
|
|
|
</mat-select>
|
|
|
|
|
<mat-error *ngIf="form.get('language').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
|
|
|
|
|
translate}}
|
|
|
|
|
</mat-error>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- <div class="col-12">
|
2021-02-03 11:21:31 +01:00
|
|
|
|
<button mat-button class="full-width" (click)="addPage()"
|
|
|
|
|
[disabled]="viewOnly">{{'DATASET-PROFILE-EDITOR.ACTIONS.NEXT' | translate}}</button>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div> -->
|
2021-02-03 11:21:31 +01:00
|
|
|
|
</div>
|
|
|
|
|
</mat-step>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<!-- <mat-step>
|
2019-06-05 16:07:36 +02:00
|
|
|
|
<ng-template matStepLabel>{{'DATASET-PROFILE-EDITOR.STEPS.PAGES.TITLE' | translate}}</ng-template>
|
|
|
|
|
<div class="row">
|
2021-02-03 11:21:31 +01:00
|
|
|
|
<app-dataset-profile-editor-page-component class="col-12" [form]="form.get('pages')"
|
|
|
|
|
[viewOnly]="viewOnly"></app-dataset-profile-editor-page-component>
|
2019-06-05 16:07:36 +02:00
|
|
|
|
<div class="col-12">
|
2021-02-03 11:21:31 +01:00
|
|
|
|
<button mat-button class="full-width" (click)="addPage()"
|
|
|
|
|
[disabled]="viewOnly">{{'DATASET-PROFILE-EDITOR.ACTIONS.ADD-PAGE' | translate}}</button>
|
2019-06-05 16:07:36 +02:00
|
|
|
|
</div>
|
2019-02-11 13:04:45 +01:00
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</mat-step> -->
|
2021-02-25 13:17:47 +01:00
|
|
|
|
<mat-step [label]="'DATASET-PROFILE-EDITOR.STEPS.FORM.TITLE' | translate" [stepControl]="form">
|
2021-02-12 15:27:35 +01:00
|
|
|
|
<!-- <ng-template matStepLabel>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.TITLE' | translate}}</ng-template> -->
|
2019-06-05 16:07:36 +02:00
|
|
|
|
<div class="row">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
<!-- TABLE -->
|
|
|
|
|
<div class="col-3">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row sticky-top" style="top : 2em">
|
|
|
|
|
<dataset-profile-table-of-contents class="toc-pane-container col"
|
|
|
|
|
[links]="toCEntries"
|
|
|
|
|
(stepFound)="onStepFound($event)"
|
|
|
|
|
(currentLinks)="getLinks($event)"
|
|
|
|
|
(itemClick)="displayItem($event)"
|
|
|
|
|
(newEntry)="addNewEntry($event)"
|
|
|
|
|
(createEntry) = "addNewEntry($event)"
|
|
|
|
|
(removeEntry)="onRemoveEntry($event)"
|
|
|
|
|
[itemSelected]="selectedTocEntry"
|
|
|
|
|
[viewOnly]="viewOnly"
|
|
|
|
|
(dataNeedsRefresh)="onDataNeedsRefresh()">
|
|
|
|
|
</dataset-profile-table-of-contents>
|
|
|
|
|
</div>
|
2021-02-03 11:21:31 +01:00
|
|
|
|
</div>
|
2021-02-04 11:22:52 +01:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
<!-- DISPLAYER -->
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<div class="col ml-4">
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="row" *ngIf="selectedTocEntry">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<!-- PAGE INFO -->
|
|
|
|
|
<div class="col-12 content-displayer p-2" *ngIf="selectedTocEntry.type === tocEntryEnumValues.Page">
|
|
|
|
|
<form [formGroup]="selectedTocEntry.form">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<!-- PAGE NAME -->
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="heading">{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE-NAME' | translate}} *</div>
|
|
|
|
|
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE-NAME-HINT' | translate}}</div>
|
|
|
|
|
<mat-form-field>
|
|
|
|
|
<input type="text" matInput formControlName="title">
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- PAGE ID -->
|
|
|
|
|
<!-- <div class="col">
|
|
|
|
|
<div class="heading">Page id *</div>
|
|
|
|
|
<mat-form-field>
|
|
|
|
|
<input type="text" matInput formControlName="id">
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div> -->
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<!-- <div class="row">
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="heading">Ordinal *</div>
|
|
|
|
|
<mat-form-field>
|
|
|
|
|
<input type="text" matInput formControlName="ordinal">
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div> -->
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="col-12" *ngIf="(selectedTocEntry.type === tocEntryEnumValues.Section) || (selectedTocEntry.type === tocEntryEnumValues.FieldSet)" >
|
|
|
|
|
<app-dataset-profile-editor-section-fieldset-component
|
|
|
|
|
[tocentry]="selectedTocEntry"
|
2021-02-12 12:23:39 +01:00
|
|
|
|
[viewOnly]="viewOnly"
|
2021-02-24 15:56:14 +01:00
|
|
|
|
(selectedEntryId)="displayItem(_findTocEntryById($event, getTocEntries()))"
|
|
|
|
|
(dataNeedsRefresh)="onDataNeedsRefresh()"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
</app-dataset-profile-editor-section-fieldset-component>
|
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="content-displayer row justify-content-center" *ngIf="!numOfPages" style="min-height: 30em;">
|
|
|
|
|
<div class="col-auto align-self-center text-center">
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.ACTIONS.NOTHING-HERE-HINT'| translate}}
|
|
|
|
|
<br>
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.ACTIONS.START-CREATING-PAGE-START'| translate}}
|
|
|
|
|
|
|
|
|
|
<strong style="cursor: pointer;" (click)="addNewEntry({childType: tocEntryEnumValues.Page,parent: null})">
|
|
|
|
|
<em>
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.ACTIONS.START-CREATING-PAGE-END'| translate}}
|
|
|
|
|
</em>
|
|
|
|
|
<mat-icon color="accent">add</mat-icon>
|
|
|
|
|
</strong>
|
|
|
|
|
</div>
|
2021-02-04 11:22:52 +01:00
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- TOOLBAR -->
|
|
|
|
|
<div class="col-auto"
|
2021-02-25 13:17:47 +01:00
|
|
|
|
*ngIf="((selectedTocEntry?.type == tocEntryEnumValues.Section)||(selectedTocEntry?.type == tocEntryEnumValues.FieldSet) )&&(selectedTocEntry?.subEntriesType != tocEntryEnumValues.Section) && !viewOnly">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<div class="row" class="actions-list bg-white sticky-top" style="top: 2em;">
|
|
|
|
|
<mat-list role="list">
|
|
|
|
|
|
|
|
|
|
<ng-container *ngIf="!viewOnly">
|
2021-02-25 16:53:58 +01:00
|
|
|
|
<h3 matSubheader>{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.GENERAL-TOOLS' | translate}}</h3>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
|
|
|
|
|
<mat-list-item *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet">
|
|
|
|
|
<mat-icon matListIcon>folder</mat-icon>
|
2021-02-25 16:53:58 +01:00
|
|
|
|
<span matLine style="cursor: pointer;" (click)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: {form: selectedTocEntry.form.parent.parent}})" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</mat-list-item>
|
|
|
|
|
<mat-list-item *ngIf="selectedTocEntry.type === tocEntryEnumValues.Section ">
|
|
|
|
|
<mat-icon matListIcon>folder</mat-icon>
|
2021-02-25 16:53:58 +01:00
|
|
|
|
<span matLine style="cursor: pointer;" (click)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: selectedTocEntry})" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</mat-list-item>
|
2021-02-04 11:22:52 +01:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
|
|
|
|
|
<mat-list-item *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet">
|
|
|
|
|
<mat-icon matListIcon>file_copy</mat-icon>
|
2021-02-25 16:53:58 +01:00
|
|
|
|
<span matLine style="cursor: pointer;" (click)="cloneFieldSet(selectedTocEntry.form)">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.CLONE' | translate}}</span>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</mat-list-item>
|
|
|
|
|
|
|
|
|
|
<mat-list-item *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet">
|
|
|
|
|
<mat-icon matListIcon>delete</mat-icon>
|
2021-02-25 16:53:58 +01:00
|
|
|
|
<span matLine style="cursor: pointer;" (click)="onRemoveEntry(selectedTocEntry)">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.DELETE' | translate}}</span>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</mat-list-item>
|
|
|
|
|
</ng-container>
|
|
|
|
|
</mat-list>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
2021-02-04 09:33:03 +01:00
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</div>
|
2021-02-04 09:33:03 +01:00
|
|
|
|
|
2021-02-04 11:22:52 +01:00
|
|
|
|
<!--
|
2021-02-04 09:33:03 +01:00
|
|
|
|
<mat-accordion class="col-12" [multi]="true">
|
2021-02-03 11:21:31 +01:00
|
|
|
|
<mat-expansion-panel *ngFor="let section of dataModel.sections; let i=index;" #panel>
|
|
|
|
|
<mat-expansion-panel-header>
|
|
|
|
|
<mat-panel-title class="toc-page-header">{{i + 1}}. {{form.get('sections').get(''+i).get('title').value}}
|
|
|
|
|
</mat-panel-title>
|
|
|
|
|
<button mat-icon-button type="button" class="deleteBtn" (click)="DeleteSection(i);"
|
|
|
|
|
[disabled]="viewOnly">
|
|
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
|
</button>
|
|
|
|
|
</mat-expansion-panel-header>
|
|
|
|
|
<div id="{{'s' + i}}" class="row" *ngIf="panel.expanded">
|
|
|
|
|
<app-dataset-profile-editor-section-component class="col-12"
|
|
|
|
|
[form]="form.get('sections').get(''+i)" [dataModel]="section"
|
|
|
|
|
[indexPath]="'s' + i" [viewOnly]="viewOnly">
|
|
|
|
|
</app-dataset-profile-editor-section-component>
|
|
|
|
|
</div>
|
|
|
|
|
</mat-expansion-panel>
|
|
|
|
|
</mat-accordion> -->
|
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
<!-- <div class="col-12">
|
2021-02-03 11:21:31 +01:00
|
|
|
|
<button mat-button (click)="addSection()" class="full-width"
|
|
|
|
|
[disabled]="viewOnly">{{'DATASET-PROFILE-EDITOR.ACTIONS.ADD-SECTION' | translate}}</button>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div> -->
|
2019-06-05 16:07:36 +02:00
|
|
|
|
</div>
|
|
|
|
|
</mat-step>
|
2021-02-25 16:53:58 +01:00
|
|
|
|
<mat-step [label]="'DATASET-PROFILE-EDITOR.ACTIONS.PREVIEW-AND-FINALIZE' | translate">
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.ACTIONS.PREVIEW-AND-FINALIZE' | translate}}
|
2021-02-15 18:16:48 +01:00
|
|
|
|
<!-- <button (click)="generatePreviewForm()">foo</button> -->
|
2021-02-17 18:44:50 +01:00
|
|
|
|
<ng-container *ngIf="form.get('sections')?.length">
|
|
|
|
|
<app-dataset-description [form]="previewForm" [visibilityRules]="visibilityRules" *ngIf="previewForm">
|
|
|
|
|
|
|
|
|
|
</app-dataset-description>
|
|
|
|
|
</ng-container>
|
2021-02-12 15:27:35 +01:00
|
|
|
|
</mat-step>
|
2021-02-03 11:21:31 +01:00
|
|
|
|
|
2019-06-05 16:07:36 +02:00
|
|
|
|
</mat-horizontal-stepper>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-18 16:13:56 +01:00
|
|
|
|
<ng-container *ngIf="true">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
<div class="d-flex">
|
|
|
|
|
<!-- SAVE BUTTON -->
|
|
|
|
|
<div class="col-6 d-flex" *ngIf="!viewOnly">
|
|
|
|
|
<div class="row mt-4">
|
2021-03-01 17:42:18 +01:00
|
|
|
|
<ng-container *ngIf="false">
|
|
|
|
|
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
|
|
|
|
|
(click)='checkFormValidation()'
|
|
|
|
|
[disabled]="form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.VALIDATE' | translate}}</button>
|
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
|
|
|
|
|
(click)='onSubmit()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
<button mat-raised-button class="col-auto" color="primary" type="button col-auto"
|
|
|
|
|
(click)='finalize()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
</div>
|
2019-11-22 16:06:47 +01:00
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<!-- SAVE BUTTON WHEN FINALIZED-->
|
|
|
|
|
<div class="col-6 d-flex" *ngIf="showUpdateButton()">
|
|
|
|
|
<div class="row mt-4">
|
|
|
|
|
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
|
|
|
|
|
(click)='checkFormValidation()'
|
|
|
|
|
[disabled]="form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.VALIDATE' | translate}}</button>
|
|
|
|
|
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
|
|
|
|
|
(click)='updateFinalized()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |
|
|
|
|
|
translate}}</button>
|
|
|
|
|
</div>
|
2019-02-11 13:04:45 +01:00
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<!-- DELETE BUTTON -->
|
|
|
|
|
<div class="col-6 d-flex justify-content-end" *ngIf="!isNew">
|
|
|
|
|
<div class="row mt-4">
|
|
|
|
|
<button mat-raised-button color="primary" (click)="delete()">
|
|
|
|
|
<mat-icon>delete</mat-icon>{{'DATASET-PROFILE-EDITOR.ACTIONS.DELETE' | translate}}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2019-06-21 17:06:30 +02:00
|
|
|
|
</div>
|
2019-02-11 13:04:45 +01:00
|
|
|
|
</div>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
</ng-container>
|
|
|
|
|
|
2021-03-01 17:42:18 +01:00
|
|
|
|
<!-- <div class="row">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<button (click)="printForm()">
|
|
|
|
|
console form
|
|
|
|
|
</button>
|
2021-03-01 17:42:18 +01:00
|
|
|
|
</div> -->
|
|
|
|
|
<!-- <div class="row">
|
2021-03-01 10:28:27 +01:00
|
|
|
|
|
|
|
|
|
<button (click)="printMyErrors()">
|
|
|
|
|
print errors
|
|
|
|
|
</button>
|
2021-03-01 17:42:18 +01:00
|
|
|
|
</div> -->
|
2021-02-15 18:16:48 +01:00
|
|
|
|
<!-- <div class="row">
|
|
|
|
|
<button (click)="foo()">foo</button>
|
|
|
|
|
</div> -->
|
2019-02-06 12:10:44 +01:00
|
|
|
|
</div>
|
2021-02-03 11:21:31 +01:00
|
|
|
|
</div>
|