<app-all-menus></app-all-menus>

<div class="topDiv">
  <!-- <div id="toast">
      <div id="desc">{{data_descip}}</div>
    </div> -->
  <div class="row"
    style="text-align: center; background: #426E86; padding-top: 10px; padding-bottom: 10px; color: white;box-shadow:3px 1px 5px 0px rgb(178, 176, 174)">
    <div class="col-sm-12 col-md-12 col-lg-12">
      <h4>{{'Add Fuel Price' | translate}}

        <button class="btn btn-primary btn-sm" style="float: right;margin-right: 11px;" [routerLink]="['/FuelPrice']"><i
            class="fas fa-arrow-left"></i> Back</button>
        <button class="btn btn-primary btn-sm" *ngIf="useridd=='59cbbdbe508f164aa2fef3d8'" style="float: right;margin-right: 11px;" data-toggle="collapse" href="#multiCollapseExample1" role="button" aria-expanded="false"
        aria-controls="multiCollapseExample1"><i class="fas fa-upload"></i> Upload Excel</button>
      </h4>
    </div>
  </div>


  <div class="collapse multi-collapse" id="multiCollapseExample1">
    <div class="card card-body">
      <div class="row" style="margin-top: 10px;margin-bottom: 10px;">
        <div class="col-sm-12" style="text-align: left;font-size: initial;">
        
          <div class="col-sm-offset-2 col-sm-10" style="text-align: center;">
            <label style="background: MD_DIALOG_DATA;box-shadow: 2px 2px #a0a3a5;" class="file-upload btn btn-primary">Browse
              for Excel file ... <input type="file" id="excelFile" multiple size="50" />
            </label>
            <button type="button" style="margin-top: 0px; margin-left: 15px;; width: 90px; box-shadow: 2px 2px #b1adad"
              class="btn btn-primary" data-toggle="collapse" data-target="#collapseZero" aria-expanded="true"
              aria-controls="collapseZero" (click)="uploadExcel()">Upload</button>
         
          </div>
        </div>
      </div>
    </div>
  </div>

<div class="table-responsive" style="overflow: scroll;height: 90vh;">
  <table class="table table-striped">
    <thead>
      <tr>
        <th>State</th>
        <th>Date</th>
        <th>Petrol Price</th>
        <th>Diesel Price</th>

      </tr>
    </thead>
    <tbody>
      <tr *ngFor="let item of stateArray; let i=index;">
        <td>{{item.state}}</td>
        <td><input id="to_date" bsDatepicker class="form-control form-control-sm" style="height: 25px;" [bsConfig]="bsConfig"
          [(ngModel)]="date" type="text"></td>
        <td><input [(ngModel)]="item.petrol" (ngModelChange)="petrolChange($event,i)"></td>
        <td><input  [(ngModel)]="item.diesel" (ngModelChange)="dieselChange($event,i)"></td>

      </tr>
    </tbody>
  </table>
  <div class="text-center mb-3 mt-3">
    <button class="btn btn-primary" (click)="submit()">Sumbit</button>

  </div>
</div>

  </div>
  