Removes unnecessary code
This commit is contained in:
parent
716610e7c3
commit
dc8492e337
|
@ -101,10 +101,6 @@ export class DatasetEditorDetailsComponent extends BaseComponent implements OnIn
|
||||||
}
|
}
|
||||||
|
|
||||||
this.datasetWizardModel = new DatasetWizardEditorModel();
|
this.datasetWizardModel = new DatasetWizardEditorModel();
|
||||||
this.registerFormListeners();
|
|
||||||
// if (this.isNewDataset) {
|
|
||||||
// this.loadDatasetProfiles();
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.profilesAutoCompleteConfiguration = {
|
this.profilesAutoCompleteConfiguration = {
|
||||||
filterFn: this.filterProfiles.bind(this),
|
filterFn: this.filterProfiles.bind(this),
|
||||||
|
@ -113,53 +109,6 @@ export class DatasetEditorDetailsComponent extends BaseComponent implements OnIn
|
||||||
titleFn: (item) => item['label'],
|
titleFn: (item) => item['label'],
|
||||||
subtitleFn: (item) => item['description']
|
subtitleFn: (item) => item['description']
|
||||||
};
|
};
|
||||||
|
|
||||||
// if (this.datasetId) {
|
|
||||||
// this.datasetWizardService.getSingle(this.datasetId)
|
|
||||||
// .pipe(takeUntil(this._destroyed))
|
|
||||||
// .subscribe(data => {
|
|
||||||
// this.lockService.checkLockStatus(data.id).pipe(takeUntil(this._destroyed)).subscribe(lockStatus => {
|
|
||||||
// this.lockStatus = lockStatus;
|
|
||||||
// this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
|
|
||||||
// this.needsUpdate();
|
|
||||||
// this.formGroup = this.datasetWizardModel.buildForm();
|
|
||||||
// this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft;
|
|
||||||
// if (this.datasetWizardModel.status === DatasetStatus.Finalized || lockStatus) {
|
|
||||||
// this.formGroup.disable();
|
|
||||||
// this.viewOnly = true;
|
|
||||||
// }
|
|
||||||
// if (!lockStatus && !isNullOrUndefined(this.authService.current())) {
|
|
||||||
// this.lock = new LockModel(data.id, this.authService.current());
|
|
||||||
|
|
||||||
// this.lockService.createOrUpdate(this.lock).pipe(takeUntil(this._destroyed)).subscribe(async result => {
|
|
||||||
// this.lock.id = Guid.parse(result);
|
|
||||||
// interval(this.configurationService.lockInterval).pipe(takeUntil(this._destroyed)).subscribe(() => this.pumpLock());
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// // if (this.viewOnly) { this.formGroup.disable(); } // For future use, to make Dataset edit like DMP.
|
|
||||||
// this.loadDatasetProfiles();
|
|
||||||
// this.registerFormListeners();
|
|
||||||
// // this.availableProfiles = this.datasetWizardModel.dmp.profiles;
|
|
||||||
|
|
||||||
// this.onChanges();
|
|
||||||
// this.formChanged.emit(this.formGroup);
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// error => {
|
|
||||||
// switch (error.status) {
|
|
||||||
// case 403:
|
|
||||||
// this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-WIZARD.MESSAGES.DATASET-NOT-ALLOWED'), SnackBarNotificationLevel.Error);
|
|
||||||
// break;
|
|
||||||
// case 404:
|
|
||||||
// this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-WIZARD.MESSAGES.DATASET-NOT-FOUND'), SnackBarNotificationLevel.Error);
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.ERRORS.HTTP-REQUEST-ERROR'), SnackBarNotificationLevel.Error);
|
|
||||||
// }
|
|
||||||
// this.router.navigate(['/datasets/']);
|
|
||||||
// return observableOf(null);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public dashboardTourDmp: GuidedTour = {
|
public dashboardTourDmp: GuidedTour = {
|
||||||
|
|
|
@ -77,17 +77,6 @@ export class DatasetInfoComponent extends BaseComponent implements OnInit {
|
||||||
if (this.formGroup.get('definition')) { this.selectedDmpProfileDefinition = this.formGroup.get('definition').value; }
|
if (this.formGroup.get('definition')) { this.selectedDmpProfileDefinition = this.formGroup.get('definition').value; }
|
||||||
this.registerFormEventsForDmpProfile();
|
this.registerFormEventsForDmpProfile();
|
||||||
|
|
||||||
if (this.isNewVersion) {
|
|
||||||
this.formGroup.get('label').disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.isUserOwner && !this.isClone) {
|
|
||||||
this.formGroup.disable();
|
|
||||||
}
|
|
||||||
if (isNullOrUndefined(this.formGroup.get('extraProperties').get('publicDate').value)) {
|
|
||||||
this.formGroup.get('extraProperties').get('publicDate').patchValue(new Date());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.hasDmpId) {
|
if (this.hasDmpId) {
|
||||||
this.loadDatasetProfiles();
|
this.loadDatasetProfiles();
|
||||||
this.profilesAutoCompleteConfiguration = {
|
this.profilesAutoCompleteConfiguration = {
|
||||||
|
@ -98,23 +87,6 @@ export class DatasetInfoComponent extends BaseComponent implements OnInit {
|
||||||
subtitleFn: (item) => item['description']
|
subtitleFn: (item) => item['description']
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// if (this.formGroup.get('datasets')['controls'][0]) {
|
|
||||||
// this.formGroup.get('datasets')['controls'][0].get('dmp').valueChanges.pipe(takeUntil(this._destroyed))
|
|
||||||
// .subscribe(x => {
|
|
||||||
// //this.registerFormListeners();
|
|
||||||
// if (this.formGroup.get('datasets')['controls'][0].get('dmp').value) {
|
|
||||||
// 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']
|
|
||||||
// };
|
|
||||||
// this.onFormChanged.emit();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Researchers
|
// Researchers
|
||||||
|
|
|
@ -60,7 +60,6 @@ export class FundingInfoComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
const grantRequestItem: RequestItem<GrantCriteria> = new RequestItem();
|
const grantRequestItem: RequestItem<GrantCriteria> = new RequestItem();
|
||||||
grantRequestItem.criteria = new GrantCriteria();
|
grantRequestItem.criteria = new GrantCriteria();
|
||||||
|
|
||||||
|
@ -81,7 +80,6 @@ export class FundingInfoComponent extends BaseComponent implements OnInit {
|
||||||
this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
|
this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(x => {
|
.subscribe(x => {
|
||||||
this.configureAutoCompletes();
|
this.configureAutoCompletes();
|
||||||
// this.onFormChanged.emit();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,24 +49,7 @@ export class LicenseInfoComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// if (this.formGroup.get('definition')) { this.selectedDmpProfileDefinition = this.formGroup.get('definition').value; }
|
|
||||||
// this.registerFormEventsForDmpProfile();
|
|
||||||
|
|
||||||
if (this.isNewVersion) {
|
|
||||||
this.formGroup.get('label').disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.isUserOwner && !this.isClone) {
|
|
||||||
this.formGroup.disable();
|
|
||||||
}
|
|
||||||
if (isNullOrUndefined(this.formGroup.get('extraProperties').get('publicDate').value)) {
|
|
||||||
this.formGroup.get('extraProperties').get('publicDate').patchValue(new Date());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
|
|
||||||
.subscribe(x => {
|
|
||||||
// this.onFormChanged.emit();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getLanguageInfos(): LanguageInfo[] {
|
getLanguageInfos(): LanguageInfo[] {
|
||||||
|
|
|
@ -87,9 +87,6 @@ export class MainInfoComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// if (this.formGroup.get('definition')) { this.selectedDmpProfileDefinition = this.formGroup.get('definition').value; }
|
|
||||||
// this.registerFormEventsForDmpProfile();
|
|
||||||
|
|
||||||
if (this.isNewVersion) {
|
if (this.isNewVersion) {
|
||||||
this.formGroup.get('label').disable();
|
this.formGroup.get('label').disable();
|
||||||
}
|
}
|
||||||
|
@ -112,11 +109,6 @@ export class MainInfoComponent extends BaseComponent implements OnInit {
|
||||||
if (isNullOrUndefined(this.formGroup.get('extraProperties').get('contact').value)) {
|
if (isNullOrUndefined(this.formGroup.get('extraProperties').get('contact').value)) {
|
||||||
this.formGroup.get('extraProperties').get('contact').patchValue(associate.id);
|
this.formGroup.get('extraProperties').get('contact').patchValue(associate.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.formGroup.valueChanges.pipe(takeUntil(this._destroyed))
|
|
||||||
// .subscribe(x => {
|
|
||||||
// this.onFormChanged.emit();
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Researchers
|
// Researchers
|
||||||
|
|
Loading…
Reference in New Issue