diff options
author | Ivan Ljubisavljevic <ivan996sk@gmail.com> | 2022-05-26 21:29:26 +0200 |
---|---|---|
committer | Ivan Ljubisavljevic <ivan996sk@gmail.com> | 2022-05-26 21:29:26 +0200 |
commit | 78a10dadf619e4d090d93e19f08f9e35bcbd5a6d (patch) | |
tree | 96779c31ec1461e3740e113e3f90214b7f6fe2c5 | |
parent | c6f1ca72c5ada7fc42985e129da362796883cb2f (diff) |
Deaktiviran button za dodavanje csv-a kada se ucita postojeci csv
-rw-r--r-- | frontend/src/app/_elements/form-dataset/form-dataset.component.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/frontend/src/app/_elements/form-dataset/form-dataset.component.html b/frontend/src/app/_elements/form-dataset/form-dataset.component.html index 6194a1a8..2a956128 100644 --- a/frontend/src/app/_elements/form-dataset/form-dataset.component.html +++ b/frontend/src/app/_elements/form-dataset/form-dataset.component.html @@ -2,7 +2,11 @@ <div class="topBar"> <div class="kolona mb-3"> <div class="fileButton"> - <button type="button" mat-raised-button (click)="fileInput.click()"><span *ngIf="!firstInput">Dodaj izvor podataka</span><span *ngIf="firstInput">{{filename}}</span></button> + <button type="button" mat-raised-button (click)="fileInput.click()" [disabled]="dataset._id != ''" > + <span *ngIf="!firstInput && dataset._id == '' ">Dodaj izvor podataka</span> + <span *ngIf="firstInput && dataset._id == '' ">{{filename}}</span> + <span *ngIf="dataset._id != '' ">Fajl je odabran</span> + </button> </div> </div> @@ -38,7 +42,7 @@ <i class="material-icons-outlined icon-display" [ngClass]="{'hidden': tableData.hasInput}">file_upload</i> - <input class="file" id="file-upload" (change)="changeListener($event)" (valueChange)="dataset.isPreProcess = false; editEvent.emit()" #fileInput type="file" accept=".csv"> + <input class="file" id="file-upload" [disabled]="dataset._id != ''" (change)="changeListener($event)" (valueChange)="dataset.isPreProcess = false; editEvent.emit()" #fileInput type="file" accept=".csv"> <div class="datatable"> <div [ngClass]="{'hidden': (!existingFlag)}" class="text-center"> |