src/Flexy/FrontBundle/Themes/IlaveU/templates/admin/shopadmin/order/orderDetail.html.twig line 1
{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% extends ea.templatePath('layout') %}
{% trans_default_domain ea.i18n.translationDomain %}
{% block head_stylesheets %}
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAhcdR3-y-tILC8ZJT-e_TOwd0Mk9uEUZM&libraries=places"></script>
{{ parent() }}
<style>
#invoice{
padding: 0;
}
p {
margin-bottom: 0.4rem;
font-size:14px;
margin-top: 0;
}
.invoice {
position: relative;
background-color: #FFF;
min-height: 680px;
padding: 15px
}
.invoice header {
padding: 10px 0;
margin-bottom: 20px;
border-bottom: 1px solid #585858
}
.invoice .company-details {
text-align: right
}
.invoice .company-details .name {
margin-top: 0;
margin-bottom: 0
}
.invoice .contacts {
margin-bottom: 20px
}
.invoice .invoice-to {
text-align: left
}
.invoice .invoice-to .to {
margin-top: 0;
margin-bottom: 0
}
.invoice .invoice-details {
text-align: right
}
.invoice .invoice-details .invoice-id {
margin-top: 0;
color: #585858
}
.invoice main {
padding-bottom: 50px
}
.invoice main .thanks {
margin-top: -100px;
font-size: 2em;
margin-bottom: 50px
}
.invoice main .notices {
margin-top: 120px;
padding-left: 6px;
border-left: 6px solid #585858
}
.invoice main .notices .notice {
font-size: 1.2em
}
.invoice table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 20px
}
.invoice table td,.invoice table th {
padding: 15px;
background: #eee;
border-bottom: 1px solid #fff
}
.invoice table th {
white-space: nowrap;
font-weight: 400;
font-size: 16px
}
.invoice table td h3 {
margin: 0;
font-weight: 400;
color: #585858;
font-size: 1.2em
}
.invoice table .qty,.invoice table .total,.invoice table .unit {
text-align: right;
font-size: 1.2em
}
.invoice table .no {
color: #fff;
font-size: 1em;
background: #585858
}
.invoice table .unit {
background: #ddd
}
.invoice table .total {
background: #585858;
color: #fff
}
.invoice table tbody tr:last-child td {
border: none
}
.invoice table tfoot td {
background: 0 0;
border-bottom: none;
white-space: nowrap;
text-align: right;
padding: 10px 20px;
font-size: 1.2em;
border-top: 1px solid #aaa
}
.invoice table tfoot tr:first-child td {
border-top: none
}
.invoice table tfoot tr:last-child td {
color: #585858;
font-size: 1.4em;
border-top: 1px solid #585858
}
.invoice table tfoot tr td:first-child {
border: none
}
.invoice footer {
width: 100%;
text-align: center;
color: #777;
border-top: 1px solid #aaa;
padding: 8px 0
}
header { }
footer { display:none; }
@media only screen and (max-width: 600px) {
.hide-for-small {
display: none;
}
}
@media print {
.invoice {
font-size: 11px!important;
overflow: hidden!important
}
.invoice footer {
position: absolute;
bottom: 10px;
page-break-after: always
}
.invoice>div:last-child {
page-break-before: always
}
}
</style>
{% endblock %}
{% block main %}
{% set order = entity.instance %}
<div class="container" >
<div class="toolbar hidden-print">
<div class="">
{% if is_granted("ROLE_SHIPPING_AGENT") == false %}
<a class="btn btn-info mb-1" target="_blank" href="{{path("order_pdf",{id:order.id})}}"><i class="fa fa-file-pdf-o"></i> Exporter en PDF</a>
{% endif %}
{# {% set urlEditStatusPayment = ea_url().setController("App\\Flexy\\FrontBundle\\Themes\\IlaveU\\Controller\\ShopAdmin\\Order\\ChangeStatusOrderPaymentCrudController")
.setAction("edit")
.setEntityId(order.id)
%}
<a class="btn btn-info mb-1" href="{{urlEditStatusPayment}}" >
Changer l'etat de paiement
</a>
{% set urlEditStatusShipping = ea_url().setController("App\\Flexy\\FrontBundle\\Themes\\IlaveU\\Controller\\ShopAdmin\\Order\\ChangeStatusOrderShippingCrudController")
.setAction("edit")
.setEntityId(order.id)
%}
<a class="btn btn-info mb-1" href="{{urlEditStatusShipping}}" >
Changer l'etat de livraison
</a> #}
{% set urlEditOrder = ea_url()
.setRoute("admin_pos_ilaveu",{"orderId":order.id})
%}
<a class="btn btn-success mb-1" href="{{urlEditOrder}}" >
<i class="fa fa-edit"></i>
Editer la commande
</a>
{% if is_granted("ROLE_AGENT") == false %}
{% set urlPrintTicketOrder = ea_url()
.setRoute("order_ticket",{"id":order.id})
%}
<a class="btn mb-1" href="{{urlPrintTicketOrder}}" >
<i class="fa fa-print"></i>
Imprimer ticket
</a>
{% endif %}
{% set urlLogHistoryOrder = ea_url().setController("App\\Flexy\\FrontBundle\\Themes\\IlaveU\\Controller\\ShopAdmin\\Order\\LogHistoryOrderCrudController")
.setAction("index").setEntityId(null)
%}
<!--
<a class="btn btn-info mb-1" href="{{urlLogHistoryOrder}}&orderId={{order.id}}" >
Voir Historique
</a>
-->
</div>
<hr>
</div>
<h5>Commande : <b>{{order.orderNumber}}</b></h5>
<ul>
<li>Client : <b>{{order.customer}}</b></li>
<li>Statut de la CMD :
{% if getOrderStatus(order) == "canceled" %}
<span class="badge badge-danger" title="Annulé"><i class="fa-solid fa-ban"></i> Annulé</span>
{% elseif (entity.instance.status == "paid" and entity.instance.fullRestAmount <= 0) or
(entity.instance.fullRestAmount <= 0 and entity.instance.fullTotalAmount > 0)
%}
<span class="badge badge-success" title="Aucun"><i class="fa-solid fa-circle-check"></i> Réglé</span>
{% elseif (entity.instance.status == "partially-paid" or entity.instance.status == "paid") and entity.instance.fullRestAmount > 0 %}
<span class="badge badge-success" title="Aucun"><i class="fa-solid fa-circle-check"></i> Réglé partiellement</span>
{% else %}
<span class="badge badge-danger" title="Aucun"><i class="fa-solid fa-clock-rotate-left"></i> Non réglé</span>
{% endif %}
</li>
{% set currentStep = order.shipment.currentStep %}
<li>Statut de livraison : <span class="mt-1 badge badge-info text-dark" style="
{{currentStep ? "background:" ~ currentStep.color}}
" ><i class="fa-solid fa-circle-check"></i> {{ order.shipment.currentStep ? order.shipment.currentStep:"À collecter"}}</span></li>
<li>Adresse de collecte : <b>{{order.collectAddress}}</b>
<a class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#collectMapModal" href="#" data-lng="{{order.collectLng}}" data-lat="{{order.collectLat}}" class="btn show-map"> <i class="fa-solid fa-location-dot"></i></a>
<!-- Modal -->
<div class="modal fade" id="collectMapModal" tabindex="-1" aria-labelledby="collectMapModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="collectMapModalLabel">Adresse de collecte</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
{% if order.collectLng and order.collectLat %}
<div {{ react_component('Admin/Pos/Map', {
lng: order.collectLng,
lat: order.collectLat,
styles:{ height: '350px', maxWidth: '800px' }
}) }}>
Loading... <i class="fas fa-cog fa-spin fa-3x"></i>
</div>
{% else %}
<div {{ react_component('Admin/Pos/GeocodeAddress', {
address: order.collectAddress ~ " ,Maroc",
apiKey: "AIzaSyAhcdR3-y-tILC8ZJT-e_TOwd0Mk9uEUZM",
styles:{ height: '350px', maxWidth: '800px' }
}) }}>
Loading... <i class="fas fa-cog fa-spin fa-3x"></i>
</div>
{% endif %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</li>
<li class="mt-1">Adresse de livraison : <b>{{order.shippingAddress}}</b>
<a data-bs-toggle="modal" data-bs-target="#shippingMapModal" href="#" data-lng="{{order.shippingLng}}" data-lat="{{order.shippingLat}}" class="btn show-map"> <i class="fa-solid fa-location-dot"></i></a>
<!-- Modal -->
<div class="modal fade" id="shippingMapModal" tabindex="-1" aria-labelledby="shippingMapModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="shippingMapModalLabel">Adresse de livraison</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
{% if order.shippingLng and order.shippingLat %}
<div {{ react_component('Admin/Pos/Map', {
lng: order.shippingLng,
lat: order.shippingLat,
styles:{ height: '350px', maxWidth: '800px' }
}) }}>
Loading... <i class="fas fa-cog fa-spin fa-3x"></i>
</div>
{% else %}
<div {{ react_component('Admin/Pos/GeocodeAddress', {
address: order.shippingAddress ~ " ,Maroc",
apiKey: "AIzaSyAhcdR3-y-tILC8ZJT-e_TOwd0Mk9uEUZM",
styles:{ height: '350px', maxWidth: '800px' }
}) }}>
Loading... <i class="fas fa-cog fa-spin fa-3x"></i>
</div>
{% endif %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<ul>
</div>
{% include "@Flexy/FrontBundle/Themes/IlaveU/templates/admin/shopadmin/order/_orderTemplate.html.twig" with { order : order } %}
{% endblock %}