@@ -135,7 +135,12 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
public function __toString() | |||
{ | |||
return 'Commande du '.$this->getValidationDate()->format('d/m/Y') ; | |||
if($this->getValidationDate()) { | |||
return 'Commande du '.$this->getValidationDate()->format('d/m/Y') ; | |||
} | |||
else { | |||
return 'Commande #'.$this->getId() ; | |||
} | |||
} | |||
public function getValidationDate(): ?\DateTimeInterface |
@@ -7,6 +7,7 @@ use Doctrine\Persistence\ManagerRegistry; | |||
use Lc\ShopBundle\Context\DefaultRepositoryInterface; | |||
use Lc\ShopBundle\Context\TicketInterface; | |||
use Lc\ShopBundle\Context\UnitInterface; | |||
use Lc\ShopBundle\Model\Ticket; | |||
use Lc\ShopBundle\Repository\BaseRepository; | |||
/** | |||
@@ -21,5 +22,12 @@ class TicketRepository extends BaseRepository implements DefaultRepositoryInterf | |||
{ | |||
return TicketInterface::class; | |||
} | |||
public function findAllOpen() | |||
{ | |||
$query = $this->findByMerchantQuery() ; | |||
$query->andWhere('e.status IN (:statusOpen)')->setParameter('statusOpen', [Ticket::TICKET_STATUS_OPEN, Ticket::TICKET_STATUS_BEING_PROCESSED]) ; | |||
return $query->getQuery()->getResult() ; | |||
} | |||
} | |||
@@ -60,9 +60,9 @@ group: | |||
deliveryAddress: Adresse de livraison | |||
complementary: Commandes complémentaires | |||
tickets: Tickets relatif à la commande | |||
Ticket: | |||
listMessages: Liste des messages | |||
list: Tickets ouverts | |||
PointSale: | |||
main: Général | |||
Merchant: |
@@ -0,0 +1,26 @@ | |||
<table class="table table-condensed"> | |||
<thead> | |||
<tr> | |||
<th>Sujet</th> | |||
<th>Statut</th> | |||
<th></th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
{% for ticket in tickets %} | |||
<tr> | |||
<td>{{ ticket.subject }}</td> | |||
<td> | |||
{% set value = ticket.status %} | |||
{% include '@LcShop/backend/default/list-fields/field_ticket_status.html.twig' %} | |||
</td> | |||
<td> | |||
<a class="btn-sm btn-success" href="{{ path('easyadmin', {id: ticket.id, entity: 'Ticket', action: 'show'}) }}"> | |||
<i class="fas fa-eye"></i> | |||
</a> | |||
</td> | |||
</tr> | |||
{% endfor %} | |||
</tbody> | |||
</table> | |||