vendor/uvdesk/core-framework/Resources/views/home.html.twig line 1

Open in your IDE?
  1. {% extends "@UVDeskCoreFramework//Templates//layout.html.twig" %}
  2. {% block title %}Dashboard{% endblock %}
  3. {% block templateCSS %}
  4.     <style>
  5.         .graficosTortaBarra{
  6.             font-size:11px;width: 520px;border:1px solid #d3d3d3;height: 300px;
  7.         }
  8.         .boch {
  9.             display:inline-block;
  10.             height: 10px;
  11.             width: 10px;
  12.             margin-right: 3px;
  13.             border-radius: 50%;
  14.         }
  15.         .box-graficos {
  16.             display: flex;
  17.             flex-wrap: wrap;
  18.             gap: 10px;
  19.         }
  20.         .uv-activity-wrapper {
  21.             margin-top: 60px;
  22.         }
  23.         .uv-activity-wrapper .uv-activity-chart-col-lt {
  24.             width: 80%;
  25.             float: left;
  26.         }
  27.         ul.uv-activity-brick-wrapper {
  28.             list-style: none;
  29.             margin: 0;
  30.             padding: 0;
  31.             width: 100%;
  32.             display: inline-block;
  33.         }
  34.         ul.uv-activity-brick-wrapper li {
  35.             width: 25%;
  36.             display: inline-block;
  37.             float: left;
  38.             padding-left: 10px;
  39.             padding-right: 10px;
  40.             color: #fff;
  41.         }
  42.         ul.uv-activity-brick-wrapper .uv-activity-brick {
  43.             border-radius: 3px;
  44.             padding: 10px;
  45.             text-align: center;
  46.         }
  47.         ul.uv-activity-brick-wrapper li a {
  48.             color: #fff;
  49.             font-size: 45px;
  50.             width: 100%;
  51.             display: inline-block;
  52.         }
  53.         ul.uv-activity-brick-wrapper li label {
  54.             font-size: 18px;
  55.             width: 100%;
  56.             display: inline-block;
  57.         }
  58.         .uv-activity-chart-bottom-row .uv-pannel-body {
  59.             height: 450px;
  60.         }
  61.         .kudos-overview {
  62.             width: 40%;
  63.             float: left;
  64.             padding-right: 10px;
  65.         }
  66.         .recent-notification {
  67.             width: 30%;
  68.             float: left;
  69.             padding-left: 10px;
  70.         }
  71.         .completion-chart {
  72.             width: 300px;
  73.             margin: 0 auto;
  74.         }
  75.         .progress-meter .background {
  76.             fill: #EFEFEF;
  77.         }
  78.         .progress-meter text {
  79.             font-size: 30px;
  80.         }
  81.         .kudos-overview .uv-pannel-body {
  82.             text-align: center;
  83.             padding-top: 50px;
  84.         }
  85.         .kudos-overview .uv-pannel-body label {
  86.             margin-top: 10px;
  87.             display: inline-block;
  88.         }
  89.         .recent-notification ul {
  90.             list-style: none;
  91.             padding: 0;
  92.             margin: 0;
  93.             overflow-y: auto;
  94.             max-height: 400px !important;
  95.         }
  96.         .recent-notification .uv-pannel-body {
  97.             padding: 0;
  98.         }
  99.         .recent-notification ul li {
  100.             color: #333333;
  101.             border-bottom: solid 1px #D3D3D3;
  102.             padding: 15px 20px;
  103.         }
  104.         .recent-notification ul li:first-child {
  105.             border-top: none;
  106.         }
  107.         .recent-notification ul li:last-child {
  108.             border-bottom: none;
  109.         }
  110.         .recent-notification ul li * {
  111.             display: inline-block !important;
  112.         }
  113.         .recent-notification ul li .timeago {
  114.             color: #9E9E9E;
  115.             margin-top: 5px;
  116.             font-size: 13px;
  117.         }
  118.         .recent-notification label {
  119.             text-align: center;
  120.             display: inline-block;
  121.             width: 100%;
  122.             padding-top: 15px;
  123.             border-top: 1px solid #d3d3d3;
  124.         }
  125.         .recent-notification span.uv-notification-message {
  126.             float: left;
  127.             width: 100%;
  128.         }
  129.         .kudos-count {
  130.             width: 30%;
  131.             float: left;
  132.             padding-right: 10px;
  133.             padding-left: 10px;
  134.         }
  135.         .kudos-count .uv-pannel-body {
  136.             padding-top: 50px;
  137.             overflow-y: auto;
  138.         }
  139.         .kudos-count ul {
  140.             list-style: none;
  141.             padding: 0;
  142.             margin: 0;
  143.         }
  144.         .kudos-count ul li {
  145.             width: 100%;
  146.             display: inline-block;
  147.             padding: 15px 0;
  148.         }
  149.         .kudos-count ul li .uv-icon-kudos  {
  150.             vertical-align: middle;
  151.             margin-right: 10px;
  152.         }
  153.         .uv-activity-wrapper .uv-activity-chart-col-rt {
  154.             width: 20%;
  155.             float: left;
  156.         }
  157.         .uv-activity-chart-col-rt ul {
  158.             padding: 0;
  159.             margin: 0;
  160.             list-style: none;
  161.         }
  162.         .uv-activity-chart-col-rt ul li {
  163.             margin-bottom: 10px
  164.         }
  165.         .uv-activity-chart-col-rt ul li span {
  166.             width: 100%;
  167.             display: inline-block;
  168.             color: #6f6f6f;
  169.         }
  170.         .uv-middle {
  171.             margin: 0 auto;
  172.             display: inline-block;
  173.             margin-top: 200px;
  174.             text-align: center;
  175.             width: 100%;
  176.         }
  177.         @media screen and (max-width: 1024px) {
  178.             .uv-activity-wrapper .uv-activity-chart-col-lt {
  179.                 width: 100%;
  180.                 padding: 0;
  181.             }
  182.             .uv-activity-wrapper .uv-activity-chart-col-rt {
  183.                 width: 100%;
  184.             }
  185.             .kudos-overview {
  186.                 width: 100%;
  187.                 padding: 0;
  188.             }
  189.             .kudos-count {
  190.                 width: 100%;
  191.                 padding: 0;
  192.             }
  193.             .recent-notification {
  194.                 width: 100%;
  195.                 padding: 0;
  196.             }
  197.             ul.uv-activity-brick-wrapper li {
  198.                 width: 50%;
  199.                 margin: 10px 0;
  200.             }
  201.         }
  202.         @media screen and (max-width: 768px) {
  203.             ul.uv-activity-brick-wrapper li {
  204.                 width: 100%;
  205.             }
  206.         }
  207.         @media screen and (max-width: 467px) {
  208.             .completion-chart {
  209.                 width: 100%;
  210.             }
  211.         }
  212.         span.uv-notification-message a:link, span.uv-notification-message a:visited, label a:link, label a:visited {
  213.             color: #2750C4;
  214.             font-size: 15px;
  215.         }
  216.         .uv-mob-aside {
  217.             display: none;
  218.         }
  219.     {# .uv-copyright {
  220.         text-align: center;
  221.     } #}
  222.     </style>
  223. {% endblock %}
  224. {% block pageContent %}
  225.     <div class="uv-area">
  226.         {{ uvdesk_extensibles.getRegisteredComponent('Webkul\\UVDesk\\CoreFrameworkBundle\\Dashboard\\Dashboard').getHomepageTemplate().render()|raw }}
  227.         <div class="uv-copyright">
  228.             <span class="uv-credit-text">Powered by <a href="https://www.uvdesk.com" target="_blank">UVdesk</a></span>
  229.         </div>
  230.     </div>
  231.     <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  232.     <script>
  233.         const ticketsByStatus = {{report_service.ticketsByStatus|json_encode|raw}}
  234.         const ticketsByType = {{report_service.ticketsByType|json_encode|raw}}
  235.         const ticketsByPriority = {{report_service.ticketsByPriority|json_encode|raw}}
  236.         const ticketsPerAgent = {{report_service.ticketsPerAgent|json_encode|raw}}
  237.         const ticketsPerTeam = {{report_service.ticketsPerTeam|json_encode|raw}}
  238.         const kudos = {{report_service.kudos|json_encode|raw}}
  239.         const crearGrafico = (tickets, nombre) => {
  240.             console.log(tickets)
  241.             new Chart(
  242.                 document.getElementById(nombre),
  243.                 {
  244.                     type: 'pie',
  245.                     data: {
  246.                         datasets: [{
  247.                             data: Object.values(tickets).map(function (el) { return el.Cantidad }),
  248.                             backgroundColor: Object.values(tickets).map(function (el) { return el.Color }),
  249.                             hoverOffset: 4
  250.                         }]
  251.                     },
  252.                 }
  253.             )
  254.         }
  255.         //Tickets by Status
  256.         crearGrafico(ticketsByStatus, 'ticketsByStatus')
  257.         //Tickets by type
  258.         crearGrafico(ticketsByType, 'ticketsByType')
  259.         //Tickets by priority
  260.         crearGrafico(ticketsByPriority, 'ticketsByPriority')
  261.         //Tickets per agent
  262.         crearGrafico(ticketsPerAgent, 'ticketsPerAgent')
  263.         //Tickets per team
  264.         crearGrafico(ticketsPerTeam, 'ticketsPerTeam')
  265.         //Kudos
  266.         crearGrafico(kudos, 'kudos')
  267.     </script>
  268. {% endblock %}
  269. {% block footer %}
  270.     {{ parent() }}
  271. {% endblock %}