File: /home/armgroup/libs/storage/framework/views/a9bad133479bc043929af92fb679a099cd8c864c.php
<?php $__env->startSection('title', "پنل مدیریت | ویرایش سفارش"); ?>
<?php $__env->startSection('content'); ?>
<div class="content-wrapper">
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0 text-dark">ویرایش سفارش</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-left">
<?php echo e(Breadcrumbs::render('orders-edit', $order)); ?>
</ol>
</div>
</div>
</div>
</div>
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card card-primary">
<div class="card-body">
<div class="mb-3">
<?php if($order->delivery_code && $order->delivery_date): ?>
<h5 class="text-center">ارسال لینک صفحه تایید تحویل سفارش به پیک (کد
تحویل: <?php echo e(to_persian_numbers($order->delivery_code)); ?>)</h5>
<?php
if (! isset($_instance)) {
$html = \Livewire\Livewire::mount('admin.order.verify-delivery-link', ['order' => $order])->html();
} elseif ($_instance->childHasBeenRendered('8MDob1X')) {
$componentId = $_instance->getRenderedChildComponentId('8MDob1X');
$componentTag = $_instance->getRenderedChildComponentTagName('8MDob1X');
$html = \Livewire\Livewire::dummyMount($componentId, $componentTag);
$_instance->preserveRenderedChild('8MDob1X');
} else {
$response = \Livewire\Livewire::mount('admin.order.verify-delivery-link', ['order' => $order]);
$html = $response->html();
$_instance->logRenderedChild('8MDob1X', $response->id(), \Livewire\Livewire::getRootElementTagName($html));
}
echo $html;
?>
<?php else: ?>
<?php
if (! isset($_instance)) {
$html = \Livewire\Livewire::mount('admin.order.post-tracking-code', ['order' => $order])->html();
} elseif ($_instance->childHasBeenRendered('D7HZyUN')) {
$componentId = $_instance->getRenderedChildComponentId('D7HZyUN');
$componentTag = $_instance->getRenderedChildComponentTagName('D7HZyUN');
$html = \Livewire\Livewire::dummyMount($componentId, $componentTag);
$_instance->preserveRenderedChild('D7HZyUN');
} else {
$response = \Livewire\Livewire::mount('admin.order.post-tracking-code', ['order' => $order]);
$html = $response->html();
$_instance->logRenderedChild('D7HZyUN', $response->id(), \Livewire\Livewire::getRootElementTagName($html));
}
echo $html;
?>
<?php endif; ?>
</div>
<div class="table-responsive">
<table
class="table table-hover table-condensed table-bordered table-striped tbl-card">
<thead class="thead">
<tr>
<th scope="col">خریدار</th>
<th scope="col">موبایل</th>
<th scope="col">کد پیگیری</th>
<th scope="col">قیمت (تومان)</th>
<th scope="col">نوع پرداخت</th>
<th scope="col">وضعیت</th>
<th scope="col">تاریخ ثبت سفارش</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo e($order->user->name); ?></td>
<td><?php echo e(to_persian_numbers($order->user->mobile)); ?></td>
<td><?php echo e($order->tracking_code); ?></td>
<td><?php echo e(to_persian_numbers(number_format($order->price))); ?></td>
<td>
<span class="badge badge-<?php echo e($order->payment_type->color()); ?>">
<?php echo e($order->payment_type->description); ?>
</span>
</td>
<td>
<?php
if (! isset($_instance)) {
$html = \Livewire\Livewire::mount('admin.order.status', ['order' => $order])->html();
} elseif ($_instance->childHasBeenRendered('dlGMirc')) {
$componentId = $_instance->getRenderedChildComponentId('dlGMirc');
$componentTag = $_instance->getRenderedChildComponentTagName('dlGMirc');
$html = \Livewire\Livewire::dummyMount($componentId, $componentTag);
$_instance->preserveRenderedChild('dlGMirc');
} else {
$response = \Livewire\Livewire::mount('admin.order.status', ['order' => $order]);
$html = $response->html();
$_instance->logRenderedChild('dlGMirc', $response->id(), \Livewire\Livewire::getRootElementTagName($html));
}
echo $html;
?>
</td>
<td><?php echo e(to_persian_numbers(jdate($order->created_at))); ?></td>
</tr>
</tbody>
</table>
</div>
<?php if($order->payment_type->is(\App\Enums\OrderPaymentType::ONLINE)): ?>
<hr>
<div class="table-responsive">
<table class="table table-hover table-condensed table-bordered table-striped tbl-card">
<thead class="thead">
<tr>
<th scope="col">شناسه تراکنش</th>
<th scope="col">کد ارجاع</th>
<th scope="col">درگاه بانکی</th>
<th scope="col">IP</th>
<th scope="col">وضعیت</th>
<th scope="col">تاریخ</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $order->payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($payment->transaction_id); ?></td>
<td><?php echo e($payment->reference_id); ?></td>
<td><?php echo e(__($payment->driver)); ?></td>
<td><?php echo e($payment->ip); ?></td>
<td>
<span class="badge badge-<?php echo e($payment->status ? 'success' : 'danger'); ?>">
<?php if($payment->status): ?>
موفق
<?php else: ?>
ناموفق
<?php if($payment->error_message): ?>
(<?php echo e($payment->error_message); ?>)
<?php endif; ?>
<?php endif; ?>
</span>
</td>
<td><?php echo e(to_persian_numbers(jdate($order->created_at))); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
<?php endif; ?>
<hr>
<div class="text-center">
<small class="text-danger">
<u><span class="fa fa-info-circle"></span> برای حذف محصول از سفارش تعداد آنرا صفر کنید</u>
</small>
</div>
<div class="table-responsive">
<table
class="table table-hover table-condensed table-bordered table-striped tbl-card">
<thead>
<tr class="text-center">
<th>#</th>
<th>نام</th>
<th>کد</th>
<th>تعداد</th>
<th>قیمت واحد</th>
<th>تخفیف واحد</th>
<th>جمع کل</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $orderProducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $orderProduct): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr class="text-center">
<td><?php echo e($loop->iteration); ?></td>
<td>
<?php if($orderProduct->product->slug): ?>
<a href="<?php echo e(route('products.show', $orderProduct->product->slug)); ?>"
class="text-dark"
target="_blank">
<?php echo e($orderProduct->name); ?>
</a>
<?php else: ?>
<?php echo e($orderProduct->name); ?>
<?php endif; ?>
</td>
<td><?php echo e($orderProduct->product->code); ?></td>
<?php
if (! isset($_instance)) {
$html = \Livewire\Livewire::mount('admin.order.update-quantity', ['quantity' => $orderProduct->quantity,'orderProduct' => $orderProduct,'order' => $order,'orderProductsCount' => count($orderProducts),'product' => $orderProduct->product])->html();
} elseif ($_instance->childHasBeenRendered($loop->index)) {
$componentId = $_instance->getRenderedChildComponentId($loop->index);
$componentTag = $_instance->getRenderedChildComponentTagName($loop->index);
$html = \Livewire\Livewire::dummyMount($componentId, $componentTag);
$_instance->preserveRenderedChild($loop->index);
} else {
$response = \Livewire\Livewire::mount('admin.order.update-quantity', ['quantity' => $orderProduct->quantity,'orderProduct' => $orderProduct,'order' => $order,'orderProductsCount' => count($orderProducts),'product' => $orderProduct->product]);
$html = $response->html();
$_instance->logRenderedChild($loop->index, $response->id(), \Livewire\Livewire::getRootElementTagName($html));
}
echo $html;
?>
<td><?php echo e(to_persian_numbers(number_format($orderProduct->price + $orderProduct->discount))); ?></td>
<td><?php echo e(to_persian_numbers(number_format($orderProduct->discount))); ?></td>
<td><?php echo e(to_persian_numbers(number_format($orderProduct->price * $orderProduct->quantity))); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
<tfoot>
<?php if($order->discount_code_price): ?>
<tr>
<th colspan="6">
کد تخفیف
<?php if($order->discountCode->title): ?>
<a href="<?php echo e(route('admin.discounts.show', $order->discountCode->id)); ?>"
target="_blank">
(<?php echo e($order->discountCode->title); ?>)
</a>
<?php endif; ?>
</th>
<td class="text-center"><?php echo e(to_persian_numbers(number_format($order->discount_code_price))); ?></td>
</tr>
<?php endif; ?>
<?php if($order->discount): ?>
<tr>
<th colspan="6">مجموع تخفیف</th>
<td class="text-center"><?php echo e(to_persian_numbers(number_format($order->discount + $order->discount_code_price))); ?></td>
</tr>
<?php endif; ?>
<tr>
<th colspan="6">هزینه ارسال
(<?php echo e(is_null($order->shipping_type) ? 'رایگان' : \App\Models\Order::SHIPPING_TRANSLATE[$order->shipping_type]); ?>
)
</th>
<td class="text-center">
<?php
if (! isset($_instance)) {
$html = \Livewire\Livewire::mount('admin.order.shipping-price', ['order' => $order])->html();
} elseif ($_instance->childHasBeenRendered('VBguMWo')) {
$componentId = $_instance->getRenderedChildComponentId('VBguMWo');
$componentTag = $_instance->getRenderedChildComponentTagName('VBguMWo');
$html = \Livewire\Livewire::dummyMount($componentId, $componentTag);
$_instance->preserveRenderedChild('VBguMWo');
} else {
$response = \Livewire\Livewire::mount('admin.order.shipping-price', ['order' => $order]);
$html = $response->html();
$_instance->logRenderedChild('VBguMWo', $response->id(), \Livewire\Livewire::getRootElementTagName($html));
}
echo $html;
?>
</td>
</tr>
<tr>
<th colspan="6">جمع کل</th>
<td class="text-center"><?php echo e(to_persian_numbers(number_format($order->price))); ?></td>
</tr>
</tfoot>
</table>
</div>
<hr>
<div class="table-responsive">
<table
class="table table-hover table-condensed table-bordered table-striped tbl-card">
<thead>
<tr>
<th>نام گیرنده</th>
<th>موبایل</th>
<th>کدملی</th>
<th>استان</th>
<th>شهر</th>
<th>کدپستی</th>
<th>پلاک</th>
<th>واحد</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo e($address->name); ?></td>
<td><?php echo e(to_persian_numbers($address->mobile)); ?></td>
<td><?php echo e(to_persian_numbers($address->national_code)); ?></td>
<td><?php echo e($address->city->province->name); ?></td>
<td><?php echo e($address->city->name); ?></td>
<td><?php echo e(to_persian_numbers($address->postal_code)); ?></td>
<td><?php echo e(to_persian_numbers($address->plaque)); ?></td>
<td><?php echo e(to_persian_numbers($address->floor)); ?></td>
</tr>
</tbody>
<tfoot>
<tr>
<th>آدرس کامل</th>
<td colspan="7">
<?php echo e($address->address); ?>
<?php if($address->lat && $address->lng): ?>
<div id="map"
style="height: 300px; width: inherit; margin-top: 20px;"></div>
<?php endif; ?>
</td>
</tr>
<?php if($order->delivery_date && $order->delivery_time): ?>
<tr>
<th colspan="4">تاریخ تحویل</th>
<th colspan="4">زمان تحویل</th>
</tr>
<tr>
<td colspan="4">
<?php echo e(to_persian_numbers(jdate($order->delivery_date)->format('Y/m/d'))); ?>
</td>
<td colspan="4">
<?php echo e(to_persian_numbers($order->delivery_time)); ?>
</td>
</tr>
<?php endif; ?>
</tfoot>
</table>
</div>
<?php if($order->description): ?>
<hr>
<div class="alert alert-info">
<strong>توضیحات کاربر: </strong>
<?php echo e($order->description); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<?php $__env->stopSection(); ?>
<?php if($address->lat && $address->lng): ?>
<?php $__env->startSection('header'); ?>
<link rel="stylesheet" href="<?php echo e(asset('leaflet/leaflet.css')); ?>" />
<link rel="stylesheet" href="<?php echo e(asset('Leaflet.EasyButton/src/easy-button.css')); ?>">
<style>
input[type="text"]:-moz-placeholder {
text-align: right;
}
input[type="text"]:-ms-input-placeholder {
text-align: right;
}
input[type="text"]::-webkit-input-placeholder {
text-align: right;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('footer'); ?>
<script src="<?php echo e(asset('leaflet/leaflet.js')); ?>"></script>
<script src="<?php echo e(asset('Leaflet.EasyButton/src/easy-button.js')); ?>"></script>
<script>
var map = L.map('map').setView([<?php echo e($address->lat); ?>, <?php echo e($address->lng); ?>], 14);
map.scrollWheelZoom.disable()
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '',
maxZoom: 18,
tileSize: 512,
zoomOffset: -1,
}).addTo(map);
L.easyButton( 'fa-location-arrow', function(){
window.open('https://www.google.com/maps/search/?api=1&query=<?php echo e($address->lat); ?>,<?php echo e($address->lng); ?>', '_blank');
}).addTo(map);
var marker = L.marker([<?php echo e($address->lat); ?>, <?php echo e($address->lng); ?>]).addTo(map);
</script>
<?php $__env->stopSection(); ?>
<?php endif; ?>
<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/armgroup/libs/resources/views/admin/orders/edit.blade.php ENDPATH**/ ?>