Merge pull request #3120 from vvlladd28/improvement/import-device

[3.0] Improvements view and add support txt file in import Entity
This commit is contained in:
Igor Kulikov 2020-07-21 20:16:08 +03:00 committed by GitHub
commit fc422b89e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -38,8 +38,8 @@
<tb-file-input formControlName="importData"
required
label="{{importFileLabel | translate}}"
[allowedExtensions]="'csv'"
[accept]="'.csv,application/csv,text/csv'"
[allowedExtensions]="'csv,txt'"
[accept]="'.csv,application/csv,text/csv,.txt,text/plain'"
dropLabel="{{'import.drop-file-csv' | translate}}">
</tb-file-input>
</fieldset>

View File

@ -23,13 +23,13 @@
</mat-cell>
</ng-container>
<ng-container matColumnDef="sampleData">
<mat-header-cell *matHeaderCellDef style="flex: 0 0 30%;"> {{ 'import.column-example' | translate }} </mat-header-cell>
<mat-header-cell *matHeaderCellDef style="flex: 0 0 30%;" class="mat-column-sampleData"> {{ 'import.column-example' | translate }} </mat-header-cell>
<mat-cell *matCellDef="let column">
{{column.sampleData}}
</mat-cell>
</ng-container>
<ng-container matColumnDef="type">
<mat-header-cell *matHeaderCellDef style="flex: 0 0 40%"> {{ 'import.column-type.column-type' | translate }} </mat-header-cell>
<mat-header-cell *matHeaderCellDef style="flex: 0 0 40%" class="mat-column-type"> {{ 'import.column-type.column-type' | translate }} </mat-header-cell>
<mat-cell *matCellDef="let column">
<mat-select matInput [(ngModel)]="column.type" (ngModelChange)="columnsUpdated()">
<mat-option *ngFor="let type of columnTypes" [value]="type.value" [disabled]="type.disabled">

View File

@ -19,8 +19,10 @@
}
.mat-column-sampleData {
flex: 0 0 120px;
min-width: 120px;
}
.mat-column-type {
flex: 0 0 120px;
min-width: 120px;
}
}