<?php $__env->startSection('css_page_level'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/bootstrap-select/bootstrap-select.min.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/clockface/css/clockface.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css')); ?>"/>

<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/bootstrap-daterangepicker/daterangepicker-bs3.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css')); ?>"/>

<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/bootstrap-select/bootstrap-select.min.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/select2/css/select2.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/select2/css/select2-bootstrap.min.css')); ?>"/>
<link href="<?php echo e(asset('assets/global/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css')); ?>" rel="stylesheet" type="text/css" media="screen"/>
<link href="<?php echo e(asset('assets/global/plugins/bootstrap-editable/inputs-ext/address/address.css')); ?>" rel="stylesheet" type="text/css" media="screen"/>
<link href="<?php echo e(asset('assets/global/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.css')); ?>" rel="stylesheet" type="text/css" media="screen"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css')); ?>"/>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page-content-wrapper'); ?>
	<div class="page-content-wrapper" id="main">
		<div class="page-content">
			<!-- BEGIN PAGE HEADER-->
			<h3 class="page-title">
			<?php $setting = app('anlutro\LaravelSettings\Facade'); ?>
			<?php echo e($setting::get('system_name','全方位建築智慧化管理系統')); ?> <small><?php echo e($setting::get('company_name','新保科技')); ?></small>
			</h3>
			<div class="page-bar">
				<ul class="page-breadcrumb">
					<li>
						<i class="fa fa-home"></i>
						<a href="<?php echo e(route('manage::index')); ?>"><?php echo app('translator')->get('messages.homepage'); ?></a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="javascript:;"><?php echo app('translator')->get('messages.neighbor_hood'); ?></a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="<?php echo e(action('RecordController@index')); ?>"><?php echo app('translator')->get('messages.resident_meter_read'); ?></a>
					</li>
				</ul>
				<div class="page-toolbar">

				</div>
			</div>
			<!-- END PAGE HEADER-->
			<!-- BEGIN DASHBOARD STATS -->
			<div class="row">
				<div class="col-md-3">
					<div class="panel panel-default">
						<!-- Default panel contents -->
						<div class="panel-heading">
							<h3 class="panel-title"><?php echo e($record->type); ?>-<?php echo e($record->title); ?></h3>
						</div>
						<!-- List group -->
						<ul class="list-group">
							<li class="list-group-item">
								 已抄錶戶數 <span class="badge badge-success"> <?php echo e($count['done']); ?> </span>
							</li>
							<li class="list-group-item">
								 尚未抄表戶數 <span class="badge badge-danger"> <?php echo e($count['pending']); ?> </span>
							</li>
							<li class="list-group-item">
								 總計戶數 <span class="badge badge-default"> <?php echo e($count['total']); ?> </span>
							</li>
							<li class="list-group-item">
								<?php echo app('translator')->get('messages.start_time'); ?> <br>
								<?php echo e($record->time_start); ?>

							</li>
							<li class="list-group-item">
								<?php echo app('translator')->get('messages.end_time'); ?> <br>
								<?php echo e($record->time_end); ?>

							</li>
						</ul>
					</div>
				</div>
				<div class="col-md-9">
					<!-- BEGIN EXAMPLE TABLE PORTLET-->
					<div class="portlet box grey">
						<div class="portlet-title">
							<div class="caption">
								<i class="fa fa-globe"></i><?php echo app('translator')->get('messages.list_meter_read'); ?>
							</div>
							<ul class="nav nav-tabs">
								<li class="active">
									<a href="#tab_1" data-toggle="tab">
									依門牌 </a>
								</li>
								<li>
									<a href="#tab_2" data-toggle="tab">
									依帳號 </a>
								</li>
							</ul>
						</div>
						<div class="portlet-body">
							<div class="tab-content">
								<div class="tab-pane active" id="tab_1">
									<table class="table table-striped table-grey table-hover datatable">
									<thead>
									<tr>
										<th style="width:30%;">
											<?php echo app('translator')->get('messages.doorplate'); ?>
										</th>
										<th style="width:30%;">
											最後抄表人
										</th>
										<th style="width:30%;">
											<?php echo app('translator')->get('messages.points'); ?>
										</th>
									</tr>
									</thead>
									<tbody>
									<?php foreach($doorplate_lists as $one): ?>
									<tr class="odd gradeX">
										<td>
											<?php echo e($one->groupid); ?>

										</td>
										<td>
											<?php echo e($one->last); ?>

										</td>
										<td>
											<?php echo e($one->value); ?>

										</td>
									</tr>
									<?php endforeach; ?>
									</tbody>
									</table>
								</div>
								<div class="tab-pane" id="tab_2">
									<table class="table table-striped table-grey table-hover datatable">
									<thead>
									<tr>
										<th style="width:30%;">
											門牌
										</th>
										<th style="width:30%;">
											帳號
										</th>
										<th style="width:30%;">
											<?php echo app('translator')->get('messages.name'); ?>
										</th>
										<th style="width:30%;">
											<?php echo app('translator')->get('messages.points'); ?>
										</th>
									</tr>
									</thead>
									<tbody>
									<?php foreach($record_lists as $one): ?>
									<tr class="odd gradeX">
										<td>
											<?php echo e($one->groupid); ?>

										</td>
										<td>
											<?php echo e($one->username); ?>

										</td>
										<td>
											<?php echo e($one->name); ?>

										</td>
										<td>
											<a href="javascript:;" class="value" data-type="text" data-pk="<?php echo e($one->id); ?>" data-original-title="<?php echo app('translator')->get('messages.points'); ?>" data-placeholder="<?php echo app('translator')->get('messages.enter_points'); ?>" data-name="value">
											<?php echo e($one->value); ?> </a>
										</td>
									</tr>
									<?php endforeach; ?>
									</tbody>
									</table>
								</div>
							</div>
						</div>
					<!-- END EXAMPLE TABLE PORTLET-->
					</div>
				</div>
			</div>
		</div>
	</div>
<input type="hidden" id="_token" name="_token" value="<?php echo e(csrf_token()); ?>">
	
<?php $__env->stopSection(); ?>

<?php $__env->startSection('plugins_page_level'); ?>

<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/jquery-validation/js/jquery.validate.min.js')); ?>"></script>

<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootbox/bootbox.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-timepicker/js/bootstrap-timepicker.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/clockface/js/clockface.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-daterangepicker/moment.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-daterangepicker/daterangepicker.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js')); ?>"></script>

<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-select/bootstrap-select.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/select2/js/select2.min.js')); ?>"></script>

<!-- BEGIN X-EDITABLE PLUGIN-->
<script src="<?php echo e(asset('assets/global/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js')); ?>" type="text/javascript"></script>
<script src="<?php echo e(asset('assets/global/plugins/bootstrap-editable/inputs-ext/address/address.js')); ?>" type="text/javascript"></script>
<script src="<?php echo e(asset('assets/global/plugins/bootstrap-editable/inputs-ext/wysihtml5/wysihtml5.js')); ?>" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/datatables/media/js/jquery.dataTables.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js')); ?>"></script>

<!-- END X-EDITABLE PLUGIN-->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js_page_level'); ?>
<script>
$(document).ready(function(){
	//global settings 
    $.fn.editable.defaults.inputclass = 'form-control';
    $.fn.editable.defaults.url = '<?php echo e(action("RecordController@updateList")); ?>';
    $.fn.editable.defaults.mode = 'inline';
  	$.fn.editable.defaults.params = function (params) {
	    params._token = $("#_token").val();
	    return params;
	};  

    $('.value').editable({
	    url: '<?php echo e(action("RecordController@updateList")); ?>'
	});

	$('.datatable').dataTable({
		// Internationalisation. For more info refer to http://datatables.net/manual/i18n
		"language": {
		    "aria": {
		        "sortAscending": ": activate to sort column ascending",
		        "sortDescending": ": activate to sort column descending"
		    },
		    "emptyTable": "<?php echo app('translator')->get('messages.datatable_no_data'); ?>",
		    "info": "<?php echo app('translator')->get('messages.display_from'); ?> _START_ <?php echo app('translator')->get('messages.display_to'); ?> _END_ <?php echo app('translator')->get('messages.then_total'); ?> _TOTAL_ <?php echo app('translator')->get('messages.records'); ?>",
		    "infoEmpty": "<?php echo app('translator')->get('messages.no_match'); ?>",
		    "infoFiltered": "(<?php echo app('translator')->get('messages.from'); ?> _MAX_ <?php echo app('translator')->get('messages.records_filter'); ?>)",
		    "lengthMenu": "<?php echo app('translator')->get('messages.display'); ?> _MENU_ <?php echo app('translator')->get('messages.records'); ?>",
		    "search": "<?php echo app('translator')->get('messages.quick_filter'); ?>:",
		    "zeroRecords": "<?php echo app('translator')->get('messages.no_data'); ?>",
		    "paginate": {
		        "previous":"<?php echo app('translator')->get('messages.last_page'); ?>",
		        "next": "<?php echo app('translator')->get('messages.next_page'); ?>",
		        "last": "<?php echo app('translator')->get('messages.lastest'); ?>",
		        "first": "<?php echo app('translator')->get('messages.most_previous'); ?>"
		    }
		},

		"lengthMenu": [
		    [10, 20, 50, -1],
		    [10, 20, 50, "All"] // change per page values here
		],
		// set the initial value
		"pageLength": 10,
		"pagingType": "bootstrap_full_number",
		"columnDefs": [{  // set default column settings
		    'orderable': false,
		    'targets': [0]
		}, {
		    "searchable": false,
		    "targets": [0]
		}]
	});
});

</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.manage', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>