@push('css-app')
<style>

</style>
@endpush
@extends('template')
@section('content')
<?php use App\Http\Traits\Helper; ?>
<meta name="csrf-token" content="{{ csrf_token() }}">
<div class="card border-0  my-2">
    <div class="card-body">
        <form action="{{url('device/save-edit')}}" method="post">
            @csrf
            <div class="form-group">
                <label>Device Name</label>
                <input type="hidden" name="device_id" value="{{$data->device_id}}" class="form-control" />
                <input type="text" name="device_name" value="{{$data->device_name}}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Device Code</label>
                <input type="text" name="device_code" value="{{$data->device_code}}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Site</label>
                <select id="site_id" name="site_id" class="form-control">
                    <option>-</option>
                    @foreach($site_valid as $item)
                    <option value="{{$item->site_id}}" @if($item->site_id == $data->site_id) selected @endif>{{$item->sitename}}</option>
                    @endforeach
                </select>
            </div>
            <div class="form-group">
                <label>IP Address</label>
                <input type="text" name="ip_address" value="{{$data->ip_address}}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Hostname</label>
                <input type="text" name="hostname" value="{{$data->hostname}}" class="form-control" />
            </div>
            <div class="form-group">
                <label>Serial Number</label>
                <input type="text" name="serial_number" value="{{$data->serial_number}}" class="form-control" />
            </div>
            <div class="form-group">
                <label>External ID</label>
                <input type="text" name="external_id" value="{{$data->external_id}}" class="form-control" />
            </div>

            <div class="form-group">
                <button type="submit" class="btn btn-primary">Simpan</button>
            </div>
        </form>
    </div>
</div>

<!-- <script rc="https://cdn.jsdelivr.net/npm/chart.js@4.0.1/dist/chart.umd.min.js"></script> -->
@endsection
@push('js')

<script>
   
</script>
@endpush