aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/column-table
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/app/_elements/column-table')
-rw-r--r--frontend/src/app/_elements/column-table/column-table.component.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/frontend/src/app/_elements/column-table/column-table.component.ts b/frontend/src/app/_elements/column-table/column-table.component.ts
index 330c42ee..44a15f22 100644
--- a/frontend/src/app/_elements/column-table/column-table.component.ts
+++ b/frontend/src/app/_elements/column-table/column-table.component.ts
@@ -24,6 +24,7 @@ export class ColumnTableComponent implements AfterViewInit {
@Input() experiment!: Experiment;
@Output() okPressed: EventEmitter<string> = new EventEmitter();
@Output() columnTableChanged = new EventEmitter();
+ @Output() experimentChanged = new EventEmitter();
Object = Object;
Encoding = Encoding;
@@ -231,9 +232,9 @@ export class ColumnTableComponent implements AfterViewInit {
});
dialogRef.afterClosed().subscribe(experiment => {
if (experiment) {
- this.experiment = experiment;
- /*this.experiment._id = experiment._id; //MORA OVAKO
- this.experiment.name = experiment.name;*/
+ Object.assign(this.experiment, experiment);
+ this.experiment._columnsSelected = true;
+ this.experimentChanged.emit();
console.log(this.experiment);
}
});
@@ -241,7 +242,9 @@ export class ColumnTableComponent implements AfterViewInit {
openUpdateExperimentDialog() {
this.experimentService.updateExperiment(this.experiment).subscribe((response) => {
- this.experiment = response;
+ Object.assign(this.experiment, response);
+ this.experiment._columnsSelected = true;
+ this.experimentChanged.emit();
Shared.openDialog("Izmena eksperimenta", "Uspešno ste izmenili podatke o eksperimentu.");
});
}