Apply filter in the file uploads

This commit is contained in:
Jose Alberto Hernandez
2022-11-25 08:18:14 -06:00
parent abe684eefa
commit 68a3cfb472
9 changed files with 49 additions and 35 deletions
@@ -5,11 +5,11 @@
<mat-card fxLayout="column" fxLayoutGap="2%" fxFlex="50%">
<h3><strong>{{bulkImport.name}} Template</strong></h3>
<form [formGroup]="bulkImportForm">
<mat-card-content>
<div *ngIf="bulkImport.formFields >= 1">
<mat-form-field fxFlex>
<mat-label>Office</mat-label>
@@ -20,7 +20,7 @@
</mat-select>
</mat-form-field>
</div>
<div *ngIf="bulkImport.formFields >= 2">
<mat-form-field fxFlex>
<mat-label>Staff</mat-label>
@@ -31,7 +31,7 @@
</mat-select>
</mat-form-field>
</div>
<div *ngIf="bulkImport.formFields === 3">
<mat-form-field fxFlex>
<mat-label>Legal Form</mat-label>
@@ -41,26 +41,26 @@
</mat-select>
</mat-form-field>
</div>
</mat-card-content>
</form>
<div fxFlex="13%">
<button mat-raised-button color="primary" (click)="downloadTemplate()" *mifosxHasPermission="bulkImport.permission">
<i class="fa fa-download"></i>&nbsp;&nbsp;Download
</button>
</div>
</mat-card>
<mat-card fxLayout="column" fxLayoutGap="2%" fxFlex="50%">
<h3><strong>{{bulkImport.name}}</strong></h3>
<h4>Select Excel File</h4>
<mifosx-file-upload flex="75%" (change)="onFileSelect($event)"></mifosx-file-upload>
<mifosx-file-upload flex="75%" (change)="onFileSelect($event)" acceptFilter=".xls,.xlsx"></mifosx-file-upload>
<mat-hint *ngIf="bulkImport.name === 'Clients'">Please retain the value Entity/Person in the filename.</mat-hint>
@@ -71,7 +71,7 @@
</div>
<div *ngIf="bulkImport.formFields >= 2" fxFlex class="cover"></div>
</mat-card>
</div>
@@ -146,5 +146,5 @@
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</mat-card>
</div>