From dfc5072142f5381a005bcb8db92cfeb05a828612 Mon Sep 17 00:00:00 2001 From: Welton Moura Date: Sun, 19 Jan 2025 18:49:44 -0300 Subject: [PATCH] style: page home --- gestaoRaul/db.sqlite3 | Bin 299008 -> 299008 bytes gestaoRaul/home/templates/home.html | 10 ++--- gestaoRaul/templates/static/home/css/home.css | 2 +- gestaoRaul/templates/static/home/js/home.js | 40 ++++++++++++++++-- 4 files changed, 42 insertions(+), 10 deletions(-) diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3 index b0f0c6050c2cb5cef5ea4faad5b6b6ce38d8ddda..81ff047486bc9115d925af31f5c6ddc5008b8aa0 100644 GIT binary patch delta 45 zcmZozAk?rxXo583m5DOWj8_^HS`!$zCNRavvznM1=$f@3iDv?0=Iuw~S!@gdcCZiX delta 45 zcmZozAk?rxXo583g^4oGj29XcS`!$zCNRavvzi(h=$f=2iDv?0=Iuw~S!@gdbw3Z> diff --git a/gestaoRaul/home/templates/home.html b/gestaoRaul/home/templates/home.html index 66efe3b..ae4ebef 100644 --- a/gestaoRaul/home/templates/home.html +++ b/gestaoRaul/home/templates/home.html @@ -67,17 +67,17 @@ RRB&C - DashBoard
-

Gráfico de vendas

- +

Mais vendidos

+
-

Gráfico cozinha

+

Tempo médio na cozinha

@@ -92,7 +92,7 @@ RRB&C - DashBoard

Faturamento anual

- +
diff --git a/gestaoRaul/templates/static/home/css/home.css b/gestaoRaul/templates/static/home/css/home.css index e83f187..16e1b96 100644 --- a/gestaoRaul/templates/static/home/css/home.css +++ b/gestaoRaul/templates/static/home/css/home.css @@ -35,7 +35,7 @@ align-items: center; width: 300px; height: 130px; - background-color: #2b376e; + background-color: #1a237e; border-radius: 10px; box-shadow: 5px 5px 10px rgba(156, 156, 156, 0.2); text-align: left; diff --git a/gestaoRaul/templates/static/home/js/home.js b/gestaoRaul/templates/static/home/js/home.js index 85996e6..bbffa09 100644 --- a/gestaoRaul/templates/static/home/js/home.js +++ b/gestaoRaul/templates/static/home/js/home.js @@ -1,23 +1,55 @@ -var barColors = ["red", "green","blue","orange","brown"]; +const barColors = ['rgba(252, 52, 95, 0.65)', + 'rgba(253, 193, 53, 0.65)', + 'rgba(54, 162, 235, 0.65)', + 'rgba(75, 192, 192, 0.65)', + 'rgba(153, 102, 255, 0.65)',]; + +const barColorsBorder = ['rgba(252, 52, 95)', + 'rgb(253, 193, 53)', + 'rgb(54, 162, 235)', + 'rgb(75, 192, 192)', + 'rgb(153, 102, 255)',]; var chartVendas = new Chart("vendas", { type: "bar", data: { labels: [], datasets: [{ + fill: true, + // barPercentage: 1.0, data: [], backgroundColor: barColors, + borderColor: barColorsBorder, + borderWidth: 2, + borderRadius: 8 }] }, options: { + + indexAxis: 'y', + scales: { + y: { + ticks: { + display: true, + + // color: 'white' + // padding: 5, + callback: function(value, index, values) { + return chartVendas.data.labels[index].substring(0, 6); // Retorna o valor normal do label + }, + } + }, + + }, legend: {display: false}, title: { - display: true, + display: false, text: "Produtos mais vendidos" }, - } + }, + }); var chartCuisine = new Chart("cuisine", { @@ -228,7 +260,7 @@ function mediaCuisine(){ var dateStart = document.getElementById('data-start').value == '' ? '2025-01-01' :document.getElementById('data-start').value; var dateEnd = document.getElementById('data-end').value == '' ? getDataAtualFormatada()[1] :document.getElementById('data-end').value;; var yValues = []; -var xValues = ['Fila', 'Preparando', 'Entregar']; +var xValues = ['Fila', 'Preparo', 'Entrega']; var totalPagamenstos = document.getElementById('total-pagamentos') var qtdPagamentos = document.getElementById('qtd-pagamentos') var ticketMedio = document.getElementById('ticket-medio')