<?php $__env->startSection('title'); ?>
    <title><?php echo e(__('Order Details')); ?></title>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('admin-content'); ?>
    <div class="main-content">
        <section class="section">
            <?php if (isset($component)) { $__componentOriginaldbbc880c47f621cda59b70d6eb356b2f = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginaldbbc880c47f621cda59b70d6eb356b2f = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.breadcrumb','data' => ['title' => ''.e(__('Order Details')).'','list' => [
                __('Dashboard') => route('admin.dashboard'),
                __('Order Details') => '#',
            ]]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.breadcrumb'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => ''.e(__('Order Details')).'','list' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute([
                __('Dashboard') => route('admin.dashboard'),
                __('Order Details') => '#',
            ])]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginaldbbc880c47f621cda59b70d6eb356b2f)): ?>
<?php $attributes = $__attributesOriginaldbbc880c47f621cda59b70d6eb356b2f; ?>
<?php unset($__attributesOriginaldbbc880c47f621cda59b70d6eb356b2f); ?>
<?php endif; ?>
<?php if (isset($__componentOriginaldbbc880c47f621cda59b70d6eb356b2f)): ?>
<?php $component = $__componentOriginaldbbc880c47f621cda59b70d6eb356b2f; ?>
<?php unset($__componentOriginaldbbc880c47f621cda59b70d6eb356b2f); ?>
<?php endif; ?>

            <div class="section-body">
                <div class="row">
                    <div class="col-12 col-md-6">
                        <div class="card">
                            <div class="card-header">
                                <?php if (isset($component)) { $__componentOriginalf4c3b1ff82926c29625e584896e80d5a = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf4c3b1ff82926c29625e584896e80d5a = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.form-title','data' => ['text' => __('Patient Information')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.form-title'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['text' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('Patient Information'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf4c3b1ff82926c29625e584896e80d5a)): ?>
<?php $attributes = $__attributesOriginalf4c3b1ff82926c29625e584896e80d5a; ?>
<?php unset($__attributesOriginalf4c3b1ff82926c29625e584896e80d5a); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf4c3b1ff82926c29625e584896e80d5a)): ?>
<?php $component = $__componentOriginalf4c3b1ff82926c29625e584896e80d5a; ?>
<?php unset($__componentOriginalf4c3b1ff82926c29625e584896e80d5a); ?>
<?php endif; ?>
                            </div>
                            <div class="card-body">
                                <div class="table-responsive text-center">
                                    <table class="table table-striped">

                                        <tr>
                                            <td><?php echo e(__('Name')); ?></td>
                                            <td><a
                                                    href="<?php echo e(route('admin.customer-show', $order?->user_id)); ?>"><?php echo e($order?->user?->name); ?></a>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td><?php echo e(__('Email')); ?></td>
                                            <td><?php echo e($order?->user?->email); ?></td>
                                        </tr>

                                        <tr>
                                            <td><?php echo e(__('Phone')); ?></td>
                                            <td><?php echo e($order?->user?->details?->phone); ?></td>
                                        </tr>

                                        <tr>
                                            <td><?php echo e(__('Age')); ?></td>
                                            <td><?php echo e($order?->user?->details?->age); ?></td>
                                        </tr>
                                        <tr>
                                            <td><?php echo e(__('Gender')); ?></td>
                                            <td><?php echo e($order?->user?->details?->gender); ?></td>
                                        </tr>
                                    </table>
                                </div>
                            </div>

                        </div>
                    </div>

                    <div class="col-12 col-md-6">
                        <div class="card">
                            <div class="card-header">
                                <?php if (isset($component)) { $__componentOriginalf4c3b1ff82926c29625e584896e80d5a = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf4c3b1ff82926c29625e584896e80d5a = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.form-title','data' => ['text' => __('Billing Information')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.form-title'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['text' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('Billing Information'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf4c3b1ff82926c29625e584896e80d5a)): ?>
<?php $attributes = $__attributesOriginalf4c3b1ff82926c29625e584896e80d5a; ?>
<?php unset($__attributesOriginalf4c3b1ff82926c29625e584896e80d5a); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf4c3b1ff82926c29625e584896e80d5a)): ?>
<?php $component = $__componentOriginalf4c3b1ff82926c29625e584896e80d5a; ?>
<?php unset($__componentOriginalf4c3b1ff82926c29625e584896e80d5a); ?>
<?php endif; ?>
                            </div>
                            <div class="card-body">
                                <div class="table-responsive text-center">
                                    <table class="table table-striped">
                                        <tr>
                                            <td><?php echo e(__('Fee')); ?></td>
                                            <td><?php echo e(specific_currency_with_icon($order?->payable_currency, $order?->total_payment)); ?></td>
                                        </tr>
                                        <tr>
                                            <td><?php echo e(__('Payment Method')); ?></td>
                                            <td><?php echo e($order?->payment_method); ?></td>
                                        </tr>
                                        <tr>
                                            <td><?php echo e(__('Transaction')); ?></td>
                                            <td><?php echo e($order?->payment_transaction_id); ?>  </td>
                                        </tr>
                                        <tr>
                                            <td><?php echo e(__('Date')); ?></td>
                                            <td><?php echo e(formattedDate($order?->created_at)); ?></td>
                                        </tr>

                                        <tr>
                                            <td><?php echo e(__('Payment Status')); ?></td>
                                            <td>
                                                <?php if($order?->payment_status == 1): ?>
                                                    <div class="badge bg-success"><?php echo e(__('Approved')); ?> <?php echo e(__('on')); ?> - <?php echo e(formattedDate($order?->approved_date)); ?></div>
                                                <?php elseif($order?->payment_status == 'rejected'): ?>
                                                    <div class="badge bg-danger"><?php echo e(__('Rejected')); ?></div>
                                                <?php else: ?>
                                                    <div class="badge bg-danger"><?php echo e(__('Pending')); ?></div>
                                                <?php endif; ?>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>

                        </div>
                    </div>


                    <div class="col-12 col-md-12 col-lg-12">
                        <div class="card">
                            <div class="card-header">
                                <?php if (isset($component)) { $__componentOriginalf4c3b1ff82926c29625e584896e80d5a = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf4c3b1ff82926c29625e584896e80d5a = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.form-title','data' => ['text' => __('Appointment Information')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.form-title'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['text' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('Appointment Information'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf4c3b1ff82926c29625e584896e80d5a)): ?>
<?php $attributes = $__attributesOriginalf4c3b1ff82926c29625e584896e80d5a; ?>
<?php unset($__attributesOriginalf4c3b1ff82926c29625e584896e80d5a); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf4c3b1ff82926c29625e584896e80d5a)): ?>
<?php $component = $__componentOriginalf4c3b1ff82926c29625e584896e80d5a; ?>
<?php unset($__componentOriginalf4c3b1ff82926c29625e584896e80d5a); ?>
<?php endif; ?>
                            </div>
                            <div class="card-body text-center">
                                <div class="table-responsive">
                                    <table class="table table-striped">
                                        <tr>
                                            <th><?php echo e(__('SN')); ?></th>
                                            <th><?php echo e(__('Doctor')); ?></th>
                                            <th><?php echo e(__('Email')); ?></th>
                                            <th><?php echo e(__('Phone')); ?></th>
                                            <th><?php echo e(__('Schedule')); ?></th>
                                            <th><?php echo e(__('Date')); ?></th>
                                            <th><?php echo e(__('Fee')); ?></th>
                                        </tr>

                                        <?php $__empty_1 = true; $__currentLoopData = $order?->appointments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $appointment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                            <tr>
                                                <td><?php echo e(++$index); ?></td>
                                                <td><?php echo e($appointment?->doctor?->name); ?></td>
                                                <td><?php echo e($appointment?->doctor?->email); ?></td>
                                                <td><?php echo e($appointment?->doctor?->phone); ?></td>
                                                <td><?php echo e(strtoupper($appointment?->schedule?->start_time) . '-' . strtoupper($appointment?->schedule?->end_time)); ?>

                                                </td>
                                                <td><?php echo e(formattedDate($appointment->date)); ?></td>
                                                <td><?php echo e(specific_currency_with_icon($appointment?->payable_currency, $appointment->appointment_fee)); ?></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                            <?php if (isset($component)) { $__componentOriginal875c7a0bb47165de86ff51577f723b01 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal875c7a0bb47165de86ff51577f723b01 = $attributes; } ?>
<?php $component = App\View\Components\EmptyTable::resolve(['name' => __(''),'route' => '','create' => 'no','message' => __('No data found!'),'colspan' => '7'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('empty-table'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\EmptyTable::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal875c7a0bb47165de86ff51577f723b01)): ?>
<?php $attributes = $__attributesOriginal875c7a0bb47165de86ff51577f723b01; ?>
<?php unset($__attributesOriginal875c7a0bb47165de86ff51577f723b01); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal875c7a0bb47165de86ff51577f723b01)): ?>
<?php $component = $__componentOriginal875c7a0bb47165de86ff51577f723b01; ?>
<?php unset($__componentOriginal875c7a0bb47165de86ff51577f723b01); ?>
<?php endif; ?>
                                        <?php endif; ?>
                                    </table>
                                </div>
                            </div>

                        </div>
                    </div>

                    <div class="col">
                        <?php if($order?->payment_status == 0): ?>
                            <a href="javascript:;" class="btn btn-success" onclick="event.preventDefault(); $('#approvePayment').trigger('submit');"><?php echo e(__('Approve Payment')); ?></a>
                            <form id="approvePayment" action="<?php echo e(route('admin.order-payment-approved', $order?->id)); ?>"
                                method="POST" class="d-none">
                                <?php echo csrf_field(); ?>
                            </form>
                            <a href="" data-url="<?php echo e(route('admin.order-delete', $order?->id)); ?>"
                                    class="btn btn-danger delete"><?php echo e(__('Delete Order')); ?></a>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <div class="modal fade" tabindex="-1" role="dialog" id="delete">
        <div class="modal-dialog" role="document">
            <form action="" method="POST">
                <?php echo csrf_field(); ?>
                <?php echo method_field('DELETE'); ?>
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title"><?php echo e(__('Delete Order')); ?></h5>
                        <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
                    </div>
                    <div class="modal-body">
                        <p class="text-danger"><?php echo e(__('Are you sure to delete this order ?')); ?></p>
                    </div>
                    <div class="modal-footer">
                        <?php if (isset($component)) { $__componentOriginal60a020e5340f3f52bbc4501dc9f93102 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.button','data' => ['variant' => 'danger','dataBsDismiss' => 'modal','text' => ''.e(__('Close')).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['variant' => 'danger','data-bs-dismiss' => 'modal','text' => ''.e(__('Close')).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $attributes = $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $component = $__componentOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
                        <?php if (isset($component)) { $__componentOriginal60a020e5340f3f52bbc4501dc9f93102 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.button','data' => ['type' => 'submit','text' => ''.e(__('Yes, Delete')).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('admin.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'submit','text' => ''.e(__('Yes, Delete')).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $attributes = $__attributesOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__attributesOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102)): ?>
<?php $component = $__componentOriginal60a020e5340f3f52bbc4501dc9f93102; ?>
<?php unset($__componentOriginal60a020e5340f3f52bbc4501dc9f93102); ?>
<?php endif; ?>
                    </div>
                </div>
            </form>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('js'); ?>
    <script>
        $(function() {
            'use strict'

            $('.delete').on('click', function(e) {
                e.preventDefault();
                const modal = $('#delete');
                modal.find('form').attr('action', $(this).data('url'));
                modal.modal('show');
            })
        })
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('admin.master_layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\laragon\www\docment_latest\main_files\Modules/Order\resources/views/show.blade.php ENDPATH**/ ?>