Use of enum DmpStatus
This commit is contained in:
parent
744942032e
commit
74ed505702
|
@ -170,7 +170,6 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else if (dmpId != null) {
|
} else if (dmpId != null) {
|
||||||
console.log("inhere");
|
|
||||||
this.isNew = true;
|
this.isNew = true;
|
||||||
this.dmpService.getSingle(dmpId).map(data => data as DmpModel)
|
this.dmpService.getSingle(dmpId).map(data => data as DmpModel)
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
|
|
|
@ -440,7 +440,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
confirmButton: this.language.instant('DMP-FINALISE-DIALOG.SUBMIT'),
|
confirmButton: this.language.instant('DMP-FINALISE-DIALOG.SUBMIT'),
|
||||||
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
|
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
|
||||||
submitFunction: () => {
|
submitFunction: () => {
|
||||||
this.formGroup.get('status').setValue('1');
|
this.formGroup.get('status').setValue(DmpStatus.Finalized);
|
||||||
this.formSubmit();
|
this.formSubmit();
|
||||||
dialogRef.close();
|
dialogRef.close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ import { QuickWizardEditorWizardModel } from './quick-wizard-editor.model';
|
||||||
import { DatasetEditorWizardComponent } from '../dataset-editor/dataset-editor-wizard.component';
|
import { DatasetEditorWizardComponent } from '../dataset-editor/dataset-editor-wizard.component';
|
||||||
import { ConfirmationDialogComponent } from '../../../library/confirmation-dialog/confirmation-dialog.component';
|
import { ConfirmationDialogComponent } from '../../../library/confirmation-dialog/confirmation-dialog.component';
|
||||||
import { DmpFinalizeDialogComponent } from '../../dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component';
|
import { DmpFinalizeDialogComponent } from '../../dmp/editor/dmp-finalize-dialog/dmp-finalize-dialog.component';
|
||||||
|
import { DmpStatus } from '../../../core/common/enum/dmp-status';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -91,9 +92,9 @@ export class QuickWizardEditorComponent extends BaseComponent implements OnInit,
|
||||||
if (!this.isFormValid()) { return; }
|
if (!this.isFormValid()) { return; }
|
||||||
if (this.formGroup.get('datasets') && this.formGroup.get('datasets').get('datasetsList') && (this.formGroup.get('datasets').get('datasetsList') as FormArray).length > 0) {
|
if (this.formGroup.get('datasets') && this.formGroup.get('datasets').get('datasetsList') && (this.formGroup.get('datasets').get('datasetsList') as FormArray).length > 0) {
|
||||||
for (let control of (this.formGroup.get('datasets').get('datasetsList') as FormArray).controls) {
|
for (let control of (this.formGroup.get('datasets').get('datasetsList') as FormArray).controls) {
|
||||||
control.get('status').setValue('1');
|
control.get('status').setValue(DmpStatus.Finalized);
|
||||||
}
|
}
|
||||||
this.formGroup.get('dmp').get('status').setValue('1');
|
this.formGroup.get('dmp').get('status').setValue(DmpStatus.Finalized);
|
||||||
this.onSubminSaveAndFinalize();
|
this.onSubminSaveAndFinalize();
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue