diff --git a/dmp-frontend/src/app/core/pipes/date-time-culture-format.pipe.ts b/dmp-frontend/src/app/core/pipes/date-time-culture-format.pipe.ts index 077d09146..90edc9d93 100644 --- a/dmp-frontend/src/app/core/pipes/date-time-culture-format.pipe.ts +++ b/dmp-frontend/src/app/core/pipes/date-time-culture-format.pipe.ts @@ -1,15 +1,13 @@ import { DatePipe, registerLocaleData } from '@angular/common'; +import localeDe from '@angular/common/locales/de'; +import localeEs from '@angular/common/locales/es'; +import localeSk from '@angular/common/locales/sk'; +import localeTr from '@angular/common/locales/tr'; import { Pipe, PipeTransform } from '@angular/core'; import { LangChangeEvent, TranslateService } from '@ngx-translate/core'; import 'moment-timezone'; import { CultureInfo } from '../model/culture-info'; -import { CultureService } from '../services/culture/culture-service'; import { LanguageService } from '../services/language/language.service'; -import { LoggingService } from '../services/logging/logging-service'; -import localeEs from '@angular/common/locales/es'; -import localeDe from '@angular/common/locales/de'; -import localeTr from '@angular/common/locales/tr'; -import localeSk from '@angular/common/locales/sk'; const availableCultures: CultureInfo[] = require('../../../assets/localization/available-cultures.json'); diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts index 78688de88..74e728375 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts @@ -641,21 +641,24 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans', 'edit', this.formGroup.get('dmp').value.id]); }); } else { this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data); - this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue())); this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft; - if (this.formGroup.get('datasetProfileDefinition')) { - this.formGroup.removeControl('datasetProfileDefinition'); - this.getDefinition(data.profile.id); - this.maxStep = 1; - } else { - this.getDefinition(data.profile.id); - this.maxStep = 1; - } - - setTimeout(() => { this.formGroup = null; }); + // setTimeout(() => { this.formGroup = null; }); setTimeout(() => { - this.formGroup = this.datasetWizardModel.buildForm(); + this.formGroup.get('id').patchValue(data.id); + this.formGroup.get('modified').patchValue(data.modified); + this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue())); + this.hasChanges = false; + + // this.formGroup = this.datasetWizardModel.buildForm(); + // if (this.formGroup.get('datasetProfileDefinition')) { + // this.formGroup.removeControl('datasetProfileDefinition'); + // this.getDefinition(data.profile.id); + // this.maxStep = 1; + // } else { + // this.getDefinition(data.profile.id); + // this.maxStep = 1; + // } }); setTimeout(() => { diff --git a/dmp-frontend/src/app/ui/explore-dataset/explore-dataset.module.ts b/dmp-frontend/src/app/ui/explore-dataset/explore-dataset.module.ts index 468946180..86dfe4e41 100644 --- a/dmp-frontend/src/app/ui/explore-dataset/explore-dataset.module.ts +++ b/dmp-frontend/src/app/ui/explore-dataset/explore-dataset.module.ts @@ -1,4 +1,5 @@ import { NgModule } from '@angular/core'; +import { FormattingModule } from '@app/core/formatting.module'; import { AutoCompleteModule } from '@app/library/auto-complete/auto-complete.module'; import { ExploreDatasetListingComponent } from '@app/ui/explore-dataset/explore-dataset-listing.component'; import { ExploreDatasetRoutingModule } from '@app/ui/explore-dataset/explore-dataset.routing'; @@ -15,6 +16,7 @@ import { DatasetOverviewModule } from '../dataset/overview/dataset-overview.modu CommonFormsModule, AutoCompleteModule, ExploreDatasetRoutingModule, + FormattingModule, DatasetOverviewModule ], declarations: [