diff --git a/src/views/components/retrospective-slides.tsx b/src/views/components/retrospective-slides.tsx index 9bfea94..b78342e 100644 --- a/src/views/components/retrospective-slides.tsx +++ b/src/views/components/retrospective-slides.tsx @@ -4,7 +4,7 @@ import { } from '@/app/hooks/useMetrics'; import logoAImg from '@/assets/images/a-agape.png'; import logoImg from '@/assets/images/agape-logo.png'; -import { BuildingIcon, ClockIcon, SpinnerIcon } from '@phosphor-icons/react'; +import { BuildingIcon, ChartLineUpIcon, ClockIcon, SpinnerIcon } from '@phosphor-icons/react'; import { motion } from 'framer-motion'; import * as React from 'react'; import { useSearchParams } from 'react-router-dom'; @@ -149,235 +149,263 @@ export function RetrospectiveSlides() { {metricsPortal && metricsPortal.length > 0 && ( - -
- - - - -
- -

- Você acessou -

-
- - -
- {metricsPortal - .reduce((acc, p) => acc + p.totalAcessos, 0) - .toLocaleString('pt-BR')} -
-

- vezes -

-
- - -

- o{' '} - - {metricsPortal[0]?.nomeSistema || 'Portal'} - -

-

- durante o ano de {ano} -

-
- - -
- {[...Array(3)].map((_, i) => ( - - ))} -
-
-
-
-
- )} - - {topItems.length > 0 && (
- {/* Coluna esquerda - Título e informações */} + {/* Coluna esquerda - Ícone e números principais */} + {/* Ícone com efeito */} - +
+
+ +
+ {/* Título */} - Seus Aplicativos Favoritos + Portal Corporativo - Os sistemas mais acessados em {ano} + A porta de entrada para todas as aplicações + {/* Número principal */} +
+ {metricsPortal + .reduce((acc, p) => acc + p.totalAcessos, 0) + .toLocaleString('pt-BR')} +
+

+ acessos em {ano} +

+
+ + {/* Estatísticas rápidas */} + -
-

- {totalAcessos.toLocaleString('pt-BR')} -

-

- acessos totais no ano -

+ transition={{ duration: 0.6, delay: 0.6 }}> +
+
+
+ {Math.round( + metricsPortal.reduce( + (acc, p) => acc + p.totalAcessos, + 0, + ) / 365, + )} +
+
+ Por dia +
+
+ +
+
+ {Math.round( + metricsPortal.reduce( + (acc, p) => acc + p.totalAcessos, + 0, + ) / 12, + ).toLocaleString('pt-BR')} +
+
+ Por mês +
+
+ +
+
+ {Math.round( + metricsPortal.reduce( + (acc, p) => acc + p.totalAcessos, + 0, + ) / 2920, + )} +
+
+ Por hora* +
+
- {/* Coluna direita - Lista vertical compacta */} + {/* Coluna direita - Sistemas mais acessados (mantendo seu design) */}
-
- {topItems.slice(0, 6).map((item, index) => { - const medalColors = [ - 'bg-yellow-400 text-yellow-900', - 'bg-gray-300 text-gray-900', - 'bg-orange-400 text-orange-900', - 'bg-blue-400/20 text-blue-300', - 'bg-purple-400/20 text-purple-300', - 'bg-green-400/20 text-green-300', - ]; - const isMedal = index < 3; - const medalColor = medalColors[index] || 'bg-white/20'; +
+ +
+ + + Aplicativos Mais Acessados + +
+

+ Os sistemas que mais acessaram o portal +

+
- return ( - -
- {index === 0 && '🥇'} - {index === 1 && '🥈'} - {index === 2 && '🥉'} - {index >= 3 && `#${index + 1}`} -
- -
-

- {item.nomeSistema} -

-

- {item.totalAcessos.toLocaleString('pt-BR')}{' '} - acessos -

-
+ {/* Lista de sistemas */} +
+ {topItems.slice(0, 6).map((item, index) => { + const medalColors = [ + 'bg-yellow-400 text-yellow-900', + 'bg-gray-300 text-gray-900', + 'bg-orange-400 text-orange-900', + 'bg-blue-400/20 text-blue-300', + 'bg-purple-400/20 text-purple-300', + 'bg-green-400/20 text-green-300', + ]; + const isMedal = index < 3; + const medalColor = + medalColors[index] || 'bg-white/20'; + return ( -

- {( - (item.totalAcessos / - (topItems[0]?.totalAcessos || 1)) * - 100 - ).toFixed(0)} - % -

-
- +
+ {index === 0 && '🥇'} + {index === 1 && '🥈'} + {index === 2 && '🥉'} + {index >= 3 && `#${index + 1}`}
+ +
+

+ {item.nomeSistema} +

+

+ {item.totalAcessos.toLocaleString('pt-BR')}{' '} + acessos +

+
+ + +

+ {( + (item.totalAcessos / + (topItems[0]?.totalAcessos || 1)) * + 100 + ).toFixed(0)} + % +

+
+ +
+
- - ); - })} + ); + })} +
+ + {/* Indicador de progresso */} + +
+
+ Próxima análise +
+
+ {[...Array(3)].map((_, i) => ( + + ))} +
+
+
)} + +