<div class="content-wrapper" >
  <section class="content-header">
    <h1><?= $pTitle ?><small><?= $pDescription ?></small></h1>
    <ol class="breadcrumb">
      <li><a href="<?= base_url() ?>"><i class="fa fa-star-o" aria-hidden="true"></i>Home</a></li>
      <li><?= $menu ?></li>
      <li class="active"><?= $smenu ?></li>
    </ol>
  </section>
  <section class="content">
    <div class="row">
      <div class="col-xs-12">
        <div class="box box-warning">
          <div class="box-header with-border">
            <div class="col-md-6"><h3 class="box-title">Shop</h3></div>
            <div class="col-md-6" align="right">
              <a class="btn btn-sm btn-primary" href="<?= base_url() ?>">Back</a>
            </div>
          </div>
          <div class="box-body">
            <?php
                if($shop_data['status'] == 'success' && !empty($shop_data) && isset($shop_data['shops'])){ ?>
            <div class="col-md-3">
              <div class="row">
                <div class="col-md-5"><span>Shop Name </span></div>
                <div class="col-md-7">
                  <span>:-</span>
                  <label class="padLeft20">
                    <?= $shop_data['shops']['shop_name']  ?> 
                  </label>
                </div>
              </div>
            </div>
            <div class="col-md-3">
              <div class="row">
                <div class="col-md-5"><span>Phone</span></div>
                <div class="col-md-7">
                  <span>:-</span>
                  <label class="padLeft20">
                    <?= $shop_data['shops']['phone'] ?> 
                  </label>
                </div>
              </div>
            </div>
            <div class="col-md-3">
              <div class="row">
                <div class="col-md-4"><span>Email ID</span></div>
                <div class="col-md-8">
                  <span>:-</span>
                  <label class="padLeft20">
                    <?= $shop_data['shops']['email_id'] ?> 
                  </label>
                </div>
              </div>
            </div>
            <div class="col-md-3">
              <div class="row">
                <div class="col-md-4"><span>Address</span></div>
                <div class="col-md-8">
                  <span>:-</span>
                  <label class="padLeft20">
                    <?=  $shop_data['shops']['address'] ?> 
                  </label>
                </div>
              </div>
            </div>
          <?php } else {?>
          <div style="text-align: center;font-size: 16px">No Data Found</div>
        <?php } ?>
          </div>
        </div>
      </div>
    </div>
<?php if(isset($shop_data) && isset($shop_data['coworkers'] ) &&count($shop_data['coworkers']) > 0){ ?>
     <div class="row">
      <div class="col-xs-12">
        <div class="box box-warning">
          <div class="box-header with-border">
            <div class="col-md-6"><h3 class="box-title">List Of Co-Workers</h3></div>
          </div>
          <div class="box-body">
            <table id="mechanicShopUsers" class="table table-bordered table-striped datatable ">
              <thead>
                <tr>
                  <th class="hidden">ID</th>
                  <th width="150px;">Mechanic Name</th>
                  <th width="150px;">Phone</th>
                  <th width="150px;">Email ID</th>
                  <th width="250px;">Address</th>
                </tr>
              </thead> 
              <tbody>
                <?php
                if(!empty($shop_data) && $shop_data['status'] == 'success'){ 
                  foreach ( $shop_data['coworkers'] as $key => $value) {
                  ?>
                    <tr>
                      <th class="hidden"><?= $value['mechanic_id'] ?></th>
                      <th class="center"><?= $value['first_name'].' '.$value['last_name'] ?></th>
                      <th class="center"><?= $value['phone'] ?></th>
                      <th class="center"><?= $value['email_id'] ?></th>
                      <th class="center"><?= $value['address'] ?></th>
                    </tr>
                <?php } } ?>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
  <?php } ?>
  </section>
</div>