<admin-page-header [title]="'Employee Upload List'" ></admin-page-header>

<!-- Employee Import-->
<div class="col-xl-12 col-lg-12 col-md-12">
  <div class="card ">

    @if (Error) {
      <div class="alert alert-danger">
        <p>{{ErrorMessage}}</p>
      </div>
    }

    <div class="card-header border-0">
      <h4 class="card-title">{{'Import file' | translate}}</h4>
    </div>
    <form #FormData="ngForm" (ngSubmit)="UploadEmployeeList(FormData, 'importFile')" enctype="multipart/form-data">
      <div class="card-body" >
        <div class="row">
          <div class="form-group">
            <label class="form-label">{{'Upload File' | translate}}</label>
            <div class="input-group file-browser">
              <input ngModel class="form-control" name="file" (change)="File($event)" type="file">
            </div>
            <small class="text-muted"><i>{{'File Format: .xlsx and .csv' | translate}}</i></small>
            <p>{{'Download' | translate}} <a href="./download/usersample.csv" class="text-primary" download>{{'Sample File' | translate}}</a></p>
            <span id="nameError" class="text-danger alert-message"></span>
          </div>
        </div>
      </div>
      <div class="card-footer">
        <button type="submit" [disabled]="sendingResponse['importFile']" class="btn btn-secondary float-end mb-2" >{{'Import Data' | translate}}@if (sendingResponse['importFile']) {
          <i class="fa fa-spinner fa-spin mx-1"></i>
        }</button>
      </div>
    </form>
  </div>
</div>
<!-- End Employee Import-->
