aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/form-dataset/form-dataset.component.html
blob: 7be838f14fa84e8bc16d87483215551f4d6b54be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<div class="folderBox" *ngIf="dataset">
 
        <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>
                    </div>
                </div>

                <div class="kolona">
                    <div role="group">
                            <mat-form-field class="example-full-width" appearance="fill">
                                <mat-label>Naziv</mat-label>
                                <input type="text" matInput value="{{dataset?.name}}" [(ngModel)]="dataset.name">


                                <mat-error *ngIf="nameFormControl.hasError('required')">
                                    Naziv je <strong>obavezan</strong>
                                </mat-error>
                            </mat-form-field>
                    </div>
                </div>
                <div class="kolona">
                    <mat-form-field appearance="fill">
                        <mat-label>Delimiter</mat-label>
                        <mat-select id="delimiterOptions" [(ngModel)]="dataset.delimiter" (selectionChange)="update()" value=",">
                            <mat-option *ngFor="let option of delimiterOptions" [value]="option">
                                {{ option }}
                            </mat-option>
                        </mat-select>
                    </mat-form-field>
                </div>
        </div>
     

    <div class="row" style="margin-right: 0;">
        <div class="file-container" [ngClass]="{'dottedClass': !tableData.hasInput}">

            <i class="material-icons-outlined icon-display" [ngClass]="{'hidden': tableData.hasInput}">file_upload</i>
            

            <input class="file" id="file-upload" (change)="changeListener($event)" #fileInput type="file" accept=".csv">

            <div class="mt-5 datatable">
                <div [ngClass]="{'hidden': (!existingFlag)}" class="text-center">
                    <button mat-button  (click)="goBack()"><mat-icon>keyboard_arrow_left</mat-icon></button>
                    <div style="display: inline;">{{(this.begin/10)+1}}...{{getPage()}}</div>
                    <button mat-button (click)="goForward()"><mat-icon>keyboard_arrow_right</mat-icon></button>
                </div>
                <app-datatable [tableData]="tableData"></app-datatable>
            </div>


        </div>
    </div>

</div>