cleanup
This commit is contained in:
parent
f75428595f
commit
947a4cc087
|
@ -1,15 +1,14 @@
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { UserSettingPersist, UserSettingsInformation, UserSettings as UserSettingsObject } from '@app/core/model/user-settings/user-settings.model';
|
import { UserSettingPersist, UserSettingsInformation, UserSettings as UserSettingsObject } from '@app/core/model/user-settings/user-settings.model';
|
||||||
import { BaseService } from '@common/base/base.service';
|
import { BaseService } from '@common/base/base.service';
|
||||||
|
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import moment from 'moment';
|
import moment, { Moment } from 'moment';
|
||||||
import { Moment } from 'moment';
|
|
||||||
import { Observable, Subject, of as observableOf } from 'rxjs';
|
import { Observable, Subject, of as observableOf } from 'rxjs';
|
||||||
import { map, takeUntil } from 'rxjs/operators';
|
import { map, takeUntil } from 'rxjs/operators';
|
||||||
import { AuthService, LoginStatus } from '../auth/auth.service';
|
import { AuthService, LoginStatus } from '../auth/auth.service';
|
||||||
import { ConfigurationService } from '../configuration/configuration.service';
|
import { ConfigurationService } from '../configuration/configuration.service';
|
||||||
import { UserSettingsHttpService } from './user-settings-http.service';
|
import { UserSettingsHttpService } from './user-settings-http.service';
|
||||||
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
|
||||||
|
|
||||||
export enum UserSettingsType {
|
export enum UserSettingsType {
|
||||||
Setting = 0,
|
Setting = 0,
|
||||||
|
@ -289,24 +288,6 @@ export class UserSettingsService extends BaseService {
|
||||||
return `${this.getUserSettingsVersion()}_${this.getUserId()}_${key}`;
|
return `${this.getUserSettingsVersion()}_${this.getUserId()}_${key}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// private defaultValue<T>(userSettingsInformation: UserSettingsInformation<T>): UserSettings<T> {
|
|
||||||
// const defaultSetting: UserSetting<T> = {
|
|
||||||
// id: null,
|
|
||||||
// name: null,
|
|
||||||
// userId: this.getUserId(),
|
|
||||||
// key: userSettingsInformation.key,
|
|
||||||
// type: UserSettingsType.Config,
|
|
||||||
// isDefault: true,
|
|
||||||
// value: new userSettingsInformation.type()
|
|
||||||
// };
|
|
||||||
// const userSettings: UserSettings<T> = {
|
|
||||||
// defaultSetting: defaultSetting,
|
|
||||||
// key: userSettingsInformation.key,
|
|
||||||
// settings: [defaultSetting]
|
|
||||||
// };
|
|
||||||
// return userSettings;
|
|
||||||
// }
|
|
||||||
|
|
||||||
private getUserId(): Guid {
|
private getUserId(): Guid {
|
||||||
return this.authService.userId();
|
return this.authService.userId();
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,12 +226,8 @@ export class EnumUtils {
|
||||||
|
|
||||||
toRecentActivityOrderString(status: RecentActivityOrder): string {
|
toRecentActivityOrderString(status: RecentActivityOrder): string {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
// case RecentActivityOrder.CREATED: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.CREATED');
|
|
||||||
case RecentActivityOrder.Label: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.LABEL');
|
case RecentActivityOrder.Label: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.LABEL');
|
||||||
case RecentActivityOrder.UpdatedAt: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.MODIFIED');
|
case RecentActivityOrder.UpdatedAt: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.MODIFIED');
|
||||||
// case RecentActivityOrder.FINALIZED: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.FINALIZED');
|
|
||||||
// case RecentActivityOrder.PUBLISHED: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.PUBLISHED');
|
|
||||||
// case RecentActivityOrder.DATASETPUBLISHED: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.PUBLISHED');
|
|
||||||
case RecentActivityOrder.Status: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.STATUS');
|
case RecentActivityOrder.Status: return this.language.instant('TYPES.RECENT-ACTIVITY-ORDER.STATUS');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
.multiple-auto-complete {
|
.multiple-auto-complete {
|
||||||
// margin-left: inherit;
|
|
||||||
// margin-right: inherit;
|
|
||||||
|
|
||||||
.not-loading {
|
.not-loading {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -8,10 +6,7 @@
|
||||||
|
|
||||||
|
|
||||||
.align-arrow-right {
|
.align-arrow-right {
|
||||||
// position: absolute;
|
|
||||||
right: 0;
|
right: 0;
|
||||||
// bottom: 0;
|
|
||||||
// vertical-align: middle;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
color: rgba(0, 0, 0, 0.54);
|
color: rgba(0, 0, 0, 0.54);
|
||||||
|
@ -25,19 +20,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.chip-text {
|
.chip-text {
|
||||||
// text-overflow: ellipsis;
|
|
||||||
// white-space: nowrap;
|
|
||||||
// overflow: hidden;
|
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// .chip-list {
|
|
||||||
// max-width: calc(100% - 30px);
|
|
||||||
// padding-left: 0.8em;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.title-subtitle-fn {
|
.title-subtitle-fn {
|
||||||
height: auto;
|
height: auto;
|
||||||
width: calc(100% - 46px);
|
width: calc(100% - 46px);
|
||||||
|
|
|
@ -57,11 +57,6 @@
|
||||||
line-height: 1.2em;
|
line-height: 1.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
// .two-line-mat-option {
|
|
||||||
// height: 3.5em;
|
|
||||||
// line-height: 1.2em;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.mat-standard-chip:hover::after {
|
.mat-standard-chip:hover::after {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
@ -70,11 +65,6 @@
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// .mat-form-field-type-single-autocomplete:not(.mat-form-field-disabled) .mat-form-field-flex {
|
|
||||||
// cursor: pointer;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.option-text-container {
|
.option-text-container {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,42 +17,6 @@ ngx-guided-tour {
|
||||||
border-radius: 44px; /*custom add*/
|
border-radius: 44px; /*custom add*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.tour-orb {
|
|
||||||
position: fixed;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 50%;
|
|
||||||
|
|
||||||
.tour-orb-ring {
|
|
||||||
width: 35px;
|
|
||||||
height: 35px;
|
|
||||||
position: relative;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
animation: pulse 2s linear infinite;
|
|
||||||
|
|
||||||
&:after {
|
|
||||||
content: "";
|
|
||||||
display: inline-block;
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes pulse {
|
|
||||||
from {
|
|
||||||
transform: translate(-50%, -50%) scale(0.45);
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
transform: translate(-50%, -50%) scale(1);
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tour-step {
|
.tour-step {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
&.page-tour-step {
|
&.page-tour-step {
|
||||||
|
@ -154,9 +118,6 @@ ngx-guided-tour {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tour-title {
|
.tour-title {
|
||||||
// font-weight: bold !important;
|
|
||||||
// padding-bottom: 20px;
|
|
||||||
|
|
||||||
/*custom add*/
|
/*custom add*/
|
||||||
font-weight: lighter !important;
|
font-weight: lighter !important;
|
||||||
font-size: 16px !important;
|
font-size: 16px !important;
|
||||||
|
@ -166,7 +127,6 @@ ngx-guided-tour {
|
||||||
color: #212121;
|
color: #212121;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
// height: 210px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h3.tour-title {
|
h3.tour-title {
|
||||||
|
@ -201,14 +161,11 @@ ngx-guided-tour {
|
||||||
}
|
}
|
||||||
|
|
||||||
button.skip-button.link-button {
|
button.skip-button.link-button {
|
||||||
// padding-left: 0;
|
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
|
|
||||||
/*custom add*/
|
/*custom add*/
|
||||||
// padding: 0;
|
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
// float: right;
|
|
||||||
min-width: 133px;
|
min-width: 133px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border: 1px solid var(--primary-color);
|
border: 1px solid var(--primary-color);
|
||||||
|
@ -218,16 +175,10 @@ ngx-guided-tour {
|
||||||
|
|
||||||
.next-button {
|
.next-button {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
// border-radius: 1px;
|
|
||||||
// float: right;
|
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
// padding-left: 10px;
|
|
||||||
// padding-right: 10px;
|
|
||||||
|
|
||||||
/*custom add*/
|
/*custom add*/
|
||||||
// float: left;
|
|
||||||
// padding: 10px 0px;
|
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
min-width: 101px;
|
min-width: 101px;
|
||||||
|
|
|
@ -40,7 +40,6 @@ export class DescriptionTemplateEditorSectionFieldSetComponent implements OnInit
|
||||||
|
|
||||||
private initializer = new Subject<void>();
|
private initializer = new Subject<void>();
|
||||||
private scroller = new Subject<string>();
|
private scroller = new Subject<string>();
|
||||||
// private $selectedFieldsetId = new Subject<string>();
|
|
||||||
constructor(
|
constructor(
|
||||||
private dragulaService: DragulaService,
|
private dragulaService: DragulaService,
|
||||||
private myElement: ElementRef
|
private myElement: ElementRef
|
||||||
|
@ -52,8 +51,6 @@ export class DescriptionTemplateEditorSectionFieldSetComponent implements OnInit
|
||||||
|
|
||||||
this.dragulaService.createGroup(this.FIELDSETS, {
|
this.dragulaService.createGroup(this.FIELDSETS, {
|
||||||
moves: (el, container, handle) => {
|
moves: (el, container, handle) => {
|
||||||
// if(this.viewOnly) return false; //uncomment if want to unable drag n drop in viewonly mode
|
|
||||||
// if (el.id != (this.dragula_prefix + this.tocentry.id)) return false;
|
|
||||||
if (handle.className && handle.classList.contains('handle')) return true;
|
if (handle.className && handle.classList.contains('handle')) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
|
|
||||||
|
import { CdkStep, StepperSelectionEvent } from '@angular/cdk/stepper';
|
||||||
|
import { DatePipe } from '@angular/common';
|
||||||
import { Component, OnInit, QueryList, ViewChild } from '@angular/core';
|
import { Component, OnInit, QueryList, ViewChild } from '@angular/core';
|
||||||
import { FormArray, FormControl, FormGroup, UntypedFormArray, UntypedFormGroup } from '@angular/forms';
|
import { FormArray, FormControl, FormGroup, UntypedFormArray, UntypedFormGroup } from '@angular/forms';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
|
||||||
// import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
|
||||||
import { CdkStep, StepperSelectionEvent } from '@angular/cdk/stepper';
|
|
||||||
import { DatePipe } from '@angular/common';
|
|
||||||
import { MatStepper } from '@angular/material/stepper';
|
import { MatStepper } from '@angular/material/stepper';
|
||||||
|
import { Title } from '@angular/platform-browser';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { DescriptionTemplateStatus } from '@app/core/common/enum/description-template-status';
|
import { DescriptionTemplateStatus } from '@app/core/common/enum/description-template-status';
|
||||||
|
import { DescriptionTemplateTypeStatus } from '@app/core/common/enum/description-template-type-status';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
|
import { LockTargetType } from '@app/core/common/enum/lock-target-type';
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { UserDescriptionTemplateRole } from '@app/core/common/enum/user-description-template-role';
|
import { UserDescriptionTemplateRole } from '@app/core/common/enum/user-description-template-role';
|
||||||
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
|
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
|
||||||
|
@ -18,13 +18,19 @@ import { DescriptionTemplatePersist, NewVersionDescriptionTemplatePersist } from
|
||||||
import { LanguageInfo } from '@app/core/model/language-info';
|
import { LanguageInfo } from '@app/core/model/language-info';
|
||||||
import { User } from '@app/core/model/user/user';
|
import { User } from '@app/core/model/user/user';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
import { LanguageInfoService } from '@app/core/services/culture/language-info-service';
|
import { LanguageInfoService } from '@app/core/services/culture/language-info-service';
|
||||||
import { DescriptionTemplateTypeService } from '@app/core/services/description-template-type/description-template-type.service';
|
import { DescriptionTemplateTypeService } from '@app/core/services/description-template-type/description-template-type.service';
|
||||||
import { DescriptionTemplateService } from '@app/core/services/description-template/description-template.service';
|
import { DescriptionTemplateService } from '@app/core/services/description-template/description-template.service';
|
||||||
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
import { LoggingService } from '@app/core/services/logging/logging-service';
|
import { LoggingService } from '@app/core/services/logging/logging-service';
|
||||||
|
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { UserService } from '@app/core/services/user/user.service';
|
import { UserService } from '@app/core/services/user/user.service';
|
||||||
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
||||||
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||||
|
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration';
|
||||||
import { BaseEditor } from '@common/base/base-editor';
|
import { BaseEditor } from '@common/base/base-editor';
|
||||||
import { FormService } from '@common/forms/form-service';
|
import { FormService } from '@common/forms/form-service';
|
||||||
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
||||||
|
@ -38,13 +44,6 @@ import { DescriptionTemplateEditorModel, DescriptionTemplateFieldEditorModel, De
|
||||||
import { DescriptionTemplateEditorResolver } from './description-template-editor.resolver';
|
import { DescriptionTemplateEditorResolver } from './description-template-editor.resolver';
|
||||||
import { DescriptionTemplateEditorService } from './description-template-editor.service';
|
import { DescriptionTemplateEditorService } from './description-template-editor.service';
|
||||||
import { NewEntryType, ToCEntry, ToCEntryType } from './table-of-contents/description-template-table-of-contents-entry';
|
import { NewEntryType, ToCEntry, ToCEntryType } from './table-of-contents/description-template-table-of-contents-entry';
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
||||||
import { LockService } from '@app/core/services/lock/lock.service';
|
|
||||||
import { LockTargetType } from '@app/core/common/enum/lock-target-type';
|
|
||||||
import { Title } from '@angular/platform-browser';
|
|
||||||
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration';
|
|
||||||
import { DescriptionTemplateTypeStatus } from '@app/core/common/enum/description-template-type-status';
|
|
||||||
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -325,7 +324,8 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
|
||||||
if (result) {
|
if (result) {
|
||||||
this.formGroup.get('status').setValue(DescriptionTemplateStatus.Finalized);
|
this.formGroup.get('status').setValue(DescriptionTemplateStatus.Finalized);
|
||||||
this.persistEntity();
|
this.persistEntity();
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1206,33 +1206,7 @@ export class DescriptionTemplateEditorComponent extends BaseEditor<DescriptionTe
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
private hasInvalidVisibilityRule(field: UntypedFormGroup): boolean {
|
private hasInvalidVisibilityRule(field: UntypedFormGroup): boolean {
|
||||||
// const renderStyle = field.get('viewStyle').get('renderStyle').value;
|
|
||||||
// if (renderStyle && ![
|
|
||||||
// DatasetProfileFieldViewStyle.TextArea,
|
|
||||||
// DatasetProfileFieldViewStyle.RichTextArea,
|
|
||||||
// DatasetProfileFieldViewStyle.Upload,
|
|
||||||
// DatasetProfileFieldViewStyle.FreeText,
|
|
||||||
// DatasetProfileFieldViewStyle.BooleanDecision,
|
|
||||||
// DatasetProfileFieldViewStyle.RadioBox,
|
|
||||||
// DatasetProfileFieldViewStyle.CheckBox,
|
|
||||||
// DatasetProfileFieldViewStyle.DatePicker,
|
|
||||||
// DatasetProfileFieldViewStyle.ComboBox,
|
|
||||||
// ].includes(renderStyle)) {
|
|
||||||
// if (((renderStyle === DatasetProfileFieldViewStyle) && (field.get('data').get('type').value === DatasetProfileComboBoxType.Select))) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// try {
|
|
||||||
// if (field.get('visible').get('rules').value.length) {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
// } catch {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
return false;
|
return false;
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private removeFieldSetVisibilityRules(fieldsets: ToCEntry[]) {
|
private removeFieldSetVisibilityRules(fieldsets: ToCEntry[]) {
|
||||||
|
|
|
@ -430,391 +430,6 @@ export class DescriptionTemplateTableOfContents extends BaseComponent implements
|
||||||
this.overcontainer = null;
|
this.overcontainer = null;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
// if (this.dragulaService.find('TABLEDRAG')) {
|
|
||||||
// this.dragulaService.destroy('TABLEDRAG');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const dragula = this.dragulaService.createGroup('TABLEDRAG', {});
|
|
||||||
|
|
||||||
// const drake = dragula.drake;
|
|
||||||
|
|
||||||
// drake.on('drop', (el, target, source, sibling) => {
|
|
||||||
|
|
||||||
// if (this._dragStartedAt) {
|
|
||||||
// const timeNow = new Date().getTime();
|
|
||||||
|
|
||||||
// if (timeNow - this._dragStartedAt > this.VALID_DROP_TIME) {
|
|
||||||
// // console.log('timenow: ', timeNow);
|
|
||||||
// // console.log('timestarted', this._dragStartedAt);
|
|
||||||
// this._dragStartedAt = null;
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// this.dataNeedsRefresh.emit();// even though the data is not changed the TABLE DRAG may has changed
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// this.dataNeedsRefresh.emit();// even though the data is not changed the TABLE DRAG may has changed
|
|
||||||
// return;
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const elementId = (el.id as string).replace(this.DRAGULA_ITEM_ID_PREFIX, '');
|
|
||||||
// const targetId = target.id as string;
|
|
||||||
// const sourceId = source.id as string;
|
|
||||||
|
|
||||||
|
|
||||||
// if (!(elementId && targetId && sourceId)) {
|
|
||||||
// console.info('Elements do not have an id');
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// const element: ToCEntry = this._findTocEntryById(elementId, this.links);
|
|
||||||
// const targetContainer: ToCEntry = this._findTocEntryById(targetId, this.links);
|
|
||||||
// const sourceContainer: ToCEntry = this._findTocEntryById(sourceId, this.links);
|
|
||||||
|
|
||||||
// if (!(element && (targetContainer || ((element.type === ToCEntryType.Page) && (targetId === this.ROOT_ID))) && (sourceContainer || ((element.type === ToCEntryType.Page) && (sourceId === this.ROOT_ID))))) {
|
|
||||||
// // console.info('Could not find elements');
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// //TODO: angular update //drake.cancel(true);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// switch (element.type) {
|
|
||||||
// case ToCEntryType.FieldSet: {
|
|
||||||
// if (targetContainer.type != this.tocEntryType.Section) {
|
|
||||||
// // const message = 'Fieldset can only be child of Subsections';
|
|
||||||
// const message = this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.TABLE-OF-CONTENTS.ERROR-MESSAGES.FIELDSET-MUST-HAVE-PARENT-SECTION');
|
|
||||||
// // console.error(message);
|
|
||||||
// this.notifyUser(message)
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //check if target container has no sections
|
|
||||||
// if ((targetContainer.form.get('sections') as UntypedFormArray).length) {
|
|
||||||
// // const message = 'Cannot have inputs and sections on the same level';
|
|
||||||
// const message = this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.TABLE-OF-CONTENTS.ERROR-MESSAGES.INPUT-SECTION-SAME-LEVEL');
|
|
||||||
// this.notifyUser(message);
|
|
||||||
// // console.error(message);
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const fieldsetForm = element.form;
|
|
||||||
// const targetFieldsets = targetContainer.form.get('fieldSets') as UntypedFormArray;
|
|
||||||
// const sourceFieldsets = sourceContainer.form.get('fieldSets') as UntypedFormArray;
|
|
||||||
|
|
||||||
// if (!targetFieldsets) {
|
|
||||||
// console.info('Not target fieldsets container found');
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// let sourceOrdinal = -1;
|
|
||||||
// let idx = -1;
|
|
||||||
// sourceFieldsets.controls.forEach((elem, index) => {
|
|
||||||
// if (elem.get('id').value === elementId) {
|
|
||||||
// sourceOrdinal = elem.get('ordinal').value;
|
|
||||||
// idx = index
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// if (sourceOrdinal >= 0 && idx >= 0) {
|
|
||||||
// sourceFieldsets.removeAt(idx);
|
|
||||||
|
|
||||||
// sourceFieldsets.controls.forEach(control => {
|
|
||||||
// const ordinal = control.get('ordinal');
|
|
||||||
// if ((ordinal.value >= sourceOrdinal) && sourceOrdinal > 0) {
|
|
||||||
// const updatedOrdinalVal = ordinal.value - 1;
|
|
||||||
// ordinal.setValue(updatedOrdinalVal);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// sourceFieldsets.controls.sort(this._compareOrdinals);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// let position: number = targetFieldsets.length;
|
|
||||||
|
|
||||||
// if (!sibling || !sibling.id) {
|
|
||||||
// console.info('No sibling Id found');
|
|
||||||
// } else {
|
|
||||||
// const siblingId = (sibling.id as string).replace(this.DRAGULA_ITEM_ID_PREFIX, '');
|
|
||||||
// let siblingIndex = -1;
|
|
||||||
// targetFieldsets.controls.forEach((e, idx) => {
|
|
||||||
// if (e.get('id').value === siblingId) {
|
|
||||||
// siblingIndex = idx;
|
|
||||||
// position = e.get('ordinal').value;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
// if (siblingIndex >= 0) { //sibling found
|
|
||||||
|
|
||||||
// targetFieldsets.controls.filter(control => control.get('ordinal').value >= position).forEach(control => {
|
|
||||||
// const ordinal = control.get('ordinal');
|
|
||||||
// const updatedOrdinalVal = ordinal.value + 1;
|
|
||||||
// ordinal.setValue(updatedOrdinalVal);
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// fieldsetForm.get('ordinal').setValue(position);
|
|
||||||
// targetFieldsets.insert(position, fieldsetForm);
|
|
||||||
// targetFieldsets.controls.sort(this._compareOrdinals);
|
|
||||||
// this.dataNeedsRefresh.emit({ draggedItemId: elementId });
|
|
||||||
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// case ToCEntryType.Section: {
|
|
||||||
|
|
||||||
// if (targetContainer.type == ToCEntryType.Section) {
|
|
||||||
// if ((targetContainer.form.get('fieldSets') as UntypedFormArray).length) {
|
|
||||||
// // const message = 'Cannot have inputs and sections on the same level';
|
|
||||||
// const message = this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.TABLE-OF-CONTENTS.ERROR-MESSAGES.INPUT-SECTION-SAME-LEVEL');;
|
|
||||||
// this.notifyUser(message);
|
|
||||||
// // console.info(message);
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const targetSections = targetContainer.form.get('sections') as UntypedFormArray;
|
|
||||||
// const elementSectionForm = element.form;
|
|
||||||
// const sourceSections = elementSectionForm.parent as UntypedFormArray;
|
|
||||||
|
|
||||||
// if (!(targetSections && sourceSections && elementSectionForm)) {
|
|
||||||
// console.info('Could not load sections');
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// let idx = -1;
|
|
||||||
// sourceSections.controls.forEach((section, i) => {
|
|
||||||
// if (section.get('id').value === elementId) {
|
|
||||||
// idx = i;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// if (!(idx >= 0)) {
|
|
||||||
// console.info('Could not find element in Parent container');
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// sourceSections.controls.filter(control => control.get('ordinal').value >= elementSectionForm.get('ordinal').value).forEach(control => {
|
|
||||||
// const ordinal = control.get('ordinal');
|
|
||||||
// const updatedOrdinalVal = ordinal.value ? ordinal.value - 1 : 0;
|
|
||||||
// ordinal.setValue(updatedOrdinalVal);
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
// sourceSections.removeAt(idx);
|
|
||||||
|
|
||||||
// let targetOrdinal = targetSections.length;
|
|
||||||
|
|
||||||
// if (sibling && sibling.id) {
|
|
||||||
// const siblingId = sibling.id.replace(this.DRAGULA_ITEM_ID_PREFIX, '');
|
|
||||||
|
|
||||||
// targetSections.controls.forEach((section, i) => {
|
|
||||||
// if (section.get('id').value === siblingId) {
|
|
||||||
// targetOrdinal = section.get('ordinal').value;
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
// targetSections.controls.filter(control => control.get('ordinal').value >= targetOrdinal).forEach(control => {
|
|
||||||
// const ordinal = control.get('ordinal');
|
|
||||||
// const updatedOrdinalVal = ordinal.value + 1;
|
|
||||||
// ordinal.setValue(updatedOrdinalVal);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// console.info('no siblings found');
|
|
||||||
// }
|
|
||||||
// elementSectionForm.get('ordinal').setValue(targetOrdinal);
|
|
||||||
// targetSections.insert(targetOrdinal, elementSectionForm);
|
|
||||||
|
|
||||||
// } else if (targetContainer.type === ToCEntryType.Page) {
|
|
||||||
|
|
||||||
// const rootform = targetContainer.form.root;
|
|
||||||
// const sectionForm = element.form;
|
|
||||||
// const parentSections = sectionForm.parent as UntypedFormArray;
|
|
||||||
|
|
||||||
// let parentIndex = -1;
|
|
||||||
// parentSections.controls.forEach((section, i) => {
|
|
||||||
// if (section.get('id').value === elementId) {
|
|
||||||
// parentIndex = i
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
|
|
||||||
// if (parentIndex < 0) {
|
|
||||||
// console.info('could not locate section in parents array');
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //update parent sections ordinal
|
|
||||||
// parentSections.controls.filter(section => section.get('ordinal').value >= sectionForm.get('ordinal').value).forEach(section => {
|
|
||||||
// const ordinal = section.get('ordinal');
|
|
||||||
// const updatedOrdinalVal = ordinal.value ? ordinal.value - 1 : 0;
|
|
||||||
// ordinal.setValue(updatedOrdinalVal);
|
|
||||||
// })
|
|
||||||
|
|
||||||
// parentSections.removeAt(parentIndex);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// let position = 0;
|
|
||||||
// if (targetContainer.subEntries) {
|
|
||||||
// position = targetContainer.subEntries.length;
|
|
||||||
// }
|
|
||||||
// //populate sections
|
|
||||||
// const targetSectionsArray = rootform.get('sections') as UntypedFormArray;
|
|
||||||
|
|
||||||
|
|
||||||
// if (sibling && sibling.id) {
|
|
||||||
// const siblingId = sibling.id.replace(this.DRAGULA_ITEM_ID_PREFIX, '');
|
|
||||||
// let indx = -1;
|
|
||||||
|
|
||||||
// targetContainer.subEntries.forEach((e, i) => {
|
|
||||||
// if (e.form.get('id').value === siblingId) {
|
|
||||||
// indx = i;
|
|
||||||
// position = e.form.get('ordinal').value;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// if (indx >= 0) {
|
|
||||||
|
|
||||||
// // e.form.get('ordinal').setValue(i+1);
|
|
||||||
// targetContainer.subEntries.filter(e => e.form.get('ordinal').value >= position).forEach(e => {
|
|
||||||
// const ordinal = e.form.get('ordinal');
|
|
||||||
// const updatedOrdinalVal = ordinal.value + 1;
|
|
||||||
// ordinal.setValue(updatedOrdinalVal);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// console.info('No sibling found');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// sectionForm.get('ordinal').setValue(position);
|
|
||||||
// sectionForm.get('page').setValue(targetContainer.id);
|
|
||||||
// targetSectionsArray.push(sectionForm);
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
// // const message = 'Drag not support to specific container';
|
|
||||||
// const message = this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.TABLE-OF-CONTENTS.ERROR-MESSAGES.DRAG-NOT-SUPPORTED');
|
|
||||||
// this.notifyUser(message);
|
|
||||||
// // console.info(message);
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// this.dataNeedsRefresh.emit({ draggedItemId: elementId });
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// case ToCEntryType.Page: {
|
|
||||||
// if (targetId != this.ROOT_ID) {
|
|
||||||
// // const message = 'A page element can only be at top level';
|
|
||||||
// const message = this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.TABLE-OF-CONTENTS.ERROR-MESSAGES.PAGE-ELEMENT-ONLY-TOP-LEVEL');
|
|
||||||
// this.notifyUser(message);
|
|
||||||
// // console.info(message);
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const rootForm = element.form.root;
|
|
||||||
// if (!rootForm) {
|
|
||||||
// console.info('Could not find root!')
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// const pages = rootForm.get('pages') as UntypedFormArray;
|
|
||||||
// const pageForm = element.form;
|
|
||||||
|
|
||||||
// let index = -1;
|
|
||||||
|
|
||||||
// pages.controls.forEach((page, i) => {
|
|
||||||
// if (page.get('id').value === elementId) {
|
|
||||||
// index = i;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// if (index < 0) {
|
|
||||||
// console.info('Could not locate page on pages');
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// //ordinality
|
|
||||||
// pages.controls.filter(page => page.get('ordinal').value >= pageForm.get('ordinal').value).forEach(page => {
|
|
||||||
// const ordinal = page.get('ordinal');
|
|
||||||
// const ordinalVal = ordinal.value ? ordinal.value - 1 : 0;
|
|
||||||
// ordinal.setValue(ordinalVal);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// pages.removeAt(index);
|
|
||||||
|
|
||||||
// let targetPosition = pages.length;
|
|
||||||
|
|
||||||
// if (sibling) {
|
|
||||||
// const siblingId = sibling.id.replace(this.DRAGULA_ITEM_ID_PREFIX, '');
|
|
||||||
|
|
||||||
// pages.controls.forEach((page, i) => {
|
|
||||||
// if (page.get('id').value === siblingId) {
|
|
||||||
// targetPosition = page.get('ordinal').value;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// pageForm.get('ordinal').setValue(targetPosition);
|
|
||||||
|
|
||||||
// //update ordinality
|
|
||||||
// pages.controls.filter(page => page.get('ordinal').value >= targetPosition).forEach(page => {
|
|
||||||
// const ordinal = page.get('ordinal');
|
|
||||||
// const ordinalVal = ordinal.value + 1;
|
|
||||||
// ordinal.setValue(ordinalVal);
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
// pages.insert(targetPosition, pageForm);
|
|
||||||
// this.dataNeedsRefresh.emit({ draggedItemId: elementId });
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// default:
|
|
||||||
|
|
||||||
// console.info('Could not support moving objects for specific type of element');
|
|
||||||
// this.dataNeedsRefresh.emit();
|
|
||||||
// return;
|
|
||||||
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
// drake.on('drag', (el, source) => {
|
|
||||||
// this._dragStartedAt = new Date().getTime();
|
|
||||||
// // console.log('drag fired');
|
|
||||||
// this.isDragging = true;
|
|
||||||
// this.draggingItemId = (el.id as string).replace(this.DRAGULA_ITEM_ID_PREFIX, '');
|
|
||||||
// });
|
|
||||||
// drake.on('over', (el, container, source) => {
|
|
||||||
// try {
|
|
||||||
// this.overcontainer = container.id;
|
|
||||||
// } catch (error) {
|
|
||||||
// this.overcontainer = null;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// drake.on('dragend', (el) => {
|
|
||||||
// this.isDragging = false;
|
|
||||||
// this.draggingItemId = null;
|
|
||||||
// this.overcontainer = null;
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void { }
|
ngOnInit(): void { }
|
||||||
|
@ -872,42 +487,6 @@ export class DescriptionTemplateTableOfContents extends BaseComponent implements
|
||||||
this.dragSubscriptions.forEach(subscription => subscription.unsubscribe())
|
this.dragSubscriptions.forEach(subscription => subscription.unsubscribe())
|
||||||
}
|
}
|
||||||
|
|
||||||
private _scrollIntoDragginItem(id: string) {
|
|
||||||
|
|
||||||
// const table = document.getElementById('tocentrytable');
|
|
||||||
// if(table){
|
|
||||||
// // const element = document.getElementById('TABLE_ENTRY'+id);
|
|
||||||
// console.log('Table found!');
|
|
||||||
// const element = document.getElementById('TABLE_ENTRY' + id);
|
|
||||||
// const elementFromTable = table.closest('#TABLE_ENTRY'+ id);
|
|
||||||
|
|
||||||
|
|
||||||
// if(elementFromTable){
|
|
||||||
// console.log('found from table:', elementFromTable);
|
|
||||||
// }
|
|
||||||
// if(element){
|
|
||||||
// console.log('Element found!');
|
|
||||||
// // element.classList.add('text-danger');
|
|
||||||
// // console.log(element);
|
|
||||||
|
|
||||||
// const tableRect = table.getBoundingClientRect();
|
|
||||||
// const elementRect = element.getBoundingClientRect();
|
|
||||||
|
|
||||||
|
|
||||||
// console.log('tablerect :',tableRect);
|
|
||||||
// console.log('elementRect :',elementRect);
|
|
||||||
|
|
||||||
// const dY = elementRect.top - tableRect.top;
|
|
||||||
// console.log('Distance from table is ', dY);
|
|
||||||
// // table.scroll({top:dY,behavior:'smooth'});
|
|
||||||
// console.log('found from document ', element);
|
|
||||||
|
|
||||||
// // element.scrollIntoView();
|
|
||||||
// }
|
|
||||||
// // element.scrollIntoView();
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
private _findTocEntryById(id: string, tocentries: ToCEntry[]): ToCEntry {
|
private _findTocEntryById(id: string, tocentries: ToCEntry[]): ToCEntry {
|
||||||
if (!tocentries) {
|
if (!tocentries) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -3,17 +3,22 @@ import { Component, OnInit } from '@angular/core';
|
||||||
import { FormArray, FormGroup, UntypedFormGroup } from '@angular/forms';
|
import { FormArray, FormGroup, UntypedFormGroup } from '@angular/forms';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { PrefillingSourceService } from '@app/core/services/prefilling-source/prefilling-source.service';
|
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
|
import { PrefillingSourceService } from '@app/core/services/prefilling-source/prefilling-source.service';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
// import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
|
import { MatCheckboxChange } from '@angular/material/checkbox';
|
||||||
|
import { Title } from '@angular/platform-browser';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { PrefillingSource, PrefillingSourcePersist } from '@app/core/model/prefilling-source/prefilling-source';
|
import { PrefillingSource, PrefillingSourcePersist } from '@app/core/model/prefilling-source/prefilling-source';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
import { LoggingService } from '@app/core/services/logging/logging-service';
|
import { LoggingService } from '@app/core/services/logging/logging-service';
|
||||||
|
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||||
|
import { ResultFieldsMappingConfigurationEditorModel } from '@app/ui/external-fetcher/external-fetcher-source-editor.model';
|
||||||
import { BaseEditor } from '@common/base/base-editor';
|
import { BaseEditor } from '@common/base/base-editor';
|
||||||
import { FormService } from '@common/forms/form-service';
|
import { FormService } from '@common/forms/form-service';
|
||||||
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
||||||
|
@ -22,15 +27,9 @@ import { FilterService } from '@common/modules/text-filter/filter-service';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { map, takeUntil } from 'rxjs/operators';
|
import { map, takeUntil } from 'rxjs/operators';
|
||||||
|
import { PrefillingSourceDefinitionEditorModel, PrefillingSourceEditorModel } from './prefilling-source-editor.model';
|
||||||
import { PrefillingSourceEditorResolver } from './prefilling-source-editor.resolver';
|
import { PrefillingSourceEditorResolver } from './prefilling-source-editor.resolver';
|
||||||
import { PrefillingSourceEditorService } from './prefilling-source-editor.service';
|
import { PrefillingSourceEditorService } from './prefilling-source-editor.service';
|
||||||
import { PrefillingSourceDefinitionEditorModel, PrefillingSourceEditorModel } from './prefilling-source-editor.model';
|
|
||||||
import { ResultFieldsMappingConfigurationEditorModel } from '@app/ui/external-fetcher/external-fetcher-source-editor.model';
|
|
||||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
||||||
import { LockService } from '@app/core/services/lock/lock.service';
|
|
||||||
import { Title } from '@angular/platform-browser';
|
|
||||||
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-prefilling-source-editor-component',
|
selector: 'app-prefilling-source-editor-component',
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
|
|
||||||
|
import { DatePipe } from '@angular/common';
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { FormArray, UntypedFormGroup } from '@angular/forms';
|
import { FormArray, UntypedFormGroup } from '@angular/forms';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
import { Title } from '@angular/platform-browser';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
import { ExternalFetcherApiHTTPMethodType } from '@app/core/common/enum/external-fetcher-api-http-method-type';
|
||||||
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
|
import { ExternalFetcherSourceType } from '@app/core/common/enum/external-fetcher-source-type';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
|
||||||
// import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
|
||||||
import { DatePipe } from '@angular/common';
|
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { ReferenceFieldDataType } from '@app/core/common/enum/reference-field-data-type';
|
import { ReferenceFieldDataType } from '@app/core/common/enum/reference-field-data-type';
|
||||||
import { ExternalFetcherApiHTTPMethodType } from '@app/core/common/enum/external-fetcher-api-http-method-type';
|
|
||||||
import { ExternalFetcherSourceType } from '@app/core/common/enum/external-fetcher-source-type';
|
|
||||||
import { ReferenceType, ReferenceTypePersist } from '@app/core/model/reference-type/reference-type';
|
import { ReferenceType, ReferenceTypePersist } from '@app/core/model/reference-type/reference-type';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
import { LoggingService } from '@app/core/services/logging/logging-service';
|
import { LoggingService } from '@app/core/services/logging/logging-service';
|
||||||
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
|
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
|
||||||
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||||
import { BaseEditor } from '@common/base/base-editor';
|
import { BaseEditor } from '@common/base/base-editor';
|
||||||
import { FormService } from '@common/forms/form-service';
|
import { FormService } from '@common/forms/form-service';
|
||||||
|
@ -28,9 +30,6 @@ import { map, takeUntil } from 'rxjs/operators';
|
||||||
import { ReferenceTypeEditorModel } from './reference-type-editor.model';
|
import { ReferenceTypeEditorModel } from './reference-type-editor.model';
|
||||||
import { ReferenceTypeEditorResolver } from './reference-type-editor.resolver';
|
import { ReferenceTypeEditorResolver } from './reference-type-editor.resolver';
|
||||||
import { ReferenceTypeEditorService } from './reference-type-editor.service';
|
import { ReferenceTypeEditorService } from './reference-type-editor.service';
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
||||||
import { LockService } from '@app/core/services/lock/lock.service';
|
|
||||||
import { Title } from '@angular/platform-browser';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-reference-type-editor-component',
|
selector: 'app-reference-type-editor-component',
|
||||||
|
|
|
@ -1,21 +1,24 @@
|
||||||
|
|
||||||
|
import { DatePipe } from '@angular/common';
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { FormArray, UntypedFormGroup } from '@angular/forms';
|
import { FormArray, UntypedFormGroup } from '@angular/forms';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
import { Title } from '@angular/platform-browser';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
|
||||||
import { ReferenceService } from '@app/core/services/reference/reference.service';
|
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
|
||||||
// import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
|
||||||
import { DatePipe } from '@angular/common';
|
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { ReferenceFieldDataType } from '@app/core/common/enum/reference-field-data-type';
|
import { ReferenceFieldDataType } from '@app/core/common/enum/reference-field-data-type';
|
||||||
import { ReferenceSourceType } from '@app/core/common/enum/reference-source-type';
|
import { ReferenceSourceType } from '@app/core/common/enum/reference-source-type';
|
||||||
import { Reference, ReferencePersist } from '@app/core/model/reference/reference';
|
import { Reference, ReferencePersist } from '@app/core/model/reference/reference';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
import { LoggingService } from '@app/core/services/logging/logging-service';
|
import { LoggingService } from '@app/core/services/logging/logging-service';
|
||||||
|
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
|
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
|
||||||
|
import { ReferenceService } from '@app/core/services/reference/reference.service';
|
||||||
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
||||||
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||||
import { BaseEditor } from '@common/base/base-editor';
|
import { BaseEditor } from '@common/base/base-editor';
|
||||||
|
@ -29,10 +32,6 @@ import { map, takeUntil } from 'rxjs/operators';
|
||||||
import { ReferenceEditorModel } from './reference-editor.model';
|
import { ReferenceEditorModel } from './reference-editor.model';
|
||||||
import { ReferenceEditorResolver } from './reference-editor.resolver';
|
import { ReferenceEditorResolver } from './reference-editor.resolver';
|
||||||
import { ReferenceEditorService } from './reference-editor.service';
|
import { ReferenceEditorService } from './reference-editor.service';
|
||||||
import { LockService } from '@app/core/services/lock/lock.service';
|
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
||||||
import { Title } from '@angular/platform-browser';
|
|
||||||
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,34 +1,32 @@
|
||||||
|
|
||||||
|
import { HttpErrorResponse } from '@angular/common/http';
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { UntypedFormGroup } from '@angular/forms';
|
import { UntypedFormGroup } from '@angular/forms';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
|
||||||
// import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
|
import { TenantConfigurationType } from '@app/core/common/enum/tenant-configuration-type';
|
||||||
|
import { CultureInfo } from '@app/core/model/culture-info';
|
||||||
|
import { TenantConfiguration, TenantConfigurationPersist } from '@app/core/model/tenant-configuaration/tenant-configuration';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
|
import { CultureService } from '@app/core/services/culture/culture-service';
|
||||||
|
import { DefaultUserLocaleService } from '@app/core/services/default-user-locale/default-user-locale.service';
|
||||||
|
import { LanguageService } from '@app/core/services/language/language.service';
|
||||||
|
import { LoggingService } from '@app/core/services/logging/logging-service';
|
||||||
|
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
|
import { TenantConfigurationService } from '@app/core/services/tenant-configuration/tenant-configuration.service';
|
||||||
|
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration';
|
||||||
|
import { BasePendingChangesComponent } from '@common/base/base-pending-changes.component';
|
||||||
import { FormService } from '@common/forms/form-service';
|
import { FormService } from '@common/forms/form-service';
|
||||||
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
||||||
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import moment from 'moment';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
import { map, takeUntil } from 'rxjs/operators';
|
import { map, takeUntil } from 'rxjs/operators';
|
||||||
import { TenantConfigurationEditorModel } from './default-user-locale-editor.model';
|
import { TenantConfigurationEditorModel } from './default-user-locale-editor.model';
|
||||||
import { TenantConfiguration, TenantConfigurationPersist } from '@app/core/model/tenant-configuaration/tenant-configuration';
|
|
||||||
import { TenantConfigurationService } from '@app/core/services/tenant-configuration/tenant-configuration.service';
|
|
||||||
import { DefaultUserLocaleEditorService } from './default-user-locale-editor.service';
|
|
||||||
import { DefaultUserLocaleEditorResolver } from './default-user-locale-editor.resolver';
|
import { DefaultUserLocaleEditorResolver } from './default-user-locale-editor.resolver';
|
||||||
import { BasePendingChangesComponent } from '@common/base/base-pending-changes.component';
|
import { DefaultUserLocaleEditorService } from './default-user-locale-editor.service';
|
||||||
import { Observable, of } from 'rxjs';
|
|
||||||
import { TenantConfigurationType } from '@app/core/common/enum/tenant-configuration-type';
|
|
||||||
import { HttpErrorResponse } from '@angular/common/http';
|
|
||||||
import { ResponseErrorCode } from '@app/core/common/enum/respone-error-code';
|
|
||||||
import { LoggingService } from '@app/core/services/logging/logging-service';
|
|
||||||
import { CultureInfo } from '@app/core/model/culture-info';
|
|
||||||
import moment from 'moment';
|
|
||||||
import { CultureService } from '@app/core/services/culture/culture-service';
|
|
||||||
import { LanguageService } from '@app/core/services/language/language.service';
|
|
||||||
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration';
|
|
||||||
import { DefaultUserLocaleService } from '@app/core/services/default-user-locale/default-user-locale.service';
|
|
||||||
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
// import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
|
|
||||||
|
import { DatePipe } from '@angular/common';
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { UntypedFormGroup } from '@angular/forms';
|
import { UntypedFormGroup } from '@angular/forms';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { TenantService } from '@app/core/services/tenant/tenant.service';
|
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
|
||||||
// import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
|
||||||
import { DatePipe } from '@angular/common';
|
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { Tenant, TenantPersist } from '@app/core/model/tenant/tenant';
|
import { Tenant, TenantPersist } from '@app/core/model/tenant/tenant';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
import { LoggingService } from '@app/core/services/logging/logging-service';
|
import { LoggingService } from '@app/core/services/logging/logging-service';
|
||||||
|
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
|
import { TenantService } from '@app/core/services/tenant/tenant.service';
|
||||||
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
||||||
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||||
import { BaseEditor } from '@common/base/base-editor';
|
import { BaseEditor } from '@common/base/base-editor';
|
||||||
|
@ -23,12 +25,9 @@ import { FilterService } from '@common/modules/text-filter/filter-service';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { map, takeUntil } from 'rxjs/operators';
|
import { map, takeUntil } from 'rxjs/operators';
|
||||||
|
import { TenantEditorModel } from './tenant-editor.model';
|
||||||
import { TenantEditorResolver } from './tenant-editor.resolver';
|
import { TenantEditorResolver } from './tenant-editor.resolver';
|
||||||
import { TenantEditorService } from './tenant-editor.service';
|
import { TenantEditorService } from './tenant-editor.service';
|
||||||
import { TenantEditorModel } from './tenant-editor.model';
|
|
||||||
import { LockService } from '@app/core/services/lock/lock.service';
|
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
||||||
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -159,11 +159,6 @@ export class AnnotationDialogComponent extends BaseComponent {
|
||||||
this.threads.add(element.threadId);
|
this.threads.add(element.threadId);
|
||||||
});
|
});
|
||||||
console.log(this.parentAnnotationsPerThread);
|
console.log(this.parentAnnotationsPerThread);
|
||||||
// console.log(this.comments);
|
|
||||||
// console.log(this.threads);
|
|
||||||
// console.log(this.parentAnnotationsPerThread);
|
|
||||||
// console.log(this.annotationsPerThread);
|
|
||||||
// this.annotationsChanged.emit(this.threads);
|
|
||||||
},
|
},
|
||||||
error => this.onCallbackError(error),
|
error => this.onCallbackError(error),
|
||||||
);
|
);
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
|
||||||
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||||
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { DescriptionTemplate, DescriptionTemplateBaseFieldData, DescriptionTemplateDefaultValue, DescriptionTemplateDefinition, DescriptionTemplateExternalDatasetData, DescriptionTemplateField, DescriptionTemplateFieldSet, DescriptionTemplateMultiplicity, DescriptionTemplatePage, DescriptionTemplateReferenceTypeData, DescriptionTemplateRule, DescriptionTemplateSection, DescriptionTemplateSelectData, DescriptionTemplateSelectOption, DescriptionTemplateUploadData, DescriptionTemplateUploadOption } from '@app/core/model/description-template/description-template';
|
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
|
||||||
import { Description, DescriptionExternalIdentifier, DescriptionField, DescriptionPropertyDefinition, DescriptionPropertyDefinitionFieldSet, DescriptionPropertyDefinitionFieldSetItem, DescriptionReference, DescriptionReferenceData, DescriptionTag } from '@app/core/model/description/description';
|
import { Description, DescriptionExternalIdentifier, DescriptionField, DescriptionPropertyDefinition, DescriptionPropertyDefinitionFieldSet, DescriptionPropertyDefinitionFieldSetItem, DescriptionReference, DescriptionReferenceData, DescriptionTag } from '@app/core/model/description/description';
|
||||||
import { DescriptionTemplatesInSection, DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
import { DescriptionTemplatesInSection, DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
||||||
import { Dmp, DmpDescriptionTemplate } from '@app/core/model/dmp/dmp';
|
import { Dmp, DmpDescriptionTemplate } from '@app/core/model/dmp/dmp';
|
||||||
|
@ -131,10 +131,7 @@ export class DescriptionEditorResolver extends BaseEditorResolver {
|
||||||
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.label)].join('.'),
|
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.label)].join('.'),
|
||||||
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.ordinal)].join('.'),
|
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.ordinal)].join('.'),
|
||||||
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.hasTemplates)].join('.'),
|
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.hasTemplates)].join('.'),
|
||||||
// (prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.descriptionTemplates), nameof<DescriptionTemplatesInSection>(x => x.id)].join('.'),
|
|
||||||
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.descriptionTemplates), nameof<DescriptionTemplatesInSection>(x => x.descriptionTemplateGroupId)].join('.'),
|
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.descriptionTemplates), nameof<DescriptionTemplatesInSection>(x => x.descriptionTemplateGroupId)].join('.'),
|
||||||
// (prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.descriptionTemplates), nameof<DescriptionTemplatesInSection>(x => x.label)].join('.'),
|
|
||||||
// (prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.descriptionTemplates), nameof<DescriptionTemplatesInSection>(x => x.minMultiplicity)].join('.'),
|
|
||||||
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.descriptionTemplates), nameof<DescriptionTemplatesInSection>(x => x.maxMultiplicity)].join('.'),
|
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.descriptionTemplates), nameof<DescriptionTemplatesInSection>(x => x.maxMultiplicity)].join('.'),
|
||||||
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.prefillingSources), nameof<PrefillingSource>(x => x.id)].join('.'),
|
(prefix ? prefix + '.' : '') + [nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.prefillingSources), nameof<PrefillingSource>(x => x.id)].join('.'),
|
||||||
|
|
||||||
|
@ -197,9 +194,5 @@ export class DescriptionEditorResolver extends BaseEditorResolver {
|
||||||
}));
|
}));
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
//TODO: check this
|
|
||||||
// else if (cloneid != null) {
|
|
||||||
// return this.descriptionService.clone(Guid.parse(cloneid), fields).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed));
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
// import { DescriptionWizardComponent } from './description-wizard/description-wizard.component';
|
import { AuthGuard } from '@app/core/auth-guard.service';
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
|
||||||
import { PendingChangesGuard } from '@common/forms/pending-form-changes/pending-form-changes-guard.service';
|
|
||||||
// import { DescriptionOverviewComponent } from './overview/description-overview.component';
|
|
||||||
import { BreadcrumbService } from '@app/ui/misc/breadcrumb/breadcrumb.service';
|
import { BreadcrumbService } from '@app/ui/misc/breadcrumb/breadcrumb.service';
|
||||||
|
import { PendingChangesGuard } from '@common/forms/pending-form-changes/pending-form-changes-guard.service';
|
||||||
import { DescriptionEditorComponent } from './description-editor.component';
|
import { DescriptionEditorComponent } from './description-editor.component';
|
||||||
import { DescriptionEditorResolver } from './description-editor.resolver';
|
import { DescriptionEditorResolver } from './description-editor.resolver';
|
||||||
import { AuthGuard } from '@app/core/auth-guard.service';
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
|
@ -22,11 +19,7 @@ const routes: Routes = [
|
||||||
breadcrumbs: true,
|
breadcrumbs: true,
|
||||||
getFromTitleService: true,
|
getFromTitleService: true,
|
||||||
usePrefix: false
|
usePrefix: false
|
||||||
//title: 'DESCRIPTION-EDITOR.TITLE-EDIT-DESCRIPTION'
|
|
||||||
// ,
|
|
||||||
// authContext: {
|
|
||||||
// permissions: [AppPermission.EditDescription]
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -43,10 +36,6 @@ const routes: Routes = [
|
||||||
hideNavigationItem: true
|
hideNavigationItem: true
|
||||||
}),
|
}),
|
||||||
title: 'DESCRIPTION-EDITOR.TITLE-EDIT-DESCRIPTION',
|
title: 'DESCRIPTION-EDITOR.TITLE-EDIT-DESCRIPTION',
|
||||||
// ,
|
|
||||||
// authContext: {
|
|
||||||
// permissions: [AppPermission.EditDescription]
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -62,10 +51,6 @@ const routes: Routes = [
|
||||||
title: 'DESCRIPTION-EDITOR.TITLE-NEW',
|
title: 'DESCRIPTION-EDITOR.TITLE-NEW',
|
||||||
getFromTitleService: true,
|
getFromTitleService: true,
|
||||||
usePrefix: false
|
usePrefix: false
|
||||||
// ,
|
|
||||||
// authContext: {
|
|
||||||
// permissions: [AppPermission.EditDescription]
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -81,66 +66,8 @@ const routes: Routes = [
|
||||||
title: 'DESCRIPTION-EDITOR.TITLE-NEW',
|
title: 'DESCRIPTION-EDITOR.TITLE-NEW',
|
||||||
getFromTitleService: true,
|
getFromTitleService: true,
|
||||||
usePrefix: false
|
usePrefix: false
|
||||||
// ,
|
|
||||||
// authContext: {
|
|
||||||
// permissions: [AppPermission.EditDescription]
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
|
||||||
// path: 'edit/:id/finalize',
|
|
||||||
// component: DescriptionWizardComponent,
|
|
||||||
// canActivate: [AuthGuard],
|
|
||||||
// data: {
|
|
||||||
// breadcrumb: true,
|
|
||||||
// public: false,
|
|
||||||
// title: 'GENERAL.TITLES.DATASET-EDIT',
|
|
||||||
// finalize: true
|
|
||||||
// },
|
|
||||||
// canDeactivate:[CanDeactivateGuard]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: 'publicEdit/:publicId',
|
|
||||||
// component: DescriptionWizardComponent,
|
|
||||||
// //canActivate: [AuthGuard],
|
|
||||||
// data: {
|
|
||||||
// public: true,
|
|
||||||
// title: 'GENERAL.TITLES.DATASET-PUBLIC-EDIT'
|
|
||||||
// },
|
|
||||||
// canDeactivate:[CanDeactivateGuard]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: 'new',
|
|
||||||
// component: DescriptionWizardComponent,
|
|
||||||
// canActivate: [AuthGuard],
|
|
||||||
// data: {
|
|
||||||
// breadcrumb: true,
|
|
||||||
// title: 'GENERAL.TITLES.DATASET-NEW'
|
|
||||||
// },
|
|
||||||
// canDeactivate:[CanDeactivateGuard]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: 'copy/:id',
|
|
||||||
// component: DescriptionWizardComponent,
|
|
||||||
// canActivate: [AuthGuard],
|
|
||||||
// data: {
|
|
||||||
// breadcrumb: true,
|
|
||||||
// title: 'GENERAL.TITLES.DATASET-COPY'
|
|
||||||
// },
|
|
||||||
// canDeactivate:[CanDeactivateGuard]
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// path: 'profileupdate/:updateId',
|
|
||||||
// component: DescriptionWizardComponent,
|
|
||||||
// canActivate: [AuthGuard],
|
|
||||||
// data: {
|
|
||||||
// breadcrumb: true,
|
|
||||||
// title: 'GENERAL.TITLES.DATASET-UPDATE'
|
|
||||||
// },
|
|
||||||
// canDeactivate:[CanDeactivateGuard]
|
|
||||||
// },
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -35,18 +35,10 @@ export class DescriptionFormFieldSetComponent extends BaseComponent {
|
||||||
return this.fieldSet.hasMultiplicity && this.fieldSet.multiplicity != null;
|
return this.fieldSet.hasMultiplicity && this.fieldSet.multiplicity != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
isVisibleByVisibilityService: boolean = true;
|
isVisibleByVisibilityService: boolean = true;
|
||||||
@Input() visibilityRulesService: VisibilityRulesService;
|
@Input() visibilityRulesService: VisibilityRulesService;
|
||||||
@Input() path: String;
|
@Input() path: String;
|
||||||
|
|
||||||
|
|
||||||
@Input() datasetProfileId: String;
|
@Input() datasetProfileId: String;
|
||||||
// @Input() form: UntypedFormGroup;
|
|
||||||
@Input() isChild: Boolean = false;
|
@Input() isChild: Boolean = false;
|
||||||
@Input() showDelete: Boolean = false;
|
@Input() showDelete: Boolean = false;
|
||||||
@Input() tocentry: ToCEntry;
|
@Input() tocentry: ToCEntry;
|
||||||
|
|
|
@ -190,11 +190,6 @@ export class DatasetCriteriaComponent extends BaseCriteriaComponent implements O
|
||||||
) {
|
) {
|
||||||
setTimeout(() => this.refreshCallback(true));
|
setTimeout(() => this.refreshCallback(true));
|
||||||
}
|
}
|
||||||
// if (this.refreshCallback != null &&
|
|
||||||
// (this.criteria.like == null || this.criteria.like.length === 0 || this.criteria.like.length > 2)
|
|
||||||
// ) {
|
|
||||||
// this.refreshCallback();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
filterTags(value: string): Observable<ExternalSourceItemModel[]> {
|
filterTags(value: string): Observable<ExternalSourceItemModel[]> {
|
||||||
|
@ -225,12 +220,6 @@ export class DatasetCriteriaComponent extends BaseCriteriaComponent implements O
|
||||||
const fields: Array<string> = new Array<string>();
|
const fields: Array<string> = new Array<string>();
|
||||||
fields.push('asc');
|
fields.push('asc');
|
||||||
|
|
||||||
// if (this.isPublic) {
|
|
||||||
// const dmpDataTableRequest: DataTableRequest<ExploreDmpCriteriaModel> = new DataTableRequest(0, null, { fields: fields });
|
|
||||||
// dmpDataTableRequest.criteria = new ExploreDmpCriteriaModel();
|
|
||||||
// dmpDataTableRequest.criteria.like = value;
|
|
||||||
// return this.dmpService.getPublicPaged(dmpDataTableRequest, "autocomplete");
|
|
||||||
// } else {
|
|
||||||
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
|
const dmpDataTableRequest: DataTableRequest<DmpCriteria> = new DataTableRequest(0, null, { fields: fields });
|
||||||
dmpDataTableRequest.criteria = new DmpCriteria();
|
dmpDataTableRequest.criteria = new DmpCriteria();
|
||||||
dmpDataTableRequest.criteria.like = value;
|
dmpDataTableRequest.criteria.like = value;
|
||||||
|
|
|
@ -12,6 +12,7 @@ import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
|
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
|
||||||
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
|
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
|
||||||
import { Description } from '@app/core/model/description/description';
|
import { Description } from '@app/core/model/description/description';
|
||||||
|
import { DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
||||||
import { Dmp, DmpDescriptionTemplate, DmpUser } from '@app/core/model/dmp/dmp';
|
import { Dmp, DmpDescriptionTemplate, DmpUser } from '@app/core/model/dmp/dmp';
|
||||||
import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
||||||
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
||||||
|
@ -20,36 +21,29 @@ import { DescriptionLookup } from '@app/core/query/description.lookup';
|
||||||
import { DmpLookup } from '@app/core/query/dmp.lookup';
|
import { DmpLookup } from '@app/core/query/dmp.lookup';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
import { DescriptionService } from '@app/core/services/description/description.service';
|
import { DescriptionService } from '@app/core/services/description/description.service';
|
||||||
import { DmpService } from '@app/core/services/dmp/dmp.service';
|
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants';
|
import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants';
|
||||||
import { GuidedTourService } from '@app/library/guided-tour/guided-tour.service';
|
import { GuidedTourService } from '@app/library/guided-tour/guided-tour.service';
|
||||||
import { StartNewDmpDialogComponent } from '@app/ui/dmp/new/start-new-dmp-dialogue/start-new-dmp-dialog.component';
|
import { StartNewDmpDialogComponent } from '@app/ui/dmp/new/start-new-dmp-dialogue/start-new-dmp-dialog.component';
|
||||||
// import { IBreadCrumbComponent } from '@app/ui/misc/breadcrumb/definition/IBreadCrumbComponent';
|
|
||||||
// import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
|
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
|
import { SortDirection } from '@common/modules/hybrid-listing/hybrid-listing.component';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { StartNewDescriptionDialogComponent } from '../start-new-description-dialog/start-new-description-dialog.component';
|
import { StartNewDescriptionDialogComponent } from '../start-new-description-dialog/start-new-description-dialog.component';
|
||||||
import { DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
|
||||||
import { SortDirection } from '@common/modules/hybrid-listing/hybrid-listing.component';
|
|
||||||
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
|
||||||
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-description-listing-component',
|
selector: 'app-description-listing-component',
|
||||||
templateUrl: 'description-listing.component.html',
|
templateUrl: 'description-listing.component.html',
|
||||||
styleUrls: ['./description-listing.component.scss']
|
styleUrls: ['./description-listing.component.scss']
|
||||||
})
|
})
|
||||||
export class DescriptionListingComponent extends BaseComponent implements OnInit {//IBreadCrumbComponent
|
export class DescriptionListingComponent extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
@ViewChild(MatPaginator, { static: true }) _paginator: MatPaginator;
|
@ViewChild(MatPaginator, { static: true }) _paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
// @ViewChild(DescriptionCriteriaComponent, { static: true }) criteria: DescriptionCriteriaComponent;
|
|
||||||
|
|
||||||
// breadCrumbs: Observable<BreadcrumbItem[]>;
|
|
||||||
|
|
||||||
titlePrefix: String;
|
titlePrefix: String;
|
||||||
dmpId: string;
|
dmpId: string;
|
||||||
|
@ -283,69 +277,8 @@ export class DescriptionListingComponent extends BaseComponent implements OnInit
|
||||||
|
|
||||||
openFiltersDialog(): void {
|
openFiltersDialog(): void {
|
||||||
//TODO: Add filters dialog
|
//TODO: Add filters dialog
|
||||||
|
|
||||||
// const dialogRef = this.dialog.open(DescriptionCriteriaDialogComponent, {
|
|
||||||
// width: '456px',
|
|
||||||
// height: '100%',
|
|
||||||
// id: 'filters',
|
|
||||||
// restoreFocus: false,
|
|
||||||
// data: {
|
|
||||||
// isPublic: this.isPublic,
|
|
||||||
// status: this.status,
|
|
||||||
// criteria: this.criteria,
|
|
||||||
// formGroup: this.criteriaFormGroup,
|
|
||||||
// // criteria: this.grantId ? this.criteria : this.getDefaultCriteria(),
|
|
||||||
// updateDataFn: this.updateDataFn.bind(this)
|
|
||||||
// },
|
|
||||||
// position: { right: '0px;' },
|
|
||||||
// panelClass: 'dialog-side-panel'
|
|
||||||
// });
|
|
||||||
|
|
||||||
// dialogRef.afterClosed().subscribe(result => {
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// updateDataFn(criteria: DescriptionCriteriaComponent): void {
|
|
||||||
// this.criteriaFormGroup = criteria.formGroup;
|
|
||||||
// this.toDescriptionCriteria(criteria);
|
|
||||||
// this.refresh();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// toDescriptionCriteria(criteria: DescriptionCriteriaComponent) {
|
|
||||||
// let formGroup = criteria.formGroup;
|
|
||||||
// this.criteria = {
|
|
||||||
// like: formGroup.get("like").value,
|
|
||||||
// status: formGroup.get("status").value,
|
|
||||||
// allVersions: formGroup.get("allVersions").value,
|
|
||||||
// role: formGroup.get("role").value
|
|
||||||
// }
|
|
||||||
// if (formGroup.get("tags") && formGroup.get("tags").value) {
|
|
||||||
// this.criteria.tags = formGroup.get("tags").value.map(x => (<ExternalTagEditorModel>x));
|
|
||||||
// }
|
|
||||||
// if (formGroup.get("collaborators") && formGroup.get("collaborators").value) {
|
|
||||||
// this.criteria.collaborators = formGroup.get("collaborators").value.map(x => x.id);
|
|
||||||
// }
|
|
||||||
// if (formGroup.get("dmpIds") && formGroup.get("dmpIds").value) {
|
|
||||||
// this.criteria.dmpIds = formGroup.get("dmpIds").value.map(x => x.id);
|
|
||||||
// }
|
|
||||||
// if (formGroup.get("groupIds") && formGroup.get("groupIds").value) {
|
|
||||||
// this.criteria.groupIds = formGroup.get("groupIds").value.map(x => x.groupId);
|
|
||||||
// }
|
|
||||||
// if (formGroup.get("grants") && formGroup.get("grants").value) {
|
|
||||||
// this.criteria.grants = formGroup.get("grants").value.map(x => x.id);
|
|
||||||
// }
|
|
||||||
// if (formGroup.get("organisations") && formGroup.get("organisations").value) {
|
|
||||||
// this.criteria.organisations = formGroup.get("organisations").value.map(x => x.id);
|
|
||||||
// }
|
|
||||||
// if (formGroup.get("descriptionTemplates") && formGroup.get("descriptionTemplates").value) {
|
|
||||||
// this.criteria.descriptionTemplates = formGroup.get("descriptionTemplates").value.map(x => x.id)
|
|
||||||
// }
|
|
||||||
// if (formGroup.get("grantStatus") && formGroup.get("grantStatus").value) {
|
|
||||||
// this.criteria.grantStatus = formGroup.get("grantStatus").value;
|
|
||||||
// }
|
|
||||||
// this.criteria.isPublic = this.isPublic;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
hasScrollbar(): boolean {
|
hasScrollbar(): boolean {
|
||||||
return document.getElementById("main-page").scrollHeight > document.documentElement.clientHeight
|
return document.getElementById("main-page").scrollHeight > document.documentElement.clientHeight
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { UntypedFormBuilder, Validators } from '@angular/forms';
|
import { UntypedFormBuilder, Validators } from '@angular/forms';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||||
|
@ -18,6 +17,7 @@ import { Dmp, DmpDescriptionTemplate, DmpUser, DmpUserRemovePersist } from '@app
|
||||||
import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
||||||
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
||||||
import { Reference } from '@app/core/model/reference/reference';
|
import { Reference } from '@app/core/model/reference/reference';
|
||||||
|
import { User } from '@app/core/model/user/user';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
import { DescriptionService } from '@app/core/services/description/description.service';
|
import { DescriptionService } from '@app/core/services/description/description.service';
|
||||||
|
@ -28,22 +28,21 @@ import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
|
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
|
||||||
import { ReferenceService } from '@app/core/services/reference/reference.service';
|
import { ReferenceService } from '@app/core/services/reference/reference.service';
|
||||||
|
import { UserService } from '@app/core/services/user/user.service';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
||||||
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component';
|
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component';
|
||||||
import { DescriptionValidationOutput } from '@app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component';
|
import { DescriptionValidationOutput } from '@app/ui/dmp/dmp-finalize-dialog/dmp-finalize-dialog.component';
|
||||||
import { DmpInvitationDialogComponent } from '@app/ui/dmp/invitation/dialog/dmp-invitation-dialog.component';
|
import { DmpInvitationDialogComponent } from '@app/ui/dmp/invitation/dialog/dmp-invitation-dialog.component';
|
||||||
|
import { BreadcrumbService } from '@app/ui/misc/breadcrumb/breadcrumb.service';
|
||||||
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
||||||
|
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { map, takeUntil } from 'rxjs/operators';
|
import { map, takeUntil } from 'rxjs/operators';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { DescriptionCopyDialogComponent } from '../description-copy-dialog/description-copy-dialog.component';
|
import { DescriptionCopyDialogComponent } from '../description-copy-dialog/description-copy-dialog.component';
|
||||||
import { BreadcrumbService } from '@app/ui/misc/breadcrumb/breadcrumb.service';
|
|
||||||
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
|
||||||
import { Observable, of } from 'rxjs';
|
|
||||||
import { UserService } from '@app/core/services/user/user.service';
|
|
||||||
import { User } from '@app/core/model/user/user';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -59,7 +58,6 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
|
||||||
isFinalized = false;
|
isFinalized = false;
|
||||||
isPublicView = true;
|
isPublicView = true;
|
||||||
hasPublishButton: boolean = true;
|
hasPublishButton: boolean = true;
|
||||||
// breadCrumbs: Observable<BreadcrumbItem[]> = observableOf();
|
|
||||||
expand = false;
|
expand = false;
|
||||||
isLocked: Boolean;
|
isLocked: Boolean;
|
||||||
descriptionStatusEnum = DescriptionStatus;
|
descriptionStatusEnum = DescriptionStatus;
|
||||||
|
|
|
@ -317,11 +317,6 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
||||||
|
|
||||||
formSubmit(): void {
|
formSubmit(): void {
|
||||||
this.formService.removeAllBackEndErrors(this.formGroup);
|
this.formService.removeAllBackEndErrors(this.formGroup);
|
||||||
// this.formService.touchAllFormFields(this.formGroup);
|
|
||||||
// if (this.formGroup.get('label').valid && this.formGroup.get('blueprint').valid && this.formGroup.get('status').valid
|
|
||||||
// && this.formGroup.get('descriptionTemplates').valid) {
|
|
||||||
// this.persistEntity();
|
|
||||||
// }
|
|
||||||
this.persistEntity();
|
this.persistEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,6 @@ export class DmpEditorResolver extends BaseEditorResolver {
|
||||||
[nameof<Dmp>(x => x.properties), nameof<DmpProperties>(x => x.contacts), nameof<DmpContact>(x => x.email)].join('.'),
|
[nameof<Dmp>(x => x.properties), nameof<DmpProperties>(x => x.contacts), nameof<DmpContact>(x => x.email)].join('.'),
|
||||||
|
|
||||||
|
|
||||||
// [nameof<Dmp>(x => x.entityDois), nameof<EntityDoi>(x => x.id)].join('.'),
|
|
||||||
// [nameof<Dmp>(x => x.entityDois), nameof<EntityDoi>(x => x.repositoryId)].join('.'),
|
|
||||||
// [nameof<Dmp>(x => x.entityDois), nameof<EntityDoi>(x => x.doi)].join('.'),
|
|
||||||
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.id)].join('.'),
|
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.id)].join('.'),
|
||||||
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.label)].join('.'),
|
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.label)].join('.'),
|
||||||
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),
|
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),
|
||||||
|
@ -88,11 +85,6 @@ export class DmpEditorResolver extends BaseEditorResolver {
|
||||||
[nameof<Dmp>(x => x.dmpDescriptionTemplates), nameof<DmpDescriptionTemplate>(x => x.isActive)].join('.'),
|
[nameof<Dmp>(x => x.dmpDescriptionTemplates), nameof<DmpDescriptionTemplate>(x => x.isActive)].join('.'),
|
||||||
|
|
||||||
|
|
||||||
// nameof<Dmp>(x => x.id),
|
|
||||||
// nameof<Dmp>(x => x.label),
|
|
||||||
// nameof<Dmp>(x => x.status),
|
|
||||||
// nameof<Dmp>(x => x.description),
|
|
||||||
// nameof<Dmp>(x => x.status),
|
|
||||||
...DmpEditorResolver.blueprintLookupFields(nameof<Dmp>(x => x.blueprint)),
|
...DmpEditorResolver.blueprintLookupFields(nameof<Dmp>(x => x.blueprint)),
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
<div class="main-info" [formGroup]="formGroup">
|
|
||||||
<div class="col-12 intro">
|
|
||||||
<p>{{'DMP-EDITOR.DATASET-INFO.SECOND-INTRO' | translate}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 card">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="heading">4.1 {{'DMP-EDITOR.STEPPER.DESCRIPTION-INFO' | translate}}*</div>
|
|
||||||
<div class="hint">
|
|
||||||
<div class="pb-1">{{'DMP-EDITOR.DATASET-INFO.HINT' | translate}}</div>
|
|
||||||
<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
|
|
||||||
</div>
|
|
||||||
<div class="profile-form">
|
|
||||||
<mat-form-field>
|
|
||||||
<mat-label>{{'DMP-EDITOR.FIELDS.SELECT-TEMPLATE' | translate}}</mat-label>
|
|
||||||
<app-multiple-auto-complete placeholder="{{'DMP-EDITOR.FIELDS.SELECT-TEMPLATE' | translate}}" required='true' [formControl]="formGroup.get('profiles')" [configuration]="profilesAutoCompleteConfiguration" (optionRemoved)="onRemoveTemplate($event)" (optionActionClicked)="onPreviewTemplate($event)" (optionSelected)="onOptionSelected()">
|
|
||||||
</app-multiple-auto-complete>
|
|
||||||
<mat-error *ngIf="formGroup.get('profiles').hasError('backendError')">
|
|
||||||
{{formGroup.get('profiles').getError('backendError').message}}</mat-error>
|
|
||||||
<mat-error *ngIf="formGroup.get('profiles').hasError('required')">
|
|
||||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
||||||
<button matSuffix class="input-btn" [disabled]="formGroup.get('profiles').disabled" (click)="allAvailableProfiles($event)">
|
|
||||||
<mat-icon class="icon-btn">view_list</mat-icon>
|
|
||||||
</button>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
<div class="col pl-0 pt-2 pb-3 d-flex">
|
|
||||||
<span class="not-found">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.HELP' | translate}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,84 +0,0 @@
|
||||||
.main-info {
|
|
||||||
// position: relative;
|
|
||||||
// left: 362px;
|
|
||||||
// width: calc(100% - 366px);
|
|
||||||
|
|
||||||
.intro {
|
|
||||||
text-align: left;
|
|
||||||
font-weight: 400;
|
|
||||||
letter-spacing: 0px;
|
|
||||||
color: #212121;
|
|
||||||
opacity: 1;
|
|
||||||
margin: 3rem 0rem 3rem 0rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heading {
|
|
||||||
text-align: left;
|
|
||||||
font-weight: 700;
|
|
||||||
font-size: 18px;
|
|
||||||
letter-spacing: 0px;
|
|
||||||
color: #212121;
|
|
||||||
opacity: 0.81;
|
|
||||||
margin-top: 1.625rem;
|
|
||||||
margin-bottom: 0.625rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hint {
|
|
||||||
text-align: left;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 16px;
|
|
||||||
letter-spacing: 0px;
|
|
||||||
color: #212121;
|
|
||||||
opacity: 0.81;
|
|
||||||
margin-bottom: 2.125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-form,
|
|
||||||
.description-form {
|
|
||||||
text-align: left;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 16px;
|
|
||||||
letter-spacing: 0.15px;
|
|
||||||
color: #7d7d7d;
|
|
||||||
opacity: 1;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
// textarea::placeholder {
|
|
||||||
// font-style: oblique;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.input-btn {
|
|
||||||
border: none;
|
|
||||||
color: #aaaaaa;
|
|
||||||
background-color: #ffffff00;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-btn :hover {
|
|
||||||
color: var(--primary-color-3) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.not-found {
|
|
||||||
font-size: 0.875rem;
|
|
||||||
font-weight: 400;
|
|
||||||
padding: 0rem 0.5rem 0rem 0rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
::ng-deep .profile-form .mat-form-field-appearance-outline .mat-form-field-outline {
|
|
||||||
background: #fafafa !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
::ng-deep .profile-form .mat-form-field-appearance-outline .mat-form-field-infix {
|
|
||||||
font-size: 1rem;
|
|
||||||
padding: 0.6em 0 1em 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
::ng-deep .profile-form .mat-form-field-wrapper {
|
|
||||||
padding-bottom: 0rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host ::ng-deep .multiple-auto-complete .align-arrow-right {
|
|
||||||
bottom: 1rem !important;
|
|
||||||
}
|
|
|
@ -1,258 +0,0 @@
|
||||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
||||||
import { UntypedFormGroup } from '@angular/forms';
|
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
|
||||||
import { DmpBlueprintDefinition } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
|
||||||
import { RequestItem } from '@app/core/query/request-item';
|
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
||||||
import { DmpBlueprintService } from '@app/core/services/dmp/dmp-blueprint.service';
|
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
|
||||||
import { MultipleAutoCompleteConfiguration } from '@app/library/auto-complete/multiple/multiple-auto-complete-configuration';
|
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { map, takeUntil } from 'rxjs/operators';
|
|
||||||
import { AvailableProfilesComponent } from '../available-profiles/available-profiles.component';
|
|
||||||
import { DmpService } from '@app/core/services/dmp/dmp.service';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'dataset-info',
|
|
||||||
templateUrl: './dataset-info.component.html',
|
|
||||||
styleUrls: ['./dataset-info.component.scss']
|
|
||||||
})
|
|
||||||
export class DatasetInfoComponent extends BaseComponent implements OnInit {
|
|
||||||
|
|
||||||
@Input() formGroup: UntypedFormGroup = null;
|
|
||||||
// @Input() datasetFormGroup: FormGroup = null;
|
|
||||||
@Input() isUserOwner: boolean;
|
|
||||||
@Input() dmp: DmpEditorModel;
|
|
||||||
@Input() hasDmpId: boolean;
|
|
||||||
@Input() isPublic: boolean;
|
|
||||||
@Input() isFinalized: boolean;
|
|
||||||
@Input() isNewVersion: boolean;
|
|
||||||
@Input() isClone: boolean;
|
|
||||||
@Output() onFormChanged: EventEmitter<any> = new EventEmitter();
|
|
||||||
|
|
||||||
availableProfiles: DatasetProfileModel[] = [];
|
|
||||||
|
|
||||||
selectedDmpBlueprintDefinition: DmpBlueprintDefinition;
|
|
||||||
profilesAutoCompleteConfiguration: MultipleAutoCompleteConfiguration;
|
|
||||||
|
|
||||||
datasetProfileDefinitionModel: DatasetDescriptionFormEditorModel;
|
|
||||||
datasetProfileDefinitionFormGroup: UntypedFormGroup;
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private language: TranslateService,
|
|
||||||
private configurationService: ConfigurationService,
|
|
||||||
private externalSourcesService: ExternalSourcesService,
|
|
||||||
private datasetWizardService: DatasetWizardService,
|
|
||||||
private dialog: MatDialog,
|
|
||||||
private _service: DmpService,
|
|
||||||
private dmpBlueprintService: DmpBlueprintService,
|
|
||||||
private router: Router,
|
|
||||||
private route: ActivatedRoute,
|
|
||||||
private uiNotificationService: UiNotificationService
|
|
||||||
) {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
|
|
||||||
try {
|
|
||||||
const profiles = this.formGroup.get('profiles').value as { id: string, label: string }[];
|
|
||||||
profiles.sort((a, b) => a.label.localeCompare(b.label));
|
|
||||||
} catch {
|
|
||||||
console.info('Could not sort profiles');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.profilesAutoCompleteConfiguration = {
|
|
||||||
filterFn: this.filterProfiles.bind(this),
|
|
||||||
initialItems: (excludedItems: any[]) => this.filterProfiles('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
|
|
||||||
displayFn: (item) => item['label'],
|
|
||||||
titleFn: (item) => item['label'],
|
|
||||||
subtitleFn: (item) => item['description'],
|
|
||||||
popupItemActionIcon: 'visibility'
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.formGroup.get('definition')) { this.selectedDmpBlueprintDefinition = this.formGroup.get('definition').value; }
|
|
||||||
this.registerFormEventsForDmpBlueprint();
|
|
||||||
|
|
||||||
if (this.hasDmpId) {
|
|
||||||
this.loadDatasetProfiles();
|
|
||||||
this.profilesAutoCompleteConfiguration = {
|
|
||||||
filterFn: this.filterProfiles.bind(this),
|
|
||||||
initialItems: (excludedItems: any[]) => this.filterProfiles('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
|
|
||||||
displayFn: (item) => item['label'],
|
|
||||||
titleFn: (item) => item['label'],
|
|
||||||
subtitleFn: (item) => item['description'],
|
|
||||||
popupItemActionIcon: 'visibility'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Researchers
|
|
||||||
filterProfiles(value: string): Observable<DatasetProfileModel[]> {
|
|
||||||
const request = new DataTableRequest<DatasetProfileCriteria>(null, null, { fields: ['+label'] });
|
|
||||||
const criteria = new DatasetProfileCriteria();
|
|
||||||
criteria.like = value;
|
|
||||||
request.criteria = criteria;
|
|
||||||
return this._service.searchDmpBlueprints(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
registerFormEventsForDmpBlueprint(definitionProperties?: DmpBlueprintDefinition): void {
|
|
||||||
this.formGroup.get('profile').valueChanges
|
|
||||||
.pipe(
|
|
||||||
takeUntil(this._destroyed))
|
|
||||||
.subscribe(Option => {
|
|
||||||
if (Option instanceof Object) {
|
|
||||||
this.selectedDmpBlueprintDefinition = null;
|
|
||||||
this.dmpBlueprintService.getSingle(Option.id)
|
|
||||||
.pipe(takeUntil(this._destroyed))
|
|
||||||
.subscribe(result => {
|
|
||||||
this.selectedDmpBlueprintDefinition = result.definition;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.selectedDmpBlueprintDefinition = null;
|
|
||||||
}
|
|
||||||
this.selectedDmpBlueprintDefinition = definitionProperties;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
loadDatasetProfiles() {
|
|
||||||
const datasetProfileRequestItem: RequestItem<DatasetProfileCriteria> = new RequestItem();
|
|
||||||
datasetProfileRequestItem.criteria = new DatasetProfileCriteria();
|
|
||||||
this.formGroup.get('id').value ? datasetProfileRequestItem.criteria.id = this.formGroup.get('id').value : datasetProfileRequestItem.criteria.id = this.formGroup.get('datasets')['controls'][0].get('dmp').value.id;
|
|
||||||
if (datasetProfileRequestItem.criteria.id) {
|
|
||||||
this.datasetWizardService.getAvailableProfiles(datasetProfileRequestItem)
|
|
||||||
.pipe(takeUntil(this._destroyed))
|
|
||||||
.subscribe(items => {
|
|
||||||
this.availableProfiles = items;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
allAvailableProfiles(event: MouseEvent) {
|
|
||||||
event.stopPropagation();
|
|
||||||
const dialogRef = this.dialog.open(AvailableProfilesComponent, {
|
|
||||||
data: {
|
|
||||||
profiles: this.formGroup.get('profiles')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// dmpValueChanged(dmp: DmpListingModel) {
|
|
||||||
// if (dmp) {
|
|
||||||
// this.formGroup.get('profile').enable();
|
|
||||||
// this.loadDatasetProfiles();
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// this.availableProfiles = [];
|
|
||||||
// this.formGroup.get('profile').reset();
|
|
||||||
// this.formGroup.get('profile').disable();
|
|
||||||
// this.formGroup.removeControl('datasetProfileDefinition');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// registerFormListeners() {
|
|
||||||
// this.formGroup.get('datasets')['controls'][0].get('dmp').valueChanges
|
|
||||||
// .pipe(takeUntil(this._destroyed))
|
|
||||||
// .subscribe(x => {
|
|
||||||
// this.dmpValueChanged(x);
|
|
||||||
// });
|
|
||||||
// this.formGroup.get('profile').valueChanges
|
|
||||||
// .pipe(takeUntil(this._destroyed))
|
|
||||||
// .subscribe(x => {
|
|
||||||
// //this.datasetProfileValueChanged(x);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// datasetProfileValueChanged(profiledId: string) {
|
|
||||||
// if (profiledId && profiledId.length > 0) {
|
|
||||||
// this.formGroup.removeControl('datasetProfileDefinition');
|
|
||||||
// this.getDefinition();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// getDefinition() {
|
|
||||||
// this.datasetWizardService.getDefinition(this.formGroup.get('profile').value)
|
|
||||||
// .pipe(takeUntil(this._destroyed))
|
|
||||||
// .subscribe(item => {
|
|
||||||
// this.formGroup.get('datasets')['controls'][0].datasetProfileDefinition = new DatasetDescriptionFormEditorModel().fromModel(item);
|
|
||||||
// this.datasetProfileDefinitionModel = this.formGroup.get('datasets')['controls'][0].datasetProfileDefinition;
|
|
||||||
// this.formGroup.addControl('datasetProfileDefinition', this.datasetProfileDefinitionModel.buildForm());
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
onRemoveTemplate(event) {
|
|
||||||
let found = false;
|
|
||||||
const profiles = this.formGroup.get('profiles').value;
|
|
||||||
this.formGroup.get('datasets')['controls'].forEach(element => {
|
|
||||||
if (element.get('profile').value.id === event.id) {
|
|
||||||
found = true;
|
|
||||||
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-REMOVE-TEMPLATE'), SnackBarNotificationLevel.Success);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (found) {
|
|
||||||
this.formGroup.get('profiles').setValue(profiles);
|
|
||||||
this.profilesAutoCompleteConfiguration = {
|
|
||||||
filterFn: this.filterProfiles.bind(this),
|
|
||||||
initialItems: (excludedItems: any[]) => this.filterProfiles('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
|
|
||||||
displayFn: (item) => item['label'],
|
|
||||||
titleFn: (item) => item['label'],
|
|
||||||
subtitleFn: (item) => item['description'],
|
|
||||||
popupItemActionIcon: 'visibility'
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onPreviewTemplate(event) {
|
|
||||||
const dialogRef = this.dialog.open(DatasetPreviewDialogComponent, {
|
|
||||||
width: '590px',
|
|
||||||
minHeight: '200px',
|
|
||||||
restoreFocus: false,
|
|
||||||
data: {
|
|
||||||
template: event
|
|
||||||
},
|
|
||||||
panelClass: 'custom-modalbox'
|
|
||||||
});
|
|
||||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
|
||||||
if (result) {
|
|
||||||
let profiles = this.formGroup.get('profiles').value;
|
|
||||||
profiles.push(event);
|
|
||||||
this.formGroup.get('profiles').setValue(profiles);
|
|
||||||
this.profilesAutoCompleteConfiguration = {
|
|
||||||
filterFn: this.filterProfiles.bind(this),
|
|
||||||
initialItems: (excludedItems: any[]) => this.filterProfiles('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
|
|
||||||
displayFn: (item) => item['label'],
|
|
||||||
titleFn: (item) => item['label'],
|
|
||||||
subtitleFn: (item) => item['description'],
|
|
||||||
popupItemActionIcon: 'visibility'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
onOptionSelected() {
|
|
||||||
try {
|
|
||||||
const profiles = this.formGroup.get('profiles').value as { id: string, label: string }[];
|
|
||||||
const profileCounts: Map<String, number> = new Map<String, number>();
|
|
||||||
profiles.forEach((value) => profileCounts.set(value.id, (profileCounts.get(value.id) !== undefined ? profileCounts.get(value.id) : 0) + 1));
|
|
||||||
const duplicateProfiles = profiles.filter((value) => {
|
|
||||||
let isOk = profileCounts.get(value.id) > 1;
|
|
||||||
if (isOk) {
|
|
||||||
profileCounts.set(value.id, 0);
|
|
||||||
}
|
|
||||||
return isOk;
|
|
||||||
});
|
|
||||||
duplicateProfiles.forEach((value) => profiles.splice(profiles.lastIndexOf(value), 1));
|
|
||||||
profiles.sort((a, b) => a.label.localeCompare(b.label));
|
|
||||||
} catch {
|
|
||||||
console.info('Could not sort Dataset Templates')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -6,43 +6,41 @@ import { MatDialog } from '@angular/material/dialog';
|
||||||
import { MatPaginator } from '@angular/material/paginator';
|
import { MatPaginator } from '@angular/material/paginator';
|
||||||
import { MatSort } from '@angular/material/sort';
|
import { MatSort } from '@angular/material/sort';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
|
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
||||||
import { DmpService } from '@app/core/services/dmp/dmp.service';
|
import { DmpVersionStatus } from '@app/core/common/enum/dmp-version-status';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
|
||||||
import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants';
|
|
||||||
import { GuidedTourService } from '@app/library/guided-tour/guided-tour.service';
|
|
||||||
// import { IBreadCrumbComponent } from '@app/ui/misc/breadcrumb/definition/IBreadCrumbComponent';
|
|
||||||
// import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
|
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
||||||
|
import { RecentActivityOrder } from '@app/core/common/enum/recent-activity-order';
|
||||||
|
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
|
||||||
import { Description } from '@app/core/model/description/description';
|
import { Description } from '@app/core/model/description/description';
|
||||||
import { DescriptionTemplatesInSection, DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
import { DescriptionTemplatesInSection, DmpBlueprint, DmpBlueprintDefinition, DmpBlueprintDefinitionSection } from '@app/core/model/dmp-blueprint/dmp-blueprint';
|
||||||
import { Dmp, DmpDescriptionTemplate, DmpUser } from '@app/core/model/dmp/dmp';
|
import { Dmp, DmpDescriptionTemplate, DmpUser } from '@app/core/model/dmp/dmp';
|
||||||
|
import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
||||||
|
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
||||||
|
import { Reference } from '@app/core/model/reference/reference';
|
||||||
import { DmpLookup } from '@app/core/query/dmp.lookup';
|
import { DmpLookup } from '@app/core/query/dmp.lookup';
|
||||||
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
|
import { DmpService } from '@app/core/services/dmp/dmp.service';
|
||||||
|
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
|
import { GuidedTour, Orientation } from '@app/library/guided-tour/guided-tour.constants';
|
||||||
|
import { GuidedTourService } from '@app/library/guided-tour/guided-tour.service';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
|
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
|
import { SortDirection } from '@common/modules/hybrid-listing/hybrid-listing.component';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { NgDialogAnimationService } from "ng-dialog-animation";
|
import { NgDialogAnimationService } from "ng-dialog-animation";
|
||||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { DmpVersionStatus } from '@app/core/common/enum/dmp-version-status';
|
|
||||||
import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
|
||||||
import { Reference } from '@app/core/model/reference/reference';
|
|
||||||
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
|
||||||
import { AppPermission } from '@app/core/common/enum/permission.enum';
|
|
||||||
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
|
||||||
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
|
||||||
import { SortDirection } from '@common/modules/hybrid-listing/hybrid-listing.component';
|
|
||||||
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
|
||||||
import { DescriptionTemplate } from '@app/core/model/description-template/description-template';
|
|
||||||
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dmp-listing-component',
|
selector: 'app-dmp-listing-component',
|
||||||
templateUrl: 'dmp-listing.component.html',
|
templateUrl: 'dmp-listing.component.html',
|
||||||
styleUrls: ['./dmp-listing.component.scss'],
|
styleUrls: ['./dmp-listing.component.scss'],
|
||||||
})
|
})
|
||||||
export class DmpListingComponent extends BaseComponent implements OnInit { //IBreadCrumbComponent
|
export class DmpListingComponent extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
@ViewChild(MatPaginator, { static: true }) _paginator: MatPaginator;
|
@ViewChild(MatPaginator, { static: true }) _paginator: MatPaginator;
|
||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
@ -234,10 +232,6 @@ export class DmpListingComponent extends BaseComponent implements OnInit { //IBr
|
||||||
[nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.hasTemplates)].join('.'),
|
[nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.hasTemplates)].join('.'),
|
||||||
[nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.descriptionTemplates), nameof<DescriptionTemplatesInSection>(x => x.descriptionTemplateGroupId)].join('.'),
|
[nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.descriptionTemplates), nameof<DescriptionTemplatesInSection>(x => x.descriptionTemplateGroupId)].join('.'),
|
||||||
|
|
||||||
// [nameof<Description>(x => x.descriptionTemplate), nameof<DescriptionTemplate>(x => x.label)].join('.'),
|
|
||||||
// [nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.id)].join('.'),
|
|
||||||
// [nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.label)].join('.'),
|
|
||||||
// [nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.accessType)].join('.'),
|
|
||||||
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
||||||
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
||||||
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
||||||
|
@ -254,7 +248,6 @@ export class DmpListingComponent extends BaseComponent implements OnInit { //IBr
|
||||||
[nameof<Dmp>(x => x.dmpDescriptionTemplates), nameof<DmpDescriptionTemplate>(x => x.descriptionTemplateGroupId)].join('.'),
|
[nameof<Dmp>(x => x.dmpDescriptionTemplates), nameof<DmpDescriptionTemplate>(x => x.descriptionTemplateGroupId)].join('.'),
|
||||||
[nameof<Dmp>(x => x.dmpDescriptionTemplates), nameof<DmpDescriptionTemplate>(x => x.isActive)].join('.'),
|
[nameof<Dmp>(x => x.dmpDescriptionTemplates), nameof<DmpDescriptionTemplate>(x => x.isActive)].join('.'),
|
||||||
|
|
||||||
// [nameof<Dmp>(x => x.dmpReferences), nameof<DmpReference>(x => x.reference), nameof<Reference>(x => x.reference)].join('.'),
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -286,7 +279,6 @@ export class DmpListingComponent extends BaseComponent implements OnInit { //IBr
|
||||||
x.dmpUsers = x.dmpUsers.filter(x => x.isActive === IsActive.Active);
|
x.dmpUsers = x.dmpUsers.filter(x => x.isActive === IsActive.Active);
|
||||||
this.listingItems.push(x);
|
this.listingItems.push(x);
|
||||||
})
|
})
|
||||||
// this.listingItems.push(...result.items);
|
|
||||||
this.hasListingItems = true;
|
this.hasListingItems = true;
|
||||||
},
|
},
|
||||||
error => this.httpErrorHandlingService.handleBackedRequestError(error));
|
error => this.httpErrorHandlingService.handleBackedRequestError(error));
|
||||||
|
@ -303,92 +295,12 @@ export class DmpListingComponent extends BaseComponent implements OnInit { //IBr
|
||||||
|
|
||||||
openShareDialog(rowId: any, rowName: any) {
|
openShareDialog(rowId: any, rowName: any) {
|
||||||
//TODO: add this
|
//TODO: add this
|
||||||
// const dialogRef = this.dialog.open(DmpInvitationDialogComponent, {
|
|
||||||
// autoFocus: false,
|
|
||||||
// data: {
|
|
||||||
// dmpId: rowId,
|
|
||||||
// dmpName: rowName
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
openFiltersDialog(): void {
|
openFiltersDialog(): void {
|
||||||
//TODO: Add filters dialog
|
//TODO: Add filters dialog
|
||||||
// const dialogRef = this.dialog.open(DmpCriteriaDialogComponent, {
|
|
||||||
// width: '456px',
|
|
||||||
// height: '100%',
|
|
||||||
// id: 'filters',
|
|
||||||
// restoreFocus: false,
|
|
||||||
// data: {
|
|
||||||
// showGrant: this.showGrant,
|
|
||||||
// isPublic: this.isPublic,
|
|
||||||
// criteria: this.criteria,
|
|
||||||
// formGroup: this.criteriaFormGroup,
|
|
||||||
// // criteria: this.grantId ? this.criteria : this.getDefaultCriteria(),
|
|
||||||
// updateDataFn: this.updateDataFn.bind(this)
|
|
||||||
// },
|
|
||||||
// position: { right: '0px;' },
|
|
||||||
// panelClass: 'dialog-side-panel',
|
|
||||||
// // may remove NgDialogAnimationService package
|
|
||||||
// // animation: {
|
|
||||||
// // to: "left",
|
|
||||||
// // incomingOptions: {
|
|
||||||
// // keyframeAnimationOptions: { duration: 300, easing: "ease-in-out" }
|
|
||||||
// // }
|
|
||||||
// // }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// dialogRef.afterClosed().subscribe(result => {
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// updateDataFn(criteria: DmpCriteriaComponent): void {
|
|
||||||
// this.criteriaFormGroup = criteria.formGroup;
|
|
||||||
// this.toDmpCriteria(criteria);
|
|
||||||
// this.refresh();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// toDmpCriteria(criteria: DmpCriteriaComponent): void {
|
|
||||||
// let formGroup = criteria.formGroup;
|
|
||||||
// this.criteria = {
|
|
||||||
// like: formGroup.get('like').value,
|
|
||||||
// grants: formGroup.get('grants').value,
|
|
||||||
// role: formGroup.get('role').value
|
|
||||||
// }
|
|
||||||
// this.criteria.status = formGroup.get('status').value;
|
|
||||||
// this.setPublicCriteria(formGroup);
|
|
||||||
// if (formGroup.get('datasetTemplates').value)
|
|
||||||
// this.criteria.datasetTemplates = formGroup.get('datasetTemplates').value.map(x => x.id);
|
|
||||||
// if (formGroup.get('collaborators').value)
|
|
||||||
// this.criteria.collaborators = formGroup.get('collaborators').value.map(x => x.id);
|
|
||||||
// if (formGroup.get('organisations').value)
|
|
||||||
// this.criteria.organisations = formGroup.get('organisations').value.map(x => x.id);
|
|
||||||
// if (this.itemId) {
|
|
||||||
// this.criteria.groupIds = [this.itemId];
|
|
||||||
// this.criteria.allVersions = true;
|
|
||||||
// }
|
|
||||||
// this.criteria.grantStatus = formGroup.get('grantStatus').value;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// setPublicCriteria(formGroup?: UntypedFormGroup): void {
|
|
||||||
// if (!isNullOrUndefined(formGroup)) {
|
|
||||||
// if (formGroup.get('status').value == 2) {
|
|
||||||
// this.criteria.status = 1;
|
|
||||||
// this.criteria.isPublic = true;
|
|
||||||
// } else {
|
|
||||||
// this.criteria.isPublic = false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.criteria.onlyPublic = this.isPublic;
|
|
||||||
// if (this.isPublic) {
|
|
||||||
// this.criteria.isPublic = true;
|
|
||||||
// }
|
|
||||||
// // } else {
|
|
||||||
// // this.criteria.isPublic = false;
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
|
|
||||||
hasScrollbar(): boolean {
|
hasScrollbar(): boolean {
|
||||||
return document.getElementById("main-page").scrollHeight > document.documentElement.clientHeight
|
return document.getElementById("main-page").scrollHeight > document.documentElement.clientHeight
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,10 @@
|
||||||
|
import { Location } from '@angular/common';
|
||||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||||
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
|
||||||
import { DmpService } from '@app/core/services/dmp/dmp.service';
|
|
||||||
import {
|
|
||||||
SnackBarNotificationLevel,
|
|
||||||
UiNotificationService
|
|
||||||
} from '@app/core/services/notification/ui-notification-service';
|
|
||||||
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
|
||||||
// import {BreadcrumbItem} from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
|
|
||||||
import { Location } from '@angular/common';
|
|
||||||
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
||||||
import { DmpAccessType } from '@app/core/common/enum/dmp-access-type';
|
import { DmpAccessType } from '@app/core/common/enum/dmp-access-type';
|
||||||
|
import { DmpStatus } from '@app/core/common/enum/dmp-status';
|
||||||
import { DmpUserRole } from '@app/core/common/enum/dmp-user-role';
|
import { DmpUserRole } from '@app/core/common/enum/dmp-user-role';
|
||||||
import { DmpVersionStatus } from '@app/core/common/enum/dmp-version-status';
|
import { DmpVersionStatus } from '@app/core/common/enum/dmp-version-status';
|
||||||
import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type';
|
import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type';
|
||||||
|
@ -27,18 +19,29 @@ import { DmpReference } from '@app/core/model/dmp/dmp-reference';
|
||||||
import { EntityDoi } from '@app/core/model/entity-doi/entity-doi';
|
import { EntityDoi } from '@app/core/model/entity-doi/entity-doi';
|
||||||
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
import { ReferenceType } from '@app/core/model/reference-type/reference-type';
|
||||||
import { Reference } from '@app/core/model/reference/reference';
|
import { Reference } from '@app/core/model/reference/reference';
|
||||||
|
import { User } from '@app/core/model/user/user';
|
||||||
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
import { DepositService } from '@app/core/services/deposit/deposit.service';
|
import { DepositService } from '@app/core/services/deposit/deposit.service';
|
||||||
import { DmpBlueprintService } from '@app/core/services/dmp/dmp-blueprint.service';
|
import { DmpBlueprintService } from '@app/core/services/dmp/dmp-blueprint.service';
|
||||||
|
import { DmpService } from '@app/core/services/dmp/dmp.service';
|
||||||
import { FileTransformerService } from '@app/core/services/file-transformer/file-transformer.service';
|
import { FileTransformerService } from '@app/core/services/file-transformer/file-transformer.service';
|
||||||
import { LockService } from '@app/core/services/lock/lock.service';
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
|
import {
|
||||||
|
SnackBarNotificationLevel,
|
||||||
|
UiNotificationService
|
||||||
|
} from '@app/core/services/notification/ui-notification-service';
|
||||||
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
|
import { ReferenceTypeService } from '@app/core/services/reference-type/reference-type.service';
|
||||||
import { ReferenceService } from '@app/core/services/reference/reference.service';
|
import { ReferenceService } from '@app/core/services/reference/reference.service';
|
||||||
|
import { UserService } from '@app/core/services/user/user.service';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
import { FileUtils } from '@app/core/services/utilities/file-utils.service';
|
||||||
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component';
|
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component';
|
||||||
|
import { BreadcrumbService } from '@app/ui/misc/breadcrumb/breadcrumb.service';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
|
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
||||||
|
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { map, takeUntil } from 'rxjs/operators';
|
import { map, takeUntil } from 'rxjs/operators';
|
||||||
|
@ -49,11 +52,6 @@ import { DmpEditorResolver } from '../dmp-editor-blueprint/dmp-editor.resolver';
|
||||||
import { DmpFinalizeDialogComponent, DmpFinalizeDialogOutput } from '../dmp-finalize-dialog/dmp-finalize-dialog.component';
|
import { DmpFinalizeDialogComponent, DmpFinalizeDialogOutput } from '../dmp-finalize-dialog/dmp-finalize-dialog.component';
|
||||||
import { DmpInvitationDialogComponent } from '../invitation/dialog/dmp-invitation-dialog.component';
|
import { DmpInvitationDialogComponent } from '../invitation/dialog/dmp-invitation-dialog.component';
|
||||||
import { NewVersionDmpDialogComponent } from '../new-version-dialog/dmp-new-version-dialog.component';
|
import { NewVersionDmpDialogComponent } from '../new-version-dialog/dmp-new-version-dialog.component';
|
||||||
import { BreadcrumbService } from '@app/ui/misc/breadcrumb/breadcrumb.service';
|
|
||||||
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
|
||||||
import { User } from '@app/core/model/user/user';
|
|
||||||
import { UserService } from '@app/core/services/user/user.service';
|
|
||||||
import { Observable, of } from 'rxjs';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dmp-overview',
|
selector: 'app-dmp-overview',
|
||||||
|
@ -70,8 +68,6 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
isFinalized = false;
|
isFinalized = false;
|
||||||
isPublicView = true;
|
isPublicView = true;
|
||||||
hasPublishButton: boolean = true;
|
hasPublishButton: boolean = true;
|
||||||
// breadCrumbs: Observable<BreadcrumbItem[]> = observableOf();
|
|
||||||
// isUserOwner: boolean;
|
|
||||||
isLocked: Boolean;
|
isLocked: Boolean;
|
||||||
textMessage: any;
|
textMessage: any;
|
||||||
selectedModel: EntityDoi;
|
selectedModel: EntityDoi;
|
||||||
|
@ -324,90 +320,6 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// private checkForGrant(blueprint: DmpBlueprintDefinition) {
|
|
||||||
// let hasGrant = false;
|
|
||||||
// blueprint.sections.forEach(section => section.fields.forEach(
|
|
||||||
// field => {
|
|
||||||
// if (field.category as unknown === DmpBlueprintFieldCategory.System && field.systemFieldType === DmpBlueprintSystemFieldType.GRANT) {
|
|
||||||
// hasGrant = true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// ));
|
|
||||||
// if (!hasGrant) {
|
|
||||||
// this.formGroup.removeControl('grant');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private checkForFunder(blueprint: DmpBlueprintDefinition) {
|
|
||||||
// let hasFunder = false;
|
|
||||||
// blueprint.sections.forEach(section => section.fields.forEach(
|
|
||||||
// field => {
|
|
||||||
// if (field.category as unknown === DmpBlueprintFieldCategory.System && field.systemFieldType === DmpBlueprintSystemFieldType.FUNDER) {
|
|
||||||
// hasFunder = true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// ));
|
|
||||||
// if (!hasFunder) {
|
|
||||||
// this.formGroup.removeControl('funder');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// private checkForProject(blueprint: DmpBlueprintDefinition) {
|
|
||||||
// let hasProject = false;
|
|
||||||
// blueprint.sections.forEach(section => section.fields.forEach(
|
|
||||||
// field => {
|
|
||||||
// if (field.category as unknown === DmpBlueprintFieldCategory.System && field.systemFieldType === DmpBlueprintSystemFieldType.PROJECT) {
|
|
||||||
// hasProject = true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// ));
|
|
||||||
// if (!hasProject) {
|
|
||||||
// this.formGroup.removeControl('project');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// openCloneDialog(isNewVersion: boolean) {
|
|
||||||
// const dialogRef = this.dialog.open(CloneDialogComponent, {
|
|
||||||
// maxWidth: '900px',
|
|
||||||
// maxHeight: '80vh',
|
|
||||||
// data: {
|
|
||||||
// formGroup: this.formGroup,
|
|
||||||
// descriptions: this.dmp.descriptions,
|
|
||||||
// isNewVersion: isNewVersion,
|
|
||||||
// confirmButton: this.language.instant('DMP-EDITOR.CLONE-DIALOG.SAVE'),
|
|
||||||
// cancelButton: this.language.instant('DMP-EDITOR.CLONE-DIALOG.CANCEL'),
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
|
||||||
// if (result) {
|
|
||||||
// if (!isNewVersion) {
|
|
||||||
// this.dmpService.clone(this.formGroup.getRawValue(), this.dmp.id)
|
|
||||||
// .pipe(takeUntil(this._destroyed))
|
|
||||||
// .subscribe(
|
|
||||||
// complete => this.onCallbackSuccess(complete),
|
|
||||||
// error => this.onCallbackError(error)
|
|
||||||
// );
|
|
||||||
// } else if (isNewVersion) {
|
|
||||||
// this.dmpService.newVersion(this.formGroup.getRawValue(), this.dmp.id)
|
|
||||||
// .pipe(takeUntil(this._destroyed))
|
|
||||||
// .subscribe(
|
|
||||||
// complete => this.onCallbackSuccess(complete),
|
|
||||||
// error => this.onCallbackError(error)
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// onCallbackSuccess(dmpId: String): void {
|
|
||||||
// this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
|
|
||||||
// this.router.navigate(['/plans/edit/', dmpId]);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// onCallbackError(error: any) {
|
|
||||||
// this.uiNotificationService.snackBarNotification(error.error.message ? error.error.message : this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Error);
|
|
||||||
// }
|
|
||||||
|
|
||||||
deleteClicked() {
|
deleteClicked() {
|
||||||
let dialogRef: any;
|
let dialogRef: any;
|
||||||
if (this.dmp.descriptions && this.dmp.descriptions.length > 0) {
|
if (this.dmp.descriptions && this.dmp.descriptions.length > 0) {
|
||||||
|
@ -520,38 +432,6 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// private checkIfAnyProfileIsUsedLessThanMin(dmp: Dmp): Observable<boolean> {
|
|
||||||
// const blueprintId = dmp.profile.id;
|
|
||||||
// return this.dmpBlueprintService.getSingle(Guid.parse(blueprintId))
|
|
||||||
// .pipe(map(result => {
|
|
||||||
// return result.definition.sections.some(section => {
|
|
||||||
// if (!section.hasTemplates)
|
|
||||||
// return false;
|
|
||||||
// return section.descriptionTemplates.some(template => {
|
|
||||||
// if (!(template.minMultiplicity > 0))
|
|
||||||
// return false;
|
|
||||||
// let count = 0;
|
|
||||||
// dmp.descriptions.filter(description => description.dmpSectionIndex === (section.ordinal - 1)).forEach(description => {
|
|
||||||
// if (Guid.parse(description.profile.id) === template.descriptionTemplateId) {
|
|
||||||
// count++;
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// if (count < template.minMultiplicity) {
|
|
||||||
// this.dialog.open(PopupNotificationDialogComponent, {
|
|
||||||
// data: {
|
|
||||||
// title: this.language.instant('DMP-OVERVIEW.MIN-DESCRIPTIONS-DIALOG.TITLE', { 'minMultiplicity': template.minMultiplicity }),
|
|
||||||
// message: this.language.instant('DMP-OVERVIEW.MIN-DESCRIPTIONS-DIALOG.MESSAGE',)
|
|
||||||
// }, maxWidth: '30em'
|
|
||||||
// });
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// return false;
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// }), takeUntil(this._destroyed));
|
|
||||||
// }
|
|
||||||
|
|
||||||
public isAuthenticated(): boolean {
|
public isAuthenticated(): boolean {
|
||||||
return this.authentication.currentAccountIsAuthenticated();
|
return this.authentication.currentAccountIsAuthenticated();
|
||||||
}
|
}
|
||||||
|
@ -630,16 +510,6 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// updateUsers() {
|
|
||||||
// return this.dmpService.updateUsers(this.dmp.id, this.dmp.users).pipe(takeUntil(this._destroyed))
|
|
||||||
// .subscribe(
|
|
||||||
// complete => {
|
|
||||||
// this.onUpdateCallbackSuccess();
|
|
||||||
// },
|
|
||||||
// error => this.onUpdateCallbackError(error)
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
removeUserFromDmp(dmpUser: DmpUser) {
|
removeUserFromDmp(dmpUser: DmpUser) {
|
||||||
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -229,21 +229,6 @@ export class NavbarComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// getTitle() {
|
|
||||||
// var titlee = this.location.prepareExternalUrl(this.location.path());
|
|
||||||
// if (titlee.charAt(0) === '#') {
|
|
||||||
// titlee = titlee.slice(2);
|
|
||||||
// }
|
|
||||||
// titlee = titlee.split('/').pop();
|
|
||||||
|
|
||||||
// for (var item = 0; item < this.listTitles.length; item++) {
|
|
||||||
// if (this.listTitles[item].path === titlee) {
|
|
||||||
// return this.listTitles[item].title;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return 'Dashboard';
|
|
||||||
// }
|
|
||||||
|
|
||||||
public getCurrentLanguage(): any {
|
public getCurrentLanguage(): any {
|
||||||
const lang = this.languages.find(lang => lang.value === this.languageService.getCurrentLanguage());
|
const lang = this.languages.find(lang => lang.value === this.languageService.getCurrentLanguage());
|
||||||
return lang;
|
return lang;
|
||||||
|
|
|
@ -113,13 +113,6 @@ export class ReferenceFieldComponent extends BaseComponent implements OnInit, On
|
||||||
} else {
|
} else {
|
||||||
this.referenceToUse = referenceToUse;
|
this.referenceToUse = referenceToUse;
|
||||||
}
|
}
|
||||||
// if (this.referenceToUseInitialized && (!referenceToUse.map(x => x.reference).every(x => this.referenceToUse.map(y => y.reference).includes(x)) ||
|
|
||||||
// !this.referenceToUse.map(x => x.reference).every(x => referenceToUse.map(y => y.reference).includes(x)))) {
|
|
||||||
// this.form.setValue(null, {onlySelf: true, emitEvent: false});
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.referenceToUse = referenceToUse;
|
|
||||||
// this.referenceToUseInitialized = true;
|
|
||||||
|
|
||||||
if (this.multiple) {
|
if (this.multiple) {
|
||||||
this.multipleAutoCompleteSearchConfiguration = this.referenceService.getMultipleAutoCompleteSearchConfiguration(this.referenceType.id, this.referenceToUse);
|
this.multipleAutoCompleteSearchConfiguration = this.referenceService.getMultipleAutoCompleteSearchConfiguration(this.referenceType.id, this.referenceToUse);
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { DomSanitizer } from '@angular/platform-browser';
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-splash',
|
selector: 'app-splash',
|
||||||
|
@ -23,22 +22,8 @@ export class SplashComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// this.httpClient.get(this.configurationService.splashPath, {responseType: "text"})
|
|
||||||
// .pipe(takeUntil(this._destroyed)).subscribe(response => {
|
|
||||||
// const blob = new Blob([response], { type: 'text/html' });
|
|
||||||
// this.readBlob(blob);
|
|
||||||
// });
|
|
||||||
// this.splashHTML = this.sanitizer.bypassSecurityTrustHtml(`${this.configurationService.app}/${this.configurationService.splashPath}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// readBlob(blob: Blob) {
|
}
|
||||||
// const fr = new FileReader();
|
|
||||||
// fr.onload = ev => {
|
|
||||||
// this.splashHTML = this.sanitizer.bypassSecurityTrustHtml(fr.result as string);
|
|
||||||
// //this.parse();
|
|
||||||
// };
|
|
||||||
// fr.readAsText(blob);
|
|
||||||
// }
|
|
||||||
|
|
||||||
resizeFrame() {
|
resizeFrame() {
|
||||||
const frame: HTMLIFrameElement = (document.getElementById('splash') as HTMLIFrameElement);
|
const frame: HTMLIFrameElement = (document.getElementById('splash') as HTMLIFrameElement);
|
||||||
|
@ -46,7 +31,6 @@ export class SplashComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
getSplashUrl() {
|
getSplashUrl() {
|
||||||
// return this.sanitizer.bypassSecurityTrustHtml(this.configurationService.splashPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { AnalyticsService } from '@app/core/services/matomo/analytics-service';
|
||||||
import { SupportiveMaterialService } from '@app/core/services/supportive-material/supportive-material.service';
|
import { SupportiveMaterialService } from '@app/core/services/supportive-material/supportive-material.service';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { LangChangeEvent, TranslateService } from '@ngx-translate/core';
|
import { LangChangeEvent, TranslateService } from '@ngx-translate/core';
|
||||||
import { interval, Subject } from 'rxjs';
|
import { Subject, interval } from 'rxjs';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -60,16 +60,7 @@ export class UserGuideContentComponent extends BaseComponent implements OnInit {
|
||||||
this.readBlob(blob);
|
this.readBlob(blob);
|
||||||
} else {
|
} else {
|
||||||
this.guideHTMLUrl = this.sanitizer.bypassSecurityTrustResourceUrl((window.URL ? URL : webkitURL).createObjectURL(blob));
|
this.guideHTMLUrl = this.sanitizer.bypassSecurityTrustResourceUrl((window.URL ? URL : webkitURL).createObjectURL(blob));
|
||||||
//GK: In case the app is in localhost (dev/debug build) apply the following transformation
|
|
||||||
// in order to show the user guide's images
|
|
||||||
// if (this.guideHTMLUrl && this.configurationService.app.includes('localhost')) {
|
|
||||||
// interval(1000).pipe(takeUntil(this._transformed)).subscribe(() => this.transform());
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.guideHTML = this.sanitizer.sanitize(SecurityContext.HTML, blob);
|
|
||||||
// this.sanitizedGuideUrl = this.sanitizer.sanitize(SecurityContext.URL, this.guideHTMLUrl);
|
|
||||||
// console.log(this.guideHTMLUrl);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,18 +152,6 @@ export class UserGuideContentComponent extends BaseComponent implements OnInit {
|
||||||
onIFrameLoad(iframe: HTMLIFrameElement) {
|
onIFrameLoad(iframe: HTMLIFrameElement) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// const contentDocument = iframe.contentDocument;
|
|
||||||
// const URI = contentDocument.URL;
|
|
||||||
// const refs = contentDocument.getElementsByTagName('a');
|
|
||||||
// const navLinks:HTMLAnchorElement[] = [];//only navigation links
|
|
||||||
// for(let i =0; i<refs.length;i++){
|
|
||||||
// const ref = refs[i];
|
|
||||||
// if(ref.classList.contains('nav-link')){
|
|
||||||
// navLinks.push(ref);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// navLinks.forEach(a=>a.href = URI+a.hash);
|
|
||||||
|
|
||||||
const images = iframe.contentWindow.document.getElementsByTagName('img');
|
const images = iframe.contentWindow.document.getElementsByTagName('img');
|
||||||
|
|
||||||
for (let i = 0; i < images.length; i++) {
|
for (let i = 0; i < images.length; i++) {
|
||||||
|
@ -181,11 +160,6 @@ export class UserGuideContentComponent extends BaseComponent implements OnInit {
|
||||||
tempDiv.innerHTML = currentImage.outerHTML.trim();
|
tempDiv.innerHTML = currentImage.outerHTML.trim();
|
||||||
currentImage.src = (tempDiv.firstChild as HTMLImageElement).src;
|
currentImage.src = (tempDiv.firstChild as HTMLImageElement).src;
|
||||||
}
|
}
|
||||||
|
|
||||||
// const elem = tempDiv.firstChild as HTMLImageElement;
|
|
||||||
// console.log('eleme', elem);
|
|
||||||
// firstimage.src = elem.src;
|
|
||||||
|
|
||||||
} catch {
|
} catch {
|
||||||
console.warn('Could not find contentDocument');
|
console.warn('Could not find contentDocument');
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,27 +4,26 @@ import { Component, OnInit } from '@angular/core';
|
||||||
import { UntypedFormGroup } from '@angular/forms';
|
import { UntypedFormGroup } from '@angular/forms';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
|
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
|
||||||
|
import { LockTargetType } from '@app/core/common/enum/lock-target-type';
|
||||||
|
import { ResponseErrorCode } from '@app/core/common/enum/respone-error-code';
|
||||||
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
||||||
|
import { LockService } from '@app/core/services/lock/lock.service';
|
||||||
|
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
|
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
||||||
|
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component';
|
||||||
import { BaseEntity } from '@common/base/base-entity.model';
|
import { BaseEntity } from '@common/base/base-entity.model';
|
||||||
import { BasePendingChangesComponent } from '@common/base/base-pending-changes.component';
|
import { BasePendingChangesComponent } from '@common/base/base-pending-changes.component';
|
||||||
import { FormService } from '@common/forms/form-service';
|
import { FormService } from '@common/forms/form-service';
|
||||||
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
import { FilterService } from '@common/modules/text-filter/filter-service';
|
import { FilterService } from '@common/modules/text-filter/filter-service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { interval, Observable } from 'rxjs';
|
import { isNullOrUndefined } from '@swimlane/ngx-datatable';
|
||||||
|
import { Observable, interval } from 'rxjs';
|
||||||
import { takeUntil } from 'rxjs/operators';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
import { nameof } from 'ts-simple-nameof';
|
import { nameof } from 'ts-simple-nameof';
|
||||||
import { Guid } from '../types/guid';
|
import { Guid } from '../types/guid';
|
||||||
import { BaseEditorModel } from './base-form-editor-model';
|
import { BaseEditorModel } from './base-form-editor-model';
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
|
||||||
import { QueryParamsService } from '@app/core/services/utilities/query-params.service';
|
|
||||||
import { LockService } from '@app/core/services/lock/lock.service';
|
|
||||||
import { LockPersist } from '@app/core/model/lock/lock.model';
|
|
||||||
import { LockTargetType } from '@app/core/common/enum/lock-target-type';
|
|
||||||
import { isNullOrUndefined } from '@swimlane/ngx-datatable';
|
|
||||||
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component';
|
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
||||||
import { ResponseErrorCode } from '@app/core/common/enum/respone-error-code';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-base-editor-component',
|
selector: 'app-base-editor-component',
|
||||||
|
@ -145,20 +144,7 @@ export abstract class BaseEditor<EditorModelType extends BaseEditorModel, Entity
|
||||||
this.formService.validateAllFormFields(this.formGroup);
|
this.formService.validateAllFormFields(this.formGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// private refreshOnNavigateToData(id?: Guid): void {
|
|
||||||
// if (this.isNew) {
|
|
||||||
// this.formGroup.markAsPristine();
|
|
||||||
// this.router.navigate([this.formUtilsService.getFormRoute(this.editorModel.type) + '/' + (id ? id : this.editorModel.id)]);
|
|
||||||
// } else { this.internalRefreshData(); }
|
|
||||||
// }
|
|
||||||
|
|
||||||
internalRefreshData(): void {
|
internalRefreshData(): void {
|
||||||
// setTimeout(() => {
|
|
||||||
// this.formGroup = null;
|
|
||||||
// this.editorModel = null;
|
|
||||||
// });
|
|
||||||
this.refreshData();
|
this.refreshData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,14 +80,5 @@ export class FormValidationErrorsDialogComponent {
|
||||||
} else if (formControl.nativeElement.localName === 'app-multiple-auto-complete') {
|
} else if (formControl.nativeElement.localName === 'app-multiple-auto-complete') {
|
||||||
return (Array.from(formControl.nativeElement.firstChild.firstChild.firstChild.children).filter((x: any) => x.localName === 'input')[0] as any).getAttribute('placeholder');
|
return (Array.from(formControl.nativeElement.firstChild.firstChild.firstChild.children).filter((x: any) => x.localName === 'input')[0] as any).getAttribute('placeholder');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Needs to have <mat-label> in <mat-form-field> in html in order to fill results
|
|
||||||
// let result = '';
|
|
||||||
// try {
|
|
||||||
// result = (Array.from(formControl.nativeElement.parentElement.children).filter((x: any) => Array.from(x.classList).includes('mat-form-field-label-wrapper'))[0] as any).innerText;
|
|
||||||
// result = result.replace(' *', '');
|
|
||||||
// } catch (error) { }
|
|
||||||
|
|
||||||
// return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import { JsonInterceptor } from './interceptors/json.interceptor';
|
||||||
import { LocaleInterceptor } from './interceptors/locale.interceptor';
|
import { LocaleInterceptor } from './interceptors/locale.interceptor';
|
||||||
import { ProgressIndicationInterceptor } from './interceptors/progress-indication.interceptor';
|
import { ProgressIndicationInterceptor } from './interceptors/progress-indication.interceptor';
|
||||||
import { RequestTimingInterceptor } from './interceptors/request-timing.interceptor';
|
import { RequestTimingInterceptor } from './interceptors/request-timing.interceptor';
|
||||||
import { ResponsePayloadInterceptor } from './interceptors/response-payload.interceptor';
|
|
||||||
import { UnauthorizedResponseInterceptor } from './interceptors/unauthorized-response.interceptor';
|
import { UnauthorizedResponseInterceptor } from './interceptors/unauthorized-response.interceptor';
|
||||||
import { StatusCodeInterceptor } from './interceptors/status-code.interceptor';
|
import { StatusCodeInterceptor } from './interceptors/status-code.interceptor';
|
||||||
import { TenantHeaderInterceptor } from './interceptors/tenant-header.interceptor';
|
import { TenantHeaderInterceptor } from './interceptors/tenant-header.interceptor';
|
||||||
|
@ -51,11 +50,6 @@ import { TenantHeaderInterceptor } from './interceptors/tenant-header.intercepto
|
||||||
useClass: ProgressIndicationInterceptor,
|
useClass: ProgressIndicationInterceptor,
|
||||||
multi: true,
|
multi: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
provide: HTTP_INTERCEPTORS,
|
|
||||||
useClass: ResponsePayloadInterceptor,
|
|
||||||
multi: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
provide: HTTP_INTERCEPTORS,
|
provide: HTTP_INTERCEPTORS,
|
||||||
useClass: StatusCodeInterceptor,
|
useClass: StatusCodeInterceptor,
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
import { HttpHandler, HttpHeaderResponse, HttpProgressEvent, HttpRequest, HttpResponse, HttpSentEvent, HttpUserEvent } from '@angular/common/http';
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { map } from 'rxjs/operators';
|
|
||||||
import { BaseInterceptor } from './base.interceptor';
|
|
||||||
import { InterceptorType } from './interceptor-type';
|
|
||||||
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class ResponsePayloadInterceptor extends BaseInterceptor {
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private snackBar: MatSnackBar,
|
|
||||||
configurationService: ConfigurationService
|
|
||||||
) { super(configurationService); }
|
|
||||||
|
|
||||||
get type(): InterceptorType { return InterceptorType.ResponsePayload; }
|
|
||||||
|
|
||||||
interceptRequest(req: HttpRequest<any>, next: HttpHandler): Observable<HttpSentEvent | HttpHeaderResponse | HttpProgressEvent | HttpResponse<any> | HttpUserEvent<any>> {
|
|
||||||
|
|
||||||
return next.handle(req).pipe(
|
|
||||||
map(response => {
|
|
||||||
// if (!(response instanceof HttpResponse) || (response instanceof Blob)) { return response; }
|
|
||||||
// if (response.status == 200) {
|
|
||||||
// if (response.body.statusCode === ApiMessageCode.SUCCESS_MESSAGE) {
|
|
||||||
// //throw new Error('Request failed');
|
|
||||||
// // this.snackBar.openFromComponent(SnackBarNotificationComponent, {
|
|
||||||
// // data: { message: response['message'], language: null },
|
|
||||||
// // duration: 3000,
|
|
||||||
// // });
|
|
||||||
// return response.body.payload;
|
|
||||||
|
|
||||||
// } else if (response.body.statusCode === ApiMessageCode.NO_MESSAGE) {
|
|
||||||
// return response.body.payload;
|
|
||||||
// } else {
|
|
||||||
// return response.body.payload;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
return response;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -111,24 +111,7 @@ export class UserSettingsPickerComponent extends BaseComponent implements OnInit
|
||||||
}
|
}
|
||||||
|
|
||||||
renameCurrentUserSetting(): void {
|
renameCurrentUserSetting(): void {
|
||||||
// this.dialog.open<FilterNameDialogComponent, FilterNameDialogComponentParams, FilterNameDialogComponentReturn>(
|
|
||||||
// FilterNameDialogComponent,
|
|
||||||
// {
|
|
||||||
// maxWidth: '600px',
|
|
||||||
// maxHeight: '400px',
|
|
||||||
// restoreFocus: false,
|
|
||||||
// data: { name: this.currentUserSetting.name},
|
|
||||||
// disableClose: false
|
|
||||||
// }
|
|
||||||
// ).afterClosed()
|
|
||||||
// .pipe(
|
|
||||||
// filter(x => !!x),
|
|
||||||
// takeUntil(this._destroyed)
|
|
||||||
// )
|
|
||||||
// .subscribe(newName => {
|
|
||||||
// this.currentUserSetting.name = newName;
|
|
||||||
// this.persistLookupChangesManually(this.currentUserSetting, true);
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
settingDeleted(value: Guid = this.currentUserSetting.id) {
|
settingDeleted(value: Guid = this.currentUserSetting.id) {
|
||||||
|
@ -149,21 +132,10 @@ export class UserSettingsPickerComponent extends BaseComponent implements OnInit
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/* this.userSettingsService.remove(this.currentUserSetting.id, this.key); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
saveFilter() {
|
saveFilter() {
|
||||||
// const saveDialogRef = this.dialog.open(FilterNameDialogComponent, {
|
//TODO: implement
|
||||||
// maxWidth: '600px',
|
|
||||||
// maxHeight: '400px',
|
|
||||||
// restoreFocus: false,
|
|
||||||
// data: { name: this.currentUserSetting ? this.currentUserSetting.name : '' },
|
|
||||||
// disableClose: false
|
|
||||||
// });
|
|
||||||
|
|
||||||
// saveDialogRef.afterClosed().subscribe(result => {
|
|
||||||
// if (result) { this.createNewFilter(result); }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
import { UserSetting, UserSettingsService } from '@app/core/services/user-settings/user-settings.service';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { Lookup } from '@common/model/lookup';
|
import { Lookup } from '@common/model/lookup';
|
||||||
import { takeUntil, filter } from 'rxjs/operators';
|
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
|
||||||
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { isNullOrUndefined } from '@swimlane/ngx-datatable';
|
import { isNullOrUndefined } from '@swimlane/ngx-datatable';
|
||||||
import { UserSetting, UserSettingsService } from '@app/core/services/user-settings/user-settings.service';
|
import { takeUntil } from 'rxjs/operators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-user-settings-selector',
|
selector: 'app-user-settings-selector',
|
||||||
|
@ -87,7 +87,6 @@ export class UserSettingsSelectorComponent extends BaseComponent implements OnIn
|
||||||
if (setting === null) { return; }
|
if (setting === null) { return; }
|
||||||
|
|
||||||
//Persist the active user setting
|
//Persist the active user setting
|
||||||
//this.onSettingSelected.emit(setting.value);
|
|
||||||
this.userSettingsService.set(setting, true, this.key);
|
this.userSettingsService.set(setting, true, this.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,21 +108,10 @@ export class UserSettingsSelectorComponent extends BaseComponent implements OnIn
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/* this.userSettingsService.remove(this.currentUserSetting.id, this.key); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
saveFilter() {
|
saveFilter() {
|
||||||
// const saveDialogRef = this.dialog.open(FilterNameDialogComponent, {
|
//TODO: implement
|
||||||
// maxWidth: '600px',
|
|
||||||
// maxHeight: '400px',
|
|
||||||
// restoreFocus: false,
|
|
||||||
// data: { name: this.currentUserSetting ? this.currentUserSetting.name : '' },
|
|
||||||
// disableClose: false
|
|
||||||
// });
|
|
||||||
|
|
||||||
// saveDialogRef.afterClosed().subscribe(result => {
|
|
||||||
// if (result) { this.createNewFilter(result); }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateFilter() {
|
updateFilter() {
|
||||||
|
|
|
@ -1,23 +1,22 @@
|
||||||
import { HttpErrorResponse } from '@angular/common/http';
|
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
|
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
|
||||||
|
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
||||||
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
||||||
|
import { LoggingService } from '@app/core/services/logging/logging-service';
|
||||||
|
import { UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
||||||
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { BaseComponent } from '@common/base/base.component';
|
import { BaseComponent } from '@common/base/base.component';
|
||||||
import { FormService } from '@common/forms/form-service';
|
import { FormService } from '@common/forms/form-service';
|
||||||
import { LoggingService } from '@app/core/services/logging/logging-service';
|
|
||||||
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
|
||||||
import { HttpError, HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { IsActive } from '@app/core/common/enum/is-active.enum';
|
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
|
||||||
import { map, takeUntil } from 'rxjs/operators';
|
|
||||||
import { nameof } from 'ts-simple-nameof';
|
|
||||||
import { AuthService } from '@app/core/services/auth/auth.service';
|
|
||||||
import { InAppNotificationService } from '@notification-service/services/http/inapp-notification.service';
|
|
||||||
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
|
|
||||||
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
import { NotificationInAppTracking } from '@notification-service/core/enum/notification-inapp-tracking.enum';
|
||||||
import { InAppNotification } from '@notification-service/core/model/inapp-notification.model';
|
import { InAppNotification } from '@notification-service/core/model/inapp-notification.model';
|
||||||
|
import { InAppNotificationService } from '@notification-service/services/http/inapp-notification.service';
|
||||||
|
import { map, takeUntil } from 'rxjs/operators';
|
||||||
|
import { nameof } from 'ts-simple-nameof';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-inapp-notification-editor',
|
selector: 'app-inapp-notification-editor',
|
||||||
|
@ -89,7 +88,6 @@ export class InAppNotificationEditorComponent extends BaseComponent implements O
|
||||||
complete => this.onCallbackSuccess(),
|
complete => this.onCallbackSuccess(),
|
||||||
error => this.httpErrorHandlingService.handleBackedRequestError(error)
|
error => this.httpErrorHandlingService.handleBackedRequestError(error)
|
||||||
);
|
);
|
||||||
// this.clearErrorModel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public delete() {
|
public delete() {
|
||||||
|
|
|
@ -2,8 +2,6 @@ import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonFormsModule } from '@common/forms/common-forms.module';
|
import { CommonFormsModule } from '@common/forms/common-forms.module';
|
||||||
import { CommonUiModule } from '@common/ui/common-ui.module';
|
import { CommonUiModule } from '@common/ui/common-ui.module';
|
||||||
import { CoreNotificationServiceModule } from '@notification-service/services/core-service.module';
|
|
||||||
// import { TotpModule } from '@idp-service/ui/totp/totp.module';
|
|
||||||
import { UserProfileNotifierListEditorComponent } from '@notification-service/ui/user-profile/notifier-list/user-profile-notifier-list-editor.component';
|
import { UserProfileNotifierListEditorComponent } from '@notification-service/ui/user-profile/notifier-list/user-profile-notifier-list-editor.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -149,21 +149,6 @@ $mat-dark-theme: mat.m2-define-dark-theme((color: (primary: $mat-dark-theme-prim
|
||||||
filter: alpha(opacity=20);
|
filter: alpha(opacity=20);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Custom Theme
|
|
||||||
// @import "./assets/scss/blue-theme.scss";
|
|
||||||
|
|
||||||
// Define a theme.
|
|
||||||
// $primary: mat-palette($app-blue-theme-primary-palette);
|
|
||||||
// $accent: mat-palette($mat-pink, A200, A100, A400);
|
|
||||||
// $theme: mat-light-theme($primary, $accent);
|
|
||||||
|
|
||||||
// Include all theme styles for the components.
|
|
||||||
// @include angular-material-theme($theme);
|
|
||||||
// @include covalent-theme($theme);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.cc-btn {
|
.cc-btn {
|
||||||
background-color: var(--primary-color-3) !important;
|
background-color: var(--primary-color-3) !important;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +171,6 @@ $mat-dark-theme: mat.m2-define-dark-theme((color: (primary: $mat-dark-theme-prim
|
||||||
.lightblue-btn {
|
.lightblue-btn {
|
||||||
background-color: var(--primary-color) !important;
|
background-color: var(--primary-color) !important;
|
||||||
color: white !important;
|
color: white !important;
|
||||||
// background-color: rgba(0, 112, 192, 1) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.listing-item {
|
.listing-item {
|
||||||
|
@ -211,7 +195,6 @@ $mat-dark-theme: mat.m2-define-dark-theme((color: (primary: $mat-dark-theme-prim
|
||||||
padding: 0.1em 1em;
|
padding: 0.1em 1em;
|
||||||
border-radius: 10em;
|
border-radius: 10em;
|
||||||
background-color: #0d7489;
|
background-color: #0d7489;
|
||||||
// background-color: rgba(0, 112, 192, 1);
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
@ -227,8 +210,6 @@ $mat-dark-theme: mat.m2-define-dark-theme((color: (primary: $mat-dark-theme-prim
|
||||||
border-radius: 10em;
|
border-radius: 10em;
|
||||||
background-color: rgb(236, 241, 249);
|
background-color: rgb(236, 241, 249);
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
// color: rgba(0, 112, 192, 1);
|
|
||||||
// color: rgb(68, 114, 196);
|
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
max-width: 160px;
|
max-width: 160px;
|
||||||
|
@ -274,21 +255,6 @@ $mat-dark-theme: mat.m2-define-dark-theme((color: (primary: $mat-dark-theme-prim
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// .draft-bookmark {
|
|
||||||
// color: #e7e6e6;
|
|
||||||
// display: inline;
|
|
||||||
// position: absolute;
|
|
||||||
// padding-top: 3px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// .finalized-bookmark {
|
|
||||||
// color: #08bd63;
|
|
||||||
// // color: #92d050;
|
|
||||||
// display: inline;
|
|
||||||
// position: absolute;
|
|
||||||
// padding-top: 3px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
h4 span {
|
h4 span {
|
||||||
color: #089dbb;
|
color: #089dbb;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
@ -387,43 +353,6 @@ $mat-dark-theme: mat.m2-define-dark-theme((color: (primary: $mat-dark-theme-prim
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
//.angular-editor-textarea {
|
|
||||||
// min-height: 150px !important;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.editor-wrapper {
|
|
||||||
// border: 1px solid transparent !important;
|
|
||||||
// border-radius: 5px;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.angular-editor-toolbar {
|
|
||||||
// margin-left: 1px;
|
|
||||||
// margin-right: 1px;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.angular-editor-textarea, .angular-editor-toolbar {
|
|
||||||
// border: none !important;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.angular-editor {
|
|
||||||
// border: 1px solid #ddd !important;
|
|
||||||
// border-radius: 5px;
|
|
||||||
// background-color: #fff;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.editor-wrapper:hover, .angular-editor:hover {
|
|
||||||
// border: 1px solid #000 !important;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.editor-wrapper:focus-within, .angular-editor:focus-within {
|
|
||||||
// border: 1px solid #034459 !important;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.required.editor-wrapper, .required .editor .angular-editor {
|
|
||||||
// border: 1px solid #f44336 !important;
|
|
||||||
//}
|
|
||||||
// end of CSS for <angular-editor> (@kolkov/angular-editor)
|
|
||||||
|
|
||||||
/* Transition Group */
|
/* Transition Group */
|
||||||
.list-move {
|
.list-move {
|
||||||
transition: transform 1s;
|
transition: transform 1s;
|
||||||
|
|
Loading…
Reference in New Issue