 <?php $user = auth('backend')->user() ?> <div class="row"> <div class="col-md-12 "> <div class="portlet box blue-steel"> <div class="portlet-title"> <div class="caption"> Thông tin chung </div> <div class="tools"> <a href="javascript:;" class="expand" data-original-title="" title=""> </a> </div> <div class="actions"> <?php if($user->can('edit-hostel')): ?> <a href="#edit-hostel" data-toggle="modal" data-hostel="<?php echo e($hostel->id); ?>" class="btn btn-default btn-sm btn-edit-hostel"> <i class="fa fa-pencil"></i> Cập nhật thông tin </a> <?php endif; ?> </div> </div> <div class="portlet-body" style="display: none"> <div class="row"> <div class="col-md-6"> <div class="table-scrollable" id="hostel-table-info"> <table class="table table-bordered table-hover"> <tbody> <tr> <td> Tên</td> <td><strong><?php echo e($hostel->name); ?></strong></td> </tr> <tr> <td> Loại nhà</td> <?php $type = \App\Models\HostelType::find($hostel->type); ?> <?php if($type): ?> <td><strong><?php echo e($type->name); ?></strong></td> <?php else: ?> <td></td> <?php endif; ?> </tr> <tr> <td> Hình thức cho thuê</td> <td><strong><?php echo e($hostel->type_rent_text); ?></strong></td> </tr> <tr> <td> Địa chỉ</td> <td><strong><?php echo e($hostel->address); ?> </strong></td> </tr> <tr> <td> Chủ sở hữu</td> <td> <?php if($hostel->owner): ?> <strong><?php echo e($hostel->owner->name); ?> </strong><?php endif; ?></td> </tr> <tr> <td> Ngày chốt điện nước</td> <?php if($hostel->date_ew < 10): ?> <td><strong> mùng <?php echo e($hostel->date_ew); ?> hàng tháng</strong></td> <?php else: ?> <td><strong> <?php echo e($hostel->date_ew); ?> hàng tháng</strong></td> <?php endif; ?> </tr> <tr> <td> Ngày chốt sổ tính phí</td> <?php if($hostel->date_money < 10): ?> <td><strong> mùng <?php echo e($hostel->date_money); ?> hàng tháng</strong></td> <?php else: ?> <td><strong> <?php echo e($hostel->date_money); ?> hàng tháng</strong></td> <?php endif; ?> </tr> </tbody> </table> </div> </div> <div class="col-md-6"> <div class="row"> <div class="col-md-4"> <div id="pie-room" class="CSSAnimationChart" style="height: 300px!important;"></div> </div> <div class="col-md-5"> <div id="pie-payment" class="CSSAnimationChart" style="height: 300px!important;"></div> </div> <div class="col-md-3"> <div class="row" style="margin-top: 20px; margin-bottom: 10px"> <div class="col-md-12"> <a class="dashboard-stat dashboard-stat-v2 blue-steel" href="#"> <div class="visual"> <i class="fa fa-users"></i> </div> <div class="details"> <div class="number"> <span data-counter="counterup" data-value="<?php echo e(\App\Components\Functions::getRenterHostel($hostel)); ?>"><?php echo e(\App\Components\Functions::getRenterHostel($hostel)); ?></span> </div> <div class="desc"> khách thuê</div> </div> </a> </div> </div> <div class="row"> <div class="col-md-12"> <a class="dashboard-stat dashboard-stat-v2 red" href="#"> <div class="visual"> <i class="fa fa-home"></i> </div> <div class="details"> <div class="number"> <span data-counter="counterup" data-value=" <?php echo e(\App\Models\Room::where('hostel_id', $hostel->id)->count()); ?>"> <?php echo e(\App\Models\Room::where('hostel_id', $hostel->id)->count()); ?></span> </div> <div class="desc"> phòng</div> </div> </a> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="row" id="floor-rooms"> <div class="col-md-12"> <?php $blockNames = \App\Models\Room::where('hostel_id', $hostel->id)
        ->groupBy('block_group')->orderBy('block_group')->pluck('block_group')->toArray();

        $blockNames = collect($blockNames)->sort()->toArray();
        ?> <?php $__currentLoopData = $blockNames; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $blockName): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <button href="#" data-hostel="<?php echo e($hostel->id); ?>" data-block-name="<?php echo e($blockName); ?>" class="btn red-mint btn-outline sbold floor-detail" style="margin-right: 20px"> <label>Tầng <?php echo e(ucfirst(mb_strtolower($blockName))); ?></label> <div class="progress" style="margin-bottom: 5px"> <?php
                        $numberEmptyRooms = \App\Components\Functions::getEmptyRoomHostelByBlockName($hostel, $blockName);
                $numberRooms = \App\Components\Functions::getRoomHostelByBlockName($hostel, $blockName);
                    ?> <?php if($numberRooms != 0): ?> <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo e($numberEmptyRooms / $numberRooms * 100); ?>%"> <span class="sr-only"> 40% Complete (success) </span> </div> <div class="progress-bar progress-bar-danger" style="width: <?php echo e(($numberRooms - $numberEmptyRooms) / $numberRooms * 100); ?>%"> <span class="sr-only"> 10% Complete (danger) </span> </div> <?php else: ?> <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 100%"> <span class="sr-only"> 40% Complete (success) </span> </div> <?php endif; ?> </div> </button> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <div class="col-md-12"> <div class="mt-checkbox-inline"> <label class="mt-checkbox" style="margin-bottom: 0px"> <input type="checkbox" id="is-empty-checkbox"> Chỉ hiện phòng trống <span></span> </label> </div> </div> </div> <div id="rooms" style="margin-top: 5px"> </div>