@extends('layouts.master')

@section('styles')
    <link href="{{asset('vendor/datatables/css/jquery.dataTables.min.css') }}" rel="stylesheet">
    <link href="{{asset('vendor/datatables/responsive/responsive.css') }}" rel="stylesheet">
    <style>
        .th {
            text-align: center;
        }
        @media (max-width: 768px) {
            .row > .col-md-6 {
                margin-bottom: 20px;
            }
        }
    </style>
@endsection

@section('content')
    <div class="content-body">
        <div class="container-fluid">
            <div class="d-flex align-items-center mb-4 flex-wrap">
                {{-- <h4 class="me-auto">Job List</h4> --}}
                <div>
                <a href="new-job.html" class="btn btn-primary btn-xs me-3"><i class="fas fa-plus me-2"></i>Tiket Hilang</a>
                </div>
            </div>
            <div class="row">
                <div class="col-12">
                    <div class="card">
                        <div class="card-body">
                            <div class="row mb-4">
                                <div class="col-md-12 col-12">
                                    <div class="col-12">
                                        <h4 class="text-center">Pic Body / No. Pol</h4>
                                    </div>
                                    <div class="row">
                                        <div class="col-12 col-md-6">
                                            <img id="video_stream" src="/stream-snapshot" alt="Pic Body Masuk" style="max-width: 640; max-height: 480;">
                                            <span id="time-in" style="text-align: center;"></span>
                                        </div>
                                        <div class="col-12 col-md-6">
                                            <img id="pic_body_keluar" src="" alt="Pic Body Keluar" style="max-width: 900px; max-height: 300px;">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

@section('javascript')
    <!-- Datatable -->
    <script src="vendor/datatables/js/jquery.dataTables.min.js"></script>
    <script src="vendor/datatables/responsive/responsive.js"></script>
    {{-- <script src="js/plugins-init/datatables.init.js"></script> --}}
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>

	<script src="vendor/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
    <script src="vendor/bootstrap-datepicker-master/js/bootstrap-datepicker.min.js"></script>

    <script src="js/custom.min.js"></script>
	<script src="js/dlabnav-init.js"></script>

    {{-- <script src="js/verify.js"></script> --}}
    <script>
        setInterval(function () {
            $('#video_stream').attr('src', '/stream-snapshot?rand=' + Math.random())
        }, 500);
    </script>

@endsection