switch ($orderShop->getOrderStatus()->getAlias()) { | switch ($orderShop->getOrderStatus()->getAlias()) { | ||||
case OrderStatus::ALIAS_CART : | case OrderStatus::ALIAS_CART : | ||||
if (!isset($parameters['form_order_delivery_address'])) { | if (!isset($parameters['form_order_delivery_address'])) { | ||||
$parameters['form_order_delivery_address'] = $this->createCustomForm(OrderDeliveryAddressType::class, 'orderDeliveryAddress', $parameters)->createView(); | $parameters['form_order_delivery_address'] = $this->createCustomForm(OrderDeliveryAddressType::class, 'orderDeliveryAddress', $parameters)->createView(); | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
if($orderShop->isValid()){ | |||||
$templatePath = "@LcShop/backend/order/show-order.html.twig"; | |||||
}else{ | |||||
$templatePath = "@LcShop/backend/order/show-cart.html.twig"; | |||||
} | |||||
} | } | ||||
return parent::renderTemplate($actionName, $templatePath, $parameters); | return parent::renderTemplate($actionName, $templatePath, $parameters); | ||||
} | } | ||||
->setParameter('user', $entity->getUser()); | ->setParameter('user', $entity->getUser()); | ||||
}, | }, | ||||
)) | )) | ||||
->add('saveInvoiceAddress', ButtonType::class, array( | |||||
'label' => 'field.OrderShop.saveInvoiceAddress' | |||||
->add('save', ButtonType::class, array( | |||||
'label' => 'action.save' | |||||
)); | )); | ||||
} | } | ||||
]); | ]); | ||||
} | } | ||||
} | |||||
} |
{ | { | ||||
$builder | $builder | ||||
->add('message', TextareaType::class, array( | |||||
'mapped'=>false | |||||
)) | |||||
->add('send', ButtonType::class, array( | ->add('send', ButtonType::class, array( | ||||
'label' => 'action.send' | 'label' => 'action.send' | ||||
)) | |||||
->add('goto', ButtonType::class, array( | |||||
'label' => 'action.goto' | |||||
)); | )); | ||||
public function buildForm(FormBuilderInterface $builder, array $options) | public function buildForm(FormBuilderInterface $builder, array $options) | ||||
{ | { | ||||
$builder->add('ticketStatus', ChoiceType::class, array( | |||||
$builder->add('status', ChoiceType::class, array( | |||||
'choices'=>array( | 'choices'=>array( | ||||
'field.Ticket.ticketStatusOptions.'.Ticket::TICKET_STATUS_OPEN => Ticket::TICKET_STATUS_OPEN, | |||||
'field.Ticket.ticketStatusOptions.'.Ticket::TICKET_STATUS_BEING_PROCESSED => Ticket::TICKET_STATUS_BEING_PROCESSED, | |||||
'field.Ticket.ticketStatusOptions.'.Ticket::TICKET_STATUS_CLOSED => Ticket::TICKET_STATUS_CLOSED, | |||||
'field.Ticket.statusOptions.'.Ticket::TICKET_STATUS_OPEN => Ticket::TICKET_STATUS_OPEN, | |||||
'field.Ticket.statusOptions.'.Ticket::TICKET_STATUS_BEING_PROCESSED => Ticket::TICKET_STATUS_BEING_PROCESSED, | |||||
'field.Ticket.statusOptions.'.Ticket::TICKET_STATUS_CLOSED => Ticket::TICKET_STATUS_CLOSED, | |||||
), | ), | ||||
'required'=>true, | 'required'=>true, | ||||
'expanded'=>true | 'expanded'=>true |
const TICKET_STATUS_BEING_PROCESSED = 'being-processed' ; | const TICKET_STATUS_BEING_PROCESSED = 'being-processed' ; | ||||
const TICKET_STATUS_CLOSED = 'closed' ; | const TICKET_STATUS_CLOSED = 'closed' ; | ||||
use StatusTrait; | |||||
/** | /** | ||||
* @Gedmo\Blameable(on="create") | * @Gedmo\Blameable(on="create") | ||||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | ||||
/** | /** | ||||
* @ORM\Column(type="string", length=32) | * @ORM\Column(type="string", length=32) | ||||
*/ | */ | ||||
protected $ticketStatus; | |||||
protected $status; | |||||
/** | /** | ||||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="tickets") | * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="tickets") | ||||
return 'field.Ticket.typeOptions.'.$this->getType() ; | return 'field.Ticket.typeOptions.'.$this->getType() ; | ||||
} | } | ||||
public function getTicketStatus(): ?string | |||||
public function getStatus(): ?string | |||||
{ | { | ||||
return $this->ticketStatus; | |||||
return $this->status; | |||||
} | } | ||||
public function setTicketStatus(string $ticketStatus): self | |||||
public function setStatus(string $status): self | |||||
{ | { | ||||
$this->ticketStatus = $ticketStatus; | |||||
$this->status = $status; | |||||
return $this; | return $this; | ||||
} | } | ||||
public function getTicketStatusLabel(): string | |||||
public function getStatusLabel(): string | |||||
{ | { | ||||
return 'field.Ticket.ticketStatusOptions.'.$this->getTicketStatus() ; | |||||
return 'field.Ticket.statusOptions.'.$this->getStatus() ; | |||||
} | } | ||||
public function getOrderShop(): ?OrderShopInterface | public function getOrderShop(): ?OrderShopInterface |
background: #ffffff; | background: #ffffff; | ||||
display: flex; | display: flex; | ||||
margin-bottom: 1rem; | margin-bottom: 1rem; | ||||
min-height: 80px; | |||||
min-height: 90px; | |||||
padding: .5rem; | padding: .5rem; | ||||
position: relative; | position: relative; | ||||
} | } |
deliveryType: null, | deliveryType: null, | ||||
isLoading: true, | isLoading: true, | ||||
addProductId: null, | addProductId: null, | ||||
editionMode: false, | |||||
editionMode: true, | |||||
addProductQuantity: null, | addProductQuantity: null, | ||||
sectionsArray: [ | sectionsArray: [ | ||||
{ | { |
// | // | ||||
// Component: Info Box | // Component: Info Box | ||||
// | // | ||||
.info-box { | .info-box { | ||||
@include box-shadow($card-shadow); | @include box-shadow($card-shadow); | ||||
@include border-radius($border-radius); | @include border-radius($border-radius); | ||||
background: $white; | background: $white; | ||||
display: flex; | display: flex; | ||||
margin-bottom: map-get($spacers, 3); | margin-bottom: map-get($spacers, 3); | ||||
min-height: 80px; | |||||
min-height: 90px; | |||||
padding: .5rem; | padding: .5rem; | ||||
position: relative; | position: relative; | ||||
orderPayment: Ajouter un règlement | orderPayment: Ajouter un règlement | ||||
orderStatus: Changer de status | orderStatus: Changer de status | ||||
addRedeliveryOrderProduct: Ajouter une relivraison | addRedeliveryOrderProduct: Ajouter une relivraison | ||||
payment: Historique des transactions | |||||
Ticket: | Ticket: | ||||
listMessages: Liste des messages | listMessages: Liste des messages | ||||
None: Aucune valeur | None: Aucune valeur | ||||
product-unavailable: Produit manquant | product-unavailable: Produit manquant | ||||
product-error: Erreur sur un produit | product-error: Erreur sur un produit | ||||
technical-problem: Problème techique | technical-problem: Problème techique | ||||
ticketStatusOptions: | |||||
statusOptions: | |||||
open: Ouvert | open: Ouvert | ||||
being-processed: En cours de traitement | being-processed: En cours de traitement | ||||
closed: Fermée | closed: Fermée | ||||
editionMode: Activer mode édition | editionMode: Activer mode édition | ||||
viewMode: Désactiver mode édition | viewMode: Désactiver mode édition | ||||
addOrderPayment: Ajouter une transaction | addOrderPayment: Ajouter une transaction | ||||
sendPaymentLink: Envoyer le lien de paiement | |||||
credit: | credit: | ||||
add: Ajouter du crédit | add: Ajouter du crédit | ||||
reminder: | reminder: |
<div class="info-box"> | <div class="info-box"> | ||||
<span class="info-box-icon {% block class %}bg-info{% endblock %}"> | <span class="info-box-icon {% block class %}bg-info{% endblock %}"> | ||||
<i class="fa fa-{% block icon %}bg-info{% endblock %}"></i></span> | <i class="fa fa-{% block icon %}bg-info{% endblock %}"></i></span> | ||||
<div class="info-box-content"> | <div class="info-box-content"> | ||||
<span class="info-box-text">{% block label %}{% endblock %}</span> | <span class="info-box-text">{% block label %}{% endblock %}</span> | ||||
<strong>{% block value %}{% endblock %}</strong> | <strong>{% block value %}{% endblock %}</strong> | ||||
{% block button %}{% endblock %} | |||||
<div class="float-right"> {% block button %}{% endblock %} | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> |
{% macro card_overlay(attr) %} | {% macro card_overlay(attr) %} | ||||
</div> | </div> | ||||
<div v-if="{{ attr }}==true" class="overlay"> | |||||
<i class="fas fa-2x fa-sync-alt"></i> | |||||
</div> | |||||
{% endmacro card_overlay %} | {% endmacro card_overlay %} | ||||
{% macro card_end(noCol = false) %} | |||||
{% macro card_end(overlay = false) %} | |||||
</div> | </div> | ||||
{% if overlay %} | |||||
<div v-if="{{ overlay }}==true" class="overlay"> | |||||
<i class="fas fa-2x fa-sync-alt"></i> | |||||
</div> | |||||
{% endif %} | |||||
</div> | </div> | ||||
{% endmacro card_end %} | {% endmacro card_end %} | ||||
{# | |||||
{% macro startCard(col, zone = "default", card ='primary', fullWidth = false ) %} | {% macro startCard(col, zone = "default", card ='primary', fullWidth = false ) %} | ||||
</div> | </div> | ||||
{% if noCol == false %}</div>{% endif %} | {% if noCol == false %}</div>{% endif %} | ||||
{% endmacro endCard %} | {% endmacro endCard %} | ||||
#} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% block id %}modal-add-product-to-order{% endblock %} | |||||
{% block title %}{{ "action.order.addOrderProduct"|trans }}{% endblock %} | |||||
{% block form_start %} | |||||
{{ form_start(form_add_product_to_order, {'attr': {'id' : 'addProductToOrderForm'}}) }} | |||||
{% form_theme form_add_product_to_order '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
<div class="modal fade show" id="modal-add-product-to-order"> | |||||
{{ form_start(form_add_product_to_order, {'attr': {'id' : 'addProductToOrderForm'}}) }} | |||||
{% form_theme form_add_product_to_order '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
<div class="modal-dialog"> | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "action.order.addOrderProduct"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
<div class="col"> | |||||
{{ form_row(form_add_product_to_order.product, {'attr': {"v-model" : 'addProductId'}}) }} | |||||
</div> | |||||
<div class="col"> | |||||
{{ form_row(form_add_product_to_order.quantity, {'attr': {"v-model" : 'addProductQuantity'}}) }} | |||||
</div> | |||||
</div> | |||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_widget(form_add_product_to_order.add, {"attr": {'class' : 'btn btn-primary', '@click' : 'addProductToOrder'}}) }} | |||||
</div> | |||||
{% block content %} | |||||
<div class="col"> | |||||
{{ form_row(form_add_product_to_order.product, {'attr': {"v-model" : 'addProductId'}}) }} | |||||
</div> | </div> | ||||
<!-- /.modal-content --> | |||||
</div> | |||||
{{ form_end(form_add_product_to_order) }} | |||||
</div> | |||||
<div class="col"> | |||||
{{ form_row(form_add_product_to_order.quantity, {'attr': {"v-model" : 'addProductQuantity'}}) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_widget(form_add_product_to_order.add, {"attr": {'class' : 'btn btn-primary', '@click' : 'addProductToOrder'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_add_product_to_order) }} | |||||
{% endblock %} | |||||
{% endembed %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
<div class="modal fade show" id="modal-add-redelivery-order-product"> | |||||
{{ form_start(form_add_redelivery_order_product, {'attr': { 'id' : 'addRedeliveryOrderProductForm'}}) }} | |||||
{% form_theme form_add_redelivery_order_product '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% block id %}modal-add-redelivery-order-product{% endblock %} | |||||
{% block title %}{{ "group.OrderShop.addRedeliveryOrderProduct"|trans }}{% endblock %} | |||||
<div class="modal-dialog modal-lg"> | |||||
{% block form_start %} | |||||
{{ form_start(form_add_redelivery_order_product, {'attr': { 'id' : 'addRedeliveryOrderProductForm'}}) }} | |||||
{% form_theme form_add_redelivery_order_product '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "group.OrderShop.addRedeliveryOrderProduct"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
<div class="col"> | |||||
{{ form_row(form_add_redelivery_order_product.orderProduct, {'attr' :{'ref' : 'addRedeliveryOrderProductFormOrderProduct'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.title, {'attr' :{'ref' : 'addRedeliveryOrderProductFormTitle'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.unit, {'attr' :{'ref' : 'addRedeliveryOrderProductFormUnit'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.quantityProduct, {'attr' :{'ref' : 'addRedeliveryOrderProductFormQuantityProduct'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.quantityOrder, {'attr' :{'ref' : 'addRedeliveryOrderProductFormQuantityOrder'}}) }} | |||||
</div> | |||||
</div> | |||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_row(form_add_redelivery_order_product.add, {"attr": {'class' : 'btn btn-primary', '@click' : 'addRedeliveryOrderProduct'}}) }} | |||||
</div> | |||||
{% block content %} | |||||
<div class="col"> | |||||
{{ form_row(form_add_redelivery_order_product.orderProduct, {'attr' :{'ref' : 'addRedeliveryOrderProductFormOrderProduct'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.title, {'attr' :{'ref' : 'addRedeliveryOrderProductFormTitle'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.unit, {'attr' :{'ref' : 'addRedeliveryOrderProductFormUnit'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.quantityProduct, {'attr' :{'ref' : 'addRedeliveryOrderProductFormQuantityProduct'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.quantityOrder, {'attr' :{'ref' : 'addRedeliveryOrderProductFormQuantityOrder'}}) }} | |||||
</div> | </div> | ||||
<!-- /.modal-content --> | |||||
</div> | |||||
{{ form_end(form_order_delivery_address) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_widget(form_add_redelivery_order_product.add, {"attr": {'class' : 'btn btn-primary', '@click' : 'addRedeliveryOrderProduct'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_order_delivery_address) }} | |||||
{% endblock %} | |||||
{% endembed %} |
{% trans_default_domain 'lcshop' %} | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
<div class="modal fade show" id="modal-add-reduction-cart"> | |||||
{{ form_start(form_add_order_reduction_cart, {'attr': { 'id' : 'addOrderReductionCartForm'}}) }} | |||||
{% form_theme form_add_order_reduction_cart '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
<div class="modal-dialog"> | |||||
{% block id %}modal-add-reduction-cart{% endblock %} | |||||
{% block title %}{{ "action.order.addReductionCart"|trans }}{% endblock %} | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "action.order.addReductionCart"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
<div class="col"> | |||||
{{ form_row(form_add_order_reduction_cart.reductionCart) }} | |||||
</div> | |||||
{% block form_start %} | |||||
{{ form_start(form_add_order_reduction_cart, {'attr': { 'id' : 'addOrderReductionCartForm'}}) }} | |||||
{% form_theme form_add_order_reduction_cart '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
</div> | |||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_row(form_add_order_reduction_cart.add, {"attr": {'class' : 'btn btn-primary', '@click': 'addOrderReductionCart'}}) }} | |||||
</div> | |||||
{% block content %} | |||||
<div class="col"> | |||||
{{ form_row(form_add_order_reduction_cart.reductionCart) }} | |||||
</div> | </div> | ||||
<!-- /.modal-content --> | |||||
</div> | |||||
{{ form_end(form_add_order_reduction_cart) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_widget(form_add_order_reduction_credit.add, {"attr": {'class' : 'btn btn-primary', '@click': 'addOrderReductionCredit'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_add_order_reduction_cart) }} | |||||
{% endblock %} | |||||
{% endembed %} |
{% trans_default_domain 'lcshop' %} | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | {% embed "@LcShop/backend/default/block/embed_modal.twig" %} | ||||
{% trans_default_domain 'lcshop' %} | |||||
{% block id %}modal-reduction-credit{% endblock %} | {% block id %}modal-reduction-credit{% endblock %} | ||||
{% block title %}{{ "action.order.addReductionCredit"|trans }}{% endblock %} | {% block title %}{{ "action.order.addReductionCredit"|trans }}{% endblock %} |
{% trans_default_domain 'lcshop' %} | |||||
<div class="modal fade show" id="modal-delete-order-payment"> | |||||
{{ form_start(form_delete_order_payment, {'attr': { 'id' : 'deleteOrderPaymentForm'}}) }} | |||||
{% form_theme form_delete_order_payment '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
<div class="modal-dialog"> | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "action.order.deleteOrderPayment"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
<div class="col"> | |||||
Est-vous sur de vouloir surppimer cette réduction | |||||
{{ form_row(form_delete_order_payment.id, {'attr' : {"ref" : 'deleteOrderPaymentId'}}) }} | |||||
</div> | |||||
</div> | |||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_row(form_delete_order_payment.delete, {"attr": {'class' : 'btn btn-primary', '@click': 'deleteOrderPayment'}}) }} | |||||
</div> | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% block id %}modal-delete-order-payment{% endblock %} | |||||
{% block title %}{{ "action.order.deleteOrderPayment"|trans }}{% endblock %} | |||||
{% block form_start %} | |||||
{{ form_start(form_delete_order_payment, {'attr': { 'id' : 'deleteOrderPaymentForm'}}) }} | |||||
{% form_theme form_delete_order_payment '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
{% block content %} | |||||
<div class="col"> | |||||
Est-vous sur de vouloir surppimer cette réduction | |||||
{{ form_row(form_delete_order_payment.id, {'attr' : {"ref" : 'deleteOrderPaymentId'}}) }} | |||||
</div> | </div> | ||||
<!-- /.modal-content --> | |||||
</div>#} | |||||
{{ form_end(form_delete_order_payment) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_widget(form_delete_order_payment.delete, {"attr": {'class' : 'btn btn-primary', '@click': 'deleteOrderPayment'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_delete_order_payment) }} | |||||
{% endblock %} | |||||
{% endembed %} |
{% trans_default_domain 'lcshop' %} | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
<div class="modal fade show" id="modal-delete-reduction-cart"> | |||||
{{ form_start(form_delete_order_reduction_cart, {'attr': { 'id' : 'deleteOrderReductionCartForm'}}) }} | |||||
{% form_theme form_delete_order_reduction_cart '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
<div class="modal-dialog"> | |||||
{% block id %}modal-delete-reduction-cart{% endblock %} | |||||
{% block title %}{{ "action.order.deleteReductionCart"|trans }}{% endblock %} | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "action.order.deleteReductionCart"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
<div class="col"> | |||||
Est-vous sur de vouloir surppimer cette réduction | |||||
{{ form_row(form_delete_order_reduction_cart.id, {'attr' : {"ref" : 'deleteOrderReductionCartId'}}) }} | |||||
</div> | |||||
{% block form_start %} | |||||
{{ form_start(form_delete_order_reduction_cart, {'attr': { 'id' : 'deleteOrderReductionCartForm'}}) }} | |||||
{% form_theme form_delete_order_reduction_cart '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
</div> | |||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_row(form_delete_order_reduction_cart.delete, {"attr": {'class' : 'btn btn-primary', '@click': 'deleteOrderReductionCart'}}) }} | |||||
</div> | |||||
{% block content %} | |||||
<div class="col"> | |||||
Est-vous sur de vouloir surppimer cette réduction | |||||
{{ form_row(form_delete_order_reduction_cart.id, {'attr' : {"ref" : 'deleteOrderReductionCartId'}}) }} | |||||
</div> | </div> | ||||
<!-- /.modal-content --> | |||||
</div>#} | |||||
{{ form_end(form_delete_order_reduction_cart) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_widget(form_delete_order_reduction_cart.delete, {"attr": {'class' : 'btn btn-primary', '@click': 'deleteOrderReductionCart'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_delete_order_reduction_cart) }} | |||||
{% endblock %} | |||||
{% endembed %} |
{% trans_default_domain 'lcshop' %} | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
<div class="modal fade show" id="modal-delete-reduction-credit"> | |||||
{{ form_start(form_delete_order_reduction_credit, {'attr': { 'id' : 'deleteOrderReductionCreditForm'}}) }} | |||||
{% form_theme form_delete_order_reduction_credit '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
<div class="modal-dialog"> | |||||
{% block id %}modal-delete-reduction-credit{% endblock %} | |||||
{% block title %}{{ "action.order.deleteReductionCredit"|trans }}{% endblock %} | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "action.order.deleteReductionCredit"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
<div class="col"> | |||||
Est-vous sur de vouloir surppimer cette réduction | |||||
{{ form_row(form_delete_order_reduction_credit.id, {'attr' : {"ref" : 'deleteOrderReductionCreditId'}}) }} | |||||
</div> | |||||
{% block form_start %} | |||||
{{ form_start(form_delete_order_reduction_credit, {'attr': { 'id' : 'deleteOrderReductionCreditForm'}}) }} | |||||
{% form_theme form_delete_order_reduction_credit '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
</div> | |||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_row(form_delete_order_reduction_credit.delete, {"attr": {'class' : 'btn btn-primary', '@click': 'deleteOrderReductionCredit'}}) }} | |||||
</div> | |||||
{% block content %} | |||||
<div class="col"> | |||||
Est-vous sur de vouloir surppimer cette réduction | |||||
{{ form_row(form_delete_order_reduction_credit.id, {'attr' : {"ref" : 'deleteOrderReductionCreditId'}}) }} | |||||
</div> | </div> | ||||
<!-- /.modal-content --> | |||||
</div>#} | |||||
{{ form_end(form_delete_order_reduction_credit) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_widget(form_delete_order_reduction_credit.delete, {"attr": {'class' : 'btn btn-primary', '@click': 'deleteOrderReductionCredit'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_delete_order_reduction_credit) }} | |||||
{% endblock %} | |||||
{% endembed %} |
{% trans_default_domain 'lcshop' %} | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% block id %}modal-order-delivery-address{% endblock %} | |||||
{% block title %}{{ "group.OrderShop.deliveryAddress"|trans }}{% endblock %} | |||||
<div class="modal fade show" id="modal-order-delivery-address"> | |||||
{{ form_start(form_order_delivery_address, {'attr': { 'id' : 'orderDeliveryAddressForm'}}) }}) }} | |||||
{% form_theme form_order_delivery_address '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
<div class="modal-dialog"> | |||||
{% block form_start %} | |||||
{{ form_start(form_order_delivery_address, {'attr': { 'id' : 'orderDeliveryAddressForm'}}) }}) }} | |||||
{% form_theme form_order_delivery_address '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "form.group.OrderShop.deliveryAddress"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
<div class="col"> | |||||
{{ form_row(form_order_delivery_address.deliveryPointSale) }} | |||||
</div> | |||||
</div> | |||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_row(form_order_delivery_address.saveDeliveryAddress, {"attr": {'class' : 'btn btn-primary', '@click' : 'updateOrderDeliveryAddress'}}) }} | |||||
</div> | |||||
{% block content %} | |||||
<div class="col"> | |||||
{{ form_row(form_order_delivery_address.deliveryPointSale) }} | |||||
</div> | </div> | ||||
<!-- /.modal-content --> | |||||
</div> | |||||
{{ form_end(form_order_delivery_address) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_row(form_order_delivery_address.save, {"attr": {'class' : 'btn btn-primary', '@click' : 'updateOrderDeliveryAddress'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_order_delivery_address) }} | |||||
{% endblock %} | |||||
{% endembed %} | |||||
{% trans_default_domain 'lcshop' %} |
{% trans_default_domain 'lcshop' %} | |||||
<div class="modal fade show" id="modal-order-delivery-availability"> | |||||
{{ form_start(form_order_delivery_availability, {'attr': { 'id' : 'orderDeliveryAvailabilityForm'}}) }}) }} | |||||
{% form_theme form_order_delivery_availability '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
<div class="modal-dialog"> | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "form.group.OrderShop.deliveryAvailabilty"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
${order.deliveryType} | |||||
<div class="col" v-if="order.deliveryType=='point-sale'"> | |||||
{{ form_row(form_order_delivery_availability.deliveryAvailabilityPointSale) }} | |||||
</div> | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% block id %}modal-order-delivery-availability{% endblock %} | |||||
{% block title %}{{ "field.default.deliveryAvailabilty"|trans }}{% endblock %} | |||||
<div class="col" v-else-if="order.deliveryType=='home'"> | |||||
{{ form_row(form_order_delivery_availability.deliveryAvailabilityZone) }} | |||||
</div> | |||||
{% block form_start %} | |||||
{{ form_start(form_order_delivery_availability, {'attr': { 'id' : 'orderDeliveryAvailabilityForm'}}) }}) }} | |||||
{% form_theme form_order_delivery_availability '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
{% block content %} | |||||
<div class="col" v-if="order.deliveryType=='point-sale'"> | |||||
{{ form_row(form_order_delivery_availability.deliveryAvailabilityPointSale) }} | |||||
</div> | </div> | ||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_row(form_order_delivery_availability.saveDeliveryAvailability, {"attr": {'class' : 'btn btn-primary', '@click' : 'updateOrderDeliveryAvailability'}}) }} | |||||
<div class="col" v-else-if="order.deliveryType=='home'"> | |||||
{{ form_row(form_order_delivery_availability.deliveryAvailabilityZone) }} | |||||
</div> | </div> | ||||
</div> | |||||
<!-- /.modal-content --> | |||||
</div> | |||||
{{ form_end(form_order_delivery_availability) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_widget(form_order_delivery_availability.save, {"attr": {'class' : 'btn btn-primary', '@click' : 'updateOrderDeliveryAvailability'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_order_delivery_availability) }} | |||||
{% endblock %} | |||||
{% endembed %} |
<div class="modal fade show" id="modal-order-invoice-address"> | |||||
{{ form_start(form_order_invoice_address, {'attr': { 'id' : 'orderInvoiceAddressForm'}}) }}) }} | |||||
{% form_theme form_order_invoice_address '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
<div class="modal-dialog"> | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "form.group.OrderShop.invoiceAddress"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
{{ form_row(form_order_invoice_address.invoiceAddress) }} | |||||
</div> | |||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_row(form_order_invoice_address.saveInvoiceAddress, {"attr": {'class' : 'btn btn-primary', '@click' : 'updateOrderInvoiceAddress'}}) }} | |||||
</div> | |||||
{% block id %}modal-order-invoice-address{% endblock %} | |||||
{% block title %}{{ "field.default.invoiceAddress"|trans }}{% endblock %} | |||||
{% block form_start %} | |||||
{{ form_start(form_order_invoice_address, {'attr': { 'id' : 'orderInvoiceAddressForm'}}) }}) }} | |||||
{% form_theme form_order_invoice_address '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
{% block content %} | |||||
<div class="col"> | |||||
{{ form_row(form_order_invoice_address.invoiceAddress) }} | |||||
</div> | </div> | ||||
<!-- /.modal-content --> | |||||
</div> | |||||
{{ form_end(form_order_invoice_address) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_widget(form_order_invoice_address.save, {"attr": {'class' : 'btn btn-primary', '@click' : 'updateOrderInvoiceAddress'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_order_invoice_address) }} | |||||
{% endblock %} | |||||
{% endembed %} |
{% trans_default_domain'lcshop' %} | |||||
<div class="modal fade show" id="modal-order-payment"> | |||||
{{ form_start(form_order_payment, {'attr': { 'id' : 'orderPaymentForm'}}) }}) }} | |||||
{% form_theme form_order_payment '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
<div class="modal-dialog"> | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "group.OrderShop.orderPayment"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
{{ form_row(form_order_payment.meanPayment, {'attr' : {'v-model' : 'orderPaymentFormMeanPayment', 'ref' : 'meanPaymentSelect'}}) }} | |||||
{{ form_row(form_order_payment.amount, {'attr' : {'v-model' : 'orderPaymentFormAmount'}}) }} | |||||
{{ form_row(form_order_payment.paidAt, {'attr' : {'v-model' : 'orderPaymentFormPaidAt'}}) }} | |||||
{{ form_row(form_order_payment.reference, {'attr' : {'v-model' : 'orderPaymentFormReference'}}) }} | |||||
{{ form_row(form_order_payment.comment, {'attr' : {'v-model' : 'orderPaymentFormComment'}}) }} | |||||
{{ form_row(form_order_payment.id, {'attr' : {'v-model' : 'orderPaymentFormId'}}) }} | |||||
</div> | |||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_widget(form_order_payment.add, {"attr": {'class' : 'btn btn-primary', '@click' : 'addOrderPayment'}}) }} | |||||
</div> | |||||
{% block id %}modal-order-payment{% endblock %} | |||||
{% block title %}{{ "group.OrderShop.orderPayment"|trans }}{% endblock %} | |||||
{% block form_start %} | |||||
{{ form_start(form_order_payment, {'attr': { 'id' : 'orderPaymentForm'}}) }}) }} | |||||
{% form_theme form_order_payment '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
{% block content %} | |||||
<div class="col"> | |||||
{{ form_row(form_order_payment.meanPayment, {'attr' : {'v-model' : 'orderPaymentFormMeanPayment', 'ref' : 'meanPaymentSelect'}}) }} | |||||
{{ form_row(form_order_payment.amount, {'attr' : {'v-model' : 'orderPaymentFormAmount'}}) }} | |||||
{{ form_row(form_order_payment.paidAt, {'attr' : {'v-model' : 'orderPaymentFormPaidAt'}}) }} | |||||
{{ form_row(form_order_payment.reference, {'attr' : {'v-model' : 'orderPaymentFormReference'}}) }} | |||||
{{ form_row(form_order_payment.comment, {'attr' : {'v-model' : 'orderPaymentFormComment'}}) }} | |||||
{{ form_row(form_order_payment.id, {'attr' : {'v-model' : 'orderPaymentFormId'}}) }} | |||||
</div> | </div> | ||||
<!-- /.modal-content --> | |||||
</div> | |||||
{{ form_end(form_order_payment) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_widget(form_order_payment.add, {"attr": {'class' : 'btn btn-primary', '@click' : 'addOrderPayment'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_order_payment) }} | |||||
{% endblock %} | |||||
{% endembed %} |
{% trans_default_domain 'lcshop' %} | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
<div class="modal fade show" id="modal-order-status"> | |||||
{{ form_start(form_order_status, {'attr': { 'id' : 'orderStatusForm'}}) }}) }} | |||||
{% form_theme form_order_status '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
<div class="modal-dialog"> | |||||
{% block id %}modal-order-status{% endblock %} | |||||
{% block title %}{{ "group.OrderShop.orderStatus"|trans }}{% endblock %} | |||||
<div class="modal-content"> | |||||
<div class="modal-header"> | |||||
<h4>{{ "group.OrderShop.orderStatus"|trans }}</h4> | |||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |||||
<span aria-hidden="true">×</span> | |||||
</button> | |||||
</div> | |||||
<div class="modal-body"> | |||||
<div class="col"> | |||||
{{ form_row(form_order_status.orderStatus) }} | |||||
</div> | |||||
{% block form_start %} | |||||
{{ form_start(form_order_status, {'attr': { 'id' : 'orderStatusForm'}}) }}) }} | |||||
{% form_theme form_order_status '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% endblock %} | |||||
</div> | |||||
<div class="modal-footer justify-content-between"> | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |||||
{{ form_row(form_order_status.change, {"attr": {'class' : 'btn btn-primary'}}) }} | |||||
</div> | |||||
{% block content %} | |||||
<div class="col"> | |||||
{{ form_row(form_order_status.orderStatus) }} | |||||
</div> | </div> | ||||
<!-- /.modal-content --> | |||||
</div> | |||||
{{ form_end(form_order_status) }} | |||||
</div> | |||||
{% endblock %} | |||||
{% block footer %} | |||||
{{ parent() }} | |||||
{{ form_widget(form_order_status.change, {"attr": {'class' : 'btn btn-primary'}}) }} | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_order_status) }} | |||||
{% endblock %} | |||||
{% endembed %} |
{% trans_default_domain 'lcshop' %} | |||||
{% embed "@LcShop/backend/default/block/embed_modal.twig" %} | {% embed "@LcShop/backend/default/block/embed_modal.twig" %} | ||||
{% trans_default_domain 'lcshop' %} | |||||
{% block id %}modal-order-send-payment-link{% endblock %} | {% block id %}modal-order-send-payment-link{% endblock %} | ||||
{% block title %}{{ "action.order.sendPaymentLink"|trans }}{% endblock %} | {% block title %}{{ "action.order.sendPaymentLink"|trans }}{% endblock %} | ||||
{% block content %} | {% block content %} | ||||
<div class="col"> | <div class="col"> | ||||
{{ form_row(form_order_send_payment_link.message) }} | |||||
<p>Vous êtes sur le point d'envoyer le lien de paiement à l'utilisateur. Confirmez ?</p> | |||||
</div> | </div> | ||||
{% endblock %} | {% endblock %} | ||||
{% block footer %} | {% block footer %} | ||||
{{ parent() }} | {{ parent() }} | ||||
{{ form_row(form_order_send_payment_link.send, {"attr": {'class' : 'btn btn-primary', '@click': 'sendPaymentLink'}}) }} | |||||
{{ form_row(form_order_send_payment_link.goto, {"attr": {'class' : 'btn btn-primary', '@click': 'gotoPaymentLink'}}) }} | |||||
{{ form_widget(form_order_send_payment_link.send, {"attr": {'class' : 'btn btn-primary', '@click': 'sendPaymentLink'}}) }} | |||||
{% endblock %} | {% endblock %} | ||||
{% block form_end %} | {% block form_end %} |
{% trans_default_domain 'lcshop' %} | {% trans_default_domain 'lcshop' %} | ||||
{% macro tableHead() %} | {% macro tableHead() %} | ||||
<table id="order-products-list" class="table table-striped"> | <table id="order-products-list" class="table table-striped"> | ||||
<thead> | <thead> | ||||
{% macro tableTotal() %} | {% macro tableTotal() %} | ||||
</table> | </table> | ||||
<div class="col-12"> | |||||
<button type="button" class="dropdown-item" > | |||||
Avoirs groupé | |||||
</button> | |||||
</div> | |||||
<div class="clearfix"></div> | <div class="clearfix"></div> | ||||
<div class="row"> | <div class="row"> | ||||
{{ _self.order_modal_button('#modal-add-reduction-credit', 'btn-warning', "action.order.addReductionCredit", 'backspace') }} | {{ _self.order_modal_button('#modal-add-reduction-credit', 'btn-warning', "action.order.addReductionCredit", 'backspace') }} | ||||
</div> | </div> | ||||
<div class="col-12" style="margin-top: 25px;"> | |||||
<h6><strong>Historiques des transactions</strong></h6> | |||||
{#TODO: afficher si la commande est règlé et afficher une alerte si le montant des paiments est supérieur au montant total de la commande#} | |||||
<table class="table table-striped"> | |||||
<tbody> | |||||
<thead> | |||||
<tr> | |||||
<th>Mode de règlement</th> | |||||
<th>Date</th> | |||||
<th>Montant</th> | |||||
<th>Actions</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<template v-for="(orderPayment, i) in order.orderPayments"> | |||||
<tr> | |||||
<td>${orderPayment.meanPaymentText}</td> | |||||
<td>${orderPayment.paidAtText}</td> | |||||
<td>${orderPayment.amount}</td> | |||||
<td> | |||||
<button v-show="orderPayment.editable && editionMode && modalExist('#modal-delete-order-payment')" class="btn-sm btn-info" type="button" @click="editOrderPayment(orderPayment.id)"> | |||||
<i class="fa fa-pen"></i> | |||||
</button> | |||||
<button v-show="orderPayment.editable && editionMode && modalExist('#modal-delete-order-payment')" | |||||
type="button" class="btn-sm btn-danger" | |||||
@click="modalDeleteOrderPayment(orderPayment.id)"> | |||||
<i class="fa fa-trash"></i> | |||||
</button> | |||||
</td> | |||||
</tr> | |||||
</template> | |||||
</tbody> | |||||
</table> | |||||
{{ _self.order_modal_button('#modal-order-payment', 'btn-info', "action.order.addOrderPayment") }} | |||||
</div> | |||||
<div class="col-8"> | |||||
<div v-show="order.isOrderPaid" class="alert alert-success alert-dismissible"> | |||||
<h5><i class="icon fas fa-check"></i> Commande soldé</h5> | |||||
</div> | |||||
<div v-show="order.isOrderPaid==false" class="alert alert-danger alert-dismissible"> | |||||
<h5><i class="icon fas fa-check"></i> Commande non soldé</h5> | |||||
</div> | |||||
</div> | |||||
<div class="col-4"> | |||||
<span class="float-right">Total : ${order.totalOrderPaid}</span> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="col"></div> | <div class="col"></div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="col-12"> | <div class="col-12"> | ||||
<button v-show="order.user" type="button" class="btn btn-danger" @click="switchEditionMode"> | |||||
{#<button v-show="order.user" type="button" class="btn btn-danger" @click="switchEditionMode"> | |||||
<template v-if="editionMode"> | <template v-if="editionMode"> | ||||
<i class="fa fa-eye"></i> {{ "action.order.viewMode"|trans }} | <i class="fa fa-eye"></i> {{ "action.order.viewMode"|trans }} | ||||
</template> | </template> | ||||
<template v-else> | <template v-else> | ||||
<i class="fa fa-pen"></i> {{ "action.order.editionMode"|trans }} | <i class="fa fa-pen"></i> {{ "action.order.editionMode"|trans }} | ||||
</template> | </template> | ||||
</button> | |||||
{{ _self.order_modal_button('#modal-order-send-payment-link', 'btn-info', "action.order.sendPaymentLink", 'credit-card') }} | |||||
</button>#} | |||||
{{ _self.order_modal_button('#modal-order-send-payment-link', 'btn-info float-right', "action.order.sendPaymentLink", 'credit-card') }} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{% endmacro %} | {% endmacro %} | ||||
{% macro mainInfo() %} | |||||
{#${order.id}#} | |||||
<div class="col-3"> | |||||
<div class="info-box"> | |||||
<span class="info-box-icon bg-info"> | |||||
<i class="far fa-user"></i></span> | |||||
<div class="info-box-content"> | |||||
<span class="info-box-text">{{ "field.default.user"|trans({}, 'lcshop') }}</span> | |||||
<strong v-if="order.user" v-html="order.user"></strong> | |||||
<strong v-else v-html="order.visitor"></strong> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-3"> | |||||
<div class="info-box"> | |||||
<span class="info-box-icon bg-success"> | |||||
<i class="far fa-calendar"></i></span> | |||||
<div class="info-box-content"> | |||||
<span class="info-box-text">{{ "field.default.date"|trans({}, 'lcshop') }}</span> | |||||
<span class="info-box-number" v-if="order.createdAt"> ${order.createdAt}</span> | |||||
<span class="info-box-number" v-else> ${order.createdAt}</span> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-3"> | |||||
<div class="info-box"> | |||||
<span class="info-box-icon bg-warning"> | |||||
<i class="fa fa-euro-sign"></i></span> | |||||
{% macro box_user_info() %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{% set value = ' <span v-if="order.user" v-html="order.user"></span> | |||||
<span v-else v-html="order.visitor"></span>' %} | |||||
{{ macros.box_info('bg-info', 'user',"field.default.user"|trans({}, 'lcshop'), value) }} | |||||
<div class="info-box-content"> | |||||
<span class="info-box-text">{{ "field.OrderShop.total"|trans({}, 'lcshop') }}</span> | |||||
<strong> ${order.totalWithTax} €</strong> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="col-3"> | |||||
<div class="info-box"> | |||||
<span class="info-box-icon bg-danger"> | |||||
<i class="fa fa-info"></i></span> | |||||
<div class="info-box-content"> | |||||
<span class="info-box-text">{{ "field.OrderShop.status"|trans({}, 'lcshop') }}</span> | |||||
<strong> ${order.orderStatus}</strong> | |||||
{{ _self.order_modal_button('#modal-order-status') }} | |||||
</div> | |||||
</div> | |||||
</div> | |||||
{% endmacro box_user_info %} | |||||
{# | |||||
<div class="col-3"> | |||||
<strong>{{ "field.OrderShop.status"|trans }} </strong><br/> | |||||
<span>${order.orderStatus}</span> | |||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#modal-order-status"> | |||||
{{ "action.edit"|trans }} | |||||
</button> | |||||
</div>#} | |||||
{% endmacro mainInfo %} | |||||
{% macro address_invoice() %} | |||||
{% macro box_reference() %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{{ macros.box_info('bg-info', 'credit-card',"field.OrderShop.reference"|trans({}, 'lcshop'), ' ${order.reference}') }} | |||||
{% endmacro %} | |||||
<div class="info-box"> | |||||
<span class="info-box-icon bg-info"> | |||||
<i class="fa fa-address-card"></i></span> | |||||
<div class="info-box-content"> | |||||
<strong>{{ "field.default.invoiceAddress"|trans({}, 'lcshop') }}</strong> | |||||
<address v-html="order.invoiceAddress"> | |||||
{% macro box_validation_date() %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{% set value = '<span class="info-box-number" v-if="order.createdAt"> ${order.createdAt}</span> | |||||
<span class="info-box-number" v-else> ${order.createdAt}</span>' %} | |||||
{{ macros.box_info('bg-warning', 'calendar',"field.default.date"|trans({}, 'lcshop'), value) }} | |||||
{% endmacro %} | |||||
{% macro box_total_order() %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{{ macros.box_info('bg-danger', 'euro-sign',"field.OrderShop.total"|trans({}, 'lcshop'), ' ${order.totalWithTax} €') }} | |||||
{% endmacro %} | |||||
{% macro box_address_invoice() %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{% set value = '<span v-if="order.invoiceAddress!=false"> | |||||
<address v-html="order.invoiceAddress"></address> | |||||
</span> | |||||
<span v-else> | |||||
Aucune adresse de facturation défini. | |||||
</span>' %} | |||||
{{ macros.box_info('bg-info', 'address-card',"field.default.invoiceAddress"|trans({}, 'lcshop'), value , _self.order_modal_button('#modal-order-invoice-address')) }} | |||||
{% endmacro %} | |||||
{% macro box_main_order() %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{{ macros.box_info('bg-info', 'basket',"field.OrderShop.mainOrder"|trans({}, 'lcshop'), '${order.mainOrder}') }} | |||||
{% endmacro %} | |||||
{% macro box_address_delivery() %} | |||||
{% embed '@LcShop/backend/default/block/embed_box.twig' %} | |||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% block class %}bg-success{% endblock %} | |||||
{% block icon %}map-marked-alt{% endblock %} | |||||
{% block label %}{{ "field.default.deliveryAddress"|trans({}, 'lcshop')}}{% endblock %} | |||||
{% block value %} | |||||
<div v-if="order.deliveryType == 'home'"> | |||||
<strong>{{ "field.default.deliveryAddress"|trans({}, 'lcshop') }}</strong> | |||||
<address v-html="order.deliveryAddress"> | |||||
</address> | </address> | ||||
{{ _self.order_modal_button('#modal-order-invoice-address') }} | |||||
</div> | </div> | ||||
</div> | |||||
<div class="info-box"> | |||||
<span class="info-box-icon bg-success"> | |||||
<i class="fa fa-map-marked-alt"></i></span> | |||||
<div class="info-box-content"> | |||||
<div v-else-if="order.deliveryType == 'point-sale'"> | |||||
<h6><strong>{{ "field.default.deliveryPointSale"|trans({}, 'lcshop') }} : </strong></h6> | |||||
<address v-html="order.deliveryPointSale"> | |||||
</address> | |||||
</div> | |||||
<div v-else> | |||||
Aucun lieu de livraison défini. | |||||
</div> | |||||
{% endblock %} | |||||
{% block button %} | |||||
{{ order_macros.order_modal_button('#modal-order-delivery-address') }} | |||||
{% endblock %} | |||||
{% endembed %} | |||||
{% endmacro %} | |||||
<div v-if="order.deliveryType == 'home'"> | |||||
<strong>{{ "field.default.deliveryAddress"|trans({}, 'lcshop') }}</strong> | |||||
<address v-html="order.deliveryAddress"> | |||||
</address> | |||||
</div> | |||||
<div v-else-if="order.deliveryType == 'point-sale'"> | |||||
<h6><strong>{{ "field.default.deliveryPointSale"|trans({}, 'lcshop') }} : </strong></h6> | |||||
<address v-html="order.deliveryPointSale"> | |||||
</address> | |||||
{% macro box_delivery_slot() %} | |||||
{% embed '@LcShop/backend/default/block/embed_box.twig' %} | |||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% block class %}bg-success{% endblock %} | |||||
{% block icon %}clock{% endblock %} | |||||
{% block label %}{{ "field.default.deliveryAvailabilty"|trans({}, 'lcshop') }}{% endblock %} | |||||
{% block value %} | |||||
<div v-if="order.deliveryType == 'home'"> | |||||
<div v-html="order.deliveryAvailabilityZone"> | |||||
</div> | </div> | ||||
<div v-else> | |||||
Aucun lieu de livraison défini. | |||||
</div> | |||||
<div v-else-if="order.deliveryType == 'point-sale'"> | |||||
<div v-html="order.deliveryAvailabilityPointSale"> | |||||
</div> | </div> | ||||
{{ _self.order_modal_button('#modal-order-delivery-address') }} | |||||
</div> | </div> | ||||
</div> | |||||
<div v-else> | |||||
Aucun créneau défini. | |||||
</div> | |||||
{% endblock %} | |||||
{% block button %} | |||||
{{ order_macros.order_modal_button('#modal-order-delivery-availability') }} | |||||
{% endblock %} | |||||
{% endembed %} | |||||
{% endmacro %} | |||||
<div class="info-box"> | |||||
<span class="info-box-icon bg-danger"> | |||||
<i class="fa fa-clock"></i></span> | |||||
<div class="info-box-content"> | |||||
<h6><strong>{{ "field.default.deliveryAvailabilty"|trans({}, 'lcshop') }} : </strong></h6> | |||||
<div v-if="order.deliveryType == 'home'"> | |||||
<div v-html="order.deliveryAvailabilityZone"> | |||||
</div> | |||||
</div> | |||||
<div v-else-if="order.deliveryType == 'point-sale'"> | |||||
<div v-html="order.deliveryAvailabilityPointSale"> | |||||
</div> | |||||
</div> | |||||
{{ _self.order_modal_button('#modal-order-delivery-availability') }} | |||||
{% macro box_payments() %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{{ macros.card_start("OrderShop.payment", 'danger') }} | |||||
<table class="table table-striped"> | |||||
<tbody> | |||||
<thead> | |||||
<tr> | |||||
<th>Mode de règlement</th> | |||||
<th>Date</th> | |||||
<th>Montant</th> | |||||
<th>Actions</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<template v-for="(orderPayment, i) in order.orderPayments"> | |||||
<tr> | |||||
<td>${orderPayment.meanPaymentText}</td> | |||||
<td>${orderPayment.paidAtText}</td> | |||||
<td>${orderPayment.amount}</td> | |||||
<td> | |||||
<button v-show="orderPayment.editable && editionMode && modalExist('#modal-delete-order-payment')" class="btn-sm btn-info" type="button" @click="editOrderPayment(orderPayment.id)"> | |||||
<i class="fa fa-pen"></i> | |||||
</button> | |||||
<button v-show="orderPayment.editable && editionMode && modalExist('#modal-delete-order-payment')" | |||||
type="button" class="btn-sm btn-danger" | |||||
@click="modalDeleteOrderPayment(orderPayment.id)"> | |||||
<i class="fa fa-trash"></i> | |||||
</button> | |||||
</td> | |||||
</tr> | |||||
</template> | |||||
</tbody> | |||||
</table> | |||||
<div class="col-8"> | |||||
<div v-show="order.isOrderPaid"> | |||||
<h5> | |||||
<span class="badge badge-success"> | |||||
<i class="icon fas fa-check"></i> Commande soldé | |||||
</span> | |||||
</h5> | |||||
</div> | |||||
<div v-show="order.isOrderPaid==false" > | |||||
<h5> | |||||
<span class="badge badge-error"> | |||||
<i class="icon fas fa-check"></i> Commande non soldé | |||||
</span> | |||||
</h5> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | |||||
{% endmacro addressInfo %} | |||||
<div class="col-4"> | |||||
<span class="float-right">Total : ${order.totalOrderPaid}</span> | |||||
</div> | |||||
{#TODO: afficher si la commande est règlé et afficher une alerte si le montant des paiments est supérieur au montant total de la commande#} | |||||
{{ _self.order_modal_button('#modal-order-payment', 'btn-info', "action.order.addOrderPayment") }} | |||||
{{ macros.card_end() }} | |||||
{% endmacro %} | |||||
{% macro box_documents() %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{{ macros.card_start("OrderShop.payment", 'primary card-outline') }} | |||||
<table class="table table-striped"> | |||||
<tbody> | |||||
<thead> | |||||
<tr> | |||||
<th>Date</th> | |||||
<th>Type</th> | |||||
<th>Numéro</th> | |||||
<th>Envoyé</th> | |||||
<th>Actions</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<template v-for="(orderDocument, i) in order.orderDocuments"> | |||||
<tr> | |||||
<td>${orderDocument.date}</td> | |||||
<td>${orderDocument.type}</td> | |||||
<td>${orderDocument.reference}</td> | |||||
<td>${orderDocument.isSent}</td> | |||||
<td> | |||||
</td> | |||||
</tr> | |||||
</template> | |||||
</tbody> | |||||
</table> | |||||
{{ macros.card_end() }} | |||||
{% endmacro %} | |||||
{% macro box_complementary() %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{{ macros.card_start("OrderShop.complementary", 'bg-outline-primary') }} | |||||
<table class="table table-striped"> | |||||
<tbody> | |||||
<thead> | |||||
<tr> | |||||
<th>Réference</th> | |||||
<th>Date</th> | |||||
<th>total</th> | |||||
<th>Actions</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<template v-for="(complementaryOrderShop, i) in order.complementaryOrderShops"> | |||||
<tr> | |||||
<td>${complementaryOrderShop.reference}</td> | |||||
<td>${complementaryOrderShop.date}</td> | |||||
<td>${complementaryOrderShop.total}</td> | |||||
<td> | |||||
</td> | |||||
</tr> | |||||
</template> | |||||
</tbody> | |||||
</table> | |||||
{{ macros.card_end() }} | |||||
{% endmacro %} | |||||
{% macro box_tickets() %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{{ macros.card_start("OrderShop.complementary", 'bg-outline-primary') }} | |||||
<table class="table table-striped"> | |||||
<tbody> | |||||
<thead> | |||||
<tr> | |||||
<th>Date</th> | |||||
<th>Status</th> | |||||
<th>Subject</th> | |||||
<th>Actions</th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
<template v-for="(ticket, i) in order.tickets"> | |||||
<tr> | |||||
<td>${ticket.date}</td> | |||||
<td>${ticket.status}</td> | |||||
<td>${ticket.subject}</td> | |||||
<td> | |||||
</td> | |||||
</tr> | |||||
</template> | |||||
</tbody> | |||||
</table> | |||||
{{ macros.card_end() }} | |||||
{% endmacro %} | |||||
{% macro box_status() %} | |||||
{% embed '@LcShop/backend/default/block/embed_box.twig' %} | |||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% block class %}bg-success{% endblock %} | |||||
{% block icon %}info{% endblock %} | |||||
{% block label %}{{ "field.OrderShop.status"|trans({}, 'lcshop')}}{% endblock %} | |||||
{% block value %} | |||||
<strong> ${order.orderStatus}</strong> | |||||
{% endblock %} | |||||
{% block button %} | |||||
{{ order_macros.order_modal_button('#modal-order-status') }} | |||||
{% endblock %} | |||||
{% endembed %} | |||||
{% endmacro %} | |||||
{% macro order_modal_button(modalId, class="btn-default", trad="action.edit", icon=false) %} | |||||
{% macro order_modal_button(modalId, class="btn-primary", trad="action.edit", icon=false) %} | |||||
<button v-show="editionMode && modalExist('{{ modalId }}')" type="button" class="btn {{ class }}" | |||||
<button v-show="editionMode && modalExist('{{ modalId }}')" type="button" class="btn-sm {{ class }}" | |||||
data-toggle="modal" | data-toggle="modal" | ||||
data-target="{{ modalId }}"> | data-target="{{ modalId }}"> | ||||
{% if icon %} | {% if icon %} |
{% extends '@LcShop/backend/default/show.html.twig' %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | |||||
{% block main %} | |||||
<div class="lc-vue-js-container" id="lc-order-edit"> | |||||
<div class="row"> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_user_info() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_validation_date() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_total_order() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_status() }} | |||||
</div> | |||||
<template v-if="order.user"> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_address_invoice() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_address_delivery() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_delivery_slot() }} | |||||
</div> | |||||
</template> | |||||
<div class="col-12"> | |||||
{{ macros.card_start('OrderShop.resume') }} | |||||
{% include '@LcShop/backend/order/form/card_orderproducts.html.twig' %} | |||||
{{ macros.card_end('isLoading') }} | |||||
</div> | |||||
<div class="col-6"> | |||||
{{ order_macros.box_payments() }} | |||||
</div> | |||||
{% if form_order_invoice_address is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_invoiceaddress.html.twig' %} | |||||
{% endif %} | |||||
{% if form_order_delivery_address is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_deliveryaddress.html.twig' %} | |||||
{% endif %} | |||||
{% if form_order_delivery_availability is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_deliveryavailability.html.twig' %} | |||||
{% endif %} | |||||
{% if form_order_status is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_orderstatus.html.twig' %} | |||||
{% endif %} | |||||
{% if form_add_order_reduction_credit is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_addreductioncredit.html.twig' %} | |||||
{% endif %} | |||||
{% if form_add_order_reduction_cart is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_addreductioncart.html.twig' %} | |||||
{% endif %} | |||||
{% if form_delete_order_reduction_cart is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_deletereductioncart.html.twig' %} | |||||
{% endif %} | |||||
{% if form_delete_order_reduction_credit is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_deletereductioncredit.html.twig' %} | |||||
{% endif %} | |||||
{% if form_add_product_to_order is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_addproducttoorder.html.twig' %} | |||||
{% endif %} | |||||
{% if form_order_payment is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_orderpayment.html.twig' %} | |||||
{% endif %} | |||||
{% if form_delete_order_payment is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_deleteorderpayment.html.twig' %} | |||||
{% endif %} | |||||
{% if form_add_redelivery_order_product is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_addredeliveryorderproduct.html.twig' %} | |||||
{% endif %} | |||||
{% if form_order_send_payment_link is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_sendpaymentlink.html.twig' %} | |||||
{% endif %} | |||||
</div> | |||||
</div> | |||||
{% endblock %} | |||||
{% block script_javascript %} | |||||
{{ parent() }} | |||||
{% include '@LcShop/backend/default/block/script-vuejs.html.twig' %} | |||||
<script src="{{ asset('bundles/lcshop/js/backend/script/order/vuejs-order.js') }}"></script> | |||||
{% endblock %} |
{% extends '@LcShop/backend/default/show.html.twig' %} | |||||
{% trans_default_domain 'lcshop' %} | |||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | |||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | |||||
{% block main %} | |||||
<div class="lc-vue-js-container" id="lc-order-edit"> | |||||
<div class="row"> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_user_info() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_validation_date() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_total_order() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_status() }} | |||||
</div> | |||||
<div v-show="order.valid" class="col-3" > | |||||
{{ order_macros.box_reference() }} | |||||
<div v-show="order.mainOrder" > | |||||
{{ order_macros.box_main_order() }} | |||||
</div> | |||||
</div> | |||||
<template v-if="order.user"> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_address_invoice() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_address_delivery() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_delivery_slot() }} | |||||
</div> | |||||
</template> | |||||
<div v-show="order.complementaryOrderShops" class="col-6"> | |||||
{{ order_macros.box_complementary() }} | |||||
</div> | |||||
<div v-show="order.tickets" class="col-6"> | |||||
{{ order_macros.box_tickets() }} | |||||
</div> | |||||
<div class="col-6"> | |||||
{{ order_macros.box_payments() }} | |||||
</div> | |||||
<div class="col-6"> | |||||
{{ order_macros.box_documents() }} | |||||
</div> | |||||
<div class="col-12"> | |||||
{{ macros.card_start('OrderShop.resume') }} | |||||
{% include '@LcShop/backend/order/form/card_orderproducts.html.twig' %} | |||||
{{ macros.card_overlay('isLoading') }} | |||||
{{ macros.card_end() }} | |||||
</div> | |||||
{% if form_order_invoice_address is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_invoiceaddress.html.twig' %} | |||||
{% endif %} | |||||
{% if form_order_delivery_address is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_deliveryaddress.html.twig' %} | |||||
{% endif %} | |||||
{% if form_order_delivery_availability is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_deliveryavailability.html.twig' %} | |||||
{% endif %} | |||||
{% if form_order_status is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_orderstatus.html.twig' %} | |||||
{% endif %} | |||||
{% if form_add_order_reduction_credit is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_addreductioncredit.html.twig' %} | |||||
{% endif %} | |||||
{% if form_add_order_reduction_cart is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_addreductioncart.html.twig' %} | |||||
{% endif %} | |||||
{% if form_delete_order_reduction_cart is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_deletereductioncart.html.twig' %} | |||||
{% endif %} | |||||
{% if form_delete_order_reduction_credit is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_deletereductioncredit.html.twig' %} | |||||
{% endif %} | |||||
{% if form_add_product_to_order is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_addproducttoorder.html.twig' %} | |||||
{% endif %} | |||||
{% if form_order_payment is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_orderpayment.html.twig' %} | |||||
{% endif %} | |||||
{% if form_delete_order_payment is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_deleteorderpayment.html.twig' %} | |||||
{% endif %} | |||||
{% if form_add_redelivery_order_product is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_addredeliveryorderproduct.html.twig' %} | |||||
{% endif %} | |||||
{% if form_order_send_payment_link is defined %} | |||||
{% include '@LcShop/backend/order/form/modal_sendpaymentlink.html.twig' %} | |||||
{% endif %} | |||||
</div> | |||||
</div> | |||||
{% endblock %} | |||||
{% block script_javascript %} | |||||
{{ parent() }} | |||||
{% include '@LcShop/backend/default/block/script-vuejs.html.twig' %} | |||||
<script src="{{ asset('bundles/lcshop/js/backend/script/order/vuejs-order.js') }}"></script> | |||||
{% endblock %} |
{% extends '@LcShop/backend/default/show.html.twig' %} | {% extends '@LcShop/backend/default/show.html.twig' %} | ||||
{% trans_default_domain 'lcshop' %} | {% trans_default_domain 'lcshop' %} | ||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | |||||
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} | |||||
{% block main %} | {% block main %} | ||||
{# {% form_theme form_order_reduction_cart '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% form_theme form_add_product_to_order '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | |||||
{% form_theme form_order_reduction_credit '@LcShop/backend/form/custom_bootstrap_4.html.twig' %}#} | |||||
<div class="lc-vue-js-container" id="lc-order-edit"> | |||||
<div class="lc-vue-js-container" id="lc-order-edit"> | |||||
<div class="row"> | <div class="row"> | ||||
{{ order_macros.mainInfo() }} | |||||
<div v-show="order.valid" class="col-3" > | |||||
{{ order_macros.box_reference() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_user_info() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_validation_date() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_total_order() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_status() }} | |||||
</div> | |||||
<div v-show="order.mainOrder" class="col-3"> | |||||
{{ order_macros.box_main_order() }} | |||||
</div> | |||||
<div class="col-6"> | |||||
{{ order_macros.box_payments() }} | |||||
</div> | |||||
<div class="col-6"> | |||||
{{ order_macros.box_documents() }} | |||||
</div> | |||||
<div v-show="order.complementaryOrderShops" class="col-6"> | |||||
{{ order_macros.box_complementary() }} | |||||
</div> | |||||
<div v-show="order.tickets" class="col-6"> | |||||
{{ order_macros.box_tickets() }} | |||||
</div> | |||||
<template v-if="order.user"> | <template v-if="order.user"> | ||||
{{ order_macros.addressInfo() }} | |||||
</template> | |||||
{% macro addressInfo() %} | |||||
<div class="col-3"> | <div class="col-3"> | ||||
<div class="info-box"> | |||||
<span class="info-box-icon bg-info"> | |||||
<i class="fa fa-address-card"></i></span> | |||||
<div class="info-box-content"> | |||||
<strong>{{ "field.default.invoiceAddress"|trans({}, 'lcshop') }}</strong> | |||||
<address v-html="order.invoiceAddress"> | |||||
</address> | |||||
{{ _self.order_modal_button('#modal-order-invoice-address') }} | |||||
</div> | |||||
</div> | |||||
<div class="info-box"> | |||||
<span class="info-box-icon bg-success"> | |||||
<i class="fa fa-map-marked-alt"></i></span> | |||||
<div class="info-box-content"> | |||||
<div v-if="order.deliveryType == 'home'"> | |||||
<strong>{{ "field.default.deliveryAddress"|trans({}, 'lcshop') }}</strong> | |||||
<address v-html="order.deliveryAddress"> | |||||
</address> | |||||
</div> | |||||
<div v-else-if="order.deliveryType == 'point-sale'"> | |||||
<h6><strong>{{ "field.default.deliveryPointSale"|trans({}, 'lcshop') }} : </strong></h6> | |||||
<address v-html="order.deliveryPointSale"> | |||||
</address> | |||||
</div> | |||||
<div v-else> | |||||
Aucun lieu de livraison défini. | |||||
</div> | |||||
{{ _self.order_modal_button('#modal-order-delivery-address') }} | |||||
</div> | |||||
</div> | |||||
<div class="info-box"> | |||||
<span class="info-box-icon bg-danger"> | |||||
<i class="fa fa-clock"></i></span> | |||||
<div class="info-box-content"> | |||||
<h6><strong>{{ "field.default.deliveryAvailabilty"|trans({}, 'lcshop') }} : </strong></h6> | |||||
<div v-if="order.deliveryType == 'home'"> | |||||
<div v-html="order.deliveryAvailabilityZone"> | |||||
</div> | |||||
</div> | |||||
<div v-else-if="order.deliveryType == 'point-sale'"> | |||||
<div v-html="order.deliveryAvailabilityPointSale"> | |||||
</div> | |||||
</div> | |||||
{{ _self.order_modal_button('#modal-order-delivery-availability') }} | |||||
</div> | |||||
</div> | |||||
{{ order_macros.box_address_invoice() }} | |||||
</div> | </div> | ||||
{% endmacro addressInfo %} | |||||
<div class="col-3"> | |||||
{{ order_macros.box_address_delivery() }} | |||||
</div> | |||||
<div class="col-3"> | |||||
{{ order_macros.box_delivery_slot() }} | |||||
</div> | |||||
</template> | |||||
{{ macros.startCard(9, 'OrderShop.resume') }} | |||||
<div class="col-12"> | |||||
{{ macros.card_start('OrderShop.resume') }} | |||||
{% include '@LcShop/backend/order/form/card_orderproducts.html.twig' %} | {% include '@LcShop/backend/order/form/card_orderproducts.html.twig' %} | ||||
{{ macros.cardOverlay('isLoading') }} | |||||
{{ macros.endCard() }} | |||||
{{ macros.card_overlay('isLoading') }} | |||||
{{ macros.card_end() }} | |||||
</div> | |||||
{% if form_order_invoice_address is defined %} | {% if form_order_invoice_address is defined %} | ||||
{% include '@LcShop/backend/order/form/modal_invoiceaddress.html.twig' %} | {% include '@LcShop/backend/order/form/modal_invoiceaddress.html.twig' %} | ||||
{% include '@LcShop/backend/order/form/modal_sendpaymentlink.html.twig' %} | {% include '@LcShop/backend/order/form/modal_sendpaymentlink.html.twig' %} | ||||
{% endif %} | {% endif %} | ||||
{# {{ macros.startCard(3, 'OrderShop.addProduct', 'success') }} | |||||
{% include '@LcShop/backend/order/form/addproducttoorder.html.twig' %} | |||||
{{ macros.endCard(3) }} | |||||
{{ macros.startCard(0, 'OrderShop.orderReductionCart', 'success') }} | |||||
{{ form_start(form_order_reduction_cart, {'attr': { 'id' : 'orderReductionCartForm'}}) }} | |||||
{{ form_end(form_order_reduction_credit) }} | |||||
{{ macros.endCard(3) }}#} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
{% endblock %} | {% endblock %} |
{% block value %} | {% block value %} | ||||
{{ form_start(form_ticket_status,{'attr' : {'id' : 'ticketStatusForm'}}) }} | {{ form_start(form_ticket_status,{'attr' : {'id' : 'ticketStatusForm'}}) }} | ||||
{% form_theme form_ticket_status '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | {% form_theme form_ticket_status '@LcShop/backend/form/custom_bootstrap_4.html.twig' %} | ||||
{% for field in form_ticket_status.ticketStatus %} | |||||
{% for field in form_ticket_status.status %} | |||||
{{ form_widget(field, {'attr': {"class" : 'ticket-status'}}) }} | {{ form_widget(field, {'attr': {"class" : 'ticket-status'}}) }} | ||||
{% endfor %} | {% endfor %} | ||||
{{ form_end(form_ticket_status) }} | {{ form_end(form_ticket_status) }} | ||||
{{ macros.box_info('bg-warning', 'calendar', "field.default.date"|trans, entity.createdAt|date('d/m/Y')) }} | {{ macros.box_info('bg-warning', 'calendar', "field.default.date"|trans, entity.createdAt|date('d/m/Y')) }} | ||||
{% set trad = "field.Ticket.typeOptions."~entity.type %} | {% set trad = "field.Ticket.typeOptions."~entity.type %} | ||||
{{ macros.box_info('bg-success', 'archive', "field.default.category"|trans, trad|trans) }} | {{ macros.box_info('bg-success', 'archive', "field.default.category"|trans, trad|trans) }} | ||||
{% set trad = "field.Ticket.ticketStatusOptions."~entity.ticketStatus %} | |||||
{% set trad = "field.Ticket.statusOptions."~entity.status %} | |||||
public function isOrderPaid($order) | public function isOrderPaid($order) | ||||
{ | { | ||||
if ($this->getTotalOrderPayments($order) >= $this->priceUtils->getTotalWithTax($order)) { | |||||
if ($this->getTotalOrderPayments($order) >= $this->priceUtils->getTotalWithTax($order) && $this->priceUtils->getTotalWithTax($order)>0) { | |||||
return true; | return true; | ||||
} else { | } else { | ||||
return false; | return false; |
switch($entityName){ | switch($entityName){ | ||||
case 'ticket' : | case 'ticket' : | ||||
$ticketRepo = $this->em->getRepository(TicketInterface::class); | $ticketRepo = $this->em->getRepository(TicketInterface::class); | ||||
return $ticketRepo->countByTicketStatus('open'); | |||||
return $ticketRepo->countByStatus('open'); | |||||
} | } | ||||
} | } |