Fix bug on save dataset profile definition
This commit is contained in:
parent
0ad797d033
commit
50fc4612b7
|
@ -641,21 +641,23 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans', 'edit', this.formGroup.get('dmp').value.id]); });
|
this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans', 'edit', this.formGroup.get('dmp').value.id]); });
|
||||||
} else {
|
} else {
|
||||||
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
|
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
|
||||||
this.formGroupRawValue = JSON.parse(JSON.stringify(this.formGroup.getRawValue()));
|
|
||||||
this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft;
|
this.editMode = this.datasetWizardModel.status === DatasetStatus.Draft;
|
||||||
|
|
||||||
if (this.formGroup.get('datasetProfileDefinition')) {
|
// setTimeout(() => { this.formGroup = null; });
|
||||||
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(() => {
|
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.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(() => {
|
setTimeout(() => {
|
||||||
|
|
Loading…
Reference in New Issue