- Added the ProtectedRoute component to various dashboard pages to enforce authentication and role-based access control. - Updated allowedRoles and maxLevel parameters for specific routes to align with the new permission management structure. - Enhanced user experience by ensuring consistent access checks across the application.
48 lines
1.6 KiB
Svelte
48 lines
1.6 KiB
Svelte
<script lang="ts">
|
|
import { ShoppingCart, ShoppingBag, Plus } from "lucide-svelte";
|
|
import { resolve } from "$app/paths";
|
|
import ProtectedRoute from "$lib/components/ProtectedRoute.svelte";
|
|
</script>
|
|
|
|
<ProtectedRoute>
|
|
<main class="container mx-auto px-4 py-4">
|
|
<div class="text-sm breadcrumbs mb-4">
|
|
<ul>
|
|
<li><a href={resolve('/')} class="text-primary hover:underline">Dashboard</a></li>
|
|
<li>Compras</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="mb-6">
|
|
<div class="flex items-center gap-4 mb-2">
|
|
<div class="p-3 bg-cyan-500/20 rounded-xl">
|
|
<ShoppingCart class="h-8 w-8 text-cyan-600" strokeWidth={2} />
|
|
</div>
|
|
<div>
|
|
<h1 class="text-3xl font-bold text-primary">Compras</h1>
|
|
<p class="text-base-content/70">Gestão de compras e aquisições</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card bg-base-100 shadow-xl">
|
|
<div class="card-body">
|
|
<div class="flex flex-col items-center justify-center py-12 text-center">
|
|
<div class="mb-6">
|
|
<ShoppingBag class="h-24 w-24 text-base-content/20" strokeWidth={1.5} />
|
|
</div>
|
|
<h2 class="text-2xl font-bold mb-2">Módulo em Desenvolvimento</h2>
|
|
<p class="text-base-content/70 max-w-md mb-6">
|
|
O módulo de Compras está sendo desenvolvido e em breve estará disponível com funcionalidades completas para gestão de compras e aquisições.
|
|
</p>
|
|
<div class="badge badge-warning badge-lg gap-2">
|
|
<Plus class="h-4 w-4" strokeWidth={2} />
|
|
Em Desenvolvimento
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</ProtectedRoute>
|
|
|