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'>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Total steps: {{stepper.steps.length}} -->
|
|
|
|
|
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<div class="row" style="padding: 2em; margin-bottom: 1em; background: #F5F5F5 0% 0% no-repeat padding-box;" >
|
|
|
|
|
|
|
|
|
|
<div class="col-12" style="margin-bottom: 2em;">
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
<h3 *ngIf="!isNew">{{form.get('label').value}}</h3>
|
|
|
|
|
|
|
|
|
|
<div class="d-flex justify-content-end pb-3" *ngIf="form.get('status').value==1">
|
|
|
|
|
<button mat-raised-button color="primary" (click)="downloadXML();" type="button">{{
|
|
|
|
|
'DATASET-WIZARD.ACTIONS.DOWNLOAD-XML' | translate }}</button>
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<!-- Steps Navigation -->
|
|
|
|
|
<div class="col-12 d-flex" *ngIf="steps">
|
|
|
|
|
<div class="col-7 bg-white" style="overflow: hidden; padding: 0px" id="progress-container">
|
|
|
|
|
<div id="progress" [ngStyle]="progressStyle"></div>
|
|
|
|
|
<div class="row h-100">
|
|
|
|
|
<div class="col text-center align-self-center" *ngFor="let step of steps; index as idx">
|
|
|
|
|
<span (click)="stepper.selectedIndex=idx"
|
|
|
|
|
class="stepper-title-label"
|
|
|
|
|
[ngClass]="{'stepper-title-label-locked': !isStepUnlocked(idx),'stepper-title-label-completed':idx < stepper.selectedIndex} ">
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<ng-container *ngIf="(step.completed &&(idx!=steps.length-1)) else numberLabel">
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<mat-icon style="font-size:0.7em; height: 0px;">done</mat-icon>
|
|
|
|
|
</ng-container>
|
|
|
|
|
<ng-template #numberLabel>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
{{idx+1}}
|
2021-03-08 10:24:30 +01:00
|
|
|
|
</ng-template>
|
|
|
|
|
{{step.label}}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<div class="col d-flex justify-content-end">
|
|
|
|
|
<button [@previous_btn] mat-button class="navigate-btn" (click)="stepper.previous()" *ngIf="stepper.selectedIndex !=0">
|
|
|
|
|
<!-- <mat-icon>navigate_before</mat-icon> -->
|
2021-04-07 18:03:22 +02:00
|
|
|
|
{{'DMP-EDITOR.STEPPER.PREVIOUS' | translate}}
|
2021-03-08 10:24:30 +01:00
|
|
|
|
</button>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
<button mat-button class="navigate-btn ml-3"
|
2021-03-08 10:24:30 +01:00
|
|
|
|
[@next_btn]
|
2021-04-07 18:03:22 +02:00
|
|
|
|
(click)="validateStep(stepper.selectedIndex);stepper.next();"
|
2021-03-08 10:24:30 +01:00
|
|
|
|
*ngIf="stepper.selectedIndex != (steps.length-1)"
|
|
|
|
|
[ngClass]="{'navigate-btn-disabled': !isStepCompleted(stepper.selectedIndex)}">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<mat-icon style="font-size: 1.66em;">navigate_next</mat-icon>{{'DMP-EDITOR.STEPPER.NEXT' | translate}}
|
|
|
|
|
</button>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<ng-container *ngIf="steps.length-1 === stepper.selectedIndex">
|
|
|
|
|
<!-- <ng-container *ngIf="stepper.selectedIndex === (steps.length-1)"> -->
|
|
|
|
|
<ng-container *ngIf="!viewOnly">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-05 10:05:09 +01:00
|
|
|
|
<!-- <button mat-button class="navigate-btn ml-2"
|
2021-03-08 10:24:30 +01:00
|
|
|
|
(click)='onSubmit()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |
|
|
|
|
|
translate}}</button> -->
|
|
|
|
|
<!-- <button mat-button class="finalize-btn ml-2"
|
|
|
|
|
(click)='finalize()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |
|
|
|
|
|
translate}}</button> -->
|
|
|
|
|
</ng-container>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<!-- //TODO -->
|
|
|
|
|
<ng-container *ngIf="true">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<!-- <button mat-button class="navigate-btn ml-2"
|
|
|
|
|
(click)='onSubmit()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |
|
|
|
|
|
translate}}</button> -->
|
|
|
|
|
<!-- <button mat-button class="finalize-btn ml-2"
|
|
|
|
|
(click)='finalize()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |
|
|
|
|
|
translate}}</button> -->
|
|
|
|
|
<button [@finalize_btn] mat-button class="finalize-btn ml-3"
|
|
|
|
|
[disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |
|
2021-03-05 10:05:09 +01:00
|
|
|
|
translate}}</button>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
</ng-container>
|
|
|
|
|
<!-- SAVE BUTTON WHEN FINALIZED-->
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<ng-container *ngIf="false">
|
|
|
|
|
<ng-container *ngIf="showUpdateButton()">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<!-- <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>
|
2021-03-05 10:05:09 +01:00
|
|
|
|
</ng-container>
|
2021-02-25 13:17:47 +01:00
|
|
|
|
</ng-container>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
</div>
|
2021-02-25 13:17:47 +01:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
|
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
|
<mat-horizontal-stepper [linear]="true" #stepper class="stepper" (selectionChange)="onMatStepperSelectionChange($event)" style="padding-left: 8px; padding-right: 15px;">
|
2021-02-12 15:27:35 +01:00
|
|
|
|
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<!-- IMPORTANT TO BE !INVALID (WHEN THE TEMPLATE IS FINALIZED THE CONTORLS ARE DISABLED) -->
|
|
|
|
|
<mat-step [label]="'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.TITLE' | translate" [completed]="(!form.get('label').invalid && !form.get('description').invalid && !form.get('language').invalid)" >
|
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>
|
2021-03-05 10:05:09 +01:00
|
|
|
|
<mat-form-field class="full-width basic-info-input">
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<input matInput [formControl]="form.get('label')"
|
2021-03-27 18:52:53 +01:00
|
|
|
|
placeholder="{{'DATASET-PROFILE-EDITOR.FIELDS.DATASET-TITLE' | translate}}">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<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>
|
2021-03-05 10:05:09 +01:00
|
|
|
|
<mat-form-field class="full-width basic-info-input">
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<textarea matInput [formControl]="form.get('description')" cdkTextareaAutosize cdkAutosizeMinRows="4" cdkAutosizeMaxRows="5"
|
2021-03-27 18:52:53 +01:00
|
|
|
|
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER'| translate}}">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</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-03-05 10:05:09 +01:00
|
|
|
|
<mat-form-field class="full-width basic-info-input">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<!-- <input matInput formControlName="description" placeholder="{{'DATASET-PROFILE-EDITOR.FIELDS.DATASET-DESCRIPTION' | translate}}" required> -->
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<mat-select [formControl]="form.get('language')" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-SELECT-LANGUAGE'| translate}}">
|
2021-02-12 12:23:39 +01:00
|
|
|
|
<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>
|
|
|
|
|
|
2021-04-07 18:03:22 +02:00
|
|
|
|
<div class="col-12">
|
|
|
|
|
<!-- <div class="heading">1.3 {{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}</div> -->
|
|
|
|
|
<div class="heading">1.4 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}</div>
|
|
|
|
|
<div class="full-width basic-info-input">
|
|
|
|
|
<table class="col-12">
|
|
|
|
|
<tr class="row">
|
|
|
|
|
<th class="col-4">{{'USERS.LISTING.NAME' | translate}}</th>
|
|
|
|
|
<th class="col-4">{{'USERS.LISTING.EMAIL' | translate}}</th>
|
|
|
|
|
<th class="col-4"></th>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr *ngFor="let user of userChipList" class="row">
|
|
|
|
|
<td class="col-4">{{user.name}}</td>
|
|
|
|
|
<td class="col-4">{{user.email}}</td>
|
|
|
|
|
<td class="col-4">
|
|
|
|
|
<button mat-raised-button class="delete-btn" (click)="removeUser(user)">delete</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<input matInput #email class = "col-8" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-USERS'| translate}}">
|
|
|
|
|
<button mat-raised-button color="primary" (click)="checkAndAdd(email.value)">Add and Validate</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
2021-02-12 12:23:39 +01: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.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-03-12 17:19:51 +01:00
|
|
|
|
<mat-step [label]="'DATASET-PROFILE-EDITOR.STEPS.FORM.TITLE' | translate" [completed]="form.valid">
|
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
|
|
|
|
|
|
|
|
|
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<div class="row sticky-top" style="top : 2em;">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
<dataset-profile-table-of-contents class="toc-pane-container col"
|
2021-02-24 15:56:14 +01:00
|
|
|
|
[links]="toCEntries"
|
|
|
|
|
(itemClick)="displayItem($event)"
|
|
|
|
|
(createEntry) = "addNewEntry($event)"
|
|
|
|
|
(removeEntry)="onRemoveEntry($event)"
|
|
|
|
|
[itemSelected]="selectedTocEntry"
|
|
|
|
|
[viewOnly]="viewOnly"
|
2021-03-23 11:39:04 +01:00
|
|
|
|
(dataNeedsRefresh)="onDataNeedsRefresh($event)"
|
2021-03-12 17:19:51 +01:00
|
|
|
|
[colorizeInvalid]="colorizeInvalid">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</dataset-profile-table-of-contents>
|
2021-03-22 14:47:45 +01:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</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-03-04 13:38:46 +01:00
|
|
|
|
<div class="col ml-3">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="row" *ngIf="selectedTocEntry">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<!-- PAGE INFO -->
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<div class="col-12 content-displayer" *ngIf="selectedTocEntry.type === tocEntryEnumValues.Page">
|
|
|
|
|
<form [formGroup]="selectedTocEntry.form" class="page-infos">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<div class="row">
|
|
|
|
|
<!-- PAGE NAME -->
|
2021-03-30 10:36:09 +02:00
|
|
|
|
<div class="col-12">
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<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>
|
2021-03-29 17:42:55 +02:00
|
|
|
|
<input type="text" matInput formControlName="title" [placeholder]="('DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.UNTITLED' | translate) +' '+ ('DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE' |translate)">
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<mat-error >{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</mat-form-field>
|
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-30 10:36:09 +02:00
|
|
|
|
<div class="col-12" *ngIf="!viewOnly && (!selectedTocEntry?.subEntries?.length)">
|
|
|
|
|
<button class="create-section-btn" (click)="addNewEntry({parent:selectedTocEntry, childType: tocEntryEnumValues.Section})">Create section</button>
|
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<!-- 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>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<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-03-29 17:42:55 +02:00
|
|
|
|
(addNewFieldSet)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: {form: $event}})"
|
|
|
|
|
(removeFieldSet)="onRemoveEntry(_findTocEntryById($event, toCEntries))"
|
|
|
|
|
(cloneFieldSet)="cloneFieldSet($event)"
|
2021-02-24 15:56:14 +01:00
|
|
|
|
(selectedEntryId)="displayItem(_findTocEntryById($event, getTocEntries()))"
|
|
|
|
|
(dataNeedsRefresh)="onDataNeedsRefresh()"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
</app-dataset-profile-editor-section-fieldset-component>
|
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<div class="content-displayer row justify-content-center" *ngIf="!numOfPages" style="min-height: 30em;">
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<div class="col-auto align-self-center">
|
|
|
|
|
<div class="row w-100 justify-content-center">
|
|
|
|
|
<div class="col-auto">
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.ACTIONS.NOTHING-HERE-HINT'| translate}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
|
<div class="col-auto d-flex aling-contents-center">
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.ACTIONS.START-CREATING-PAGE-START'| translate}}
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<mat-icon color="accent" style="font-size: 1.5em; text-align: center; width: 1.5em;">add</mat-icon>
|
|
|
|
|
<strong style="cursor: pointer;" (click)="addNewEntry({childType: tocEntryEnumValues.Page,parent: null})">
|
|
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.ACTIONS.START-CREATING-PAGE-END'| translate}}
|
|
|
|
|
</strong>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</div>
|
2021-02-04 11:22:52 +01:00
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-02-12 12:23:39 +01:00
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
|
|
|
|
|
2021-02-24 15:56:14 +01:00
|
|
|
|
<!-- TOOLBAR -->
|
2021-04-07 18:03:22 +02:00
|
|
|
|
<!-- <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;">
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<nav *ngIf="!viewOnly">
|
|
|
|
|
<label class="action-list-label">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.GENERAL-TOOLS' | translate}}</label>
|
|
|
|
|
<ul class="list-unstyled">
|
|
|
|
|
<li *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet" class="mli">
|
|
|
|
|
<div class="action-list-item" (click)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: {form: selectedTocEntry.form.parent.parent}})">
|
2021-03-29 17:42:55 +02:00
|
|
|
|
<img src="/assets/images/editor/icons/add_input_set.svg" class="input_icon" alt="Add Question icon">
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<mat-icon class="action-list-icon">folder</mat-icon>
|
|
|
|
|
<span class="action-list-text" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
<li *ngIf="selectedTocEntry.type === tocEntryEnumValues.Section" class="mli">
|
|
|
|
|
<div class="action-list-item" (click)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: selectedTocEntry})">
|
|
|
|
|
<mat-icon class="action-list-icon">folder</mat-icon>
|
2021-03-29 17:42:55 +02:00
|
|
|
|
<img src="/assets/images/editor/icons/add_input_set.svg" class="input_icon" alt="Add Question icon">
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<span class="action-list-text" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet" class="mli">
|
|
|
|
|
<div class="action-list-item" (click)="cloneFieldSet(selectedTocEntry.form)">
|
|
|
|
|
<mat-icon class="action-list-icon">file_copy</mat-icon>
|
2021-03-29 17:42:55 +02:00
|
|
|
|
<img src="/assets/images/editor/icons/clone.svg" class="input_icon" alt="Clone icon">
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<span class="action-list-text">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.CLONE' | translate}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<li *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet" class="mli">
|
|
|
|
|
<div class="action-list-item" (click)="onRemoveEntry(selectedTocEntry)">
|
|
|
|
|
<mat-icon class="action-list-icon">delete</mat-icon>
|
|
|
|
|
<span class="action-list-text">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.DELETE' | translate}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
2021-03-29 17:42:55 +02:00
|
|
|
|
</nav> -->
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<!-- <ng-container *ngIf="!viewOnly">
|
2021-02-25 16:53:58 +01:00
|
|
|
|
<h3 matSubheader>{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.GENERAL-TOOLS' | translate}}</h3>
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<mat-list-item *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet" class="mli">
|
|
|
|
|
<div class="action-list-item">
|
|
|
|
|
<mat-icon class="action-list-icon">folder</mat-icon>
|
|
|
|
|
<span class="action-list-text" (click)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: {form: selectedTocEntry.form.parent.parent}})" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
|
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</mat-list-item>
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<mat-list-item *ngIf="selectedTocEntry.type === tocEntryEnumValues.Section" class="mli">
|
|
|
|
|
<div class="action-list-item">
|
|
|
|
|
<mat-icon class="action-list-icon">folder</mat-icon>
|
|
|
|
|
<span class="action-list-text" (click)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: selectedTocEntry})" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
|
|
|
|
|
</div>
|
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
|
|
|
|
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<mat-list-item *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet" class="mli">
|
|
|
|
|
<div class="action-list-item">
|
|
|
|
|
<mat-icon class="action-list-icon">file_copy</mat-icon>
|
|
|
|
|
<span class="action-list-text" (click)="cloneFieldSet(selectedTocEntry.form)">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.CLONE' | translate}}</span>
|
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</mat-list-item>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-04 13:38:46 +01:00
|
|
|
|
<mat-list-item *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet" class="mli">
|
|
|
|
|
<div class="action-list-item">
|
|
|
|
|
<mat-icon class="action-list-icon">delete</mat-icon>
|
|
|
|
|
<span class="action-list-text" (click)="onRemoveEntry(selectedTocEntry)">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.DELETE' | translate}}</span>
|
|
|
|
|
</div>
|
2021-02-24 15:56:14 +01:00
|
|
|
|
</mat-list-item>
|
2021-03-04 13:38:46 +01:00
|
|
|
|
</ng-container> -->
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-03-29 17:42:55 +02:00
|
|
|
|
<!-- </div>
|
|
|
|
|
</div> -->
|
2021-04-07 18:03:22 +02:00
|
|
|
|
</div>
|
2021-02-04 09:33:03 +01:00
|
|
|
|
|
2021-04-07 18:03:22 +02: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">
|
2021-03-05 10:05:09 +01:00
|
|
|
|
<!-- {{'DATASET-PROFILE-EDITOR.ACTIONS.PREVIEW-AND-FINALIZE' | translate}} -->
|
2021-02-15 18:16:48 +01:00
|
|
|
|
<!-- <button (click)="generatePreviewForm()">foo</button> -->
|
2021-03-17 15:29:02 +01:00
|
|
|
|
<ng-container *ngIf="formGroup">
|
2021-04-05 11:06:14 +02:00
|
|
|
|
|
|
|
|
|
<app-final-preview-component [formGroup]="formGroup" [visibilityRules]="visibilityRules">
|
|
|
|
|
|
|
|
|
|
</app-final-preview-component>
|
|
|
|
|
|
2021-04-07 18:03:22 +02:00
|
|
|
|
<!--
|
2021-04-05 11:06:14 +02:00
|
|
|
|
|
2021-03-17 15:29:02 +01:00
|
|
|
|
<app-dataset-description [form]="formGroup" [visibilityRules]="visibilityRules" *ngIf="formGroup">
|
2021-04-07 18:03:22 +02:00
|
|
|
|
|
2021-04-05 11:06:14 +02:00
|
|
|
|
</app-dataset-description> -->
|
2021-02-17 18:44:50 +01:00
|
|
|
|
</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-04-07 18:03:22 +02:00
|
|
|
|
|
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-22 14:47:45 +01:00
|
|
|
|
<ng-container *ngIf="false">
|
2021-03-01 17:42:18 +01:00
|
|
|
|
<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-04-07 18:03:22 +02:00
|
|
|
|
|
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">
|
2021-03-22 14:47:45 +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)='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-12 17:19:51 +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> -->
|
2021-03-12 17:19:51 +01:00
|
|
|
|
|
2021-03-27 18:52:53 +01:00
|
|
|
|
<!-- <div *ngIf="form">{{form.value | json}}</div>
|
|
|
|
|
|
|
|
|
|
<br> -->
|
|
|
|
|
<!-- <br>
|
2021-03-12 17:19:51 +01:00
|
|
|
|
<div class="row">
|
|
|
|
|
{{form.controls?.sections.value |json}}
|
|
|
|
|
</div> -->
|
2021-03-08 10:24:30 +01:00
|
|
|
|
|
|
|
|
|
<!-- {{form.value | json}} -->
|
2021-03-01 17:42:18 +01:00
|
|
|
|
<!-- <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-04-07 18:03:22 +02:00
|
|
|
|
<!-- <div class="row">
|
2021-02-15 18:16:48 +01:00
|
|
|
|
<button (click)="foo()">foo</button>
|
|
|
|
|
</div> -->
|
2019-02-06 12:10:44 +01:00
|
|
|
|
</div>
|
2021-04-07 18:03:22 +02:00
|
|
|
|
</div>
|