diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3 index 0bcd4ba..62e65ab 100644 Binary files a/gestaoRaul/db.sqlite3 and b/gestaoRaul/db.sqlite3 differ diff --git a/gestaoRaul/home/templates/home.html b/gestaoRaul/home/templates/home.html index 73c4085..0d705fd 100644 --- a/gestaoRaul/home/templates/home.html +++ b/gestaoRaul/home/templates/home.html @@ -5,6 +5,18 @@ {% block 'head' %} + + + + + + + + + + + + {% endblock %} {% block 'title' %} @@ -18,14 +30,26 @@ RRB&C - DashBoard
-

Valor Total de Pagamentos

-

R$ {{total_pagamentos |floatformat:2 }}

-
-
+

Valor de Pagamentos

+
R$ {{total_pagamentos |floatformat:2 }}
+

Quantidade de Pagamentos

-

{{ qdt_pagamentos }}

-

Tíket médio

-

R$ {{ ticekMedio |floatformat:2}}

+
{{ qdt_pagamentos }}
+
+

Ticket médio

+
R$ {{ ticekMedio |floatformat:2}}
+
+
+ +
+

Gráficos de vendas

+
+ + + + + +
@@ -37,8 +61,8 @@ RRB&C - DashBoard {% for produto in produtos_mais_vendidos %} - {{ produto.nome }} - {{ produto.quantidade }} + {{ produto.nome }} + {{ produto.quantidade }} {% endfor %} @@ -48,6 +72,10 @@ RRB&C - DashBoard
+ + + + diff --git a/gestaoRaul/templates/static/home/css/home.css b/gestaoRaul/templates/static/home/css/home.css index c745b76..ede78b2 100644 --- a/gestaoRaul/templates/static/home/css/home.css +++ b/gestaoRaul/templates/static/home/css/home.css @@ -14,7 +14,7 @@ width: 420px; height: 420px; background-color: #2b376e; - border-radius: 15px; + border-radius: 10px; box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2); text-align: center; line-height: 30px; /* Centraliza o texto verticalmente */ @@ -46,10 +46,8 @@ width: 95%; /* height: 80%; */ background-color: #2b376e; - border-radius: 15px; - box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2); text-align: center; - line-height: 30px; /* Centraliza o texto verticalmente */ + line-height: 30px; font-size: 20px; font-weight: bold; padding: 10px; diff --git a/gestaoRaul/templates/static/home/js/home.js b/gestaoRaul/templates/static/home/js/home.js index e69de29..24e7080 100644 --- a/gestaoRaul/templates/static/home/js/home.js +++ b/gestaoRaul/templates/static/home/js/home.js @@ -0,0 +1,37 @@ + + +console.log(document.getElementById('n-0')) + + +var xValues = [document.getElementById('n-0').innerText, + document.getElementById('n-1').innerText, + document.getElementById('n-2').innerText, + document.getElementById('n-3').innerText, + document.getElementById('n-4').innerText + ]; +var yValues = [document.getElementById('q-0').innerText, + document.getElementById('q-1').innerText, + document.getElementById('q-2').innerText, + document.getElementById('q-3').innerText, + document.getElementById('q-4').innerText +]; +var barColors = ["red", "green","blue","orange","brown"]; + +new Chart("vendas", { + type: "bar", + data: { + labels: xValues, + datasets: [{ + backgroundColor: barColors, + data: yValues + }] + }, + options: { + legend: {display: false}, + title: { + display: true, + text: "Produtos mais vendidos" + }, + + } + }); \ No newline at end of file