aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_elements/form-dataset/form-dataset.component.html
blob: ab1b417e9c320359be5e017d7bc48770378c6e57 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<div class="folderBox">

    <div class="file-container" [ngClass]="{'dottedClass': !tableData.hasInput}">
        
        <i class="material-icons-outlined icon-display" [ngClass]="{'hidden': tableData.hasInput}">file_upload</i>
        
        <div class="fileButton">   
                <button type="button" mat-raised-button (click)="fileInput.click()">Choose File</button>
                <label>{{filename}}</label>
        </div>
                
        <input class="file" id="file-upload" (change)="changeListener($event)" #fileInput type="file"  accept=".csv">
        
        
        <div class="mt-5 datatable">
            <app-datatable [tableData]="tableData"></app-datatable>
        </div>
        
        
    </div>
    

    
    

    <div class="bottomBar">
        <div class="row">
            <div class="col-sm">
                <div role="group">
                    <div class="row">
                        <mat-form-field class="example-full-width" appearance="fill">
                            <mat-label>Naziv</mat-label>
                            <input type="text" matInput value="{{filename.slice(0, this.filename.length - 4)}}">
                            <!--[formControl]="nameFormControl"-->

                            <mat-error *ngIf="nameFormControl.hasError('required')">
                                Naziv je <strong>obavezan</strong>
                            </mat-error>
                        </mat-form-field>
                    </div>
                </div>
            </div>
            <div class="col-sm mb-3">

                <!--<input id="fileInput" class="form-control btn-lg" type="file" class="upload" (change)="changeListener($event)" accept=".csv">
                -->
            </div>
            <div class="col-sm">



                <mat-form-field appearance="fill">
                    <mat-label>Delimiter</mat-label>
                    <mat-select id="delimiterOptions" [(ngModel)]="dataset.delimiter" (change)="update()" value=",">
                        <mat-option *ngFor="let option of delimiterOptions" [value]="option">
                            {{ option }}
                        </mat-option>
                    </mat-select>
                </mat-form-field>
            </div>
        </div>
    </div>

    <div class="btn-group" role="group" aria-label="Button group with nested dropdown">

    </div>


    <!--
    <div class="d-flex flex-row align-items-center justify-content-center w-100 my-2">
        <button (click)="uploadDataset()" class="btn btn-lg col-4" style="background-color:#003459; color:white;">Dodaj izvor podataka</button>
    </div>
-->
</div>