refactor: update components to use lucide icons and improve structure
- Replaced SVG icons with lucide-svelte components across various files for consistency and improved performance. - Refactored ActionGuard, ErrorModal, FileUpload, and other components to enhance readability and maintainability. - Updated the dashboard pages to include new icons and improved layout for better user experience. - Enhanced StatsCard component to support dynamic icon rendering, allowing for more flexible usage. - Improved overall styling and structure in multiple components to align with design standards.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import StatsCard from "$lib/components/ti/StatsCard.svelte";
|
||||
import { format } from "date-fns";
|
||||
import { ptBR } from "date-fns/locale";
|
||||
import { FileText, Clock, CheckCircle2, XCircle } from "lucide-svelte";
|
||||
|
||||
type StatusSolicitacao = "pendente" | "aprovado" | "rejeitado";
|
||||
|
||||
@@ -294,7 +295,7 @@
|
||||
<StatsCard
|
||||
title="Total de Solicitações"
|
||||
value={stats.total}
|
||||
icon='<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />'
|
||||
Icon={FileText}
|
||||
color="primary"
|
||||
/>
|
||||
|
||||
@@ -302,7 +303,7 @@
|
||||
title="Pendentes"
|
||||
value={stats.pendentes}
|
||||
description="{stats.total > 0 ? ((stats.pendentes / stats.total) * 100).toFixed(1) + '% do total' : '0% do total'}"
|
||||
icon='<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />'
|
||||
Icon={Clock}
|
||||
color="warning"
|
||||
/>
|
||||
|
||||
@@ -310,7 +311,7 @@
|
||||
title="Aprovadas"
|
||||
value={stats.aprovadas}
|
||||
description="{stats.total > 0 ? ((stats.aprovadas / stats.total) * 100).toFixed(1) + '% do total' : '0% do total'}"
|
||||
icon='<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />'
|
||||
Icon={CheckCircle2}
|
||||
color="success"
|
||||
/>
|
||||
|
||||
@@ -318,7 +319,7 @@
|
||||
title="Rejeitadas"
|
||||
value={stats.rejeitadas}
|
||||
description="{stats.total > 0 ? ((stats.rejeitadas / stats.total) * 100).toFixed(1) + '% do total' : '0% do total'}"
|
||||
icon='<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />'
|
||||
Icon={XCircle}
|
||||
color="error"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user