@extends('_version_02.commons.layouts.admin') @section('content') @include('_version_02.commons.layouts.partials._alert')
@php $priority_counter = 1 ; @endphp @foreach($cols as $col) @if($col != 'store_id') @if($col == 'id') @elseif(str_contains($col, 'leaf_')) @elseif(str_contains($col, '_id')) @else @endif @if($col == 'ip_address') @endif @endif @php $priority_counter ++ ; @endphp @endforeach @php $priority_counter = 1 ; $no_reading_meters = array(); @endphp @foreach($model as $index => $row) @php if($row->last_reading_at == '' || $row->last_reading_at == null) {//dd($row->last_reading_at); $no_reading_meters[$row->id] = $row; } @endphp @foreach($row->toArray() as $key => $value) @if($key == 'id') @elseif($key == 'is_power_supply_on') @elseif($key == 'status') @elseif(str_contains($key, 'leaf_room_id')) @elseif(str_contains($key, '_id') && $key != 'meter_id') @elseif($key != 'id') @endif @if($key == 'ip_address') @endif @endforeach @include('_version_02.commons.layouts.partials._table_action_column') @endforeach
#ID{{App\Language::trans(ucwords(str_replace('leaf_', ' ', str_replace('_id', '', $col))))}}{{App\Language::trans(ucwords(str_replace('_', ' ', str_replace('_id', '', $col))))}}{{App\Language::trans(ucwords(str_replace('_', ' ', $col)))}}{{App\Language::trans('Unit No.')}}{{App\Language::trans('Action')}}
{{$index+1}}{{$value}}{{App\Language::trans(($row->is_power_supply_on == '1' ? 'On' : 'Off'))}}{{$row->display_status_string($key)}}{{$row->convert_room_no($value, $rooms)}}{{$row->display_relationed($key, 'name')}}{{$value}}{{$row->convert_house_no($row->leaf_room_id, $rooms)}}
{{App\Language::trans('Meter Tag With No Reading')}}

@php $no_reading_headers = ['No.' ,'Unit No' ,'Room Name' , 'IP Address' , 'Meter Id']; $no_meter_columns = [ 'leaf_room_id' ,'ip_address' , 'meter_id']; @endphp @foreach($no_reading_headers as $col) @endforeach @php $index = 0; @endphp @foreach($no_reading_meters as $meter) @foreach($no_meter_columns as $col) @if($col == 'leaf_room_id') @else @endif @php $index ++; @endphp @endforeach @endforeach
{{ $col }}
{{$index+1}}{{$row->convert_house_no($meter[$col], $rooms)}} {{$row->convert_room_no($meter[$col], $rooms)}}{{ $meter[$col] }}
@php $no_reading_ips = array(); foreach($no_reading_meters as $meter){ array_push ( $no_reading_ips , $meter['ip_address']); } echo json_encode($no_reading_ips); @endphp
@endsection @section('script') $(document).ready(function(){ $(".room_range").ionRangeSlider({ type: "double", min: 1 , max: {{ count($model) }} , from : 1 , to : 100 , step: 0.01, grid: true, }); }); @endsection