You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
3.7KB

  1. {% extends '@LcShop/backend/default/show.html.twig' %}
  2. {% trans_default_domain 'lcshop' %}
  3. {% import '@LcShop/backend/default/block/macros.html.twig' as macros %}
  4. {% import '@LcShop/backend/user/macros.html.twig' as user_macros %}
  5. {% block global_actions %}
  6. {% if entity is not null %}
  7. {% set action = {label : "action.user.switch", icon: 'user-secret', css_class: 'btn btn-sm btn-danger'} %}
  8. {% include '@LcShop/backend/user/block/user-switch.html.twig' with {item: entity, is_dropdown: false, action: action, translation_domain: 'lcshop', trans_parameters: {}, item_id: entity.id} %}
  9. <button id="btn-ticket-write-to-user"
  10. data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}"
  11. data-user="{{ entity.id }}"
  12. class="btn-sm btn-success"
  13. type="button"><i class="fa fa-pen-alt"></i> {{ "action.ticket.writeToUser"|trans }}
  14. </button>
  15. {% endif %}
  16. {% endblock %}
  17. {% block main %}
  18. <div class="lc-vue-js-container" id="lc-user">
  19. <div class="row">
  20. <div class="col-3">
  21. {{ user_macros.card_info(entity) }}
  22. </div>
  23. <div class="col-9 row">
  24. <div class="col-3">
  25. {{ user_macros.box_rank_total_order(entity) }}
  26. {{ user_macros.box_total_order(entity) }}
  27. </div>
  28. <div class="col-3">
  29. {{ user_macros.box_rank_sum_order(entity) }}
  30. {{ user_macros.box_total_spent(entity) }}
  31. </div>
  32. <div class="col-3">
  33. {{ user_macros.box_prepaid_account(entity) }}
  34. {{ user_macros.box_average_products(entity) }}
  35. </div>
  36. <div class="col-3">
  37. {{ user_macros.box_register_since(entity) }}
  38. {{ user_macros.box_login_since(entity) }}
  39. </div>
  40. </div>
  41. <div class="col-6">
  42. {% set redeliveries = orderUtils.getRedeliveryByUser(entity) %}
  43. {% if redeliveries|length %}
  44. {{ macros.card_start('Redelivery.list', 'danger card-outline', true) }}
  45. {{ user_macros.list_order_product_redelivery(redeliveries) }}
  46. {{ macros.card_end() }}
  47. {% endif %}
  48. {% set tickets = ticketUtils.getTicketsByUser(entity) %}
  49. {% if tickets|length %}
  50. {{ macros.card_start('Ticket.listMessages', 'warning card-outline', false) }}
  51. {{ macros.list_tickets(tickets) }}
  52. {{ macros.card_end() }}
  53. {% endif %}
  54. {% if entity.reductionCredits|length %}
  55. {{ macros.card_start('ReductionCredit.list', 'warning card-outline', false) }}
  56. {{ macros.list_reduction_credits(entity.reductionCredits, entity) }}
  57. {{ macros.card_end() }}
  58. {% endif %}
  59. {% set reductionCartsAvailable = orderUtils.getReductionCartsAvailableByUser(entity) %}
  60. {% if reductionCartsAvailable|length %}
  61. {{ macros.card_start('ReductionCart.list', 'success card-outline', false) }}
  62. {{ macros.list_reduction_carts(reductionCartsAvailable, entity) }}
  63. {{ macros.card_end() }}
  64. {% endif %}
  65. </div>
  66. <div class="col-6">
  67. {{ macros.card_start('OrderShop.list', 'primary card-outline', false) }}
  68. {{ user_macros.list_order_shops(orderUtils.getOrderShops({'user': entity})) }}
  69. {{ macros.card_end() }}
  70. </div>
  71. </div>
  72. </div>
  73. {% endblock %}