Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/rentpix.corals.io/Corals/modules/RentPix/resources/views/inspections/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/rentpix.corals.io/Corals/modules/RentPix/resources/views/inspections/details.blade.php
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
          integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
    {!! Theme::css('plugins/font-awesome/css/font-awesome.min.css') !!}
    <title>@lang('RentPix::module.inspection.title_singular') [{{ $inspection->code }}]</title>
    <meta name="csrf-token" content="{{ csrf_token() }}">
    {!! Theme::css('plugins/sweetalert2/dist/sweetalert2.css') !!}
    {!! Theme::css('plugins/toastr/toastr.min.css') !!}

    {!! Theme::css('plugins/select2/dist/css/select2.min.css') !!}

    <link rel="shortcut icon" href="{{ \Settings::get('site_favicon') }}" type="image/png">
    <!-- sweetalert2 -->
    {!! \Html::style('assets/corals/plugins/lightbox2/css/lightbox.min.css') !!}
    {!! \Html::style('assets/themes/rentpix/css/custom.css') !!}
    {!! \Html::style('https://cdn.plyr.io/3.7.3/plyr.css') !!}
    <style>
        html {
            font-size: 14px;
        }

        .details-table th {
            width: 150px;
        }

        @page {
            size: auto
        }

        .no-break {
            page-break-inside: avoid;
        }
    </style>
</head>
<body>
<div class="container-fluid">
    <div class="d-flex align-items-center justify-content-between bg-dark p-2 mb-2" style="color: #FFF">
        <a href="{{ url('/') }}">
            <img class="site_logo img-responsive"
                 style="width: 150px; margin: 0 auto;"
                 src="{{ \Settings::get('site_logo') }}">
        </a>
        <h5 class="d-inline-block m-0">@lang('RentPix::module.inspection.title_singular') [ <span
                class="font-weight-bold">{!! $inspection->present('code_without_link') !!}</span> ]</h5>
        <ul class="list-inline m-0">
            <li class="list-inline-item">
                <small>@lang('RentPix::attributes.inspection.type'):</small> {!! $inspection->present('type') !!}
            </li>
            <li class="list-inline-item">
                <small>@lang('Corals::attributes.status')
                    :</small> {!! $inspection->present('status') !!}
            </li>
            <li class="list-inline-item">
                <small>@lang('RentPix::attributes.inspection.inspected_at'):</small>
                <b>{!!   $inspection->present('inspected_at') !!}</b>
            </li>
        </ul>
    </div>
    @php( $reservation = $inspection->reservation)
    @php( $unit = $reservation->unit)
    <div class="row">
        <div class="col-lg-3 col-sm-12">
            <div>
                <h5 class="section-title">
                    @lang('RentPix::module.reservation.title_singular') [ <span
                        class="font-weight-bold">{!! $reservation->present('code_without_link') !!}</span> ]
                    {!! $reservation->present('type')!!}
                    {!! $reservation->present('rental_status') !!}
                </h5>
                <table class="table table-striped table-sm details-table">
                    <tbody>
                    <tr>
                        <th>@lang('RentPix::attributes.reservation.starts_at')</th>
                        <td>{!! $reservation->present('starts_at') !!}</td>
                    </tr>
                    <tr>
                        <th>@lang('RentPix::attributes.reservation.ends_at')</th>
                        <td>{!! $reservation->present('ends_at') !!}</td>
                    </tr>
                    <tr>
                        <th>@lang('RentPix::attributes.reservation.start_location')</th>
                        <td>{{ $reservation->start_location['name'] }}</td>
                    </tr>
                    <tr>
                        <th>@lang('RentPix::attributes.reservation.end_location')</th>
                        <td>{{ $reservation->end_location['name'] }}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div>
                <h5 class="section-title">
                    @lang('RentPix::module.unit.title_singular') [ <span
                        class="font-weight-bold">{!! $unit->present('code_without_link') !!}</span> ]
                    {!! $unit->present('status') !!}
                </h5>
                <table class="table table-striped table-sm details-table">
                    <tbody>
                    <tr>
                        <th>@lang('RentPix::attributes.unit.vin')</th>
                        <td>{!! $unit->present('vin') !!}</td>
                    </tr>
                    <tr>
                        <th>@lang('RentPix::attributes.unit.license')</th>
                        <td>{!! $unit->present('license') !!}</td>
                    </tr>
                    <tr>
                        <th>@lang('RentPix::attributes.unit.engine')</th>
                        <td>{!! $unit->present('engine') !!}</td>
                    </tr>
                    <tr>
                        <th>@lang('RentPix::attributes.unit.make')</th>
                        <td>{!! $unit->present('make') !!}</td>
                    </tr>
                    <tr>
                        <th>@lang('RentPix::attributes.unit.model')</th>
                        <td>{!! $unit->present('model') !!}</td>
                    </tr>
                    <tr>
                        <th>@lang('RentPix::attributes.unit.model_year')</th>
                        <td>{!! $unit->present('model_year') !!}</td>
                    </tr>
                    <tr>
                        <th>@lang('RentPix::attributes.unit.rate_code')</th>
                        <td>{!! $unit->present('rate_code') !!}</td>
                    </tr>
                    @if($unit->last_inspection_at)
                        <tr>
                            <th>@lang('RentPix::attributes.unit.last_inspection')</th>
                            <td>{!! $unit->present('last_inspection_at') !!}</td>
                        </tr>
                    @endif
                    </tbody>
                </table>
            </div>
            @if($customer = $reservation->customer)
                <div>
                    <h5 class="section-title">@lang('RentPix::module.customer.title_singular')
                        @if($customer->type == 'personal')
                            [ <span class="font-weight-bold">{!! $customer->present('full_name') !!}</span> ]
                        @elseif($customer->type == 'corporate')
                            <td class="font-weight-bold">{!! $customer->present('name') !!}</td>
                        @endif
                        {!! $customer->present('type') !!}</h5>
                    <table class="table table-striped table-sm details-table">
                        <tbody>
                        <tr>
                            <th>@lang('RentPix::attributes.customer.phone')</th>
                            <td>{!! $customer->present('phone') !!}</td>
                        </tr>
                        <tr>
                            <th>@lang('RentPix::attributes.customer.email')</th>
                            <td>{!! $customer->present('email') !!}</td>
                        </tr>
                        <tr>
                            <th>@lang('RentPix::attributes.customer.alt_email')</th>
                            <td>{!! $customer->present('alt_email') !!}</td>
                        </tr>
                        <tr>
                            <th>@lang('RentPix::attributes.customer.address')</th>
                            <td>{!! $customer->present('address') !!}</td>
                        </tr>
                        <tr>
                            <th>@lang('RentPix::attributes.customer.city')</th>
                            <td>{!! $customer->present('city') !!}</td>
                        </tr>
                        <tr>
                            <th>@lang('RentPix::attributes.customer.state')</th>
                            <td>{!! $customer->present('state') !!}</td>
                        </tr>
                        <tr>
                            <th>@lang('RentPix::attributes.customer.zip')</th>
                            <td>{!! $customer->present('zip') !!}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            @endif
            <div>
                <h4>Notes</h4>
                @forelse($inspection->reservation->comments as $comment)
                    <div class="mr-2 mb-2 border p-1">
                        <h5>{{ $comment->body }}</h5>
                        <small
                            class="text-muted text-sm">{{!empty($comment->properties['agent']) ? $comment->properties['agent'] : $comment->comment_author->full_name }} {{ $comment->created_at->diffForHumans() }}</small>
                    </div>
                @empty
                    <div class="mr-2 mb-2 border p-1">
                        @lang('Corals::labels.no_data_found')
                    </div>
                @endforelse
            </div>
        </div>
        <div class="col-lg-9 col-sm-12">
            @foreach($listOfValues as $parent => $children)
                <h3>{{ $parent }}</h3>
                <hr/>
                <div class="d-flex flex-wrap">
                    @foreach($children as $code => $label)
                        <div class="mr-2 mb-4 border p-1">
                            <h6>{{ $label }}</h6>
                            <div class="d-flex flex-wrap no-break">
                                @forelse($inspection->media()->where('collection_name',$code)->get() as $media)
                                    <div class="position-relative">
                                        <div class="photo-section"
                                             data-src="{{ \URL::temporarySignedRoute('inspection-media',now()->addMinutes(60),['mediaId'=>$media->id,'view'=>'prompted-photo']) }}">
                                            <i class="fa fa-spinner fa-spin"></i>
                                        </div>
                                        @can('RentPix::inspection.update')
                                            <div class="position-absolute switch-media"
                                                 style="top:7px;left: 7px;display:none;">
                                                <button class="btn btn-secondary"
                                                        data-media-id="<?php echo $media->id; ?>">
                                                    <i class="fa fa-cog" aria-hidden="true"></i>
                                                </button>
                                            </div>
                                        @endcan
                                    </div>
                                @empty
                                    <h6 class="text-muted align-self-center">No media found.</h6>
                                @endforelse
                            </div>
                        </div>
                    @endforeach
                </div>
            @endforeach
            <h3>Drivers</h3>
            <hr/>
            @forelse($inspection->drivers as $driver)
                @php($driver_data = data_get(json_decode($driver->pivot->properties??"", true)??[],'driver_data'))
                @php($driver->fill($driver_data))
                <div class="driver-section">
                    <h5 class="section-title">
                        @lang('RentPix::module.driver.title_singular')
                        [<span class="font-weight-bold">{!! $driver->presentStripTags('name') !!} </span>]
                        @if($driver->pivot->is_primary)
                            <span class="badge badge-info">Primary</span>
                        @elseif(user() && user()->can('RentPix::inspection.update'))
                            {!! CoralsForm::link( url("rentpix/inspections/$inspection->hashed_id/set-as-primary/$driver->hashed_id"), "Set As Primary", [
                                'class' => 'btn btn-primary btn-sm',
                                'data' =>[
                                    'action' => 'post',
                                    'page_action' => 'site_reload',
                                    'confirmation' => "You will set $driver->name as primary driver?",
                                    ],
                                ]) !!}
                        @endif
                    </h5>
                    <table class="table table-striped table-sm">
                        <tbody>
                        <tr>
                            <td>
                                <strong>@lang('RentPix::attributes.driver.phone'):</strong>
                                {!! $driver->present('phone') !!}
                            </td>
                            <td>
                                <strong>@lang('RentPix::attributes.driver.email'):</strong>
                                {!! $driver->present('email') !!}
                            </td>
                            <td>
                                <strong>@lang('RentPix::attributes.driver.dob'):</strong>
                                {!! $driver->present('dob') !!}
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>@lang('RentPix::attributes.driver.address'):</strong>
                                {!! $driver->present('address') !!}
                            </td>
                            <td>
                                <strong>@lang('RentPix::attributes.driver.license'):</strong>
                                {!! $driver->present('license') !!}
                            </td>
                            <td>
                                <strong>@lang('RentPix::attributes.driver.license_expiration_date'):</strong>
                                {!! $driver->present('license_expiration_date') !!}
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    @if($messages = data_get(json_decode($driver->pivot->properties??"", true)??[],'messages'))
                        <div class="row">
                            <div class="col-md-8">
                                <ul class="list-unstyled">
                                    @foreach($messages as $message)
                                        <li>
                                               <span class="p-1 {{ 'bg-'. data_get($message, 'level', 'secondary') }}">
                                                   {{ data_get($message, 'text') }}
                                               </span>
                                        </li>
                                    @endforeach
                                </ul>
                            </div>
                        </div>
                    @endif
                    <div class="d-flex flex-wrap">
                        @foreach(\ListOfValues::get('rentPix_driver_document_photos') as $code => $label)
                            <div class="mr-2 mb-4 border p-1 no-break">
                                <h6>{{ $label }}</h6>
                                <div class="d-flex flex-wrap">
                                    @forelse($inspection->media()->where('driver_id', $driver->id)->where('collection_name',$code)->get() as $media)
                                        <div class="photo-section"
                                             data-src="{{ \URL::temporarySignedRoute('inspection-media',now()->addMinutes(60),['mediaId'=>$media->id,'view'=>'driver-photo']) }}">
                                            <i class="fa fa-spinner fa-spin"></i>
                                        </div>
                                    @empty
                                        <h6 class="text-muted">No images found.</h6>
                                    @endforelse
                                </div>
                            </div>
                        @endforeach
                    </div>
                    <hr/>
                </div>
            @empty
                <div>
                    <h4 class="text-muted">This inspection doesn't have drivers.</h4>
                </div>
            @endforelse
        </div>
    </div>
</div>
@include('partials.footer')

</body>

<!-- jQuery 3 -->
{!! Theme::js('plugins/jquery/dist/jquery.min.js') !!}

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
        crossorigin="anonymous"></script>

<!-- plyr js -->
<script src="https://cdn.plyr.io/3.7.3/plyr.js"></script>

<!-- corals js -->
{!! \Html::script('assets/corals/plugins/lightbox2/js/lightbox.min.js') !!}

{!! Theme::js('plugins/sweetalert2/dist/sweetalert2.all.min.js') !!}
{!! Theme::js('plugins/toastr/toastr.min.js') !!}

{!! \Html::script('assets/corals/js/corals_functions.js') !!}
{!! \Html::script('assets/corals/js/corals_main.js') !!}

{!! Theme::js('plugins/select2/dist/js/select2.full.min.js') !!}

<script>
    $(document).ready(function () {
        const player = new Plyr(document.querySelector('.js-player'));

        $('.photo-section').each(function () {
            let el = $(this);
            let src = el.data('src');

            el.load(src);
        })
    })
</script>
@can('RentPix::inspection.update')
    <div class="modal fade" id="switchMediaModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">Switch Media</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="mr-2 mb-4 p-1">
                        <h6 id="modalHeader"></h6>
                        <div class="text-center">
                            <img id="modalImg" class="img-thumbnail lazy" alt="img">
                        </div>
                    </div>
                    <form action="{{  url('rentpix/inspections/switch-media-inspection') }}" method="post"
                          id="switchMediaForm">
                        @csrf
                        <input type="hidden" id="mediaId" name="media_id">
                        {!! CoralsForm::select2("inspection_id",  'Target Inspection' , [], true, [], [
                                'class'=>'select2-ajax',
                                'data'=>[
                                    'model'=> \Corals\Modules\RentPix\Models\Inspection::class,
                                    'columns'=> json_encode(['code']),
                                    'selected' => json_encode([]),
                                    ]]) !!}
                        <div class="text-right mt-5">
                            <button type="submit" class="btn btn-info">Submit</button>
                            <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    @include('Corals::corals_main')

    <script>
        function themeConfirmation(title, text, type, confirm_btn, cancel_btn, callback, dismiss_callback) {
            swal({
                title: title,
                text: text,
                type: type,
                showCancelButton: true,
                animation: true,
                // customClass: 'animated tada',
                confirmButtonColor: "#ff7014",
                confirmButtonText: confirm_btn,
                cancelButtonText: cancel_btn
            }).then(
                function () {
                    if (typeof callback === "function") {
                        // Call it, since we have confirmed it is callable​
                        callback();
                    }
                }, function (dismiss) {
                    if (window.Ladda) {
                        Ladda.stopAll();
                    }
                    if (typeof dismiss_callback === "function") {
                        // Call it, since we have confirmed it is callable​

                        dismiss_callback()
                    }
                });
        }

        function themeNotify(data) {

            if (undefined == data.level && undefined == data.message) {

                if (undefined != data.responseJSON) {
                    data = data.responseJSON;
                }

                var level = 'error';
                var message = data.message;
                var errors = data.errors;
            } else {
                var level = data.level;
                var message = data.message;
            }

            if (undefined != errors) {
                message += "<br>";
                $.each(errors, function (key, val) {
                    message += val + "<br>";
                });
            }
            if (undefined == level && undefined == message) {
                level = 'error';
                message = 'Something went wrong!!';
            }

            toastr[level](message);
        }

        $(document).ready(function () {

            $('.photo-section').hover(function () {
                $(this).next('.switch-media').show();
            }, function () {
                $(this).next('.switch-media').hide();
            });
            $('.switch-media').hover(function () {
                $(this).show();
            }, function () {
                $(this).hide();
            });

            $('.switch-media').on('click', function () {
                var mediaId = $(this).find('button').data('media-id');
                $('#mediaId').val(mediaId);

                var url = $(this).prev(".photo-section").find("img").attr("src");
                $('#modalImg').attr('src', url)

                var h6 = $(this).closest('.border').find('h6').text();
                $('#modalHeader').text(h6)

                $('#switchMediaModal').modal('show');
            });

            $("#switchMediaForm").submit(function (e) {
                e.preventDefault();
                let form = $(this);
                form.find('button').prop('disabled', true);

                $.ajax({
                    type: "POST",
                    url: $(this).attr("action"),
                    dataType: 'json',
                    data: form.serialize(),
                    success: function (response) {
                        themeNotify(response);
                        $('#switchMediaModal').modal('hide');
                        setTimeout(function () {
                            window.location.reload();
                        }, 500);
                    },
                    error: function (response, textStatus, errorThrown) {
                        form.find('button').prop('disabled', false);
                        themeNotify(response);
                    }
                });
            });

        });
    </script>
@else
    <script>
        function initSelect2ajax() {
        }
    </script>
@endcan
</html>

Spamworldpro Mini