diff options
-rw-r--r-- | frontend/src/app/experiment/experiment.component.html | 2 | ||||
-rw-r--r-- | frontend/src/app/experiment/experiment.component.ts | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/frontend/src/app/experiment/experiment.component.html b/frontend/src/app/experiment/experiment.component.html index 4675236c..a2a45f20 100644 --- a/frontend/src/app/experiment/experiment.component.html +++ b/frontend/src/app/experiment/experiment.component.html @@ -5,7 +5,7 @@ <div id="container" class="container p-5" style="background-color: white; min-height: 100%;"> <div class="d-flex flex-row justify-content-center align-items-center my-3 links"> - <a href="#" data-bs-target="#carouselExampleControls" data-bs-slide-to="0" (click)="updateCarouselIndex(0)" [ngClass]="{'boldClass' : carouselIndex == 0}" style="text-decoration: none">Izvor podataka</a> + <a id="firstStep" href="#" data-bs-target="#carouselExampleControls" data-bs-slide-to="0" (click)="updateCarouselIndex(0);" [ngClass]="{'boldClass' : carouselIndex == 0}" style="text-decoration: none">Izvor podataka</a> <mat-icon>arrow_forward</mat-icon> <a href="#" data-bs-target="#carouselExampleControls" data-bs-slide-to="1" (click)="updateCarouselIndex(1)" [ngClass]="{'boldClass' : carouselIndex == 1}" style="text-decoration: none">Preprocesiranje</a> <mat-icon>arrow_forward</mat-icon> diff --git a/frontend/src/app/experiment/experiment.component.ts b/frontend/src/app/experiment/experiment.component.ts index 1533ceb3..64adce3f 100644 --- a/frontend/src/app/experiment/experiment.component.ts +++ b/frontend/src/app/experiment/experiment.component.ts @@ -227,6 +227,16 @@ export class ExperimentComponent implements OnInit { else if (newIndex < 0) newIndex = 0; + if (this.carouselIndex == 0 && (newIndex == 1 || newIndex == 2)) + this.checkRequiredData(); this.carouselIndex = newIndex; } + + checkRequiredData() { + if (this.selectedDataset == undefined) { + (<HTMLAnchorElement>document.getElementById("firstStep")).click(); + Shared.openDialog("Pažnja", "Potrebno je da dodate ili izabere izvor podataka kako biste prešli na naredni korak (preprocesiranje)."); + return; + } + } } |