argos/dmp-frontend/src/app/ui/quick-wizard/dataset-editor/quick-wizard-dataset-descri...

21 lines
817 B
TypeScript
Raw Normal View History

import { FormControl, FormGroup } from "@angular/forms";
import { DatasetProfileDefinitionModel } from "../../../core/model/dataset-profile-definition/dataset-profile-definition";
import { DatasetDescriptionFormEditorModel } from "../../misc/dataset-description-form/dataset-description-form.model";
export class QuickWizardDatasetDescriptionModel extends DatasetDescriptionFormEditorModel {
public datasetLabel: string;
fromModel(item: DatasetProfileDefinitionModel): DatasetDescriptionFormEditorModel {
super.fromModel(item);
return this;
}
buildForm(): FormGroup {
const formGroup: FormGroup = super.buildForm();
formGroup.addControl('datasetLabel', new FormControl({ value: this.datasetLabel }));
formGroup.addControl('status', new FormControl({ value: this.status }));
return formGroup;
}
}