refactor: clean up Svelte components and improve code readability

- Refactored multiple Svelte components to enhance code clarity and maintainability.
- Standardized formatting and indentation across various files for consistency.
- Improved error handling messages in the AprovarAusencias component for better user feedback.
- Updated class names in the UI components to align with the new design system.
- Removed unnecessary whitespace and comments to streamline the codebase.
This commit is contained in:
2025-11-08 10:11:40 -03:00
parent 28107b4050
commit 01138b3e1c
24 changed files with 4655 additions and 1927 deletions

View File

@@ -171,7 +171,7 @@
<!-- Cabeçalho com Boas-vindas -->
<div
class="bg-gradient-to-r from-primary/20 to-secondary/20 rounded-2xl p-8 mb-6 shadow-lg"
class="bg-linear-to-r from-primary/20 to-secondary/20 rounded-2xl p-8 mb-6 shadow-lg"
>
<div
class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4"
@@ -210,7 +210,7 @@
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
<!-- Total de Funcionários -->
<div
class="card bg-gradient-to-br from-blue-500/10 to-blue-600/20 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-1"
class="card bg-linear-to-br from-blue-500/10 to-blue-600/20 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-1"
>
<div class="card-body">
<div class="flex items-center justify-between">
@@ -245,7 +245,7 @@
<!-- Solicitações Pendentes -->
<div
class="card bg-gradient-to-br from-yellow-500/10 to-yellow-600/20 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-1"
class="card bg-linear-to-br from-yellow-500/10 to-yellow-600/20 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-1"
>
<div class="card-body">
<div class="flex items-center justify-between">
@@ -282,7 +282,7 @@
<!-- Símbolos Cadastrados -->
<div
class="card bg-gradient-to-br from-green-500/10 to-green-600/20 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-1"
class="card bg-linear-to-br from-green-500/10 to-green-600/20 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-1"
>
<div class="card-body">
<div class="flex items-center justify-between">
@@ -321,7 +321,7 @@
<!-- Atividade 24h -->
{#if activityQuery.data}
<div
class="card bg-gradient-to-br from-purple-500/10 to-purple-600/20 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-1"
class="card bg-linear-to-br from-purple-500/10 to-purple-600/20 shadow-xl hover:shadow-2xl transition-all duration-300 transform hover:-translate-y-1"
>
<div class="card-body">
<div class="flex items-center justify-between">
@@ -409,7 +409,7 @@
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
<!-- Usuários Online -->
<div
class="card bg-gradient-to-br from-primary/10 to-primary/5 border-2 border-primary/20 shadow-lg"
class="card bg-linear-to-br from-primary/10 to-primary/5 border-2 border-primary/20 shadow-lg"
>
<div class="card-body p-4">
<div class="flex items-center justify-between">
@@ -448,7 +448,7 @@
<!-- Total de Registros -->
<div
class="card bg-gradient-to-br from-success/10 to-success/5 border-2 border-success/20 shadow-lg"
class="card bg-linear-to-br from-success/10 to-success/5 border-2 border-success/20 shadow-lg"
>
<div class="card-body p-4">
<div class="flex items-center justify-between">
@@ -487,7 +487,7 @@
<!-- Tempo Médio de Resposta -->
<div
class="card bg-gradient-to-br from-info/10 to-info/5 border-2 border-info/20 shadow-lg"
class="card bg-linear-to-br from-info/10 to-info/5 border-2 border-info/20 shadow-lg"
>
<div class="card-body p-4">
<div class="flex items-center justify-between">
@@ -524,7 +524,7 @@
<!-- Uso de Sistema -->
<div
class="card bg-gradient-to-br from-warning/10 to-warning/5 border-2 border-warning/20 shadow-lg"
class="card bg-linear-to-br from-warning/10 to-warning/5 border-2 border-warning/20 shadow-lg"
>
<div class="card-body p-4">
<div>
@@ -615,7 +615,7 @@
<div class="flex-1 flex items-end gap-0.5 h-full group">
<!-- Entradas (verde) -->
<div
class="flex-1 bg-gradient-to-t from-success to-success/70 rounded-t transition-all duration-300 hover:scale-110"
class="flex-1 bg-linear-to-t from-success to-success/70 rounded-t transition-all duration-300 hover:scale-110"
style="height: {(ponto.entradas /
Math.max(maxAtividade, 1)) *
100}%; min-height: 2px;"
@@ -623,7 +623,7 @@
></div>
<!-- Saídas (vermelho) -->
<div
class="flex-1 bg-gradient-to-t from-error to-error/70 rounded-t transition-all duration-300 hover:scale-110"
class="flex-1 bg-linear-to-t from-error to-error/70 rounded-t transition-all duration-300 hover:scale-110"
style="height: {(ponto.saidas /
Math.max(maxAtividade, 1)) *
100}%; min-height: 2px;"
@@ -663,13 +663,13 @@
>
<div class="flex items-center gap-2">
<div
class="w-4 h-4 bg-gradient-to-t from-success to-success/70 rounded"
class="w-4 h-4 bg-linear-to-t from-success to-success/70 rounded"
></div>
<span class="text-sm text-base-content/70">Entradas no BD</span>
</div>
<div class="flex items-center gap-2">
<div
class="w-4 h-4 bg-gradient-to-t from-error to-error/70 rounded"
class="w-4 h-4 bg-linear-to-t from-error to-error/70 rounded"
></div>
<span class="text-sm text-base-content/70">Saídas do BD</span>
</div>