<div class="addHospital-w">
  <div class="container">

    <div class="row">
        <div class="col-12">
          <ul class="list-unstyled titileLi-w" style="margin: 0;">
            <li class="headingText-w">خدمه البلاغات</li>
            <li class="headingText-w" style="cursor:pointer">تقرير ضابط الموظفين الحالي</li>
          </ul>
        </div>
    </div>

    <div class="containerContent-w">
      <div class="row">
        <div class="col-12 col-md-4">
          <div class="form-group">
            <label for="admin" style="float:right">الإداره</label>
            <select id="admin" class="form-control" (input)="getAdminstrationsData($event)" [ngModel]="defaultAdminstrationValue">
              <option *ngFor="let admin of adminstrations" [value]="admin.id">{{admin.name}}</option>
            </select>
          </div>
        </div>
        <div class="col-12 col-md-4">
          <div class="form-group">
            <label for="admin" style="float:right">القسم</label>
            <select id="admin" class="form-control" (input)="getDepartmentsData($event)" [ngModel]="defaultdepartmentValue">
              <option value="all">الكل</option>
              <option *ngFor="let depart of departments" [value]="depart.id">{{depart.name}}</option>
            </select>
          </div>
        </div>

        <div class="col-12 col-md-4">
          <div class="form-group">
            <button class="btn btn-success form-control" style="margin:30px 0" (click)="getReport()">إرسال</button>
          </div>
        </div>

        <div class="col-12" *ngIf="adminstraion_officers.length > 0">
          <!-- <button class="btn btn-success" style="float: right; margin: 10px 0;" (click)="onPrint()">طباعه</button>  -->
          <h3 class="heading">ظباط إتصال الإداره</h3>
          <table class="table table-bordered text-center">
            <thead class="headBackground-w">
              <tr>
                <th>إسم الموظف</th>
                <th>تاريخ التعيين</th>
              </tr>
            </thead>
            <tbody>
              <tr *ngFor="let data of adminstraion_officers; let i = index">
                <td>{{data.name}}</td>
                <td>
                    {{data.created_at}}
                </td>
              </tr>
            </tbody>
          </table>
        </div>

        <div class="col-12" *ngIf="department_officers.length > 0">
            <h3 class="heading">ظباط إتصال القسم</h3>
            <table class="table table-bordered text-center">
              <thead class="headBackground-w">
                <tr>
                  <th>إسم الموظف</th>
                  <th>إسم القسم</th>
                  <th>تاريخ التعيين</th>
                </tr>
              </thead>
              <tbody>
                <tr *ngFor="let data of department_officers; let i = index">
                  <td>{{data.name}}</td>
                  <td>{{data.department_name}}</td>
                  <td>{{data.created_at}}</td>
                </tr>
              </tbody>
            </table>
          </div>

          <div class="col-12" *ngIf="adminstraion_officers.length > 0 || department_officers.length > 0">
            <button class="btn btn-success" style="float: right; margin: 10px 0;" (click)="onPrint()">طباعه</button> 
          </div>

      </div>
    </div>


  </div>
</div>
