diff --git a/dmp-frontend/src/app/ui/dataset/overview/dataset-overview.component.scss b/dmp-frontend/src/app/ui/dataset/overview/dataset-overview.component.scss index d3d816948..e27c1ad3b 100644 --- a/dmp-frontend/src/app/ui/dataset/overview/dataset-overview.component.scss +++ b/dmp-frontend/src/app/ui/dataset/overview/dataset-overview.component.scss @@ -13,20 +13,22 @@ width: 2.5em; height: 2.5em; color: #212121; - background-color: #F7DD72; + background-color: #f7dd72; } -.mat-mini-fab-icon, .status-icon { +.mat-mini-fab-icon, +.status-icon { font-size: 1.2em; } -.actions-btn:hover { - background-color: #129D99; - color: #FFFFFF; +.actions-btn:hover, +.finalize-btn:hover { + background-color: #129d99; + color: #ffffff; } .status-icon { - color: #A7A7A7; + color: #a7a7a7; } .check-icon { @@ -48,7 +50,7 @@ } .id-btn { - background: url('../../../../assets/images/NoPath.png') no-repeat center; + background: url("../../../../assets/images/NoPath.png") no-repeat center; width: 1em; margin-right: 0.3em; align-self: center; @@ -57,14 +59,15 @@ .dmp-btn { width: 35em; min-height: 2.3em; - background-color: #129D99; + background-color: #129d99; border-radius: 4px; flex-direction: row; justify-content: space-between; border: none; } -.dmp-btn, .dmp-btn > mat-icon { +.dmp-btn, +.dmp-btn > mat-icon { color: #ffffff; opacity: 0.8; } @@ -73,22 +76,23 @@ width: 31.6em; padding: 0 1em; background-color: #ffffff00; - color: #129D99; + color: #129d99; font-weight: 700; } .frame-btn { border: 1px solid #212121; color: black; - background: #FFFFFF; + background: #ffffff; } .finalize-btn { - border: 1px solid #F7DD72; - background: #F5DB71; + // border: 1px solid #F7DD72; + background: #f5db71; } -.frame-btn, .finalize-btn { +.frame-btn, +.finalize-btn { box-shadow: 0px 2px 6px #00000029; } @@ -100,18 +104,18 @@ margin-left: auto; } -.invite-btn{ +.invite-btn { width: 9.4em; height: 2.9em; - background: #FFFFFF; - box-shadow: 0px 3px 6px #1E202029; + background: #ffffff; + box-shadow: 0px 3px 6px #1e202029; border: 2px solid #212121; border-radius: 30px; } .account_btn { background: white; - color: #D5D5D5; + color: #d5d5d5; border: none; height: 2.9em; } @@ -121,7 +125,7 @@ .dataset-logo { width: 6em; height: 2.6em; - background: #F7DD72; + background: #f7dd72; border-radius: 4px; font-size: 0.875em; // color: #212121; @@ -137,7 +141,8 @@ font-size: 1em; } -.label-txt, .label2-txt { +.label-txt, +.label2-txt { color: #848484; font-weight: 400; } @@ -155,7 +160,7 @@ font-size: 0.875em; color: #008887; padding-right: 0.5em; - align-self: center;; + align-self: center; } .header { @@ -164,7 +169,8 @@ margin-bottom: 0.5em; } -.dataset-label, .header { +.dataset-label, +.header { font-size: 1.25em; color: #212121; } @@ -179,7 +185,7 @@ .dmp-btn-label { margin-right: 1em; overflow: hidden; - color: #FFFFFF; + color: #ffffff; opacity: 0.8; text-align: left; } @@ -194,7 +200,7 @@ .doi-txt { font-size: 0.8em; letter-spacing: 0.009em; - color: #7D7D7D; + color: #7d7d7d; width: 12em; height: 1em; overflow: hidden; @@ -204,8 +210,8 @@ .doi-panel { height: 3.5em; - background: #FAFAFA; - border: 1px solid #D1D1D1; + background: #fafafa; + border: 1px solid #d1d1d1; border-radius: 4px; flex-direction: row; justify-content: space-between; @@ -216,7 +222,7 @@ } .frame { - background: #FFFFFF; + background: #ffffff; box-shadow: 0px 1px 5px #00000026; border-radius: 4px; overflow: hidden; @@ -226,7 +232,8 @@ color: #000000; } -.frame-txt, .finalize-txt { +.frame-txt, +.finalize-txt { font-size: 0.75em; font-weight: bold; letter-spacing: 0px; @@ -235,7 +242,7 @@ } .hr-line { - border: 1px solid #DBDBDB; + border: 1px solid #dbdbdb; // width: 274px; // width: 17em; width: 100%; @@ -257,22 +264,29 @@ .authors-role { font-size: 0.875em; - color: #A8A8A8; + color: #a8a8a8; height: 1.4em; margin-bottom: 0px; } // ********CENTER ELEMENTS******** -.mat-mini-fab, .mat-mini-fab-icon, .actions-btn, -.status-icon, .dataset-logo, .frame-btn, .finalize-btn { +.mat-mini-fab, +.mat-mini-fab-icon, +.actions-btn, +.status-icon, +.dataset-logo, +.frame-btn, +.finalize-btn { display: flex; justify-content: center; align-items: center; } -.dataset-label, .dmp-btn, - .doi-panel, .researcher { +.dataset-label, +.dmp-btn, +.doi-panel, +.researcher { display: flex; align-items: center; } diff --git a/dmp-frontend/src/app/ui/dmp/editor/dataset-editor-details/dataset-editor-details.component.html b/dmp-frontend/src/app/ui/dmp/editor/dataset-editor-details/dataset-editor-details.component.html index 5aca66898..6687b27cd 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/dataset-editor-details/dataset-editor-details.component.html +++ b/dmp-frontend/src/app/ui/dmp/editor/dataset-editor-details/dataset-editor-details.component.html @@ -52,8 +52,7 @@ - - + diff --git a/dmp-frontend/src/app/ui/dmp/editor/dataset-editor-details/dataset-editor-details.component.ts b/dmp-frontend/src/app/ui/dmp/editor/dataset-editor-details/dataset-editor-details.component.ts index 63f705711..43f07e96d 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/dataset-editor-details/dataset-editor-details.component.ts +++ b/dmp-frontend/src/app/ui/dmp/editor/dataset-editor-details/dataset-editor-details.component.ts @@ -89,7 +89,10 @@ export class DatasetEditorDetailsComponent extends BaseComponent implements OnIn } ngOnInit() { - if (this.datasetId) { + if (this.formGroup.get('status').value === 1) { + this.formGroup.disable(); + } + if (this.datasetId) { // never gets in here this.datasetWizardService.getSingle(this.datasetId) .pipe(takeUntil(this._destroyed)) .subscribe(data => { @@ -141,7 +144,7 @@ export class DatasetEditorDetailsComponent extends BaseComponent implements OnIn tourId: 'only-dmp-tour', useOrb: true, steps: [ - { + { title: this.dmpText, content: 'Step 1', orientation: Orientation.Bottom, @@ -168,7 +171,7 @@ export class DatasetEditorDetailsComponent extends BaseComponent implements OnIn this.setDashboardTourDmp(label); console.log(this.dashboardTourDmp.steps[0].selector); this.guidedTourService.startTour(this.dashboardTourDmp); - + } registerFormListeners() { diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.html b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.html index 5a7032899..f039ca436 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.html +++ b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.html @@ -79,7 +79,9 @@
  • {{'DMP-EDITOR.STEPPER.DATASET-INFO' | translate}}
  • -
    {{'DMP-EDITOR.STEPPER.DATASET' | translate}}
    +
    {{'DMP-EDITOR.STEPPER.DATASET' | translate}} + check{{'TYPES.DATASET-STATUS.FINALISED' | translate}} +
    @@ -108,6 +110,7 @@ +
    diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.scss b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.scss index 2762c550f..3442846bf 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.scss +++ b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.scss @@ -376,6 +376,11 @@ a:hover { white-space: nowrap; } +.status-icon { + font-size: 1.2em; + color: #a7a7a7; +} + // ::ng-deep .mat-tab-labels { // justify-content: space-between; // } diff --git a/dmp-frontend/src/app/ui/dmp/editor/main-info/main-info.component.html b/dmp-frontend/src/app/ui/dmp/editor/main-info/main-info.component.html index 664c6057b..0d2d84188 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/main-info/main-info.component.html +++ b/dmp-frontend/src/app/ui/dmp/editor/main-info/main-info.component.html @@ -9,30 +9,35 @@
    1.1 {{'DMP-EDITOR.FIELDS.NAME' | translate}}*
    {{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}
    - + {{formGroup.get('label').getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}} + + + +
    -
    +
    1.2 {{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}}
    {{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}
    - +
    -
    +
    1.3 {{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}
    @@ -40,7 +45,7 @@
    info {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}
    - + @@ -55,7 +60,7 @@
    -
    +
    1.4 {{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}
    @@ -63,7 +68,7 @@
    info {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}
    - + diff --git a/dmp-frontend/src/app/ui/dmp/editor/main-info/main-info.component.ts b/dmp-frontend/src/app/ui/dmp/editor/main-info/main-info.component.ts index d3209d786..4267d94a2 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/main-info/main-info.component.ts +++ b/dmp-frontend/src/app/ui/dmp/editor/main-info/main-info.component.ts @@ -12,6 +12,12 @@ import { isNullOrUndefined } from 'util'; import { MatDialog } from '@angular/material'; import { AddOrganizationComponent } from '../add-organization/add-organization.component'; import { AddResearcherComponent } from '../add-researcher/add-researcher.component'; +import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration'; +import { DmpListingModel } from '@app/core/model/dmp/dmp-listing'; +import { DataTableRequest } from '@app/core/model/data-table/data-table-request'; +import { DmpCriteria } from '@app/core/query/dmp/dmp-criteria'; +import { DmpStatus } from '@app/core/common/enum/dmp-status'; +import { DmpService } from '@app/core/services/dmp/dmp.service'; @Component({ selector: 'main-info', @@ -22,6 +28,7 @@ export class MainInfoComponent extends BaseComponent implements OnInit { @Input() formGroup: FormGroup = null; @Input() isNewVersion: boolean; + @Input() isNewDataset: boolean; @Input() isUserOwner: boolean; @Input() isClone: boolean; @Output() onFormChanged: EventEmitter = new EventEmitter(); @@ -41,10 +48,19 @@ export class MainInfoComponent extends BaseComponent implements OnInit { subtitleFn: (item) => item['tag'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['tag'] : (item['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')) }; + dmpAutoCompleteConfiguration: SingleAutoCompleteConfiguration = { + filterFn: this.searchDmp.bind(this), + initialItems: (extraData) => this.searchDmp(''), + displayFn: (item) => this.getDatasetDisplay(item), + titleFn: (item) => item['label'], + subtitleFn: (item) => this.language.instant('DATASET-WIZARD.FIRST-STEP.SUB-TITLE') + new Date(item['creationTime']).toISOString() + }; + constructor( private language: TranslateService, private configurationService: ConfigurationService, private externalSourcesService: ExternalSourcesService, + private dmpService: DmpService, private dialog: MatDialog ) { super(); @@ -136,4 +152,22 @@ export class MainInfoComponent extends BaseComponent implements OnInit { } }); } + + searchDmp(query: string): Observable { + const fields: Array = new Array(); + fields.push('-created'); + const dmpDataTableRequest: DataTableRequest = new DataTableRequest(0, null, { fields: fields }); + dmpDataTableRequest.criteria = new DmpCriteria(); + dmpDataTableRequest.criteria.like = query; + dmpDataTableRequest.criteria.status = DmpStatus.Draft; + return this.dmpService.getPaged(dmpDataTableRequest, "autocomplete").pipe(map(x => x.data)); + } + + getDatasetDisplay(item: any): string { + // if (!this.isPublic) { + // return (item['status'] ? this.language.instant('TYPES.DATASET-STATUS.FINALISED').toUpperCase() : this.language.instant('TYPES.DATASET-STATUS.DRAFT').toUpperCase()) + ': ' + item['label']; + // } + // else { return item['label']; } + return item['label'] ? item['label'] : null; + } } diff --git a/dmp-frontend/src/assets/i18n/de.json b/dmp-frontend/src/assets/i18n/de.json index 44465305c..95f380a7e 100644 --- a/dmp-frontend/src/assets/i18n/de.json +++ b/dmp-frontend/src/assets/i18n/de.json @@ -689,7 +689,9 @@ "TITLE": { "NEW": "Neuer Datenmanagementplan", "EDIT": "Bearbeiten", - "SUBTITLE": "DOI" + "SUBTITLE": "DOI", + "EDIT-DATASET": "Editing Dataset", + "CREATE-DATASET": "Creating Dataset Description" }, "FIELDS": { "NAME": "Titel", @@ -822,6 +824,7 @@ "PROFILE": "Vorlage", "URI": "URI", "DMP": "DMP", + "SELECT-DMP": "Select DMP", "DATAREPOSITORIES": "Datenrepositorien", "REGISTRIES": "Verzeichnisse", "SERVICES": "Dienste", diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 8b6c3c803..0c95c749d 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -760,6 +760,7 @@ "EDIT": "Edit", "EDIT-DMP": "Editing DMP", "EDIT-DATASET": "Editing Dataset", + "CREATE-DATASET": "Creating Dataset Description", "SUBTITLE": "DOI" }, "FIELDS": { @@ -944,6 +945,7 @@ "PROFILE": "Template", "URI": "Uri", "DMP": "DMP", + "SELECT-DMP": "Select DMP", "DATAREPOSITORIES": "Data Repositories", "REGISTRIES": "Registries", "SERVICES": "Services", diff --git a/dmp-frontend/src/assets/i18n/es.json b/dmp-frontend/src/assets/i18n/es.json index 206e59abc..6cf25cbf9 100644 --- a/dmp-frontend/src/assets/i18n/es.json +++ b/dmp-frontend/src/assets/i18n/es.json @@ -754,6 +754,7 @@ "EDIT": "Editar", "EDIT-DMP": "Editing DMP", "EDIT-DATASET": "Editing Dataset", + "CREATE-DATASET": "Creating Dataset Description", "SUBTITLE": "DOI" }, "FIELDS": { @@ -936,6 +937,7 @@ "PROFILE": "Plantilla", "URI": "Uri", "DMP": "PGD", + "SELECT-DMP": "Select DMP", "DATAREPOSITORIES": "Repositorios de Datos", "REGISTRIES": "Registros", "SERVICES": "Servicios", diff --git a/dmp-frontend/src/assets/i18n/gr.json b/dmp-frontend/src/assets/i18n/gr.json index 39bd46910..1bb327fb1 100644 --- a/dmp-frontend/src/assets/i18n/gr.json +++ b/dmp-frontend/src/assets/i18n/gr.json @@ -928,6 +928,8 @@ "TITLE": { "NEW": "Νέο Σχέδιο Διαχείρισης Δεδομένων", "EDIT": "Επεξεργασία", + "EDIT-DATASET": "Editing Dataset", + "CREATE-DATASET": "Creating Dataset Description", "INTRO": "A Data Management Plan (DMP) consist of your Data Management Plans closer to where they are generated, analysed and stored. argos is an open, extensible, collaborative tool supporting Open and FAIR Data Management Plans." }, "FIELDS": { @@ -937,6 +939,7 @@ "PROFILE": "Template", "URI": "Uri", "DMP": "Σχέδιο Διαχείρισης Δεδομένων", + "SELECT-DMP": "Select DMP", "DATAREPOSITORIES": "Αποθετήρια Δεδομένων", "REGISTRIES": "Κατάλογοι", "SERVICES": "Υπηρεσίες", diff --git a/dmp-frontend/src/assets/i18n/tr.json b/dmp-frontend/src/assets/i18n/tr.json index a91a70939..8bf6ca576 100644 --- a/dmp-frontend/src/assets/i18n/tr.json +++ b/dmp-frontend/src/assets/i18n/tr.json @@ -813,7 +813,9 @@ "DATASET-EDITOR": { "TITLE": { "NEW": "Yeni Veri Yönetim Planı", - "EDIT": "Düzenle" + "EDIT": "Düzenle", + "EDIT-DATASET": "Editing Dataset", + "CREATE-DATASET": "Creating Dataset Description" }, "FIELDS": { "NAME": "Veriseti Tanımının Adı", @@ -821,6 +823,7 @@ "PROFILE": "Şablon", "URI": "Uri", "DMP": "VYP", + "SELECT-DMP": "Select DMP", "DATAREPOSITORIES": "Veri Deposu", "REGISTRIES": "Kayıtçılar", "SERVICES": "Hizmetler",